Re: [PHP] how to assign a value to a variable inside a class

2006-04-11 Thread Jarratt Ingram
If you are using PHP4, you could always class foo { var $var1; var $var2; var $var3; function bar(){ echo $this->var1.""; echo $this->var2.""; echo $this->var3.""; } } then in your code $foo = new foo(); $foo->var1 = 'blah'; $foo->var2 = 'blah'; $foo->var3 = 'blah'; $foo->bar();

[PHP] PDO, Persistent Connections

2006-03-28 Thread Jarratt Ingram
Hi, I have a little unusual question, we are currently looking into the new PDO extension with PHP5.1. We are currently use Mysql, InnoDB and transactions. What we would like to know if we use the PDO extension and persistent connections, can we start a Transaction on one page and then commit it

Re: [PHP] Environment Variable

2006-03-08 Thread Jarratt Ingram
Sorry i ment to add to my previous email, you will only be able to access the $_SERVER['APPLICATION_ROOT'] when using apache and not from Cron or Command line, for that i suppose you could add the following to the /etc/profile file APPLICATION_ROOT=/var/www/ and then to the export line EXPORT .

Re: [PHP] Environment Variable

2006-03-08 Thread Jarratt Ingram
Hello, If you are running on apache and have access to either the .conf file or .htaccess you can use the apache SetEnv directive eg. SetEnv APPLICATION_ROOT "/var/www/html/" and then from php use the $_SERVER['APPLICATION_ROOT'] to access the correct information HTH Jarratt On 3/7/06, st

Re: [PHP] IP & Geographical

2005-08-11 Thread Jarratt Ingram
Hello John http://www.ip-to-country.com/ provides a downloadable csv database that should help you along your way. HTH On 8/11/05, John Taylor-Johnston <[EMAIL PROTECTED]> wrote: > I have a field in my counter that collects IP addresses. Now the powers > that be want be to collect that data and

Re: [PHP] Login Script

2004-07-20 Thread Jarratt Ingram
Hey Brian, how about something like this, just change the session info to cookies if you want? hth On Mon, 2004-07-19 at 21:01, Brian Krausz wrote: > [snip] > a. do not reply off-list unless asked, your question may not receive the > attention it needs > [/snip] > Sorry, I got the email bef

Re: [PHP] Parse Error, Unexpected $

2004-07-19 Thread Jarratt Ingram
Hello, Try adding the closing brace } to the last else forEach($errors as $error) { echo $error . ''; } } else { echo "Hi...!"; <-- hth Jarratt On Mon, 2004-07-19 at 12:02, Harlequin wrote: > Jim > > I deleted a whole load of lines and still get the error. I've narrowed it

[PHP] OOP variables

2004-04-15 Thread Jarratt Ingram
Hello, I was wondering if somebody would mind explaining this to me, is there a big difference or requirement to pre defining variables your going to use in a class eg: class name { $var1 = ''; $var2 = ''; function blah(){ $var2 }

[PHP] Mail Headers

2004-03-08 Thread Jarratt Ingram
Hi Guys I am building a newsletter system, and i have never really learnt the correct way/format or exact content that should go into mail headers. Currently i use the following $MailHeaders .= "MIME-version: 1.0\r\n"; $MailHeaders .= "Content-Type: text/".$_Vars['Type']."; charset=us-ascii\r

Re: [PHP] php and texfield values

2004-02-17 Thread Jarratt Ingram
Hello Angelo Have you tried, You are missing in your example the closing " tag for the value parameter. regards Jarratt On Tue, 2004-02-17 at 12:52, Angelo Zanetti wrote: > Say I want to populate a textfield from a resultset and the resultset's > field has 2 words in it say: mike smith.

Re: [PHP] sessions not registering inside a function.

2004-01-23 Thread Jarratt Ingram
Thank you John, I did manage to get it working by calling global $AuthUser after i ran the function on the main page and it seems to have resolved the issue. have a good weekend J On Fri, 2004-01-23 at 16:38, John W. Holmes wrote: > From: "Jarratt Ingram" <[EMAIL PROTECTED

[PHP] sessions not registering inside a function.

2004-01-23 Thread Jarratt Ingram
Hello All, I have created a login system, which works as expected on php 4.2. When i was asked to move it onto an older server using 4.0.6, the system stopped registering sessions. main page: http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php