tracy_p
asked on
Using html,php and mysql
when i click on the radio button i want that data to be stored in the database. can any1 help me plz.
ASKER
Thanks a lot for your reply. I found the solution for myself.
try this
<?php
if (isset($_POST['S1'])) {
echo "username = ".$_POST['username']."<br>";
echo "password = ".$_POST['pass']."<br>";
//do your sql insert statment
}
?>
<form name="form" action="<?=$_SERVER['php_SELF']?>" method="POST">
<input name="username" type="text">
<input name="pass" type="password">
<input type="radio" name="S1" value="ABC" onClick="this.form.submit();">
</form>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Have you got the HTML form for us to see? It'd be easier to know what you mean and adapt the solution to your problem.