Re: [PHP] Optional Vars in Functions

2004-01-02 Thread Eugene Lee
On Fri, Jan 02, 2004 at 01:20:50PM -0800, Chris wrote: : Jason Williard asked: : : Is there a way to make a variable of a function optional? : : http://www.php.net/functions More specifically: http://www.php.net/manual/en/functions.arguments.php e.g. function puke ($stuff =

Re: [PHP] [posibleOT] Forcing entering te site thru index.php

2003-12-21 Thread Eugene Lee
On Sun, Dec 21, 2003 at 03:57:24PM -0300, Fernando M. Maresca wrote: : : Well, i'm trying to avoid access to the site for the middle. Say there : is a initial page with a form and other pages that depends on this. Is : there a way to force users access the site thru the initial form page, :

Re: [PHP] [posibleOT] Forcing entering te site thru index.php

2003-12-21 Thread Eugene Lee
On Sun, Dec 21, 2003 at 04:11:36PM -0300, Fernando M. Maresca wrote: : On Sun, Dec 21, 2003 at 01:03:43PM -0600, Eugene Lee wrote: : On Sun, Dec 21, 2003 at 03:57:24PM -0300, Fernando M. Maresca wrote: : : : : Well, i'm trying to avoid access to the site for the middle. Say

Re: [PHP] [posibleOT] Forcing entering te site thru index.php

2003-12-21 Thread Eugene Lee
On Mon, Dec 22, 2003 at 01:09:37AM +0100, Andreas Magnusson wrote: : : You can use the Referer header found in $_SERVER['HTTP_REFERER'] to check : from which page the user comes from. Unfortunately, HTTP_REFERER is not guaranteed to exist. In fact, several Windoze firewall software actively

Re: [PHP] Update issue - more then likely simple problem

2003-12-18 Thread Eugene Lee
On Thu, Dec 18, 2003 at 01:39:57PM +1100, Eric Holmstrom wrote: What im trying to do is read the information from a field in a table called PARTNO. Then add RU to the front of whatever is in the PARTNO field. So far i have this. //connect details rarara //query $query= SELECT PARTNO

Re: [PHP] php special permissions

2003-12-18 Thread Eugene Lee
On Thu, Dec 18, 2003 at 12:24:21PM +, Mat Harris wrote: : : I am building a web interface to the vacation autoresponder program : on linux. : : I let users login, edit their message and enable the autoresponder. : : The last step (enabling) is where the fun begins because php is run :

Re: [PHP] php special permissions

2003-12-18 Thread Eugene Lee
On Thu, Dec 18, 2003 at 12:52:14PM +, Mat Harris wrote: : On Thu, Dec 18, 2003 at 06:42:37 -0600, Eugene Lee wrote: : On Thu, Dec 18, 2003 at 12:24:21PM +, Mat Harris wrote: : : : : I am building a web interface to the vacation autoresponder program : : on linux. : : : : I let

Re: [PHP] Round() behaviour issue

2003-12-16 Thread Eugene Lee
On Tue, Dec 16, 2003 at 11:13:25AM +, Scott McDaid wrote: : : Hi there. I've been looking at the behaviour of the round functionality in : PHP. We're currently still using v4.2.3, (but the documentation seems to : suggest it's the same for versions after this). : : Doing the following

Re: [PHP] Re: Opening large file problem - fopen

2003-12-16 Thread Eugene Lee
On Tue, Dec 16, 2003 at 01:30:14PM +0100, Kim Steinhaug wrote: : : I found out that what the script accually does is choke on \n\n, : empty lines. I havnt found a way to solve this with the script, : : What I do now is use TextPad and just replace all occurencies : of \n\n with \n-\n or

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

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

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 you need

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: : form name=login method=post : /form : : and with this feature : it's printed out like this: : : form name=login method=postinput type=hidden name=SID :

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] 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 about

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] 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,

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 tablename. -- PHP General Mailing

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); : while

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=searchcusttype=1gender=x=22y=10page=2 : : I would like to remove page=2

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

2003-11-26 Thread Eugene Lee
. : 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 for, which is to : receive, send, and filter my email

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] $ 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

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; : $result = mysql_query($query); : while

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,

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 =

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 recommend

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

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

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] 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 he

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

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():

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 ?=$Question?, then Tom said ? echo $Answer; ?. ?php I don't like this because it doesn't protect your content from being misinterpreted. It should be more like: Jay asked ?php

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: : : input type=text

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 !CDATA[[]] tags instead of just hte : first one only... Use the offset parameter: ?php $haystack

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. p

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: : input type name = w1 value = lkjlkjlj : input type ... name =w2 : : 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

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

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

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 postfix

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 the - bit

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

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', '[wh]ood', '[^as]eed

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? : : html : script language=JavaScript : function boo() { : window.open

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

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 works quit nicely for

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

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

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

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

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

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

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 mailto:[EMAIL PROTECTED] : 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] 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...

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 length,

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

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

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 ofcourse

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

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.

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] \n and br

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 br : : 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 br : : No, but you can

Re: [PHP] \n and br

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 br / tags which do : not always work on all browsers (especially browsers not explicitly : advertised to be XHTML-compliant). : : Can

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. In fact, most kana by themselves have

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 called it simplified kanji. : : I

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 :

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. Japanese

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

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

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] 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 column

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

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

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.

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

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? : : JavaScript and HTML

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: : : form method=post action=\basics\quotation-add Backslashes are allowed? -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

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

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.htm :

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

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 /h1 tag. : : ?php : session_start(); : header(Cache-control: private); : echo html : headtitlelogout/title : /head : body : h1 align=\center\Logout page/h1; : $_SESSION = array(); :

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 =

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... : : td valign=top : ?php echo $row_rsVandyDivAddresses['First_Name']; ? ?php echo :

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

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

Re: [PHP] Print mysql errors

2003-10-21 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-21 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

  1   2   3   >