Re: [PHP] How to find if a string is an integer?

2003-06-12 Thread Brent Baisley
Hmmm, didn't think about that. Here's something simple that seems to work in a couple of tests. if(strlen($testValue-0) == strlen($testValue)) { echo "Is a number"; } else { echo "Is not a number"; } Or, in one line: (strlen($testValue-0) == strlen($testValue) ? 1 : 0) Kind of a kludge, but it

[PHP] Url problem

2003-06-12 Thread Sparky Kopetzky
OK. I'm suffering from brain gas... I'm trying this, it doesn't work and I can't figure out why: include_once $SYSTEM_URL . "/classes/category.php"; where $SYSTEM_URL = "http://www.example.com"; is the url to the web site. and I get this error: Fatal error: Cannot instantiate non-existent c

Re: [PHP] Vmailmgr Functions

2003-06-12 Thread Jason Wong
On Friday 13 June 2003 04:43, Philip Olson wrote: > The manual over at phpbuilder is useless, and very old. Do > not use that manual, use php.net/manual Talking of manuals, what happened to the extremely useful index of functions that used to be in the appendix? -- Jason Wong -> Gremlins Asso

[PHP] POST detection

2003-06-12 Thread Johnny Martinez
Hi all, I have a self referring script that $_POST's two times at the beginning. The problem is that the first time the script comes up those two $_POST vars aren't being submitted and the webserver complains. If I could detect if the vars were passed and if not then skip that would be great. What

Re: [PHP] Url problem

2003-06-12 Thread Jason Wong
On Friday 13 June 2003 04:55, Sparky Kopetzky wrote: > I'm trying this, it doesn't work and I can't figure out why: > > include_once $SYSTEM_URL . "/classes/category.php"; where $SYSTEM_URL = > "http://www.example.com"; is the url to the web site. and I get this error: > > Fatal error: Cannot

Re: [PHP] POST detection

2003-06-12 Thread Jason Wong
On Friday 13 June 2003 05:08, Johnny Martinez wrote: > I have a self referring script that $_POST's two times at the beginning. > The problem is that the first time the script comes up those two $_POST > vars aren't being submitted and the webserver complains. > > If I could detect if the vars wer

Re: [PHP] POST detection

2003-06-12 Thread R'twick Niceorgaw
if ( isset($_POST['var_1']) and isset($_POST['var_2']) ) { your code } - Original Message - From: "Johnny Martinez" <[EMAIL PROTECTED]> To: "PHP General" <[EMAIL PROTECTED]> Sent: Thursday, June 12, 2003 5:08 PM Subject: [PHP] POST detection > Hi all, > I have a self referring script t

[PHP] make a variable not exist?

2003-06-12 Thread Amanda McComb
Is there a way to make a variable not exist? There are several places where I test (!$variable), and I want to be able to change the variable to pass that test, even though it exists, under certain circumstances. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] make a variable not exist?

2003-06-12 Thread Alex Earl
> > Is there a way to make a variable not exist? There are several places > where I test (!$variable), and I want to be able to change the > variable to pass that test, even though it exists, under certain > circumstances. > > Thanks. > You can unset the variable www.php.net/unset but also I wou

RE: [PHP] POST detection

2003-06-12 Thread Johnny Martinez
Woot! That worked! Thanks Jason and R'twick! Johnny -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 2:14 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] POST detection On Friday 13 June 2003 05:08, Johnny Martinez wrote: > I have a self referring

Re: [PHP] 4.3.2 -- does connection_status() actually work?

