Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8

Thread: help

  1. #1
    New to the CF scene
    Join Date
    Oct 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    help

    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

  • #2
    Regular Coder
    Join Date
    Aug 2002
    Location
    Oregon, United States of America
    Posts
    882
    Thanks
    1
    Thanked 9 Times in 9 Posts
    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.
    If I'm postin here, I NEED YOUR HELP!!

  • #3
    New to the CF scene
    Join Date
    Oct 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #4
    Regular Coder trib4lmaniac's Avatar
    Join Date
    Feb 2004
    Location
    Cornwall, UK
    Posts
    535
    Thanks
    0
    Thanked 0 Times in 0 Posts
    PHP Code:
    echo "<table>\n";
    for(
    $i 1$i <= 12$i++) {
      echo 
    "<tr>\n";
      for(
    $j1$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)...
    PHP Code:
    <?
    $first 
    rand(112);
    $second rand(112);
    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">
    </form>
    Last edited by trib4lmaniac; 10-26-2004 at 02:01 PM.

  • #5
    New to the CF scene
    Join Date
    Oct 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    thanks peoples you rule

  • #6
    Regular Coder trib4lmaniac's Avatar
    Join Date
    Feb 2004
    Location
    Cornwall, UK
    Posts
    535
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by benf
    thanks peoples you rule
    I know

  • #7
    New to the CF scene
    Join Date
    Oct 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #8
    New to the CF scene
    Join Date
    Nov 2004
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey, anyone know how to get a video or gif image playing when u get an answer correct?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •