[PHP] Re: Fastest templating mechanism

2005-05-08 Thread Satyam
You might try using the first pass of a regular C compiler, the pre-compiler, which expands macro definitions. It shouldn't have any problems with the structure of PHP, except for the # comments which it would mistake for its own pre-compiler declarations. Otherwise, may I sugest you check in

[PHP] I'm having a blond moment with a while loop???

2005-05-08 Thread George Pitcher
Hi guys, I'm doing something dumb but I can't see it. The basic premise is: sql search of orders sorted by customer set g_customer_id to '' loop through resultset if customer_id not same as last record's customer_id (g_customer_id) get customer email details set up message header if

[PHP] browser detect and redirect

2005-05-08 Thread Ross
I want to redirect anyone not using ie 4+ as there browser. Is this possible with php? R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Fastest templating mechanism

2005-05-08 Thread Jens Kleikamp
Evert | Rooftop Solutions wrote: Hi all, I'm working on a template system which works a bit like a text translation block. The data looks for example like: beginblock div class=block endblock /div beginauthor span class=author endauthor /div The list is going to be very large, it

Re: [PHP] browser detect and redirect

2005-05-08 Thread bala chandar
Hi, On 5/8/05, Ross [EMAIL PROTECTED] wrote: I want to redirect anyone not using ie 4+ as there browser. Is this possible with php? Yes! you can use get_browser function. chec out http://in.php.net/manual/en/function.get-browser.php R. -- bala balachandar muruganantham blog lynx

Re: [PHP] browser detect and redirect

2005-05-08 Thread =?ISO-8859-2?Q?Heged=FBs_Bal=E1zs?=
Hi, I should say RTFM, or just read a bit before you ask, pls. Anyway take a look at the $_SERVER superglobal or the get_browser() function. Balazs Hegedus Ross wrote: I want to redirect anyone not using ie 4+ as there browser. Is this possible with php? R. -- PHP General Mailing List

[PHP] Re: browser detect and redirect

2005-05-08 Thread David Dorward
Ross wrote: I want to redirect anyone not using ie 4+ as there browser. Is this possible with php? You could examine the user agent string, but that can be (and is in many cases) spoofed. Its generally better to just write code which doesn't depend on the use of a specific browser. Its very

Re: [PHP] Fastest templating mechanism

2005-05-08 Thread Evert | Rooftop Solutions
Joe Wollard wrote: Evert, Have you looked at smarty (http://smarty.php.net) ? It doesn't do exactly what you're talking about but it seems to be the Fastest templating mechanism that I've tested; probably one of the most versatile as well. Cheers! -Joe www.joewollard.com Evert | Rooftop

[PHP] Between Query (0T)

2005-05-08 Thread Ryan A
Hi, Sorry I know this is OT but I'm hoping someone will still help...it should be quite simple :-) I have a field in the database called age which is a DATE field. I also have a webform where the user can select between which ages he wants the records shown... eg: if he types 23,25 then I should

Re: [PHP] Question about acessing databases and formatting output

2005-05-08 Thread The Doctor
On Thu, May 05, 2005 at 05:49:38AM -0600, The Doctor wrote: On Thu, May 05, 2005 at 10:11:14AM +0530, bala chandar wrote: hi, On 5/5/05, The Doctor [EMAIL PROTECTED] wrote: This is probably easy, but how does one access a database, mysql or oracle or postgresql, and present the

Re: [PHP] I'm having a blond moment with a while loop???

2005-05-08 Thread Marek Kilimajer
George Pitcher wrote: Hi guys, I'm doing something dumb but I can't see it. The basic premise is: sql search of orders sorted by customer set g_customer_id to '' loop through resultset if customer_id not same as last record's customer_id (g_customer_id) get customer email details set up

Re: [PHP] Between Query (0T)

2005-05-08 Thread Andy Pieters
On Sunday 08 May 2005 15:20, Ryan A wrote: Hi, Sorry I know this is OT but I'm hoping someone will still help...it should be quite simple :-) I have a field in the database called age which is a DATE field. I also have a webform where the user can select between which ages he wants the

Re: [PHP] I'm having a blond moment with a while loop???

2005-05-08 Thread Andy Pieters
On Sunday 08 May 2005 12:55, George Pitcher wrote: Hi guys, I'm doing something dumb but I can't see it. Actually you are doing many dumb things ;-) Please post your real code instead of pseudo. Then we'll have a look. And if possible append a describe table so we can see how your table

Re: [PHP] I'm having a blond moment with a while loop???

