Solved

PHP Code Not Working Correctly

Posted on 2011-03-24
7
227 Views
Last Modified: 2012-08-13
I'm getting the following error with the code below:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in C:\wamp\www\flow\fpdf\rev.php on line 47

Can I get another set of eyes to look at it & see what I'm missing?
<html
<head>
<?php
require('connection.php');

if (isset($_GET['op']) && $_GET['op'] == "d") 
if($_GET['op'] == "d" && !empty($_GET['id']) )
{

{
$result = mysql_query($query) or die(mysql_error()); 
}

$query="SELECT fid, pacts, fname, lname, employee, dock, due_owner, due_attny, due_suspo, due_clerk, interv_date, due_rev, assgn_date, sent_date FROM psrinfo";
$result = mysql_query($query) or die(mysql_error()); 

while($row = mysql_fetch_array( $result ))  {
?>

 
<?php }

require('connection.php');

if (isset($_GET['op']) && $_GET['op'] == "d") 
if($_GET['op'] == "d" && !empty($_GET['id']) )
{

   $result = mysql_query($query) or die(mysql_error());  
}

$query="SELECT fid, pacts, fname, lname, employee, dock, due_owner, due_attny, due_suspo, due_clerk, interv_date, due_rev, assgn_date, sent_date FROM psrinfo WHERE employee = 'employee1' ";
$result = mysql_query($query) or die(mysql_error()); 

echo '<form action="111.php" method="post">
<h2> <center> Paper Review </center></h2>
<table width="75%" border="1">';

while($row = mysql_fetch_array( $result )) {

echo '<tr>
<td><b>PACTS:</b> <br><input type="text" name="pacts" size="25" maxlength="30" value="'. $row['pacts'] .'" /><br> </td>
<td><b>Reviewer:</b> <br><input type="text" name="dock" size="25" maxlength="30" value="''" /><br> </td> 
</tr>

<tr>
<td><b>First Name:</b> <br><input type="text" name="fname" size="25" maxlength="30" value="'. $row['fname'] .'" /><br> </td>
<td><b>Last Name:</b> <br><input type="text" name="lname" size="25" maxlength="30" value="'. $row['lname'] .'" /><br> </td>
<td><b>Dock:</b> <br><input type="text" name="dock" size="25" maxlength="30" value="'. $row['dock'] .'" /><br> </td>
</tr>

<tr>
<td><b>Sent Date:</b> <br><input type="text" name="sent_date" size="25" maxlength="30" value="'. $row['sent_date'] .'" /><br> </td>
<td><b>Assign Date:</b> <br><input type="text" name="assgn_date" size="25" maxlength="30" value="'. $row['assgn_date'] .'" /><br> </td>
<td><b>Interview Date:</b> <br><input type="text" name="interv_date" size="25" maxlength="30" value="'. $row['interv_date'] .'" /><br> </td>
</tr>

<tr>
<td></b><br><input type="text" name="assgn_date" size="30" maxlength="30" value="Given to Reviewer" />  <br><input type="text" name="assgn_date" size="30" maxlength="30" value="Given to SUSPO" /> <br> <input type="text" name="assgn_date" size="30" maxlength="30" value="Given to Clerk" /> <br> <input type="text" name="assgn_date" size="30" maxlength="30" value="PSR Disclosed to Attn" /> <br> <input type="text" name="assgn_date" size="30" maxlength="30" value="PSR Disclosed to owner" /> </td>
<td><b>Initials</b> <br><input type="text" name="dock" size="30" maxlength="30"  /> <br> <input type="text" name="dock" size="30" maxlength="30"  />  <br><input type="text" name="dock" size="30" maxlength="30" /> <br> <input type="text" name="dock" size="30" maxlength="30"  /> <br> <input type="text" name="dock" size="30" maxlength="30"  /></td> 
<td><b>Due Date:</b> <br><input type="text" name="due_rev" size="25" maxlength="30" value="'. $row['due_rev'] .'" />  <br> <input type="text" name="due_suspo" size="25" maxlength="30" value="'. $row['due_suspo'] .'" /> <br> <input type="text" name="due_clerk" size="25" maxlength="30" value="'. $row['due_clerk'] .'" /> <br> <input type="text" name="due_attny" size="25" maxlength="30" value="'. $row['due_attny'] .'" /> <br> <input type="text" name="due_" size="25" maxlength="30" value="'. $row['due_owner'] .'" /> </td>
<td><br><input type="text" name="assgn_date" size="30" maxlength="30" value="Given to Reviewer" />  <br><input type="text" name="assgn_date" size="30" maxlength="30" value="Given to SUSPO" /> <br> <input type="text" name="assgn_date" size="30" maxlength="30" value="Given to Clerk" /> <br> <input type="text" name="assgn_date" size="30" maxlength="30" value="PSR Disclosed to Attn" /> <br> <input type="text" name="assgn_date" size="30" maxlength="30" value="PSR Disclosed to Owner" /> </td>
<td><b>Actual Date:</b><br><input type="text" name="assgn_date" size="30" maxlength="30" value="" />  <br> <input type="text" name="assgn_date" size="30" maxlength="30" value="" /> <br> <input type="text" name="assgn_date" size="30" maxlength="30" value="" /> <br> <input type="text" name="assgn_date" size="30" maxlength="30" value="" /> <br> <input type="text" name="assgn_date" size="30" maxlength="30" value="" /> </td>
</tr>;


<td>
<b>Employee Notes:</b> <br>
<textarea name = "notes" rows=9 cols=100></textarea>
</td>
</tr>';

}
echo '</table>
</form>';
mysql_close(); // Close the database connection.

?>           
 </tbody>
 </table>

Open in new window

0
Comment
Question by:wantabe2
  • 4
  • 3
7 Comments
 
LVL 27

Expert Comment

by:Lukasz Chmielewski
ID: 35209667
try this:
<td><b>First Name:</b> <br><input type="text" name="fname" size="25" maxlength="30" value=". $row['fname'] ." /><br> </td>

Open in new window

0
 
LVL 27

Expert Comment

by:Lukasz Chmielewski
ID: 35209673
(line 47 of course)
0
 
LVL 15

Author Comment

by:wantabe2
ID: 35209725
same thing....same line
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 27

Accepted Solution

by:
Lukasz Chmielewski earned 500 total points
ID: 35209772
OK, I see it now, so line 47 is not a single line as I thought
You need to change everything from echo' at line 41
having the data displayed only like
value = ". $row['lname'] ."

Open in new window

not
value = "'. $row['lname'] .'"

Open in new window

0
 
LVL 15

Author Comment

by:wantabe2
ID: 35209791
Thanks Roads_Roads,
I discovered that before I checked this post again & you are correct. Now I'm getting

Line 82 is the last line with no code on line 82

There is no code on line 82, my last line of code is on line 80
0
 
LVL 15

Author Comment

by:wantabe2
ID: 35209857
I figured it out....too many }. I took a } out on line 8 & it fixed it. Thanks
0
 
LVL 27

Expert Comment

by:Lukasz Chmielewski
ID: 35209864
is this code an include file ?
I see the html and head tags opening but no closing ?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Calculate values in an array 18 32
what is best version of php to use 6 44
Should I use subdomains or addon domains? 3 33
Apply tab index in forms 6 33
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

939 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now