Forum Moderators: coopster
<td width="5%">Sun<br> <?PHP echo "" . date ("n/j", mktime(0,0,0,$tmonth,$tday,$tyear));?></td>
I'm just getting started with this, so I'm sorry if this is too elementary.
Thanks for you help.
The
$_POST[] array contains elements resulting from a POST operation, like sending a form with method=post. i.e.
PAGE1.PHP
<form action="PAGE2.PHP" method=post> Name: <input name="user"> Pass: <input name="passwd"> </form> PAGE2.PHP
<? echo $_POST['user']; ?> When the form on PAGE1 is submitted, its values are presented to PAGE2 in the
$_POST[] array, which contains two items: $_POST['user'] and $_POST['passwd']. What's the problem with the script bit you posted? What are you expecting to see and what are you not seeing?
[edited by: jatar_k at 11:59 pm (utc) on April 6, 2005]
[edit reason] sry no personal urls thanks [/edit]
my wild guess is it sounds like you moved from an environment with register_globals ON to OFF
one thing that would start it working right away but that I do not suggest to leave in place is to use extract [php.net]
put this in the top of the pages that are being posted to
extract($_POST);
this will make them work for now while you get it sorted out.
My guess is that on the old server you had your PHP set up to
register globals, so you could simply refer to the form variables by name on the capture page, and use them to calculate $tmonth and the rest. Without
register globals turned on, you do need an alternate means of grabbing the form data. Without seeing your actual code, here's my guess:
On cal2.php, you currently use
$date_from_form $month_from_form and $year_from_form You would need to change this (as jatar_k suggests, or)
$_POST['date_from_form'] $_POST['month_from_form'] and $_POST['year_from_form'] in order to grab the POST variables without
register globals being turned on.