Forum Moderators: phranque
I basically just combined those databases so I would only have to worry about one. I would like to take that form i originally had and integrate the upload pic feature so they can put their "band" pic or "personal profile" pic. Problem is, I dont know how to link those tables up so that when they upload their pic, it will matchup with the correct name, address, etc.
This is a problem since i downloaded 2 seperate scripts with 2 seperate databases I dont know how to link the info all together.
Any tutorials or advice on what i should change in the code?
Thank you...
I would do it exactly the way you describe it here because I beleive uploading pics to a db can cause some slow running applications if you've got either big pics or loads of smaller one.
What I would do is upload pic to the server with an asp script and then add a field on the form to populate the database with the name of the image. On your display page just add the image name in the <img src=""> tag and it will display the image for you.
To be sure to have unique image names you could ask the 'bands' to call their image 123thebandname_image1 (where 123 is a random typing).
Leo
The asp script that uploads images has a field for NAME, DESCRIPTION, and a place where the person can "broswe" for their filename.
When they press submit it writes it to a table called PICTURES
My other script for the regular looking form page has NAME, DESCRIPTION, WEBSITE URL, CONTACT NAME, COMMENTS....ETC.
When they press submit on that form it writes to a table called LINKS.. ..
In my links.asp file, there are a couple of areas where i had to add this...
myPic = linkRec("picture")
then i made a column called picture in my db
and then i had to write this code so it would show up dynamically with the other info like the name, description, etc.
<IMG border="0" src="images/directory/<%= myPic%>" border=0 height=100>
So right now it will display a pic that is in the column called "picture" along with all the other info they entered. Problem is, i have to type the name in manually into the database for it to show. I dont know how to get that upload script to write to that field and matchup with the ID and info from the other form. Does this make sense?
I am confused on how to display the name and description from table A which is input on form A, and ALSO display
the actual dynamic pic from table B that was input on form B. I thought the tables were seperate things alltogether and had different ID's which wouldn't be able to matchup.
Its important for the info to be dynamic because i have a search feature that lists the info AND pic.
I hope i'm not confusing anyone or making something easy into something difficult!
Like I said i'm very new at this and just tinkering around. I wish i could post the link to show what i'm talking about not sure if i'm allowed to though.
If its access simply copy/reproduce one of the tables into the other database and copy the code over one form to the other. Then all you need to do is find and replace all the occurance of the unused database name on the new form page by the name of the newly built/2 table database.
What you could have instead of the browse field is a normal field where people just type the name of the image.
Leo