[PHP] Re: Session's is slowing the page ??

2002-05-28 Thread Tom Mikulecky
Hi PHP's sessions are blocking, i.e. until a session is closed, all other calls to session_start() are pending. If you don't close a session explicitely, it remains opened until the script is terminated. The solution is to close a session as soon as possible (session_write_close) or use non-block

[PHP] File not getting created

2002-05-28 Thread Manisha
I am opening file in append mode but file is not getting created at all. I am not getting error too. I think it is due to write permission. How to check it and how to set it ? Environment - Linux / PHP4 Thanks in advance Manisha -- PHP General Mailing List (http://www.php.net/) To unsubscri

[PHP] Variable vs Constant

2002-05-28 Thread HPS
what harm (in term of loading/performance) will it make if i declear a value as VARIABLE where i should make it as CONSTANT actually?? how about if i declear 100 values as VARIABLEs where all are CONSTANTs actually? thx HPS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, v

[PHP] function return

2002-05-28 Thread W. Enserink
Hi all, I have a Q about functions. My function should return 2 values. What syntax should I use and how do I call these values outside the function? Are these values returned as en array or something? this is what I have now, - function myFunction($some_vars) { $m

Re: [PHP] Newbie question about PHP and Oracle

2002-05-28 Thread DrouetL
I don't know how it works in my sql. I've written some functions to help me construct these sort of things. It might help you PS : Sorry but the comments are in French. Laurent Drouet /* ** Cette fonction retourne toutes les lignes d'u

[PHP] Re: Newbie question about PHP and Oracle

2002-05-28 Thread Markus Mirsberger
Hi, I think you mean hwo u can get the data into an array well here is an example : $query = "select ..."; $stmt = ociparse( $connectionhandle, $query ); if( ociexecute( $stmt, OCI_DEFAULT ) ){ ocifetchinto( $stmt, $row, OCI_ASSOC+OCI_RETURN_NULLS ); } and now you got 1 resultset in an

Re: [PHP] Variable vs Constant

2002-05-28 Thread hugh danaher
Billy, There must be a limit to the number of variables you can use in php but I haven't run up against a limit yet, and php seems to run as fast on my high variable count code as my more mundane code. Obviously, the advantage of using variables is that you can group your "variables/constants" in

Re: [PHP] function return

2002-05-28 Thread RIVES Sergio
Hi, I don't know if there is an easier way to do this but why don't you concatenate the two values to be returned and then split the returned value ? ex : function myFunction($some_vars) { $max=count($some_vars); $some_value=($max/2); $result = $some_value.";".$max; return $result; } $resultad

RE: [PHP] function return

2002-05-28 Thread David Freeman
> > I have a Q about functions. My function should return 2 > values. What > > syntax should I use and how do I call these values outside the > > function? Are these values returned as en array or something? > I don't know if there is an easier way to do this but why > don't you concate

Re: [PHP] Variable vs Constant

2002-05-28 Thread HPS
Thx Hugh i got what u meanlet me give u more background for my problem i am now working on a project which was developed by some others b4. As the project is a multi-language enabled, there is a PHP file (language file) which has all the setting , say

[PHP] onchange read file, php & JS

2002-05-28 Thread Mihaela Dupret
Hy, Is it possible to use a javascript variable into php or to change it into php variable? I have a list with the files from a directory, this works fine. For the event onchange I want to show the content of the file chosen. So, in the code, the variable "inputf" has the file name that I want

[PHP] newsletter wordwrapping for Outlook?

2002-05-28 Thread m u i n a r
Hello I'm wrapping a newsletter with $message = wordwrap( $message1,75,"\r\n" ); before sending it out. still, my customer with his Outlook client gets everything on one line! (Eudora and Outlook Express on my own machine display it fine.) Any takes? Thank you. -- PHP General Maili

php-general Digest 28 May 2002 09:02:52 -0000 Issue 1371

2002-05-28 Thread php-general-digest-help
php-general Digest 28 May 2002 09:02:52 - Issue 1371 Topics (messages 99399 through 99454): Logout 99399 by: Jonas Hörnblad 99400 by: Sagie Maoz 99401 by: Thalis A. Kalfigopoulos php's variables & javascript 99402 by: burak delice 99407 by: Sagie Mao

[PHP] Re: Session's is slowing the page ??

2002-05-28 Thread Dima Dubin
Hello Tom I looked in the manual for session_readonly because its basicly what I need : 1 login page, and the just read the session data in other pages but, there is no examples or anything like that in the manual could you please show me a little example how to use it on my pages ? THANKS !

RE: [PHP] function return

2002-05-28 Thread Rudolf Visagie
Hi, function myFunction($some_vars, &$max, &$some_value) { $max=count($some_vars); $some_value=($max/2); //return true; } Rudolf Visagie Principal Software Developer Digital Healthcare Solutions Tel: + 27 011 2655478 Cell: + 27 82 895 1598 -Original Message--

[PHP] Problem with compilation

2002-05-28 Thread Mirek Novak
Hi, I'm trying to compile CGI version of latest PHP v4 (4.2.1) on Linux RH 6.2 kernel 2.2.14 with mysql client/server ver 2.22.49 and it always fails to compile while compiling mysql extension. I've included part with error message which I don't understand to. ./configure --prefix=/usr

Re: [PHP] newsletter wordwrapping for Outlook?

2002-05-28 Thread m u i n a r
Everything ok. Like often, in the minute I sent my posting, I got a message from the customer that it looks great now. This list seems to help metaphysically:) Have a nice day. Mike At 11:00 28.05.02, you wrote: >Hello > >I'm wrapping a newsletter with > >$message = wordwrap( $message1,75,

Re: [PHP] onchange read file, php & JS

2002-05-28 Thread 1LT John W. Holmes
You have to put the variable into a hidden form element or tack it onto a URL in order to pass it to the PHP page. ---John Holmes... - Original Message - From: "Mihaela Dupret" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 28, 2002 6:51 AM Subject: [PHP] onchange read fi

Re: [PHP] function return

2002-05-28 Thread 1LT John W. Holmes
Return an array function whatever($var1, $var2) { // do whatever $ret[0] = $var1 + $var2; $ret[1] = $var1 - $var2; $ret['something'] = ($var1/$var2) * 100; return $ret; } $value = whatever(5,4); echo $value[0]; echo $value['something']; ---John Holmes... - Original Message -

[PHP] Re: Problem with compilation

2002-05-28 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Hi, I'm trying to compile CGI version of latest PHP v4 (4.2.1) on Linux RH 6.2 >kernel 2.2.14 with mysql client/server ver 2.22.49 >and it always fails to compile while compiling mysql extension. I've included >part with error mes

[PHP] (Unlink(file) == rm file) ? (ignore this mail):(explain diffs);

2002-05-28 Thread Jimmy Lantz
Hi, (Unlink(file) == rm file) ? (ignore this mail):(explain diffs); Does PHP unlink function handle deletion of files equally as the "rm" command on the system in my case FreeBSD. Or does it involve caching/handling files in any different way? / Jim -- PHP General Mailing List (http://www.ph

[PHP] exec() under win2000 & apache not works?

2002-05-28 Thread Posteingang
Hi! My problem is: I'm traying to use the following commandos under win2000 / apache / php4.0.6: Actualy the first 'test'-commando response the defined text 'My Name is Adrian' ... so far so good. But if i have a look on my Windows-Explorer for checking the Directory and files under 'C:\php\O

Re: [PHP] exec() under win2000 & apache not works?

2002-05-28 Thread Stuart Dallas
Posteingang <[EMAIL PROTECTED]> wrote: > $cmd_commando = "cmd /c xcopy C:\php\INPUT\* C:\php\OUTPUT\* /w /f > /i /s /e /h /y"; You need to escape your backslashes... $cmd_commando = "cmd /c xcopy C:\\php\\INPUT\\* C:\\php\\OUTPUT\\* /w /f /i /s /e /h /y"; Also, make sure the account Apache is

[PHP] continue execution after end of document?

2002-05-28 Thread Bob Kersten
Hi, I'm looking for a way to execute several time consuming PHP commands without the need for the user to wait until the entire script is finished. So I'd like to know if it's possible to send an end-of-document to the user but not the end of the script. These commands do not produce any output (

[PHP] Apache query error affecting PHP?

2002-05-28 Thread Weston Houghton
Hello... I'm wondering if I have found an oddity in httpd. I'm currently writing a PHP directory listing system. I am pretty sure that this is not a php issue, but I have not been able to test it on a httpd install sans php, but it can be seen when requesting an image file, which should not invo

Re: [PHP] Apache query error affecting PHP?

2002-05-28 Thread Stuart Dallas
Weston Houghton <[EMAIL PROTECTED]> wrote: > Apache will actually return the directory listing of the assets/ > directory (assuming you have directory listing enabled, otherwise it > returns the standard forbidden error). It does not seem to matter > what the actual variable name following the "?"

[PHP] Re: Session's is slowing the page ??

2002-05-28 Thread Tom Mikulecky
Login page: // suppose that user login was verified // Following code have to be executed only if user is valid session_start(); session_register("user","user_email");//register here all needed data. //In this case, it will register $user and $user_ema

Re: [PHP] PHP script and external C program

2002-05-28 Thread ing.Martin Prášek
- Original Message - From: "John Holmes" <[EMAIL PROTECTED]> To: "'ing.Martin Prášek'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, May 27, 2002 8:28 PM Subject: RE: [PHP] PHP script and external C program > I don't have example code, but what you want is the exec() function.

[PHP] mail() source code

2002-05-28 Thread Anthony Rodriguez
When mail() sends, via sendmail, an e-mail to an invalid address, it's returned to the "envelope-sender" (e.g.: the ISP), NOT returned to the "from" address, or the "return-path" address, etc. that are included with mail()'s 4th parameter. I'm planning to write a "modified" mail() to include

Re: [PHP] PHP script and external C program

2002-05-28 Thread Dan Hardiker
http://www.php.net/popen Process Handling. > - Original Message - > From: "John Holmes" <[EMAIL PROTECTED]> > To: "'ing.Martin Prá¹ek'" <[EMAIL PROTECTED]>; > <[EMAIL PROTECTED]> Sent: Monday, May 27, 2002 8:28 PM > Subject: RE: [PHP] PHP script and external C program > > >> I don't have

Re: [PHP] mail() source code

2002-05-28 Thread Stuart Dallas
Anthony Rodriguez <[EMAIL PROTECTED]> wrote: > I'm planning to write a "modified" mail() to include the "true" > return-path. In order to do so, I need to communicate directly with > sendmail and, in my newbie's opinion, a good start would be to > review the source code of the mail(). Before yo

[PHP] Re: Session's is slowing the page ??

2002-05-28 Thread Dima Dubin
Hi Tom Thanks for your help but the problem still happens :-( First I tried to use session_readonly() but it was unknown FUNC` in my php, then I try the second way : I have header.php & footer.php in the header I use session_start(); and in the footer I use session_write_close() and still every m

Re: [PHP] Apache query error affecting PHP?

2002-05-28 Thread Weston Houghton
How silly of me not to think of this problem in the first place. It is not an error in the server, but in the browser. I didn't bother testing it in any other browser initially. So this problem only occurs in MSIE 5.1.4 under MacOS X. Ugh, thank you for showing I am somewhat silly in this one (b

[PHP] How can I remove the last character from a one line file?

2002-05-28 Thread Rea_David
Hi all, How can I remove the last character from a one line file? i.e. I need to change Jacko to Jack I would really appreciate a response on this! Thank you! Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/uns

Re: [PHP] How can I remove the last character from a one line file?

2002-05-28 Thread Ed Gorski
Try: $string="Jacko"; $string=substr($string,0,(strlen($string)-1)); echo $string; ed At 09:35 AM 5/28/2002 -0400, [EMAIL PROTECTED] wrote: >Hi all, > > How can I remove the last character from a one line file? > i.e. I need to change Jacko to Jack > > >I would really appreciate

[PHP] Efficient PHP

2002-05-28 Thread Ed Gorski
Anyone know any good links on papers/articles/reports on creating efficient PHP scripts (ie functions to stay away from, good practices, etc). As a C programmer, I am a nut on efficiency and speed and I have been trying to read up on efficient PHP coding practices (besides obvious general codi

RE: [PHP] Efficient PHP

2002-05-28 Thread Richard Black
One thing that springs to mind was something Sterling Hughes said at the PHP Conference in Frankfurt last year: If speed is an issue don't use objects, cos at the moment the oo implementation isn't particularly efficient, although it was something that would be addressed soon. Actually, for all I

RE: [PHP] Efficient PHP

2002-05-28 Thread Ed Gorski
Yeah I've heard that they've made improvements in the oo code but I usually stay away from them on principle. Thanks for the reply, Ed At 02:54 PM 5/28/2002 +0100, Richard Black wrote: >One thing that springs to mind was something Sterling Hughes said at the PHP >Conference in Frankfurt last y

[PHP] Previous Discussions

2002-05-28 Thread Dan Vande More
Is anyone aware of previous discussions with php/mysql with using file inside the db (BLOBs) and integrating php to serve these files? In my opinion, I'm sure there's a better way than store to a temp file and send user the hyperlink, then deleting the temp file. Perhaps something with output b

[PHP] Server error when executing mail() function

2002-05-28 Thread Paul Cuthbertson
Hi, I keep getting a 'Server Error' when executing the mail() function. I thought the problem was the SMTP server in php.ini, so I've tried several alternatives (including my Outlook smtp and free smtp servers). I'm starting to think that it's not that that's causing the problem. Is there anyt

Re: [PHP] Previous Discussions

2002-05-28 Thread Ed Gorski
You want to try to stay away from storing anything so large in a DB like a file or an image (if the option exists). I am not aware of the previous discussion but if you send me a few details maybe I can offer an opinion.. ed At 07:54 AM 5/28/2002 -0600, Dan Vande More wrote: >Is anyone aware

[PHP] Re: Session's is slowing the page ??

2002-05-28 Thread Tom Mikulecky
Hat you do is the same as if you do nothing, because your session_write_close() is called near the end of script and sessions are automatically closed at the end of a script. You should 'copy' all needed variables from the session in your header.php like this: session_start(); $copy_user = $user;

RE: [PHP] Previous Discussions

2002-05-28 Thread Ian Samuel
Title: RE: [PHP] Previous Discussions >>Is anyone aware of previous discussions with php/mysql with >using file >>inside the db (BLOBs) and integrating php to serve these files? In my >>opinion, I'm sure there's a better way than store to a temp >file and send >>user the hyperlink, then d

RE: [PHP] Previous Discussions

2002-05-28 Thread Dan Vande More
Hey thanks Ian! Could I have some examples, of say a pdf or zip? It looks like this will work perfectly! Dan -Original Message- From: Ian Samuel [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 28, 2002 9:00 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Previous Discussions >>Is anyone a

Re: [PHP] Server error when executing mail() function

2002-05-28 Thread Tyler Longren
Is 'Server Error' all you get? If there's more, please post the whole error message. ;-) thanks! tyler - Original Message - From: "Paul Cuthbertson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 28, 2002 9:06 AM Subject: [PHP] Server error when executing mail() function

[PHP] browscap.ini

2002-05-28 Thread Stefan Rusterholz
Hi Has anyone got an up to date browscap.ini-file or does someone know where to get one? The most up to date browscap I found got it's last update in October 9, 2001 - since then a lot new browser appeared... best regards Stefan Rusterholz -- PHP General Mailing List (http://www.php.net/) T

[PHP] Re: Session's is slowing the page ??

2002-05-28 Thread Dima Dubin
THANK YOU !!! "Tom Mikulecky" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hat you do is the same as if you do nothing, because your session_write_close() > is called near the end of script and sessions are automatically closed at the > end of a script. Y

Re: [PHP] Server error when executing mail() function

2002-05-28 Thread Paul Cuthbertson
I'm afraid all I get is: Warning: Server Error in d:\htdocs\scriptname.php on line 19 Line 19 being the mail() command. The script works fine on a different server. Any Ideas? Paul. - Original Message - From: "Tyler Longren" <[EMAIL PROTECTED]> To: "Paul Cuthbertson" <[EMAIL PROTECT

Re: [PHP] browscap.ini

2002-05-28 Thread Tyler Longren
I found this in the PHP FAQ: http://www.cyscape.com/browscap/ http://www.php.net/manual/en/faq.obtaining.php Tyler Longren Captain Jack Communications www.captainjack.com [EMAIL PROTECTED] - Original Message - From: "Stefan Rusterholz" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent:

Re: [PHP] Server error when executing mail() function

2002-05-28 Thread Tyler Longren
Try this thread on phpbuilder.com: http://www.phpbuilder.com/forum/read.php3?num=4&id=6681&loc=0&thread=6681 One person suggests using fewer headers as windows can be picky about which headers you're trying to send with your e-mail. Good luck, Tyler Longren Captain Jack Communications www.captai

[PHP] Cannot add header infomation

2002-05-28 Thread Drew Boillot
Hello, Anyone in the mood to help someone who doesn't really know what they are doing when it comes to PHP? I am tring to get NoCC Mail to work http://nocc.sourceforge.net/ on my website, and keep getting the warning, "Warning: Cannot add header information - headers already sent by (output start

Re: [PHP] Cannot add header infomation

2002-05-28 Thread Tyler Longren
Those errors mean that PHP is trying to send headers to the browser after something has already been made viewable in the browser. Make sure that the header() functions are being used before anything gets output to the browser. Tyler Longren Captain Jack Communications www.captainjack.com [EMAIL

[PHP] Re: Validating forms and showing errors

2002-05-28 Thread Manuel Lemos
Hello, On 05/27/2002 02:19 AM, Victor Boivie wrote: > Hi everybody, > > This might be a RTFM or STFW-question, but I haven't found it. > > I want to validate a form (in page1.php) to check if the user has entered a > correct email-adress and more, and if he needs to correct some fields, I'd > l

Re: [PHP] Server error when executing mail() function

2002-05-28 Thread Paul Cuthbertson
Firstly, thank you for the continued help. Unfortunately I just tried this: ..and the error still occurred. The error appears immediately, as if it's not even trying to connect to anything. Paul. - Original Message - From: "Tyler Longren" <[EMAIL PROTECTED]> To: "Paul Cuthbertson"

[PHP] 'ucfirst' function for text area strings?

2002-05-28 Thread Andre Dubuc
Is there a way to get a function similar to 'ucfirst' to work with the first letters of a set of strings in textarea strings? ** Inputted strings: "hi. i hope there is one. any ideas?" Should appear: "Hi. I hope there is one. Any ideas?" ***

Re: [PHP] browscap.ini

2002-05-28 Thread Stefan Rusterholz
Hi Sorry, but this one is pretty old, an excerpt from the website: browscap.ini download Current version: 2.5 Last updated: February 2000 Download size: 14 KB February 2000 I took the following: http://asp.net.do/browscap.zip (found in the user-comments for get_browser()) It's from

RE: [PHP] Server error when executing mail() function

2002-05-28 Thread Jared Boelens
I was having this same problem a few weeks ago and ended up giving up. After reading the response about the headers i decided to try it. If i call this it works: mail($recipient, $subject); If i call this is gets the server error msg: mail($recipient, $subject, $headers); In that case their a

[PHP] Re: imagettftext question

2002-05-28 Thread Stellan Klebom
"Ziying Sherwin" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > In our application, we need to write a UTF8 strings to the image using True > Type fonts. The php function that we are using is imagettftext. However, > we have the two problems regarding that

[PHP] Re: Server error when executing mail() function

2002-05-28 Thread Manuel Lemos
Hello, On 05/28/2002 11:06 AM, Paul Cuthbertson wrote: > Hi, > > I keep getting a 'Server Error' when executing the mail() function. I thought the >problem was the SMTP server in php.ini, so I've tried several alternatives (including >my Outlook smtp and free smtp servers). I'm starting to thi

[PHP] Re: Server error when executing mail() function

2002-05-28 Thread Manuel Lemos
Hello, On 05/28/2002 11:06 AM, Paul Cuthbertson wrote: > Hi, > > I keep getting a 'Server Error' when executing the mail() function. I thought the problem was the SMTP server in php.ini, so I've tried several alternatives (including my Outlook smtp and free smtp servers). I'm starting to th

RE: [PHP] Efficient PHP

2002-05-28 Thread Scott Hurring
> -Original Message- > From: Ed Gorski [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 28, 2002 9:46 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Efficient PHP > > > Anyone know any good links on papers/articles/reports on > creating efficient > PHP scripts (ie functions to stay away fr

RE: [PHP] How can I remove the last character from a one line file?

2002-05-28 Thread Scott Hurring
TIMTOWTDI $string = "Jacko"; print preg_replace('/.$/', '', $string); --- Scott Hurring Systems Programmer EAC Corporation [EMAIL PROTECTED] Voice: 201-462-2149 Fax: 201-288-1515 > -Original Message- > From: Ed Gorski [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 28, 2002 9:41 AM > To

RE: [PHP] How can I remove the last character from a one line file?

2002-05-28 Thread Rasmus Lerdorf
Ouch! echo substr($string,0,-1); is much more efficient. -Rasmus On Tue, 28 May 2002, Scott Hurring wrote: > TIMTOWTDI > > $string = "Jacko"; > print preg_replace('/.$/', '', $string); > > --- > Scott Hurring > Systems Programmer > EAC Corporation > [EMAIL PROTECTED] > Voice: 201-462-2149 > F

RE: [PHP] How can I remove the last character from a one line file?

2002-05-28 Thread Kevin Porter
Or just: $string = "Jacko"; $string = substr( $string, 0, -1 ); echo $string; The third argument to substr() means 'one character from the end', see http://www.php.net/manual/en/function.substr.php - Kev > -Original Message- > From: Ed Gorski [SMTP:[EMAIL PROTECTED]] > Sent: 28 May 200

RE: [PHP] Efficient PHP

2002-05-28 Thread Ed Gorski
Well I work for a college with some 49,000+ students so my primary concern with all those users is efficient memory and processor usage. You'd be surprised how easily a few ten's of thousands of users can bring an application server to it's knees if you have a bottleneck or two that you can a

[PHP] Re: mail() function

2002-05-28 Thread Manuel Lemos
Hello, On 05/27/2002 04:38 PM, Jochem Kempe wrote: > It appears to me that there is something wrong with the mail() function, > > I've got an Apache 2.0.36 webserver in an Windows XP environment, > now everythin seems to work just fine until I try to execute this: > > mail("[EMAIL PROTECTED]",

RE: [PHP] Re: Thread safe

2002-05-28 Thread Scott Hurring
I'm not sure if it's atomic, but (AFAIK) you can do something like this with Mysql: UPDATE table SET field=field+1 where . --- Scott Hurring Systems Programmer EAC Corporation [EMAIL PROTECTED] Voice: 201-462-2149 Fax: 201-288-1515 > -Original Message- > From: J Smith [mailto:[EMAI

[PHP] Re: mail() source code

2002-05-28 Thread Manuel Lemos
Hello, On 05/28/2002 08:27 AM, Anthony Rodriguez wrote: > When mail() sends, via sendmail, an e-mail to an invalid address, it's > returned to the "envelope-sender" (e.g.: the ISP), NOT returned to the > "from" address, or the "return-path" address, etc. that are included > with mail()'s 4th

RE: [PHP] Regex Assistance

2002-05-28 Thread Scott Hurring
This should work for most cases: function strip_key($key, $string) { $string = preg_replace("/(&|\?)($key=(\w+)?)(&?)/", '$1', $string); return preg_replace('/(\?|&)$/', '', $string); } print strip_key("list", "yadda?bo=ra&list=XXX&two=three"); print strip_key("list", "yadda?bo=ra&list=&two=

[PHP] Html Books on php

2002-05-28 Thread Natarajan
Hi, I am a newbie. Could I get pointers to books on the web for PHP? Thanks for the help Natarajan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] 'ucfirst' function for text area strings?

2002-05-28 Thread Jason Wong
On Tuesday 28 May 2002 23:58, Andre Dubuc wrote: > Is there a way to get a function similar to 'ucfirst' to work with the > first letters of a set of strings in textarea strings? > > ** > Inputted strings: > > "hi. i hope there is one. any ideas?

[PHP] Re: Cannot add header infomation

2002-05-28 Thread Drew Boillot
I got it working.. Thanks to everyone that helped "Drew Boillot" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, Anyone in the mood to help someone who doesn't really know what they > are doing when it comes to PHP? > > I am tring to get NoCC Mail to w

Re: [PHP] Server error when executing mail() function

2002-05-28 Thread Paul Cuthbertson
Hi All, I've now fixed the problem myself. It appears as though the problem was in the 'sendmail_from' element of php.ini. Even though the address I gave on that line was a perfectly legitimate email address, once I changed it, it worked fine. The new address was longer than the old, so it wasn'

Re: [PHP] 'ucfirst' function for text area strings?

2002-05-28 Thread Miguel Cruz
On Tue, 28 May 2002, Andre Dubuc wrote: > Is there a way to get a function similar to 'ucfirst' to work with the first > letters of a set of strings in textarea strings? > > ** > Inputted strings: > > "hi. i hope there is one. any ideas?" > >

Re: [PHP] Dates

2002-05-28 Thread Miguel Cruz
On Tue, 28 May 2002, Jeroen Timmers wrote: > 2002-10-9 and 2002-11-16 > > Is there a function to see how many day's between thore date's is? (strtotime($date1) - strtotime($date2)) / 86400 miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/un

[PHP] Intermediate "Searching..." screen.

2002-05-28 Thread Jeff Bearer
I have a part of my site that searches a large database and sometimes it takes more than a few seconds to return the results. When searches take longer, people get antsy and search again. To let them know that the search is working so they don't double efforts I'd like to have an intermediate "S

RE: [PHP] Dates

2002-05-28 Thread Jared Boelens
Something like this.. $start = "2002-10-9"; $end = "2002-11-16"; $arStart = explode("-", $start); $arEnd = explode("-", $end); $startTime = date("U", mktime(0,0,0,$arStart[1], $arStart[2], $arStart[0])); $endTime = date("U", mktime(0,0,0,$arEnd[1], $arEnd[2], $arEnd[0])); $dif = $endTime - $start

Re: [PHP] Dates

2002-05-28 Thread 1LT John W. Holmes
PHP way: Use strtotime() to get a unix timestamp for each one. subtract smaller from larger and divide by number of seconds in a day. MySQL way: I assume these dates come from a database. Use a query like this: SELECT TO_DAYS(column_one) - TO_DAYS(column_two) AS Difference FROM table WHERE ...

Re: [PHP] 'ucfirst' function for text area strings?

2002-05-28 Thread 1LT John W. Holmes
Put a text box for each sentence. ---John Holmes... - Original Message - From: "Miguel Cruz" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 28, 2002 2:19 PM Subject: Re: [PHP] 'ucfirst' function for text area strings? > On Tue, 28 May 2002, Andre Dubuc wrote: > > Is the

Re: [PHP] Re: mail() source code

2002-05-28 Thread Miguel Cruz
On Tue, 28 May 2002, Manuel Lemos wrote: > On 05/28/2002 08:27 AM, Anthony Rodriguez wrote: >> When mail() sends, via sendmail, an e-mail to an invalid address, it's >> returned to the "envelope-sender" (e.g.: the ISP), NOT returned to the >> "from" address, or the "return-path" address, etc. t

RE: [PHP] Intermediate "Searching..." screen.

2002-05-28 Thread Ian Samuel
Title: RE: [PHP] Intermediate "Searching..." screen. What you want to do is post the form, display a searching screen, and then on that same screen... well, like this, I think: >     echo "Searching.\n";     go_go_gadget_query();     // above line takes a while but the abo

RE: [PHP] Intermediate "Searching..." screen.

2002-05-28 Thread Leotta, Natalie (NCI/IMS)
You could, in theory, submit your query to an intermediate file, which only displays the "Searching" screen, but is querying your database and throwing everything you need into hidden fields in a form. Then have that form have an onLoad submit to your results page. I did this with HTML submittin

Re: [PHP] Variable vs Constant

2002-05-28 Thread Miguel Cruz
Wouldn't it be a lot easier to do that with arrays? miguel On Tue, 28 May 2002, HPS wrote: > i am now working on a project which was developed by some others b4. > As the project is a multi-language enabled, there is a PHP file (language > file) which has all the setting , say >

Re: [PHP] (Unlink(file) == rm file) ? (ignore this mail):(explaindiffs);

2002-05-28 Thread Miguel Cruz
On Tue, 28 May 2002, Jimmy Lantz wrote: > (Unlink(file) == rm file) ? (ignore this mail):(explain diffs); > > Does PHP unlink function handle deletion of files equally as the "rm" > command on the system in my case FreeBSD. > Or does it involve caching/handling files in any different way? It ju

Re: [PHP] Intermediate "Searching..." screen.

2002-05-28 Thread Kevin Stone
Search screens are a tricky prospect and none seem to work very well. However you could try one of the following techniques... Instead of the submit button initiating a search it initiates another script that displays the 'searching...' message and only after it has outputted that to the screen d

[PHP] Imagecreate and/or GD library not activated

2002-05-28 Thread LeTortorec, Jean-Louis
Hello everyone. I wrote a little code creating PNG images under Apache/PHP windows. As the code works fine, I need to transfer it onto the Linux platform. When I execute the code, PHP replies "Fatal error: Call to undefined function: imagecreate()". I had libgd installed. I just added GD 1.8.4.

Re: [PHP] function return

2002-05-28 Thread Miguel Cruz
On Tue, 28 May 2002, W. Enserink wrote: > I have a Q about functions. My function should return 2 values. What > syntax should I use and how do I call these values outside the function? > Are these values returned as en array or something? > > > this is what I have now, > ---

Re: [PHP] Thread safe

2002-05-28 Thread Miguel Cruz
On Mon, 27 May 2002, r wrote: > In java servlets I used to use a "synchronised" block of code to make sure > it was thread safe...how do i do this in PHP? > > Heres what should be thread safe > > { > $r=select max(cno)+1 from MyTable; > (then i insert into the table the new cno plus my name) > i

Re: [PHP] Mailing Archieve

2002-05-28 Thread Miguel Cruz
On Tue, 28 May 2002, Uma Shankari T. wrote: > Can anyone please tell me how to create a mailing archieve list 1) Get messages delivered to a PHP program. 2) Parse the messages. 3) Add them to the database. 4) Provide a front-end for querying the database. Which part are you having trouble with?

Re: [PHP] Missing functions??

2002-05-28 Thread Miguel Cruz
On Tue, 28 May 2002, Weston Houghton wrote: > I'm using the Mac OS X binary of PHP 4.2.1 provided by Mark Liyanage > (http://www.entropy.ch/software/macosx/php/), and I am starting to notice > some oddities, I was wondering if anyone else had seen these errors in other > ports. > > I'm getting so

Re: [PHP] php's variables & javascript

2002-05-28 Thread Miguel Cruz
On Tue, 28 May 2002, burak delice wrote: > I want to make a php that include javascript that use a php variable. Code > is below: > > $size = GetImageSize ("images/$resim"); > echo " > wdth=";$size;echo";"; > echo ""; > ?> > > (I am calling that php file as below) > http://localhost/Aksu/we

RE: [PHP] Intermediate "Searching..." screen.

2002-05-28 Thread SP
Vbulletin does this for their search. Anyone know how they do it? http://www.vbulletin.com/forum/search.php -Original Message- From: Kevin Stone [mailto:[EMAIL PROTECTED]] Sent: May 28, 2002 2:36 PM To: Jeff Bearer; Php-General (E-mail) Subject: Re: [PHP] Intermediate "Searching..."

Re: [PHP] Imagecreate and/or GD library not activated

2002-05-28 Thread Dennis Moore
check to see if gd is actually activated by using phpinfo() assuming you are using PHP4... /dkm - Original Message - From: "LeTortorec, Jean-Louis" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 28, 2002 2:35 PM Subject: [PHP] Imagecreate and/or GD library not activated

[PHP] auto_increment

2002-05-28 Thread webmaster
I think this is any easy question, but I couldn't find an answer in the php Black Book for PostgreSQL. Does anyone know the equivilant of auto_increment for PostgreSQL? This is the php code that I have: $query = "CREATE table $tablename (id INT NOT NULL PRIMARY KEY, ip TEXT, customer TEXT, dslp

[PHP] Multiple variables

2002-05-28 Thread Morten Nielsen
Hi, I got a table, which contains a lot of text-boxes. Each textbox has a name: Text1 Text2 Text3 etc. Is it possible to check if they are all set using a for-loop? I think of something like: for($i=1;$i<10;$i++) { if(empty("Text"+$i)) { do something...

[PHP] comment followed by ?> fails to parse

2002-05-28 Thread Thalis A. Kalfigopoulos
If I write a comment line with // and I include in it ?> then it fails to parse the rest of the page because (i'm guessing) the parser gets confused and goes off PHP mode. Is this normal? Shouldn't I be able to write literally ANYTHING on a comment line? Sample Code: $var=1; ?> Output: $va

Re: [PHP] (Unlink(file) == rm file) ? (ignore this mail):(explain diffs);

2002-05-28 Thread Dan Lowe
Previously, Jimmy Lantz wrote: > > (Unlink(file) == rm file) ? (ignore this mail):(explain diffs); > > Does PHP unlink function handle deletion of files equally as the "rm" > command on the system in my case FreeBSD. > Or does it involve caching/handling files in any different way? It just use

RE: [PHP] Efficient PHP

2002-05-28 Thread SP
Here's an article you might want to read http://phplens.com/lens/php-book/optimizing-debugg ing-php.php -Original Message- From: Ed Gorski [mailto:[EMAIL PROTECTED]] Sent: May 28, 2002 9:46 AM To: [EMAIL PROTECTED] Subject: [PHP] Efficient PHP Anyone know any good links on papers/artic

Re: [PHP] Multiple variables

2002-05-28 Thread Miguel Cruz
On Tue, 28 May 2002, Morten Nielsen wrote: > I got a table, which contains a lot of text-boxes. Each textbox has a name: > > Text1 > Text2 > Text3 > etc. > > Is it possible to check if they are all set using a for-loop? > I think of something like: > > for($i=1;$i<10;$i++) > { >

Re: [PHP] Multiple variables

2002-05-28 Thread Thalis A. Kalfigopoulos
>From my understanding of what you wrote: foreach($textBoxArray as $tBox=>$tVal){ if(empty($tVal)){ echo("Found empty textBox: $tBox\n"); } } Read in manual about isset() and empty() cheers, thalis On Tue, 28 May 2002, Morten Nielsen wrote: > Hi, > I got a tab

  1   2   >