note 100656 added to control-structures.else
| From: | smoldar at gmail dot com | Date: | Thu, 28 Oct 2010 14:21:20 +0000 |
| Subject: | note 100656 added to control-structures.else | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-173554@lists.php.net to get a copy of this message | ||
You can use the if to make a Yes/No field, verify if the statement is real or not and show the
correct option checked.
<? if($variable == 'S') {?>
<input name="blah" type="radio" value="Y"
checked="checked"> Yes
<input name="blah" type="radio" value="N"> No
<?} else {?>
<input name="blah" type="radio" value="Y"> Yes
<input name="blah" type="radio" value="N"
checked="checked"> No
<?}?>
----
Server IP: 69.147.83.197
Probable Submitter: 200.144.28.26
----
Manual Page -- http://www.php.net/manual/en/control-structures.else.php
Edit -- https://master.php.net/note/edit/100656
Del: integrated -- https://master.php.net/note/delete/100656/integrated
Del: useless -- https://master.php.net/note/delete/100656/useless
Del: bad code -- https://master.php.net/note/delete/100656/bad+code
Del: spam -- https://master.php.net/note/delete/100656/spam
Del: non-english -- https://master.php.net/note/delete/100656/non-english
Del: in docs -- https://master.php.net/note/delete/100656/in+docs
Del: other reasons-- https://master.php.net/note/delete/100656
Reject -- https://master.php.net/note/reject/100656
Search -- https://master.php.net/manage/user-notes.php