fabioisonfire Posted April 27, 2008 Share Posted April 27, 2008 Here is the error I'm getting: Parse error: syntax error, unexpected T_STRING in /home/fabio/public_html/vote.php on line 21 Here's the code: <?php session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm); $h->menuarea(); print " <b>Vote here on each of these sites to help Ruins of Sera. Each one of your votes gives you 50 Credits.</b><br><br> <a href="http://www.toprpgames.com/vote.php?idno=1832"><img src="http://www.toprpgames.com/images/banners/toprpg_88x31-2.gif" border="0"></a> <br><br> <a href="http://best-rpg.com/games/vote/382/" title="Vote on Best Rpg 200" ><img src="http://www.ruinsofsera.x10hosting.com/index.php/bestrpg.jpg"></a> <br><br> <div style="width: 88px; height: 55;"> <a href="http://www.xtremetop100.com/in.php?site=1132239810"> <img src="http://www.xtremeTop100.com/votenew.jpg" border="0" alt="MMORPG & MPOG Free server" style="float: left;\ margin-top: -1px;"></a><br><a href="http://www.xtremetop100.com/"> <img src="http://www.xtremeTop100.com/tracker.jpg" border="0" alt="MMORPG & MPOG Free server" style="float: left;\ margin-top: -1px;"></a></td> </div><br><br><a href="http://www.gtop100.com/in.php?site=21959" title="MMORPG / MPOG" target="_blank"> <img src="http://www.gtop100.com/images/votebutton.jpg" border="0" alt="MMORPG / MPOG"></a>"; $h->endpage(); ?> Quote Link to comment Share on other sites More sharing options...
phpSensei Posted April 27, 2008 Share Posted April 27, 2008 Here try: <?php session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm); $h->menuarea(); print ' <b>Vote here on each of these sites to help Ruins of Sera. Each one of your votes gives you 50 Credits.</b><br><br> <a href="http://www.toprpgames.com/vote.php?idno=1832"><img src="http://www.toprpgames.com/images/banners/toprpg_88x31-2.gif" border="0"></a> <br><br> <a href="http://best-rpg.com/games/vote/382/" title="Vote on Best Rpg 200" ><img src="http://www.ruinsofsera.x10hosting.com/index.php/bestrpg.jpg"></a> <br><br> <div style="width: 88px; height: 55;"> <a href="http://www.xtremetop100.com/in.php?site=1132239810"> <img src="http://www.xtremeTop100.com/votenew.jpg" border="0" alt="MMORPG & MPOG Free server" style="float: left;\ margin-top: -1px;"></a><br><a href="http://www.xtremetop100.com/"> <img src="http://www.xtremeTop100.com/tracker.jpg" border="0" alt="MMORPG & MPOG Free server" style="float: left;\ margin-top: -1px;"></a></td> </div><br><br><a href="http://www.gtop100.com/in.php?site=21959" title="MMORPG / MPOG" target="_blank"> <img src="http://www.gtop100.com/images/votebutton.jpg" border="0" alt="MMORPG / MPOG"></a>'; $h->endpage(); ?> Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted April 27, 2008 Share Posted April 27, 2008 The error is coming from this large print: <?php print " <b>Vote here on each of these sites to help Ruins of Sera. Each one of your votes gives you 50 Credits.</b><br><br> <a href="http://www.toprpgames.com/vote.php?idno=1832"><img src="http://www.toprpgames.com/images/banners/toprpg_88x31-2.gif" border="0"></a> <br><br> <a href="http://best-rpg.com/games/vote/382/" title="Vote on Best Rpg 200" ><img src="http://www.ruinsofsera.x10hosting.com/index.php/bestrpg.jpg"></a> <br><br> <div style="width: 88px; height: 55;"> <a href="http://www.xtremetop100.com/in.php?site=1132239810"> <img src="http://www.xtremeTop100.com/votenew.jpg" border="0" alt="MMORPG & MPOG Free server" style="float: left;\ margin-top: -1px;"></a><br><a href="http://www.xtremetop100.com/"> <img src="http://www.xtremeTop100.com/tracker.jpg" border="0" alt="MMORPG & MPOG Free server" style="float: left;\ margin-top: -1px;"></a></td> </div><br><br><a href="http://www.gtop100.com/in.php?site=21959" title="MMORPG / MPOG" target="_blank"> <img src="http://www.gtop100.com/images/votebutton.jpg" border="0" alt="MMORPG / MPOG"></a>"; Instead, do this: <?php print<<<HERE <b>Vote here on each of these sites to help Ruins of Sera. Each one of your votes gives you 50 Credits.</b><br><br> <a href="http://www.toprpgames.com/vote.php?idno=1832"><img src="http://www.toprpgames.com/images/banners/toprpg_88x31-2.gif" border="0"></a> <br><br> <a href="http://best-rpg.com/games/vote/382/" title="Vote on Best Rpg 200" ><img src="http://www.ruinsofsera.x10hosting.com/index.php/bestrpg.jpg"></a> <br><br> <div style="width: 88px; height: 55;"> <a href="http://www.xtremetop100.com/in.php?site=1132239810"> <img src="http://www.xtremeTop100.com/votenew.jpg" border="0" alt="MMORPG & MPOG Free server" style="float: left;\ margin-top: -1px;"></a><br><a href="http://www.xtremetop100.com/"> <img src="http://www.xtremeTop100.com/tracker.jpg" border="0" alt="MMORPG & MPOG Free server" style="float: left;\ margin-top: -1px;"></a></td> </div><br><br><a href="http://www.gtop100.com/in.php?site=21959" title="MMORPG / MPOG" target="_blank"> <img src="http://www.gtop100.com/images/votebutton.jpg" border="0" alt="MMORPG / MPOG"></a> HERE; The reason your getting the error is because you can't use double quotes within double quotes. If you don't want to do it the way I showed you, you can go through and either escape all the double quotes with backslashes, or replace them with single quotes. Quote Link to comment Share on other sites More sharing options...
fabioisonfire Posted April 27, 2008 Author Share Posted April 27, 2008 Thanks a lot, guys. Quote Link to comment 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.