-Sky- 0 Report post Posted April 13, 2009 Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/skyed211/public_html/main.php on line 30 Hey to all php coders on Trap.I am in need of some help with a script/system I made out of .php. All I need is the PHP line for URLs instead of HTML, otherwise I get the Parse Error. >.< If anyone could help, I'd greatly appreciate it! Share this post Link to post Share on other sites
truefusion 3 Report post Posted April 13, 2009 We're going to need more than just the error message and the line number, as the location of the error isn't necessarily on the line given, and for other obvious reasons. Share this post Link to post Share on other sites
TheDisturbedOne 1 Report post Posted April 13, 2009 I used to get these a lot. Can you post the php document here (in the code tags, so that I don't have to download it) so that we can take a look at it? Share this post Link to post Share on other sites
-Sky- 0 Report post Posted April 13, 2009 Well, not really. >.< It's copyright to me, and I don't want anyone "trying" to copy my code...people sort of like Ash. He likes to "copy and claim" things as his own made things. And I spent an hour and 50 minutes trying to correct alot of errors.However, this is the part I get the error... echo "Welcome to Central-Gaming.net! Please make your way to our echo "<a href="http://forums.central-gaming.net" target="_blank"><b>Community Forums</b></a>"; after you have logged in.";echo "Thank you.";if($session->logged_in){ echo "<h1>Logged In</h1>"; echo "Welcome <b>$session->username</b>, you are logged in. <br><br>" ."[<a href=\"userinfo.php?user=$session->username\">My Account</a>] " ."[<a href=\"useredit.php\">Edit Account</a>] "; if($session->isAdmin()){ echo "[<a href=\"admin/admin.php\">Admin Panel</a>] "; } echo "[<a href=\"process.php\">Logout</a>]";}else{?> Share this post Link to post Share on other sites
TheDisturbedOne 1 Report post Posted April 13, 2009 Dreamweaver is screwing up, so I can't look at it now,, but this link might help you.http://forums.xisto.com/no_longer_exists/ Share this post Link to post Share on other sites
zakaluka 0 Report post Posted April 13, 2009 (edited) Here's a fixed version that works. Your echo at the top was wrong: <?phpecho "Welcome to Central-Gaming.net! Please make your way to our ";echo "<a href=\"forums.central-gaming.net; target=\"_blank\"><b>Community Forums</b></a> ";echo "after you have logged in. ";echo "Thank you.";if(true){ echo "<h1>Logged In</h1>"; echo "Welcome <b>$session->username</b>, you are logged in. <br><br>" ."[<a href=\"userinfo.php?user=$session->username\">My Account</a>] " ."[<a href=\"useredit.php\">Edit Account</a>] "; if(true){ echo "[<a href=\"admin/admin.php\">Admin Panel</a>] "; } echo "[<a href=\"process.php\">Logout</a>]";}?>EDIT: You can make all those echo statements at the top one statement. I just broke it up for readability's sake.Regards,z. Edited December 17, 2016 by OpaQue (see edit history) Share this post Link to post Share on other sites
-Sky- 0 Report post Posted April 13, 2009 Woah, thank you ever so much zak! It worked. :DNow for the big request. (Hope you can handle it.)I have a little homepage made out of pure HTML and some CSS. I'd like my HTML page to be coded into my .php "main.php" file, so it has some color and background. Could you help me with this? Thanks to everyone who has offered and replied with the appropriate support. Share this post Link to post Share on other sites
TheDisturbedOne 1 Report post Posted April 13, 2009 Are you talking about having the html page sort of like "inside" the php page? Share this post Link to post Share on other sites
truefusion 3 Report post Posted April 13, 2009 I have a little homepage made out of pure HTML and some CSS. I'd like my HTML page to be coded into my .php "main.php" file, so it has some color and background. Could you help me with this? Thanks to everyone who has offered and replied with the appropriate support. The statement doesn't seem to be implying the use of the include statement, so i think you may be interested in the HTML heredoc. For example: echo <<<HTML<!-- insert HTML code here -->HTML;The HTML heredoc allows you to include PHP variables within them without having to worry about escaping double quotes for the HTML. Share this post Link to post Share on other sites
iGuest 3 Report post Posted November 9, 2009 parse errorPhp Parse Error: Syntax ErrorHi I recently tried to upload a new site onto 000.Webhost.Com I used FTP in dreamweaver with no problems. When I tried to view the site I got this message:Parse error: syntax error, unexpected T_STRING in /home/a1823608/public_html/index.Htm on line 1After a little research it seems that this is a php error but I designed my site using html with css. Can you give me some insight on how to fix this. I contacted their support desk and they told me:"Hello,You probably have mismatched quotes/parentheses/etc or left off a semi colon or something like that after editing the file.Many Thanks,Helpdesk Staff https://www.000webhost.com/ nope I didn't leave anything out at all. I'm about ready to throw in the towel and go buy my spaceHope someone can help! -question by Ryan Share this post Link to post Share on other sites