Re: Pass a value as hidden to PHP

From: Date: Mon, 06 Dec 2010 21:51:15 +0000
Subject: Re: Pass a value as hidden to PHP
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-309884@lists.php.net to get a copy of this message
At 1:23 PM -0500 12/3/10, Larry Sandwick wrote:
Wrong file sent the first time... this one has the right file How do I get the document.tstest.timestamp.value from the JS and pass it as a hidden value using a $var to the resultsHistory.php page ? See the code listed below, any help would be appreciated ! [snip] <html> <title> Get History </title> <head> <script language="JavaScript" src="ts_picker.js"> </script> </head> <body>
Off the top of my head (not tested, but close) HTML echo "<input type='hidden' name='timestamp' value='<script language="JavaScript" src="ts_picker.js"></script>' />"; PHP: <?php $timestamp = $_POST['timestamp']; ?> Cheers, tedd -- ------- http://sperling.com/

« previous php.general (#309884) next »