[PHP] Re: Form handling

2009-06-11 Thread Manuel Lemos
Hello, on 06/10/2009 03:10 PM Eddie Drapkin said the following: I've been charged with writing a class that handles forms, once they've been POSTed to. The idea of the class is to handle the most common use-cases of POST forms, and any special functionality can be handled with a child class

[PHP] dynamic navigation menu

2009-06-11 Thread web
Please can some one help me with a dynamic menu. I have a 2 tables and I want to display the record from the first one as parent and the second one as the child. My problem is when I query the data I can't place the child at their appropriate position. Please you help will be appreciated.

Re: [PHP] dynamic navigation menu

2009-06-11 Thread Ashley Sheridan
On Thu, 2009-06-11 at 09:51 +0200, web wrote: Please can some one help me with a dynamic menu. I have a 2 tables and I want to display the record from the first one as parent and the second one as the child. My problem is when I query the data I can't place the child at their appropriate

Re: [PHP] dynamic navigation menu

2009-06-11 Thread viraj
On Thu, Jun 11, 2009 at 1:21 PM, web d...@italghanaweb.com wrote: Please can some one help me with a dynamic menu. you can accomplish this easily. read about 'recursive functions' I have a 2 tables and I want to display the record from the first one as parent  and the second one as the

[PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-11 Thread Jean-Pierre Arneodo
Hi! I'm stuck. I don't understand why the php CLI dies after 3 hours in my script. Any idea to solve? Thanks PHP 5.2.9-0.dotdeb.2 with Suhosin-Patch 0.9.7 (cli) (built: Apr 7 2009 20:06:36) Linux ubuntu 2.6.24-19-server #1 SMP Wed Jun 18 14:44:47 UTC 2008 x86_64 GNU/Linux Conf [php.ini]

Re: [PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-11 Thread Ashley Sheridan
On Thu, 2009-06-11 at 10:47 +, Jean-Pierre Arneodo wrote: Hi! I'm stuck. I don't understand why the php CLI dies after 3 hours in my script. Any idea to solve? Thanks PHP 5.2.9-0.dotdeb.2 with Suhosin-Patch 0.9.7 (cli) (built: Apr 7 2009 20:06:36) Linux ubuntu 2.6.24-19-server

RE: [PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-11 Thread Ford, Mike
On 11 June 2009 12:00, Ashley Sheridan advised: On Thu, 2009-06-11 at 10:47 +, Jean-Pierre Arneodo wrote: Hi! I'm stuck. I don't understand why the php CLI dies after 3 hours in my script. Any idea to solve? Thanks PHP 5.2.9-0.dotdeb.2 with Suhosin-Patch 0.9.7 (cli) (built: Apr 7

Re: [PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-11 Thread Eddie Drapkin
try set_time_limit(0) ? On Thu, Jun 11, 2009 at 8:05 AM, Ford, Mike m.f...@leedsmet.ac.uk wrote: On 11 June 2009 12:00, Ashley Sheridan advised: On Thu, 2009-06-11 at 10:47 +, Jean-Pierre Arneodo wrote: Hi! I'm stuck. I don't understand why the php CLI dies after 3 hours in my

Re: [PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-11 Thread Robert Cummings
Ford, Mike wrote: On 11 June 2009 12:00, Ashley Sheridan advised: On Thu, 2009-06-11 at 10:47 +, Jean-Pierre Arneodo wrote: Hi! I'm stuck. I don't understand why the php CLI dies after 3 hours in my script. Any idea to solve? Thanks PHP 5.2.9-0.dotdeb.2 with Suhosin-Patch 0.9.7 (cli)

RE: [PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-11 Thread kyle.smith
One of two things is happening: - PHP is crashing, maybe a memory leak, etc. Or - That while(true) loop is exiting, and the script is completing. Would be interesting to know which, try adding this after the loop: $fp = fopen('/tmp/test','w'); fputs($fp, 'My script left the loop and exited

Re: [PHP] Preventing XSS Attacks

2009-06-11 Thread tedd
At 7:08 PM +0100 6/10/09, Ashley Sheridan wrote: So something like this would be acceptable?: $searchTerms = (isset($_REQUEST['q']))?$_REQUEST['q']:''; $searchTerms = htmlentities($searchTerms); $dbSearchTerms = mysql_real_escape_string($searchTerms); Giving me two variables, one for display

[PHP] order by what?

2009-06-11 Thread PJ
How can order by be forced to order alphabetically and ignore accents without stripping the accents for printout? This is a problem for both caps normal letters. -- Hervé Kempf: Pour sauver la planète, sortez du capitalisme. - Phil

RE: [PHP] order by what?

2009-06-11 Thread Jay Blanchard
[snip] How can order by be forced to order alphabetically and ignore accents without stripping the accents for printout? This is a problem for both caps normal letters. [/snip] Definitely an SQL question. What character set are you using in your database? Is the accent the first character of the

RE: [PHP] Mail function and hotmail

2009-06-11 Thread Fernando G
Hello, Thank you all for your cooperation yesterday. I tried PEAR Mail_mime as follows: function SendEmail($template, $params){ // Read and open the template file and the image file $htmlFile = fopen(./templates/$template.html, r); $txtFile = fopen(./templates/$template.txt, r);

Re: [PHP] order by what?

2009-06-11 Thread PJ
Jay Blanchard wrote: [snip] How can order by be forced to order alphabetically and ignore accents without stripping the accents for printout? This is a problem for both caps normal letters. [/snip] Definitely an SQL question. What character set are you using in your database? Is the

RE: [PHP] Preventing XSS Attacks

2009-06-11 Thread HallMarc Websites
-Original Message- From: tedd [mailto:tedd.sperl...@gmail.com] Sent: Thursday, June 11, 2009 9:28 AM To: PHP-General List Subject: Re: [PHP] Preventing XSS Attacks At 7:08 PM +0100 6/10/09, Ashley Sheridan wrote: So something like this would be acceptable?: $searchTerms =

RE: [PHP] order by what?

2009-06-11 Thread Jay Blanchard
[snip] [snip] How can order by be forced to order alphabetically and ignore accents without stripping the accents for printout? This is a problem for both caps normal letters. [/snip] Definitely an SQL question. What character set are you using in your database? Is the accent the first

Re: [PHP] order by what?

2009-06-11 Thread Robin Vickery
2009/6/11 PJ af.gour...@videotron.ca How can order by be forced to order alphabetically and ignore accents without stripping the accents for printout? This is a problem for both caps normal letters. Depends on the database. If you're using mysql, the order is governed by the collation

Re: [PHP] order by what?

2009-06-11 Thread PJ
PJ wrote: Jay Blanchard wrote: [snip] How can order by be forced to order alphabetically and ignore accents without stripping the accents for printout? This is a problem for both caps normal letters. [/snip] Definitely an SQL question. What character set are you using in your

Re: [PHP] order by what?

2009-06-11 Thread PJ
Jay Blanchard wrote: [snip] [snip] How can order by be forced to order alphabetically and ignore accents without stripping the accents for printout? This is a problem for both caps normal letters. [/snip] Definitely an SQL question. What character set are you using in your database?

[PHP] Same Page, Fundamentally Different Behavior OR is Firefox broken?

2009-06-11 Thread Matt Neimeyer
I'm at a complete loss... So I'm hoping someone can point me in the right direction to even start looking. We have an application written in PHP that lets users send out emails. The basic process is as follows. 1. Go to start screen. (This resets anything currently in process for the current

Re: [PHP] order by what?

2009-06-11 Thread PJ
Robin Vickery wrote: 2009/6/11 PJ af.gour...@videotron.ca mailto:af.gour...@videotron.ca How can order by be forced to order alphabetically and ignore accents without stripping the accents for printout? This is a problem for both caps normal letters. Depends on the database.

Re: [PHP] order by what?

2009-06-11 Thread Andrew Ballard
On Thu, Jun 11, 2009 at 11:27 AM, PJaf.gour...@videotron.ca wrote: Robin Vickery wrote: 2009/6/11 PJ af.gour...@videotron.ca mailto:af.gour...@videotron.ca     How can order by be forced to order alphabetically and ignore accents     without stripping the accents for printout? This is a

Re: [PHP] order by what?

2009-06-11 Thread PJ
Robin Vickery wrote: 2009/6/11 PJ af.gour...@videotron.ca mailto:af.gour...@videotron.ca How can order by be forced to order alphabetically and ignore accents without stripping the accents for printout? This is a problem for both caps normal letters. Depends on the database.

Re: [PHP] order by what?

2009-06-11 Thread Per Jessen
PJ wrote: PJ wrote: There are some options which all need some sort of adjustment. If , e.g. É is used in the db instead of Eacute; the output onscreen is a little black diamond with a quesion mark inside. The order is correct, but the diamond is not acceptable... obviously, one cannot

Re: [PHP] order by what?

2009-06-11 Thread Eddie Drapkin
On Thu, Jun 11, 2009 at 11:35 AM, PJ af.gour...@videotron.ca wrote: Robin Vickery wrote: 2009/6/11 PJ af.gour...@videotron.ca mailto:af.gour...@videotron.ca How can order by be forced to order alphabetically and ignore accents without stripping the accents for printout? This

RE: [PHP] Mail function and hotmail

2009-06-11 Thread Fernando G
I decided to change the call to send to: $mail = Mail::factory(smtp, array(host = localhost)); return $mail-send($params[email], $headers, $body); and now hotmail wokrs. Maybe qmail changes something when the mail() function is used. Thank you for all your help. Fernando. From:

Re: [PHP] Re: SHOULD I NOT USE ELSE IN IF STATEMENTS....?

2009-06-11 Thread Jan G.B.
2009/6/10 Clancy clanc...@cybec.com.au On Tue, 09 Jun 2009 12:22:22 -0400, rob...@interjinn.com (Robert Cummings) wrote: Craige Leeder wrote: I'm not sure I agree with NEVER using else. Sometimes else is a very logical way to organize code. However, it should not be used for data

Re: [PHP] Preventing XSS Attacks

2009-06-11 Thread Jan G.B.
2009/6/11 HallMarc Websites m...@hallmarcwebsites.com -Original Message- From: tedd [mailto:tedd.sperl...@gmail.com] Sent: Thursday, June 11, 2009 9:28 AM To: PHP-General List Subject: Re: [PHP] Preventing XSS Attacks At 7:08 PM +0100 6/10/09, Ashley Sheridan wrote:

Re: [PHP] order by what?

2009-06-11 Thread Robin Vickery
2009/6/11 PJ af.gour...@videotron.ca Robin Vickery wrote: 2009/6/11 PJ af.gour...@videotron.ca mailto:af.gour...@videotron.ca How can order by be forced to order alphabetically and ignore accents without stripping the accents for printout? This is a problem for both

[PHP] Re: ezmlm response

2009-06-11 Thread Mika Pohjola
It could be arti...@bluemusicgroup.com or m...@bluemusicgroup.com Please, remove. Thanks.

Re: [PHP] Re: ezmlm response

2009-06-11 Thread Daniel Brown
On Thu, Jun 11, 2009 at 13:24, Mika Pohjolapohjola.m...@gmail.com wrote: It could be arti...@bluemusicgroup.com or m...@bluemusicgroup.com Please, remove. Thanks. Mika, You will need to do this yourself at http://php.net/mailinglists. If it's a different address forwarding to your

[PHP] PHP 5.3.0RC3

2009-06-11 Thread Johannes Schlüter
Hello! we have packaged PHP 5.3.0RC3, which you can find here: http://downloads.php.net/johannes/ Windows binaries are available here: http://windows.php.net/qa/ This third release candidate focused on bug fixes and stability improvements and we hope to only require minimal changes ahead of the

[PHP] Re: [Bulk] Re: [PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-11 Thread Jean-Pierre Arneodo
Ashley Sheridan a écrit : On Thu, 2009-06-11 at 10:47 +, Jean-Pierre Arneodo wrote: Hi! I'm stuck. I don't understand why the php CLI dies after 3 hours in my script. Any idea to solve? Thanks PHP 5.2.9-0.dotdeb.2 with Suhosin-Patch 0.9.7 (cli) (built: Apr 7 2009 20:06:36) Linux

Re: [PHP] Re: [Bulk] Re: [PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-11 Thread Robert Cummings
Jean-Pierre Arneodo wrote: Ashley Sheridan a écrit : On Thu, 2009-06-11 at 10:47 +, Jean-Pierre Arneodo wrote: Hi! I'm stuck. I don't understand why the php CLI dies after 3 hours in my script. Any idea to solve? Thanks PHP 5.2.9-0.dotdeb.2 with Suhosin-Patch 0.9.7 (cli) (built: Apr 7

[PHP] Field type for american money

2009-06-11 Thread revDAVE
Php - MySQL - newbie question - Field type for american money - int(11) seems to work fine - but also I tried decimal(10,2) Is one a better choice than another for american money usage? -- Thanks - RevDave Cool @ hosting4days . com [db-lists 09] -- PHP General Mailing List

Re: [PHP] Field type for american money

2009-06-11 Thread Daniel Brown
On Thu, Jun 11, 2009 at 16:08, revDAVEc...@hosting4days.com wrote: Php - MySQL - newbie question - Field type for american money - int(11) seems to work fine - but also I tried decimal(10,2) Is one a better choice than another for american money usage? For PHP, check out

[PHP] Re: Field type for american money

2009-06-11 Thread Shawn McKenzie
revDAVE wrote: Php - MySQL - newbie question - Field type for american money - int(11) seems to work fine - but also I tried decimal(10,2) Is one a better choice than another for american money usage? -- Thanks - RevDave Cool @ hosting4days . com [db-lists 09] If you are

Re: [PHP] Field type for american money

2009-06-11 Thread Waynn Lue
For mysql, it's better to use int and then store it in cents (or micros) so you can use all integer operations instead of float ones. On 6/11/09, Shawn McKenzie nos...@mckenzies.net wrote: revDAVE wrote: Php - MySQL - newbie question - Field type for american money - int(11) seems to work

Re: [PHP] Field type for american money

2009-06-11 Thread Shawn McKenzie
Waynn Lue wrote: For mysql, it's better to use int and then store it in cents (or micros) so you can use all integer operations instead of float ones. To each his own. Speed or otherwise I don't see a difference between: $total = 19.95 + 3.99; //shipping and $total = 1995 + 399;

[PHP] CURL intermittant problem

2009-06-11 Thread ioan...@btinternet.com
I have been having problems with a curl script which works normally with many different URLs but had a particular intermittant problem with a url in the following format: http://10.20.30.40/0001/032/023112/filename.phtml?param1=paramvalue1param2=paramvalue2 etc etc. The unusual thing

Re: [PHP] Field type for american money

2009-06-11 Thread Robert Cummings
Shawn McKenzie wrote: Waynn Lue wrote: For mysql, it's better to use int and then store it in cents (or micros) so you can use all integer operations instead of float ones. To each his own. Speed or otherwise I don't see a difference between: $total = 19.95 + 3.99; //shipping and $total

Re: [PHP] CURL intermittant problem

2009-06-11 Thread Daniel Brown
On Thu, Jun 11, 2009 at 19:07, ioan...@btinternet.comioan...@btinternet.com wrote: The target URL works perfectly and quicly if put directly into the browser URL line. Do you know of any other reasons for problems with such a connection? Is the script being run located on the same system

Re: [PHP] Field type for american money

2009-06-11 Thread Waynn Lue
Shawn McKenzie wrote: Waynn Lue wrote: For mysql, it's better to use int and then store it in cents (or micros) so you can use all integer operations instead of float ones. To each his own. Speed or otherwise I don't see a difference between: $total = 19.95 + 3.99; //shipping and

Re: [PHP] Field type for american money

2009-06-11 Thread Shawn McKenzie
Robert Cummings wrote: Shawn McKenzie wrote: Waynn Lue wrote: For mysql, it's better to use int and then store it in cents (or micros) so you can use all integer operations instead of float ones. To each his own. Speed or otherwise I don't see a difference between: $total = 19.95 + 3.99;

Re: [PHP] CURL intermittant problem

2009-06-11 Thread Martin Scotta
It looks like a connection problem, You has to make sure php can connect to the IP ?php echo exec( 'ping 10.20.30.40' ); ? You can remove the IP from the source, just add an entry in the /etc/hosts file Mrtn On Thu, Jun 11, 2009 at 8:14 PM, Daniel Brown danbr...@php.net wrote: On Thu,

[PHP] Beginner at writting a PHP Wrapper for C++ libraries

2009-06-11 Thread Eric A. Boney
I am just beginning my foray into writing my own wrapper for a C++ library that maintained by someone else. I have ordered Sara Golemon's book Extending and Embedding PHP which should arrive in the next week or so, but until then I had a couple of questions that I was hoping might be able to be

[PHP] Dynamic Titles

2009-06-11 Thread Austin Caudill
Hello, im trying to make the CMS system im using more SEO friendly by giving each page it's own title. Right now, the system assigns all pages the same general title. I would like to use PHP to discertain which page is being viewed and in turn, which title should be used. I have put in the