[PHP-DB] Using ifelse to go to another page

2003-01-04 Thread Alex Francis
I have dropdown lists on one page which were working fine. However I need to make a slight alteration and add another 2 ifelse statements to go to another page instead of carrying out the $SQL statement. I have added the last 2 ifelse statements but I still get the SELECT statement working. Can

[PHP-DB] Using ifelse to redirect to another page

2003-01-04 Thread Alex Francis
I have dropdown lists on one page which were working fine. However I need to make a slight alteration and add another 2 ifelse statements to go to another page instead of carrying out the $SQL statement. I have added the last 2 ifelse statements but I still get the SELECT statement working. Can

Re: [PHP-DB] Using ifelse to go to another page

2003-01-04 Thread Bill Lovett
Change the second ifelse-- either get rid of it, or put it at the end. Right now your logic is like this: if (a equals b) { ... } elseif (a does not equal b) { ... } elseif (c equals d) etc One of the first two conditions will always match, so the rest of the statement is skipped. -bill

Re: [PHP-DB] Renaming a file uploaded by a form.

2003-01-04 Thread [EMAIL PROTECTED]
Thanks for all your help. I got the file OK and I figured out how to rename it and make it an attachment to an email. But one thing is not working for me. When I look for the mime type I get the following error: Fatal error: Call to undefined function: mime_content_type() When I call it to

Re: [PHP-DB] Renaming a file uploaded by a form.

2003-01-04 Thread Jeffrey_N_Dyke
did you compile PHP with --enable-mime-magic? if not, this extension will not work. there are work arounds. one isa class that resides on phpclasses.org that will give you a mime based on the file extension. and i'm sure there are other ways hth jeff

[PHP-DB] How to seperate the web server and MySQL database server?

2003-01-04 Thread Qunfeng Dong
Hi, I am sure this is a silly/easy question but I really hope someone can point me some documents. We are currently running PHP and MySQL at the same machine. Can I run PHP in one machine and MySQL server in another machine? If so, how can I make the database connection? Currently, in all my PHP

[PHP-DB] Progress output

2003-01-04 Thread Micah Stevens
I just wrote a script that goes through a database and does a lot of stuff to the data, it takes about 30 seconds to a minute to run through everything, so I thought it would be nice to show a progress indicator of some sort. What I have at this point, is that after every record is processed, I

Re: [PHP-DB] Progress output

2003-01-04 Thread Jason Wong
On Sunday 05 January 2003 03:25, Micah Stevens wrote: I just wrote a script that goes through a database and does a lot of stuff to the data, it takes about 30 seconds to a minute to run through everything, so I thought it would be nice to show a progress indicator of some sort. What I have at

Re: [PHP-DB] How to seperate the web server and MySQL database server?

2003-01-04 Thread Jason Wong
On Sunday 05 January 2003 02:54, Qunfeng Dong wrote: Hi, I am sure this is a silly/easy question but I really hope someone can point me some documents. We are currently running PHP and MySQL at the same machine. Can I run PHP in one machine and MySQL server in another machine? If so, how can

Re: [PHP-DB] Progress output

2003-01-04 Thread Micah Stevens
Heh.. I did.. Thanks! -Micah On Sat, 2003-01-04 at 12:05, Jason Wong wrote: On Sunday 05 January 2003 03:25, Micah Stevens wrote: I just wrote a script that goes through a database and does a lot of stuff to the data, it takes about 30 seconds to a minute to run through everything, so

[PHP-DB] PHP/MySQL

2003-01-04 Thread Mike C
Hi, I hope someone can help me with this. I am trying to modify this portion of a script so that I can upload photos (MacOSX 10.2.3) but keep the file names intact. At the moment everything works fine except that when I upload photos, the script changes the name of the file I just uploaded to

[PHP-DB] Textarea, File Upload field setting values

2003-01-04 Thread Rajesh Fowkar
Hi, I can write a code like : input type=text name=txtfield1 value=? $txtfield1 ? Thus I can set the value of $txtfield1 and it is reflected in the above textbox. How can such thing be done with TextArea and File upload ? input maxLength=128 name=Imagefile type=file value=? echo $Imagefile ?

Re: [PHP-DB] PHP/MySQL

2003-01-04 Thread Micah Stevens
The script is generating a filename based on the id and then copies the file from somewhere to the new location. It's doing just what it's supposed to. IF you don't want it to do it, just use the following instead: // // Insert the photo details into the database

[PHP-DB] displaying a MySQL date in a different format

2003-01-04 Thread Ali McLeod
Can anyone help me. I am trying to display a date in a different format from that stored in a MySQL database. MySQL forces you to store it as -mm-dd but I want to display it as dd-mm-, or dd- Any ideas? Many thanks in advance Ali McLeod [EMAIL PROTECTED] -- PHP Database Mailing

Re: [PHP-DB] displaying a MySQL date in a different format

2003-01-04 Thread Jeffrey_N_Dyke
SELECT DATE_FORMAT(NOW(), '%m/%d/%Y'); will out put 01/04/2003. replace NOW() with you're column name. check out hte mysql manual for all of the date variations. hth jeff

Re: [PHP-DB] Textarea, File Upload field setting values

2003-01-04 Thread Bill Lovett
For the textarea, print the value between the tags-- there is no value attribute: textarea?= $txtDescription ?/textarea You cannot do this with file inputs. -bill Rajesh Fowkar wrote: Hi, I can write a code like : input type=text name=txtfield1 value=? $txtfield1 ? Thus I can set the

[PHP-DB] more values in a array

2003-01-04 Thread Martin Allan Jensen
Hi everybody, I'm about to transport data from a function to a page that calls it, but i'm HAD to make the data's in one or more array's. How can i possibly put all these datas in an array ?? And is it possible ?? idvalueyeartype --+---+-+-+ 1 1002002 P

Re: [PHP-DB] more values in a array

2003-01-04 Thread Jason Wong
On Sunday 05 January 2003 11:18, Martin Allan Jensen wrote: Hi everybody, I'm about to transport data from a function to a page that calls it, but i'm HAD to make the data's in one or more array's. How can i possibly put all these datas in an array ?? And is it possible ?? idvalue

[PHP-DB] php variables to JS

2003-01-04 Thread Bruce Levick
Bruce Levick - VivamotionI am opening a chromless window with some JS code. I need to pass some variables which come from rows in my database into the jscript which will determine the size and URL of the window. Before I go about drawing the info from the database I have set up some hard code php