robk Posted March 30, 2009 Share Posted March 30, 2009 I have no php knowledge whatsoever. I can cut and paste and make minor changes if I read enough. That being said, I am seeking an answer to my current problem changing http://demo.rockettheme.com/dec08/ into a product selector. Currently the menu shown hanging in the sign at the top right just changes the css files based on this code. <select name="tstyle" id="variation_chooser" class="button" style="float: left;"> <?php for ($x=1;$x<=6;$x++) { echo "<option value=\"style$x\"" . getSelected('style'. $x) .">Style $x</option>\n"; } ?> </select> I am trying to change it so that I can get the selector to go to a specific url based on the name of the product like this (except for the math part of the code) getSelected('style'. $x) .">One Fish $x</option>\n"; getSelected('style'. $x) .">Two Fish $x</option>\n"; getSelected('style'. $x) .">Red Fish $x</option>\n"; getSelected('style'. $x) .">Blue Fish $x</option>\n"; I realize this is probably not enough information to answer my question or that I might not even be asking the question properly. There are a couple files that make up the process but I could not see where to attach them here in the posting interface. Can anyone point me in the right direction to get assistance with this? It's very important to me. Link to comment https://forums.phpfreaks.com/topic/151733-replacing-current-style-selector-math-with-an-array/ Share on other sites More sharing options...
Brian W Posted March 30, 2009 Share Posted March 30, 2009 Well, correct me if I'm off, by the sounds of it you want them to select from the drop down and then submit the form which will then take them to the page/product they selected. what you could do it create a page that processes their selection and then forwards them to that page. <?php $prod = intval($_GET['prod']); if($prod <= 0){ die('Please Select A Product.'); } else{ header('location: products.php?pid='.$prod); die(); } ?> that code is not ready to be thrown into your mix, its just an example. Seeings that you don't know much php, this may require you learning some more or hiring some one as what you are talking about won't be minor little quarks but rather will require new code. Hope this reply helps Link to comment https://forums.phpfreaks.com/topic/151733-replacing-current-style-selector-math-with-an-array/#findComment-796876 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.