Jump to content

Recommended Posts

Okay, so im making a basic registration forum but keep getting an error on line 29. Here is the code:

    <?PHP   
      // register2.php  
      include("dbconnect.php");  
      $errors = "";  
      if (!isset($_POST['username']))  
        $errors .= "Please provide a username. <br/>";  
      if (!isset($_POST['password']))  
        $errors .= "Please provide a password. <br/>";  
      if (!isset($_POST['email']))  
        $errors .= "Please provide an email address. <br/>"; 
  if (!isset($_POST['first']))  
        $errors .= "Please provide a First Name. <br/>";
  if (!isset($_POST['last']))  
        $errors .= "Please provide a Last Name. <br/>";
	if (!isset($_POST['country']))  
        $errors .= "Please provide a Country. <br/>";
	if (!isset($_POST['state']))  
        $errors .= "Please provide a State. <br/>";
	if (!isset($_POST['street']))  
        $errors .= "Please provide a Street Address. <br/>";
	if (!isset($_POST['city']))  
        $errors .= "Please provide a City. <br/>";
	if (!isset($_POST['zip']))  
        $errors .= "Please provide a Postal Code. <br/>";
      if ($errors == "") {  
        mysql_query("INSERT INTO user_list VALUES(  
                            '',  
                            '".addslashes($_POST['username'])."',  
                            '".md5($_POST['password])."',  
                            '".addslashes($_POST['email'])."',
						'".addslashes($_POST['first'])."', 
						'".addslashes($_POST['last'])."', 
						'".addslashes($_POST['country'])."', 
						'".addslashes($_POST['state'])."', 
						'".addslashes($_POST['street'])."', 
						'".addslashes($_POST['city'])."', 
						'".addslashes($_POST['zip'])."', 
                            ") or die(mysql_error());  
        echo "Registration Successful!";  
      } else {  
         echo $errors."Please go back and try again.";  
      }  
    ?>  

Link to comment
https://forums.phpfreaks.com/topic/232613-registration-forum-help-should-be-easy/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.