Jump to content

Recommended Posts

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>";

?>

Link to comment
https://forums.phpfreaks.com/topic/166418-solved-ansaw-program-help/
Share on other sites

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

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.