Re: [PHP] php +html mail

2007-03-17 Thread Tijnema !
On 3/17/07, Wasantha De Silva <[EMAIL PROTECTED]> wrote: Dear all, I want get a help from you for some php codes. How can I get it. Regards wasantha Maybe you can make yourself a little bit more clear? What code do you have atm, what do you want us to help with? Tijnema -- PHP General Mai

[PHP] Mail function undefined in PHP6

2007-03-17 Thread Tijnema !
Hi, I have PHP6 installed (Snapshot:200703141130) and somehow it says now that the mail function is undefined, i have sendmail installed in /usr (is in $PATH) my configure command: './configure' '--prefix=/usr' '--with-pear' '--enable-all' '--with-apxs2' '--without-fbsql' '--without-interbase' '

Re: [PHP] php +html mail

2007-03-17 Thread Martin Marques
On Sat, 17 Mar 2007, Wasantha De Silva wrote: Dear all, I want get a help from you for some php codes. Use google. There is plenty of code out there. -- 21:50:04 up 2 days, 9:07, 0 users, load average: 0.92, 0.37, 0.18 - Lic. Martí

Re: [PHP] Getting last record ID created from DB

2007-03-17 Thread Mark
Rod Person wrote: > On Fri, 16 Mar 2007 22:28:54 -0500 > "Jeff" <[EMAIL PROTECTED]> wrote: > >> Is there a way to get the last Record # created by the DB. >> > >> >> $query = "INSERT INTO `t_users` (`user_id`, `f_name`, `l_name`, >> `e_mail`, `b_date`, `pic`) VALUES ('', '$f_name', '$l_name',

Re: [PHP] Mail function undefined in PHP6

2007-03-17 Thread Robert Cummings
On Sat, 2007-03-17 at 11:07 +0100, Tijnema ! wrote: > Hi, > > I have PHP6 installed (Snapshot:200703141130) and somehow it says now > that the mail function is undefined, i have sendmail installed in /usr > (is in $PATH) > my configure command: > > './configure' '--prefix=/usr' '--with-pear' '--e

[PHP] Re: Getting last record ID created from DB

2007-03-17 Thread Mark
Jeff wrote: > Is there a way to get the last Record # created by the DB. > > Example: > > User_ID = auto_increment > f_name = varchar > l_name = varchar > e-mail = varchar > b_date = varchar > pic = varchar > > > Since user_id is an auto_inc field I submit it as a NULL, also I haven't > starte

[PHP] Re: Getting last record ID created from DB

2007-03-17 Thread Colin Guthrie
Philip Thompson wrote: > For auto increment values, you don't have to specify the id. For example: > > INSERT INTO t_users (f_name, l_name, e_mail, b_date, pic) > VALUES ('$f_name', '$l_name', '$e_mail', '$b_date', null); > > Then to find the latest entry: > > SELECT user_id FROM t_users ORDER B

[PHP] Re: Getting last record ID created from DB

2007-03-17 Thread Colin Guthrie
Mark wrote: >> select user_id from t_users where user_id = (select max(user_id) from >> t_users) >> > > It should be noted that that is the absolute 100% WRONG way to do it. If > your site has any concurrency, you will almost certainly get the wrong > user. I agree 100% that it is 100% wrong, but

Re: [PHP] Getting last record ID created from DB

2007-03-17 Thread Mark
Philip Thompson wrote: > On Mar 16, 2007, at 10:28 PM, Jeff wrote: > >> Is there a way to get the last Record # created by the DB. >> >> Example: >> >> User_ID = auto_increment >> f_name = varchar >> l_name = varchar >> e-mail = varchar >> b_date = varchar >> pic = varchar >> >> >> Since user_id

[PHP] Re: Re: Getting last record ID created from DB

2007-03-17 Thread Mark
Colin Guthrie wrote: > Mark wrote: >>> select user_id from t_users where user_id = (select max(user_id) from >>> t_users) >>> >> >> It should be noted that that is the absolute 100% WRONG way to do it. If >> your site has any concurrency, you will almost certainly get the wrong >> user. > > I ag

Re: [PHP] Re: Getting last record ID created from DB

2007-03-17 Thread Myron Turner
Colin Guthrie wrote: Philip Thompson wrote: For auto increment values, you don't have to specify the id. For example: INSERT INTO t_users (f_name, l_name, e_mail, b_date, pic) VALUES ('$f_name', '$l_name', '$e_mail', '$b_date', null); Then to find the latest entry: SELECT user_id FROM t_us

Re: [PHP] Re: Getting last record ID created from DB

2007-03-17 Thread Robert Cummings
On Sat, 2007-03-17 at 09:43 -0500, Myron Turner wrote: > Colin Guthrie wrote: > > Philip Thompson wrote: > > > >> For auto increment values, you don't have to specify the id. For example: > >> > >> INSERT INTO t_users (f_name, l_name, e_mail, b_date, pic) > >> VALUES ('$f_name', '$l_name', '$e_m

