Today we will be finishing up our lesson on capturing data using a php form. We will capture first name and last name and send them to a separate page for processing.
Remember the format for the variables we are capturing.
$_GET['fieldname']
or
$_POST['fieldname']
We will also rename variables today to make them simpler to use.
We will also do a bit of logical processing using an IF statement.
Showing posts with label "$" for variables. Show all posts
Showing posts with label "$" for variables. Show all posts
Thursday, February 11, 2010
Tuesday, November 3, 2009
Quiz (redux) & PHP forms, passing variables, .
Update: We encountered some technical difficulty in that Adobe CS4 was not installed fully on 3 machines. We remedied that issue and began work on variables.
In the example below, the line that begins with "$dog" shows you how to assign a mathematical value to a variable. In this case, the value of $dog is two-hundred fifty-seven thousand divided by twelve. In the next line (begins with "echo") we learned how to print the variable.

Quiz today.
Today we are going to finish reviewing the basics of HTML and PHP.
Then we will use a form to pass an HTTP get variable from one page to the next.
In the example below, the line that begins with "$dog" shows you how to assign a mathematical value to a variable. In this case, the value of $dog is two-hundred fifty-seven thousand divided by twelve. In the next line (begins with "echo") we learned how to print the variable.

Quiz today.
Today we are going to finish reviewing the basics of HTML and PHP.
Then we will use a form to pass an HTTP get variable from one page to the next.
Labels:
"$" for variables,
echo,
mathematical operations,
quiz today,
variables
Monday, November 2, 2009
Quizzical Expressions...
First thing in class on Tuesday, open your secondpage.php pages to edit!
Gents,
Our quiz class average was 12.4 out of 15.0. Not spectacular for an open-notes quiz. That's a B minus, in case you were wondering. We will attempt to improve our scores on a re-quiz on Tuesday.
Today we reviewed code and prepared for the re-quiz opportunity. Here's a recap of today's code:

The above code produces the following output:
Gents,
Our quiz class average was 12.4 out of 15.0. Not spectacular for an open-notes quiz. That's a B minus, in case you were wondering. We will attempt to improve our scores on a re-quiz on Tuesday.
Today we reviewed code and prepared for the re-quiz opportunity. Here's a recap of today's code:

The above code produces the following output:
Subscribe to:
Posts (Atom)
