scarezekiel Posted March 21, 2012 Share Posted March 21, 2012 Parse error: syntax error, unexpected T_LNUMBER, expecting ',' or ';' in /home/aep/public_html/administrator/page/master_psevent_edit.php on line 71 <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .style1 {color: #FFFFFF} --> </style> </head> <table width="500" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <td> <form action="" method="post" name="" id=""> <table width="600" border="0" align="left" cellpadding="2" cellspacing="2"> <tr > <td valign="top" ><input name="topcheckbox" type="checkbox" class="check" id="topcheckbox" onClick="selectallps();" value="ON"> Select All</td><td></td> <? $id = $_GET[id]; $connection=mysql_connect("$server", "$username", "$password") or die("Could not establish connection"); mysql_select_db($database_name, $connection) or die ("Could not select database"); $query="select DATE_FORMAT(event_datefrom, '%d %b %Y') AS datefrom, DATE_FORMAT(event_dateto, '%d %b %Y') AS dateto, event_venue , ucase(event_name) as eventname from master_event where event_id = '$id' "; $result=mysql_query($query,$connection) or die(mysql_error()); while($row=mysql_fetch_array($result)) { $eventdatefrom =$row['datefrom']; $eventdateto =$row['dateto']; $eventvenue =$row['event_venue']; echo "<strong>"; echo $row['eventname']; echo "</strong>Date : "; echo "$eventdatefrom - $eventdateto"; echo "<br> Venue : $eventvenue <br><br>"; } ?> </tr> <tr><table width="600" frame="box" rules="all" border="3px" align="left" cellpadding="2" cellspacing="2"> <td><strong><a href="javascript:goDelps()">Del</a></strong></td> <td width = "100" valign="top"><strong>Logo</strong></img></td> <td width = "400" ><strong>Type/Company Name</strong></td> </tr> <? $connection=mysql_connect("$server", "$username", "$password") or die("Could not establish connection"); mysql_select_db($database_name, $connection) or die ("Could not select database"); $query="SELECT master_psevent.*, pstype_desc, company_name, logo_filename FROM master_psevent LEFT JOIN master_pstype ON master_psevent.pstype_id = master_pstype.pstype_id LEFT JOIN master_ps ON master_ps.ps_id = master_psevent.ps_id where master_psevent.event_id = '$id' order by pstype_desc, company_name "; $result=mysql_query($query,$connection) or die(mysql_error()); while($row=mysql_fetch_array($result)) { $imagepath = $row['logo_filename']; $pseventid = $row['psevent_id']; $companyname = $row['company_name']; $type = $row['pstype_desc']; ?> <tr> <td valign="top"><input name="<? echo $pseventid; ?>" type="checkbox" class="check"></td><td> //this is line 71--<?echo "<img src=".$logo_dir."/".$imagepath." width="95%" height="95%"></img> "; ?> </td> <td valign="top" ><div align="left"> </div><? echo $type; ?><br><b><? echo $companyname; ?></b></td> </tr> <? } ?> <tr> <td><strong><a href="javascript:goDelps()" style="color:white; text-decoration:none;"><img src='images\delete.jpg'></img></a></strong></td> <td><strong><img src='images\photos.jpg'></img> </strong></td> <td><strong><img src='images\ps.bmp'></img> </strong></td> </tr> </table> </form></td> </tr> <form name = "eventinfor"> <input type='hidden' name='eventid' value=<? echo"$_GET[id]"; ?> > </form> </table> </html> Quote Link to comment https://forums.phpfreaks.com/topic/259388-parse-error-urgent-matter-must-need-help~/ Share on other sites More sharing options...
smerny Posted March 21, 2012 Share Posted March 21, 2012 edit: nevermind, i see comment in code on line 71 echo "<img src=".$logo_dir."/".$imagepath." width="95%" height="95%"></img>"; you are using double quotes within double quotes... you'll have to escape... like \"95%\" Quote Link to comment https://forums.phpfreaks.com/topic/259388-parse-error-urgent-matter-must-need-help~/#findComment-1329713 Share on other sites More sharing options...
scarezekiel Posted March 21, 2012 Author Share Posted March 21, 2012 u mean like this ? "<img src=".$logo_dir."/".$imagepath." width=\"95%\" height=\"95%\"></img>"; its not working.. Quote Link to comment https://forums.phpfreaks.com/topic/259388-parse-error-urgent-matter-must-need-help~/#findComment-1329714 Share on other sites More sharing options...
dragon_sa Posted March 21, 2012 Share Posted March 21, 2012 replace line 71 with this, there was no space between <? and echo, some quote escaping was missing and, not that its an issue there is no image closing tag </img> <? echo "<img src=".$logo_dir."/".$imagepath." width=\"95%\" height=\"95%\" >"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/259388-parse-error-urgent-matter-must-need-help~/#findComment-1329716 Share on other sites More sharing options...
scarezekiel Posted March 21, 2012 Author Share Posted March 21, 2012 hey thx man! it worked. Quote Link to comment https://forums.phpfreaks.com/topic/259388-parse-error-urgent-matter-must-need-help~/#findComment-1329733 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.