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

Recommended Answers

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 …

Jump to Post

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 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.