Page 1 of 1

MySQL Problem

Posted: Tue Mar 21, 2006 9:28 pm
by Entrophy
feyd | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Code: Select all

<form name="signup" method=get>
<p>

  <table cellspacing="2" cellpadding="2" align="center">

  <td><div>Your Race:</div></td>
              <td><select name="strRACE" class="black">
                  <option value="0"> </option>
                  <option value="Human">Human</option><option value="Elf">Elf</option><option 

value="Dwarf">Dwarf</option><option value="Orc"			>Orc</option>


  <tr>
    <td><div>Username:</div></td>
    <td><input type="text" name="strUSERNAME" maxlength="25" class="black"></td>
  </tr>
   <tr>
    <td><div>Password:</div></td>
    <td><input type="password" name="strPASSONE" maxlength="32" class="black"></td>
  </tr>
  <tr>
    <td><div>Retype Password(Verification):</div></td>
    <td><input type="password" name="strPASSTWO" maxlength="32" class="black"></td>

    </tr> 

<tr>
    <td><div>Email Address:</div></td>
    <td><input type="text" name="strEMAILONE" maxlength="32" class="black"></td>

    </tr>


<tr>
    <td><div>Email Address(Verification):</div></td>
    <td><input type="text" name="strEMAILTWO" maxlength="32" class="black"></td>

    </tr>
<tr>
<td valign=bottom>Verify Image Text: </td> 
<td><img src="function.imageverify.php" /><br /><input type="text" maxlength="4" name="verify"></td>
</tr>
</table>

</form>

<?

$password="mypassword";
$server="www.myhost.com";
$username="myusername";
mysql_connect($server, $username, $password)  // THIS IS WHERE THE PROBLEMS ARE
$result = mysql_query("INSERT into `signupinfo` (username, password, password2, email, email2, race) values (strUSERNAME,  strPASSONE, strPASSTWO, strEMAILONE, strEMAILTWO, strRACE)");

?>
Anyone have any idea why I might be getting a parse error there?


feyd | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Tue Mar 21, 2006 9:40 pm
by Todd_Z
you need a semi colon at the end of the mysql_connect line.

Posted: Tue Mar 21, 2006 10:49 pm
by feyd
Once the parse error is fixed, the insertion will be the exact same issue as your previous thread. (the $_GET part.)