Mandatory Question(s) of the day ...
During the last week I spent quite a bit of time helping many of you troubleshoot errors in your scripts. During our debugging efforts, I would try to informally gauge your overall understanding of some "big picture" things.
Variables are a "big picture" thing; making html forms are "big picture" ...
Q: By now you've probably seen a line of code like the one below scores of times:
$guess = $_POST['guess'];
Break this line of code down - explain each part and how they connect to each other.
(i.e. How is $guess related to 'guess' ... why did we need to type in $_POST? Do we usually see this line of code on a form page or on a handle_form page?)
$guess = $_POST['guess'];
ReplyDeleteOne would usually see the above script when recreating a variable from an html form onto a php.
$guess is the receated, or transfered variable and it is equal to ['guess']. = $_POST is telling $guess to go into the POST to find ['guess'].
$guess = $_POST['guess'];
ReplyDeleteI remember using this for creating a varible from html to a php. Thats all I know... :/ -Nate C.
$guess = $_POST['guess'];
ReplyDeleteI remember using this for creating a varible from html to a php. Thats all I know... :/ -Nate C.
$guess = $_POST['guess']
ReplyDeletethe first part is a new variable you are naming, the = means it is equal to the variable typed 'guess' on the last page, and the $_POST means you want it to be avaliable (its value), but you don't want to see its value in the url.
It is seen on a handle form page.
-Melissa Scenga
$guess is what we name the variable
ReplyDelete$_POST is the action and what were telling it to do
['guess'] is what we called the variable on the original page
I don't remember how they use this form but if i study i can nod.
ReplyDelete$guess= $_POST['guess'];
-Nelson Mandela
$guess is the variable from the html page that will show the word or phrase typed in box of some sort. $_POST is what carries that variable from the html page to the next php page. and it is making $guess look for 'guess'.-William Hundt
ReplyDelete$guess and 'guess' have the same values. $_POST is what makes $guess work because it goes in and retrieves information from your original form. (In this example, it goes in and finds information with a value of 'guess' from an html form page.)
ReplyDeleteWe see this line of code on a handle_form page.
--Sarah Kimmel
im not sure i cannot remember something to do with transformation of variables i don't speak computer so
ReplyDelete$guess is the variable and it is equal to "guess". $_POST means that your getting it from POST, your other page. And ['guess'] is where your getting your info from.
ReplyDelete$guess = $_POST['guess'];
ReplyDelete$guess is a variable, the equals is what your telling it to do which is posting it, ['guess'] is equal to the $guess variable.
I dont know if this makes much sense but this is how ive always thought it works.
-Chris Pfeifer-
$guess= $_POST['guess]
ReplyDelete$guess is the variable and it is equal to ['guess']. = $_POST is telling $guess to go into the POST to find ['guess'].
We usually see this line of code on a handle_form page. ~Morgan McCoy
$guess isi would have to put the name variable
ReplyDelete$_POST is the action and what were telling it to do
['guess'] is what we called the variable on the original page
Chris Lowure.....
$guess is the variable
ReplyDeletePost is the action
[guess] is what its finding.
-Ashlee Smith
$guess = $_POST['guess']
ReplyDeleteI think that this is used when creating a variable when going from html to php.
- Tim Blake
$guess= $_POST['guess'] $guess is the variable post the action [guess]what its going to find o print
ReplyDelete-Jose pena
$guess = $_POST['guess'];
ReplyDelete$guess is a variable.
$_POST is the action the variable is going to take.
['guess'] is the variable carried from the original page.
- jillian janis
$guess is what we name the variable
ReplyDelete$_POST is the action and what were telling it to do
['guess'] is what we called the variable on the original page
- Jaylen Fuentes