faqts : Computers : Programming : Languages : PHP : Common Problems : Forms and User Input

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

6 of 10 people (60%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

I can't send variable with method post or get from the input box

Jul 4th, 2002 12:30
Someswara Rao Terlapu, Guest,


You can send variable with method post or get using cgi  programs and form elements in html
the code looks like
<form method=[POST or GET] action=[CGI SCRIPT NAME]>
<input type=text name=[variable name] size=[some number]>
</form>
and the script looks like(of course, this is in per)
#! /usr/bin/perl
use CGI;
$query=new CGI;
$data = $query->param("name of the text field");
and u will get the value of the variable( in this case text box input)
in the variable $data and u can use this  as  u wish.
'[',']' bracket to be ommited