[PHP] Strong typed or Weak typed? (was: if(NANC 0) - always evaluates TRUE...)

2004-01-06 Thread Ivo Pletikosic
-Original Message- From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] From: Kelly Hallman [EMAIL PROTECTED] On Tue, 6 Jan 2004, Ivo Pletikosic wrote: $data = 'NANC'; if(is_numeric($data) $data 0) { die('Not OK'); } Interesting problem, one of the first legit oddities

[PHP] Syntax Highlighting

2004-01-06 Thread Richard Davey
Hi all, I'm after a technique/method that will allow me to syntax highlight source code on my web site. PHP already does a brilliant job of this for PHP code, but I need to extend this to ANY form of source code. Does anyone know of a way to do this (even in pseudo-code) or even better, a

[PHP] Re: Syntax Highlighting

2004-01-06 Thread Al
Richard Davey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm after a technique/method that will allow me to syntax highlight source code on my web site. PHP already does a brilliant job of this for PHP code, but I need to extend this to ANY form of source code. Try

[PHP] allow_url_fopen detection....

2004-01-06 Thread Ryan A
Hi, Quick question, how can I check if allow_url_fopen is enabled on a server from my program? (forgot the syntax) the idea is: Check if allow_url_fopen is open in clients server...if yes, include a remote file, if no...do nothing. Thanks, -Ryan -- PHP General Mailing List

Re: [PHP] allow_url_fopen detection....

2004-01-06 Thread Jason Wong
On Wednesday 07 January 2004 09:32, Ryan A wrote: Quick question, how can I check if allow_url_fopen is enabled on a server from my program? (forgot the syntax) ini_get() -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting *

Re: [PHP] Bizzare form problem - Please Help!

2004-01-06 Thread Paul
Thanks. The problem exists either way! For some reason that is beyond me, the combination of a javascript being called and the document being parsed through php is the cause. Again if I simply rename to .htm then it is fine. Anyhow I am indeed relying on the browser but that is not a problem in

Re[2]: [PHP] Bizzare form problem - Please Help!

2004-01-06 Thread Richard Davey
Hello Paul, Wednesday, January 7, 2004, 1:45:20 AM, you wrote: P Thanks. The problem exists either way! For some reason that is beyond me, P the combination of a javascript being called and the document being parsed P through php is the cause. Again if I simply rename to .htm then it is P fine.

[PHP] supressing include warnings....

