Re: [PHP] file function

2005-07-10 Thread Burhan Khalid
Joseph Lee wrote: Hi, I tried file() in the following lines: However, it only gave me authFile = Array What's wrong with this file function? I tried single quotes, but got the same answer, too. Nothing. You need to read the documentation. What you probably wanted was: print "authFile =

Re: [PHP] URL decode

2005-07-10 Thread Chris Shiflett
Mario netMines wrote: I have a value like: %u0394%u0397%u03A4%u039C%u039B Is there a way to decode to normal characters (like javascript's unescape() function) I think you might want to try mb_parse_str(), although I can't run a quick test for you, because I don't have the multibyte extensio

[PHP] URL decode

2005-07-10 Thread Mario netMines
Hi all I have a value like: %u0394%u0397%u03A4%u039C%u039B Is there a way to decode to normal characters (like javascript's unescape() function) Thanks in advance Mario -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] SESSION

2005-07-10 Thread Thomas Bonham
I have been trying to update & fix the errors. With the new code (That I will post at the end), I'm only getting one error and that is that it can't start the session because that it has been started. CODE: pg_num_rows($result); if($rows = pg_num_rows($result) > 0) {

Re: [PHP] SESSION

2005-07-10 Thread Thomas Bonham
I have been trying to update & fix the errors. With the new code (That I will post at the end), I'm only getting one error and that is that it can't start the session because that it has been started. CODE: pg_num_rows($result); if($rows = pg_num_rows($result) > 0) {

Re: [PHP] Re: Register globals and ini_set

2005-07-10 Thread Richard Lynch
On Fri, July 8, 2005 6:50 am, Jason Barnett said: > [EMAIL PROTECTED] wrote: > But what you *can* do, is to ini_get('register_globals') and have your > script act accordingly. You could for example extract() your $_GET and > $_POST variables. > > http://php.net/manual/en/function.extract.php If *

Re: [PHP] Register globals and ini_set

2005-07-10 Thread Richard Lynch
On Fri, July 8, 2005 7:50 am, Terry Romine said: You *ARE* doing session_start at the top of each page, right?... Ya gotta do that. > I was setting the $_SESSION by: > $_SESSION['var_name'] = "this"; > or > $my_local = "this"; > $_SESSION['var_name'] = $my_local; There *WAS* a bug in PHP [mumbl

Re: [PHP] Re: Security, Late Nights and Overall Paranoia

2005-07-10 Thread Richard Lynch
On Fri, July 8, 2005 11:25 am, Ezra Nugroho said: > > Here is one security measure that you HAVE to do if you allow people to > submit contents to your site. > > 1. track client's IP. > 2. Associate sensitive cookies with the IP, if they don't match, ignore > it or invalidate the cookie. > > We may

RE: [PHP] back slashes

2005-07-10 Thread Richard Lynch
On Fri, July 8, 2005 12:48 pm, Jay Blanchard said: > [snip] > Lets say I have a string: > > "c:\www\test" > > I want to insert it into a database, but what ends up getting inserted > is: PHP3 and earlier: http://php.net/addslashes PHP4 (?) and later: http://php.net/myqsl_escape_string > c:wwwtes

Re: [PHP] SESSION

2005-07-10 Thread Thomas Bonham
Using the examples for php and my book. This is the error that I get with the following code. ERROR: [client 127.0.0.1] PHP Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /var/www/html/thomas/cis166ae/data/login.php:2) in /var/www/html/thomas/cis

Re: [PHP] SESSION

2005-07-10 Thread Thomas Bonham
Using the examples for php and my book. This is the error that I get with the following code. ERROR: [client 127.0.0.1] PHP Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /var/www/html/thomas/cis166ae/data/login.php:2) in /var/www/html/thomas

Re: [PHP] upload file problem

2005-07-10 Thread Richard Lynch
On Sat, July 9, 2005 1:39 am, Ahmed Abdel-Aliem said: > Hi > i have a problem with a code to upload files on server > here is the code > > $f =& $HTTP_POST_FILES['News_Pic']; Use $_FILES to stay current... > $dst_file_name = generateUniqueId(); > > $arr = split("\.",$f['name']); > > $f['name'] =

Re: [PHP] quickForm

2005-07-10 Thread Richard Lynch
On Sat, July 9, 2005 7:46 pm, Will said: > Hi, can someone say where I might post this. > Hi, I am using a quickform form and it works well except when I use it by > using an include in another file. In that case when the file is called in > (by way of the include statement in the parent file) it

Re: [PHP] SESSION

2005-07-10 Thread Richard Lynch
On Sat, July 9, 2005 8:27 pm, Thomas Bonham said: > If someone can send me a example of a login sesson. http://php.net/session_start -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Apache 1.3x/PHP 5.0.3 404 error handler & posted data...

2005-07-10 Thread Rasmus Lerdorf
Raymond C. Rodgers wrote: > On Sat, 2005-07-09 at 02:04 -0700, Rasmus Lerdorf wrote: >>No, you can't do what you are trying to do the way you are trying to do >>it. Apache changes the original POST to a GET request on the internal >>errordocument redirect so PHP can't get at the original posted da

Re: [PHP] Apache 1.3x/PHP 5.0.3 404 error handler & posted data...

2005-07-10 Thread Raymond C. Rodgers
On Sat, 2005-07-09 at 02:04 -0700, Rasmus Lerdorf wrote: > Raymond C. Rodgers wrote: > > I'm trying to write an error handler in PHP to try to avoid sending the > > browser a 404 error message. Basically, if someone > > requests /whatever.html on the server and it doesn't exist, my 404 error > > ha

[PHP] Re: Template Engine with Event Handlers

2005-07-10 Thread Matthew Weier O'Phinney
* Rory Browne <[EMAIL PROTECTED]>: > Anyone know if any of the current PHP templating solutions implement > event handling? > > I mean something similar to ASP.NET's onClick events, etc. I was > thinking maybe a js-triggered ajax system, which allowed php to access > some of the JS Objects? > > I w

RE: [PHP] Help - need to quickly optimize a record count!

2005-07-10 Thread Warren Vail
The key to this (no pun intended) is that without an index, MySQL needs to do a table scan to determine the number of rows in the table, and that will rob resources from the database server that everyone shares. My recommendation would be to create a artificial key as a new column in the table, mak

Re: [PHP] Help - need to quickly optimize a record count!

2005-07-10 Thread Burhan Khalid
Brian Dunning wrote: I am cross-posting this to the PHP and the MySQL lists because I'm not sure in which technology my solution will lie. I have a pretty busy PHP/MySQL site that executes the following query a lot: select count(*) as `count` from terms; My MySQL account was disabled by m