View Full Version : help

10-26-2004, 05:00 AM
i was wondering of anybody could help me make a multiplocation table page that when the answer is inputted it gives a correct or wong display

10-26-2004, 06:06 AM
How exactly did you want to set it up? You want a multiplication table like you had to deal with in elimentry school? Or just "what is 7 times 14" and if you put in 98 then your right, any thing else your wrong?

If you could elaborate a little, i could help.

10-26-2004, 06:47 AM
that would be great it is exactly what i mean. could you do thew one times tables for me which i could use to do the rest

10-26-2004, 01:38 PM
echo "<table>\n";
for($i = 1; $i <= 12; $i++) {
echo "<tr>\n";
for($j= 1; $j <= 12; $j++) {
echo ' <td>' . $i * $j . "</td>\n";
echo " </tr>\n";
echo "</table>\n";
Is a school times table.

To do the other one (multiplication questions)...

$first = rand(1, 12);
$second = rand(1, 12);
if(isset($_POST['mSubmit'])) {
if(($_POST['first'] * $_POST['second']) == $_POST['answer']) {
echo 'Well done, you are right!';
} else {
echo 'Oopsie, try again...';
$first = $_POST['first'];
$second = $_POST['second'];
<form action="<?=$_SERVER['php_self'];?>" method="post">
<input type="hidden" name="first" value="<?=$first;?>">
<input type="hidden" name="second" value="<?=$second;?>">
<?=$first;?> multiplied by <?=$second;?> is <input type="text" name="answer" size="3">
<input type="submit" name="mSubmit" value="Submit">

10-27-2004, 06:59 AM
thanks peoples you rule :)

10-27-2004, 02:55 PM
thanks peoples you rule :)
I know :p

11-02-2004, 02:16 AM
i need some more help.

i want some one to be able tom input their name and then echo 'welcome whoever' and then link to the multiplication page that was already created for me.
please help

11-07-2004, 03:05 AM
Hey, anyone know how to get a video or gif image playing when u get an answer correct?