Re: [PHP] Guestbook

2008-01-13 Thread Børge Holen
On Sunday 13 January 2008 01:32:53 Andrés Robinet wrote: > Hi Guys, > > Anybody knows of a free and decent PHP Multilanguage guestbook (or at least > supporting German and English)? I don't care if it is db-driven or uses > flat files. > I know how to write one, but it's for a website we didn't dev

Re: [PHP] uh oh, I defined a resoruce

2008-01-13 Thread Jochem Maas
Sancar Saran schreef: Well, ADODB and TYPO3 are successfull oss procjecs which uses PHP and they utilizes globals at large. windows is a successful OS but most people would agree it's built on a foundation of cruft. success != built with good code != globals are good practice. Regards.

Re: [PHP] session_start problems with FireFox on Mac

2008-01-13 Thread Jochem Maas
Terry Calie schreef: ... To illustrate my php goes like this: index.php = index2.php ... to avoid this in future never add the closing php bracket to the end of the php file (unless you explicitly want to output something after the code in question - which is almost ne

[PHP] Problem with sessions.

2008-01-13 Thread Balasubramanyam A
Could someone help with this code? It is a search and delete program. I'm executing bunch of code within if-else statement. After searching the records in else block the code is redirecting to if block. I'm not able delete the records in else block. How do avoid the control move to if block? IIA

Re: [PHP] uh oh, I defined a resoruce

2008-01-13 Thread Naz Gassiep
While "global variables are good" in quotes did not return any results from Google, "global variables are evil" in quotes only returned a result set of 4: Results *1* - *4* of *4* for *" global

Re: [PHP] session_start problems with FireFox on Mac

2008-01-13 Thread Europus
Jochem Maas wrote: ?> ... to avoid this in future never add the closing php bracket to the end of the php file (unless you explicitly want to output something after the code in question - which is almost never the case), it is not required. e.g. - >8 info.php 8 info.p

Re: [PHP] uh oh, I defined a resoruce

2008-01-13 Thread David Giragosian
On 1/13/08, Naz Gassiep <[EMAIL PROTECTED]> wrote: > > > >> While "global variables are good" in quotes did not return any results > >> from Google, "global variables are evil" in quotes only returned a > result > >> set of 4: > >> > >> Results *1* - *4* of *4* for *" global< > http://www.google.co

Re: [PHP] Problem with sessions.

2008-01-13 Thread Jochem Maas
Balasubramanyam A schreef: Could someone help with this code? It is a search and delete program. I'm executing bunch of code within if-else statement. After searching the records in else block the code is redirecting to if block. I'm not able delete the records in else block. How do avoid the con

Re: [PHP] session_start problems with FireFox on Mac

2008-01-13 Thread Jochem Maas
Europus schreef: Jochem Maas wrote: ?> ... to avoid this in future never add the closing php bracket to the end of the php file (unless you explicitly want to output something after the code in question - which is almost never the case), it is not required. e.g. - >8 info.php ---

Re: [PHP] uh oh, I defined a resoruce

2008-01-13 Thread Nathan Nobbe
the 2 problems that globals introduce are 1. namespace collisions 2. point of origin problem where a namespace collision is the inconsistent use of a global variable within an application eg. // one point in the application $GLOBALS['curUser'] = array('username' => 'bob', 'userId' => 5);

Re: [PHP] session_start problems with FireFox on Mac

2008-01-13 Thread Europus
Jochem Maas wrote: you also mentioned you changed the code when trying to test it on another machine - don't do that, test one thing at a time. I'm not the original poster, that wasn't me. anyway problem solved, preventative knowledge aquired, onto the next hurdle :-) I'm having some trou

Re: [PHP] uh oh, I defined a resoruce

2008-01-13 Thread David Giragosian
On 1/13/08, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > > the 2 problems that globals introduce are > >1. namespace collisions >2. point of origin problem > > where a namespace collision is the inconsistent use of a global > variable within an application > eg. > // one point in the applicat

Re: [PHP] session_start problems with FireFox on Mac

2008-01-13 Thread Jochem Maas
Europus schreef: Jochem Maas wrote: you also mentioned you changed the code when trying to test it on another machine - don't do that, test one thing at a time. I'm not the original poster, that wasn't me. anyway problem solved, preventative knowledge aquired, onto the next hurdle :-) I'

Re: [PHP] uh oh, I defined a resoruce

2008-01-13 Thread Nathan Nobbe
On Jan 13, 2008 12:14 PM, David Giragosian <[EMAIL PROTECTED]> wrote: > In general, I agree with Stut's response delineated earlier in this > thread, > that a careful and circumscribed use of globals has a place in PHP > programming. agreed. -nathan

[PHP] var_dump() results

2008-01-13 Thread Europus
It's pretty much the same. With var_dump(), values from the first row of the table are iterated twice, the script is not looping through and reporting all 2100 rows. Grossly similar behavior was observed with print_r() and echo: while different data was reported by each, the loop wouldn't loop. Th

Re: [PHP] uh oh, I defined a resoruce

2008-01-13 Thread Sancar Saran
On Sunday 13 January 2008 16:53:42 Jochem Maas wrote: > Sancar Saran schreef: > > Well, > > > > ADODB and TYPO3 are successfull oss procjecs which uses PHP and they > > utilizes globals at large. > > windows is a successful OS but most people would agree it's built on a > foundation of cruft. > >

Re: [PHP] var_dump() results

2008-01-13 Thread T.Lensselink
Europus wrote: It's pretty much the same. With var_dump(), values from the first row of the table are iterated twice, the script is not looping through and reporting all 2100 rows. Grossly similar behavior was observed with print_r() and echo: while different data was reported by each, the loop w

Re: [PHP] var_dump() results

2008-01-13 Thread T.Lensselink
Europus wrote: T.Lensselink wrote: It doesn't loop through all rows because you use mysql_fetch_row. Wich does exactly what it's name tells you. It fetches one single row. Doh! Yes I'm brand new at PHP, though I've been doing HTML/CSS forever. That doesn't seem to mean much to a PHP/MySQL ins

Re: [PHP] var_dump() results

2008-01-13 Thread Jochem Maas
Europus schreef: It's pretty much the same. With var_dump(), values from the first row of the table are iterated twice, the script is not looping through and reporting all 2100 rows. Grossly similar behavior was observed with print_r() and echo: while different data was reported by each, the loop

Re: [PHP] var_dump() results

2008-01-13 Thread Europus
T.Lensselink wrote: Can you show some code? Apparently I sent replies to T.Lensselink only, here's the meat of the 2nd one: -- Actually, it doesn't exactly iterate the 1st row 4 times, it's a bit more convoluted. The table fas 4 columns (Fields): 1 - int, primary, auto-incrementer 2 - varch

Re: [PHP] var_dump() results

2008-01-13 Thread Steve Edberg
At 12:32 PM -0500 1/13/08, Europus wrote: It's pretty much the same. With var_dump(), values from the first row of the table are iterated twice, the script is not looping through and reporting all 2100 rows. Grossly similar behavior was observed with print_r() and echo: while different data was r

Re: [PHP] var_dump() results

2008-01-13 Thread T.Lensselink
Europus wrote: Actually, it doesn't exactly iterate the 1st row 4 times, it's a bit more convoluted. The table as 4 columns: 1 - int, primary, auto-incrementer 2 - varchar() values 3 - varchar() values 4 - varchar() values and 2100 rows. The return is 4 rows of this: array(4) { [0]=> stri

Re: [PHP] var_dump() results

2008-01-13 Thread Europus
Jochem Maas wrote: side note: where does $table come from? I didn't want to reveal the real names of my server/host, table, login or password to the list, so I tried setting $host, $login, $passwd, and $table variables at the top of the script. That way it's 4 lines to omit when posting code,

Re: [PHP] var_dump() results

2008-01-13 Thread Europus
Steve Edberg wrote: As far as displaying only the first row, that's because you're only fetching the first row; count($row) in your for loop will always evaluate to 0 (if there are no results) or 1. You need to move the mysql_fetch_row() call into your loop; something like $result = mysq

[PHP] DESC order results

2008-01-13 Thread Danny Brow
Just wondering if anyone could tell me how reliable the DESC order option is going to be when I am parsing thousands of records where they are multiple ChartNo's for the same clientNo. Or is there a better way to grab the most recent ChartNo. $link = mysql_connect('localhost', 'myuser', 'mypasswor

Re: [PHP] DESC order results

2008-01-13 Thread Jochem Maas
Danny Brow schreef: Just wondering if anyone could tell me how reliable the DESC order option is going to be when I am parsing thousands of records where they are multiple ChartNo's for the same clientNo. Or is there a better way to grab the most recent ChartNo. this is a mysql question not a p

Re: [PHP] DESC order results

2008-01-13 Thread Danny Brow
Thanks for the answer, didn't think of asking this in a MySQL forum, sorry. Dan On Sun, 2008-01-13 at 20:28 +0100, Jochem Maas wrote: > Danny Brow schreef: > > Just wondering if anyone could tell me how reliable the DESC order > > option is going to be when I am parsing thousands of records wher

Re: [PHP] DESC order results

2008-01-13 Thread Larry Garfield
This is a MySQL question, not a PHP question. That said, what you want is the LIMIT keyword. On Sunday 13 January 2008, Danny Brow wrote: > Just wondering if anyone could tell me how reliable the DESC order > option is going to be when I am parsing thousands of records where they > are multipl

Re: [PHP] uh oh, I defined a resoruce

2008-01-13 Thread Jochem Maas
Sancar Saran schreef: On Sunday 13 January 2008 16:53:42 Jochem Maas wrote: Sancar Saran schreef: Well, ADODB and TYPO3 are successfull oss procjecs which uses PHP and they utilizes globals at large. windows is a successful OS but most people would agree it's built on a foundation of cruft.

Re: [PHP] DESC order results

2008-01-13 Thread Silvio Porcellana
$query = 'SELECT * FROM eChart WHERE clientNo = "2" ORDER BY ChartNo DESC'; If you want just one record: $query = 'SELECT * FROM eChart WHERE clientNo = "2" ORDER BY ChartNo DESC LIMIT 0, 1'; BTW, you'd better ask the MySQL mlist: http://lists.mysql.com/ HTH, cheers Silvio -- PHP Genera

[PHP] anaylyze email

2008-01-13 Thread Yui Hiroaki
Thank you for your response. I try to write a code. I actualy want to do; 1) some body send email to me; for example; to [EMAIL PROTECTED] from [EMAIL PROTECTED] 2)read it's email 3)return to [EMAIL PROTECTED] so I can not do this 2) I try to read pop3. I can not find any example! Regards, Y

