[PHP] Re: PHp Books

2004-02-11 Thread rush
"Rajani Anand Iyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Can someone recommend some good books on PHP Advanced topics. here is my (amazon) list http://www.templatetamer.org/index.php?RecommendedBooks rush -- http://www.templatetamer.com/ -- PHP General Mailing List (ht

Re: [PHP] weird header() (bug may be)

2004-02-11 Thread Chris Shiflett
--- adwinwijaya <[EMAIL PROTECTED]> wrote: > if($foo == 'something'){ > header('Location:to_another_page.php') ; > }else > { >do another thing in here > } > > header('Location:to_previous_page.php'); > > > I got a problem ... when $foo == 'something' .. it wont redi

Re: [PHP] weird header() (bug may be)

2004-02-11 Thread joel boonstra
On Thu, Feb 12, 2004 at 05:20:29PM +1100, adwinwijaya wrote: > Hello php-generaler's , > > I have a script like this : > > if($foo == 'something'){ > header('Location:to_another_page.php') ; > }else > { >do another thing in here > } > > header('Location:to_previous_

Re: [PHP] Re: weird header() (bug may be)

2004-02-11 Thread Jason Wong
On Thursday 12 February 2004 14:40, Eric Bolikowski wrote: > Headers have to be pretty accurate, or it will cause trouble. > And your redirect header is not quite correct. > It should be this: > header("Location: another_page.php"); > and NOT header("Location:another_page.php"); > > What you need h

[PHP] Re: weird header() (bug may be)

