So I have a registration form for 'users' and another registration form for 'artists' and only one works, being the 'users' one.
However, all I did for 'artists' was copy the same code from 'users' and then change what needed to be changed so it would insert into the 'artists' table and not the 'users' table. I just can't find where I messed up while doing this.
$error = ""; if (@$_POST['register']) { $artistname = strip_tags($_POST['artistname']); $location = strip_tags($_POST['location']); $genre = strip_tags($_POST['genre']); $email = strip_tags($_POST['email']); $password = strip_tags($_POST['password']); $password2 = strip_tags($_POST['password2']); if ($artistname == "") { $error = "Artist Name cannot be left empty."; } else if ($location == "") { $error = "Location cannot be left empty."; } else if ($genre == "") { $error = "Genre cannot be left empty."; } else if ($email == "") { $error = "Email cannot be left empty."; } else if ($password == "") { $error = "Password cannot be left empty."; } else if ($password2 == "") { $error = "Repeat Password cannot be left empty."; } $check_email = mysql_query("SELECT email FROM artists WHERE email='$email'"); $numrows_email = mysql_num_rows($check_email); if ($numrows_email != 0) { $error = 'That email has already been registered.'; } else { //Register the user $register = mysql_query("INSERT INTO artists VALUES('','$artistname,'$location','$genre','$email','$password','','','no')"); die('<p style="padding: 10px;" /><b>Registered successfully!</b><br /><br /> <a href="artistlogin.php">Login now ></a></p>'); } } ?> <form action='artistsignup.php' method='POST' style='padding:10px;'> Artist Name:<br /> <input type='text' name='artistname' value='' onclick='value=""'/><p /> Location:<br /> <input type='text' name='location' value='' onclick='value=""'/><p /> Genre:<br /> <input type='text' name='genre' value='' onclick='value=""'/><p /> Email:<br /> <input type='text' name='email' value='' onclick='value=""'/><p /> Password:<br /> <input type='password' name='password' value='' onclick='value=""'/><p /> Repeat Password:<br /> <input type='password' name='password2' value='' onclick='value=""'/><p /> <input type='submit' name='register' value='Register' /> <?php echo $error; ?> </form>