Jump to content

poppy

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

poppy's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. sorted it thanks for your help had the explode in the wrong place learning. p
  2. cheers andy i have exploded the result as you suggest <?php $picked = $_POST['dropdown']; // get selected value and name from dropdown list($optionvalue, $optionname) = explode("|", $picked); //assign values in the listed order ?> it works - great ! but, what i have subsequently realised though ( after many painful hours... ) is that what i need to do is to pass these two new values to another place within the code of the [b]same[/b]page, not the subsequent one as i had previously explained. that is to say that there is a php code block in the header of my page ( from an ecart template ) that needs to pick up these new values as column bindings [b]before[/b] moving to the subsequent ( cart ) page. this code block was working before by gathering [b]either [/b] the 'label name' or the 'value' from the 'dropdown' in the following way <rest of code block..... $Options = "".$_POST["dropdown"] .""; // column binding .....more code> and succesfully passing it on. now however if do this with one of the new values for starters <rest of code block..... $Options = "".$optionvalue.""; // column binding ......more code> it passes nothing on ! what stupid mistake am i making this time?? p
  3. I have a list/menu dropdown on my php page. It is dynamically populated from a mysql DB. I need to capture and store [b]seperately [/b] both the 'label' and the 'value' of the item chosen from the list so they can be used on a subsequent page - any ideas how this can best be done ? current code reads as follows name="dropdown"> <?php do { ?> <option value="<?php echo $row_rsswf['ItemValue']?>"><?php echo $row_rsswf['ItemName']?></option> <?php } while ($row_rsswf = mysql_fetch_assoc($rsswf)); $rows = mysql_num_rows($rsswf); if($rows > 0) { mysql_data_seek($rsswf, 0); $row_rsswf = mysql_fetch_assoc($rsswf); } ?> </select> many thanks p
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.