RE: RE: RE: [PHP] passing variables to php script

2012-01-13 Thread David Savage
thanks for your assistance.



From: Tim Streater [mailto:t...@clothears.org.uk]
Sent: Fri 1/13/2012 9:37 AM
To: David Savage
Cc: PHP General List
Subject: Re: RE: RE: [PHP] passing variables to php script



On 13 Jan 2012 at 15:05, David Savage dsav...@cytelcom.com wrote:

 I open the html file up from a windows explorer window (Q:\asterisk\), and so
 IE opens it up, but the problem lies in the fact that I cannot find apache
 service running in the background...haven't figured out why yet.  The test
 configuration start menu option (under configure apache server) just
 displays a console window for a brief moment, then immediately disappears.
 The icon I see near my time says Running none of 1 Apache servicesSo I
 have to get that straightened out first...I believe that's been my problem all
 along.

Well, that's going to be part of it, but it's never going to work if you open 
it via Explorer. If you do that, apache won't be involved whether it's running 
or not. This will only work if you have IE (or other browser) open and put 
http://localhost/your-webpage.html into the browser's address bar. Further, 
both the webpage and PHP file need to be in your document-root. Look in your 
apache config file for that).

--
Cheers  --  Tim




RE: [PHP] passing variables to php script

2012-01-12 Thread David Savage
Installed apache onto a win2K server, and have the html file  php file in the 
same folder (Q:\ASTERISK\) on the Q: drive (which is just another drive in this 
same server).  I opened the html file using IE 6.0.   What I'm thinking is 
there may be an issue with some setting on the web server.  The php statements 
I posted were the first few statements in the script, so apparently the script 
didn't see the variables, so I'll have to review the httpd.conf and php.ini 
files to find whatever settings is preventing the acctnum, year, and month from 
being passed to the php script.  
 
Thanks to all of you who posted comments for this problem !  I believe it will 
eventually come together.
David
 


From: Ellis Antaya [mailto:ellis.ant...@gmail.com]
Sent: Tue 1/10/2012 4:46 PM
To: Marco Behnke
Cc: php-general@lists.php.net
Subject: Re: [PHP] passing variables to php script



it can't work as long as long as there is Q:\ ins his form action
+1

David, which web server are you running (apache, iis, ...)?
What is your document_root?
And last question, where are your html file and your php file(the full file 
path)?


---
Ellis
(Sent from my iPod)

On 2012-01-10, at 16:25, Marco Behnke ma...@behnke.biz wrote:

 Am 10.01.12 21:57, schrieb Ashley Sheridan:


 o simply callrecs.php and see if that works.
  Q: would be referencing a filesystem path, rather a web address 
  interpreted by a  PHP processor. Make sure your .php target is within a 
  PHP supported web space.
 If a default application is set within windows for php, the script
 submitting to Q will be executed.



 But wouldn't Windows attempt to execute the PHP script as if it were a CLI 
 script, not as if it were within a web server context? That would make 
 posting a form pretty pointless.
 Indeed. But isn't that the point? We are trying to figure out why his posting 
 the form does not work. I say, it can't work as long as long as there is Q:\ 
 ins his form action, no way it will do, because you leave your webserver 
 context anyways.

 He must change it to a valid web url.

 --
 Marco Behnke
 Dipl. Informatiker (FH), SAE Audio Engineer Diploma
 Zend Certified Engineer PHP 5.3

 Tel.: 0174 / 9722336
 e-Mail: ma...@behnke.biz

 Softwaretechnik Behnke
 Heinrich-Heine-Str. 7D
 21218 Seevetal

 http://www.behnke.biz http://www.behnke.biz/ 




[PHP] passing variables to php script

2012-01-06 Thread David Savage
OK...I admit I'm new at thisI have this html file:
html
head
titleGenerate pdf file of LD, Toll Free, and Directory Assistance calls/titl
/head
body
form action=Q:\ASTERISK\callrecs.php method=post
 pAccount Number: input type=text name=acctnum /p
 pYear (4 digit): input type=text name=billyear /p
 pMonth (2 digit): input type=text name=billmonth /p
 pinput 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] RE: php-general Digest 9 Dec 2011 20:09:28 -0000 Issue 7604

2011-12-12 Thread David Savage
I thought I posted this in the php.net web site under the ksort user notes, 
but I don't know if it would be approved to be placed in the web site.  
 
Would ksort($sortarr,SORT_STRING) on a 1 dimensional array with a key 
comprised of 
a person's name,
-, and 
 time stamp
I..E. (key:  david savage-2011-12-12 14:43:00)
actually delete duplicate keys from the array, if there were two keys the same ?
Did not see anything regarding this in the user notes of ksort page in php.net
David


From: php-general-digest-h...@lists.php.net 
[mailto:php-general-digest-h...@lists.php.net]
Sent: Fri 12/9/2011 2:09 PM
To: php-general@lists.php.net
Subject: php-general Digest 9 Dec 2011 20:09:28 - Issue 7604




php-general Digest 9 Dec 2011 20:09:28 - Issue 7604

Topics (messages 315962 through 315967):

Re: Think I found a PHP bug
315962 by: Lester Caine

Question about performance between for iteration and extension function
315963 by: Lin Yo-An
315966 by: Matijn Woudt

Re: End of session clean-up
315964 by: Andre Majorel

offline practice
315965 by: saeed ahmed

PHP, PDO and MS-SQL ?
315967 by: Andreas

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-general@lists.php.net


--




[PHP] FW: parse error

2011-10-13 Thread David Savage
please read the following chain of emails...I'm at my wits end.



From: David Savage
Sent: Thu 10/13/2011 11:09 AM
To: php-general-digest-ow...@lists.php.net
Subject: FW: parse error


How can I find the answer to the following php issue?  I am not sure how to 
post a question to the general digest from php.net.  The email address who I 
initially sent this email to, is not valid, and I cannot find any details on 
what the following PHP Parse error:  parse error refers to, in the context of 
the line that the error points to.



From: David Savage
Sent: Thu 10/13/2011 9:56 AM
To: ha-ph...@koontz.org
Subject: parse error


I'm sorryI need help with php v. 4.3.9 (cgi).  I don't know where else to 
turn.  I've looked on the php.net web site for details on this particular 
error, but am unable to find any.
 
this is the version I use.
php -v
PHP 4.3.9 (cgi) (built: Jun 26 2006 09:46:03)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
 
I run the following command, and getting the following compile error on a linux 
environment:
php -l voip_cdrs.php
PHP Parse error:  parse error, unexpected T_STRING in 
/usr/local/cytrex/voip_cdrs.php on line 1050
Errors parsing voip_cdrs.php
 
here is a portion of the code that includes the line number mentioned:
 if   ($destlen==11) {
$start_from_which_offset=1;
 }
 if   ($destlen==10) {
$start_from_which_offset=0;
 }
 $termnum10=substr($dest, $start_from_which_offset,10);
 $alias_sql_stmt=SELECT ani FROM ldrates WHERE 
ani='$termnum10';// -this is line 1050
 print $alias_sql_stmt\n;
 $alias_result = $db-sql_query($alias_sql_stmt);
 if  ($alias_result==TRUE) {
if($db-sql_numrows($alias_result)  0) {
print Found alias...\n;
continue;
}
 } else {
die(problem with sql: $alias_sql_stmt);
 }

Could you please tell me what's wrong with the line 1050 ?   I've been pulling 
my hair out (figuratively speaking) trying to understand why the compiler sees 
this line as a problem.  Thanks for whatever help you can give.