FORM SUBMISSION
------------------------------------------------------------------------------------------------------------
<form name="myfrm" id="myfrm" action="#" method="post">
<strong>username:</strong>
<input type="text" name="uname" id="uname" /><br/>
<strong>password: </strong>
<input type="password" name="pwd" id="pwd" /><br />
<br />
<input type="reset" value="refresh!!" />
<input type="submit" value="submit!!!" />
</form>
explanation:-
form:-attributes:-name,id,action,method,enctype.
action:-this means targeted file,or itself(#)
method:-get(default)/post:-it takes the data from the form
reset:-it refresh the form fields
submit:-it submit the form into targeted file.
process:-when u submit the button method take the form values ,after action
attribute fire.
What is get?
1)data is sending through url is called get method.
2)the address bar (url) display the form data.
3)it does not provide security.
4)so it is not applicable for sensitive transactions. Like bank transactions (user name, password)
5)but it is fast .
6)it support only small amount of data action=string1.php
name:apparao
password:srinu
*in URL (or) address bar:string1.php?uname=apparao&pwd=srinu
suppose action=#
in url (or) address bar:-form1.php?uname=apparao&pwd=srinu
what is post?
1)data is sending through virtual directory is called post method.
2)data is submitting through secured manner is called post method.
3)it supports large amount of data.(unlimited)
4)it is for non-idempotent usages.(database).
GLOBLE VARIABLES:-
1) $_GET []
2) $_POST []
3) $_REQUEST []
4 $_COOKIE []
5) $_SESSION []
1) $_GET[]:-
SYNTAX:-1)$_GET['variable'];
1) $_GET[] is used to receive the data from the form.
2) this accept only get() method//hint:-form
2)$_POST[]:-
syntax:-$_POST['variable'];
1)$_POST[] is used to receive the data from the form.
2)this accepts only post() method//hint:-form ex:-form1.php
formhandling.php
3)$_REQUEST[]:-
1)this is also used to receive the data from the form
2)this accepts both the methods get(),post()//hint:-form methods