[PHP] Some questions about if and isset.

2005-01-31 Thread Geir Anders Berge
I'm sure that this code can be written more efficient, please tell me how, but that's not my problem. The problem is that when i run this script all lines are executed. I'm sure I'm doing something wrong, but can't find out just what. ?php if (isset($variable)) { if ($variable

RE: [PHP] Some questions about if and isset.

2005-01-31 Thread Jay Blanchard
[snip] ?php if (isset($variable)) { if ($variable $constant) { Execute this code if $variable is less than $constant } elseif ($variable $constant) { Execute this code if $variable is more than $constant } elseif ($variable

RE: [PHP] Some questions about if and isset.

2005-01-31 Thread Robinson, Matthew
stuff } else { other stuff } } else { even more stuff } M -Original Message- From: Geir Anders Berge [mailto:[EMAIL PROTECTED] Sent: 28 January 2005 19:05 To: php-general@lists.php.net Subject: [PHP] Some questions about if and isset

Re: [PHP] Some questions about if and isset.

2005-01-31 Thread Richard Lynch
Geir Anders Berge wrote: I'm sure that this code can be written more efficient, please tell me how, but that's not my problem. The problem is that when i run this script all lines are executed. I'm sure I'm doing something wrong, but can't find out just what. Okay, it's REALLY hard to see how

[PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Gareth Hastings
Could anyone tell me, is it possible to connect to a persistent socket after it has been opened by a different script? There is little documentation on this function. I did a quick search on google and lots of people say you can't, some say you can but its really hard and the rest go...pf what??

Re: [PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Chris Shiflett
--- Gareth Hastings [EMAIL PROTECTED] wrote: Could anyone tell me, is it possible to connect to a persistent socket after it has been opened by a different script? Sure. Think of it like a persistent database connection in Oracle, where the listener is on socket 1521 for everyone. The

RE: [PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Gareth Hastings
: Re: [PHP] Some questions regarding pfsocketopen() --- Gareth Hastings [EMAIL PROTECTED] wrote: Could anyone tell me, is it possible to connect to a persistent socket after it has been opened by a different script? Sure. Think of it like a persistent database connection in Oracle

RE: [PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Michael J. Pawlowsky
You will need to have everythng on the same page. Your program ends once the page does. Here are some examples straight from the manual. ?php $fp = fsockopen (www.example.com, 80, $errno, $errstr, 30); if (!$fp) { echo $errstr ($errno)br\n; } else { fputs ($fp, GET / HTTP/1.0\r\nHost:

RE: [PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Gareth Hastings
You will need to have everythng on the same page. Your program ends once the page does. pfsocketopen() is persistent and stays open even after your script has finished running until either the timeout period is reached or it gets disconnected/closedI think. I just don't know how to

RE: [PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Michael J. Pawlowsky
Cool... Maybe I will learn something.. :-) Well in that case (I already deleted you last mail), where are you keeping the file pointer? You will need to register the var somewhere.. In a session perhaps? Mike Send me your code... I will play with it... *** REPLY SEPARATOR

RE: [PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Michael J. Pawlowsky
Well I didnt try to write or read to it... But this works But all that's telling me is that the var is there.. not if it's still open.. will leave that to you to find out... Let us know --file s1.php --- ?php session_start(); $sid

RE: [PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Gareth Hastings
- From: Michael J. Pawlowsky [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 02, 2003 4:32 PM To: Gareth Hastings Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Some questions regarding pfsocketopen() Well I didnt try to write or read to it... But this works But all that's telling me

RE: [PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Michael J. Pawlowsky
Two comments from the manual that are interesting: php dot net at domainofdarkness dot com 29-Jan-2001 04:26 OK, WRT to the p* functions opening a new connection when one already exists. It is my understanting that (under Apache anyways) this is on a per-process basis. If you do a 'ps

RE: [PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Gareth Hastings
to google :) -Original Message- From: Michael J. Pawlowsky [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 02, 2003 5:10 PM To: Gareth Hastings; [EMAIL PROTECTED] Subject: RE: [PHP] Some questions regarding pfsocketopen() Two comments from the manual that are interesting

RE: [PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Michael J. Pawlowsky
Well if you do find the solution please let us know. I would also like to add it to my PHP lib archive. I suppose it would be there for stuff like command line PHP. Mike *** REPLY SEPARATOR *** On 02/01/2003 at 5:15 PM Gareth Hastings wrote: Yes I saw those but what it

Re: [PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Gerald Timothy Quimpo
On Friday 03 January 2003 06:15 am, Gareth Hastings wrote: Yes I saw those but what it made me think, what's the point of a persistent socket if you can't use it again? i think you could, after enough iterations and if the server allows, get to a point where each process has its own

[PHP] Some questions.

2002-08-12 Thread mintbaggio
Hello I'm a Chinese university student,I want to ask some questions about session. These days I'm build a website for my university with PHP, But I meet a question when I develop the part of User Management: After I have log out from a user page(I use session_unset() and

Re: [PHP] Some questions.

2002-08-12 Thread Daniel Massón
] == $registered_login $_GET[ses] == session_id()) // ok autenticated else // error: not autenticated From: mintbaggio [EMAIL PROTECTED] To: Subject: [PHP] Some questions. Date: Tue, 13 Aug 2002 01:42:55 +0800 Hello I'm a Chinese university student,I want to ask some questions about

Re: [PHP] Some questions.

2002-08-12 Thread Justin French
on 13/08/02 3:42 AM, mintbaggio ([EMAIL PROTECTED]) wrote: I'm a Chinese university student,I want to ask some questions about session. These days I'm build a website for my university with PHP, But I meet a question when I develop the part of User Management: After I have log out from a

Re: [PHP] Some questions.

2002-08-12 Thread Bob Irwin
this (haven't got around to installing it). Best Regards Bob Irwin Server Admin Web Programmer Planet Netcom - Original Message - From: Justin French [EMAIL PROTECTED] To: mintbaggio [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, August 13, 2002 12:21 PM Subject: Re: [PHP] Some

Re: [PHP] some questions on sessions (long)...

2001-11-21 Thread Christian Dechery
How about the sessions? doesn't sessions also needs to send header data (before any other output)? the sessions are registered normally.. At 17:07 12/11/01 -0800, Christopher William Wesley wrote: Your problem probably is including the miec.php from the .shtml document. Does the .shtml

Re: [PHP] some questions on sessions (long)...

2001-11-13 Thread Christian Dechery
But what about the session? It get's registered... doesn't sessions also need to send header information? it gets registered... it just doesn't persist... At 17:07 12/11/01 -0800, you wrote: Your problem probably is including the miec.php from the .shtml document. Does the .shtml document send

[PHP] some questions on sessions (long)...

2001-11-12 Thread Christian Dechery
I've recently had a problem with sessions, and came up with a problem that apparently has no solution... I want to understand why EXACTLY it does't work... From what I understand about sessions (reading PHP Docs), cookies are default and URLs holding the session_id are used if the cookies

Re: [PHP] some questions on sessions (long)...

2001-11-12 Thread Christopher William Wesley
Your problem probably is including the miec.php from the .shtml document. Does the .shtml document send any output to the browser before including your .php script? If so, you're not going to be able to send any cookies from the .php script. Once any standard output makes it to the browser

[PHP] Some questions on PHPUnit

2001-04-25 Thread Steven Haryanto
Does anyone here use PHPUnit? 1. If a test script needs some external input to do testing (notably, database connect info), is it a good idea to present an HTML form to ask input from user? Or should it also be able to prompt the user for these in case the test script is run by the PHP