[PHP] Re: anaylyze email

2008-01-13 Thread Manuel Lemos
Hello, on 01/13/2008 07:46 PM Yui Hiroaki said the following: > Thank you for your response. > > I try to write a code. > > I actualy want to do; > > 1) some body send email to me; for example; to [EMAIL PROTECTED] from [EMAIL > PROTECTED] > 2)read it's email > 3)return to [EMAIL PROTECTED] >

RE: [PHP] Guestbook

2008-01-13 Thread Andrés Robinet
> -Original Message- > From: Børge Holen [mailto:[EMAIL PROTECTED] > Sent: Sunday, January 13, 2008 7:48 AM > To: php-general@lists.php.net > Subject: Re: [PHP] Guestbook > > On Sunday 13 January 2008 01:32:53 Andrés Robinet wrote: > > Hi Guys, > > > > Anybody knows of a free and decent PH

Re: [PHP] Guestbook

2008-01-13 Thread Børge Holen
On Monday 14 January 2008 00:07:30 Andrés Robinet wrote: > > -Original Message- > > From: Børge Holen [mailto:[EMAIL PROTECTED] > > Sent: Sunday, January 13, 2008 7:48 AM > > To: php-general@lists.php.net > > Subject: Re: [PHP] Guestbook > > > > On Sunday 13 January 2008 01:32:53 Andrés Rob

[PHP] $_GET and multiple spaces.

2008-01-13 Thread Churchill, Craig
Hello, One of the values I'm passing in a URL string contains multiple spaces. ... (The multiple spaces are between Argononemertes and australiensis) However when I retrieve the value using $_GET[DarScientificName] there is only a single space between the two names which I understand is the int

Re: [PHP] A good book for a perspective programer.

2008-01-13 Thread Sean-Michael
Very nice link kingzones, I did not come across this one yet! As I mentioned I was looking for some text books that I could keep on hand... I can print some from the link you provided. I was looking for a bit more feed back :( maybe this is all I need :) I do have the chm manual, I use it a lot!

[PHP] Re: A good book for a perspective programer.

2008-01-13 Thread David Powers
Sean-Michael wrote: What I want to ask is if anyone can recommend a good/best text book to learn from, I like to have a good book on hand! It's very difficult to recommend "the best" book to learn from (although I'm tempted to suggest my own). Different people learn in different ways. Also, p

[PHP] Re: $_GET and multiple spaces.

2008-01-13 Thread Al
Try "%20" for each space. Better yet, use underscores "_" Churchill, Craig wrote: Hello, One of the values I'm passing in a URL string contains multiple spaces. ... (The multiple spaces are between Argononemertes and australiensis) However when I retrieve the value using $_GET[DarScientificNa

Re: [PHP] uh oh, I defined a resoruce

2008-01-13 Thread Sancar Saran
On Sunday 13 January 2008 21:42:28 Jochem Maas wrote: > > no race conditions occur in code written in php? true that there is > no direct race conditions that can occur as a direct result of running code > but obviously you've never dealt with multi-user systems using a databse > backend, or file-w

Re: [PHP] var_dump() results

2008-01-13 Thread Chris
or you could do $result = mysql_query($sql); $count = mysql_num_rows($result); for ($i=0; $i<$count; $i++) { var_dump($row); ... } Not unless you have a $row = mysql_fetch_assoc($result); before doing the var_dump of $row because $row isn't being set :)

Re: [PHP] var_dump() results

2008-01-13 Thread Jim Lucas
Europus wrote: Jochem Maas wrote: side note: where does $table come from? I didn't want to reveal the real names of my server/host, table, login or password to the list, so I tried setting $host, $login, $passwd, and $table variables at the top of the script. That way it's 4 lines to omit whe