`Yousef Posted August 22, 2009 Share Posted August 22, 2009 Alright, this isn't really PHP I guess but it will integrate with my PHP script so . I was wondering if a drop-down menu can have two values for each option, for example: <select name="type"> <option value="18">PSP</option> <option value="18">iPOD</option> <option value="5">FLV</option> </select> This is for my YouTube to PSP/iPOD whatever script. It uses the numeric value and adds it to the YouTube URL in the format &fmt=value which codes as "http://www.youtube.com/get_video?video_id=".$var_id."&t=".$var_t."&fmt=".$_POST['type']; However I want to add a second value or something that would allow me to rotate certain things on the landing page in order to make it a more targetted experience for them. Anyway I can go about doing this? Any help greatly appreciated . Quote Link to comment Share on other sites More sharing options...
Aravinthan Posted August 22, 2009 Share Posted August 22, 2009 I think you can have the same values, not sure thou. Just run it to see if it works. Quote Link to comment Share on other sites More sharing options...
`Yousef Posted August 22, 2009 Author Share Posted August 22, 2009 Yeah you can have the same values but I want to know if you can add a second value or something that I could use in my PHP landing page rotator to differentiate between the two options that have the value 18. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted August 22, 2009 Share Posted August 22, 2009 You can put any string in as the value attribute. A common method is to concatenate using a separator character, like |, and then explode the data on that separator character to retreive each piece. value= "18|abc" list($value1,$value2) = explode("|",$_POST['type']); Quote Link to comment Share on other sites More sharing options...
`Yousef Posted August 22, 2009 Author Share Posted August 22, 2009 Ah right, so $value1 would be used in the &fmt='$value1' and then the landing page/ad rotator would be decided base on $value2 for example? Quote Link to comment 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.