Re: passing variables to php script

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

 



David Savage wrote:
OK...I admit I'm new at this....I have this html file:
<html>
<head>
<title>Generate pdf file of LD, Toll Free, and Directory Assistance calls</titl
</head>
<body>
<form action="Q:\ASTERISK\callrecs.php" method="post">
  <p>Account Number:<input type="text" name="acctnum"></p>
  <p>Year (4 digit):<input type="text" name="billyear"></p>
  <p>Month (2 digit):<input type="text" name="billmonth"></p>
  <p><input type="submit" /></p>
</form>
</body>
</html>

to which I would input an account number, 4 digit year, then 2 digit month.
Then click Submit.

What I see in the error log is:
[06-Jan-2012 11:42:21] PHP Notice:  Undefined index:  acctnum
[06-Jan-2012 11:42:21] PHP Notice:  Undefined index:  billyear
[06-Jan-2012 11:42:21] PHP Notice:  Undefined index:  billmonth

where line numbers point othe the following php lines:
$who=$_POST["acctnum"];
$year_to_process=$_POST["billyear"]; ;
$month_to_process= $_POST["billmonth"];


WHAT AM I DOING WRONG ?
David


I think the error indicates that there is no acctnum,etc. set in your POST array.. but your syntax looks O.K... so, assuming the php code is in callrecs.php, I'm guessing you either have a redirect in there, or are not hitting the callrecs.php with the form data.

I'd suggest to post your callrecs.php file.

Donovan




--
D Brooke

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