Jump to content

TOA

Members
  • Posts

    623
  • Joined

  • Last visited

Everything posted by TOA

  1. I would like to change my username please.. DevilsAdvocate --> TOA
  2. Echo $_SERVER['PHP_SELF'] (or $checkit) and see if it holds what you expect.
  3. It's where the db starts grabbing rows for that page. You can see on the next line how it's being used $sql = "SELECT id, number FROM numbers LIMIT $offset, $rowsperpage"; Hope that makes sense.
  4. I've done it like this in the past, using sessions, but there are alot of different ways. // In this case, $count is a remaining number out of a total number ex. 3 out of 10 so count would be 7 and Next button would be displayed if ($count > 0) { // then set a session var to match $_SESSION['submit'] = "next"; echo '<div><button type="submit" name="next">Next</button>'; } else { $_SESSION['submit'] = "done"; echo '<div><button type="submit" name="done">Done</button>'; echo "Thank you for completing survey!<br />Hit <i>Done</i> when finished!"; } // Then you can check if ($_SESSION[submit] == "next") { do something } else { do something else } Not exact, and not tested, but should get you going in the right direction. Hope that helps
  5. TOA

    PHP Update

    Thanks in advance Try taking out the escapes and see what that does
  6. Well, the header is the way to go. How you decide to test the condition I'm not sure. For ex. if (condition == failure) { header(); } else { display } Hope that helps
  7. I don't have my sql and there is no implementation for checking or anything in place. That's what I'm trying to do now. I was trying to prevent people that send a bad request (for example if the site changes and there are latent search engine links) from simply getting a completely blank white page. Is there an easy way to do this? @DevilsAdvocate - I read that but it doesn't really make clear to me what I have to put where to accomplish what I'm trying to do. Replace where it says "// redirect to 404" in the code Mchl posted with the header call
  8. php.net/manual/en/function.header.php So it would be header("location: .\php\not_found.php"); You can also do a timed redirect like this header("refresh:5; url='.\php\not_found.php'");
×
×
  • 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.