[PHP-DB] Trouble with uploading a file via ftp_put

2003-10-05 Thread Ruprecht Helms
Hi, by uploading a file via the ftp_put-command the upload is not done properly. Result is I have a file in the destinationdirectory but 0 bit in size, only the filename is transfered. How have I to write the script that the file I want upload should be uploaded within the correct size. The

Re: [PHP-DB] Trouble with uploading a file via ftp_put

2003-10-05 Thread Jason Wong
On Sunday 05 October 2003 17:15, Ruprecht Helms wrote: by uploading a file via the ftp_put-command the upload is not done properly. Result is I have a file in the destinationdirectory but 0 bit in size, only the filename is transfered. How have I to write the script that the file I want

Re: [PHP-DB] Trouble with uploading a file via ftp_put

2003-10-05 Thread Ruprecht Helms
On Sun, 2003-10-05 at 11:39, Jason Wong wrote: $upload=ftp_put($conn_id,$bild,$dstdir./.$bild,FTP_BINARY); [/code] 1) You've got your source-file and destination-file mixed up. 2) You've already chdir into 'html' so destination-file so be just '$bild' and not '$dstdir./.$bild'. Unless

Re: [PHP-DB] Confused

2003-10-05 Thread Jason Wong
On Sunday 05 October 2003 23:44, Robin Kopetzky wrote: I need to setup a user, 'commerce' with a password, that can be accessed from any web server in our farm 'blackmesa-isp.net'. What GRANT statement do I need to make this work? I've tried a bunch of the examples in the manual and can't get

Re: [PHP-DB] Confused

2003-10-05 Thread Martin Marques
El Dom 05 Oct 2003 12:44, Robin Kopetzky escribió: I need to setup a user, 'commerce' with a password, that can be accessed from any web server in our farm 'blackmesa-isp.net'. What GRANT statement do I need to make this work? I've tried a bunch of the examples in the manual and can't get it

Re: [PHP-DB] Confused

2003-10-05 Thread Martin Marques
El Dom 05 Oct 2003 13:07, Jason Wong escribió: On Sunday 05 October 2003 23:44, Robin Kopetzky wrote: I need to setup a user, 'commerce' with a password, that can be accessed from any web server in our farm 'blackmesa-isp.net'. What GRANT statement do I need to make this work? I've tried a

Re: [PHP-DB] Confused

2003-10-05 Thread Wang Feng
Jason, how do you know he's using MySQL? I think some php people would like to answer this question since it makes the community stronger. cheers, feng - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 06, 2003 2:07 AM Subject: Re:

Re: [PHP-DB] Trouble with uploading a file via ftp_put

2003-10-05 Thread Jason Wong
On Sunday 05 October 2003 21:54, Ruprecht Helms wrote: actual I have the following script. I want to upload a image from the local pc into the subdir html of a webspace. You *are* running this script on the local pc aren't you? The file I want to upload is not stored in the

Re: [PHP-DB] Confused

2003-10-05 Thread Wang Feng
Jason, There are good reasons for having different lists for different subjects. Note, he post the message to the [EMAIL PROTECTED] rather than [EMAIL PROTECTED] There's nothing wrong to ask questions @ php-DB. :-) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] Confused

2003-10-05 Thread Wang Feng
I assume you're using MySQL since L.A.M.P seems very popular. The following command should work anyway: GRANT permission ON tablename TO [EMAIL PROTECTED] IDENTIFIED BY password You can list as many permission as needed, separated by commas. cheers, feng - Original Message - From:

RE: [PHP-DB] Confused

2003-10-05 Thread Robin Kopetzky
To answer your question, yes, I'm using mysql. No, I did not intended for everyone to go thermonuclear over this question. Next time, I'll go elsewhere since some one got P.O.'d about my posting twice. Sparky -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] Confused

2003-10-05 Thread Michael Cupp, Jr.
Don't feel bad, I had a MySQL question and posted it to that list and got a similar response. I've been in IT and have been an oracle consultant for 11 years, so I'm far from ignorant, but I guess I would have hoped that someone would be more patient in helping someone learn a new technology.

[PHP-DB] SoS

2003-10-05 Thread zxx10
Hi, All: I'm a beginner of PHP. While trying the code from a tutorial, I encountered the following problem. The variable $id can not be transfered to my server. You can find the code at the end of this email. When I visit http://mydomain.com/test.php?id=1 it always shows the list of the database

Re: [PHP-DB] SoS

2003-10-05 Thread Jason Godesky
Your if statement will only be TRUE if $id is set to FALSE, NULL or zero (0)--I think you're looking for if the variable is set. That would be: if (isset($id)) -- Jason Godesky [EMAIL PROTECTED] http://www.tribaldawn.com/jason/ I'm a beginner of PHP. While trying the code from a tutorial, I

Re: [PHP-DB] SoS

2003-10-05 Thread Shahmat Dahlan
if the statement if (isset($id)) doesn't probably it because register_globals has been turned off maybe? How about if (isset($_GET[id])) ? [EMAIL PROTECTED] wrote: Hi, Jason: Thank you very much for your quick reply. I tried the if (isset($id)) but it doesn't work. Any thoughts? By the way,

Re: [PHP-DB] SoS

2003-10-05 Thread zxx10
Hi, Shahmat: Thank you very much! Yes, I use echo phpinfo() and found out that register_globals has been turned off. How can I turned it on? Do I need to recompile the Php? I also tried if (isset($_GET[id])) and found out that $id is NULL. So, there will be an error in the SQL statement. Zhan

Re: [PHP-DB] SoS

2003-10-05 Thread Jason Godesky
if the statement if (isset($id)) doesn't probably it because register_globals has been turned off maybe? How about if (isset($_GET[id])) ? And if you want to keep the flexibility of getting the variable from anywhere, you can always use if ((isset($_GET[id]))||(isset($id)))--that would cover

Re: [PHP-DB] SoS

2003-10-05 Thread zxx10
Hi, Jason and Shahmat: I figured it out! The register_globals is turned off. To parse the id with this parameter off, I just need to judge whether $_GET[id] is set or not. The problem is that I wrote the SQL statement as: $SQLstr=SELECT * FROM employees WHERE id=$_GET[id]; That's a wrong one.

Re: [PHP-DB] SoS

2003-10-05 Thread Shahmat Dahlan
You might want to consider using the autoglobals arrays, $_GET and $_POST, this is due to some security concerns... because if you don't plan your codings properly, other parties might just be able to exploit your codes... If you still want to insist on turning it on... you can do it via a

Re: [PHP-DB] SoS

2003-10-05 Thread Jason Wong
On Monday 06 October 2003 10:18, [EMAIL PROTECTED] wrote: I figured it out! The register_globals is turned off. To parse the id with this parameter off, I just need to judge whether $_GET[id] is set or not. The problem is that I wrote the SQL statement as: $SQLstr=SELECT * FROM employees

[PHP-DB] Re: SoS

2003-10-05 Thread Rahman Haqparast
Hi. If your id is not a numeric field you should change your query this way: $result = mysql_query(SELECT * FROM employees WHERE id='$id',$db); [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, All: I'm a beginner of PHP. While trying the code from a tutorial, I encountered the

Re: [PHP-DB] SoS

2003-10-05 Thread zxx10
Yes. I'll do that. In this example, the only thing that I can think about input checking is to use is_int() function. Is there any other ways to do the input checking? Thanks. Zhan Xu EECS Department Case Western Reserve University - Original Message - From: Jason Wong [EMAIL PROTECTED]