2003-06-12 Thread Jeff Harris
On Jun 12, 2003, "news" claimed that: |Shouldn't the following work - or rather why doesn't it : | | |ignore_user_abort(0); | |for( $i=100; $i; $i-- ) |{ |if ( connection_status() ) exit(0); |print " blurp."; flush(); |sleep(1

[PHP] $_SESSION as $key=>$value

2003-06-12 Thread Daniel J. Rychlik
Is this valid to iterate over a form variables.? foreach ($_SESSION as $key=>$value) and another question, do I need this in my form? Im really struggling with $_SESSION. Im trying to program smarter and make friendlier applications. Ive submitted several emails dealing with this func

Re: [PHP] 4.3.2 -- does connection_status() actually work?

2003-06-12 Thread Rasmus Lerdorf
On Thu, 12 Jun 2003, Per Jessen wrote: > Shouldn't the following work - or rather why doesn't it : > > > ignore_user_abort(0); > > for( $i=100; $i; $i-- ) > { > if ( connection_status() ) exit(0); > print " blurp."; flush(); >

Re: [PHP] make a variable not exist?

2003-06-12 Thread Leif K-Brooks
And won't generate a notice. Alex Earl wrote: You can unset the variable www.php.net/unset but also I would recommend using if(!isset($variable)) instead of just if(!$variable) its a little more clear as to what you are really trying to see I think. Alex -- The above message is encrypted with

[PHP] Re: Url problem

2003-06-12 Thread DvDmanDT
The file get's parsed server side I guess... You would need to name it .txt or something for that to work... :p "Sparky Kopetzky" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] OK. I'm suffering from brain gas... I'm trying this, it doesn't work and I can't figure out why: inc

[PHP] How do I capture a POST responce

2003-06-12 Thread Joaco
I am writing a module that will allow a customer to process a credit card refund thru a web interface that I am designing. The problem I am having is that once the information is posted to the gateway, it returns a url encoded string with the responce from the transaction. How can I capture that re

RE: [PHP] POST detection

2003-06-12 Thread Johnny Martinez
Will this work for $_GET as well? J -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 2:14 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] POST detection On Friday 13 June 2003 05:08, Johnny Martinez wrote: > I have a self referring script that $_P

[PHP] Zend Optimizer not active?

2003-06-12 Thread Steve Yates
Starting with a working site (FreeBSD 4.7, Apache 1.3.27) using PHP 4.3.0 and the latest Zend Optimizer, I upraded to PHP 4.3.2. Afterwards, phpinfo () did not show the Optimizer as loaded. Reinstalling Optimizer did not change this, nor did uninstalling and reinstalling Optimizer. There were

[PHP] mysql_fetch_array(): supplied argument is not a valid MySQL result resource

2003-06-12 Thread Ben Houlton
I'm trying to make a PHP script that automaticly makes a link on the side menu to the id page that was just made, under certain catagories. But I edited my code to cleen up soem errors and all of a sudden 3 errors came up, and I haven't been able to fix them! They are: Warning: mysql_fetch_array():

Re: [PHP] mysql_fetch_array(): supplied argument is not a validMySQL result resource

2003-06-12 Thread Philip Olson
It has to do with you assuming everything will work 100% of the time. It won't. mysql_query() returns false on failure, check for that. Read this recent thread: http://marc.theaimsgroup.com/?l=php-general&m=105517588819420 Also, this faq explains it: http://www.php.net/manual/en/faq.data

Re: [PHP] How do I capture a POST responce

2003-06-12 Thread Jake Johnson
Try using this $_POST['var_name'] Jake Johnson http://www.plutoid.com On Thu, 12 Jun 2003, Joaco wrote: > I am writing a module that will allow a customer to process a credit card > refund thru a web interface that I am designing. The problem I am having is > that once the information is p

[PHP] LDAP problems

2003-06-12 Thread Praveen Kumar
Dear Walker, After connecting to the LDAP using ldap_connect('localhost'); you should use ldap_bind like the code given below. Hope this should help. Regards Praveen ---SOFTPRO DISCLAIMER-- Information contained in this E-MAIL and any attachment

[PHP] Gettnig PHP code out of a DB?

2003-06-12 Thread Ben Houlton
Is there a way to get PHP script/code out of a DB? Becasue, when I enter PHP code into the textbox and hit submit, and go check the page it has nothing there with and just shows the code, e.g. include("menu.php"); without the tags, the code I'm using to import the DB text is below: } elsei

Re: [PHP] PHP Email....

2003-06-12 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > > Working kind of :) > > > > Get one line from it > > Kinda... I get it to return one line... > > The code: > > define('STDIN',fopen("php://stdin","r")); > $str = fgets(STDIN); > mail("[EMAIL PROTECTED]","Test","Test Test...\n\nOr

Re: [PHP] Gettnig PHP code out of a DB?

2003-06-12 Thread Leif K-Brooks
www.php.net/eval Ben Houlton wrote: Is there a way to get PHP script/code out of a DB? Becasue, when I enter PHP code into the textbox and hit submit, and go check the page it has nothing there with and just shows the code, e.g. include("menu.php"); without the tags, the code I'm using to impor

php-general Digest 13 Jun 2003 05:38:05 -0000 Issue 2114

2003-06-12 Thread php-general-digest-help
php-general Digest 13 Jun 2003 05:38:05 - Issue 2114 Topics (messages 151282 through 151330): Re: mail() function & exchange 151282 by: Diana 151283 by: Mark 151287 by: Diana Re: How to find if a string is an integer? 151284 by: Felipe Desiderati 1512

Re: [PHP] Gettnig PHP code out of a DB?

2003-06-12 Thread Ignatius Teo
- Original Message - From: "Ben Houlton" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, June 13, 2003 2:49 PM Subject: [PHP] Gettnig PHP code out of a DB? Er...you need to eval() it to get it to parse/run. > Is there a way to get PHP script/code out of a DB? Becasue, when I e

Re: [PHP] Gettnig PHP code out of a DB?

2003-06-12 Thread Ben Houlton
I use echo $msg; eval("\$msg = \"$msg\";"); echo $msg; and it comes up with include("menu.php"); on the live page "Leif K-Brooks" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > www.php.net/eval > > Ben Houlton wrote: > > >Is there a way to get PHP script

Re: [PHP] Gettnig PHP code out of a DB?

2003-06-12 Thread Leif K-Brooks
*sigh* Just do: eval($msg); Ben Houlton wrote: I use echo $msg; eval("\$msg = \"$msg\";"); echo $msg; and it comes up with include("menu.php"); on the live page "Leif K-Brooks" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] www.php.net/eval Ben Houlton wrot

RE: [PHP] How do I capture a POST responce

2003-06-12 Thread Ralph
You have to use socket connection. Take a look at: http://us4.php.net/fsockopen In the User Contributed Notes look for a post by info at agriya dot com 02-Feb-2003 12:38 there you will see a script that shows you how to do it. Hope this helps. -Original Message- From: Joaco [mailto:

RE: [PHP] $_SESSION as $key=>$value

2003-06-12 Thread Ralph
Daniel, Rather than sending them to a new page to validate the form and then sending them back if a field is invalid, do the error checking from the same script. Here's an example, a bit simple but just to give you an idea. For a better explanation, you should read this article which elaborates

<    1   2