Page 1 of 1

adding php variables in hidden value

Posted: Mon Aug 13, 2007 2:03 am
by scout3014
Hi all

I need help on one matter here. I have a php file which takes values
from the form which calls the page and displays it for confirmation. I
try to display using this:

Code: Select all

From: <input name="start" type="hidden" value="<?php echo $startDate; ?>" >

The reason behind this is that after confirmation this page will have
a form action that calls another page to store the hidden variables
into the database, but the above line will not display the value
$startDate, does anyone know why?

Thanks

Posted: Mon Aug 13, 2007 2:19 am
by dream2rule
On the other page, retrieve the startDate value as

Code: Select all

$startDate = $_POST['start'];
echo $startDate;
Hope this solves your problem.

Posted: Mon Aug 13, 2007 2:20 am
by dude81
$startDate, does anyone know why?
Because the input type is hidden, do a view source on the browser, you might be able to find the date