PHP - MySQL - Delete Row

前端 未结 4 845
梦如初夏
梦如初夏 2020-12-11 03:02

I am not too sure what i am doing wrong. i am trying to delete the entire row with this code but it is not working. No error is happening it prints the line that it was dele

4条回答
  •  一向
    一向 (楼主)
    2020-12-11 03:57

    else
        {
        $qry = "SELECT * FROM my_login WHERE email = '".$email."' LIMIT 1";
        $res = mysql_query($qry);
        if(mysql_num_rows($res) > 0)
            {
            echo "Email already exists!";
            }
        else
            {
            $qry="INSERT INTO my_login SET name='$name',city='$city',comment='$comt',password='$pass',email='$email'";
            mysql_query($qry);
            }
        }       
    }
    ?>  
    

提交回复
热议问题