Re: [PHP] Dynamic function calls within the echo function, possible?

2004-07-19 Thread Sean Malloy
> class RowAlternator > { > private $on; > private $off; > private $state; > oops, I only half removed PHP5 only syntax. class RowAlternator { var $on; var $off; var $state; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Dynamic function calls within the echo function, possible?

2004-07-19 Thread Sean Malloy
I know this isn't solving your problem, but here is how I do it: class RowAlternator { private $on; private $off; private $state; function RowAlternator($on = "On", $off = "Off") { $this->on = $on; $this->off = $off; } function switchState() { $this->state = !$this->s

Re: [PHP] Error: unexpected T_ELSE on line 14...?

2004-07-18 Thread Sean Malloy
> 1. The obvious ";" at the end of the line. > 2. $_SESSION["Authorised"]="Yes" it's different to write: >$_SESSION["Authorised"]=="Yes" Gotta love c style languages where variable assignment is like variable comparison. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visi

Re: [PHP] Re: Templates Are Driving me Nuts

2004-07-17 Thread Sean Malloy
The template system I use is extremely simple. Template.php: Items = array(); $this->_document = $document; } function Render() { echo $this->ToString(); } function ToString() { $template = $this->Ite

[PHP] Re: PHP5 Windows not built with Soap Enabled?

2004-07-14 Thread Sean Malloy
> checking the output of phpinfo() for the 5.0.0 binary from www.php.net, it > would seem there is no soap support built in at all. > > Or have I just not woken up today? I win the "You're a Dumb Ass" award for the day. "The SOAP extension isn't activated by default (PHP5 RC1). Just add "extensio

[PHP] PHP5 Windows not built with Soap Enabled?

2004-07-14 Thread Sean Malloy
Am I the only one experiencing this: Fatal error: Class 'SoapClient' not found checking the output of phpinfo() for the 5.0.0 binary from www.php.net, it would seem there is no soap support built in at all. Or have I just not woken up today? -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] Screen Size detect??

2003-02-01 Thread Sean Malloy
e: > From: "Sean Malloy" <[EMAIL PROTECTED]> > Date: Sat Feb 1, 2003 6:48:26 AM Europe/London > To: "Dade Register" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> > Subject: RE: [PHP] Screen Size detect?? > > > Create index.htm; > > &

RE: [PHP] Screen Size detect??

2003-01-31 Thread Sean Malloy
Create index.htm; var width = screen.width; var height = screen.height; window.location = 'index.php?width=' + width + '&height=' + height; and in index.php $width = $_GET['width']; $height = $_GET['height']; etc etc -Original Message- From: Dade Register [mailto:[EMAIL PROTECTED]]

RE: [PHP] Bug?

2003-01-31 Thread Sean Malloy
sounds like you should turn error reporting on a blank page usually means PHP has encountered an error, but DisplayErrors is off in php.ini -Original Message- From: Todd Barr [mailto:[EMAIL PROTECTED]] Sent: Saturday, 1 February 2003 4:47 PM To: [EMAIL PROTECTED] Subject: [PHP] Bug? Hel

RE: [PHP] SELECT with WHILE NOT

2003-01-25 Thread Sean Malloy
SELECT * FROM rap WHERE rsponsor != '{$_SESSION['sid']}' ORDER by rsname,rfname,rcountry,rcity DESC LIMIT 20 SELECT * FROM rap WHERE rsponsor NOT IN ('{$_SESSION['sid']}') ORDER by rsname,rfname,rcountry,rcity DESC LIMIT 20 -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]]

RE: [PHP] converting a Recorset into an XML string

2003-01-25 Thread Sean Malloy
Personally, I would do it differently, but thats just me... However one modification I would suggest you make: The Line: $xml.="<".$nombre_campo.">".$valor_campo."\n"; would probably be better as this: $xml.="<".$nombre_campo.">".htmlspecialchars($valor_campo)."\n"; just incase there is an &

RE: [PHP] SQL+php

