In PHP MyAdmin I get this:
1.EMAIL | NAME
2."NAME"
3."EMAIL"
4."NAME"
5."EMAIL"
6."NAME"
7."EMAIL"
I want NAME to go to NAME column and EMAIL to go to EMAIL one.
Below is the code:
if($_POST['action']=="sub"){
conndb($servername,$username,$password);
namecheck($name);
mailcheck($email);
if (((empty($name)) || (empty($email))) || ((empty($name)) && (empty($email)))){
echo "<p><strong>You have to fill the fields!</strong></p>";
}
else if ((mysqli_num_rows($name_result) < 1) && ( mysqli_num_rows ($email_result) < 1 )){
$name_query="insert into stoixeia values (' ','$name')";
mysqli_query($conn,$name_query) or die(mysql_error()) ;
$email_query="insert into stoixeia values (' ','$email')";
mysqli_query($conn,$email_query) or die(mysql_error()) ;
echo "<p>Thank you for signing up!</p>";
}
else
{
echo "<p>You are already subscribed!</p>";
}
}