MySQL_Narb Posted October 17, 2009 Share Posted October 17, 2009 Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/a5488351/public_html/bbdemo.php on line 90 Code: <?php session_start(); ?> <?php require "global_settings.php"; ?> <title><?php echo $sitetitle; ?></title> <font face='arial' size='2'></a> <center> <style> a:link { color:#24374C; text-decoration:none; } a:visited { color:#24374C; text-decoration:none; } a:active { outline: none; color:#24374C; text-decoration:none; } body {background-color:#b0c4de} div.box { width:250px; padding:10px; border:3px double #000000; margin:10px; background-color:#74AFF2; } p { border-top-style:dotted; border-right-style:solid; border-bottom-style:dotted; border-left-style:solid; } div.menu-blue { BORDER-RIGHT: #333366 1px solid; BORDER-LEFT: #6699cc 1px solid; BORDER-TOP: #6699cc 1px solid; BORDER-BOTTOM: #333366 1px solid; FONT-WEIGHT: normal; COLOR: #ffffff; BACKGROUND-COLOR: #23559C; TEXT-DECORATION: none; font-stretch : condensed; } .menu-top { BORDER-RIGHT: 1px solid #333366; BORDER-TOP: 1px solid #6699CC; FONT-WEIGHT: normal; BORDER-LEFT: 1px solid #6699CC; COLOR: #FFFFFF; BORDER-BOTTOM: 1px solid #333366; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #23559C; TEXT-DECORATION: none; font-stretch : condensed } </style> <center> <div class='menu-blue'> <div align="center"> <table width="600" cellspacing="1" cellpadding="5" style="background-color:#23559C"> <tr> <td style="background-color:#FFFFFF"> <div align="center"> <table border="0"> </form> </table> <p><a href="register.php"><b>Register</a> - <a href='login.php' disabled='yes'>Login</a> - <a href="logout.php">Logout</a> - <a href='search_input.php'>Search</a> - <a href='/forums/index.php'>Forums</a> - <a href="verification.php">Demo ACP</a> - <a href="profiles.php">Profiles</a> - <a href="ucp.php">UCP</a></b></p> <?php $count_my_page = ("hitcounter.txt"); $hits = file($count_my_page); $hits[0] ++; $fp = fopen($count_my_page , "w"); fputs($fp , "$hits[0]"); fclose($fp); echo $hits[0]; ?> <br /> <?php if ($disabled==0) { echo '<form action="post.php" method="POST"> <div class="box"><input type="hidden" name="name" value="?> <?php echo $_SESSION['username']; ?><?"><br><br> Message <br><br><textarea name=message" rows='10"> </textarea><br> <input type="submit" value="Post it!"> </form></center></span><hr> <br> } else { echo "Posting disabled!"; } require "global_settings.php"; //connecting to the database $connect = mysql_connect("$dbhost","$dbuser","$dbpassword") or die("Connection failed!"); mysql_select_db("$db") or die("Database fail!"); //max displayed per page $per_page = 8; //get start variable $start = $_GET['start']; //count records $record_count = mysql_num_rows(mysql_query("SELECT * FROM posts")); //count max pages $max_pages = $record_count / $per_page; //may come out as decimal if (!$start) $start = 0; //display data $get = mysql_query("SELECT * FROM posts ORDER BY id DESC LIMIT $start, $per_page"); while ($row = mysql_fetch_assoc($get)) { // get data $id = $row['id']; $name = $row['name']; $message = $row['message']; if ($name =="$owner") { $name = "<img src='$acrown'></img><b> $owner<br /></b>"; } if ($name =="Palace") $name = "<img src='$mcrown'></img><b> Palace<br /></b>"; if ($name =="Pkerown") $name = "<img src='$mcrown'></img><b> Pkerown<br /></b>"; if ($name =="Soulze") $name = "<img src='$acrown'></img><b> Soulze<br /></b>"; if ($name =="Pie`") $name = "<img src='$acrown'></img><b> Pie`<br /></b>"; echo "<center><b>($id)Posted by:</b> ".$name."</a><br /><b>".$message."<hr></b>"; } //setup prev and next variables $prev = $start - $per_page; $next = $start + $per_page; //show prev button if (!($start<=0)) echo "<a href='bbdemo.php?start=$prev'>Prev</a> "; //show page numbers //set variable for first page $i=1; for ($x=0;$x<$record_count;$x=$x+$per_page) { if ($start!=$x) echo " <a href='bbdemo.php?start=$x'>$i</a> "; else echo " <a href='bbdemo.php?start=$x'><b>$i</b></a> "; $i++; } //show next button if (!($start>=$record_count-$per_page)) echo " <a href='bbdemo.php?start=$next'>Next</a>"; ?> Link to comment https://forums.phpfreaks.com/topic/178050-solved-why-do-i-get-this-error/ Share on other sites More sharing options...
waynew Posted October 17, 2009 Share Posted October 17, 2009 <textarea name=message" rows='10"> should be <textarea name=message" rows="10"> Link to comment https://forums.phpfreaks.com/topic/178050-solved-why-do-i-get-this-error/#findComment-938782 Share on other sites More sharing options...
MySQL_Narb Posted October 17, 2009 Author Share Posted October 17, 2009 I did it, but it still says the same error message. Link to comment https://forums.phpfreaks.com/topic/178050-solved-why-do-i-get-this-error/#findComment-938790 Share on other sites More sharing options...
waynew Posted October 17, 2009 Share Posted October 17, 2009 <?php session_start(); ?> <?php require "global_settings.php"; ?> <title><?php echo $sitetitle; ?></title> <font face='arial' size='2'></a> <center> <style> a:link { color:#24374C; text-decoration:none; } a:visited { color:#24374C; text-decoration:none; } a:active { outline: none; color:#24374C; text-decoration:none; } body {background-color:#b0c4de} div.box { width:250px; padding:10px; border:3px double #000000; margin:10px; background-color:#74AFF2; } p { border-top-style:dotted; border-right-style:solid; border-bottom-style:dotted; border-left-style:solid; } div.menu-blue { BORDER-RIGHT: #333366 1px solid; BORDER-LEFT: #6699cc 1px solid; BORDER-TOP: #6699cc 1px solid; BORDER-BOTTOM: #333366 1px solid; FONT-WEIGHT: normal; COLOR: #ffffff; BACKGROUND-COLOR: #23559C; TEXT-DECORATION: none; font-stretch : condensed; } .menu-top { BORDER-RIGHT: 1px solid #333366; BORDER-TOP: 1px solid #6699CC; FONT-WEIGHT: normal; BORDER-LEFT: 1px solid #6699CC; COLOR: #FFFFFF; BORDER-BOTTOM: 1px solid #333366; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #23559C; TEXT-DECORATION: none; font-stretch : condensed } </style> <center> <div class='menu-blue'> <div align="center"> <table width="600" cellspacing="1" cellpadding="5" style="background-color:#23559C"> <tr> <td style="background-color:#FFFFFF"> <div align="center"> <table border="0"> </form> </table> <p><a href="register.php"><b>Register</a> - <a href='login.php' disabled='yes'>Login</a> - <a href="logout.php">Logout</a> - <a href='search_input.php'>Search</a> - <a href='/forums/index.php'>Forums</a> - <a href="verification.php">Demo ACP</a> - <a href="profiles.php">Profiles</a> - <a href="ucp.php">UCP</a></b></p> <?php $count_my_page = ("hitcounter.txt"); $hits = file($count_my_page); $hits[0] ++; $fp = fopen($count_my_page , "w"); fputs($fp , "$hits[0]"); fclose($fp); echo $hits[0]; ?> <br /> <?php if ($disabled==0) { echo '<form action="post.php" method="POST"> <div class="box"><input type="hidden" name="name" value="?> <?php echo $_SESSION['username']; ?><?"><br><br> Message <br><br><textarea name=message" rows="10"> </textarea><br> <input type="submit" value="Post it!"> </form></center></span><hr> <br>'; } else { echo "Posting disabled!"; } require "global_settings.php"; //connecting to the database $connect = mysql_connect("$dbhost","$dbuser","$dbpassword") or die("Connection failed!"); mysql_select_db("$db") or die("Database fail!"); //max displayed per page $per_page = 8; //get start variable $start = $_GET['start']; //count records $record_count = mysql_num_rows(mysql_query("SELECT * FROM posts")); //count max pages $max_pages = $record_count / $per_page; //may come out as decimal if (!$start) $start = 0; //display data $get = mysql_query("SELECT * FROM posts ORDER BY id DESC LIMIT $start, $per_page"); while ($row = mysql_fetch_assoc($get)) { // get data $id = $row['id']; $name = $row['name']; $message = $row['message']; if ($name =="$owner") { $name = "<img src='$acrown'></img><b> $owner<br /></b>"; } if ($name =="Palace") $name = "<img src='$mcrown'></img><b> Palace<br /></b>"; if ($name =="Pkerown") $name = "<img src='$mcrown'></img><b> Pkerown<br /></b>"; if ($name =="Soulze") $name = "<img src='$acrown'></img><b> Soulze<br /></b>"; if ($name =="Pie`") $name = "<img src='$acrown'></img><b> Pie`<br /></b>"; echo "<center><b>($id)Posted by:</b> ".$name."</a><br /><b>".$message."<hr></b>"; } //setup prev and next variables $prev = $start - $per_page; $next = $start + $per_page; //show prev button if (!($start<=0)) echo "<a href='bbdemo.php?start=$prev'>Prev</a> "; //show page numbers //set variable for first page $i=1; for ($x=0;$x<$record_count;$x=$x+$per_page) { if ($start!=$x) echo " <a href='bbdemo.php?start=$x'>$i</a> "; else echo " <a href='bbdemo.php?start=$x'><b>$i</b></a> "; $i++; } //show next button if (!($start>=$record_count-$per_page)) echo " <a href='bbdemo.php?start=$next'>Next</a>"; ?> Link to comment https://forums.phpfreaks.com/topic/178050-solved-why-do-i-get-this-error/#findComment-938793 Share on other sites More sharing options...
mrcarmine Posted October 17, 2009 Share Posted October 17, 2009 Should this like end with a ; BORDER-RIGHT: 1px solid #333366; BORDER-TOP: 1px solid #6699CC; FONT-WEIGHT: normal; BORDER-LEFT: 1px solid #6699CC; COLOR: #FFFFFF; BORDER-BOTTOM: 1px solid #333366; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #23559C; TEXT-DECORATION: none; font-stretch : condensed So it is like this: BORDER-RIGHT: 1px solid #333366; BORDER-TOP: 1px solid #6699CC; FONT-WEIGHT: normal; BORDER-LEFT: 1px solid #6699CC; COLOR: #FFFFFF; BORDER-BOTTOM: 1px solid #333366; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #23559C; TEXT-DECORATION: none; font-stretch : condensed; Link to comment https://forums.phpfreaks.com/topic/178050-solved-why-do-i-get-this-error/#findComment-938797 Share on other sites More sharing options...
waynew Posted October 17, 2009 Share Posted October 17, 2009 Sorry, I overlooked a few things: <?php session_start(); ?> <?php require "global_settings.php"; ?> <title><?php echo $sitetitle; ?></title> <font face='arial' size='2'></a> <center> <style> a:link { color:#24374C; text-decoration:none; } a:visited { color:#24374C; text-decoration:none; } a:active { outline: none; color:#24374C; text-decoration:none; } body {background-color:#b0c4de} div.box { width:250px; padding:10px; border:3px double #000000; margin:10px; background-color:#74AFF2; } p { border-top-style:dotted; border-right-style:solid; border-bottom-style:dotted; border-left-style:solid; } div.menu-blue { BORDER-RIGHT: #333366 1px solid; BORDER-LEFT: #6699cc 1px solid; BORDER-TOP: #6699cc 1px solid; BORDER-BOTTOM: #333366 1px solid; FONT-WEIGHT: normal; COLOR: #ffffff; BACKGROUND-COLOR: #23559C; TEXT-DECORATION: none; font-stretch : condensed; } .menu-top { BORDER-RIGHT: 1px solid #333366; BORDER-TOP: 1px solid #6699CC; FONT-WEIGHT: normal; BORDER-LEFT: 1px solid #6699CC; COLOR: #FFFFFF; BORDER-BOTTOM: 1px solid #333366; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #23559C; TEXT-DECORATION: none; font-stretch : condensed } </style> <center> <div class='menu-blue'> <div align="center"> <table width="600" cellspacing="1" cellpadding="5" style="background-color:#23559C"> <tr> <td style="background-color:#FFFFFF"> <div align="center"> <table border="0"> </form> </table> <p><a href="register.php"><b>Register</a> - <a href='login.php' disabled='yes'>Login</a> - <a href="logout.php">Logout</a> - <a href='search_input.php'>Search</a> - <a href='/forums/index.php'>Forums</a> - <a href="verification.php">Demo ACP</a> - <a href="profiles.php">Profiles</a> - <a href="ucp.php">UCP</a></b></p> <?php $count_my_page = ("hitcounter.txt"); $hits = file($count_my_page); $hits[0] ++; $fp = fopen($count_my_page , "w"); fputs($fp , "$hits[0]"); fclose($fp); echo $hits[0]; ?> <br /> <?php if ($disabled==0) { echo '<form action="post.php" method="POST"> <div class="box"><input type="hidden" name="name" value="'.$_SESSION['username'].'"><br><br> Message <br><br><textarea name=message" rows="10"> </textarea><br> <input type="submit" value="Post it!"> </form></center></span><hr> <br>'; } else { echo "Posting disabled!"; } require "global_settings.php"; //connecting to the database $connect = mysql_connect("$dbhost","$dbuser","$dbpassword") or die("Connection failed!"); mysql_select_db("$db") or die("Database fail!"); //max displayed per page $per_page = 8; //get start variable $start = $_GET['start']; //count records $record_count = mysql_num_rows(mysql_query("SELECT * FROM posts")); //count max pages $max_pages = $record_count / $per_page; //may come out as decimal if (!$start) $start = 0; //display data $get = mysql_query("SELECT * FROM posts ORDER BY id DESC LIMIT $start, $per_page"); while ($row = mysql_fetch_assoc($get)) { // get data $id = $row['id']; $name = $row['name']; $message = $row['message']; if ($name =="$owner") { $name = "<img src='$acrown'></img><b> $owner<br /></b>"; } if ($name =="Palace") $name = "<img src='$mcrown'></img><b> Palace<br /></b>"; if ($name =="Pkerown") $name = "<img src='$mcrown'></img><b> Pkerown<br /></b>"; if ($name =="Soulze") $name = "<img src='$acrown'></img><b> Soulze<br /></b>"; if ($name =="Pie`") $name = "<img src='$acrown'></img><b> Pie`<br /></b>"; echo "<center><b>($id)Posted by:</b> ".$name."</a><br /><b>".$message."<hr></b>"; } //setup prev and next variables $prev = $start - $per_page; $next = $start + $per_page; //show prev button if (!($start<=0)) echo "<a href='bbdemo.php?start=$prev'>Prev</a> "; //show page numbers //set variable for first page $i=1; for ($x=0;$x<$record_count;$x=$x+$per_page) { if ($start!=$x) echo " <a href='bbdemo.php?start=$x'>$i</a> "; else echo " <a href='bbdemo.php?start=$x'><b>$i</b></a> "; $i++; } //show next button if (!($start>=$record_count-$per_page)) echo " <a href='bbdemo.php?start=$next'>Next</a>"; ?> Link to comment https://forums.phpfreaks.com/topic/178050-solved-why-do-i-get-this-error/#findComment-938798 Share on other sites More sharing options...
MySQL_Narb Posted October 17, 2009 Author Share Posted October 17, 2009 <?php session_start(); ?> <?php require "global_settings.php"; ?> <title><?php echo $sitetitle; ?></title> <font face='arial' size='2'></a> <center> <style> a:link { color:#24374C; text-decoration:none; } a:visited { color:#24374C; text-decoration:none; } a:active { outline: none; color:#24374C; text-decoration:none; } body {background-color:#b0c4de} div.box { width:250px; padding:10px; border:3px double #000000; margin:10px; background-color:#74AFF2; } p { border-top-style:dotted; border-right-style:solid; border-bottom-style:dotted; border-left-style:solid; } div.menu-blue { BORDER-RIGHT: #333366 1px solid; BORDER-LEFT: #6699cc 1px solid; BORDER-TOP: #6699cc 1px solid; BORDER-BOTTOM: #333366 1px solid; FONT-WEIGHT: normal; COLOR: #ffffff; BACKGROUND-COLOR: #23559C; TEXT-DECORATION: none; font-stretch : condensed; } .menu-top { BORDER-RIGHT: 1px solid #333366; BORDER-TOP: 1px solid #6699CC; FONT-WEIGHT: normal; BORDER-LEFT: 1px solid #6699CC; COLOR: #FFFFFF; BORDER-BOTTOM: 1px solid #333366; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #23559C; TEXT-DECORATION: none; font-stretch : condensed } </style> <center> <div class='menu-blue'> <div align="center"> <table width="600" cellspacing="1" cellpadding="5" style="background-color:#23559C"> <tr> <td style="background-color:#FFFFFF"> <div align="center"> <table border="0"> </form> </table> <p><a href="register.php"><b>Register</a> - <a href='login.php' disabled='yes'>Login</a> - <a href="logout.php">Logout</a> - <a href='search_input.php'>Search</a> - <a href='/forums/index.php'>Forums</a> - <a href="verification.php">Demo ACP</a> - <a href="profiles.php">Profiles</a> - <a href="ucp.php">UCP</a></b></p> <?php $count_my_page = ("hitcounter.txt"); $hits = file($count_my_page); $hits[0] ++; $fp = fopen($count_my_page , "w"); fputs($fp , "$hits[0]"); fclose($fp); echo $hits[0]; ?> <br /> <?php if ($disabled==0) { echo '<form action="post.php" method="POST"> <div class="box"><input type="hidden" name="name" value="?> <?php echo $_SESSION['username']; ?><?"><br><br> Message <br><br><textarea name=message" rows="10"> </textarea><br> <input type="submit" value="Post it!"> </form></center></span><hr> <br>'; } else { echo "Posting disabled!"; } require "global_settings.php"; //connecting to the database $connect = mysql_connect("$dbhost","$dbuser","$dbpassword") or die("Connection failed!"); mysql_select_db("$db") or die("Database fail!"); //max displayed per page $per_page = 8; //get start variable $start = $_GET['start']; //count records $record_count = mysql_num_rows(mysql_query("SELECT * FROM posts")); //count max pages $max_pages = $record_count / $per_page; //may come out as decimal if (!$start) $start = 0; //display data $get = mysql_query("SELECT * FROM posts ORDER BY id DESC LIMIT $start, $per_page"); while ($row = mysql_fetch_assoc($get)) { // get data $id = $row['id']; $name = $row['name']; $message = $row['message']; if ($name =="$owner") { $name = "<img src='$acrown'></img><b> $owner<br /></b>"; } if ($name =="Palace") $name = "<img src='$mcrown'></img><b> Palace<br /></b>"; if ($name =="Pkerown") $name = "<img src='$mcrown'></img><b> Pkerown<br /></b>"; if ($name =="Soulze") $name = "<img src='$acrown'></img><b> Soulze<br /></b>"; if ($name =="Pie`") $name = "<img src='$acrown'></img><b> Pie`<br /></b>"; echo "<center><b>($id)Posted by:</b> ".$name."</a><br /><b>".$message."<hr></b>"; } //setup prev and next variables $prev = $start - $per_page; $next = $start + $per_page; //show prev button if (!($start<=0)) echo "<a href='bbdemo.php?start=$prev'>Prev</a> "; //show page numbers //set variable for first page $i=1; for ($x=0;$x<$record_count;$x=$x+$per_page) { if ($start!=$x) echo " <a href='bbdemo.php?start=$x'>$i</a> "; else echo " <a href='bbdemo.php?start=$x'><b>$i</b></a> "; $i++; } //show next button if (!($start>=$record_count-$per_page)) echo " <a href='bbdemo.php?start=$next'>Next</a>"; ?> Parse error: syntax error, unexpected '<' in /home/a5488351/public_html/bbdemo.php on line 129 Link to comment https://forums.phpfreaks.com/topic/178050-solved-why-do-i-get-this-error/#findComment-938802 Share on other sites More sharing options...
MySQL_Narb Posted October 17, 2009 Author Share Posted October 17, 2009 Working! Link to comment https://forums.phpfreaks.com/topic/178050-solved-why-do-i-get-this-error/#findComment-938803 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.