Re: [PHP] php as CGI and $_POST

2004-06-05 Thread Peter Risdon
David T-G wrote: Peter -- ...and then Peter Risdon said... % % David T-G wrote: % % bash-2.05a$ /usr/local/bin/php -v % PHP 4.3.4 (cli) (built: Jan 6 2004 15:27:52) % % You probably need the cgi version - not the command line one you % actually have. Ooohhh... Ouch. So there are

[PHP] Re: if/elseif/else v. switch

2004-06-05 Thread Aidan Lister
This appears to be a really, really stupid question. If they are indentical in operation, then ofcourse there will be no noticeable difference to the user. One may note that a switch statement is faster, because the condition is only evaluated once. However you did not ask about the speed

Re: [PHP] Re: if/elseif/else v. switch

2004-06-05 Thread Rachel Rodriguez
--- Aidan Lister [EMAIL PROTECTED] wrote: This appears to be a really, really stupid question. Is this level of condemnation of a poster necessary? Whether you think Dennis's question was stupid or not, there is no need for such harsh criticism in front of everyone on this list. There are

[PHP] generating graphs

2004-06-05 Thread Nitin
Hi all, Please help me in this. How can I generate bar charts etc with PHP? Thanks in advance

Re: [PHP] generating graphs

2004-06-05 Thread Ryszard Hapka
Nitin wrote: Hi all, Please help me in this. How can I generate bar charts etc with PHP? Thanks in advance http://www.aditus.nu/jpgraph/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: if/elseif/else v. switch

2004-06-05 Thread Aidan Lister
Hi Rachel, You'll note I did not criticise the poster, merely his seemingly stupid question. I suggest you practice what you preach. If you have a comment on my reply to a users post, feel free to contact me personally - [EMAIL PROTECTED] There is equally no need to criticise my crticism - on

Re: [PHP] Re: if/elseif/else v. switch

2004-06-05 Thread Lester Caine
Now Now children ... It is always worth remembering that for some posters English is not their first language and therefore while a question may sound silly, there may be perfectly good reasons for it being asked. Always answer the bits that fit between the lines, that is usually the real

Re: [PHP] generating graphs

2004-06-05 Thread Nitin
thanks for the help, but my PHP ver is 4.0.6... Any other suggestions?? - Original Message - From: Ryszard Hapka [EMAIL PROTECTED] To: Nitin [EMAIL PROTECTED] Cc: PHP List [EMAIL PROTECTED] Sent: Saturday, June 05, 2004 6:11 PM Subject: Re: [PHP] generating graphs Nitin wrote: Hi

[PHP] row colours

2004-06-05 Thread BigMark
this piece of script makes alternate row colours, but i want the rows to be coloured in blocks of 8. So the first 8 rows are white then the next are mauve etc etc. Alternatively i could make the rows all the same colour , but i need a blank row after each 8 rows.? Any ideas

[PHP] Refresh Page

2004-06-05 Thread Mike Mapsnac
I want to refresh page every 10 seconds, without clicking on Refresh button. Any ideas how this can be done? Thanks _ MSN 9 Dial-up Internet Access fights spam and pop-ups – now 3 months FREE!

Re: [PHP] Refresh Page

2004-06-05 Thread Daniel Clark
meta http-equiv=refresh content=10; url=test.php Put inside the HEAD tags, this refreshed the page every 10 seconds. I want to refresh page every 10 seconds, without clicking on Refresh button. Any ideas how this can be done? -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] generating graphs

2004-06-05 Thread Thomas Seifert
On Sat, 5 Jun 2004 19:31:34 +0530 [EMAIL PROTECTED] (Nitin) wrote: thanks for the help, but my PHP ver is 4.0.6... Any other suggestions?? hmm, upgrade? :) really, its worth it! thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Refresh Page

2004-06-05 Thread Scot L. Harris
On Sat, 2004-06-05 at 10:20, Mike Mapsnac wrote: I want to refresh page every 10 seconds, without clicking on Refresh button. Any ideas how this can be done? Thanks I think you want to include something like this in your pages header section: META HTTP-EQUIV=REFRESH CONTENT=10 -- Scot

Re: [PHP] row colours

