Jump to content

Dan06

Members
  • Posts

    103
  • Joined

  • Last visited

    Never

Everything posted by Dan06

  1. I'm trying to update a table based on a session variable. Unfortunately, I keep getting an invalid mysql code error. Below is the code I'm using: if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "indProForm")) { $updateSQL = sprintf("UPDATE individualprofile SET City=%s, `State`=%s, Zip=%s, WHERE Id=" .$_SESSION['RegId'], GetSQLValueString($_POST['City'], "text"), GetSQLValueString($_POST['State'], "text"), GetSQLValueString($_POST['Zip'], "text"), GetSQLValueString($_POST['Id'], "text")); mysql_select_db($database_dbConnection, $dbConnection); $Result1 = mysql_query($updateSQL, $dbConnection) or die(mysql_error()); } Help solving this problem is much appreciated.
  2. Thank you both for your help. I originally used: if ($queryresult = "TRUE"){ header ('location: registrationspecs.php'); exit(); } to forward users to another page, but this seemed inefficient so that's why I posed my original question. I think I'll try imbedding the processing of the form, within the form page. Kind regards,
  3. I've created a registration form page, which has all the text fields, checkboxs, radio buttons, etc. Once the user clicks the submit button, another page is used to insert the data into a MySql database. The second page which does the processing is blank and I would like this "processing" page to automatically call another page once the inserting is successfully done. How can I do this? Also, is there a better or more appropriate way to process the form information, other than collecting information in one page and having another page insert/update/delete the information? Below is the code I've used. Insight and feedback is much appreciated. Thanks. <form action="registering.php" method="post" name="generalinformation"> <table width="100%" border="1" cellspacing="0" bordercolor="#000066"> <tr> <td><label><div align="center">First Name: <br> <input type="text" name="firstname"> </div> </label> <label><div align="center">Last Name: <br> <input type="text" name="lastname"> </div> </label> <label><div align="center">Email: <br> <input type="text" name="email"> </div> </label> <label><div align="center">Password: <br> <input type="password" name="password"> </div> </label> <label><div align="center">Re-enter Password: <br> <input type="password" name="confirmpwd"> </div> </label> <p></p></td> </tr> <center><input type="submit" name="join" value="Join"></center> </td> </tr> </table> </form> </div> </body> </html>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.