Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by apw420

  1. apw420

    Phone Number Validator

    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(...
  2. apw420

    Phone Number Validator

    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 =...
  3. apw420

    Phone Number Validation

    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!')...
  4. apw420

    redirect to a new url in perl

    You rock. Thank you. What is EOF? Was the main problem that I "initiated" the display text too early?
  5. apw420

    redirect to a new url in perl

    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"...
  6. apw420

    redirect to a new url in perl

    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...

Part and Inventory Search

Back
Top