Jump to content

grissom

Members
  • Posts

    166
  • Joined

  • Last visited

Everything posted by grissom

  1. In your main mysql query where you are getting the records from the database, there doesn't appear to be any restriction against it getting all the records .. if you are looking for one specific record, your query should end something like " ..... WHERE id = '$_GET[id]'"
  2. Okayyyy... the error is line 26 which is $fname = $_POST['fname']; The error is telling you that the variable $_POST['fname'] does not exist by the time you get down to this line Your curly brackets around the if($_POST) { ...} section of code end before line 26, so perhaps you need the closing bracket around the whole section of code like this if ($_POST) { ... ALL your PHP in here, because otherwise it will get executed anyway regardless of POST data or not } If that doesn't work, try changing the line to if (!empty($_POST))
  3. The first car has a choice of 10 drivers The second car has a choice of 9 drivers (the first driver has been assigned) So the number of ways of filling the first two cars is 10 X 9 = 90 The number of ways of filling the first three cars is 10 X 9 X 8 possibilities = 720 .. and so on. You make yourself look a complete p**** with your above comment. I suggest you take some night classes in maths before you get cocky and post stupid insulting graphics
  4. If you have 10 cars and 10 drivers then there are 10! (ten factorial) ways of assigning each driver to a car, This is 3628800 different ways. Read all the drivers into an array called $drivers[] Then read all cars into an array called $cars[] Randomly shuffle the arrays by using the PHP shuffle command shuffle($drivers); shuffle($cars); Now put driver[0] with car[0], driver[1] with car[1] etc etc.
×
×
  • 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.