View Single Post
Old 11-12-2012, 03:41 PM   PM User | #2
BluePanther
Senior Coder

 
Join Date: Jul 2011
Posts: 1,226
Thanks: 3
Thanked 171 Times in 171 Posts
BluePanther is on a distinguished road
Quote:
Originally Posted by stevenryals View Post
Hi all..
I have a table that i want users to be able to delete based on 2 values..
"name tag" and "cpm"
tag = varchar(25)
cpm = float

I have this form on the main page:

Code:
<form method=post action="purgestrikesearch.php">
<label>Delete Records:  Tag Name:</label>
<input size=10 type=text id=tag name=tag>
<label> Where CPM is greater than:</label>
<input type=text size=2 id=cpmval name=cpmval>
<input type=submit value="Delete">
I can't seem to wrap my head around what to do on my purgestrikesearch.php page..

obiously i'm conncting, but building the query is puzzling me..

any help would be appreciated..

thanks,
-steven
It's simple really.

Code:
DELETE FROM `table` WHERE `tag`=$verifiedInput1 AND `cpm`=$verifiedInput2
__________________
Useful function to retrieve difference in times
The best PHP resource
A good PHP FAQ
PLEASE remember to wrap your code in [PHP] tags.
PHP Code:
// Replace this
if(isset($_POST['submitButton']))
// With this
if(!empty($_POST))
// Then check for values/forms. Some IE versions don't send the submit button 
Quote:
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
BluePanther is offline   Reply With Quote