Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: Passing form parameters same CGI page

by poj (Abbot)
on Jul 08, 2013 at 20:28 UTC ( [id://1043181]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Passing form parameters same CGI page
in thread Passing form parameters same CGI page

You really need to start using placeholders (?) in your SQL like this. ;
sub deletecontact{ my $message; my $sql = 'DELETE FROM test.addressbook where last_name = ?'; my $sth = $connect->prepare($sql); my $rd = $sth->execute( $q->param('lname1') ); if ($rd == 1){ $message = q(Record has been successfully deleted!!!); } else { $message = q(<b style="color:red">Error! Couldn't delete record</ +b>); } return $message; }
poj

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1043181]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2024-04-20 05:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found