Extreme Beginner Help-Loading Images from User Selected Data

I’m looking for a bit of direction. What I have is a clothing browser form on my site with two dropdown lists. A user choses a color from the first dropdown lists and a style from the second and the image is displayed based on their selections. I have all of the images stored in an images folder on my server. What I was hoping to do is be able to load the image url based on the user’s selections. For example: if the user selected color: blue and style:short, and clicked “submit”, the next page would load the image named: blue_short.gif. Currently, I’m using Javascript to achieve this but was hoping for a PHP solution.

Is this even possible with PHP? And if so, could you point me in the direction of a tutorial that would explain how to do this. I’ve made attempts at searching, but since I’m not skilled with PHP I honestly have no idea what I should even be searching for. Thank you for any help you may be able to offer :D

http://de2.php.net/manual/en/getting-started.php
theres a part called dealing with forms.
u may use the <?php-tag inside the src attribute of ur image

When I started learning PHP I used http://www.tizag.com/phpT/ . I found it fantastic it showed me everything I needed. You will need to read the whole tutorial to know exactly what to do, and to give you a bit of knowledge in PHP.

Sponsor our Newsletter | Privacy Policy | Terms of Service