Actually...here's full piece of code I need to enter:
if ( $phone =~ / ^ \( \d{3} \) \d{3} - \d{4} $ /x ) {
else {
print( div( { style => "color: red; font-size: x-large" },
"INVALID PHONE NUMBER" ), br() );
print( "A valid phone number must be in the form " );
print(...
Still working on this script. :) I'm trying to add a phone number validator in now.
I know I need to add this:
if ( $phone =~ / ^ \( \d{3} \) \d{3} - \d{4} $ /x )
But I'm not sure where.
Here's the code:
#!/usr/bin/perl -w
use CGI ':standard';
use DBI;
$dbh =...
Can't figure out how to validate a phone number. Such as: Number has to be in (123) 456-7890 format.
Have this code to validate data is entered:
<script type = "text/javascript">
function validate()
{
if (theform.name.value=="")
{
alert('Your name is required!')...
Sorry for the vagueness. :)
Here's the entire code:
#!/usr/bin/perl -w
use CGI ':standard';
use DBI;
print "Content-type:text/html\n\n";
print "<html><head><title>Inserting into MySQL";
print "</title></head><body>";
$dbh = DBI->connect("DBI:mysql:s04-it604-s13:localhost", "s04-it604-s13"...
I have a form in an HTML doc. I send it to my Perl script. The perl script then sends it to my mySql database. I then want to redirect the user to another HTML page. Yet, I can't seem to get it to work. Any ideas?
Thank you for your help.
if ($rows > 0)
{print...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.