2005-05-08 Thread disguised.jedi
On 5/8/05, George Pitcher [EMAIL PROTECTED] wrote: Hi guys, I'm doing something dumb but I can't see it. The basic premise is: sql search of orders sorted by customer set g_customer_id to '' loop through resultset if customer_id not same as last record's customer_id (g_customer_id)

Re: [PHP] Between Query (0T)

2005-05-08 Thread Duncan Hill
On Sunday 08 May 2005 14:20, Ryan A wrote: Hi, Sorry I know this is OT but I'm hoping someone will still help...it should be quite simple :-) I have a field in the database called age which is a DATE field. http://dev.mysql.com/doc/mysql/en/comparison-operators.html 'BETWEEN' -- PHP

Re: [PHP] Between Query (0T)

2005-05-08 Thread Ryan A
Hey, Thanks for replying. SELECT * FROM `table` WHERE `age` BETWEEN 25 AND 26; I knew the above, but how do i use it with my date field when i have birthdates like this: 01-01-1969 and 03-05-1955 Thanks, Ryan On 5/8/2005 4:28:44 PM, Andy Pieters ([EMAIL PROTECTED]) wrote: On Sunday 08

Re: [PHP] Reducing size of htm output

2005-05-08 Thread Andy Pieters
On Friday 06 May 2005 19:59, Kirsten wrote: I need to reduce the size of the HTM generated by a PHP script for faster transmission. I'm actually using ob_start(ob_gzhandler) but I also need some function to reduce the size of javascript blocks, deletion of unnecesary blanks, etc. Hi Kirsten,

Re: [PHP] Fastest templating mechanism

2005-05-08 Thread trlists
On 8 May 2005 Evert | Rooftop Solutions wrote: What I really need is a fast lookup mechanism, to 'translate' statements. For example: setOutputType('xhtml'); echo(translate('authorstart')); the function translate opens xhtml.data, which contains: authorstart : span class=author

Re: [PHP] Between Query (0T)

2005-05-08 Thread bala chandar
Hi, On 5/8/05, Ryan A [EMAIL PROTECTED] wrote: Hi, Sorry I know this is OT but I'm hoping someone will still help...it should be quite simple :-) I have a field in the database called age which is a DATE field. are u storing in terms of Date of Birth??? if so the below lines u cannot do

Re: [PHP] Question about acessing databases and formatting output

2005-05-08 Thread bala chandar
On 5/8/05, The Doctor [EMAIL PROTECTED] wrote: On Thu, May 05, 2005 at 05:49:38AM -0600, The Doctor wrote: On Thu, May 05, 2005 at 10:11:14AM +0530, bala chandar wrote: hi, On 5/5/05, The Doctor [EMAIL PROTECTED] wrote: This is probably easy, but how does one access a database,

RE: [PHP] I'm having a blond moment with a while loop???

