GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 28-Feb-2005, 01:25
Evil Kenevil Evil Kenevil is offline
New Member
 
Join Date: Feb 2005
Posts: 1
Evil Kenevil is on a distinguished road

T_STRING error


Well I am trying to create a custom page for my gaming ladder website www.stormgaming.net and I am getting an error on my custom page which is www.stormgaming.net.

My error looks like this -
Parse error: parse error, unexpected T_STRING in /home/xboxstor/public_html/affiliates.php on line 41

My affiliates page looks like this -
PHP Code:

<?
$indexloaded=1;

include("config/config.php");
include("$dir[func]/global.php");


if($ladderid){
$ladderinfo=mysql_query("SELECT laddername FROM ladders WHERE id='$ladderid'");
$linfo=mysql_fetch_array($ladderinfo);

if(!$linfo[laddername]){
include("$dir[func]/error.php");
display_error("Unknown Ladder ID.<br>");
}

}

$tablehead=table_head("show","","","left");
$tablefoot=table_foot("show");

$bannerhead=table_head("show","488","80","center");
$bannerfoot=table_foot("show");

$out[body]=$out[body]."
<center>
$bannerhead
$out[banner]
$bannerfoot
</center>

$tablehead
<table width='517' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td width='517' valign='top' align='center'>
&nbsp; &nbsp;<strong><font class='catfont'>Storm Gaming Affiliates</font></strong>
<hr class='catfont' size='1'>
<div align="left">
  <p style="margin-top: 0; margin-bottom: 0">If you want to become an affiliate please contact our <a href="mailto:crimsonspy@stormgaming.net" class="style1">Administrator</a>.</p>
  <p style="margin-top: 0; margin-bottom: 0"><font size="1">&nbsp;</font></p>
  <p style="margin-top: 2; margin-bottom: 2">Xbox Live Nation - <a href="http://www.xboxlivenation.com" class="links">www.xboxlivenation.com</a></p>
  <p style="margin-top: 2; margin-bottom: 2"> Gamertag Pics   - <a href="http://www.gamertagpics.com" class="links">www.gamertagpics.com</a></p>
  <p style="margin-top: 2; margin-bottom: 2"> HGCX - The Hardcore Gaming Compound   - <a href="http://www.hgcx.com/" class="links">http://www.hgcx.com/</a></p>
</div></td>
</tr>
</table>
$tablefoot";

include("$dir[curtheme]");
?>


any help is appreciated.
Thanks
Evil Kenevil
Last edited by LuciWiz : 28-Feb-2005 at 02:11. Reason: Please insert your PHP code between [php] & [/php] tags
  #2  
Old 02-Mar-2005, 05:46
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
IF you had posted your example code with the supplied bbcodes for PHP syntax highlighting, you would have solved this problem within seconds of posting the message...

Looking at the code, it's obvious that you have to escape all the double quotes within this block of code:

PHP Code:

$out[body]=$out[body]."
<center>
$bannerhead
$out[banner]
$bannerfoot
</center>

$tablehead
<table width='517' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td width='517' valign='top' align='center'>
&nbsp; &nbsp;<strong><font class='catfont'>Storm Gaming Affiliates</font></strong>
<hr class='catfont' size='1'>
<div align=\"left\">
  <p style=\"margin-top: 0; margin-bottom: 0\">..."; // other code snipped so I don't do all the work here lol! 


  #3  
Old 15-Mar-2005, 07:34
EelcoH EelcoH is offline
New Member
 
Join Date: Mar 2005
Posts: 1
EelcoH is on a distinguished road

another T_STRING error


I get:

Parse error: parse error, unexpected T_STRING in /hsphere/local/home/mreditor/theforeigner-japan.com/template/index.htm on line 1

on this line (taken from the W3C website):

<?xml version="1.0" encoding="UTF-8"?>

Any idea what's wrong with it? When I delete that line from the code the page works fine.
  #4  
Old 15-Mar-2005, 09:31
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Hello EelcoH,

What you describe is a very common error - one I have made myself in the beginning...

Try splitting the end bit of that line into something like this:

PHP Code:

<?php

echo '<?xml version="1.0" encoding="UTF-8"?' . '>' ;
// the rest of your code...

// and note the closing tag on the next line, notice anything familiar? ;)
?>

 
 

Recent GIDBlogNARMY by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] GUI programming with FLTK dsmith FLTK Forum 10 03-Oct-2005 15:41
What is "Ambigious symbol" ??*( a compilation error) small_ticket CPP / C++ Forum 2 07-Jan-2005 21:10
Error C2146: syntax error : missing ',' before identifier 'C4' mattchew008 CPP / C++ Forum 2 19-Dec-2004 06:06
Can enum have same name as class? crystalattice CPP / C++ Forum 3 08-Dec-2004 16:43
OpenGL always reports error mvt OpenGL Programming 2 04-Jun-2004 06:42

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 16:47.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.