Re: [PHP] Why $a +1 is not 02 ??

2004-11-23 Thread Mailit, LLC
use printf( "%02d", $a + 1 ) or something like that. Should work. Mario Labunski wrote: Hello, I have small problem.. $a = 01; echo $a+1; //this will display 2, instead of 02. How to get 02? thanks. Lab. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

RE: [PHP] remove first character in text file

2004-11-23 Thread Mike
Start with fopen() - http://us2.php.net/manual/en/function.fopen.php Then use fread() - http://us2.php.net/manual/en/function.fread.php There's many user-contributed comments that should be of use. The docs are also quite helpful. -M > Hi there.. I have a text file where I need to remove JUST t

[PHP] remove first character in text file

2004-11-23 Thread Dustin Krysak
Hi there.. I have a text file where I need to remove JUST the first character in the text file. Can anyone point me to a tutorial? d -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] submitting two forms on one page

2004-11-23 Thread Marek Kilimajer
Adil wrote: Hey everyone, I'm having issues with a couple of forms that exist on one page. Basically what I'm trying to do is the following: Select a client from a dropdown select box(submit inner form). Based on that, another select menu appears that retrieves a list of projects based on the cli

Re: [PHP] Lost Variables

2004-11-23 Thread Jason Wong
On Wednesday 24 November 2004 04:52, Monique Verrier wrote: > I am using the general strategy suggested by Jay (thanks, Jay) to process > my form in another procedure. It's listed below. In my processStuff.php > program, I use the following code: > > $attributes = array(); > $attributes = array_

[PHP] Re: Why $a +1 is not 02 ??

2004-11-23 Thread Ben Ramsey
Labunski wrote: Hello, I have small problem.. $a = 01; echo $a+1; //this will display 2, instead of 02. How to get 02? thanks. Lab. You need to understand how PHP treats integers. It can never start an integer with a zero unless it's an octal or a hexadecimal number. And PHP will not hesitate to

[PHP] Why $a +1 is not 02 ??

2004-11-23 Thread Labunski
Hello, I have small problem.. $a = 01; echo $a+1; //this will display 2, instead of 02. How to get 02? thanks. Lab. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Capturing phpinfo()

2004-11-23 Thread Michael Sims
John Holmes wrote: >> From: "Ashley M. Kirchner" <[EMAIL PROTECTED]> >> How can I stick phpinfo() at the bottom of a page in such a way >> that it doesn't display the data in the page, but instead creates a >> log file and dumps everything in there) The log file should either >> be appended to

Re: [PHP] Capturing phpinfo()

2004-11-23 Thread John Holmes
> From: "Ashley M. Kirchner" <[EMAIL PROTECTED]> > How can I stick phpinfo() at the bottom of a page in such a way that > it doesn't display the data in the page, but instead creates a log file > and dumps everything in there) The log file should either be appended > to every time, or if no

Re: [PHP] Upload is still not working

2004-11-23 Thread Michael Leung
Hi, I have tested this with file no space on its filename yours, Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Capturing phpinfo()

2004-11-23 Thread Ashley M. Kirchner
How can I stick phpinfo() at the bottom of a page in such a way that it doesn't display the data in the page, but instead creates a log file and dumps everything in there) The log file should either be appended to every time, or if not, a unique one created every time (one per transaction.)

Re: [PHP] submitting two forms on one page

2004-11-23 Thread Greg Donald
On Tue, 23 Nov 2004 17:43:22 -0500, Adil <[EMAIL PROTECTED]> wrote: > The problem is that the outer form works fine, but the inner form that > dynamically retrieves the client project list doesn't refresh the page or > post so the project list never shows up. I've listed some code below. Looks li

[PHP] submitting two forms on one page

2004-11-23 Thread Adil
Hey everyone, I'm having issues with a couple of forms that exist on one page. Basically what I'm trying to do is the following: Select a client from a dropdown select box(submit inner form). Based on that, another select menu appears that retrieves a list of projects based on the client selecte

Re: [PHP] Lost Variables

2004-11-23 Thread Monique Verrier
Thank you, Alberto. Do you know -- does the extract() function not work? Monique. "Abrea" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > To turn $_POST["var1"], $_POST["var2"], $_POST["var3"] into $var1, $var2, > $var3: > > if(isset($_POST)) > { foreach($_POST as $key=>$value) >

[PHP] Re: Lost Variables

2004-11-23 Thread M. Sokolewicz
Monique Verrier wrote: First -- thank you for reading my post. I am using the general strategy suggested by Jay (thanks, Jay) to process my form in another procedure. It's listed below. In my processStuff.php program, I use the following code: $attributes = array(); $attributes = array_merge($att

Re: [PHP] Lost Variables

2004-11-23 Thread abrea
To turn $_POST["var1"], $_POST["var2"], $_POST["var3"] into $var1, $var2, $var3: if(isset($_POST)) { foreach($_POST as $key=>$value) { $$key= $value; print("$$key= $value; "); }} This should do it. The print statement is just to check the result. Regards Alberto Brea -Original Message--

[PHP] solaris 10 and php5

2004-11-23 Thread Jonel Rienton
Hi, i was trying to build php5 in a solaris 10 i386 box and I got stuck with the following error message: In file included from /usr/include/sys/wait.h:24, from /export/home/jonel/Downloads/php-5.0.2/ext/standard/exec.c:33: /usr/include/sys/siginfo.h:259: error: parse error befo

[PHP] Lost Variables

2004-11-23 Thread Monique Verrier
First -- thank you for reading my post. I am using the general strategy suggested by Jay (thanks, Jay) to process my form in another procedure. It's listed below. In my processStuff.php program, I use the following code: $attributes = array(); $attributes = array_merge($attributes,$HTTP_POST_VA

[PHP] mcrypt: generic_init failed

2004-11-23 Thread Adelaide Yip
Hi, I forgot to mention that the website is running on RedHat kernel-2.4.20. -- Adelaide -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] mcrypt: generic_init failed

