Hi,
I'm a bit stuck, and I was wondering if someone could provide some help. I have a website which will have about 100 pages for different people, each person gets certain images on their page. I want to put a code for the images in a database, should I put the code in 1 field? and how should it be constructed? If I have 5 images, A,B,C,D,E. And someone gets iamges A,C & E. Should I put ACE in the database? or A,C,E. Or should I add a separate field for each image? Trouble is each person will have a different number of these iamges, so will have 1, some will have all 5. The database so far is..
user_id|user_name|description|address|
and then i want to add the image field. Is there a better way of doing this? I was going to add a function
function get_image()
if (image=='a') { echo '<img src=http://www.phpbuilder.com/board/archive/index.php/"a.gif">';}
if (image=='b') { echo '<img src=http://www.phpbuilder.com/board/archive/index.php/"b.gif">';}
etc...or something
Cheers
Ben
I'm a bit stuck, and I was wondering if someone could provide some help. I have a website which will have about 100 pages for different people, each person gets certain images on their page. I want to put a code for the images in a database, should I put the code in 1 field? and how should it be constructed? If I have 5 images, A,B,C,D,E. And someone gets iamges A,C & E. Should I put ACE in the database? or A,C,E. Or should I add a separate field for each image? Trouble is each person will have a different number of these iamges, so will have 1, some will have all 5. The database so far is..
user_id|user_name|description|address|
and then i want to add the image field. Is there a better way of doing this? I was going to add a function
function get_image()
if (image=='a') { echo '<img src=http://www.phpbuilder.com/board/archive/index.php/"a.gif">';}
if (image=='b') { echo '<img src=http://www.phpbuilder.com/board/archive/index.php/"b.gif">';}
etc...or something
Cheers
Ben