hi everyone,
really stuck with php radio buttons at the minute. have used php to create them, the code is embedded within my html page and is as follows :
<html>
<form action="index.php" method="post">
blah blah blah
<?php
if($radio1==1){
print("<input name='type' type='radio' value='1' checked>");
print("P.C.");
}else{
print("<input name='type' type='radio' value='1'>");
print("P.C.");
}
if($radio1==0){
print("<input type='radio' name='type' value='0' checked>");
print("Mac");
}else{
print("<input type='radio' name='type' value='0'>");
print("Mac");
}
?>
<input name="submit" type="submit" id="submit" value="Submit">
</form>
</html>
The buttons are fine but when i submit my form and run the index.php (attached as index.txt), the value is not remembered? would it be possible to change this?
to see this form in action...visit my site :
http://digital.tasc.ac.uk/student/014408/ap02/index.php
cheers daniel