Form Input Types : Form « CGI « Perl

Perl
1. Array
2. CGI
3. Class
4. Data Type
5. Database
6. File
7. GUI
8. Hash
9. Language Basics
10. Network
11. Regular Expression
12. Report
13. Statement
14. String
15. Subroutine
16. System Functions
17. Win32
18. XML
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Perl » CGI » Form 
Form Input Types
 
#Input Type         Attributes        
#CHECKBOX           NAME, VALUE  
#FILE               NAME
#HIDDEN             NAME, VALUE
#IMAGE              SRC, VALUE, ALIGN
#PASSWORD           NAME, VALUE
#RADIO              NAME, VALUE
#RESET              NAME, VALUE
#SELECT             NAME, OPTION SIZE, MULTIPLE
#SUBMIT             NAME, VALUE
#TEXT               NAME SIZE, MAXLENGTH
#TEXTAREA           NAME, SIZE ROWS, COLS


<html><head>
<title>First CGI Form</title></head>
<body>
<form action="index.pl" >
Name:<input type="text" name="namestring">
Desc: <br>
<textarea name="comments"></textarea>
Food:
<input type="radio" name="choice" value="burger"/>Hamburger
<input type="radio" name="choice" value="fish"/>Fish
<input type="radio" name="choice" value="steak"/>Steak
<input type="radio" name="choice" value="yogurt"/>Yogurt
</p> <b>Choose a work place:</b> <br>
<input type="checkbox" name="place" value="la"/>Los Angeles
<input type="checkbox" name="place" value="sj"/>San Jose
<input type="checkbox" name="place" value="sf" checked/>San Francisco
<select name="location"
<option selected value="hawaii"/> Hawaii
<option value="bali"/>Bali
<option value="maine"/>Maine
<option value="paris"/>Paris
</select>
 <p>
<input type="submit" value="submit">
<input type="reset" value="clear">
</body>
</form>
</html>

<html>
<head><title>First CGI Form</title></head>
<body>
<form action="form1.cgi" method=get>
Please enter your name: <br>
<input type="text" size=50 name="Name">
Please enter your phone number: <br>
<input type="text" size=30 name="Phone">
<input type=submit>
<input type=reset value="Clear">
</form>
</body>


#!c:/ActivePerl/bin/perl.exe
print "Content-type: text/html\n\n";
print "Processing CGI form :\n\n";
# Print out only the QUERY_STRING environment variable
while(($key, $value)=each(%ENV)){
  print "<h3>$key = <em>$value</em></h3><br>"
  if $key eq "QUERY_STRING";
}

   
  
Related examples in the same category
1. Demonstrates GET method with HTML form.
2. Demostrates POST method with HTML form.
3. Demonstrates use of CGI.pm with HTML form.
4. Create HTML form with CGI
5. Get form submitted value
6. Using param() function to get parameter
7. Using CGI function to check the parameter
8. Create a form and set the method and action
9. Create a form with submit button
10. Process form with regular expression: first name and last name
11. Process form with regular expression: date
12. Process form with regular expression: time
13. Generate the HTML form
14. Printing the Name Input Using the CGI Module
15. Get form value with param
16. Generate and Process Forms
17. Form Mail
18. Form based table editing
19. Create a form with Perl code
20. Code to Accept Input with the CGI Module
21. Capitalize the first letter of each parameter using ucfirst
22. A Form-Based Example
23. Learn about the current CGI request
24. Read the data for a CGI GET request
25. Read the data passed to a script on the command line?
26. Decoding the Input Data
27. The POST Method
28. Verifying a username and a password
29. Sample Database Query
30. Writing a cookie to the client computer
31. Add a New Phone Number
32. Sessions - Preserving State
33. Separate the form and perl script
34. Add form data to database
35. Passing parameter to perl CGI code
36. EMail sending form
37. Guest book form
38. Data-Entry Forms in Web Pages
39. Using LI
40. Using the option select box
41. Reading text in textarea
42. Querying all the parameters
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.