2004-01-06 Thread Ryan A
Hi again, I got it working so that I can include a remote file from the clients machine. I am doing it like this: $test_once=0; $allow_url_fop = (int) ini_get('allow_url_fopen'); if($test_once==0) { if($allow_url_fop == 1) [EMAIL

Re: [PHP] supressing include warnings....

2004-01-06 Thread Richard Davey
Hello Ryan, Wednesday, January 7, 2004, 2:17:11 AM, you wrote: RA [EMAIL PROTECTED](http://www.site.com/product/check.php?ver=2update=0;);} RA else{} RA $test_once=1; RA One problem, if something goes wrong instead of doing nothing its displaying RA warningseven though I have put a @ in

[PHP] Verifying a url

2004-01-06 Thread Thomas Andersen
Hi, My web site has two different ways to be accessed. One is through a SSL connection and the other not. Does anyone know how to check either the URL that is being used (https would give away the SSL) or if you can check if SSL is being used? Thanks, Thomas -- PHP General Mailing List

Re: [PHP] Verifying a url

2004-01-06 Thread Richard Davey
Hello Thomas, Wednesday, January 7, 2004, 2:49:48 AM, you wrote: TA My web site has two different ways to be accessed. One is through a SSL TA connection and the other not. TA Does anyone know how to check either the URL that is being used (https would TA give away the SSL) or if you can check

Re: [PHP] supressing include warnings....

2004-01-06 Thread Ryan A
Hi, Thanks for replying. I tried that and now I got a new error: Warning: fopen(http://www.site.com/a/check.php?ver=2update=0): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /blah/i.php on line 74 What to do? How do I suppress it the error if something goes wrong?

RE: [PHP] Verifying a url

2004-01-06 Thread Ivo Pletikosic
It did not work for me but since I have only one http port and one https port on my server i use instead if( $_SERVER['SERVER_PORT'] == 80 ) echo 'http'; C. -Original Message- From: Richard Davey [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 06, 2004 6:56 PM To: Thomas Andersen

Re[2]: [PHP] supressing include warnings....

2004-01-06 Thread Richard Davey
Hello Ryan, Wednesday, January 7, 2004, 3:07:16 AM, you wrote: RA Warning: RA fopen(http://www.site.com/a/check.php?ver=2update=0): failed to RA open stream: HTTP request failed! HTTP/1.1 404 Not Found in /blah/i.php on RA line 74 For me simply using the @ sign as you did before (with

RE: [PHP] eregi filter stopping valid email address, part two

2004-01-06 Thread Dave G
Mike, No. You've only allowed for hyphens in the first element after the @ sign -- this address has them in the 2nd element. Ah, yes, I guess I had it that way because there are no hyphens in top level domain designations, but hadn't accounted for the fact that it would exclude them if

Re: Re[2]: [PHP] Bizzare form problem - Please Help!

2004-01-06 Thread Paul
The javascript is a popup calendar for populating that field or in the example I posted it is just a browser popup. If the page is served as .htm everything is fine. Served as .php the form is empty on BACK unless the javascript is not called. Really the data is not there (because when I view

RE: [PHP] Verifying a url

2004-01-06 Thread Kelly Hallman
On Tue, 6 Jan 2004, Ivo Pletikosic wrote: It did not work for me but since I have only one http port and one https port on my server i use instead if( $_SERVER['SERVER_PORT'] == 80 ) echo 'http'; Here's a way you could write it in your script... $is_secure = ($_SERVER['SERVER_PORT']==443) ?

[PHP] Problem with Picture Name

2004-01-06 Thread Dimitri Marshall
Hi there, Here's the situation: I had it perfect so that when someone uploaded a picture in a form, it uploaded to my server and saved the image name etc. in the database. The problem is, what if someone tries saving a picture with an apostraphe ie ( ' ) or ( )? I know this isn't a usual

Re: [PHP] Problem with Picture Name

2004-01-06 Thread Richard Davey
Hello Dimitri, Wednesday, January 7, 2004, 4:06:25 AM, you wrote: DM I had it perfect so that when someone uploaded a picture in a form, it DM uploaded to my server and saved the image name etc. in the database. The DM problem is, what if someone tries saving a picture with an apostraphe ie ( DM

[PHP] Apache per directory setting

2004-01-06 Thread Chris Lee
Hi, Is it possible to set PHP flag at Apache ver 1.3.x per directory? e.g. VirtualHost 127.0.0.1 DocumentRoot /home/www/apps/htdocs ServerName localhost Directory /home/www/cch/htdocs/test php_flag register_globals on /Directory /VirtualHost I tried but fail to turn on Register Globals settings

[PHP] PHP help files in pdf

2004-01-06 Thread Student
Does anyone have the pdf format of the php help files with proper page numbering -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Apache per directory setting

2004-01-06 Thread Rainsford, David
You should have a look at the php.ini - the location of which can be found if you run a script containing the following: ?php phpinfo(); ? In that file you can turn on the php.ini. If you just want it on for certain files, you can use the ini_set() function in those files. I don't think you

Re: [PHP] Apache per directory setting

2004-01-06 Thread Jason Wong
On Wednesday 07 January 2004 12:44, Chris Lee wrote: Is it possible to set PHP flag at Apache ver 1.3.x per directory? Yes. e.g. VirtualHost 127.0.0.1 DocumentRoot /home/www/apps/htdocs ServerName localhost Directory /home/www/cch/htdocs/test php_flag register_globals on /Directory

Re: [PHP] Problem with Picture Name

2004-01-06 Thread Kelly Hallman
On Tue, 6 Jan 2004, Dimitri Marshall wrote: I had it perfect so that when someone uploaded a picture in a form, it uploaded to my server and saved the image name in the database. The problem is, what if someone tries saving a picture with an apostraphe ie ( ' ) or ( )? Can someone help me

[PHP] mail()

2004-01-06 Thread Anthony Ritter
Using php/apache/mysql I am testing an mail script. The script has a .html form which receives the text input and then a .php script to execute the variables in a mail() function. When I publish both files - the .html and .php - to my ISP's server and enter the data and hit submit I receive an

Re: [PHP] Apache per directory setting

2004-01-06 Thread Chris Lee
You need to use: php_value register_globals 1 I tried, but still fail, phpinfo still show register_globals OffOff Regards, Chris Lee -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Apache per directory setting

2004-01-06 Thread umesh
The change of values will take place after you restart the Apache. Try it once. -Original Message- From: Chris Lee [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 11:49 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Apache per directory setting You need to use: php_value

[PHP] INSERT into mysql from dynamic drop down

2004-01-06 Thread irinchiang
Hi all, Right now i would like to INSERT the values from a dynamic drop down menu into mysql database but encountered some problem here. Values in the drop down menu are retrieved from DB as follows: SNIP SELECT NAME=tutor_name CLASS=textarea ? $sql = mysql_query(SELECT DISTINCT

<    1   2