Dear Friends ,
i have i problem that let say suppose i am working in index.php
and
[PHP]
<form name="myform" method="POST"
action="<?php echo
$_SERVER['PHP_SELF']; ?>
">
[/PHP]
means that its call again index.php
and i wanna that on the same page (INDEX.PHP) i have radio buttton and client side user click any of one radio button and then its goes to database and insert it how can i write and how can i write $_ post which is right place for this
following code for radio button
[PHP]
<h3><p style="color: #0000ff"><?php echo
$row['que'];?><table
border='0'><tr> <td valign='top'><i nput
type='radio' name='quiz'
value='1' /></td><td><?php echo
$row['op1'];?><br></td></tr><tr><td
valign='top'><i nput
type='radio' name='quiz'
value='2' /></td><td><?php echo
$row['op2'];?><br></td></tr><tr><td
valign='top'><i nput
type='radio' name='quiz'
value='3' /></td><td><?php echo
$row['op3'];?><br></td></tr><tr><td
valign='top'><i nput
type='radio' name='quiz'
value='4' /></td><td><?php echo
$row['op4'];?><br></td></tr></table><br></p></h3>
[/PHP]
following code for form action
[PHP]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><ti tle>Questionnai re</title></head>
<body>
<form name="myform" method="POST"
action="<?php echo
$_SERVER['PHP_SELF']; ?>
">
<input type="submit" VALUE="NEXT"
/>
<input type="hidden" name="submitted "
value="1" />
<input type="hidden" name="que"
value="<?=$row[
'que']?>">
</form></body></html>
[/PHP]
sanjay
i have i problem that let say suppose i am working in index.php
and
[PHP]
<form name="myform" method="POST"
action="<?php echo
$_SERVER['PHP_SELF']; ?>
">
[/PHP]
means that its call again index.php
and i wanna that on the same page (INDEX.PHP) i have radio buttton and client side user click any of one radio button and then its goes to database and insert it how can i write and how can i write $_ post which is right place for this
following code for radio button
[PHP]
<h3><p style="color: #0000ff"><?php echo
$row['que'];?><table
border='0'><tr> <td valign='top'><i nput
type='radio' name='quiz'
value='1' /></td><td><?php echo
$row['op1'];?><br></td></tr><tr><td
valign='top'><i nput
type='radio' name='quiz'
value='2' /></td><td><?php echo
$row['op2'];?><br></td></tr><tr><td
valign='top'><i nput
type='radio' name='quiz'
value='3' /></td><td><?php echo
$row['op3'];?><br></td></tr><tr><td
valign='top'><i nput
type='radio' name='quiz'
value='4' /></td><td><?php echo
$row['op4'];?><br></td></tr></table><br></p></h3>
[/PHP]
following code for form action
[PHP]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><ti tle>Questionnai re</title></head>
<body>
<form name="myform" method="POST"
action="<?php echo
$_SERVER['PHP_SELF']; ?>
">
<input type="submit" VALUE="NEXT"
/>
<input type="hidden" name="submitted "
value="1" />
<input type="hidden" name="que"
value="<?=$row[
'que']?>">
</form></body></html>
[/PHP]
sanjay
Comment