redarrow Posted July 18, 2009 Share Posted July 18, 2009 Hi there all advance thank you. i am working on a exam test program, for a company, This is what i came, up with currently, but i need help in making it more neater or better. example, Do it all the arrays way or another way any ideas please. <?php $quistion1="Please tell me what the general color of the sky!"; $form_and_ansaw=array("The color is red","The color is blue","The color is black","The color is yellow"); if($_POST['submit']){ $ansaw=$_POST['ansaw']; $go=$_POST['go']; if($ansaw=="{$form_and_ansaw[1]}"){ echo "CORRECT"; }else{ echo "INCORRECT";} } $_self=$_SERVER['PHP_SELF']; echo "<br>$quistion1<br>"; echo"<form method='POST' action='$_self'>"; foreach($form_and_ansaw as $go){ echo "<br>$go <input type='radio' name='ansaw' value='$go'><br>"; } echo "<br> <input type='submit' name='submit' value='Send'>"; echo"</form>"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/166418-solved-ansaw-program-help/ Share on other sites More sharing options...
MadTechie Posted July 18, 2009 Share Posted July 18, 2009 Okay this is a design question, for someone who's has over 7,500 posts you should know where to post things by now also for someone who i charge £50 per hour . this should be very simple and you should know how to build and use an array. [sOLVED] How to order a array Quote Link to comment https://forums.phpfreaks.com/topic/166418-solved-ansaw-program-help/#findComment-877607 Share on other sites More sharing options...
redarrow Posted July 18, 2009 Author Share Posted July 18, 2009 i gave php up mate i moved on sorry it all forgotten now. sorry but i make better money in the real world where you go out and work. i was only asking sorry to be so much trouble. because now i got a well paid job in the west end, with my fathers company other people that are known to my father own there company asked from time to time if i can help with a computer web related problem. don't worry ill put my eyes in,and have a think sorry everyone for asking. solved Quote Link to comment https://forums.phpfreaks.com/topic/166418-solved-ansaw-program-help/#findComment-877608 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.