Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Is this possible?

  1. #11
    Join Date
    Mar 2007
    Location
    Tarboro, NC
    Posts
    290
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default

    I'm sorry, here I forgot the last ")

    Code:
    $id=$_POST['id'];
    
    if ($id=="1232343") {
    print("
    <html>
    <head>
    <script type=\"text/javascript\">
    setTimeOut(\"window.location='nextpage.html'\",1);
    </script>
    </head>
    <body>
    </body>
    </html>
    ");
    }
    
    else {
    print("
    <html>
    <head>
    <script type=\"text/javascript\">
    setTimeOut(\"window.location='javascript.go:history(-1)'\",5000);
    </script>
    </head>
    <body>
    ID wrong, please try again.
    </body>
    </html>
    ");
    }
    EDIT: please completely recopy the code, I made some coding errors and a full copy is needed. I can't seem to get the redirect working but maybe its just me. Anyways the PHP part works now.
    Last edited by TimFA; 01-21-2008 at 04:56 PM.

  2. #12
    Join Date
    Nov 2007
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I edited the script a little so it would work:
    PHP Code:
    <?php
    $id
    =$_POST['id'];

    if (
    $id=="1232343") {
    print(
    "
    <html>
    <head>
    </head>
    <body>
    <a href='register.cgi'>Go Foward</a>
    </body>
    </html>
    "
    );
    }

    else {
    print(
    "
    <html>
    <head>
    </head>
    <body>
    ID wrong, please try again.<br>
    <a href='javascript:history.go(-1)'>Go Back</a>
    </body>
    </html>
    "
    );
    }
    ?>

  3. #13
    Join Date
    Mar 2007
    Location
    Tarboro, NC
    Posts
    290
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default

    I don't use that function much, so excuse my JavaScript mistakes. Hope it works.

    Tim

  4. #14
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Scratch what I jist said nvrmnd.
    Last edited by Nile; 01-24-2008 at 12:39 AM. Reason: had to

Bookmarks

Posting Permissions

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