I have create a html form which takes in a user name and password, if the user name and password are valid a new html page is opened. This contains three buttons which can be selected each calling a new cgi file.
The problem is that i want when a button is pressed which leads to a cgi file, i want to them perform a mysql query something like this
$sth = $dbh->prepare(q{SELECT students.grade from students, users wher
+e students.id = users.id and users.id = ?})
$usr->execute($username)
The value $username which i want to perform the query on is the value which the user passed in on the very first html page. Is there any secure way of passing that value accross these two pages, or can anybody suggest a better approach that the one i am taking. I would appreciate any help on this matter
Thanks
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.