y
Moderator: General Moderators
-
pinehead18
- Forum Contributor
- Posts: 329
- Joined: Thu Jul 31, 2003 9:20 pm
y
[Admin Edit: Topic continued from viewtopic.php?t=16653]
Well I did attempet to pass the var through the url. However it makes it to the upload page but when i go to upload it looses the var. Which is my main problem.
It uploads the file to a dir and then updates the db to the file name. But like is aid, it has no idea what to update cuase it looses the var.
I had wanted to also code it to check and see if pic2 had an image if not then upload to that sql db.
Any other questions? Someone had suggested using an array buti'm not sure how to go about that
Well I did attempet to pass the var through the url. However it makes it to the upload page but when i go to upload it looses the var. Which is my main problem.
It uploads the file to a dir and then updates the db to the file name. But like is aid, it has no idea what to update cuase it looses the var.
I had wanted to also code it to check and see if pic2 had an image if not then upload to that sql db.
Any other questions? Someone had suggested using an array buti'm not sure how to go about that
-
pinehead18
- Forum Contributor
- Posts: 329
- Joined: Thu Jul 31, 2003 9:20 pm
yup
Yes, here is basically how it works
my_pictures.php has a list of the pictures and it shows each one. When you click on it. It takes you to the upload page so you can upload or delete the image. The link of the image on my_pictures.php is url/uploadpage.php?imageid=main (or pic1 or pic2 for the other pics and so on)
When it gets to uploadpage.php it reads main. By usgin $_GET. However, once i select an image and hit upload. the form calls uploadpage.php again to run the script and at that time it looses imageid and it has no idea where to upload it.
Thats my main problem
my_pictures.php has a list of the pictures and it shows each one. When you click on it. It takes you to the upload page so you can upload or delete the image. The link of the image on my_pictures.php is url/uploadpage.php?imageid=main (or pic1 or pic2 for the other pics and so on)
When it gets to uploadpage.php it reads main. By usgin $_GET. However, once i select an image and hit upload. the form calls uploadpage.php again to run the script and at that time it looses imageid and it has no idea where to upload it.
Thats my main problem
-
pinehead18
- Forum Contributor
- Posts: 329
- Joined: Thu Jul 31, 2003 9:20 pm
-
pinehead18
- Forum Contributor
- Posts: 329
- Joined: Thu Jul 31, 2003 9:20 pm
-
pinehead18
- Forum Contributor
- Posts: 329
- Joined: Thu Jul 31, 2003 9:20 pm
-
pinehead18
- Forum Contributor
- Posts: 329
- Joined: Thu Jul 31, 2003 9:20 pm
Ok, i've just been able to start work on this, and i'm sorry for all the dumb questions first time i have ever done a script this extensive before.
This is how i have it set right now..
my_picstures.php - Click on the picture you want to change. This link will take you to edit_pics.php?imageid=pic id you clicked on
the pic id will determine what field to update in the sql for the pic url.
So on edit_pics.php - I have my form wich you select your file and click on submit. But part of that form is a hidden input which is <input type=hidden name=keepmyvar value=<? echo $_GET['pic'] ?>>
- I click on upload file and it reloads edit_pics.php (the form action was set to edit_pics.php) and in order to grab the pic id and keep it i do $_POST['keepmyvar']; and it should echo my pic id correct?
Reason i ask is cuase i'm having issues with it. It is breaking on the last stage.
Thank you for your time and help
Anthony
This is how i have it set right now..
my_picstures.php - Click on the picture you want to change. This link will take you to edit_pics.php?imageid=pic id you clicked on
the pic id will determine what field to update in the sql for the pic url.
So on edit_pics.php - I have my form wich you select your file and click on submit. But part of that form is a hidden input which is <input type=hidden name=keepmyvar value=<? echo $_GET['pic'] ?>>
- I click on upload file and it reloads edit_pics.php (the form action was set to edit_pics.php) and in order to grab the pic id and keep it i do $_POST['keepmyvar']; and it should echo my pic id correct?
Reason i ask is cuase i'm having issues with it. It is breaking on the last stage.
Thank you for your time and help
Anthony
-
pinehead18
- Forum Contributor
- Posts: 329
- Joined: Thu Jul 31, 2003 9:20 pm