Solved

PHP Code Not Working Correctly

Posted on 2011-03-24
7
231 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

751 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