2003-01-18 Thread Sean Malloy
I apologise for calling you a PHP Professional, clearly I was mistaken. ;) -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Sunday, 19 January 2003 4:36 PM To: 'Sean Malloy'; [EMAIL PROTECTED] Subject: RE: [PHP] SQL+php It's _for_ PHP Professiona

RE: [PHP] SQL+php

2003-01-18 Thread Sean Malloy
If you want to do it within the query itself, take a look at the mysql replace command REPLACE(str,from_str,to_str) SELECT REPLACE(,,) FROM table or you can do it using PHP once the query has executed, on a record by record basis, within a while/for loop or whatever. -Original Message-

RE: [PHP] SQL+php

2003-01-18 Thread Sean Malloy
I see a lot of these type of answers on the list at the moment. I'm sick of receiving smart ass answers from people. It wastes my time, and my bandwidth. Either answer the fucking question, even if it hasn't been asked correctly, or don't reply at all. Given you are a 'PHP Professional' John, I

RE: [PHP] PHP Encoders and GPL License

2003-01-17 Thread Sean Malloy
> As far as I understand it, the GPL License states that the source > code of any product created from an open source solutions, or is > derived from the work of an open solutions, must be made availabe > to all users. no. Any modifications made to the PHP source code must be made available

RE: [PHP] Re: Php's future with Asp .NET?

2003-01-16 Thread Sean Malloy
I think that the developers of PHP know exactly where they want PHP to sit in the big bad world of .NET/J2EE. The whole reason the dotnet and java extensions have been written for PHP, is to allow PHP to talk to java/net objects, but more importantly, have PHP act as the front end, and .NET/J2EE d

RE: [PHP] MySQL Query - Not PHP Specific

2003-01-15 Thread Sean Malloy
IFNULL! thanks -Original Message- From: Daniel Kushner [mailto:[EMAIL PROTECTED]] Sent: Thursday, 16 January 2003 1:51 PM To: Sean Malloy; PHP General Subject: RE: [PHP] MySQL Query - Not PHP Specific http://www.mysql.com/documentation/mysql/bychapter/manual_Tutorial.html#Work

[PHP] MySQL Query - Not PHP Specific

2003-01-15 Thread Sean Malloy
I know this isn't a PHP question per se, but it does relate to PHP development. Every day I work with MySQL as my PHP database, I become more dissalusioned with its ability as a database server. Yes its fast, but its missing so many useful features of other DB servers. I'm digressing... Is there

RE: [PHP] increment numbers...

2003-01-13 Thread Sean Malloy
for ($i = 1; $i <= 100; $i++) { echo str_pad($i, 6, '0', STR_PAD_LEFT) . ''; } is that the sort of effect you want? -Original Message- From: Senani [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 14 January 2003 3:22 PM To: [EMAIL PROTECTED] Subject: [PHP] increment numbers... HI all,

RE: [PHP] stupid question (Back Function)

2003-01-13 Thread Sean Malloy
You could grab the referring page and send the user back to it, but some proxies/software stop your browser from sending that information, so it might not work in all situations Back however, quoting the docs on using the referrer: This is set by the user agent (client browser). Not all user age

RE: [PHP] Permission Denied

2003-01-12 Thread Sean Malloy
I'm assuming you are using IIS. If your harddrive is formatted using NTFS, you are going to have to add a new entry to the ACL list for the directory to let the IUSR_ account access the directory. There are plenty of readmes/articles on managing NTFS permissions. I don't have time to go into the

RE: [PHP] php5 cvs

2003-01-12 Thread Sean Malloy
No the documentaton you are talking about, was that prior to ZE2 people were using underscores to denote private functions/variables. With ZE2, they wouldn't have to. -Original Message- From: Dan Rossi [mailto:[EMAIL PROTECTED]] Sent: Sunday, 12 January 2003 11:23 PM To: [EMAIL PROTECTED]

RE: [PHP] php5 cvs

2003-01-12 Thread Sean Malloy
try private function() { } -Original Message- From: electroteque [mailto:[EMAIL PROTECTED]] Sent: Sunday, 12 January 2003 6:43 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] php5 cvs hmm has the public and private function accessor changed ? i have been building my classes with test() and

