Jump to content

Registration Help


Butler

Recommended Posts

You can see exactly whats its doing at www.digitaldesignersmall.com/reg/register.php Stuff just isnt working and even when i purposely try to make a error occur its not going to the right place

 

<?php
include('connection.php');

$test1=$_POST['firstname'];
$test2=$_POST['lastname'];
$test3=$_POST['username'];

if (!eregi("([^A-Za-z0-9])",$test1)){

   if (!eregi("([^A-Za-z])",$test2)){
      if (!eregi("([^A-Za-z])",$test3)){
      $query="SELECT * FROM merchants WHERE username = '$_POST(username)'";
      $result=mysql_query($query);
      $num=mysql_num_rows($result);
      if ($num == 0) {
      $query1="SELECT * FROM merchants WHERE email = '$_POST(email)'";
      $result1=mysql_query($query1);   
      $num1=mysql_num_rows($result1);
      if ($num1 == 0) {
         if (($_POST['password']==$_POST['password1'])&&($_POST['email']==$_POST['email1']))
         {
         $name=strip_tags($_POST['username']);
         $first=strip_tags($_POST['firstname']);
         $last=strip_tags($_POST['lastname']);
         $pass=strip_tags($_POST['password']);
         $country=strip_tags($_POST['country']);
         $address=strip_tags($_POST['address']);
         $email=strip_tags($_POST['email']);
         $city=strip_tags($_POST['city']);
         $zip=strip_tags($_POST['zipcode']);
         $state=strip_tags($_POST['state']);
         $phone=strip_tags($_POST['phonenumber']);
         $aql="INSERT INTO merchants SET username='$name', firstname='$first', lastname='$last', email='$email', Country='$country', zipcode='$zip', password='$pass', city='$city', state='$state', phonenumber='$phone', address='$address'";
         $result=mysql_query($sql);
         if ($result){
         header("location:http://www.digitaldesignersmall.com/ffx.html");
         }
         else {
            header("location:http://www.digitaldesignersmall.com/fff.html");
            }
      
      }
      else{
      header("location:http://www.digitaldesingersmall.com/afx.html");
      }
         
         }
         else {
         header("location:http://www.digitaldesingersmall.com/afx.html");
         }

         }
         else{
header("location:http://www.digitaldesignersmall.com/cxs.html");
}

}

else{

header("location:http://www.digitaldesignersmall.com/cxs.html");

}
}
else{
header("location:http://www.digitaldesignersmall.com/cxs.html");
}

}

?>

 

MOD EDIT:

 . . . 

tags added.

Link to comment
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.