PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'm very new to php wicth i've only just read from books want to set a php feedback page for my website but have it sent to my out look express. however i want to add a day date and time to my feedback page in the e-mail so when the e-mail comes in it will show there user id time country and so would also like to add to radio buttons o my feedback page. can someone help us out done most of the work but don't no the coding for the rest of it
// build the option list (I normally place this near the top of the file
$radio_values=('Option1','Option2','$Option3','$Option4');
// Check if value exists in case form failed and reshowing the form (Validation of form values entered by user)
$radio_cur=(!empty($_POST['thisOption']) ? $_POST['thisOption'] : '');
// Step through the option list and output adding the 'checked' flag if necessary
foreach ($radio_values as $value) { // Step through the option list
echo("<input type=\"radio\" name=\"thisOption\" value=\"$value\"".($value==$radio_cur ? ' checked' : '')." />\n");
}
OK you could just output the HTML itself without a loop but if you are checking for existing information for radio or checkbox items when a form fails, you might find the code above useful.