Re: What Does "Parse error: syntax error, unexpected T_STRING" Mean?

From: Date: Sat, 30 Sep 2006 00:06:47 +0000
Subject: Re: What Does "Parse error: syntax error, unexpected T_STRING" Mean?
References: 1  Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-32864@lists.php.net to get a copy of this message
Hello Jazz. If you promise me you never ever send these kind of question to us again I'll tell you. Line 96: $password md5($password); See anything wrong with it? Shouldn't it be $password = md5($password); ? In the future, please use a forum, irc or whatever. -Hannes On 9/30/06, Jazz Atwal <vcrystal@hotmail.co.uk> wrote:
Hello,
          In my Code im using i keep getting the following error,Parse error: syntax error, unexpected T_STRING in /home/crystali/public_html/Register..inc on line 97
What does this mean? My Full Source code is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Test For Staff Only</title> <style type="text/css"> <!-- body {
        background-color: #000033;
        background-image: url(Back/Background.png);
} #Layer1 {
        position:absolute;
        left:167px;
        top:74px;
        width:676px;
        height:448px;
        z-index:1;
} a:link {
        color: #FFFFFF;
} a:visited {
        color: #CCCCCC;
} a:hover {
        color: #0066CC;
} a:active {
        color: #FFFFFF;
} ..style8 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #FFFFFF;} ..style16 {color: #FFFFFF; font-size: 12px; } --> </style></head> <body> <table width="973" height="534" border="0" cellpadding="0" cellspacing="0"> <tr>
    <td width="141" height="41"></td>
    <td width="832"></td>
</tr> <tr>
    <td height="19"><!--DWLayoutEmptyCell--></td>
    <td valign="top"></td>
</tr> <tr>
    <td height="448"><p></p>
      <p><br>
        <a href="index.php?content=Home"><img src="Button/Home.png" alt="Home" width="141" height="41" border="0" /></a></br>
        <img src="Button/News.png" alt="News" width="141" height="41" /></br>
        <img src="Button/Entertainment.png" alt="Entertainment" width="141" height="41" /></br>
        <img src="Button/Forum.png" alt="Forum" width="141" height="41" /></br>
        <img src="Button/Affiliates.png" alt="Affiliates" width="141" height="41" /></br>
        <img src="Button/Misc.png" alt="Misc" width="141" height="41" /></br>
        </br>
      <p><br>
        </p>
      </br></td>
    <td valign="top"><table width="93%" height="475" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
      <tr>
        <td width="778" height="475" valign="top" background="Back/Layout v1.png">
          <div align="center">
            <p><br>
              <span class="style8"><a href="index.php?content=Login">Login</a>/<a href="index.php?content=Register">Register</a></span></p>
            </div>
          <div align="right"></br>
            <p align="center">
          </div>
<div align="center"><? $sqlhost = "localhost"; $sqluser = "*********"; $sqlpass = "***********"; $sqldb = "**********"; $conn = mysql_connect($sqlhost, $sqluser, $sqlpass); $sdb = mysql_select_db($sqldb); switch($_GET['mode']){ default: ?> <form action="register.php?mode=register" method="POST"> <span class="style8">Username <input name="username" type="text" size="30" maxlength="10"> <br> Password <input name="password" type="password" size="29" maxlength="20"> <br> Email <input name="email" type="text" size="30" maxlength="50"> </span><br> <input type="submit" value="Register"> </form> <? $query = "SELECT * FROM users2 WHERE username='$username'"; $result = mysql_query($query); if(mysql_num_rows($result) < 1){ $password md5($password); $query = "INSERT INTO users2 VALUES('NULL','$username','$password','$email')"; $result = mysql_query($query); if(mysql_affected_rows() > 0){ echo "Account created, you may not <a href=\"login.html\">Login</a>"; } else { echo mysql_error(); } } else { echo "Username already taken"; } } ?></div></div>
            </br>
            </div>
          </br>
          <div align="center"></div></td>
</tr>
    </table>
      <div align="center"></div>
      <div align="center"></div>
    <div align="center"></div></td>
</tr> </table> <div align="center"><span class="style16">(c)Crystalisation 2005-2006</br> </span></div> </body> </html> Could You PLEASE help me. Thank you. _________________________________________________________________ Be one of the first to try Windows Live Mail. http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d


« previous php.mirrors (#32864) next »