1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Rep Power

    Exclamation Adding a picture to this php/MySQL news system ?!


    If I wanted to add a jpeg to a news article how would I go about it ?
    i understand about file uploads using php but I am unsure on my own how to make it all link up to this system.

    Any help would really be appreciatated...

    p.s thanks for the tutorial !
    Last edited by Yorkz; October 18th, 2003 at 03:21 PM.
  2. #2
  3. Rut row Raggy!
    Devshed Novice (500 - 999 posts)

    Join Date
    Jul 2001
    Tornado Alley
    Rep Power
    You would need to add a column to the table for images (a varchar that allows you to input the filename should be enough), add an upload box in the add/edit forms (remember to use enctype="multipart/form-data" in the form tag), and add an image tag to part of the script that displays the article like this...

    <img src="images/$image.jpg"> //if your row variable was called $image and the image was stored in the images folder and was a jpg.

    If you posted some code in these areas, I could be more specific.

IMN logo majestic logo threadwatch logo seochat tools logo