Solved
Posted: Mon Apr 11, 2005 8:56 am
Hi,
I’m not fully sure how to apply this but basically I have an update form and I want to have radio button fields filled with values that were previously checked when the form was first filled out.
In my database the column is headed ‘FullAddress’ and in this the data entered into the field could be either ‘Include_Address’ or ‘Dont_include_Address’ depending on what radio button had been checked.
At the moment I’m using this bit of code (below) but as I’m very new to all of this I’m not getting any result in that the page simply displays in the browser with neither radio buttons checked. I’m sure I can’t have two input values with the same id but I don’t fully know how to approach this.
This is a snip of my code:
This is a snip of the code from the Form that would initially fill the values in the database.
Many thanks for any advice.
Brian
I’m not fully sure how to apply this but basically I have an update form and I want to have radio button fields filled with values that were previously checked when the form was first filled out.
In my database the column is headed ‘FullAddress’ and in this the data entered into the field could be either ‘Include_Address’ or ‘Dont_include_Address’ depending on what radio button had been checked.
At the moment I’m using this bit of code (below) but as I’m very new to all of this I’m not getting any result in that the page simply displays in the browser with neither radio buttons checked. I’m sure I can’t have two input values with the same id but I don’t fully know how to approach this.
This is a snip of my code:
Code: Select all
$updateSQL = sprintf("UPDATE applicants SET FullAddress=%s",
GetSQLValueString($_POST['FullAddress'], "text"));
Do You Want Full Address Displayed<input type="radio" name="FullAddress" value="Include_Address" <?php if (!(strcmp($row_GetApplicantDetails['FullAddress'],""))) {echo "checked";} ?> >
Only Include County: <input type="radio" name="FullAddress" value="Dont_include_Address"<?php if (!(strcmp($row_GetApplicantDetails['FullAddress'],""))) {echo "checked";} ?> >Code: Select all
Do You Want Full Address Displayed:<input type="radio" name="FullAddress" value="Include_Address" checked >
Only Include County: <input type="radio" name="FullAddress" value="Dont_include_Address" >Brian