homepage Welcome to WebmasterWorld Guest from 54.226.161.112
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
please help senior php coders
julival




msg:4644632
 1:59 am on Feb 13, 2014 (gmt 0)

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/u807470965/public_html/status/stat.php on line 96



<?php
ERROR_REPORTING(0);

require("../init.php");
$id=(int)$_GET["id"];
if($id<1)
{
header("location: /forum/topics.php");
exit();
}
$level=user_info($user, level);
$username=user_info($user, username);
$rank=getrank($level);
echo"<style type='text/css'>
<!--
.style2 {
font-family: Arial, Helvetica, sans-serif;
color: #FF0000;
font-size: 12px;
}
.style3 {color: #FF0000}
.style5 {color: #FF0000; font-weight: bold; }
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
}
-->
</style>
<div class='body_width'>";

$amsg=$_GET["amsg"];
if(!empty($amsg))
{ echo"<div class='msg'>$amsg</div>";
}
if(isset($_POST["submit"]))
{
$poster=$_POST["poster"];
$topicid=$_POST["topicid"];
$message=$_POST["message"];
$date=time();
//CLEAN
if(strlen($message)<4 || empty($message))
{
echo"<div class='msg'>Your message is too short</div>";
}
else
{
$topicid=cleanvalues($topicid);
$message=cleanvalues($message);
$insert=mysql_query("INSERT INTO b_status SET poster='$poster', date='$date', topicid='$id', message='$message'");

if(!$insert)
{
$msg3="An error occured";
}
else
{
$msg3="Comment Successfully Added";
}
echo"<div class='msg'>$msg3</div>";
}
}
//REPLIES
$self=$_SERVER["PHP_SELF"];
$rowsperpage=5;
$range=10;
if(isset($_GET["currentpage"]) && is_numeric($_GET["currentpage"]))
{
$currentpage=(int)$_GET["currentpage"];
}
else
{
$currentpage=1;
}
$offset=($currentpage-1)*$rowsperpage;
$numrows=mysql_num_rows(mysql_query("SELECT * FROM b_status WHERE topicid=$id"));
$totalpages=ceil($numrows/$rowsperpage);
if($currentpage>$totalpages)
{
$currentpage=$totalpages;
}
if($currentpage<1)
{
$currentpage=1;
}
$rquery=mysql_query("SELECT * FROM b_status WHERE topicid=$id ORDER BY id Asc LIMIT $offset, $rowsperpage");
$rnum=mysql_num_rows($rquery);


echo"
</center>
<div style='margin-top: 5px;' class='grid3'>
</div>";

echo"<div style='margin-top: 5px;' class='grid3'>
echo"<div id='posts'><a href='../profile.php?uid=$uid'>$poster</a> $date</li><li>$message<br> $link4</div><br>";
}
if($currentpage>1)
{
echo"<a href='$self?currentpage=1&id=$id'>[<b>First</b>]</a>";
$prevpage=$currentpage-1;
echo"<a href='$self?currentpage=$prevpage&id=$id'>[<b>Prev</b>]</a>";
}
for($x=($currentpage-$range); $x<(($currentpage+$range)+1); $x++)
{
if(($x>0) &&($x<=$totalpages))
{
if($x==$currentpage)
{
echo"[<font color='red'>$x</font>]";
}
else
{
echo"<a href='$self?currentpage=$x&id=$id'>[<b>$x</b>]</a>";
}
}
}
if($currentpage!=$totalpages)
{
$nextpage=$currentpage+1;
echo"<a href='$self?currentpage=$nextpage&id=$id'>[<b>Next</b>]</a>";
echo"<a href='$self?currentpage=$totalpages&id=$id'>[<b>Last</b>]</a>";
}
echo"<div class='gap'></div>";
}

{
if(isloggedin())
{
echo"<br>Reply<form action='#' method='POST'><input type='hidden' name='topicid' value='$id'><input type='hidden' name='poster' value='$user'><textarea rows='3' cols='20' name='message'></textarea><br/><input type='submit' name='submit' value='Reply' class='button'></form></center><center>";
}
else
{
echo"Please <a href='".$config->url."index.php' target='_blank' title='login'> Login </a> or <a href='".$config->url."register.php' target='_blank' title='Register'> Register </a> To Post A Comment";
}
}
</div>";
include"../footer.php";
?>

 

matrix_jan




msg:4644637
 2:19 am on Feb 13, 2014 (gmt 0)

There is a missing "; at the end of line 95.
Should be like this:
echo"<div style='margin-top: 5px;' class='grid3'>";

julival




msg:4644702
 7:41 am on Feb 13, 2014 (gmt 0)

thanks Matrix_jan for d reply

coopster




msg:4647237
 7:18 pm on Feb 20, 2014 (gmt 0)

You may also want to take note of the comment regarding using a code editor on your earlier question here:
[webmasterworld.com...]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved