RE: [PHP] Better way (if...elseif...else)

2001-03-29 Thread John Guynn

One thing I would do different is:

switch ($fcol){

case 000:

break;

case 050:

break;

default:

break;
}

To me the switch/case code is easier to read/maintain.

I know that doesn't actually solve your repetition problem but it will make
it a little easier to look at.

John Guynn

This email brought to you by RFCs 821 and 1225.


-Original Message-
From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]]


Is there a better way to write the following snippet:

if ($priority == "000") {
  $fcol="high";
  $pstr .= "option value=\"000\" selectedHigh\n";
  $pstr .= "option value=\"050\"Medium\n";
  $pstr .= "option value=\"100\"Low\n";
} elseif ($priority == "050") {
  $fcol="med";
  $pstr .= "option value=\"000\"High\n";
  $pstr .= "option value=\"050\" selectedMedium\n";
  $pstr .= "option value=\"100\"Low\n";
} else {
  $fcol="low";
  $pstr .= "option value=\"000\"High\n";
  $pstr .= "option value=\"050\"Medium\n";
  $pstr .= "option value=\"100\" selectedLow\n";
}

I just hate having to repeat pieces of code.  This piece here just
generates a drop down list of items, with the current one being the
selected one.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] OOP question regarding class extension

2001-03-19 Thread John Guynn

Can one class extend multiple classes?  I'm still playing with OOP
functionality and maybe my logic is reversed but I think I need one class to
extend many others.

John Guynn

This email brought to you by RFCs 821 and 1225.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Is it odd or even???

2001-03-05 Thread John Guynn

Color me confused because I though true was any non zero value and false was
zero.

I know I am using the following code:

