Re: passing variables to php script

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

 



On Fri, 2012-01-06 at 11:53 -0600, 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
>  


PHP must be run on a server, it looks like you're attempting to run it
on your local drive without one. Try installing either Xampp or EasyPHP,
which will install the Apache server with PHP for you, and then you can
run your scripts over http://localhost or http://127.0.0.1 
-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk



[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