View Full Version : Redirecting

12-18-2005, 09:52 PM
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...

<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 -->

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)

12-24-2005, 01:33 PM

12-24-2005, 03:41 PM
might be better served to do this in php using session vars.

$_SESSION['varName'] = $variable_you_wish_to_store;
$_SESSION['varName2'] = $variable_you_wish_to_store2;
$_SESSION['varName3'] = $variable_you_wish_to_store3

redirect to new page without sending url variables

at top of new page


read the session vars with $_SESSION['varName']

to kill the session you must start it then