Solved

PHP Code Not Working Correctly

Posted on 2011-03-24
7
226 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
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Creating and Managing Databases with phpMyAdmin in cPanel.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
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…

708 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

13 Experts available now in Live!

Get 1:1 Help Now