• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 177
  • Last Modified:

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.
0
tracy_p
Asked:
tracy_p
1 Solution
 
absxCommented:
Hi Tracy,

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.
0
 
tracy_pAuthor Commented:
Thanks a lot for your reply. I found the solution for myself.
0
 
agamalCommented:
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>

Open in new window

0
 
ee_autoCommented:
Question PAQ'd, 500 points refunded, and stored in the solution database.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now