Jump to content

[SOLVED] Parse error help...


fabioisonfire

Recommended Posts

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();
?>

Link to comment
Share on other sites

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();
?>

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.