Re: [PHP] Anyway to access a class variable without using a return function?

2004-03-15 Thread Tom Meinlschmidt
thank, sure. function name should be myClassGetVar() :) /tom On Mon, 15 Mar 2004 14:49:55 +0100 Marco Schuler <[EMAIL PROTECTED]> wrote: > Hi > > Am Mo, 2004-03-15 um 14.10 schrieb Tom Meinlschmidt: > > I mean using get_object_vars() is much better. > > > > a

Re: [PHP] catching URL#target params

2004-03-15 Thread Tom Meinlschmidt
is possible to catch it by javascript, but I have no clue how to use with normal hrefs (not forms) try alert(document.location); and you'll get entrire request with #target part too. /tom -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsu

Re: [PHP] catching URL#target params

2004-03-15 Thread Tom Meinlschmidt
n, 15 Mar 2004 15:00:04 +0100 Tom Meinlschmidt <[EMAIL PROTECTED]> wrote: > Hi, > > it could be done only by parsing $_SERVER['QUERY_STRING'] variable ... > > eg > > $querystring = $_SERVER['QUERY_STRING']; > eregi("#([a-z0-9_.-]*)", $qu

Re: [PHP] catching URL#target params

2004-03-15 Thread Tom Meinlschmidt
Hi, it could be done only by parsing $_SERVER['QUERY_STRING'] variable ... eg $querystring = $_SERVER['QUERY_STRING']; eregi("#([a-z0-9_.-]*)", $querystring, $arg); $hashtarget = $arg[1]; /tom On Mon, 15 Mar 2004 08:52:43 -0500 David T-G <[EMAIL PROTECTED]> wrote: > Hi, all -- > > I know th

Re: [PHP] Anyway to access a class variable without using a return function?

2004-03-15 Thread Tom Meinlschmidt
I mean using get_object_vars() is much better. and in the example I've seen there: you HAVE TO define all the variables you're using in a class scope. eg class myClass { var $var1; var $var2 = array(); function myClass($var) { $vars =get_object_vars($this); if (isset($vars[$var])) re

Re: [PHP] use of @ operator to suppress errors

2004-03-15 Thread Tom Meinlschmidt
Yes, it's normal. You've to check if is that variable set if (isset($_GET['this'])) and than you didn't get any NOTICE about that undefined variable. condition "if ($_GET['this'])" is not sufficient to check whether is variable set or not. /tom On Mon, 15 Mar 2004 11:43:24 - "Ben Joyce"

Re: [PHP] load a URL and trap output

2004-03-12 Thread Tom Meinlschmidt
simple use fopen() or file() as $fp = fopen("http://somedomain/some.url?blablah","r";); and read via fread() /tom On Fri, 12 Mar 2004 10:54:53 -0500 Roger Spears <[EMAIL PROTECTED]> wrote: > Hello, > > I have this application which is accessed via a web portal. The first > thing my applica

Re: [PHP] Get "nice" variables from POST

2004-03-12 Thread Tom Meinlschmidt
if (is_array($_POST)) { foreach($_POST as $name=>$value) { ${$name} = $value; } } /tom On Fri, 12 Mar 2004 15:59:00 +0100 (CET) Hans Juergen von Lengerke <[EMAIL PROTECTED]> wrote: > I know this isn't what you want, but nevertheless, this > "does not look ugly": > > > > # Get varia

Re: [PHP] RE: R: [PHP] Get "nice" variables from POST

2004-03-12 Thread Tom Meinlschmidt
oops. It's much better to use single quotes and entire variable in {} eg .. where user_id = '{$_POST['user_id']}' ... realize - POST variable user_id has no value, so in your code it will be as "select * from users where user_id ="; as a result - you have wrong sql query. /tom On Fri, 12 Mar

Re: [PHP] getting message from file

2004-03-09 Thread tom meinlschmidt
see php.net/file or php.net/fread $file = "somefile.dat"; if ([EMAIL PROTECTED]($file)) return 0; $filecontent = file($file); $numbers = array(); if (is_array($filecontent) && count($filecontent)) { foreach($filecontent as $line) { // delete more than one space

Re: [PHP] mail() and passwords

2004-03-09 Thread tom meinlschmidt
I mean the only way is to use existing classes for sending emails via smtp socket or to write your own one. tom On Tue, 9 Mar 2004 03:37:33 -0500 "Will" <[EMAIL PROTECTED]> wrote: > How do I modify the following to except a password for the SMTP server? > > [mail function] > SMTP = localho