Quote:
Originally Posted by stevenryals
hmm.. now i get this:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
form is sending: cval and tval
my action file:
Code:
$tval = mysql_real_escape_string($tval);
$cval = mysql_real_escape_string($cval);
$sql = mysql_query("DELETE FROM expedia WHERE `tag`='$tval' AND `cpm`=$cval" );
if (!$sql) {
die(mysql_error());
}
my current submit form:
Code:
form method=post action="purgestrikesearch.php">
<label>Delete Records: Tag Name:</label>
<input size=15 type=text id=tval name=tval>
<label> Where CPM is greater than:</label>
<input size=2 type=text id=cval name=cval>
<input type=submit value="Delete"></b>
|
Is that your entire "action file"? Have you made sure you've updated to $_POST['tval'] and $_POST['cval']? Also, wrap your input tag attributes in HTML. You should always do that. <input size="15" type="text" id="tval" name="tval"/>.
If that still doesn't solve anything, at the top of your "action file" (after <?php obviously) put var_dump($_POST); and post here what comes out, as well as your complete "action file".