Jump to content

Archived

This topic is now archived and is closed to further replies.

lpxxfaintxx

unexpected T_CONSTANT_ENCAPSED_STRING

Recommended Posts

[code]<?php
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";

$username = $userdata['user_name'];

$sql2="SELECT * FROM registered_files WHERE id = '$id'";
$result2=mysql_query($sql2);
$rows2=mysql_fetch_array($result2);

$imagename = $rows2['imagename'];
$imagedescription = $rows2['description'];

opentable('Edit Images');
$owner = $userdata['user_name'];
$sql = "SELECT * FROM `registered_files` WHERE `owner` = '$owner'";
$result=mysql_query($sql);
// Define $color=1
$color="1";
echo '<table width="850" border="1" align="center" cellpadding="2" cellspacing="0">';
while($rows=mysql_fetch_array($result)){
$id = $rows['id'];
// If $color==1 table row color = #FFC600
if($color==1){
echo '<tr bgcolor="#eeeeee" onmouseover ="style.backgroundColor=\'#3D59AB\';" onmouseout=\'style.backgroundColor="#eeeeee"\'>
<td>'.$rows['status'].'</td><td>'.$rows['imagename'].'</td><td>'.$rows['date'].'</td><td>'.$rows['description'].'</td>
<td><a href="/memberseditimages.php?editid='.$id.'">Edit</a></td>
</tr>';
// Set $color==2, for switching to other color
$color="2";
}
// When $color not equal 1, use this table row color
else {
echo '<tr bgcolor="#c0c0c0" onmouseover ="style.backgroundColor=\'#3D59AB\';" onmouseout=\'style.backgroundColor="#c0c0c0"\'>
<td>'.$rows['status'].'</td><td>'.$rows['imagename'].'</td><td>'.$rows['date'].'</td><td>'.$rows['description'].'</td>
<td><a href="/memberseditimages.php?editid='.$id.'">Edit</a></td>
</tr>';
// Set $color back to 1
$color="1";
}}
echo '</table>';
$editid = $_GET['editid'];
$sql2="SELECT * FROM registered_files WHERE id = '$editid'";
$result2=mysql_query($sql2);
$rows2=mysql_fetch_array($result2);
$imagename = $rows2['imagename'];
$imagedescription = $rows2['description'];
if(isset($_GET['editid']) && $rows2['owner'] = $username) {
echo '<br /><br /> <center><body><table width="700" border="1" cellpadding="2" cellspacing="0">
  <tr>
    <td width="156">Status:</td>
    <td width="530"><form id="form1" name="form1" method="post" action="editimagesprocess.php?save=1">
    <font color= "green" >Public</font>
        <input name="status" type="radio" value="public" />
        </label>
    or
    <label>
    <font color="red"> Private </font>
     <input name="status" type="radio" value="private" />
     <input name="id" type="hidden" value='.$editid'>
    </label>
    <label>
    <label>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input name="Save1" type="submit" id="Save1" value="Save" />
    </label>
    </form>
    </td>
  </tr>
  <tr>
    <td>Image Name: </td>
    <td><form id="form2" name="form2" method="post" action="editimagesprocess.php?save=2">
      <label>
        <input name="imagename" type="text" id="imagename" value='.$imagename.' size="40" maxlength="50">
             <input name="id" type="hidden" value='.$editid.'>
        </label>
      <label>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <input name="Save2" type="submit" id="Save2" value="Save">
      </label>
    </form>
    </td>
  </tr>
  <tr>
    <td height="77">Image Description: </td>
    <td><form name="imagedescription" method="post" action="editimagesprocess.php?save=3">
      <label>
        <textarea name="imagedescription" cols="50" rows="3" id="imagedescription">'.$imagedescription.'</textarea>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
      <label>
      <input name="imagedescription" type="submit" id="Save3" value="Save">
      </label>
           <input name="id" type="hidden" value='.$editid'>
    </form>
    </td>
  </tr>
</table></center>';


}
require_once "side_right.php";
require_once "footer.php";

?>[/code]


Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/lpxxfain/public_html/memberseditimages.php on line 75

I really don't know where it went wrong. It was working fine, before I added the "hidden field." Please help,

Regards,
AIMMutlmedia.com

Share this post


Link to post
Share on other sites
On this line:
[code]<?php            <input name="id" type="hidden" value='.$editid'> ?>[/code]
you left out the "." before the "'>".

Ken

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.