RE: [PHP] Re: Source Guardian

2003-01-10 Thread Sean Malloy
Keep in mind the "Works out of the box with no changes to your server" requires the use of the function dl() according to the PHP docs; dl() is not supported in multithreaded Web servers. Use the extensions statement in your php.ini when operating under such an environment. However, the CGI and

RE: [PHP] Suggestions on FAQ application?

2003-01-10 Thread Sean Malloy
I would suggest you try one of the following; faqomatic http://faqomatic.sourceforge.net/, which is actually perl based or phpFAQ http://product.cybergl.co.id/dev/version.php?cmd=browse&product_id=15 or FAQbot http://mason.gmu.edu/~bhroleno/FB.html or knowhow^2 http://www.linuxclass.de/kh2/ or

RE: [PHP] func_get_args...

2003-01-09 Thread Sean Malloy
well upon reading user comments in manual, looks like the only solution is to dump variables into an array, and pass the array to a function with a single defined by-ref parameter, so it kind of defeats the purpose. Oh well. -Original Message- From: Sean Malloy [mailto:[EMAIL PROTECTED

[PHP] func_get_args...

2003-01-09 Thread Sean Malloy
Is this possible; function TestRef() { $var =& func_get_arg(0); ++$var; } $b = 1; TestRef($b); echo $b; It doesn't seem to work. Is there a way to do it? Or am I wasting my time trying to do this? (Yes I am aware I could define TestRef(&$b)), but I can't, reason being; I'm trying to cr

[PHP] something annoying about includes/relative paths.

2003-01-09 Thread Sean Malloy
Moving to PHP from an ASP backgroun, I always found one thing really annoying about PHP. With ASP, you could have a file structure such as: SYSTEM |--HTML | |--header.asp | |--LOGIC | |--engine.asp | |--core.asp in default.asp, you would in core.asp, engine.asp would be included as such in

RE: [PHP] mysql_num_rows() error

2003-01-09 Thread Sean Malloy
Are you actually checking that the query result is valid? $conn = mysql_connect('localhost', "xxx", "yyy") or die('Could not connect to db'); $result = mysql_query('select * from blah', $conn); if ($result) { echo "Number of rows: " . mysql_num_rows($result); if (mysql_num_rows($result) > 0)

RE: [PHP] Stumped...

2003-01-08 Thread Sean Malloy
Please note the single quotes. Using double quotes: $variable = $_POST["$var"]; will not work, because you don't have a variable named $var in your code. Have a look at http://www.php.net/manual/en/language.types.string.php -Original Message----- From: Sean Malloy

RE: [PHP] Stumped...

2003-01-08 Thread Sean Malloy
Don't write code which requires register_globals to be on. $variable = $_POST['$var']; -Original Message- From: Stephen [mailto:[EMAIL PROTECTED]] Sent: Thursday, 9 January 2003 3:03 PM To: Timothy Hitchens (HiTCHO) Cc: PHP List Subject: Re: [PHP] Stumped... Ok, I decided another easie

RE: [PHP] PHP vs. ASP

2003-01-07 Thread Sean Malloy
oops function isset(byval checkVar) dim ret if (len(checkVar) > 0) then ret = true else ret = false end if isset = ret end function meh -Original Message- From: Sean Malloy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 8 January 2003 6:42 PM To: [EMAIL PROTECTED] Subj

RE: [PHP] PHP vs. ASP

2003-01-07 Thread Sean Malloy
I'm not really sure what you mean in terms of ASP needing two or more pages? <% dim pageAction pageAction = Request("action") select case pageAction case "postit": InsertFormData() case else : ShowForm() end select sub InsertFormData() end sub sub ShowForm() Response.Write("TheForm") end

RE: [PHP] HTTP_WEFERER

2003-01-07 Thread Sean Malloy
Elmer Fudd been coding your PHP for you? I dount it ever worked ;) -Original Message- From: bill [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 8 January 2003 12:41 PM To: [EMAIL PROTECTED] Subject: [PHP] HTTP_WEFERER A script started acting wonky with no changes to it. Doing a bit of deb

RE: [PHP] restrictions

2003-01-07 Thread Sean Malloy
SMTP = port 25 telnet 25 should do the trick -Original Message- From: Bruce Levick [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 8 January 2003 10:35 AM To: Timothy Hitchens (HiTCHO) Cc: [EMAIL PROTECTED] Subject: RE: [PHP] restrictions Thanks, Tried this and I get. "Cannot opeen conn

RE: [PHP] Random array element

2003-01-07 Thread Sean Malloy
// seed code list($usec, $sec) = explode(' ', microtime()); $microtime = ((float)$usec + (float)$sec); srand((double) $microtime * 100); //~ seed code $randNumber = array(); $weekday = array("monday","tuesday","wednesday","thursday","friday","saturday","sunday" ); for ($p = 0; $p < 10; $p++)

[PHP] Using VS.NET for PHP Projects - Revisit

2003-01-06 Thread Sean Malloy
seful apart from me. Regards, Sean -Original Message- From: Sean Malloy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 7 January 2003 1:34 PM To: PHP General Subject: [PHP] Using VS.NET for PHP Projects I know I can use Visual Studio to edit PHP files as plain text, but has anyone seen any w

[PHP] Using VS.NET for PHP Projects

2003-01-06 Thread Sean Malloy
I know I can use Visual Studio to edit PHP files as plain text, but has anyone seen any way of creating some sort of add-in, or macro or whatever, which would do syntax highlighting on PHP files? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.

[PHP] undocumented OOP feature/bug?

2003-01-05 Thread Sean Malloy
ying! I need a class to be called from within another clas, and it needs to know wether it has had an instance created, or wether it is being statically called, and now I'll have to write some kludge code instead... /// // Sean

RE: [PHP] makeing an array

2003-01-02 Thread Sean Malloy
see example 2. > -Original Message- > From: Timothy Hitchens (HiTCHO) [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, 1 January 2003 11:00 PM > To: Sean Malloy; [EMAIL PROTECTED] > Subject: Re: [PHP] makeing an array > > > Your example of: > > for ($i = 0; $i &

RE: [PHP] makeing an array

2003-01-01 Thread Sean Malloy
why the $x variable aswell?! for ($i = 0; $i < count($comment); $i++) { echo $comment[$i].''; } or even faster: $i = count($comment); while ($i--) { echo $comment[$i].''; } > -Original Message- > From: Timothy Hitchens (HiTCHO) [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, 1 Jan

RE: [PHP] Another problem with conditional statements

2002-12-19 Thread Sean Malloy
Nowhere in the documentation does it specify switch should be used in the context you are attempting. The docs show a single variable and checking the case of that variable. I'm not going to berate you on syntax. If you can get it working like that then good for you. However, I would strongly adv

RE: [PHP] Another problem with conditional statements

2002-12-19 Thread Sean Malloy
Its all wrong. You shouldn't be using a switch statement anyway. A switch is for evaluating a single variable. alss, your code if ($a && $b == 124) is the equivelent of writing if ($a == true && $b == 124). if ($a == $b) { // do struff } elseif ( ($a == 124) && ($b == 124) ) { //do stuff } elsei

RE: [PHP] creating random strings?

2002-12-19 Thread Sean Malloy
My comment would be on the readability and portability of the code Think of someone else coming along to look at that! ;) This is what I would do; create one function, GenerateString(int $length, int $type) function GenerateString($length = 6, $type = 1) { $string = ''; // seed rand funct

[PHP] Some discoveries I've made. Anyone care to confirm/deny

2002-12-19 Thread Sean Malloy
so my first post to the list for about 4 years! These things could have been discussed already so I apologise, just in case. Regards, Sean /// // Sean Malloy // Develope