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.....



$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

Recommended Answers

All 2 Replies

Member Avatar

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());

Are you sure you get one email via GET and another via POST?

Also, line 4 does nothing.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.