2004-02-11 Thread Eric Bolikowski
Headers have to be pretty accurate, or it will cause trouble. And your redirect header is not quite correct. It should be this: header("Location: another_page.php"); and NOT header("Location:another_page.php"); What you need here is a space between "Location:" and the URL. "Adwinwijaya" <[EMAIL P

php-general Digest 12 Feb 2004 06:20:40 -0000 Issue 2585

2004-02-11 Thread php-general-digest-help
php-general Digest 12 Feb 2004 06:20:40 - Issue 2585 Topics (messages 177436 through 177477): Re: [Q]PHP not taking input values from forms 177436 by: Richard Davey 177437 by: John Nichel 177440 by: Dan Aloma 177441 by: Richard Davey 177442 by: Dan Alo

[PHP] weird header() (bug may be)

2004-02-11 Thread adwinwijaya
Hello php-generaler's , I have a script like this : if($foo == 'something'){ header('Location:to_another_page.php') ; }else { do another thing in here } header('Location:to_previous_page.php'); I got a problem ... when $foo == 'something' .. it wont redirect me

RE: [PHP] Re: I think this is a mysql question

2004-02-11 Thread Ronald Ramos
create table oras( NameVARCHAR(30), TimeIn DATETIME, TimeOut DATETIME, Total DATETIME ); insert into oras values('Nhadie','2004-10-10 10:10:00','2004-11-11 12:12:00','TIMEDIFF(TimeIn,TImeOut)'); Hi, Are those correct? Because the value on the Total field is 000-00-00 00:00:00. I think ther

Re: [PHP] Newbie questions

2004-02-11 Thread John Nichel
Jason Wong wrote: Anything else anyone could tell me would be great! Depends on what you want to know. Almost every problem that you will come across will be covered in: - the php manual - the list archives - google Don't forget about Mr. Holmes. I betcha he's got php scribbled all over t

[PHP] Re: PHP FILE SIZE LIMIT

2004-02-11 Thread André Cerqueira
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 everything has a limit, but im sure in this case you are under it big time ive seen ppl running 1-2megs scripts hehe Matthew Oatham wrote: hi is there a limit to the filesize of a php ? I know tomcat had limits on the file size of jsps. My problem

Re: [PHP] Newbie questions

2004-02-11 Thread Jason Wong
On Thursday 12 February 2004 01:03, James Marcinek wrote: > I have a couple of questions I'd like to ask: > > 1.) Are there built in libraries to connect to DB2? > Nothings clear from the documentation I've read. I see > that there's libraries for Oracle, Informix, MySQL. Apparently so, ask googl

Re: [PHP] A dumb question

2004-02-11 Thread Paul Furman
Chris W. Parker wrote: Chris W. Parker <> on Wednesday, February 11, 2004 11:45 AM said: I think in this is what's called a reference. Sounds like that's simply a way of making an alias for a variable: http://us2.php.net/manual/en/language.references.php -- PHP General Mailing List (http://

Re: [PHP] [Q]PHP not taking input values from forms

2004-02-11 Thread André Cerqueira
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 time() is only echo'ed if $_POST['submit'] is something on this case maybe he has a really old version of php... $HTP_POST_VARS...? do what Richard Davey is saying, on the top Richard Davey wrote: Hello Dan, Wednesday, February 11, 2004, 6:39:35 PM,

[PHP] Re: date() funtion language

2004-02-11 Thread André Cerqueira
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 i had problems with locale i think its safer to make a dayname and monthname array, and use getdate(), than build the string yourself like: function date_wrapper($format, $timestamp=NULL) { global $wdayname_array, $monthname_array; if

[PHP] PHP FILE SIZE LIMIT

2004-02-11 Thread Matthew Oatham
hi is there a limit to the filesize of a php ? I know tomcat had limits on the file size of jsps. My problem is I have a 13kb php file when I add some more lines of code to it the html output becomes currupt - it could well be bad html but I cant find it so thought I would ask this question?

[PHP] Re: I think this is a mysql question

2004-02-11 Thread Justin Patrin
Ronald Ramos wrote: How can I use PHP to compute the difference between two dates(with time)? Let's say in mysql, I have field 1, login, and on field 2, I have logout. How can I compute the diffrence between login and logut and output it on field 3 let's say totaltime. Is this a mysql question? Or

[PHP] I think this is a mysql question

2004-02-11 Thread Ronald Ramos
How can I use PHP to compute the difference between two dates(with time)? Let's say in mysql, I have field 1, login, and on field 2, I have logout. How can I compute the diffrence between login and logut and output it on field 3 let's say totaltime. Is this a mysql question? Or can PHP actually d

RE: [PHP] form array

2004-02-11 Thread Martin Towell
Matthew, use $_POST/$_GET/$_REQUEST (depending on your form method) and foreach() eg: foreach($_POST['image'] as $key=>$value) { echo "$key -> $value\n"; } Martin > -Original Message- > From: Matthew Oatham [mailto:[EMAIL PROTECTED] > Sent: Thursday, 12 February 2004 11:29

[PHP] form array

2004-02-11 Thread Matthew Oatham
Hi, I have a form on page1 that i want to submit to another php page - page2 the form has the fields Basically I want to have these form field values as an array of values I can loop through on page 2 but what do I put on page 2 too get the array and loop through ? Thanks. -- PHP General

Re[2]: [PHP] mutliple select form not passing multiple values

2004-02-11 Thread Richard Davey
Hello Ben, Wednesday, February 11, 2004, 9:38:38 PM, you wrote: BR> Ah-ha! I missed that, and I always do. Let's hope I don't anymore. BR> While we're on the subject, why is PHP set up this way? Why can't it BR> just add the elements to the array automatically, since adding the BR> square brac

RE: [PHP] uploaded files are corrupted

2004-02-11 Thread Pablo Gosse
> I have a script that allows the user to browse his/her local hard drive for > a file and email it as an attachment. Text files come through OK but any > binary type file, e.g., JPEG or PDF arrive broken. JPEG will show as a red > X in my browser and Adobe will complain about the PDF. I don't

[PHP] Re: replace ' with "

2004-02-11 Thread Kim Steinhaug
Depending on the use you might also want to look at this one : htmlentities() If working with mySQL inserts consider this aswell : mysql_escape_string() And finally, javascripts in HTML doesnt like either the ' " or the equivilant htmlentities. I just wash them away direkt if i need to output som

Re: [PHP] mutliple select form not passing multiple values

2004-02-11 Thread Ben Ramsey
Ah-ha! I missed that, and I always do. Let's hope I don't anymore. While we're on the subject, why is PHP set up this way? Why can't it just add the elements to the array automatically, since adding the square brackets to one's HTML form name is not a standard practice? Richard Davey wrote:

Re: [PHP] mutliple select form not passing multiple values

2004-02-11 Thread Richard Davey
Hello Ben, Wednesday, February 11, 2004, 9:22:33 PM, you wrote: BR> Am I doing something wrong? Yup :) It needs to be: mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[4]: [PHP] [Q] Problems invoking a PHP script - Have no hair left to pull - Please help [:-)

2004-02-11 Thread Richard Davey
Hello Tony, Wednesday, February 11, 2004, 9:16:18 PM, you wrote: TDS> That was the problem. The PHP book I have doesn't mention $_GET or $_POST. TDS> The exercises right from the beginning use register_globals. I didn't TDS> realise they were turned off by default. Whoever wrote that book ought

[PHP] mutliple select form not passing multiple values

2004-02-11 Thread Ben Ramsey
I'm running PHP 5.0b3, so I'm not sure whether this is an issue with the version of PHP I'm running. I've got a select field in a form that is allowing multiple selects: Banner Manager Calendar of Events Contacts Elections Emergency Notices Employment Opportunites FA

[PHP] Re: Zlib - Insert files?

2004-02-11 Thread Markus Fischer
Hi, basically, gzip is only about compression of data. If you want compress more than one file at once, you need to put it into an archive before, e.g. a tar archive. Then you can compress this tar-Archive (single file) width gzip. HTH, - Markus -- PHP General Mailing List (http://www.php.net/

[PHP] Please help me understand gmmktime()

2004-02-11 Thread Richard Day
Hello: Environment: Linux server PHP 4.3.4 This code: echo ''.strftime('%T %Z',mktime()).', Timestamp='.mktime(); echo ''.strftime('%T GMT',gmmktime()).', Timestamp='.gmmktime(); yields this result: 23:52:08 EST, Timestamp=1076475128 18:52:08 GMT, Timestamp=1076457128

[PHP] Re: array data

2004-02-11 Thread memoimyself
Hello Imran, On 12 Feb 2004 at 1:17, Imran Asghar wrote: > Hi, > > Is not working, is it correct way > > File1.php > > > > > > File2.php > > echo $colors[0]; > echo $colors[1]; > echo $colors[2]; > echo $colors[4]; > ?> > > > > imee > I'm afraid

[PHP] Re: Sessions on Win2k

2004-02-11 Thread memoimyself
Hello Don, On 11 Feb 2004 at 11:19, Donpro wrote: > I've searched the archives and note that many have probelms using session on > a Win2K server. I am getting a > > Undefined index: sessions in > D:\inetpub\mydomain\www\forms\formmail\formmail.php on line 768 > > error. Line 768 is: sessio

RE: [PHP] A dumb question

2004-02-11 Thread Chris W. Parker
Chris W. Parker <> on Wednesday, February 11, 2004 11:45 AM said: > I think in this it's what's called a reference. Don't know much else. > :) Ok that should be "I think this is what's called"... had to correct that. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: h

Re: [PHP] parse error, unexpected $

2004-02-11 Thread Hugh Danaher
Bruno, This often occurs when there is no closing bracket " } " for a conditional statement or a loop. hth Hugh - Original Message - From: "Bruno Mattarollo" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 11, 2004 2:51 AM Subject: Re: [PHP] parse error, unexpected $

RE: [PHP] A dumb question

2004-02-11 Thread Chris W. Parker
Jeremy Schroeder on Wednesday, February 11, 2004 11:39 AM said: > What does the ampersand do in the bottom example code, they both work. > > $n1 = $num1 -> function(); > $n1 = & $num1 -> function(); I think in this it's what's called a reference. Don't know much el

[PHP] A dumb question

2004-02-11 Thread Jeremy Schroeder
Hey Group I am starting to write class and objects and came across some syntax that I dont understand. What does the ampersand do in the bottom example code, they both work. $n1 = $num1 -> function(); $n1 = & $num1 -> function(); -Blake -- PHP General Mailing List (http://www.php.net/) To unsu

Re: [PHP] date() funtion language

2004-02-11 Thread Richard Davey
Hello Thiago, Wednesday, February 11, 2004, 8:03:47 PM, you wrote: TP> Does any one knows how do I set my date() function to return the days TP> of the week and moth in my own language (brazilian portuguese)? setlocale() -- Best regards, Richardmailto:[EMAIL PROT

[PHP] date() funtion language

2004-02-11 Thread Thiago Pavesi
Hello, Does any one knows how do I set my date() function to return the days of the week and moth in my own language (brazilian portuguese)? Thanks, Thiago Pavesi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Help with ldap_add

2004-02-11 Thread Chakravarthy Cuddapah
I am using RedHat Enterprise Linux (ES). Installed openldap, php, apache latest versions. All except ldap_add functions are working. When I use ldapadd at the terminal it works adding entries to ldap. But when I use php ldap_add , error code shows it is Success. But does not add any entires to

Re: [PHP] Undefined function

2004-02-11 Thread Dominique ANOKRE
Ok, everything run now ! the problem was the path to the database. You must indicate like this : $host = localhost:c:\path\to\databasename Thanks you !! - Original Message - From: "John Nichel" <[EMAIL PROTECTED]> To: "Dominique ANOKRE" <[EMAIL PROTECTED]> Cc: "Php List" <[EMAIL PROTECTED

Re: [PHP] [Q]PHP not taking input values from forms

2004-02-11 Thread John Nichel
Dan Aloma wrote: I tried adding that code you gave me, but all it does go back to the same page, and doesn't echo out the time(); results. I can't seem to figure it out for the life of me. like i said, everything else in php is working fine, except for this. Fill in some values for your form fi

Re[6]: [PHP] [Q]PHP not taking input values from forms

2004-02-11 Thread Richard Davey
Hello Dan, Wednesday, February 11, 2004, 6:39:35 PM, you wrote: DA> they're being tested on a testing machine we use. I know PHP is (rather DA> appears to be) working fine. Why would it be parsing files fine and calling DA> phpinfo() fine, but not being able to take input values. that's strange..

RE: Re[4]: [PHP] [Q]PHP not taking input values from forms

2004-02-11 Thread Dan Aloma
they're being tested on a testing machine we use. I know PHP is (rather appears to be) working fine. Why would it be parsing files fine and calling phpinfo() fine, but not being able to take input values. that's strange From: Richard Davey <[EMAIL PROTECTED]> Reply-To: Richard Davey <[EMAIL

Re[4]: [PHP] [Q]PHP not taking input values from forms

2004-02-11 Thread Richard Davey
Hello Dan, Wednesday, February 11, 2004, 6:32:16 PM, you wrote: DA> I tried adding that code you gave me, but all it does go back to the same DA> page, and doesn't echo out the time(); results. I can't seem to figure it DA> out for the life of me. like i said, everything else in php is working fi

RE: Re[2]: [PHP] [Q]PHP not taking input values from forms

2004-02-11 Thread Dan Aloma
I tried adding that code you gave me, but all it does go back to the same page, and doesn't echo out the time(); results. I can't seem to figure it out for the life of me. like i said, everything else in php is working fine, except for this. From: Richard Davey <[EMAIL PROTECTED]> Reply-To: Ri

RE: [PHP] question {way OT}

2004-02-11 Thread Jay Blanchard
[snip] Did you forget your mind-reading helmet at home today? [/snip] I have both kinds of ESP.ESPn & ESPn2 :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] question

2004-02-11 Thread John Nichel
Chris W. Parker wrote: Meramec Challenge Paintball, LLC on Wednesday, February 11, 2004 7:40 AM said: I'm glad you put "question" in your subject line because for a minute there I thought you were sending me a note of praise. I realized you weren't once I read your i

Re: [PHP] [Q]PHP not taking input values from forms

2004-02-11 Thread John Nichel
Dan Aloma wrote: Sorry about not including code the first time. Here is a snippet of code I am fairly certain should be doing something. Thank you SOOO much for the help. I've been working on setting up php for four days now and EVERYTHING else works (phpinfo() calls, etc), but for some reason

Re[2]: [PHP] [Q]PHP not taking input values from forms

2004-02-11 Thread Richard Davey
Hello Dan, Wednesday, February 11, 2004, 6:01:21 PM, you wrote: DA> Sorry about not including code the first time. Here is a snippet of code I DA> am fairly certain should be doing something. Thank you SOOO much for the Your code is (mostly) fine. The only part that didn't work is the final "the

Re: [PHP] Using a perl regex

2004-02-11 Thread Michal Migurski
>I am trying to use a perl regular expression to validate a form field >where I am allowing someone to edit a sql date-time stamp in the format >of '2004-02-05 21:43:34'. Just FYI, strtotime() provides date/time validation for free - check the input using strtotime() and date('Y-m-d H:i:s') to get

RE: [PHP] question

2004-02-11 Thread Chris W. Parker
Meramec Challenge Paintball, LLC on Wednesday, February 11, 2004 7:40 AM said: I'm glad you put "question" in your subject line because for a minute there I thought you were sending me a note of praise. I realized you weren't once I read your informative subject line

Re: [PHP] [Q]PHP not taking input values from forms

2004-02-11 Thread Dan Aloma
Sorry about not including code the first time. Here is a snippet of code I am fairly certain should be doing something. Thank you SOOO much for the help. I've been working on setting up php for four days now and EVERYTHING else works (phpinfo() calls, etc), but for some reason forms, even ones t

RE: [PHP] [Q]PHP not taking input values from forms

2004-02-11 Thread Shaunak Kashyap
Please post your code. It makes it easier to understand the problem. Shaunak > -Original Message- > From: Dan Aloma [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 11, 2004 12:47 PM > To: [EMAIL PROTECTED] > Subject: [PHP] [Q]PHP not taking input values from forms > > > Can anyone

Re: [PHP] [Q]PHP not taking input values from forms

2004-02-11 Thread Richard Davey
Hello Dan, Wednesday, February 11, 2004, 5:47:21 PM, you wrote: DA> Can anyone tell me why PHP is not taking any values I give it? In other DA> words, if I post something it doesn't accept any of those values. I have set DA> register_globals to on, which is the only thing I could think of that wo

Re: [PHP] [Q]PHP not taking input values from forms

2004-02-11 Thread John Nichel
Dan Aloma wrote: Can anyone tell me why PHP is not taking any values I give it? In other words, if I post something it doesn't accept any of those values. I have set register_globals to on, which is the only thing I could think of that would be doing this. I'm a newbie to php, and I've scoured

[PHP] [Q]PHP not taking input values from forms

2004-02-11 Thread Dan Aloma
Can anyone tell me why PHP is not taking any values I give it? In other words, if I post something it doesn't accept any of those values. I have set register_globals to on, which is the only thing I could think of that would be doing this. I'm a newbie to php, and I've scoured the net for an ans

[PHP] Getting image size for a compressed flash movie

2004-02-11 Thread Shaunak Kashyap
Is there any way in PHP to get the height and width attributes of a compressed flash movie? I have tried getimagesize() which seems to work for uncompressed flash movies but will not work for compressed movies. TIA Shaunak -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Sessions on Win2k

2004-02-11 Thread Alex Hogan
Sorry..., my bad I was just relating what I thought had been related to me for the same question. I think I'll stick to the asking and not the answering for a while longer... Gotta go goose is waiting.. > -Original Message- > From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED]

Re: [PHP] Using a perl regex

2004-02-11 Thread Verdon Vaillancourt
Thanks Kelly (and Richard), That did the job :) Salut, Verdon On 2/11/04 12:22 PM, "Kelly Hallman" <[EMAIL PROTECTED]> wrote: > On Wed, 11 Feb 2004, Verdon Vaillancourt wrote: >> I thought I might have tried that and just did again. >> >> I receive the error; Warning : Delimiter must not be

Re: [PHP] Using a perl regex

2004-02-11 Thread Kelly Hallman
On Wed, 11 Feb 2004, Verdon Vaillancourt wrote: > I thought I might have tried that and just did again. > > I receive the error; Warning : Delimiter must not be alphanumeric or > backslash in /server/path/to/functions.php on line > > I'm not sure if this means I have to escape something in

Re: [PHP] Using a perl regex

2004-02-11 Thread Verdon Vaillancourt
I thought I might have tried that and just did again. I receive the error; Warning : Delimiter must not be alphanumeric or backslash in /server/path/to/functions.php on line I'm not sure if this means I have to escape something in the pattern, but will look further. Cheers, Verdon On 2/1

Re: [PHP] Using a perl regex

2004-02-11 Thread Verdon Vaillancourt
I should have prefaced my subject with NEWBIE :) Thanks, I'll give it a try. Best regards, verdon On 2/11/04 12:12 PM, "Richard Davey" <[EMAIL PROTECTED]> wrote: > Hello Verdon, > > Wednesday, February 11, 2004, 5:09:22 PM, you wrote: > > VV> I am trying to use a perl regular expression to v

Re: [PHP] Using a perl regex

2004-02-11 Thread Richard Davey
Hello Verdon, Wednesday, February 11, 2004, 5:09:22 PM, you wrote: VV> I am trying to use a perl regular expression to validate a form field where VV> (!ereg("20\d{2}(-|\/)((0[1-9])|(1[0-2]))(-|\/)((0[1-9])|([1-2][0-9])|(3[0-1] Surely you should be using preg_match() (i.e. a perl syntax reg exp

[PHP] Using a perl regex

2004-02-11 Thread Verdon Vaillancourt
Hi, I am trying to use a perl regular expression to validate a form field where I am allowing someone to edit a sql date-time stamp in the format of '2004-02-05 21:43:34'. I have found a pattern that works (at http://www.regexplib.com/RETester.aspx?regexp_id=93) which is; 20\d{2}(-|\/)((0[1-9])|

[PHP] Zlib - Insert files?

2004-02-11 Thread Till Krüss
Hi there! I'm trying to make a GZip compressed file with some files in it. But i'm only getting a foo.gz with a file foo in it an foo contains the data of all files in $this->_Files. I need foo.gz with a file and its content for each $this->_Files. $fp = gzope

[PHP] Newbie questions

2004-02-11 Thread James Marcinek
Hey Everyone, I have a couple of questions I'd like to ask: 1.) Are there built in libraries to connect to DB2? Nothings clear from the documentation I've read. I see that there's libraries for Oracle, Informix, MySQL. 2.) If there is a DB2 library(support or whatever its called, someone enligh

RE: [PHP] Sessions on Win2k

2004-02-11 Thread Ford, Mike [LSS]
On 11 February 2004 16:39, Alex Hogan contributed these pearls of wisdom: > Session_start() has to be the first thing at the top of the > page before > anything else. Even header info. Er, no. session_start() itself generates headers, so it doesn't matter whether it goes before or after other h

RE: [PHP] Sessions on Win2k

2004-02-11 Thread Alex Hogan
Session_start() has to be the first thing at the top of the page before anything else. Even header info. I just got this answered for me about two weeks ago > -Original Message- > From: Donpro [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 11, 2004 10:20 AM > To: php list > S

Re: [PHP] HELP: Nested include(...)'s take relative paths not intuitively

2004-02-11 Thread Samuel Ventura
Hi there again people, I looks like this thread turned into a 'include' usage discussion. Well, nothing wrong with that. The conclusion seems to be that ALL level of nested included inherit current directory reference for relative paths from the very first script ( that in $_SERVER[SCRIPT_NAME]

RE: [PHP] array data

2004-02-11 Thread Shaunak Kashyap
It is not the correct way because $colors being an array, the HTML code for the hidden input element will look like this (once the HTML has been generated by PHP): [code] [/code] What you probably want to do instead is something like this: [code] // close loop [/code] This will create the f

[PHP] Sessions on Win2k

2004-02-11 Thread Donpro
Hi, I've searched the archives and note that many have probelms using session on a Win2K server. I am getting a Undefined index: sessions in D:\inetpub\mydomain\www\forms\formmail\formmail.php on line 768 error. Line 768 is: session_start(); It works Ok on Linux; is there any "special" Wi

Re[8]: [PHP] HELP: Nested include(...)'s take relative paths not int uitively

2004-02-11 Thread Richard Davey
Hello Alex, Wednesday, February 11, 2004, 3:47:09 PM, you wrote: AH> How large can that file be? How long is a piece of string? :) It's as long as you need it to be. AH> I have a func.php file that I'm putting all my reusable functions in but I AH> can see that getting pretty large if this proj

RE: Re[6]: [PHP] HELP: Nested include(...)'s take relative paths not int uitively

2004-02-11 Thread Alex Hogan
How large can that file be? I have a func.php file that I'm putting all my reusable functions in but I can see that getting pretty large if this project starts getting eaten up with feature creep, er.., I mean additional functionality. (I know that'll never happen...;->) So how large is too large

Re[8]: [PHP] HELP: Nested include(...)'s take relative paths not int uitively

2004-02-11 Thread Richard Davey
Hello John, Wednesday, February 11, 2004, 3:42:39 PM, you wrote: JWH> Heh.. I was just giving a heads up, not threatening. :) JWH> I personally don't care for .inc files that are in the web root. The ways to JWH> deny access to them vary across web servers and platforms, so it makes JWH> distri

Re: [PHP] uploaded files are corrupted

2004-02-11 Thread John W. Holmes
From: "Donpro" <[EMAIL PROTECTED]> > I have a script that allows the user to browse his/her local hard drive for > a file and email it as an attachment. Text files come through OK but any > binary type file, e.g., JPEG or PDF arrive broken. JPEG will show as a red > X in my browser and Adobe wil

Re: Re[6]: [PHP] HELP: Nested include(...)'s take relative paths not int uitively

2004-02-11 Thread John W. Holmes
From: "Richard Davey" <[EMAIL PROTECTED]> > JWH> I hope you are also denying access to .inc files otherwise we could view > JWH> your file as plain text. > > Please.. try ;) > > I used to call the file common.php until we had a rather large debate > about the correct naming convention for PHP incl

[PHP] question

2004-02-11 Thread Meramec Challenge Paintball, LLC
I have tried for a long time now on various forums to get help. Every one says to come to you for support. I looked for a forum on your site but did not see one. I had to turn the Enable account activation by admin feature. In doing so when someone tries to create an account when they hit submi

Re[6]: [PHP] HELP: Nested include(...)'s take relative paths not int uitively

2004-02-11 Thread Richard Davey
Hello John, Wednesday, February 11, 2004, 3:25:23 PM, you wrote: JWH> I hope you are also denying access to .inc files otherwise we could view JWH> your file as plain text. Please.. try ;) I used to call the file common.php until we had a rather large debate about the correct naming convention

Re: Re[4]: [PHP] HELP: Nested include(...)'s take relative paths not int uitively

2004-02-11 Thread John W. Holmes
From: "Richard Davey" <[EMAIL PROTECTED]> > Personally I use a file called common.inc which is basically > my global include file - it has nothing but variables I need set (no > functions, etc - they are held elsewhere) and files I need to include. > It sits at the root of my project and is includ

Re: [PHP] uploaded files are corrupted

2004-02-11 Thread Richard Davey
Hello Donpro, Wednesday, February 11, 2004, 2:58:20 PM, you wrote: D> I have a script that allows the user to browse his/her local hard drive for D> a file and email it as an attachment. Text files come through OK but any D> binary type file, e.g., JPEG or PDF arrive broken. JPEG will show as a

Re: Re[2]: [PHP] HELP: Nested include(...)'s take relative paths not intuitively

2004-02-11 Thread John W. Holmes
From: "Ford, Mike [LSS]" <[EMAIL PROTECTED]> > Mind you, there are exceptions: exit(), for example, is a language construct > but requires the parens (at least, that's what the fine manual appears to > say, and I've not tested it without!). Only if you want to pass an exit value, i.e. exit(101);

Re[4]: [PHP] HELP: Nested include(...)'s take relative paths not int uitively

2004-02-11 Thread Richard Davey
Hello Alex, Wednesday, February 11, 2004, 3:08:02 PM, you wrote: AH> Is it also recommended that an application local config file be used to set AH> all the globals that will be used throughout? Right now I'm using the db to AH> hold all the vars that I want to make available for all apps. Is th

Re: [PHP] Undefined function

2004-02-11 Thread John Nichel
Dominique ANOKRE wrote: ok , i install the good php windows installer (with interbase) and now i think my function is recognized. But the message displayed is : Warning: ibase_connect(): unavailable database in c:\inetpub\wwwroot\index.php on line 12 But i can connect to the database whitout any

Re: [PHP] uploaded files are corrupted

2004-02-11 Thread Jason Wong
On Wednesday 11 February 2004 22:58, Donpro wrote: > A code sample of my form is: > > > Send this file: > > Try the example(s) in manual > Handling file uploads. If they work, then figure out what you're doing differently in your code that makes it not work. If the examples don't work, and

[PHP] Re: str_replace not replacing

2004-02-11 Thread Michael Nolan
Aaron Merrick wrote: I'm reading in to a variable $section1 an entire php file that creates a mysql table. I can output the variable in a new file just fine (figured out what all had to be escaped in the original file). My problem is, I want to replace the table name in the original file with a new

Re: [PHP] str_replace not replacing

2004-02-11 Thread Aaron Merrick
Richard, Thank you so much. That works perfectly. I knew it had to be something simple. Aaron > From: Richard Davey <[EMAIL PROTECTED]> > Reply-To: Richard Davey <[EMAIL PROTECTED]> > Date: Wed, 11 Feb 2004 15:04:44 + > To: Aaron Merrick <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED] > Subject:

Re: [PHP] Undefined function

2004-02-11 Thread Dominique ANOKRE
ok , i install the good php windows installer (with interbase) and now i think my function is recognized. But the message displayed is : Warning: ibase_connect(): unavailable database in c:\inetpub\wwwroot\index.php on line 12 But i can connect to the database whitout any problems via interbase

RE: Re[2]: [PHP] HELP: Nested include(...)'s take relative paths not int uitively

2004-02-11 Thread Alex Hogan
Hi Richard, > Why not just set a $basedir value somewhere and always use that in an > include/require function: include "$basedir/sub/whatever" - then no > matter where it's called from it'll never be wrong. That makes sense... Is it also recommended that an application local config file be used

Re: [PHP] str_replace not replacing

2004-02-11 Thread Jason Wong
On Wednesday 11 February 2004 23:00, Aaron Merrick wrote: > My problem is, I want to replace the table name in the original file with a > new table name before I output it to the new file. But the str_replace has > no effect. [snip] > str_replace($search, $replace, $section1); str_replace() re

Re: [PHP] str_replace not replacing

2004-02-11 Thread Richard Davey
Hello Aaron, Wednesday, February 11, 2004, 3:00:47 PM, you wrote: AM> $section1 = file_get_contents("table_create.php"); AM> str_replace($search, $replace, $section1); You need to assign the output of str_replace to something: $new_section = str_replace($search, $replace, $section1) -- Best r

Re: [PHP] replace ' with "

2004-02-11 Thread John Nichel
Diana Castillo wrote: How do I replace all single quotes with double quotes in a string for echoing it with the double quotes? By looking here... http://us4.php.net/str_replace -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubs

Re: [PHP] Math Question

2004-02-11 Thread John Nichel
Jeremy Schroeder wrote: Hey group Is there a function that when you divide 2 numbers you drop the remainder and are left with the whole number. A whole section of the manual dedicated to mathematical functions! http://us4.php.net/manual/en/ref.math.php floor() ceil() round() -- By-Tor.com It'

[PHP] str_replace not replacing

2004-02-11 Thread Aaron Merrick
I'm reading in to a variable $section1 an entire php file that creates a mysql table. I can output the variable in a new file just fine (figured out what all had to be escaped in the original file). My problem is, I want to replace the table name in the original file with a new table name before I

[PHP] uploaded files are corrupted

2004-02-11 Thread Donpro
Hi, I have a script that allows the user to browse his/her local hard drive for a file and email it as an attachment. Text files come through OK but any binary type file, e.g., JPEG or PDF arrive broken. JPEG will show as a red X in my browser and Adobe will complain about the PDF. I don't kno

Re: [PHP] Math Question

2004-02-11 Thread Jeremy Schroeder
Thanks for all the help, floor() was the correct choice for this problem . -Blake Vincent Jansen wrote: Hi Richard I agree But you always want to round down ;) Blake> Is there a function that when you divide 2 numbers you drop the Blake> remainder and are left with the whole number. Still

RE: [PHP] replace ' with "

2004-02-11 Thread Angelo Zanetti
str_replace(''',"'", $StringToReplace); should work -Original Message- From: Diana Castillo [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 4:33 PM To: [EMAIL PROTECTED] Subject: [PHP] replace ' with " How do I replace all single quotes with double quotes in a string for e

Re: [PHP] replace ' with "

2004-02-11 Thread Stuart
Diana Castillo wrote: How do I replace all single quotes with double quotes in a string for echoing it with the double quotes? $text = str_replace("'", '"', $text); http://php.net/str_replace and please at least RTFM before posting here in future. -- Stuart -- PHP General Mailing List (http://ww

[PHP] replace ' with "

2004-02-11 Thread Diana Castillo
How do I replace all single quotes with double quotes in a string for echoing it with the double quotes? -- Diana Castillo Global Reservas, S.L. C/Granvia 22 dcdo 4-dcha 28013 Madrid-Spain Tel : 00-34-913604039 ext 214 Fax : 00-34-915228673 email: [EMAIL PROTECTED] Web : http://www.hotelkey.com

RE: Re[2]: [PHP] Math Question

2004-02-11 Thread Vincent Jansen
Hi Richard I agree But you always want to round down ;) Blake> Is there a function that when you divide 2 numbers you drop the Blake> remainder and are left with the whole number. Still seems floor() to me Vincent -Original Message- From: Richard Davey [mailto:[EMAIL PROTECTED]

[PHP] Re: array data

2004-02-11 Thread pete M
Think this is what u want Imran Asghar wrote: Hi, Is not working, is it correct way File1.php $v { ?> File2.php echo $colors[1]; echo $colors[2]; echo $colors[4]; ?> imee -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: h

RE: Re[2]: [PHP] Math Question

2004-02-11 Thread Jay Blanchard
[snip] VJ> Seems to me you need VJ> floor($number1 / $number2) Only if you always want to round *down* the equation. For example flooring a result of 4.99 will give you an integer of 4 whereas round() (or ceil()) will give you 5. It depends on the situation as to which is most useful. [/snip] yo

Re[2]: [PHP] Math Question

2004-02-11 Thread Richard Davey
Hello Vincent, Wednesday, February 11, 2004, 2:15:15 PM, you wrote: VJ> Seems to me you need VJ> floor($number1 / $number2) Only if you always want to round *down* the equation. For example flooring a result of 4.99 will give you an integer of 4 whereas round() (or ceil()) will give you 5. It d

  1   2   >