2004-06-05 Thread Marek Kilimajer
BigMark wrote: this piece of script makes alternate row colours, but i want the rows to be coloured in blocks of 8. So the first 8 rows are white then the next are mauve etc etc. Alternatively i could make the rows all the same colour , but i need a blank row after each 8 rows.? Any ideas

Re: [PHP] row colours

2004-06-05 Thread James Kaufman
On Sat, Jun 05, 2004 at 04:54:33PM +0200, Marek Kilimajer wrote: BigMark wrote: this piece of script makes alternate row colours, but i want the rows to be coloured in blocks of 8. So the first 8 rows are white then the next are mauve etc etc. Alternatively i could make the rows all the

[PHP] Re: Refresh Page

2004-06-05 Thread Robert Winter
You can use javascript timer that are much more flexible than META HTTP-EQUIV=REFRESH because you can test for conditions, etc. Mike Mapsnac [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] I want to refresh page every 10 seconds, without clicking on Refresh button. Any ideas

[PHP] Re: Coloured rows

2004-06-05 Thread Robert Sossomon
Yeah, you have $number which is the total number of rows, right? so just change the if piece to actually count... $j = 0; while ($i = $number){ //first 8 rows done here if ($j = 8) { //print statement here $j++; $i++; } //this piece does the next 8 rows else { //other print statement

[PHP] DB Query

2004-06-05 Thread bskolb
I'm trying to optimize a query that in the first example is taking too long to run. This is my existing working query: $sql = SELECT count(*) as cnt, id FROM `mYTable` WHERE c1 not in (1,16,36) and c2 not in (1,16,36) and c3 not in (1,16,36) and c4 not in (1,16,36) and c5 not in (1,16,36) GROUP

Re: [PHP] Re: Refresh Page

2004-06-05 Thread Daniel Clark
I've used this META tag is IF statement conditionals in the header too. Works well NOT to refresh when in a edit mode. You can use javascript timer that are much more flexible than META HTTP-EQUIV=REFRESH because you can test for conditions, etc. Mike Mapsnac [EMAIL PROTECTED] escribió en el

Re: [PHP] DB Query

2004-06-05 Thread Daniel Clark
Run an explain plan, but my first quess would be to add indexes to c1, c2, c3, c4, c5 fields. I'm trying to optimize a query that in the first example is taking too long to run. This is my existing working query: $sql = SELECT count(*) as cnt, id FROM `mYTable` WHERE c1 not in (1,16,36) and c2

[PHP] Prevent IE6 from blocking cookies

2004-06-05 Thread Robert Winter
Do I a prevent Internet Explorer 6 from blocking cookies (session cookies, etc)? Do I have to setup something in the META HEADERS? Thanks Robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Prevent IE6 from blocking cookies

2004-06-05 Thread Scot L. Harris
On Sat, 2004-06-05 at 11:55, Robert Winter wrote: Do I a prevent Internet Explorer 6 from blocking cookies (session cookies, etc)? Do I have to setup something in the META HEADERS? Thanks Robert I don't think you can override that from a web page. If the user is blocking cookies then the

[PHP] shedule a php script

2004-06-05 Thread CurlyBraces Technologies \( Pvt \) Ltd
hi friends , when running this php script we can make a log file with relavent to the mysql data base. but i need to executethis script after every 2 min time. that is mean theremust be a 2 min sleep time . can somebody help medo this function plz .? ?php require

[PHP] Re: shedule a php script

2004-06-05 Thread Ben Ramsey
If you're on a Unix-like system, add the following at the top of your script: #!/usr/local/bin/php Of course, modify the path to the location of your php binary, since it may not be in the same location. Then, make the file executable with: chmod +x filename.php Then, create a cron job to run

RE: [PHP] DB Query

2004-06-05 Thread bskolb
Explain plan? Due to the number of records, any indexes I added have significantly delayed the query. -Original Message- From: Daniel Clark [mailto:[EMAIL PROTECTED] Sent: Saturday, June 05, 2004 11:41 AM To: bskolb; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] DB Query Run

Re: [PHP] row colours

2004-06-05 Thread Adam Bregenzer
On Sat, 2004-06-05 at 11:21, James Kaufman wrote: $bgcolor = ($i % 16 8) ? #ff : #ff; print tr bgcolor='$bgcolor'td$item_1/tdtd$item_2/tdtd$item_4/tdtdcen ter$item_5/center/td/tr\n; You probably want to do: $bgcolor = (($i % 16) 7) ? #ff : #ff; Since $i % 16 will rotate

[PHP] Re: shedule a php script

2004-06-05 Thread Thomas Seifert
I would recommend the cronjob too but if you want to just keep the script running, do a while-loop around your code, i.e. while(1) { ... your code sleep(120); // sleep 120 seconds } --- the require should be outside of the loop IMHO ;). thomas On Sat, 5 Jun 2004 21:46:20 +0600 [EMAIL

[PHP] moderators?

2004-06-05 Thread Scot L. Harris
Not sure this has been discussed previously or if this is new. It appears that when you send a message to the list there are two messages sent back to the sender. One appears to be a user that no longer exists. That user is [EMAIL PROTECTED] The other one also appears to be an Unknown user:

[PHP] Re: row colours-- thanks!

2004-06-05 Thread BigMark
Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: shedule a php script/ plz help

2004-06-05 Thread Ben Ramsey
I've got to run, so I don't have time to reply to this. I am instead posting it to the list so that others may help you. In the future, keep your posts on the list so that others can benefit or help you. :-) CurlyBraces Technologies ( Pvt ) Ltd wrote: yes, i did as u said .., i

Re: [PHP] Re: shedule a php script

2004-06-05 Thread Marek Kilimajer
Thomas Seifert wrote: I would recommend the cronjob too but if you want to just keep the script running, do a while-loop around your code, i.e. while(1) { ... your code sleep(120); // sleep 120 seconds } --- the require should be outside of the loop IMHO ;). Or if you want to run the script

Re: [PHP] Prevent IE6 from blocking cookies

2004-06-05 Thread Nick Wilson
* and then Scot L. Harris declared Face it, if web sites could override such settings there would be a lot more malicious web sites out there. Absolutely. You cant mess with peoples preffered settings. It's EVIL ;-) Best you can do is make provision for those without cookies enabled:

Re: [PHP] DB Query

2004-06-05 Thread Marek Kilimajer
bskolb wrote: I'm trying to optimize a query that in the first example is taking too long to run. This is my existing working query: $sql = SELECT count(*) as cnt, id FROM `mYTable` WHERE c1 not in (1,16,36) and c2 not in (1,16,36) and c3 not in (1,16,36) and c4 not in (1,16,36) and c5 not in

[PHP] PHP User Interface

2004-06-05 Thread Galen
I've been working with PHP for a few years now. I like doing the real programming that really does something, but I find I'm wasting a great deal of time working with UI via HTML. Are there any setups (classes, functions, etc) for PHP that drastically streamline working with the UI? Especially

[PHP] Re: shedule a php script/ plz help

2004-06-05 Thread CurlyBraces Technologies \( Pvt \) Ltd
yes, i did as u said .., i have added that file into the /etc/cron.d , directory also vi /etc/crontab SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ # run-parts 01 * * * * root run-parts /etc/cron.hourly 02 4 * * * root run-parts /etc/cron.daily 22

[PHP] Re: PHP User Interface

2004-06-05 Thread Torsten Roehr
Galen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I've been working with PHP for a few years now. I like doing the real programming that really does something, but I find I'm wasting a great deal of time working with UI via HTML. Are there any setups (classes, functions, etc)

Re: [PHP] Re: shedule a php script

2004-06-05 Thread CurlyBraces Technologies \( Pvt \) Ltd
alright , thank u very much, i successfully run with that while loop . it is working. so thank u , very much curlys - Original Message - From: Marek Kilimajer [EMAIL PROTECTED] To: Thomas Seifert [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, June 05, 2004 10:49 PM Subject: Re:

Re: [PHP] Prevent IE6 from blocking cookies

2004-06-05 Thread Justin Patrin
Nick Wilson wrote: * and then Scot L. Harris declared Face it, if web sites could override such settings there would be a lot more malicious web sites out there. Absolutely. You cant mess with peoples preffered settings. It's EVIL ;-) Best you can do is make provision for those without

RE: [PHP] DB Query

2004-06-05 Thread bskolb
My first query was: $sql = 'SELECT count(*) as cnt,id FROM `myTable` WHERE c11 and c21 and c31 and c41 and c51 and c116 and c216 and c316 and c416 and c516 and c136 and c236 and c336 and c436 and c536 GROUP BY id'; By using the IN statement, it reduced my query time by 24%, and is why I was

Re: [PHP] if/elseif/else v. switch

2004-06-05 Thread Curt Zirzow
* Thus wrote Dennis Seavers ([EMAIL PROTECTED]): Is there any noticeable difference (on the part of the client) ... The only time the client will perhaps notice a difference is if your condition is in a loop that cycles a couple thousand times or more. Curt -- I used to think I was

Re: [PHP] Re: if/elseif/else v. switch

2004-06-05 Thread Curt Zirzow
* Thus wrote Aidan Lister ([EMAIL PROTECTED]): This appears to be a really, really stupid question. Didn't your teachers ever tell you that there is no such thing as a stupid question? Curt -- What... is the Airspeed Velocity of an Unladen Swallow? -- PHP General Mailing List

[PHP] Newbie question about good coding practice [isset]

2004-06-05 Thread Al
if($var) do something; verses if(isset($var)) do something; The simple form if($var) seems to work fine and I see it in code often. Is there a good reason for using isset? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Newbie question about good coding practice [isset]

2004-06-05 Thread Larry E . Ullman
if($var) do something; verses if(isset($var)) do something; The simple form if($var) seems to work fine and I see it in code often. Is there a good reason for using isset? Yes, if you don't use isset(), you may see notices (errors) if the variable is not set. This depends upon the error reporting

Re: [PHP] Newbie question about good coding practice [isset]

2004-06-05 Thread K.Bogac Bokeer
When $var is 0? ? $var = 0; // Output: $var: $var not exists if ( $var ) echo '$var: $var existsbr'; else echo '$var: $var not existsbr'; // Output: isset(): var exists if ( isset($var) ) echo 'isset(): $var existsbr'; else echo 'isset(): $var not existsbr'; ? Larry E

Re: [PHP] DB Query

2004-06-05 Thread Curt Zirzow
* Thus wrote bskolb ([EMAIL PROTECTED]): I'm trying to optimize a query that in the first example is taking too long to run. This is my existing working query: $sql = SELECT count(*) as cnt, id FROM `mYTable` WHERE c1 not in (1,16,36) and c2 not in (1,16,36) and c3 not in (1,16,36) and c4

Re: [PHP] Prevent IE6 from blocking cookies

2004-06-05 Thread Curt Zirzow
* Thus wrote Justin Patrin ([EMAIL PROTECTED]): Nick Wilson wrote: * and then Scot L. Harris declared Face it, if web sites could override such settings there would be a lot more malicious web sites out there. Absolutely. You cant mess with peoples preffered settings. It's EVIL

Re: [PHP] Newbie question about good coding practice [isset]

2004-06-05 Thread Curt Zirzow
* Thus wrote K.Bogac Bokeer ([EMAIL PROTECTED]): When $var is 0? ? $var = 0; or $var = ''; $var = array(); $var = false; // Output: $var: $var not exists if ( $var ) echo '$var: $var existsbr'; else Curt -- I used to think I was indecisive, but now I'm not so

Re: [PHP] moderators?

2004-06-05 Thread Curt Zirzow
* Thus wrote Scot L. Harris ([EMAIL PROTECTED]): Not sure this has been discussed previously or if this is new. It appears that when you send a message to the list there are two messages sent back to the sender. One appears to be a user that no longer exists. That user is [EMAIL

[PHP] Re: Error Downloading files using FOpen

2004-06-05 Thread Chris Martin
Gerald Winkler wrote: snip The code for the fopen is specifying a binary d/l and not ASCII so it shouldn't be doing this... /snip ...Or should it?.. snip Oh, it was originally tested using some .xls files, but a few .txt files I created as a test were altered in the d/l as well... /snip It works

[PHP] Session Garbage Collection (session.gc_maxlifetime)

2004-06-05 Thread coopster
Do I need to change the session.save_path directive for each virtual host to use their own directory other than the system and/or PHP default (/tmp) in order to effectively override each virtual host session.gc_maxlifetime directive? Let me offer an example for clarification. Example:

RE: [PHP] Re: if/elseif/else v. switch

2004-06-05 Thread Dennis Seavers
Good. Initially, before I sent this message, I was concerned that it was a really, really, really stupid question. But I apparently hit the mark perfectly with two reallys. Since you seem to enjoy answering them, I shall try to come up with a slew of what I hope will be really, really stupid

Re: [PHP] Re: if/elseif/else v. switch

2004-06-05 Thread Dennis Seavers
[Original Message] From: Aidan Lister [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: 06/05/2004 6:19:24 AM Subject: Re: [PHP] Re: if/elseif/else v. switch Hi Rachel, You'll note I did not criticise the poster, merely his seemingly stupid question. P.S. Isn't it possible that you

Re: [PHP] generating graphs

2004-06-05 Thread Knightking
On Sat, 5 Jun 2004 19:31:34 +0530, Nitin [EMAIL PROTECTED] wrote: thanks for the help, but my PHP ver is 4.0.6... Any other suggestions?? ?php $values = array(50, 80, 23, 74); $total = 227; echo 'div style=width:100px' foreach($values as $v) echo 'div style=width:' . $v / $total * 100 . 'px;

Re: [PHP] Prevent IE6 from blocking cookies

2004-06-05 Thread Knightking
On Sat, 5 Jun 2004 12:55:01 -0300, Robert Winter [EMAIL PROTECTED] wrote: Do I a prevent Internet Explorer 6 from blocking cookies (session cookies, etc)? Do I have to setup something in the META HEADERS? Thanks Robert header('P3P: CP=NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM'); Won't

Re: [PHP] Prevent IE6 from blocking cookies

2004-06-05 Thread Daniel Clark
In IE you can turn ON or OFF accepting cookies, select Tools, Options, Security, Advanced, cookies. But the web server can't command IE to enable cookies. Do I a prevent Internet Explorer 6 from blocking cookies (session cookies, etc)? Do I have to setup something in the META HEADERS? Thanks

RE: [PHP] DB Query

2004-06-05 Thread Daniel Clark
Explain can help show where the slow down is. http://dev.mysql.com/doc/mysql/en/EXPLAIN.html Indexes on the c1-c5 columns should increase the speed. Explain plan? Due to the number of records, any indexes I added have significantly delayed the query. -Original Message- From: Daniel

[PHP] Multiple URL Redirection

2004-06-05 Thread mpublico
Hi I have the following situation: I've got a domain that is hosted at a certain host. This host allows me to create subdomains, and also to add several domains to the same account. The thing is if I add a domain like xxx.com to my yyy.com both will be directed to my index.php page. I want to

Re: [PHP] Multiple URL Redirection

2004-06-05 Thread John W. Holmes
[EMAIL PROTECTED] wrote: I've got a domain that is hosted at a certain host. This host allows me to create subdomains, and also to add several domains to the same account. The thing is if I add a domain like xxx.com to my yyy.com both will be directed to my index.php page. I want to know if there

Re: [PHP] Multiple URL Redirection

2004-06-05 Thread Steve Buehler
At 06:39 PM 6/5/2004, you wrote: Hi I have the following situation: I've got a domain that is hosted at a certain host. This host allows me to create subdomains, and also to add several domains to the same account. The thing is if I add a domain like xxx.com to my yyy.com both will be directed to

[PHP] Difficult SQL (for me) - please help!

2004-06-05 Thread Brian Dunning
Thanks to all who helped with my earlier SQL question. It was exactly what I needed. But now I'm making it more involved. Tom and Dick are competing salesmen. The data looks like this: Tom Pitch Dick Pitch Tom Sale Dick Sale Tom Pitch I want to show a list of salesmen, sorted

Re: [PHP] Difficult SQL (for me) - please help!

2004-06-05 Thread John W. Holmes
Brian Dunning wrote: Thanks to all who helped with my earlier SQL question. It was exactly what I needed. But now I'm making it more involved. Tom and Dick are competing salesmen. The data looks like this: Tom Pitch Dick Pitch Tom Sale Dick Sale Tom Pitch I want to show a list