want to display images for my storefront.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ashraf02
    New Member
    • Feb 2008
    • 53

    want to display images for my storefront.

    hi i am trying to display an image using mysql and php. basically i am doing a project which consists of making a storefront. i don't know how to display images i've searched for answers via google but can't find exactly what i am looking for.

    basically i want to display images of clothing on my webpage along with the item description. if u can give me a brief walkthrough i will be very very very grateful thanks in advance.

    Ashraf
  • TheServant
    Recognized Expert Top Contributor
    • Feb 2008
    • 1168

    #2
    How I would do it is store all your pictures in one file, and then in your MySQL table you can have the fields: name (name of item), file (name of picture file) and description. So when you call up the data base and name your variables say $item_name, $file_name, $item_desc you can make something like the following:
    [PHP]<?php
    echo ("<div style=\"style_n ame\">
    <h1>".$item_nam e."<br />
    <img src=\"../pics/item_pics/".$filename.".j peg alt=\"".$item_n ame."\" />
    <p>".$item_desc ."</p>
    </div>");
    ?>
    [/PHP]

    Not sure if that works, but something like that should do it.

    Comment

    • Markus
      Recognized Expert Expert
      • Jun 2007
      • 6092

      #3
      The first thing i found when searching for file upload php mysql

      Once you've got that tutorial done, come back and we'll help.

      Regards

      Comment

      Working...