if (!($num % 4){ do something}

and it does something when $num is evenly divisible by 4 (ie. $num % 4 = 0).

If I were testing for odd vs even I'd do the following:

if (!($num % 2) {
Odd
} else {
Even
}

John Guynn

This email brought to you by RFCs 821 and 1225.


-Original Message-
From: Boget, Chris [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 05, 2001 2:33 PM
To: 'Kenneth R Zink II'; Php (E-mail)
Subject: RE: [PHP] Is it odd or even???


 That won't work.  % returns the remainder from a division of 
 the number divided by the mod number.

Yours:

 if($num %2 == 0){
 echo "even";
 }else{
 echo "odd";
 }

Mine:

  if( $num % 2 ) {
echo "Odd";
 
  } else {
echo "Even";
 
  }

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Any performance penalties for switch vs. if/else?

2001-02-13 Thread John Guynn

If I have a complex if else statement and I replace it with a switch case
statement do I loose any performance?  I would think I would gain
performance and the code is definitely easier to maintain but I wanted some
other opinions.

John Guynn

This email brought to you by RFCs 821 and 1225.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Any image drawing tutorials anywhere?

2001-02-08 Thread John Guynn

I am rapidly coming to the conclusion that I need to be able to draw a
fairly simple image (.gif or .jpg doesn't matter) with PHP to get Netscape
to display it correctly.  Can anyone point me to a tutorial?

Thanks in advance,

John Guynn

This email brought to you by RFCs 821 and 1225.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] phpinfo ?

2001-01-26 Thread John Guynn

Actually what you need is ?php echo phpinfo(); ? otherwise you're never
going to get anything on the screen.

John Guynn

This email brought to you by RFCs 821 and 1225.


-Original Message-
From: Robert Collins [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 26, 2001 3:30 PM
To: kaab kaoutar; [EMAIL PROTECTED]
Subject: RE: [PHP] phpinfo ?


looks like you forgot the semi-colon (;) at the end of phpinfo();

Robert W. Collins
[snip]
- Original Message -
From: "kaab kaoutar" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, January 26, 2001 10:23 AM
Subject: [PHP] phpinfo ?


 Hi there!

 I'm sure it's a stupid problem but the phpinfo does work while trying the
 following html code:

 htmlheadtitlePHP Test/title/head
 body
 ?php phpinfo() ?

 /body/html

 the result is a blank page!
[snip]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] phpinfo ?

2001-01-26 Thread John Guynn

I've always used the echo and it does work under PHP4...just tested it on
www.teamkaos.org before I made my post.

John Guynn

This email brought to you by RFCs 821 and 1225.


-Original Message-
From: H. Wade Minter [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 26, 2001 4:47 PM
To: John Guynn
Cc: Php (E-mail)
Subject: RE: [PHP] phpinfo ?


That's incorrect, at least under PHP4.  I've got the following file that
does the phpinfo stuff perfectly:

 BEGIN FILE
?  phpinfo() ?
 END FILE

On Fri, 26 Jan 2001, John Guynn wrote:

 Actually what you need is ?php echo phpinfo(); ? otherwise you're never
 going to get anything on the screen.

 John Guynn
[snip]
 -Original Message-
 From: Robert Collins [mailto:[EMAIL PROTECTED]]
 Sent: Friday, January 26, 2001 3:30 PM
 To: kaab kaoutar; [EMAIL PROTECTED]
 Subject: RE: [PHP] phpinfo ?


 looks like you forgot the semi-colon (;) at the end of phpinfo();

 Robert W. Collins
 [snip]
 - Original Message -
 From: "kaab kaoutar" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, January 26, 2001 10:23 AM
 Subject: [PHP] phpinfo ?


  Hi there!
 
  I'm sure it's a stupid problem but the phpinfo does work while trying
the
  following html code:
 
  htmlheadtitlePHP Test/title/head
  body
  ?php phpinfo() ?
 
  /body/html
 
  the result is a blank page!
 [snip]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] below10host.com as webhost?

2001-01-22 Thread John Guynn

I have my domain hosted there and my wife has 2 domains there.  I
"webmaster" and develop for all 3 domains and below10host has been great.
The only time I've had less than 1 hour response times from their customer
service department was around the X-mas holidays.  I can only think of a
couple of outages in the year or so I've been with them and those outages
have been very short (an hour or less).

John Guynn

This email brought to you by RFCs 821 and 1225.


-Original Message-
From: Jeff Lacy [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 18, 2001 1:54 AM
To: [EMAIL PROTECTED]
Subject: [PHP] below10host.com as webhost?


Hello everyone,

I was wondering if anyone had thought/opinions on below10host.com as a web
host?  I though phpwebhosting.com would be good, but then I read that some
people really hated it, so I just wanted to check to make sure this would be
okay and nobody had really trouble with it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] how reliable is Windows2000 / php ?

2001-01-17 Thread John Guynn

I run W2K with Apache as my webserver, MySQL as a service, and PHP as a CGI
(I think...far from an expert in these matters) as a testing platform before
I upload my code to a live Linux Apache webserver.  The W2K box is my
workstation and runs MS Office, Eudora Pro, PhotoShop, and other "normal"
user apps and it's rock solid.  Can't really comment on performance because
I'm the only person hitting the "web site".

John Guynn

This email brought to you by RFCs 821 and 1225.


-Original Message-
From: Jamie Burns [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 17, 2001 2:52 PM
To: [EMAIL PROTECTED]
Subject: [PHP] how reliable is Windows2000 / php ?


hi..

i have a client who runs a windows 2000 IIS server. now they want me to
write them some server side code that must run under this system. i need to
know:

 - does PHP/MySQL perform reliably under windows 2000?

 - will PHP/MySQL be reasonably fast under windows 2000?

 - which is the best implementation method - mysql as NT service, php as IIS
module?

anyone have any real life experiences they could share?

thanks for  your thoughts. i really dont want to have to dig my ASP book
out.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] phpwebhosting.com

2001-01-17 Thread John Guynn

IF (notice the CAPITAL IF) they have fixed their system stability problems
AND their customer service (or lack thereof) they would be a great service.
At one time I was web master for two domains hosted by them
(performanceamstyle.com and felineguide.com...performanceamstyle.com is
still hosted there by the choice of the domain owner).

The service would go away for a few minutes occasionally which wasn't too
bad until one day it went away for over 24 hours!!!  No replies to email
requesting system status, I finally found a phone number to call them (it's
not on their site BTW), got an answering machine so I left a message
demanding a return phone call to my cell phone and NEVER got a return call.
After more than 24 hours the system came back up with no real explanation as
to what failed...I found out through a little investigating that some
changes I had made to felineguide.com just before the crash were gone and
replaced with old code.  In other words they had a SERIOUS server crash and
had to restore from backups, but they didn't bother to tell me that.

About 2 weeks after the disaster the owner of performanceamstyle.com got an
email from the new director of customer relations (or something like that).
Basically that person said the customer service department was going through
a major restructuring and any response time over 24 hours was unacceptable.
Since that time I don't think phpwebhosting.com has gone down so maybe they
have solved their problems.

The owner of felineguide.com asked that I move their site to
below10host.com.  I have never had a problem with below10host.com (I own
teamkaos.org and have it hosted there, felineguide.com is hosted there, and
I webmaster kaospetproducts.com there also).  Their customer service is
excellent, they always respond quickly to requests and in the rare even of a
server failure they tell you what happened if you ask.

John Guynn

This email brought to you by RFCs 821 and 1225.


-Original Message-
From: Matt "TrollBoy" Wiseman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 17, 2001 3:15 PM
To: PHP (E-mail)
Subject: [PHP] phpwebhosting.com


ANyone heard anything about these guys?  They seem like a godsend, but
anyone had any experience with them?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] phpwebhosting.com

2001-01-17 Thread John Guynn

From my experience with them they only have one host serving their
customers.

John Guynn

This email brought to you by RFCs 821 and 1225.


-Original Message-
From: Toby Butzon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 17, 2001 5:04 PM
To: Egan; [EMAIL PROTECTED]
Subject: Re: [PHP] phpwebhosting.com


 125 users at $10 per month, is a maximum revenue of $1,250 per month
 per server.  From that meager revenue, they are able to provide their
 customers with an OC-12.  I would like to meet the genius who is able
 to pull that financial rabbit out of a hat!

...and one machine is chewing up a whole OC-12?

Who says they don't have multiple machines on the same OC-12?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Performance question

2001-01-11 Thread John Guynn

Do I pay a performance penality for calling a file that only contains html
code .php or .php3?  In otherwords what is the php parser overhead if there
is no php code in the file?

John Guynn

This email brought to you by RFCs 821 and 1225.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP simulator

2001-01-10 Thread John Guynn

I just installed Apache, PHP, and MySQL onto my personal NT (ok Win2K)
machine for testing and development.  It was really simple...took less than
an hour total to get working.

John Guynn

This email brought to you by RFCs 821 and 1225.


-Original Message-
From: Todd Cary [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 10, 2001 4:15 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP simulator


Is there a PHP simulator for NT?  One that can be used for testing and
development?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]