Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Redirecting

  1. #1
    Regular Coder
    Join Date
    Oct 2005
    Location
    Surrey, England
    Posts
    286
    Thanks
    2
    Thanked 2 Times in 2 Posts

    Redirecting

    im using the javascript date function to obtain the date and time on a document. i only face one problem...

    after i complete a form i send the details to another page...

    sign.php >>---DETAILS-FROM-FORM--->> timestamp.php


    when the details are in the page timestamp.php i attempt to send the details across to another page with the added javascript date in a javascript redirect function...

    Code:
      <SCRIPT LANGUAGE="JavaScript" target="_self">
       <!-- Begin
       redirTime = "0";
       redirURL = "update.php?date="+Date()+"&entry='.$entry.'&name='.$name.'";?>;
       function redirTimer() { self.setTimeout("self.location.href = redirURL;",redirTime); }
       //  End -->
      </script>

    timestamp.php >>---DETAILS-FROM-TIMESTAMP.PHP--->> update.php

    in update.php i retrieve all these variables and stick em all in a database...

    the problem i have is that when you do as i have done you get a restriction on the ammount of charachters that you have in the url bar. is there an easier way of doing all this??

    (i only use timestamp.php so that i get an accurate date)

  • #2
    Regular Coder
    Join Date
    Oct 2005
    Location
    Surrey, England
    Posts
    286
    Thanks
    2
    Thanked 2 Times in 2 Posts
    *bump

  • #3
    Senior Coder
    Join Date
    Apr 2005
    Posts
    1,051
    Thanks
    0
    Thanked 0 Times in 0 Posts
    might be better served to do this in php using session vars.

    Code:
    <?
    session_start();
    $_SESSION['varName'] = $variable_you_wish_to_store;
    $_SESSION['varName2'] = $variable_you_wish_to_store2;
    $_SESSION['varName3'] = $variable_you_wish_to_store3
    session_write_close();
    ?>
    redirect to new page without sending url variables

    at top of new page
    Code:
    <?
    session_start()
    ?>
    read the session vars with $_SESSION['varName']

    to kill the session you must start it then
    Code:
    session_unset();
    session_destroy();
    public string ConjunctionJunction(string words, string phrases, string clauses)
    {
    return (String)(words + phrases + clauses);
    }
    <--- Was I Helpfull? Let me know ---<


  •  

    Posting Permissions

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