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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CGI/Perl - Radio buttons selection

Status
Not open for further replies.

yj7sum

Programmer
Jul 24, 2001
6
US
I need help. I have some very simple questions in Perl/CGI but I am new in Perl and although I tried to read as much as possible, I am still so confused and don't know where to start. Following is html file for a form:

==
<form METHOD=&quot;POST&quot; ACTION=&quot;/cgi-bin/name.pl&quot;>

Account Number: <INPUT TYPE=&quot;text&quot; SIZE=25 NAME=&quot;accountnum&quot;>
Name: <INPUT TYPE=&quot;text&quot; SIZE=25 NAME=&quot;name&quot; MAXLENGTH=45>
Street: <INPUT TYPE=&quot;text&quot; SIZE=25 NAME=&quot;street&quot;>
City: <INPUT TYPE=&quot;text&quot; SIZE=25 NAME=&quot;city&quot; >
State: <INPUT TYPE=&quot;text&quot; SIZE=25 NAME=&quot;state&quot; >
Zip: <INPUT TYPE=&quot;text&quot; SIZE=25 NAME=&quot;zip&quot; >
Balance: <INPUT TYPE=&quot;text&quot; SIZE=25 NAME=&quot;balance&quot; >
<hr>
Look up: <INPUT TYPE=&quot;radio&quot; NAME=&quot;info&quot; VALUE=&quot;lookup&quot; CHECKED>
Add to database: <INPUT TYPE=&quot;radio&quot; NAME=&quot;info&quot; VALUE=&quot;addb&quot;>

<hr>
==
1. I will create a database to add info input by users. How do I write a CGI script to check if the radio button, let say &quot;addb&quot; is the choice, then to add account number?

2. How do I verify to make sure all text fields are not blank?

Thank you.
 
Please read the faq - faq452-653. It has some simple examples of playing the CGI game. If that leads to more questions please ask them.

HTH


keep the rudder amid ship and beware the odd typo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top