Re: [PHP] Code Improvement

2002-06-13 Thread Miguel Cruz
On Thu, 13 Jun 2002, Pong-TC wrote: I run the simple code to display data from the database. There are around 5000 records and 50 fields. It takes around 1 1/2 min to retrieve the data to the browser. I'd like to know if we can improve my code. So, I can retrieve the data in a shorter

Re: [PHP] question about ? :

2002-06-13 Thread Miguel Cruz
On 13 Jun 2002, Lee Doolan wrote: the arrays below have dates like dateA= array( 0= 03, 1= 22, 2= 02) for 22march2002. why does this work: $retval= ($dateA[2] != $dateB[2]) ? strcmp($dateA[2], $dateB[2]) : (($dateA[0] != $dateB[0]) ?

Re: [PHP] Editor

2002-06-13 Thread Miguel Cruz
On Thu, 13 Jun 2002, Daniele Baroncelli wrote: Although any editor should be fine when coding PHP, I find that the standard Notepad it's a real pain in the ass. Especially when the script gives you an error at line 222 ! Each time I have to scroll and count each single line! The best is

RE: [PHP] question about ? :

2002-06-13 Thread Martin Towell
Lee - I would bracket anyway, just to make sure, and to make it clear to the coder what's happening Miguel - that's fine when using two operators that have different precedence, but all three operators are ?: -Original Message- From: Miguel Cruz [mailto:[EMAIL PROTECTED]] Sent: Friday,

Re: [PHP] question about ? :

2002-06-13 Thread Lee Doolan
Miguel == Miguel Cruz [EMAIL PROTECTED] writes: Miguel On 13 Jun 2002, Lee Doolan wrote: the arrays below have dates like dateA= array( 0= 03, 1= 22, 2= 02) for 22march2002. why does this work: $retval= ($dateA[2] != $dateB[2]) ? strcmp($dateA[2],

RE: [PHP] Shut down server

2002-06-13 Thread Bruce Karstedt
This is a bad idea from a security standpoint. If your server is local, login as root and type shutdown. If the system is remote telnet to the box, login, su to root and type reboot. If you use shutdown remotely, there is no way to restart the server. Bruce Karstedt President Technology

RE: [PHP] Editor

2002-06-13 Thread César Aracena
I'm pretty happy every since I found Macromedia's Home Site 5.0. It will do the coloring for all the different kinds of programming languages you use and also, what's best, it will let you add your own customized toolbars and tool buttons so you don't have to type large strings of code every time

[PHP] sessions in multiple browser windows

2002-06-13 Thread Justin French
Hi all, I've got a session which is being maintained by cookies. One of the links on the page, when logged in, is a link the admin section of the site... at this stage, I have the link opening in a new window (target=_blank). I've noticed that the session sometimes gets destroyed, with both

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Justin French
I don't think relying on JavaScript for something so integral as an email address it THAT good an idea... Use php to send a mailto: header! I have a mail.php file, which I call with a link like: A HREF=mail.php?to=justindomain=indent.com.auJustin/a and mail.php is a simple file: ?

Re: [PHP] Printer friendly version script

2002-06-13 Thread Tom Rogers
Hi One method for later browsers is to use a header tag that causes a new page to be loaded for printing. This is done transperantly so the users don't need to click anything other than the normal print button. It goes like this : link rel=alternate media=print href=?echo

Re: [PHP] security advice...

2002-06-13 Thread Justin French
That's a big can of worms :) I think perhaps start with one problem, like sessions, then move onto another problem. Not really sure what you mean by cross site scripting... maybe you mean writing decent code once, and having it portable to many new projects with little fuss? Justin French

Re: [PHP] Printer friendly version script

2002-06-13 Thread Tom Rogers
Hi Should have made that a bit clearer :) head link rel=alternate media=print href=?echo $_SERVER['PHP_SELF']??print=yes /head One method for later browsers is to use a header tag that causes a new page to be loaded for printing. This is done transperantly so the users don't need to click

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Manuel Lemos
Hello, On 06/13/2002 10:18 PM, Justin French wrote: I don't think relying on JavaScript for something so integral as an email address it THAT good an idea... Why not? I use this on mirror sites that only serve static pages so I do not need to depend on PHP. Use php to send a mailto:

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Justin French
Hi, on 14/06/02 11:53 AM, Manuel Lemos ([EMAIL PROTECTED]) wrote: Hello, On 06/13/2002 10:18 PM, Justin French wrote: I don't think relying on JavaScript for something so integral as an email address it THAT good an idea... Why not? I use this on mirror sites that only serve static

[PHP] Can I set the value of variable depending on when the page is loaded?

2002-06-13 Thread Don
Hi, I have a an HTML page containing a form used to search my website. The form has a drop-down menu with two choices. When the submit button is clicked, I call a PHP page which look at the value of the drop down menu selection and redirects to the appropriate form handler. Basically, my

RE: [PHP] Can I set the value of variable depending on when the page is loaded?

2002-06-13 Thread Martin Towell
instead of using js to redirect, could you use header(location:); ? -Original Message- From: Don [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 12:36 PM To: php Subject: [PHP] Can I set the value of variable depending on when the page is loaded? Hi, I have a an HTML page

Re: [PHP] Can I set the value of variable depending on when the page is loaded?

2002-06-13 Thread Don
Would that solve my probem with the BACK button? - Original Message - From: Martin Towell [EMAIL PROTECTED] To: 'Don' [EMAIL PROTECTED]; php [EMAIL PROTECTED] Sent: Thursday, June 13, 2002 10:38 PM Subject: RE: [PHP] Can I set the value of variable depending on when the page is loaded?

RE: [PHP] Can I set the value of variable depending on when the page is loaded?

2002-06-13 Thread Martin Towell
it works for me - to only problem is if you're transferring data from one page to the other via the form. You'll need some other why of doing it (sessions, cookies, use GET, other) -Original Message- From: Don [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 12:43 PM To: Martin

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Manuel Lemos
Hello, On 06/13/2002 11:02 PM, Justin French wrote: I don't think relying on JavaScript for something so integral as an email address it THAT good an idea... Why not? I use this on mirror sites that only serve static pages so I do not need to depend on PHP. Simply, if the user doesn't have

[PHP] Re: forcing file downloads

2002-06-13 Thread Timothy J. Luoma
On Wed, 12 Jun 2002, Justin French wrote: I know this has been discussed many times, but I've been hunting through the archives with very little resolution on the issue. The user can define certain things given the way they want mime types to be handled. PDF used to be a good solution until

[PHP] Re: Email validation

2002-06-13 Thread Timothy J. Luoma
On Wed, 12 Jun 2002, Pedro Pontes wrote: function checkEmail($strEMailAddress) { return eregi(^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$, $strEMailAddress); } You have it now :). I'm still learning my PHP regex... does the above allow someone to have a literal + in their

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Justin French
on 14/06/02 12:45 PM, Manuel Lemos ([EMAIL PROTECTED]) wrote: Javascript-less represent less then 0.5% of the users in the World. I'd be interested in seeing this data proven. I'm not being sarcastic -- I'm genuinely interested. You are guessing. I am sure your address leaked from some

RE: [PHP] MySQL Query Help!!!!

2002-06-13 Thread John Holmes
Man, where do I start. There could be so many things wrong. First of all, this is a PHP list, not MySQL. Second, use MySQL_error() after you issue a query to see if an error was returned http://www.php.net/mysql_error. Third, in this line:

RE: [PHP] Extracting from an Array

2002-06-13 Thread John Holmes
Step through your code. What value does $rexpiry have? What do you see when you do print_r($Date) ?? Troubleshoot... ---John Holmes... -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 10:36 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Manuel Lemos
Hello, On 06/14/2002 12:03 AM, Justin French wrote: on 14/06/02 12:45 PM, Manuel Lemos ([EMAIL PROTECTED]) wrote: Javascript-less represent less then 0.5% of the users in the World. I'd be interested in seeing this data proven. I'm not being sarcastic -- I'm genuinely interested.

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Miguel Cruz
On Fri, 14 Jun 2002, Justin French wrote: on 14/06/02 12:45 PM, Manuel Lemos ([EMAIL PROTECTED]) wrote: I prefer to leave the less-than-0-dot-5-percent-non-Javascript-browser users fixing the address that had @ replaced. I agree. And in the case of a user site like yours, and email form

Re: [PHP] php server on Windows

2002-06-13 Thread Miguel Cruz
On Thu, 13 Jun 2002, Phil Schwarzmann wrote: Can I use IIS instead of Apache ? If you hate yourself. IIS is not very configurable, so you'll find yourself unable to do an awful lot of things. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] MySQL Query Help!!!!

2002-06-13 Thread Chris Kay
The query does not error out it just does not give any records, and I Know What part of The query does not error out do you not understand. Why are there so many people willing to say what is wrong with a code but when it comes to A solution that go silent. I find that the ones most often

RE: [PHP] Re: forcing file downloads

2002-06-13 Thread Bruce Karstedt
This is determined by your mime types in apache conf file (assuming you are using apache) if the file type is not defined apache will try and download the file instead of parsing it for the browser. Bruce Karstedt President Technology Consulting Associates, Ltd. Tel: 847-735-9488 Fax:

RE: [PHP] Editor

2002-06-13 Thread Jantan
Try this one: Webmaster can be downloaded from this site : http://www.html-helper.com/ *** REPLY SEPARATOR *** On 6/13/02 at 9:48 PM César Aracena wrote: I'm pretty happy every since I found Macromedia's Home Site 5.0. It will do the coloring for all the different kinds of

RE: [PHP] MySQL Query Help!!!!

2002-06-13 Thread John Holmes
On Fri, 14 Jun 2002, Chris Kay wrote: The query does not error out it just does not give any records, and I Know What part of The query does not error out do you not understand. Why are there so many people willing to say what is wrong with a code but when it comes to A solution

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Justin French
on 14/06/02 1:32 PM, Manuel Lemos ([EMAIL PROTECTED]) wrote: http://www.phpclasses.org/browse.html/statistics/statistics.html#user-browsers Interesting, but these stats only indicate what *browser* has been used... not if JS was enabled/disabled. case 1: user gets sick of pop-ups and crap,

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Analysis Solutions
On Fri, Jun 14, 2002 at 12:32:05AM -0300, Manuel Lemos wrote: On 06/14/2002 12:03 AM, Justin French wrote: On 14/06/02 12:45 PM, Manuel Lemos ([EMAIL PROTECTED]) wrote: Javascript-less represent less then 0.5% of the users in the World. I'd be interested in seeing this data proven. I'm

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Analysis Solutions
On Thu, Jun 13, 2002 at 10:36:56PM -0500, Miguel Cruz wrote: If you're doing the site for the US government, you're (thank goodness) required by law to make sure it works without JavaScript. REALLY?! That's good news. Could you please provide a source for that? Thanks, --Dan --

RE: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Martin Towell
It all depends on the traffic to the server. I agree that any checks should be done on the server anyway, just in case someone has js turned off. But to reduce the load on the server, you can use js to at least filter _some_ of the traffic. Also, using js to alert a user of an error is much

[PHP] Advanced User Authentication

2002-06-13 Thread César Aracena
Hi all, I’m trying to make a somehow “advanced” user authentication system fro my own web site. What I’m using as a model example, is the authentication system explained by Luke Welling Laura Thomson in their book “PHP and MySQL Web Development”. In the book, they explain how to make apparently

[PHP] Advanced User Authentication

2002-06-13 Thread César Aracena
Hi all, I’m trying to make a somehow “advanced” user authentication system fro my own web site. What I’m using as a model example, is the authentication system explained by Luke Welling Laura Thomson in their book “PHP and MySQL Web Development”. In the book, they explain how to make apparently

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Analysis Solutions
Sire: On Fri, Jun 14, 2002 at 02:56:27PM +1000, Martin Towell wrote: I agree that any checks should be done on the server anyway, just in case someone has js turned off. But to reduce the load on the server, you can use js to at least filter _some_ of the traffic. You have a point. Though

Re: [PHP] Re: forcing file downloads

2002-06-13 Thread Jason Wong
On Friday 14 June 2002 10:47, Timothy J. Luoma wrote: On Wed, 12 Jun 2002, Justin French wrote: I know this has been discussed many times, but I've been hunting through the archives with very little resolution on the issue. The user can define certain things given the way they want mime

[PHP] Re: Email validation

2002-06-13 Thread Manuel Lemos
Hello, On 06/13/2002 11:49 PM, Timothy J. Luoma wrote: On Wed, 12 Jun 2002, Pedro Pontes wrote: function checkEmail($strEMailAddress) { return eregi(^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$, $strEMailAddress); } You have it now :). I'm still learning my PHP regex...

[PHP] Reg-Maximum allowed size for uploaded files

2002-06-13 Thread SenthilVelavan
Hello techies, What is the Maximum allowed size for uploaded files in php.ini file? I have tested it for the following amount upload_max_filesize = 10M But here i can achieve only upto 7.5MB .Is that the limit of php.? Any help is appreciated. Thanks in advance,

[PHP] Gathering user info with php or php and mysql.

2002-06-13 Thread Chris Bunting
Hi All, I've been messing around and trying to figure out how to log info for error messages. I'm using a htaccess file to redirect requests to php error pages like below, My htaccess file: ErrorDocument 401 /error/error401.php ErrorDocument 403 /error/error403.php ErrorDocument 404

Re: [PHP] Reg-Maximum allowed size for uploaded files

2002-06-13 Thread Chris Bunting
Hello, I'm not sure about this either but did you write the upload script yourself? I know that most upload file scripts include a hidden tag to include the maxfilesize of image uploads on the posting form itself. Wasn't sure if you were using someone elses script and didn't notice that.

Re: [PHP] Re: Email validation

2002-06-13 Thread Miguel Cruz
On Fri, 14 Jun 2002, Manuel Lemos wrote: The following classes use this validation regular expression string. It does not exclude some invalid addresses but includes all valid addresses. ^([-!#\$%'*+./0-9=?A-Z^_`a-z{|}~?])+@([-!#\$%'*+/0-9=?A-Z^_`a-z{|}~?]+\\.)+[a-zA-Z]{2,4}\$ It doesn't,

Re: [PHP] Gathering user info with php or php and mysql.

2002-06-13 Thread Miguel Cruz
On Fri, 14 Jun 2002, Chris Bunting wrote: My htaccess file: ErrorDocument 401 /error/error401.php ErrorDocument 403 /error/error403.php ErrorDocument 404 /error/error404.php ErrorDocument 500 /error/error405.php My question is this, Is it possible to use php to get the referring url,

[PHP] Double execution trouble with procmail script invoke

2002-06-13 Thread php
I have a fairly obscure setup where I have procmail directly executing a PHP script specially made for this purpose. This php script uses the same code (classes) used for the web applications, and the classes works just fine. The symptom: I am getting double INSERT's into database. Conclusion:

Re: [PHP] Reg-Maximum allowed size for uploaded files

2002-06-13 Thread Chris Bunting
A quick search on google shows that yes, Php has a maximum upload filesize of 10MB. Maybe your upload timed out or the session expired if you are using them before you got to 10MB or something else happened. Chris Bunting _ Chat

Re: [PHP] Advanced User Authentication

2002-06-13 Thread Miguel Cruz
I think you're making it needlessly complicated. Why don't you just select * from * FROM auth WHERE authname = '$username' AND authpass = password('$password') and not worry about WHERE authlevel = 1? Then, if that query is successful, you can just fetch the result row and see what

Re: [PHP] Gathering user info with php or php and mysql.

2002-06-13 Thread Chris Bunting
Run this little program: pre? var_dump($_SERVER) ?/pre and see if you don't learn something useful. migue Thank you.. This is just what I was trying to find.. Well, The info at least. Never would of thought about a tag to show the info.. Again, Thank you.. Chris Bunting

<    1   2   3