Jump to content

Myportal

New Members
  • Posts

    1
  • Joined

  • Last visited

Myportal's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. With the following code <?php extract($_POST); include("database.php"); $sql=mysqli_query($conn,"SELECT * FROM register where Email='$email'"); if(mysqli_num_rows($sql)>0) { echo "Email Id Already Exists"; exit; } else(isset($_POST['save'])) { $file = rand(1000,100000)."-".$_FILES['file']['name']; $file_loc = $_FILES['file']['tmp_name']; $folder="upload/"; $new_file_name = strtolower($file); $final_file=str_replace(' ','-',$new_file_name); if(move_uploaded_file($file_loc,$folder.$final_file)) { $query="INSERT INTO register(First_Name, Last_Name, Email, Password, File ) VALUES ('$first_name', '$last_name', '$email', 'md5($pass)', '$final_file')"; $sql=mysqli_query($conn,$query)or die("Could Not Perform the Query"); header ("Location: login.php?status=success"); } else { echo "Error.Please try again"; } } ?> There is still an error output of syntax error on line 11, please help, what's wrong with my code
×
×
  • 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.