Jump to content

Bman900

Members
  • Posts

    184
  • Joined

  • Last visited

    Never

Everything posted by Bman900

  1. Alright so would I have this on my form direct page: session(); $question = $_SESSION['question']; $firstname = $_SESSION['name_first']; instead of $question = $_POST['question']; $firstname = $_POST['name_first'];
  2. do i need to activate session() on my page1.php as well?
  3. I kind of get this, would I call this session in my page1.php to get the variable or is it done differently?
  4. Ok, so I have a a form that post the information in variables in a page called redirect.php (Includes a lot of HTML) than I have another page calles page1.php where I want to access the variables I have passed my information from my form to. I tried to use include() but I guess since my redirect.php is not completely php it doesn't work because it messes up my entire design on page1.php Any one?
  5. nvm I got it, am using echo "<meta http-equiv=\"refresh\" content=\"0;URL=page1.php\">";
  6. I see the problem now, i will probably need to redirect multiple times. This is how my code looks like now: <?php $question = $_POST['question']; $firstname = $_POST['name_first']; if (strstr($question, "house")) { Header("page1.php"); } elseif (strstr($question, "foreclosure")) { Header("page2.php"); } elseif (strstr($question, "bankruptcy")) { Header("page3.php"); } else { Header("default"); } ?> Is there another function that will redirect to a url in an if statement?
  7. Here is my code: <?php $question = $_POST['question']; $firstname = $_POST['name_first']; echo "you question is $question"; sleep(5); if (strstr($question, "house")) { Header("Location:page1.php"); } else { echo "$question"; } ?> I want echo "you question is $question"; to run for 5 seconds and than move on to my if statement. Well when I run this it just stops after the sleep and the if statement is not run. Any ideas?
  8. So you think it would be possible to do this in PHP at all because I never learned AJAX and am trying to solidify what I know in PHP right now.
  9. I am in the process of creating a website where you can ask a question an based on the words that were typed in the box I want them to be redirected to a specific page. I am a beginner at this but I need to get this project done and it would be a great learning experience. I haven't run into anything that would allow me to do this yet. I can use all the help I can get so please if you have anything say it. Example: What car should I buy? Script then would identify keywords like car and buy to redirect to a page like car.php that is on the server.
×
×
  • 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.