This is a discussion on "[SOLVED] Uploading" within the PHP Forum section. This forum, and the thread "[SOLVED] Uploading are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] Uploading
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
[SOLVED] Uploading
How would i get it so a user could use the form to upload a image to dir: images. Using the same for to add it to the DB
Quote:
Last Blog Entry: Whats your Niche? (Jun 10th, 2008)
|
|
|
|
#2
|
|||
|
|||
|
Re: Uploading
Here's the code for a simple upload script:
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
|
#3
|
|||
|
|||
|
Re: Uploading
I don't think i explain it well. My site users will upload images ( cartoons). I would like the php to upload to the image dir. AND add to the DB the record set is in the first post.
Last Blog Entry: Whats your Niche? (Jun 10th, 2008)
Last edited by simonb; Oct 6th, 2007 at 17:11. |
|
#4
|
|||
|
|||
|
Re: Uploading
Yeah, you'll have to combine the two scripts and that should be exactly what you want!
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
|
#5
|
|||
|
|||
|
Re: Uploading
Ok right thanks.
How do you do that. lol.
Last Blog Entry: Whats your Niche? (Jun 10th, 2008)
|
|
#6
|
|||
|
|||
|
Re: Uploading
Last Blog Entry: Whats your Niche? (Jun 10th, 2008)
|
|
#7
|
|||
|
|||
|
Re: Uploading
How do you reference to the image that has been uploaded in the database......do you insert the filename in the database and reference to that filename.
I have a script where I upload a file and I insert the filename in the database |
|
#8
|
|||
|
|||
|
Re: Uploading
insert the filename in the database and reference to that filename.
Yeah thats what i am looking for. If i could have a copy.
Last Blog Entry: Whats your Niche? (Jun 10th, 2008)
Last edited by simonb; Oct 6th, 2007 at 19:59. |
|
#9
|
|||
|
|||
|
Re: Uploading
This is how I upload an image but this script resizes it to a thumbnail but you don't have to do that or you can just change the image dimensions in $twidth and $theight
Where I have <select name="gallery"> this is where I choose which gallery I want to upload to (even though it all uploads to same directory) so you can have different types/users. If you need anymore help just let me know
|
|
#10
|
|||
|
|||
|
Re: Uploading
Quote:
Last Blog Entry: Whats your Niche? (Jun 10th, 2008)
|
|
#11
|
|||
|
|||
|
Re: Uploading
Missing a curly brace. Count each oif the curly braces and see which one is missing.
I had to cut down the script by a chunk beucase I have the script creating a thumbnail and another size image |
|
#12
|
|||
|
|||
|
Re: Uploading
Were do i add one
Last Blog Entry: Whats your Niche? (Jun 10th, 2008)
|