PDA

View Full Version : [php]$_post



The Red Guy
June 23rd, 2003, 23:28
What does it refer to? And why is it preferred (also includes $_GLOBAL and on) :)

keith
June 24th, 2003, 00:09
<form action="index.php" method="post">
<input type="text" name="subject" value="">
<input type="submit" name="submit" value="Submit">
</form>

on the next action, you'd need to recall the subject:

$_POST['subject'];

dawizman
June 24th, 2003, 00:12
it is also the same as

$HTTP_POST_VARS[]

bloodyveins
June 25th, 2003, 11:46
$_POST['string'] is a superglobal array. Remember when you write $data = $_POST['string'] , $data is not a variable.
//Remember, php is case sensitive so $_post won't work.