so i have two tables:
image->image_id, user_id, image, etc
i want to delete one row from image table where user_id = user_id_s and image_id = image_id_g

$del_image = mysql_query("DELETE FROM image WHERE image_id = '$image_id_g'AND user_id='$user_id_s'");

the image_id=image_id_g AND user_id = user_id_s not working.

You have to concatenate the strings to work :)

$del_image = mysql_query("DELETE FROM image WHERE image_id = '".$image_id_g."' AND user_id='".$user_id_s."'");
Be a part of the DaniWeb community

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