Re: [PHP] Login system

2003-10-17 Thread Eugene Lee
On Fri, Oct 17, 2003 at 07:04:27PM +0200, Bas wrote: : "Robert Cummings" <[EMAIL PROTECTED]> wrote: : > On Fri, 2003-10-17 at 12:57, Bas wrote: : > > : > > I want a login system with sessions and without mysql. : > > : > > I have tried to make one but that one is without sessions (i don't : > > kno

Re: [PHP] Text area with an echo command

2003-10-17 Thread Eugene Lee
On Sat, Oct 18, 2003 at 12:24:44AM -0400, Will wrote: : : John W. Holmes wrote: : : >Will wrote: : > : >>I have a question on echoing text from a database into a form. The : >>database is populated but it does not show up in the modify script : >>page. Can someone help me?? : >> : >>Here is the

Re: [PHP] Text area with an echo command

2003-10-17 Thread Eugene Lee
On Sat, Oct 18, 2003 at 01:27:05AM -0400, Will wrote: : : Thanks for the code but it comes up a parse error. I know I am new, but : this is driving me crazy!!! :( : Here is the code that I am working with: : : $display_block = " : : : : : : : ||Cage No.: $care_id | Common Name: : $common

Re: [PHP] Changing permissions

2003-10-19 Thread Eugene Lee
On Sat, Oct 18, 2003 at 10:28:49PM -0400, zavaboy wrote: : : Ok, I have a installer that only works if the directory that's being : installed to has public writing permissions. I tried chmod() on the : directory, but I get a error. How can I make it so my installer can : write in a directory with

Re: [PHP] Changing permissions

2003-10-19 Thread Eugene Lee
On Sun, Oct 19, 2003 at 02:37:27PM -0400, zavaboy wrote: : "Eugene Lee" <[EMAIL PROTECTED]> wrote: : > On Sat, Oct 18, 2003 at 10:28:49PM -0400, zavaboy wrote: : > : : > : Ok, I have a installer that only works if the directory that's : > : being installed to

Re: [PHP] Changing permissions

2003-10-19 Thread Eugene Lee
nted internally by PHP is platform dependent. Now if you replaced the floating point number 18.00 with the string "18.00", now the sorting will be done by ASCII code and you'll get results that you probably wanted. $info = array("large", "blue", "18.0

Re: [PHP] Re: [PHP-DB] $_POST in MySQL query issue...

2003-10-19 Thread Eugene Lee
On Sun, Oct 19, 2003 at 02:51:33PM -0400, Adam Reiswig wrote: : : A couple of days ago I placed a post regarding using the $_POST[] : variable in an insert sql query. Both : : $sql="insert into $table set Name = '".$_POST['elementName']."'"; : and : $sql="insert into $table set Name = '{$_POS

Re: [PHP] $PHP_SELF

2003-10-20 Thread Eugene Lee
On Mon, Oct 20, 2003 at 01:23:29PM +0200, Boris Sagadin wrote: : : I'm having problems with $PHP_SELF variable. Mostly it works, other : times (about 10% of tries) it's just empty. Is this a known issue with : Apache 2? If I use $_SERVER['PHP_SELF'], it always works fine, but : still I'd like to k

Re: [PHP] Print mysql errors

2003-10-20 Thread Eugene Lee
On Mon, Oct 20, 2003 at 05:28:08PM -0500, Joseph Bannon wrote: : : How do you print the error message sent back from MySQL? : : $resultCC = mysql_query($queryCC) or die("???"); Stop using stupid Perl syntax. $res = mysql_query($query); if ($res === false) {

Re: [PHP] gmdate problem

2003-10-20 Thread Eugene Lee
On Tue, Oct 21, 2003 at 12:44:38PM +0800, [EMAIL PROTECTED] wrote: : : Having some problem with 'gmdate' here. However, the time doesn't : match with the current time on the system. What could be the problem? : Do I have to set any timezone or stuff like that?...Hope to get some : help here. : :

Re: [PHP] run PHP script in clean memory space

2003-10-21 Thread Eugene Lee
On Tue, Oct 21, 2003 at 02:48:09AM +0200, Honza Malik wrote: : : I want to give administrators of our CMS the possibility to use PHP commands : in HTML templates. Templates are parsed by our PHP script. : : The problem is, that I don't want administrators to be able to list our : $GLOBALS (where

Re: [PHP] Using cookies

2003-10-21 Thread Eugene Lee
On Tue, Oct 21, 2003 at 04:48:13PM -0500, Joseph Bannon wrote: : : I think it's the responsibility of whomever is holding the key (ie, the : username and password). When a user logs into my site, I put their : username and password in a cookie. I then check those cookies to allow : them access to

Re: [PHP] Age from birthdate?

2003-10-22 Thread Eugene Lee
On Wed, Oct 22, 2003 at 06:31:21PM +0200, DvDmanDT wrote: : : How would I get the age of someone if I store the birthdate in a date field? : I just realized FLOOR((UNIX_TIMESTAMP(NOW()) - : UNIX_TIMESTAMP(birthdate))/60/60/24/365.25) wont work for persons born : before 1970... :p I must get the c

Re: [PHP] Problem with SELECT statement and reference material wanted..

2003-10-23 Thread Eugene Lee
On Thu, Oct 23, 2003 at 01:57:38PM +0200, P M wrote: : : I'm having trouble retrieving a selection of my database contents. The : problem is when I search for entries that exactly match a search : criteria, see below: : : (database connection established successfully here..) : : $result = mysq

Re: [PHP] Avoiding blank lines in HTML when field is empty

2003-10-23 Thread Eugene Lee
On Thu, Oct 23, 2003 at 12:46:29PM -0500, Robb Kerr wrote: : : I'm a PhP /MySQL newbie so please excuse the simple question. I'm returning : results from a MySQL query on a webpage. My code includes... : : :, : : : : , : : Phone: : :

Re: [PHP] Conversion project problem

2003-10-23 Thread Eugene Lee
On Thu, Oct 23, 2003 at 03:51:30PM -0700, Mike Alderson wrote: : : I am trying to gather information from one database, : process it, and insert it into a new one. When I run : this script I am getting the following error: : : Warning: mysql_fetch_array(): supplied argument is not : a valid My

Re: [PHP] Globals on/off , PHP.ini and .htaccess - Best solution?

2003-10-24 Thread Eugene Lee
On Fri, Oct 24, 2003 at 02:59:58PM +0200, Ryan A wrote: : : (we are on a shared host and so dont have access to our php.ini file) : we are planning to turn globals off via a .htaccess file...nearly all our : php files are in root (/www/) , but we are also running a third party : application 1 dire

Re: [PHP] session_destroy causes backspace on IE

2003-10-24 Thread Eugene Lee
On Fri, Oct 24, 2003 at 01:24:32PM -0400, bill wrote: : : The following code causes IE to break the tag. : : : logout : : : Logout page"; : $_SESSION = array(); : session_destroy(); : echo "Session destroyed\n"; : echo " : \n"; : ?> : : View/Source in IE: displays this (note broken): : :

Re: [PHP] Re: reading/parsing file names

2003-10-25 Thread Eugene Lee
On Sat, Oct 25, 2003 at 04:16:49PM -0700, koly wrote: : : [EMAIL PROTECTED] (Koly) wrote: : > : > I've got a list of files in a directory, and I'd like to get a only of : > filenames that end in ".jpg", however, exlude the files that end in : > ".thumb.jpg" : > : > ex: : > file.php : > index.h

Re: [PHP] Post variables getting lost

2003-10-27 Thread Eugene Lee
On Mon, Oct 27, 2003 at 03:00:32AM -0200, Joao Andrade wrote: : : Hey people, : : Something odd is happening :) I've this form on a page: : : Backslashes are allowed? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Post variables and mysql queries

2003-10-27 Thread Eugene Lee
On Mon, Oct 27, 2003 at 09:38:32AM -0800, Justin Patrin wrote: : : $query='Select * from users where userid="'.$_POST['userid'].'"'; : : I tend to use single quotes whenever I can and to use concatenation : instead of using in-string variables. I do this for three reasons. The : first is effici

Re: [PHP] OT - Quick JavaScript Question

2003-10-28 Thread Eugene Lee
On Tue, Oct 28, 2003 at 02:27:28PM -0500, Jake McHenry wrote: : "Chris Shiflett" responded: : > --- Jake McHenry <[EMAIL PROTECTED]> wrote: : > > : > > I know this is a bit off topic, but does anyone know of a way I : > > can take the server time in php and get it into javascript? : > : > JavaScrip

Re: [PHP] String Array Creation and assigment

2003-10-30 Thread Eugene Lee
On Wed, Oct 29, 2003 at 12:47:58PM -0500, Dan wrote: : : please help with the following: : : I tried this first : : $b[] = 'Book Worzel, Richard (1989). From Employee to Entrepreneur: how to : turn your experience into a fortune. Toronto: Key Porter books.'; : $b[] = 'Book Ries, Al and Jack Tr

Re: [PHP] Japanese entry into MySQL and into emails

2003-10-30 Thread Eugene Lee
On Thu, Oct 30, 2003 at 10:36:37AM +0100, Marek Kilimajer wrote: : : Unless you want to do string manipulation you don't need mbstring. You : only need to pay atention to these details: : 1. Set charset to kanji for your html pages using : header('Content-type: text/html; charset=kangi'); a. it'

Re: [PHP] PHP & Apache 2

2003-10-30 Thread Eugene Lee
On Thu, Oct 30, 2003 at 11:22:38AM +0200, Fernando Melo wrote: : : I would like to use apache 2 in a production environment, but initially : there seemed to be some issues with the PHP module. Does anybody know : if it is ok use it now or is it still buggy with apache 2? The combination of PHP 4.

Re: [PHP] FLAG

2003-11-04 Thread Eugene Lee
On Tue, Nov 04, 2003 at 03:19:20PM +0800, [EMAIL PROTECTED] wrote: : : Hi calling out to all programmers: : : I heard that there is a term used by most programmers called "FLAG" . : Anyone aware of that?? Its a kinda "Indicator" eg. I have a table with : "YES" column equal to "1" and "NO"

Re: [PHP] Setting up PHP5 alongside PHP4 on apache

2003-11-04 Thread Eugene Lee
On Tue, Nov 04, 2003 at 10:30:39AM +0200, Luke van Blerk wrote: : : I'd like to set up PHP5 to parse php files with a .php5 extension on Apache : 1.3.28. Anybody know how to do this? I don't know about loading PHP4 and PHP5 modules in the same Apache server. It may be easier to build a separate

Re: [PHP] Setting up PHP5 alongside PHP4 on apache

2003-11-04 Thread Eugene Lee
On Tue, Nov 04, 2003 at 11:41:45AM +0200, Luke van Blerk wrote: : : I currently have Apache 2 (port 8080) setup with PHP 5 which can run : simultaneously with the Apache 1.3.28 (port 80) and PHP4, but I'd like to : find out if they can both run on the same Apache. I don't think its possible : to s

Re: [PHP] High bandwidth application tips

2003-11-06 Thread Eugene Lee
On Wed, Nov 05, 2003 at 05:17:29PM -0800, Chris W. Parker wrote: : : One thing you can do to make loops faster is the following: (yes I've : posted this in the past!!) : : Unoptimized: : : $upperlimit = 100; : : for($i = 0;$i < $upperlimit; $++) : { : // your stuff : } : : Optimized: :

Re: [PHP] Ive lost a zero somewhere

2003-11-06 Thread Eugene Lee
On Thu, Nov 06, 2003 at 03:03:35AM -, Richard Cook wrote: : : when i multiply for example 25 . 50 * 3 i get 76 . 5 how would i get : PHP to recognise the last 0 ie make it 76 . 50 What's with the extra spaces before and after your decimal points? -- PHP General Mailing List (http://www.php.

Re: [PHP] php executable and environmental variables

2003-11-06 Thread Eugene Lee
On Thu, Nov 06, 2003 at 11:11:13AM +0200, Tom Diamond wrote: : : I am trying to implement a simple web server (in Java) and I want to add : php support. For the moment I do a "Process p = : Runtime.getRuntime().exec("php /path/to/php/file")", I grab the output, : seperate headers from body and

Re: [PHP] SQL Injections

2003-11-07 Thread Eugene Lee
On Fri, Nov 07, 2003 at 09:43:20AM -, Shaun wrote: : : does anyone know of a function i can include in my scrpits to ensure all : $_POST values sent from a page don't include any SQL? If you're using MySQL, look at mysql_escape_string(). -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] BTML 2.0 released!!!

2003-11-07 Thread Eugene Lee
On Fri, Nov 07, 2003 at 01:55:45PM +0300, Burhan Khalid wrote: : : Pablo Gosse wrote: : > : >What is it meant to "top post"? I've mainly been a lurker in forums : >such as phpbuilder and devshed until recently, but this list is : >proving to be a much better resource than those two. : : Top post

Re: [PHP] Japanese character validation

2003-11-07 Thread Eugene Lee
On Sat, Nov 08, 2003 at 02:20:00AM +0900, - Edwin - wrote: : : Besides, there are some issues (for example with Shift_JIS) that : "bothers" (with no easy "solution") even members of the Japanese PHP : Group ML. (Like the recent thread [PHP-users 18803] on : http://www.php.gr.jp/ or : http://ns1.p

Re: [PHP] Japanese character validation

2003-11-07 Thread Eugene Lee
On Sat, Nov 08, 2003 at 01:35:40AM +0900, - Edwin - wrote: : : On 2003.11.7, at 18:37 Asia/Tokyo, Marek Kilimajer wrote: : : ...[snip]... : : >Are Kanji and Kana chracter sets? : : "Kan" -> Chinese + "ji" -> character : : kana: (quoted from the American Heritage Dictionary) : "1. Japa

Re: [PHP] question about :: usage

2003-11-07 Thread Eugene Lee
On Fri, Nov 07, 2003 at 11:28:18AM -0800, Chris W. Parker wrote: : : Anyway... Here is my problem. I have a class called Validate that has a : method called ValidateInput. There is another method in this class : called phonenumber. ValidateInput calls phonenumber at some point like : this $this->p

Re: [PHP] Japanese character validation

2003-11-08 Thread Eugene Lee
On Sat, Nov 08, 2003 at 06:26:39PM +0900, - Edwin - wrote: : : On Fri, 7 Nov 2003 13:43:06 -0600 Eugene wrote: : > : > Actually, kana are not "simplified kanji" because it is not : > the case that kana can replace kanji while preserving the : > exact same meaning.

Re: [PHP] Japanese character validation

2003-11-08 Thread Eugene Lee
On Sat, Nov 08, 2003 at 11:20:27PM +0900, - Edwin - wrote: : : On 2003.11.8, at 20:32 Asia/Tokyo, Eugene Lee wrote: : : >On Sat, Nov 08, 2003 at 06:26:39PM +0900, - Edwin - wrote: : >: : >: Well, I'm sure there's a very good reason why the dictionary : >: I quoted calle

Re: [PHP] \n and

2003-11-10 Thread Eugene Lee
On Mon, Nov 10, 2003 at 06:57:54AM -0800, Chris Shiflett wrote: : : --- PHPLover <[EMAIL PROTECTED]> wrote: : > : > is \n same as : : This is not true. : : > I know that \n creates a break in source and not in display. : > Is it possible to make \n does the same function as : : No, but you ca

Re: [PHP] \n and

2003-11-10 Thread Eugene Lee
On Mon, Nov 10, 2003 at 04:05:07PM -0800, Chris Shiflett wrote: : : --- Eugene Lee <[EMAIL PROTECTED]> wrote: : > : > Warning: nl2br() is not safe because it emits "" tags which do : > not always work on all browsers (especially browsers not explicitly : > adve

Re: [PHP] Re: ssh within PHP

2003-11-11 Thread Eugene Lee
On Mon, Nov 10, 2003 at 11:05:02PM -0800, tirumal b wrote: : : Its enough if i have the apache privileges. Can i : login to apache user and to remote computer apache : user with public key authentication and run some : command there. Usually, the user that Apache runs under does not have a real

Re: [PHP] Reset auto_increment field

2003-11-11 Thread Eugene Lee
On Tue, Nov 11, 2003 at 10:34:17AM +0100, Christian Ista wrote: : : It's not really a PHP question, sorry. : : How reset a MySQL auto_incrment field ? There are several suggestions in the User Comments of MySQL's online documentation. You should check them out. http://www.mysql.com/doc

Re: [PHP] location= Construct Doc

2003-11-11 Thread Eugene Lee
On Tue, Nov 11, 2003 at 01:46:33PM -0800, Mark wrote: : > : > > --- Lee Stewart <[EMAIL PROTECTED]> wrote: : > > : > >>Here's a *working* section of code... Note the : > >> location = "browse.php"; : > >>on line 23 : : In v4.3.2, it throws a "Parse error: parse error, unexpected '=' in : /

Re: [PHP] validate names with regex

2003-11-12 Thread Eugene Lee
On Wed, Nov 12, 2003 at 01:56:10PM -0800, Chris W. Parker wrote: : : Can someone post a function or regex that can validate names (first and : last)? The most important bit is that names like O'Malley and Hope-Jones : are not barred. The range of human names is so wide that there probably isn't a

Re: [PHP] split()

2003-11-13 Thread Eugene Lee
On Wed, Nov 12, 2003 at 09:48:37PM -0600, erythros wrote: : : trying to use split(). i want to split a paragraph by sentence. so of course : i used split('[.!?]', $data). but then i noticed i use ... or every now : and again at the end of a sentence. i don't know how to do this though... How

Re: [PHP] $_POST bug?

2003-11-13 Thread Eugene Lee
On Thu, Nov 13, 2003 at 12:59:11AM -0500, Jake McHenry wrote: : : > -Original Message- : > From: Jake McHenry [mailto:[EMAIL PROTECTED] : > Sent: Thursday, November 13, 2003 12:53 AM : > To: [EMAIL PROTECTED] : > Subject: [PHP] $_POST bug? : > : > I have 5 fields, all 1 character in leng

Re: [PHP] Cannot bind to port 80

2003-11-13 Thread Eugene Lee
On Thu, Nov 13, 2003 at 01:11:43AM -0500, Teren wrote: : : Hi, I recently upgraded my box to php 4.3.4 and i copied the current : configure line and then ran it in the un-tared directory. I ran make, : then make install. I tried to restart apache and it wouldn't restart. : Any ideas? I tried the t

Re: [PHP] $_POST bug?

2003-11-13 Thread Eugene Lee
On Thu, Nov 13, 2003 at 04:04:16AM -0500, Jake McHenry wrote: : : print_r($_POST) shows me that $_POST has the single 0 value. I solved : my problem, instead of having just if ($_POST['test']), I changed it : to if ($_POST['test'] != ""). Right after I posted, I tried this, and : a couple other th

Re: [PHP] register_globals & security

2003-11-13 Thread Eugene Lee
On Thu, Nov 13, 2003 at 01:55:08PM +0200, Fernando Melo wrote: : Jon Haworth responded: : : Fernando Melo wrote: : : > : : > I have a PHP application that passes variables (values) from a form. : : > I get these using $_POST : : > : : > However I do also post some variables via a link. Which ofcou

Re: [PHP] auto_prepend/append in htaccess....

2003-11-14 Thread Eugene Lee
On Thu, Nov 13, 2003 at 11:32:34AM -0600, Jonathan Villa wrote: : : I want to prepend a configuration file which is located outside of my : document root into my scripts. I can use auto_prepend_file, but I'm not : sure how do it with an htaccess file or a virtual host entry.. I would : prefer VHo

Re: [PHP] Why would this eregi() function not work?

2003-11-14 Thread Eugene Lee
On Fri, Nov 14, 2003 at 04:32:35PM +0900, Dave G wrote: : : > ... escaping isn't necessary. : : Thanks so much for all the helpful advice! : Okay, included the + character, and removed the escaping. And I know I'm : supposed to checking into preg_match, but I'm looking at this as an : opportunity

Re: [PHP] date()

2003-11-14 Thread Eugene Lee
On Fri, Nov 14, 2003 at 10:51:57AM -0500, Chris Mach wrote: : : Does date() give the local time of the Server? or is it based on : something else? The server. : Because I have this code: : : echo date ("F n, Y"); : : and it should say November 14, 2003 but it echos November 11, 2003. : 3 days

Re: [PHP] can I license a php script?

2003-11-14 Thread Eugene Lee
On Fri, Nov 14, 2003 at 03:54:33PM -0800, Chris W. Parker wrote: : : Robert Cummings : on Friday, November 14, 2003 1:34 PM said: : : > Be careful though, if your code incorporates other peoples code, for : > instance Smarty, or PEAR::DB then it may fall under their

Re: [PHP] Include an encoder into PHP distribution?

2003-11-15 Thread Eugene Lee
On Sat, Nov 15, 2003 at 07:52:28PM +0200, John Smith wrote: : : I have no connection to Turck MMcache in any way than just a user who needs : it. But distributing software encoded with it is difficult while it is not : so easily available (have to be separately downloaded and installed). I'm stil

Re: [PHP] strtotime bad logic or strtotime bug?

2003-11-16 Thread Eugene Lee
On Fri, Nov 14, 2003 at 08:53:41PM -0800, Gnik wrote: : : One of my servers required a PHP upgrade. Afterwards one of the PHP : projects stopped functioning. When it would run one section would : scroll endlessly. I can't figure out if it's a 'bug' or if it's bad : logic in the coding. Bad logic

Re: [PHP] Microsoft .NET arguement

2003-11-17 Thread Eugene Lee
On Mon, Nov 17, 2003 at 11:06:37AM -0500, Mike R wrote: : : I have someone here at my desk arguing that Microsoft's .NET is better : than PHP - faster to process, easier and quicker to program, etc. : : They also (claim) that Microsoft's SQL is much faster and such vs. MySQL. Without real benchm

Re: [PHP] rmdir withour rmdir function.

2003-11-17 Thread Eugene Lee
On Mon, Nov 17, 2003 at 09:37:52PM -0500, Vincent M. wrote: : : I can't use the function rmdir: : Warning: rmdir() has been disabled for security reasons : : But I do need to delete a directory with php. How can I do ? Is there : any way to delete an empty directory without using the rmdir func

Re: [PHP] ereg_replace help

2003-11-18 Thread Eugene Lee
On Tue, Nov 18, 2003 at 04:37:52PM +1100, Martin Towell wrote: : : I have an array of strings in the following format: : "abcd - rst" : "abcd - uvw" : "abcd - xyz" : "foobar - rst" : "blah - rst" : "googol - uvw" : : What I want to do is strip everything from t

Re: [PHP] .html extension PHP page be interpret

2003-11-18 Thread Eugene Lee
On Tue, Nov 18, 2003 at 10:46:48AM -, BennyYim wrote: : : I using WinXP + Apache 1.3.24 + PHP 4.3.3 : : My apache default will interpret .php extension file. (e.g. : index.php) : : If I have a PHP page, but I want to use .html file extension (e.g. index.html). : what I need to set to make t

Re: [PHP] sorting an array of regexes

2003-11-18 Thread Eugene Lee
On Tue, Nov 18, 2003 at 01:15:32PM +0100, Adam i Agnieszka Gasiorowski FNORD wrote: : : There is an array of regexes, for example : : $array = array('moon', '[wh]ood', '[^as]eed' ... : (about 300 entries). : : I want to sort it comparing to the : character lenght of a regex. For

Re: [PHP] sorting an array of regexes

2003-11-18 Thread Eugene Lee
On Tue, Nov 18, 2003 at 01:52:39PM +0100, Wouter van Vliet wrote: : Eugene Lee suggested: : > On Tue, Nov 18, 2003 at 01:15:32PM +0100, Adam i Agnieszka : > Gasiorowski FNORD wrote: : > : : > : There is an array of regexes, for example : > : : > : $array = array('moon

Re: [PHP] window.open problem

2003-11-18 Thread Eugene Lee
On Tue, Nov 18, 2003 at 04:48:20PM +0200, David R wrote: : : I am using php and mysql and am having difficulty using window.open () . I : have cut the code down to the basics. : Why does a new window not open? : : : : function boo() { : window.open ("www.google.com"); : } : : : : : why

Re: [PHP] Prefilled forms

2003-11-18 Thread Eugene Lee
On Tue, Nov 18, 2003 at 01:24:23PM -0800, b b wrote: : : The Problem again: : I have a form, I fill it, click submit and then hit : back. Usually in other sites I see the data that I : attempted to submit. Forms originating from my site : are coming up blank. So what do you see if you put a pr

Re: [PHP] how to trap eval error?

2003-11-18 Thread Eugene Lee
On Tue, Nov 18, 2003 at 02:03:25PM -0800, david wrote: : : Cpt John W. Holmes wrote: : : > From: "david" <[EMAIL PROTECTED]> : >> : >> if(function_exists($function)){ : >> eval('$return = $function($input);'); : >> }else{ : >> // function does not exists : >> } : >> : >> which w

Re: [PHP]{OT} Prefilled forms

2003-11-18 Thread Eugene Lee
On Tue, Nov 18, 2003 at 02:52:42PM -0800, b b wrote: : : Some people don't read carefully before responding. I : didn't say he sent me a private email!!! Anyway it : would be appropriate not to forget to take out the : email addresses other than the php-general... when : clicking reply-all. I jus

Re: [PHP] Prefilled forms (solved)

2003-11-19 Thread Eugene Lee
On Tue, Nov 18, 2003 at 06:00:12PM -0800, b b wrote: : : No I am saying that if you have: : : : : and you click submit then if you click back to see : the form the value you set w2 will be blank. If you : reverse the order however then you will see what you : entered in w2 This is a client c

Re: [PHP] [PHP or maybe JavaScript or CSS] protecting my PHP from bad input

2003-11-19 Thread Eugene Lee
On Wed, Nov 19, 2003 at 08:18:32AM +0100, Miroslav I. wrote: : : #The problem: : This is about protecting my PHP from bad input (e.g.: letters instead : of numbers). Good idea. You need to make sure user-inputted data is valid. : ## : Is there a way to prevent user from even inputting a letter

Re: [PHP] [PHP or maybe JavaScript or CSS] protecting my PHP from bad input

2003-11-19 Thread Eugene Lee
On Wed, Nov 19, 2003 at 10:21:16AM +0100, Miroslav I. wrote: : : I'm familiar with the concepts, but I've seen sites with textboxes : that would not show any letter typed - only numbers are displayed in : the textbox. This is what I like but don't know how to achieve. :-) Base on what I mentione

Re: [PHP] Why is the php loop, 'for()', so slow????

2003-11-19 Thread Eugene Lee
On Wed, Nov 19, 2003 at 03:10:39PM -0500, Scott Fletcher wrote: : : Why does the for() loop for PHP so slow when it is digesting a large : amount of data? Is there a way to make the loop go faster? Maybe it's your for() loop that's constructed in a less optimal way. Some source code would he

Re: [PHP] Why is the php loop, 'for()', so slow????

2003-11-19 Thread Eugene Lee
On Wed, Nov 19, 2003 at 04:54:39PM -0500, Scott Fletcher wrote: : : "Ray" <[EMAIL PROTECTED]> wrote: : > try : > $res_str_len = strlen($res_str); : > for ($i=1;$i<$res_str_len;++$i) : > : > one less function call in the loop and the prefix version of ++ is : > sometimes a tad faster then the postf

Re: [PHP] RE: Prefilled forms (solved)

2003-11-20 Thread Eugene Lee
On Thu, Nov 20, 2003 at 11:22:02AM +0200, Veress Berci wrote: : : Scuse me, if I write some totally dumb thing. : I am quite new to PHP and programming, and maybe I'm not understanding : the question, but: : : What if you assign a value to every form field like this: : : : : or - safer, with r

Re: [PHP] Why is the php loop, 'for()', so slow????

2003-11-20 Thread Eugene Lee
On Thu, Nov 20, 2003 at 09:45:45AM -0500, Scott Fletcher wrote: : : I can give the strpos() a shot but I seem to have problem with getting the : strpos() to give me two seperate "" tags instead of just hte : first one only... Use the offset parameter: -- PHP General Mailing List (http

Re: [PHP] echo or print

2003-11-20 Thread Eugene Lee
On Thu, Nov 20, 2003 at 12:36:42PM -0500, John W. Holmes wrote: : : Jay Fitzgerald wrote: : > : >when should i use echo ' '; vs. print ' '; : : You should always use echo. It'll make a significant performance : increase in your scripts as it's only four letters instead of five. Also, the lett

Re: [PHP] detaching and running php processes in the background

2003-11-21 Thread Eugene Lee
On Fri, Nov 21, 2003 at 03:40:05AM -0700, Gary C. New wrote: : : What is the best way to detach and run a command line based php script : in the background from a web-based php script, without the need for : reporting? How about exec('command &') ? -- PHP General Mailing List (http://www.php

Re: [PHP] Crossed paths?

2003-11-21 Thread Eugene Lee
On Fri, Nov 21, 2003 at 06:09:44AM -0500, MIKE YRABEDRA wrote: : : A customer of mine has recently started to see a weird error. He will get : the typical 'open_basedir' error, but it will say his allowed path is : another clients allowed path??? See an example below. : : Warning : Unknown(): op

Re: [PHP] tar and ownership

2003-11-21 Thread Eugene Lee
On Fri, Nov 21, 2003 at 01:10:28PM -0500, Rodney Green wrote: : Marek Kilimajer wrote: : >Rodney Green wrote: : >> : >>I'm writing a script that downloads a tarball from an FTP server and : >>unpacks it into a directory. Here's the line of code that does this. : >> : >>exec("tar -C /scripts/ -zxv

Re: [PHP] echo or print

2003-11-21 Thread Eugene Lee
On Fri, Nov 21, 2003 at 07:55:05PM +0100, Wouter van Vliet wrote: : : (.. long bunch of HTML ..) : Jay asked , then Tom said . , then... Of course you could call htmlentities() on all of your variables in a previouw block. But then you cannot use the variables again unless you undo it with html_

Re: [PHP] Form with browse for file to upload "ftp"

2003-11-22 Thread Eugene Lee
On Sat, Nov 22, 2003 at 08:18:30PM -, PAUL FERRIE wrote: : : "Bronislav kluèka" <[EMAIL PROTECTED]> wrote in message : news:[EMAIL PROTECTED] : > : > User executing the script (www-data or nobody or some other user) has to : > vave the permission to wotk with this directory. : : eh? I think

Re: [PHP] A Tricky Time Calculation

2003-11-23 Thread Eugene Lee
On Sun, Nov 23, 2003 at 03:42:58PM -, Shaun wrote: : : Given the time range: 09:15 - 17:30 how can I tell how many 15 minute : intervals occur between these two times? Obviously here I can work it out, : but I need a calculation that will perform the maths for any two time : ranges...

Re: [PHP] HTML email enconding

2003-11-24 Thread Eugene Lee
On Mon, Nov 24, 2003 at 02:56:25PM +0530, Binay wrote: : : Is it necessary to encode the message using base64 or quoted-printable : format while sending the HTML email. Not always. Sometimes you can get away with only: Content-Type: text/html; charset="ISO-8859-1" Content-Transf

Re: [PHP] HTML email enconding

2003-11-24 Thread Eugene Lee
On Mon, Nov 24, 2003 at 03:33:57PM +0530, Binay wrote: : : So does it mean that if i don't encode the message then no need of : specifying the Content-Transfer-Encoding?? : And almost all mail client will interpret it correctly?? No. If your HTML message is guaranteed to be in the ISO-8859-1 ran

Re: [PHP] $ of variables, php, mysql

2003-11-25 Thread Eugene Lee
On Mon, Nov 24, 2003 at 09:42:30PM -0800, Joffrey Leevy wrote: : : Would appreciate in anyone can help me. Some more code would be helpful. : Let's say I do a query in php, eg. $query = "select : shed from structure"; With the mysql_fetch_array : function and a loop I could see all the values s

Re: [PHP] Add Reply-To to this list(s)

2003-11-25 Thread Eugene Lee
On Tue, Nov 25, 2003 at 04:57:41PM -, Thomas Svenson wrote: : : It would be nice if the moderator of this, and the other PHP-lists : could fix so the listserver automatically add a Reply-To header to all : the mails. : : When I hit Reply my message would then automatically reply to the list :

Re: [PHP] $ of variables, php, mysql

2003-11-25 Thread Eugene Lee
On Tue, Nov 25, 2003 at 11:38:27AM +0100, Marek Kilimajer wrote: : Eugene Lee wrote: : > : >Try using more variables to make life a little easier to parse: : > : > $colname = $_FORM['form'] : > $query = "select {$colname} from structure"; :

Re: [PHP] Add Reply-To to this list(s)

2003-11-25 Thread Eugene Lee
On Wed, Nov 26, 2003 at 02:51:58AM +0900, Dave G wrote: : : Telling people that they need to use proper email software and go : about things in the way they don't expect is not a path to sensible : human interfaces. Computers, machines, systems, should match us, not : us to them. In any case, de

Re: [PHP] array problems

2003-11-25 Thread Eugene Lee
On Tue, Nov 25, 2003 at 03:45:11PM -0500, Curtis Maurand wrote: : : Hello, : consider the following code (content.txt is tab delimited). : : $city = "Ipswitch"; : $content = fopen("content.txt", "r"); : $city_found = 0; : while (!feof($content) && $city_found == 0) : { : $my_line = fgets(

Re: [PHP] Add Reply-To to this list(s)

2003-11-25 Thread Eugene Lee
On Tue, Nov 25, 2003 at 10:27:10PM -, Thomas Svenson wrote: : Eugene Lee suggested: : > : > If you would stop using M$ Outlook and switch to a better mail client : > that supports mailing lists, your problem would be solved. : : I wouldn't mind that at all. What clients do you

Re: [PHP] Add Reply-To to this list(s)

2003-11-26 Thread Eugene Lee
uld be obliged to work within those rules. : "If you would stop using M$ Outlook and switch to a better mail : client..." - Eugene Lee, just some random person : MS Outlook suffers from code bloat, but that does not mean it : does not successfully do the task that I acquired it fo

Re: [PHP] Could some one check my code

2003-11-26 Thread Eugene Lee
On Wed, Nov 26, 2003 at 11:23:19AM -, PAUL FERRIE wrote: : : i am getting this error returned but i dont know why :( : error: : : Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result : resource in /home/pferrie/public_html/vinrev/adm/insert2.php on line 6 : : php file

Re: [PHP] Regular expressions

2003-11-27 Thread Eugene Lee
On Thu, Nov 27, 2003 at 01:20:57PM +0400, Sheni R. Meledath wrote: : : Could anybody help me to create a regular expression to remove a pattern : from a string. : : $querystring = http://10.100.1.7/cdms/prfl.phtml?action=search&custtype=1&gender=&x=22&y=10&page=2 : : I would like to remove "&p

Re: [PHP] array problems

2003-11-28 Thread Eugene Lee
On Thu, Nov 27, 2003 at 08:19:02PM -0500, Curtis Maurand wrote: : On Wednesday 26 November 2003 21:53, Marek Kilimajer mumble: : > Curtis Maurand wrote: : > > Sorry, its a typo. it should be: : > > : > > $city = "Ipswitch"; : > > $city_found = 0; : > > $contentfile = fopen("content.txt", "r"); : >

Re: [PHP] Suggestions for optimization?

2003-11-30 Thread Eugene Lee
On Sat, Nov 29, 2003 at 09:32:19AM -0800, Galen wrote: : : I'm working on some database search ranking code. It currently : represents 95-98% of the time spent when doing fuzzy seaches. I have : tried my best to optimize my code - algorithmic shortcuts, eliminating : session variables, unsettin

Re: [PHP] How to see the table structure

2003-11-30 Thread Eugene Lee
On Sun, Nov 30, 2003 at 11:53:41PM +0530, narayanan wrote: : : BlankCan any body tell how to view the structure of a table from php. : I was thinking around for the past two days. I am using postgresql : database. >From the command line psql monitor, do a "\d ". -- PHP General Mailing List (ht

Re: [PHP] Fastest loop code/best way to get database results into array

2003-12-01 Thread Eugene Lee
On Mon, Dec 01, 2003 at 03:24:35AM -0500, Robert Cummings wrote: : : On Mon, 2003-12-01 at 03:06, Galen wrote: : > : > I'm working on some code that deals with a LOT of results from a MySQL : > database and drops them into an array. It deals with about 17,200 : > results on a very fast box in ab

Re: [PHP] file uploads

2003-12-01 Thread Eugene Lee
On Mon, Dec 01, 2003 at 02:00:34PM +, Jon Bennett wrote: : : Hi Chris, : : I think you're referring to this: : : $_FILES["image"]["tmp_name"] : : In my class I pass this as a reference: : : $aArgs['Image'] = $_FILES["image"]; : : Then, $aImage in my storeBigImage() method is passed the :

Re: [PHP] Evaluating a page in a different order

2003-12-03 Thread Eugene Lee
On Wed, Dec 03, 2003 at 11:42:09AM -, [EMAIL PROTECTED] wrote: : : I have a php page class that i use as a template for my website. Every : page in my website creates an instance of the class and passes values : like title and meta tag keywords. The class includes the layout from : different

Re: [PHP] enable_trans_sid problem

2003-12-12 Thread Eugene Lee
On Fri, Dec 12, 2003 at 09:49:29AM -0500, Ewald Geschwinde wrote: : : I have the following problem : : I have htmlcode like this: : : : : and with this feature : it's printed out like this: : : : : : The problem is the /> at the end. : : Has anyone seen this before? : What can I do agains

Re: [PHP] ereg is failing on this simple test

2003-12-13 Thread Eugene Lee
On Fri, Dec 12, 2003 at 07:54:16PM -0800, Manuel Ochoa wrote: : : Why is this test failing? : : $data = "A Simple test."; : If (ereg("^[a-zA-Z0-9\s.\-_']+$", $data)) { : echo "Valid text"; : } : else { : echo "Not valid text"; : } You can't use the character class "\s" within a range. And

Re: [PHP] Email problem

2003-12-15 Thread Eugene Lee
On Mon, Dec 15, 2003 at 12:05:54PM -0800, Naveen Glore wrote: : : I have freebsd server with apache, PHP and mysql. i wrote a simple PHP : program using mail(). The mail() function returns true without any : error. but the problem is the email is never delivered. I viewed the : log file for mail(/

Re: [PHP] Email problem

2003-12-15 Thread Eugene Lee
On Mon, Dec 15, 2003 at 12:58:17PM -0800, Naveen Glore wrote: : : thanks for the quick response. I have the same permissions as yours. : My email server is working fine, i use sendmail MTA and outlook MUA. I : am able to send emails and view my received emails in outlook through : my server. But I

<    1   2   3   >