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.br /; echo $this-var2.br /; echo $this-var3.br /; } } 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
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,

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] 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? ? session_start(); ## get db connection Require_once('../conf/Systemconfig.inc.php'); ## Disable DOS Attacks if ($_SERVER['HTTP_USER_AGENT'] == || $_SERVER['HTTP_USER_AGENT'] == -) { die(); } //

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 . 'brbr'; } } 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 }

Re: [PHP] php and texfield values

2004-02-17 Thread Jarratt Ingram
Hello Angelo Have you tried, tdinput type=text name=company value=? echo $row['p_company'];?/td 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

[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: ? session_start(); include('PROC_Login.php'); login($username,$password); PROC_Login.php:

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] I have created