graham23s Posted May 16, 2007 Share Posted May 16, 2007 Hi Guys, i was going to use arrays to store data into mysql from a form i would get this: $sports_type = array('Football'=>'Football.gif', 'Basketball'=>'Basketball.gif'); so when the form is submitted the name = sports, right now it stores Football or Basketball into mysql, but on another page i wanted to display the results in a table and under sports i wanted the .gif to be displayed, i was wondering the best way to go about this? thanks for the help guys Graham Quote Link to comment https://forums.phpfreaks.com/topic/51673-solved-question-about-arrays/ Share on other sites More sharing options...
Psycho Posted May 16, 2007 Share Posted May 16, 2007 I read your post about three times and I still have no idea what you are trying to convey or what your question really is. Care to try and explain again? Quote Link to comment https://forums.phpfreaks.com/topic/51673-solved-question-about-arrays/#findComment-254531 Share on other sites More sharing options...
graham23s Posted May 16, 2007 Author Share Posted May 16, 2007 Sure basically this: when a user select a sport from a drop down list say "football", when it comes to storing that information in the database i wanted a .gif i.e football.gif to be inserted, so when i echo a table out later under the category "football" there will be a .gif INSTEAD of the actual word football. hope that makes sense cheers Graham Quote Link to comment https://forums.phpfreaks.com/topic/51673-solved-question-about-arrays/#findComment-254565 Share on other sites More sharing options...
taith Posted May 16, 2007 Share Posted May 16, 2007 just on your query... put $_POST[var].'.gif'; Quote Link to comment https://forums.phpfreaks.com/topic/51673-solved-question-about-arrays/#findComment-254572 Share on other sites More sharing options...
graham23s Posted May 16, 2007 Author Share Posted May 16, 2007 Nice one guys cheers Graham Quote Link to comment https://forums.phpfreaks.com/topic/51673-solved-question-about-arrays/#findComment-254598 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.