2005-05-08 Thread George Pitcher
Andy, and the others who have kindly responded, I managed to get this sorted. Ta George -Original Message- From: Andy Pieters [mailto:[EMAIL PROTECTED] Sent: 8 May 2005 3:26 pm To: php-general@lists.php.net Subject: Re: [PHP] I'm having a blond moment with a while loop??? On

Re: [PHP] Between Query (0T)

2005-05-08 Thread Matthew Weier O'Phinney
* Ryan A [EMAIL PROTECTED] : Thanks for replying. SELECT * FROM `table` WHERE `age` BETWEEN 25 AND 26; I knew the above, but how do i use it with my date field when i have birthdates like this: 01-01-1969 and 03-05-1955 Just like you would in the example above -- only with dates that

Re: [PHP] Between Query (0T)

2005-05-08 Thread Ryan A
On 5/8/2005 5:33:46 PM, Richard Collyer ([EMAIL PROTECTED]) wrote: Ryan A wrote: Hi, Sorry I know this is OT but I'm hoping someone will still help...it should be quite simple :-) I have a field in the database called age which is a DATE field. I also have a webform where the user

Re: [PHP] Between Query (0T)

2005-05-08 Thread Ryan A
On 5/8/2005 4:31:18 PM, Duncan Hill ([EMAIL PROTECTED]) wrote: On Sunday 08 May 2005 14:20, Ryan A wrote: Hi, Sorry I know this is OT but I'm hoping someone will still help...it should be quite simple :-) I have a field in the database called age which is a DATE field.

Re: [PHP] Between Query (0T)

2005-05-08 Thread Richard Collyer
Ryan A wrote: On 5/8/2005 5:33:46 PM, Richard Collyer ([EMAIL PROTECTED]) wrote: Ryan A wrote: Hi, Sorry I know this is OT but I'm hoping someone will still help...it should be quite simple :-) I have a field in the database called age which is a DATE field. I also have a webform where the user

Re: [PHP] Between Query (0T)

2005-05-08 Thread Ryan A
clip Your looking at something like. For ages between 21 and 23 $Upper = date(m-d-Y, mktime(0,0,0,date(m),date(d),date(y)-22)); $Lower = date(m-d-Y, mktime(0,0,0,date(m),date(d),date(y)-23)); $sql = SELECT field1,field2,field3 FROM `table_name` WHERE `age` BETWEEN . $Lower . AND . $Upper;

Re: [PHP] Fastest templating mechanism

2005-05-08 Thread Evert | Rooftop Solutions
[EMAIL PROTECTED] wrote: On 8 May 2005 Evert | Rooftop Solutions wrote: What I really need is a fast lookup mechanism, to 'translate' statements. For example: setOutputType('xhtml'); echo(translate('authorstart')); the function translate opens xhtml.data, which contains: authorstart : span

Re: [PHP] Fastest templating mechanism

2005-05-08 Thread James Williams
Hi everyone, Thanks for your replies. I Think I haven't been very clear about what I really need. First of all, I don't need an existing templating system, because I am working on my own templating system. And regarding Satyam's post. This looks a lot like what I'm developing right now,

Re: [PHP] Question about acessing databases and formatting output

2005-05-08 Thread The Doctor
On Sun, May 08, 2005 at 08:56:25PM +0530, bala chandar wrote: On 5/8/05, The Doctor [EMAIL PROTECTED] wrote: On Thu, May 05, 2005 at 05:49:38AM -0600, The Doctor wrote: On Thu, May 05, 2005 at 10:11:14AM +0530, bala chandar wrote: hi, On 5/5/05, The Doctor [EMAIL PROTECTED]

[PHP] Sending htm as it's being generated

2005-05-08 Thread Kirsten
How do I make the browser to display data as it being generated? I've noticed some websites do this with cgi. For example: html head titleXXX/title /head body % $i = 0; while (true){ echo p . $i++ . /p; sleep(1); } % /body /html This scripts does not work: It only shows 0,1,2,3[29] when

[PHP] Any alternative to POST method FTP uploads from client computer?

2005-05-08 Thread Murray @ PlanetThoughtful
Hi All, I need to implement the ability to ftp upload files from client machines via a form in a web application I'm developing. From reading the PHP help, all I can find to perform this is the POST method for handling file uploads (http://au2.php.net/manual/en/features.file-upload.php).

[PHP] API Number

2005-05-08 Thread Cole Ashcraft
Hi. I need to know what PHP version had API # 20001222. Thanks, Cole -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Bug, erreurs ou non =?iso-8859-1?q?document=E9?=

2005-05-08 Thread Andy Pieters
On Wednesday 04 May 2005 22:47, Amir Mohammad Saied wrote: Bonjour Amir C'est liste est en Anglais. Cependant, la réponse: Il est necessaire de 'eschapper' le character '\' Au lieux d'ecrire '\', il faut ecrire '\\' Donc si le chemin est

Re: [PHP] select statement

2005-05-08 Thread Andy Pieters
On Thursday 05 May 2005 10:10, Anasta wrote: Why doesnt this work, it shows the username but not the balance of the users money.here is the mysql table: ?php session_start(); include(connect.php); $uname=$_SESSION['username']; $user_balance=mysql_query($sql); $sql = Select FROM users

Re: [PHP] Sending htm as it's being generated

2005-05-08 Thread Andy Pieters
On Sunday 08 May 2005 22:17, Kirsten wrote: I think you need to use ob_start first, then ob_flush on each update Haven't tested it, but I think it's like this: Note: I recommend using ?php ? instead of % % (this is because not every php server will recognize the asp style tags. html head

Re: [PHP] Sending htm as it's being generated

2005-05-08 Thread Rasmus Lerdorf
http://au.php.net/flush Kirsten wrote: How do I make the browser to display data as it being generated? I've noticed some websites do this with cgi. For example: html head titleXXX/title /head body % $i = 0; while (true){ echo p . $i++ . /p; sleep(1); } % /body /html

Re: [PHP] Sending htm as it's being generated

2005-05-08 Thread Richard Davey
Hello Kirsten, Sunday, May 8, 2005, 9:17:22 PM, you wrote: K How do I make the browser to display data as it being generated? I've K noticed some websites do this with cgi. You need to use output buffering, have a look at the OB functions in the PHP manual to get you started. Best regards,

Re: [PHP] Any alternative to POST method FTP uploads from client computer?

2005-05-08 Thread Richard Davey
Hello Murray, Sunday, May 8, 2005, 9:20:58 PM, you wrote: MP So, can anyone confirm that there is no other way to upload files MP from a client machine using a form? (and assuming they don't have MP an ftp server at their end). Forms can only POST (or GET, but we'll ignore that for now) data.

Re: [PHP] Any alternative to POST method FTP uploads from client computer?

2005-05-08 Thread Marek Kilimajer
Murray @ PlanetThoughtful wrote: Hi All, I need to implement the ability to ftp upload files from client machines via a form in a web application I'm developing. From reading the PHP help, all I can find to perform this is the POST method for handling file uploads

Re: [PHP] select statement

2005-05-08 Thread Josip Dzolonga
On , 2005-05-08 at 23:16 +0200, Andy Pieters wrote: Notes: * just because it comes from SESSION doesn't mean that it cannot be spoofed. That's why you should escape uname before including it in a query. Is there something I do not know ? :). As far as I know, it can be spoofed only if you

Re: [PHP] API Number

2005-05-08 Thread Marek Kilimajer
Cole Ashcraft wrote: Hi. I need to know what PHP version had API # 20001222. Thanks, Cole 4.0.5 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sending htm as it's being generated

2005-05-08 Thread Josip Dzolonga
On , 2005-05-08 at 17:17 -0300, Kirsten wrote: This scripts does not work: It only shows 0,1,2,3[29] when the timeout limit is reached. Any ideas? Yes, take a look at the AJAX method. For a beginning, the following link http://www.adaptivepath.com/publications/essays/archives/000385.php

Re: [PHP] select statement

2005-05-08 Thread Richard Lynch
On Sun, May 8, 2005 3:20 pm, Josip Dzolonga said: On нед, 2005-05-08 at 23:16 +0200, Andy Pieters wrote: Notes: * just because it comes from SESSION doesn't mean that it cannot be spoofed. That's why you should escape uname before including it in a query. Is there something I do not know ?

Re: [PHP] Sending htm as it's being generated

2005-05-08 Thread Rory Browne
either follow each echo call with a flush() function call, or enable the implicit_flush in php.ini, or ini_set(). I don't think output buffering as described in the php docs is particularly relevent in this case. Bare in mind that some browsers don't display data either until they have received

Re: [PHP] Any alternative to POST method FTP uploads from client computer?

2005-05-08 Thread Richard Lynch
JavaScript *might* let the user choose a file and get its modification date/time... And then you could upload pieces of it at a time via JavaScript, I think. Incredibly inefficient, most likely, but you *COULD* You may want to just give the users training in some EZ ftp client, freely

[PHP] apache with php\fastcgi

2005-05-08 Thread Solotony
From: Solotony [EMAIL PROTECTED] Subject: Apache 2.0 + mod_fastcgi + PHP Newsgroups: gmane.comp.apache.user Summary: Keywords: I have Apache 2.0.52 with mod_fastcgi 2.4.2 and PHP 4.3.11 installed on Gentoo box. When starting apache (php as fast-cgi) it runs w/o any problems, but after some

Re: [PHP] using sockets to load a streaming windows media file

2005-05-08 Thread Richard Lynch
On Sat, May 7, 2005 8:05 pm, Dan Rossi said: Hi there, is there anyway possible to load a streaming windows media file via a socket connecting to output its contents to the browser or a windows media object. My issue is I am spitting out an asx playlist file however for some freak reason,

Re: [PHP] Random but ordered..

2005-05-08 Thread Richard Lynch
Check the MySQL manual for how to order randomly. They might have a way to do it. However... If there are a fairly number of consistent plans in each company, you might be better off with something that just chooses N companies at random, enough to fill a page, and that's it. One wrinkle is

Re: [PHP] PHP 5, mySQL and Win XP. I NEED HELP

2005-05-08 Thread Richard Lynch
On Sat, May 7, 2005 4:56 am, Deep said: Hi, If you are using localhost, i dont think u need to specify the port number. Localhost would be enough. Also pls check the user privileges and all in the database. ..Deep.. --- Oscar Andersson [EMAIL PROTECTED] wrote: I have made a instal of

Re: [PHP] Question about acessing databases and formatting output

2005-05-08 Thread The Doctor
On Sun, May 08, 2005 at 01:49:08PM -0600, The Doctor wrote: On Sun, May 08, 2005 at 08:56:25PM +0530, bala chandar wrote: On 5/8/05, The Doctor [EMAIL PROTECTED] wrote: On Thu, May 05, 2005 at 05:49:38AM -0600, The Doctor wrote: On Thu, May 05, 2005 at 10:11:14AM +0530, bala chandar

Re: [PHP] expression between vertical bars

2005-05-08 Thread Richard Lynch
On Fri, May 6, 2005 12:25 pm, Jan said: Could someone explain to me the use of the vertical bar in expressions like |[^]+(.*)/[^]+|U. I understand that the vertical bars are used to separate the expression from the modifier, but can't find any documentation about the reasons and rules to do

Re: [PHP] array diff with both values returned

2005-05-08 Thread Richard Lynch
On Fri, May 6, 2005 7:03 am, blackwater dev said: Hello, Is there a good way to get the difference in two arrays and have both values returned? I know I can use array_dif to see what is in one and not the other but...I need it to work a bit differently. I believe you want array_union

Re: [PHP] Question about acessing databases and formatting output

2005-05-08 Thread bala chandar
Hi On 5/9/05, The Doctor [EMAIL PROTECTED] wrote: On Sun, May 08, 2005 at 01:49:08PM -0600, The Doctor wrote: On Sun, May 08, 2005 at 08:56:25PM +0530, bala chandar wrote: On 5/8/05, The Doctor [EMAIL PROTECTED] wrote: On Thu, May 05, 2005 at 05:49:38AM -0600, The Doctor wrote: On

Re: [PHP] Fastest lookup mechanism

2005-05-08 Thread trlists
[Note that I changed the thread title to reflect that this isn't really about templating.] Yes I thought of this, but in my case a flat file would be better. The same problem applies though: [quote] This is all no problem, except that these lists can be pretty big. And I wouldn't like to

Re: [PHP] Any alternative to POST method FTP uploads from client computer?

2005-05-08 Thread bala chandar
Hi, On 5/9/05, Murray @ PlanetThoughtful [EMAIL PROTECTED] wrote: Hi All, I need to implement the ability to ftp upload files from client machines via a form in a web application I'm developing. From reading the PHP help, all I can find to perform this is the POST method for handling

Re: [PHP] Question about acessing databases and formatting output

2005-05-08 Thread bala chandar
On 5/9/05, bala chandar [EMAIL PROTECTED] wrote: Hi On 5/9/05, The Doctor [EMAIL PROTECTED] wrote: On Sun, May 08, 2005 at 01:49:08PM -0600, The Doctor wrote: On Sun, May 08, 2005 at 08:56:25PM +0530, bala chandar wrote: On 5/8/05, The Doctor [EMAIL PROTECTED] wrote: On Thu, May

Re: [PHP] Between Query (0T)

2005-05-08 Thread Matthew Weier O'Phinney
* Richard Collyer [EMAIL PROTECTED] : Ryan A wrote: On 5/8/2005 5:33:46 PM, Richard Collyer ([EMAIL PROTECTED]) wrote: Ryan A wrote: Sorry I know this is OT but I'm hoping someone will still help...it should be quite simple :-) I have a field in the database called age which is a

Re: [PHP] compiling dynamic extensions without root access

2005-05-08 Thread Richard Lynch
On Fri, May 6, 2005 5:37 am, Dan Rossi said: I was going to ask, without the need of requesting our admins to recompile php all the time is there a way in the meantime to compile extensions and load them dynamically without the need for root access to some of the php libraries ? I have always

Re: [PHP] sort by date

2005-05-08 Thread Richard Lynch
On Thu, May 5, 2005 10:42 pm, William Stokes said: I made a mistake and stored date information to DB as varchar values (dd.mm.yyy). When I read the DB is it still possible to sort the data by date with SQL query (ORDER BY date ASC)? Or is it nessessary to have the date information to be

Re: [PHP] Sending htm as it's being generated

2005-05-08 Thread Richard Lynch
On Sun, May 8, 2005 6:02 pm, Rory Browne said: Bare in mind that some browsers don't display data either until they have received a certain amount, or have closed the connection AFAIK. Actually... First, the web server may well have some kind of buffering going on, though current Apache/PHP

RE: [PHP] Any alternative to POST method FTP uploads from client computer?

2005-05-08 Thread Murray @ PlanetThoughtful
Hi, On 5/9/05, Murray @ PlanetThoughtful [EMAIL PROTECTED] wrote: Hi All, I need to implement the ability to ftp upload files from client machines via a form in a web application I'm developing. From reading the PHP help, all I can find to perform this is the POST method for