Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

PHP Code Not Working Correctly

Posted on 2011-03-24
7
Medium Priority
?
235 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
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
LVL 27

Accepted Solution

by:
Lukasz Chmielewski earned 2000 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

971 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