#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Norcross, GA
    Posts
    458
    Rep Power
    15
    Is there a way to call another page if a condition is met?

    For example - in psuedocode:

    "if variable X equals "1234", goto thispage.html.

    otherwise, goto thatpage.html"

    TIA,
    mike
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    139
    Rep Power
    15
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    <head>
    <html>
    <title>Untitled Document</title>
    <?
    if ($variableX == "1234")
    echo "<meta http-equiv="refresh" content="5;URL=thispage.html">n";
    else
    echo "<meta http-equiv="refresh" content="5;URL=thatpage.html">n";
    ?>
    </head>
    [/code]

    Will redirect to thispage.html or thatpage.html in 5 seconds, or you could do this:

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    <?
    if ($variableX == "1234")
    Header("Location: thispage.html");
    else
    Header("Location: thatpage.html");
    ?>
    [/code]

    Which redirects immediately.

Similar Threads

  1. Replies: 11
    Last Post: February 21st, 2004, 06:48 AM
  2. Replies: 0
    Last Post: February 8th, 2004, 10:11 PM
  3. Replies: 5
    Last Post: January 23rd, 2004, 11:22 AM
  4. passing the url from HTML page to a php
    By lordorkus in forum PHP Development
    Replies: 10
    Last Post: January 20th, 2004, 05:36 PM
  5. Replies: 4
    Last Post: January 6th, 2004, 03:56 PM

IMN logo majestic logo threadwatch logo seochat tools logo