Jump to content


Photo

unexpected T_STRING?


  • Please log in to reply
2 replies to this topic

#1 hlstriker

hlstriker
  • Members
  • PipPipPip
  • Advanced Member
  • 84 posts

Posted 27 July 2006 - 09:06 PM

Hey everyone, when it gets to this line of code it tells me...
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'

Here is the code that is on the line when it blows up, is something wrong with it?
echo "<form name="Login Form" method="post" action="login.php">
 Username: 
 <input type="text" name="user">
 <br>
 Password: 
 <input type="password" name="pass">
 <br>
 <input name="Login" type="submit" id="Login" value="Login">
 <input name="Reset" type="reset" id="Reset" value="Reset">
</form>
<a href="index.php?act=register">Register a new account";


#2 king arthur

king arthur
  • Members
  • PipPipPip
  • Advanced Member
  • 335 posts
  • LocationUK HQ

Posted 27 July 2006 - 09:09 PM

You need to escape all the double quotes inside the string with a backslash \ or replace them all with single quotes, or just replace the start and end quotes with single ones.
Sir Isaac Newton said "If I have seen farther, it is by standing on the shoulders of giants". But it is not recorded as to whether he said it before or after he was hit on the head by a falling apple.

#3 hlstriker

hlstriker
  • Members
  • PipPipPip
  • Advanced Member
  • 84 posts

Posted 27 July 2006 - 09:19 PM

Thanks alot :)

Fixed problem!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users