[PHP] form validation

2007-03-17 Thread al phillips
I found the error in my previous question about parse just a simple ; at the end. I'm trying to validate some textfields especially name fields and email addresses. I'm having a little trouble writing the code using classes and regular expressions? I would like to validate the input from

Re: [PHP] Re: Getting last record ID created from DB

2007-03-17 Thread Mark
Robert Cummings wrote: > On Sat, 2007-03-17 at 09:43 -0500, Myron Turner wrote: >> Colin Guthrie wrote: >> > Philip Thompson wrote: >> > >> >> For auto increment values, you don't have to specify the id. For >> >> example: >> >> >> >> INSERT INTO t_users (f_name, l_name, e_mail, b_date, pic) >>

Re: [PHP] Re: Getting last record ID created from DB

2007-03-17 Thread Robert Cummings
On Sat, 2007-03-17 at 12:19 -0400, Mark wrote: > Robert Cummings wrote: > > > On Sat, 2007-03-17 at 09:43 -0500, Myron Turner wrote: > >> Colin Guthrie wrote: > >> > Philip Thompson wrote: > >> > > >> >> For auto increment values, you don't have to specify the id. For > >> >> example: > >> >> >

Re: [PHP] Mail function undefined in PHP6

2007-03-17 Thread Tijnema !
On 3/17/07, Robert Cummings <[EMAIL PROTECTED]> wrote: On Sat, 2007-03-17 at 11:07 +0100, Tijnema ! wrote: > Hi, > > I have PHP6 installed (Snapshot:200703141130) and somehow it says now > that the mail function is undefined, i have sendmail installed in /usr > (is in $PATH) > my configure comman

Re: [PHP] Re: Getting last record ID created from DB

2007-03-17 Thread Myron Turner
Robert Cummings wrote: On Sat, 2007-03-17 at 09:43 -0500, Myron Turner wrote: An earlier post called attention to a concurrency problem. Wouldn't getting the last inserted ID from LAST_INSERT_ID() suffer from the same limitations as any of the other solutions which do a select to get the

Re: [PHP] Re: Getting last record ID created from DB

2007-03-17 Thread markw
> On Sat, 2007-03-17 at 12:19 -0400, Mark wrote: >> Robert Cummings wrote: >> >> > On Sat, 2007-03-17 at 09:43 -0500, Myron Turner wrote: >> >> Colin Guthrie wrote: >> >> > Philip Thompson wrote: >> >> > >> >> >> For auto increment values, you don't have to specify the id. For >> >> >> example: >>

Re: [PHP] Re: Getting last record ID created from DB

2007-03-17 Thread Satyam
- Original Message - From: There in lies the biggest problem with LAMP, and that's MySQL. The architecture of your methodology *only* works with MySQL, and not more capable databases like Oracle, DB2, or even PostgreSQL. If you rely on oddities of a particular system, then you are doo

[PHP] Re: php +html mail

2007-03-17 Thread Haydar TUNA
Hello, If you are new to php or other web technologies, you can find many information,examples about PHP and other web technologies in http://www.w3schools.com/ web sites. This is a great web site for web technology education. :) -- Haydar TUNA Republic Of Turkey - Ministry of National

Re: [PHP] Re: Getting last record ID created from DB

2007-03-17 Thread Robert Cummings
On Sat, 2007-03-17 at 14:08 -0400, markw@mohawksoft.com wrote: > > On Sat, 2007-03-17 at 12:19 -0400, Mark wrote: > >> Robert Cummings wrote: > > There in lies the biggest problem with LAMP, and that's MySQL. The > architecture of your methodology *only* works with MySQL, and not more > capable dat

[PHP] works at command line but not in apache

2007-03-17 Thread rwhartung
Hi, I have this short php script: [op;ening removed. $db = pg_connect('dbname=bpsimple user=minitwr password=RWHart') ; print $db . "" . "\n" ; if ($db) { print 'Connection attempt succeeded.' . "" . "\n" ; } else { print 'Connection attempt failed.'. "" . "\n" ; } $query = '

Re: [PHP] works at command line but not in apache

2007-03-17 Thread Tijnema !
On 3/17/07, rwhartung <[EMAIL PROTECTED]> wrote: Hi, I have this short php script: [op;ening removed. $db = pg_connect('dbname=bpsimple user=minitwr password=RWHart') ; print $db . "" . "\n" ; if ($db) { print 'Connection attempt succeeded.' . "" . "\n" ; } else { print 'Con

[PHP] glob(path_pattern, GLOB_ONLYDIR)

2007-03-17 Thread Al
I can't use flag "GLOB_ONLYDIR" to work on a Linux, php4.4.4. I only want the dirs. This works; sort of: print_r(glob('../*',)); //It lists all the files AND directories. Yet it seems to ignore the lack of ".*" and finds xxx.yyy. That's OK, I can delete the files This fails: print_r(glob('.