|
-
Feb 4th, 2008, 11:36 AM
#1
Thread Starter
Fanatic Member
Choosing a Picture & Send it To The Server
Hi ,
I have a Button & I want to choose a picture from my Computer & Then I send it to The Server
Thanks !
-
Feb 4th, 2008, 11:41 AM
#2
Re: Choosing a Picture & Send it To The Server
-
Feb 4th, 2008, 12:59 PM
#3
Hyperactive Member
Re: Choosing a Picture & Send it To The Server
on server...create a database which stores picture's path...not the picture..
then go to vb user picture box control and open dialog box control...
using open dialog box you will receive an picture's path...and store on
server's database...
finally while displaying picture load the path from your server's database..
it's very easy..and works...100%...
if you'll have further problem...i'll mail you the code..
-
Feb 4th, 2008, 01:40 PM
#4
Re: Choosing a Picture & Send it To The Server
Wow, hold on a second. The OP hasn't even asked a question, let alone mentioned any technical specifics.
Most likely the question is how to upload via a web form, but let's wait for the OP to clarify that before making suggestions.
-
Feb 4th, 2008, 01:57 PM
#5
Thread Starter
Fanatic Member
Re: Choosing a Picture & Send it To The Server
oK I have 2 button
1/input type="file"
2/input type="submit"
in first one when i choose a file , i need to save the name of the file in the Table
& The File in The Server
-
Feb 4th, 2008, 02:05 PM
#6
Re: Choosing a Picture & Send it To The Server
-
Feb 4th, 2008, 02:34 PM
#7
Thread Starter
Fanatic Member
Re: Choosing a Picture & Send it To The Server
Hi Penagate ,
Can You look at This Thread , i have made a function to do that
http://www.vbforums.com/showthread.p...63#post3128963
Thanks
-
Feb 4th, 2008, 04:42 PM
#8
Thread Starter
Fanatic Member
Re: Choosing a Picture & Send it To The Server
Last edited by killer7k; Feb 5th, 2008 at 10:54 AM.
-
Feb 4th, 2008, 07:58 PM
#9
Re: Choosing a Picture & Send it To The Server
You should be using move_uploaded_file(). This will improve security by ensuring the file was indeed uploaded.
-
Feb 4th, 2008, 07:59 PM
#10
Re: Choosing a Picture & Send it To The Server
 Originally Posted by visualAd
You should be using move_uploaded_file(). This will improve security by ensuring the file was indeed uploaded.
... as you would have learnt had you read the article I linked to above.
-
Feb 5th, 2008, 03:48 AM
#11
Thread Starter
Fanatic Member
Re: Choosing a Picture & Send it To The Server
Strange when i make The formulaire in a page.html
& To copie the file in a page.php It work Great
but if there are both .php doesnt work
show error : undefined index in NameofTheFile
i dont know why & its the same code
-
Feb 5th, 2008, 06:01 AM
#12
Re: Choosing a Picture & Send it To The Server
I don't understand what you are saying.
-
Feb 5th, 2008, 06:12 AM
#13
Thread Starter
Fanatic Member
Re: Choosing a Picture & Send it To The Server
oK !
I have a page which had 2 button Send & Submit
Send : Choose a File From my Pc
submit : Copy The File & Send it to The Server
Now i am here
There are 2 page :
1: which has The Button & The Second which has The Event
Last edited by killer7k; Feb 5th, 2008 at 10:54 AM.
-
Feb 5th, 2008, 06:43 AM
#14
Thread Starter
Fanatic Member
Re: Choosing a Picture & Send it To The Server
How I Can get The Value of $donnee['NUMEROMAMMOTEST'] of page 1
to be Transfered on parameter to The Second page
-
Feb 5th, 2008, 07:50 AM
#15
Re: Choosing a Picture & Send it To The Server
I still do not quite understand what you are doing here. I see no "Send" button. Only a submit button. I am not clear what you are doing and you screwed up the formatting on your previous post so it is also a nightmare trying to read it.
I gather that you want to move the uploaded file to a directory and then save its name / path in a database. Why can this not be done on one page? Why do you need another page to do it?
If you do want to do this then you should probably consider saving the name of the user in a session variable and retrieving that on the next page. Have a look at the PHP website.
Etes-vous français? La version française peut-être de vous aider. Je ne parle pas bien français.
-
Feb 5th, 2008, 08:39 AM
#16
Thread Starter
Fanatic Member
Re: Choosing a Picture & Send it To The Server
Last edited by killer7k; Feb 5th, 2008 at 10:53 AM.
-
Feb 5th, 2008, 11:10 AM
#17
Re: Choosing a Picture & Send it To The Server
All you need to do is put the databse update code in the same script as the copy code.
-
Feb 5th, 2008, 11:14 AM
#18
Thread Starter
Fanatic Member
Re: Choosing a Picture & Send it To The Server
maybe but I was urgent so i do it with the second page
Thanks anyway
-
Feb 5th, 2008, 11:59 AM
#19
Re: Choosing a Picture & Send it To The Server
- and that wasn't the easier option.
-
Feb 5th, 2008, 02:17 PM
#20
Thread Starter
Fanatic Member
Re: Choosing a Picture & Send it To The Server
Yes but I had a short time to do it !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|