0

i want to use insert and delete query at the same time but its not working only insert query run here is my code,every thing is working but delete query.....

include("conn.php");
$a=$_GET['email'];

if(isset($_POST['submit']));
$firstname=$_POST['firstname'];
$lastname=$_POST['lastname'];
$email=$_POST['email'];
$password=$_POST['password'];
$city=$_POST['city'];
$address=$_POST['address'];
$gender=$_POST['gender'];
$degree=$_POST['degree'];
$specialization=$_POST['specialization'];
$experiance=$_POST['experiance'];
$salary=$_POST['salary'];
$designation=$_POST['designation'];

$insert=mysql_query ("insert into admin (firstname, lastname, email, password, city, address, gender, degree, specialization, experiance, salary, designation) values ('$firstname', '$lastname', '$email', '$password', '$city', '$address', '$gender', '$degree', '$specialization', '$experiance', '$salary', '$designation')");

$del=mysql_query("delete from signup where email='$a' ");

header("location: requests.php");

at the last header is also working but delete query is not working plz help me out in this matter

Edited by pritaeas: Added markdown.

3
Contributors
2
Replies
17
Views
4 Years
Discussion Span
Last Post by pritaeas
1

do this:

echo "delete from signup where email='$a' ";
$del=mysql_query("delete from signup where email='$a' ");

See what you get. BTW this will stop the header working.
Copy the output from the screen (SQL) and paste it into phpmyadmin SQL window and see if it works.
Also you can use the :

mysql_query("delete from signup where email='$a' ") or die(mysql_error());
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.