[PHP] Re: Question about using if elseif ...

2002-07-23 Thread Fargo Lee
Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Question about using if elseif ...

2002-07-18 Thread Fargo Lee
When viewing examples of using if and elseif I often see the example ending with an else like ... if($a == '1'){ echo '1'; } elseif ($a == '2'){ echo '2'; } else { echo '0'; } Is there any problem with leaving out the last else and just ending it with an elseif such as ... if($a == '1'){ echo '

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-10 Thread Fargo Lee
> Run the command manually at a shell prompt. What happens? Here's what > happens for me on WinNT. In an error condition, say my password is > invalid, it retuns the error message then a blank line and then I'm back > at the prompt. So, if system() is true to the manual, that blank line is > t

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-10 Thread Fargo Lee
ccess? "Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Wed, Jul 10, 2002 at 12:14:58PM -0700, Fargo Lee wrote: > > > > when made to fail MySQL does return an error on the command line yet the > >

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-10 Thread Fargo Lee
. "Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Wed, Jul 10, 2002 at 12:14:58PM -0700, Fargo Lee wrote: > > > > This suggests, as do a few posts I just noticed in the manual, that > > one

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-10 Thread Fargo Lee
mand line. > > ---John Holmes... > > > -Original Message- > > From: Fargo Lee [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, July 10, 2002 1:27 AM > > To: [EMAIL PROTECTED] > > Subject: Re: [PHP] How do I import tables into MySQL from web page ... > &

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-10 Thread Fargo Lee
o use the return_var as you suggested. Thanks! "Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Tue, Jul 09, 2002 at 11:41:47PM -0700, Fargo Lee wrote: > > > got it to assign a 0 (success) or 1 (f

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-09 Thread Fargo Lee
n a 0 or a 1. I thought I could capture it by assigning the system call to a variable in front but that appears to capture nothing on success or failure. "Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > O

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-09 Thread Fargo Lee
when I try to echo it. "Jason Wong" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Wednesday 10 July 2002 13:27, Fargo Lee wrote: > > Thanks for pointing out the syntax error. I added the space after the -u > > but i

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-09 Thread Fargo Lee
ews:[EMAIL PROTECTED]... > On Tue, Jul 09, 2002 at 06:09:36PM -0700, Fargo Lee wrote: > > > > $status = system("mysql -umyuserid -pmypassword mydbname < > > You need a space between "-u" and "myuserid" > > --Dan > > -- >

[PHP] How do I import tables into MySQL from web page ...

2002-07-09 Thread Fargo Lee
Hi, I am trying to import some tables from a dump file into a MySQL database from a php web page. What is the best way to do this without using backticks (fpassthru, system, exec or something else) and test for success or failure? I tried the following and while it works, my test for success or fa

[PHP] Re: How to convert seconds to days, hours, minutes & seconds?

2002-06-18 Thread Fargo Lee
Thanks! "Fargo Lee" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > Hi, if I have a variable containing a number of seconds what function would > I use to output something like ... > > 13 Hours, 12 Minutes, 3 Seconds > > or > > 23 Days,

Re: [PHP] How do I hide download link ...

2002-06-18 Thread Fargo Lee
Ok think I am all good now. Added ... $fh = fopen("$download_file", "r"); then changed ... passthru($download_file); to fpassthru($fh); Thanks, again! "Fargo Lee" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

Re: [PHP] How do I hide download link ...

2002-06-18 Thread Fargo Lee
n't remember > the exact syntax right now) > > read the file from somewhere that's not accessable from the web and spit it > out to the browser > > HTH > Martin > > > -Original Message- > From: Fargo Lee [mailto:[EMAIL PROTECTED]] > Sent: Thu

Re: [PHP] How do I hide download link ...

2002-06-18 Thread Fargo Lee
ffering, but you should get the idea. > > Adapt to your needs, but this is the basics of it. Check for a valid > session, if it exists, send appropriate headers and use passthru() to send > the file. (you can use file(), fopen(), whatever, as long as you send the > content of the file af