Php Forms

free web hosting
Free Web Hosting > Computers & Tech > Networking

Php Forms

kellafab
Sorry guys but i dont know how to add php forms can some1 help me plz

Reply

mhykhh
PHP Forms? What kind of Form do you need? Please give us some details on what you are trying to do. smile.gif

Reply

Hercco
I think what Kellafab means is how to process form data with PHP.

It actually is easy as pie.

Form variables are stored in global variable arrays called $HTTP_POST_VARS (for post variables, ie. the ones you use if you use post as your form submission method) and $HTTP_GET_VARS (for get variables. For method="get" forms.


The difference between POST and GET is that GET variables are sent using attributes in the end of the URL. Ie. what is actually done is that page "form.php?var_1=val_1&var_2=val_2" is requested. POST variables are sent in the HTTP request and thus are not at the end of the URL.


So if you have a form which in HTML looks soemthing like this:

CODE


<form action="form.php" method="post">
<input type="text" name="username"/>
<input type="text" name="email"/>
<input type="submit"/>
</form>


In your form.php you would access the variables like this:

$HTTP_POST_VARS['username']
$HTTP_POST_VARS['email']


$HTTP_POST_VARS is quite long to use so also $_POST_VARS and $_GET_VARS work too.

 

 

 


Reply

jonypawks
You can also refer to those variables like this:

CODE

$_POST['username']
$_POST['email']


If you want a quick tutorial here's one that I've used in the past, shows you the basics of forms and PHP and also using MySQL through PHP.

Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

Recent Queries:-
  1. reply process in php - 89.06 hr back. (1)
  2. code for sending my php form in my site to my mail - 158.15 hr back. (1)
  3. php request form variable - 200.48 hr back. (1)
Similar Topics

Keywords : php forms


    Looking for php, forms






*SIMILAR VIDEOS*
Searching Video's for php, forms
advertisement




Php Forms