Matt
Thanks for the reference, but it still doesn't work for me. I now have
<form action="admin.php" method="post">
<input type="radio" name="admin_do" value="Add new user">Add new user</br>
<input type="radio" name="admin_do" value="Change User password">Change
User password</br>
<input type="radio" name="admin_do" value="Delete user">Delete User</br>
<input type="radio" name="admin_do" value="Add new document">Add new
document</br>
<br>
<input type="submit" name="submit" value="Select"
</form>
and in admin.php
<?php
echo ("Entering admin.php </P>");
echo (" submit = $submit <br>");
echo ("select = $select <br>");
$myval = $_POST['admin_do'];
echo (" value is $myval <br>");
echo (" admin_do is $admin_do <br>");
echo $HTTP_POST_VARS['admin_do'];
for ($i=0; $i <5; $i++)
{
echo (" counter = $i value is $admin[$i] <br>");
};
?>
the only value I get is the $admin_do which has the value "Array" - not much
help
Any Ideas?
Janet
-----Original Message-----
From: Matt [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 6 March 2002 11:00
To: WG4- Cook, Janet
Subject: Re: [PHP] Basic help for radio buttons needed
See http://www.php-faq.com/#66
----- Original Message -----
From: "WG4- Cook, Janet" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>
Sent: Tuesday, March 05, 2002 6:46 PM
Subject: [PHP] Basic help for radio buttons needed
> Hi all,
>
> I am sure this is a very simple question, but after reading reams of doco
I
> still can't find the answer. I am very new to PHP and HTML coding.
>
> I have a form (html) that uses radio buttons that goes to some PHP code -
> how in the PHP code can I tell which radio button was selected?
>
> My HTML code (which is inside another PHP page) is as follows
>
> <form action="admin.php" method="GET">
> <input type="radio" name="admin_do[]" value="Add new user">Add new
> user</br>
> <input type="radio" name="admin_do[]" value="Change User password">Change
> User password</br>
> <input type="radio" name="admin_do[]" value="Delete user">Delete
User</br>
> <input type="radio" name="admin_do[]" value="Add new document">Add new
> document</br>
> <br>
> <input type="submit" name="submit" value="Select"
> </form>
>
>
> I have tried various things in admin.php but nothing gives me which radio
> button was selected.
>
> TIA
>
> Janet
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php