I am having trouble inserting records into an MySQL table
via browser. I am able to run the script just fine at the
unix prompt. I've checked that the parameters are being
passed correctly. When I run it via browser, it seems to
perform fine but no records were inserted.
I don't know what else to check or do.
Please help.....
Here's the part that doesn't work:
note: donorssn is an integer, regdt is a date, everything else is varchar
$dbh->do("insert into registration (donorssn,donordob,regdt,donorname,password,question,answer,email,phone) VALUES($ssn,'$dob','$x','$dname','$pwd','$question','$ans','$email','$ph')");
if(!$dbh)
{
$err = "Error:" . $dbh->errstr . "\n";
}
else
{
$err = "
Thank you for registering online
Please contact the Oklahoma Blood Institute at 1-800-827-5693 for more information";
$rpath = "/obi/register.html";
}
Any help or suggestions is greatly appreciated.
If you would like to try it out or view the complete script,
please email me directly at hoayap@swbell.net.
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.