php-db | 2001071
Date: 07/09/01
- Next message: Søren Nielsen: "[PHP-DB] Re: ereg_replace"
- Previous message: Johannes Janson: "[PHP-DB] Re: Login Help"
- Next in thread: Adv. Systems Design: "[PHP-DB] image resizing"
- Reply: Adv. Systems Design: "[PHP-DB] image resizing"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
>1. I have checkbox NAME="x" on Page1.
>2. On page two I want to check ($x) if it's checked or not. How can I do
it.
>3. What value is stored in $x.
PHP makes a variable out of every form element. You don't need to do a
thing.
So assuming this is within <form> and </form> tags:
<input type="checkbox" name="x"> you can check on the action page of the
form if "x" is checked by isset(). So if(isset($x)) { ... } would be
checking it.
If you don't give the checkbox a value it will be "on" if checked and
nothing
or "0" if not checked.
You can always check the submitted values by this little script:
while (list($key, $value) = each($HTTP_POST_VARS)) {
echo "$key: $value<br>";
}
hope it helps
Johannes
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Søren Nielsen: "[PHP-DB] Re: ereg_replace"
- Previous message: Johannes Janson: "[PHP-DB] Re: Login Help"
- Next in thread: Adv. Systems Design: "[PHP-DB] image resizing"
- Reply: Adv. Systems Design: "[PHP-DB] image resizing"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

