Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| using_php [2021/02/19 14:51] – created ac1mde | using_php [2021/02/19 14:54] (current) – ac1mde | ||
|---|---|---|---|
| Line 19: | Line 19: | ||
| Global session variables are not automatically passed from the session file, and you need to extract them manually: | Global session variables are not automatically passed from the session file, and you need to extract them manually: | ||
| ^ Before ^ After ^ | ^ Before ^ After ^ | ||
| - | | session_register(" | + | | session_register(" |
| - | print $userName=]; | + | |
| - | $userName = " | + | |
| - | session_register(" | + | |
| - | if (isset ($_SESSION[' | + | |
| - | $userName = $_SESSION[' | + | |
| - | } | + | |
| - | print $userName; | + | |
| - | $userName = " | + | |
| - | $_SESSION[' | + | |
| Similarly, form variables are not automatically passed into the PHP variables, so you must do this manually. | Similarly, form variables are not automatically passed into the PHP variables, so you must do this manually. | ||
| ^ Before ^ After ^ | ^ Before ^ After ^ | ||
| - | | print "you typed: " | + | | print "you typed: " |
| - | print "was check box 2 selected? " | + | |
| - | $cb = $_POST[' | + | |
| - | } | + | |
| - | | + | |
| - | $text = $_GET[' | + | |
| - | } | + | |
| - | print "you typed: " | + | |
| - | print "was check box 2 selected? | + | |
| - | " | + | |