2004-11-23 Thread Adelaide Yip
Hi, Our website uses mcrypt functions to encrypt and decrypt passwords stored in the PostgreSQL database. The website encrypted/decrypted passwords flawlessly under PHP 4.0.4, however, we recently upgraded the server that the website is stored on to PHP 4.2.3. Since then, each time a password is

RE: [PHP] IE title bug

2004-11-23 Thread Giles
It is actually a known bug in Flash with IE If you go here: http://www.macromedia.com/software/flash/about/#globalnav you'll get #globalnav in the title 3 times as there are 3 flash players in the page! We are actually now not using anchors (I wasn't too happy about them anyway) so no longer ha

RE: [PHP] IE title bug

2004-11-23 Thread Gryffyn, Trevor
This is probably more of a straight HTML/JS/something question. Do you happen to be using any kind of javascript or vbscript in your source that does any kind of "application.caption" or "window.title" or anything like that? I've used "Application.Caption" in VBA within Excel to update the title

RE: [PHP] Is there a shorthand way to...?

2004-11-23 Thread Gryffyn, Trevor
I didn't see this in any of the responses, and truthfully it's not the best way or most secure.. .basically it has a lot of flaws that you should watch out for (probably creates security issues more than any other thing) but another option for mass setting variables that are possible set or not is

Re: [PHP] if($var) vs. if(isset($var))

2004-11-23 Thread John Nichel
Sam Smith wrote: What's the difference between: if($var) and if(isset($var)) First is checking if $var is true (1, true, has value) or false (0, false, null, not set, etc.). Second is checking if $var has been defined, regardless of value. Depending on your error reporting level, the first one

RE: [PHP] if($var) vs. if(isset($var))

2004-11-23 Thread Vincent Jansen
$var = false; Then the first returns false While the second is true > -Original Message- > From: Sam Smith [mailto:[EMAIL PROTECTED] > Sent: dinsdag 23 november 2004 14:23 > To: PHP > Subject: [PHP] if($var) vs. if(isset($var)) > > > > What's the difference between: > > if($var) > >

[PHP] if($var) vs. if(isset($var))

2004-11-23 Thread Sam Smith
What's the difference between: if($var) and if(isset($var)) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] default extension for includes?

2004-11-23 Thread Marek Kilimajer
Justin French wrote: On 23/11/2004, at 12:44 PM, Jake Press wrote: Justin, 'Use the force luke' - or perhaps just write yourself a function to do this :) Sadly, included files inside functions don't inherit the global namespace, so you have to do something ridiculous like extract($GLOBALS) in

Re: [PHP] Upload is still not working

2004-11-23 Thread Burhan Khalid
Michael Leung wrote: Hi Jason, Thank you for your help. This is the output from PHP script: "upload_files is valid a directoryI am able to write to upload_files Warning: move_uploaded_file(upload_files/Water lilies.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in /va

[PHP] About DRES PHP application internationalisation...

2004-11-23 Thread Patrick Gelin
Hi, I'm trying to make DRES project (http://sourceforge.net/projects/dres/) compliant with ISO-8859-1. I'm not using mbstring into my windows 2000 server, I know there is problem with Internet Explorer browser... I saw DRES it use 'xmldoc' API into the file xmlutil.php. But this fonction seems

Re: [PHP] $_POST['xxx'] = "blabla" ?

2004-11-23 Thread steve
Chris Shiflett wrote: >> Maybe a daft question but why would you like to check for a >> specific value? >> >> Can you give an example when this is a good thing to do? > > You might have two submit buttons, where you want to take a different > action depending upon which one the user clicks. You

Re: [PHP] $_POST['xxx'] = "blabla" ?

2004-11-23 Thread Chris Shiflett
> Maybe a daft question but why would you like to check for a > specific value? > > Can you give an example when this is a good thing to do? You might have two submit buttons, where you want to take a different action depending upon which one the user clicks. Chris = Chris Shiflett - http:/

Re: [PHP] Timezones

2004-11-23 Thread Venelin Arnaudov
Thank you! I think this is what I needed. Regards, Venelin Robin Vickery wrote: On Mon, 22 Nov 2004 11:52:03 -0500, Gryffyn, Trevor <[EMAIL PROTECTED]> wrote: Then somewhere there has to be a cross reference between name and timezone info. I'm sorry I'm not running Apache here and don't have ac