I have a mysql table with 10 fields, i have a form with 10 fields, i have a display page with 10 fields.
So if i fill the 10 fields in my form, it will send the 10 infos to the database and my display page will show the 10 fields.
Problem is, if i fill only 4 fields in my form it will only send 4 info into the table and my display page will show 10 fields, 4 full 6 empty.
Basically i have a CMS that allows me to upload pics to my site, i can upload 10 pictures so my database has 10 fields, on my display page i have 10 lines repeating
CODE
<img src="pictures/". $row['pic'] .">
<img src="pictures/". $row['pic1'] .">
<img src="pictures/". $row['pic2'] .">
....
<img src="pictures/". $row['pic1'] .">
<img src="pictures/". $row['pic2'] .">
....
Problem is if i only uploaded 4 pics, my display page has the code for 10 pics, but no data can be retrieved for 10 so it is displaying a box with a broken image in it :/, what i want to basically do is only show as many images as i uploaded.
Is there like a code i can put between my IMG tags saying IF data than display the code... if NO data than don't display the IMG code ?
I am trying to find a way to it... but i am failing
I NEED HELP PLEASE !!!
Thanks :'(
