| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| Senior Member | Getting information from a field How do i get information from a field and then add it to an if statement? I have: PHP Code: Nvm, i got it. Last edited by killaklown; 07-03-2006 at 11:43 AM. |
| |
| | #2 (permalink) |
| NamePros Regular | You need to get the variable first via $_POST['name'] access semantics. Nobody in their right mind leaves register_globals on anymore. For example, to check for a flag called "foo", my php would do this: Code: $flag = $_POST['foo'];
if( isset($flag) ) {
echo "way to go smartguy, you typed \"$flag\".";
}
Code: <input type="text" name="flag" /> |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |