Pass a value as hidden to PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>

<?php
$company = $_GET['customer'];
$mpad    = $_GET['rep'];
$rep     = ( $mpad / 9112001);
?>

<center>
<h1> Company History </h1>
<table width=600 border=0><tr><td>
<form name="tstest" method="post"
action="http:resultsHistory.php?h_date="timestamp;  target=_blank>
Enter Starting Date : 
</td><td height=100>
   <input type="Text" name="timestamp" value="">
   <a href="javascript:show_calendar('document.tstest.timestamp',
document.tstest.timestamp.value);"><img src="cal.gif" width="16" height="16"
border="0" alt="Click Here to Pick up the timestamp"></a>
<tr><td height=100>
   Enter Company:  
</td><td>
   <input type="Text" Name="rep" Value="<? echo $mpad ?>">
   <input type="Text" Name="company" Value="<? echo $company ?>">
<tr><td>
   &nbsp;  
</td><td align=right> 

<?php
echo "<input type='hidden' name='h_company' value='$company' />";
echo "<input type='hidden' name='h_mpad'    value='$mpad' />";
?>
   <input type="Submit" Name=Submit" Value="Get History">
</form>
</td></tr></table>
</center>
</body>
</html>

[/snip]




// Larry
252.291.1414 x223


-----Original Message-----
From: parasane@xxxxxxxxx [mailto:parasane@xxxxxxxxx] On Behalf Of Daniel P.
Brown
Sent: Friday, December 03, 2010 12:18 PM
To: Larry Sandwick
Cc: php-general@xxxxxxxxxxxxx
Subject: Re:  Pass a value as hidden to PHP

On Fri, Dec 3, 2010 at 12:12, Larry Sandwick <lgs@xxxxxxxxxxx> wrote:
> How do I get the document.tstest.timestamp.value from the JS and pass it
as
> a hidden value on the resultsHistory.php page ?
[snip!]

    There are tons of issues with that code, but not one bit of it has
to do with PHP.  You should ask on a newbie HTML list or a JavaScript
mailing list.


-- 
</Daniel P. Brown>
Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux