Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to create a drop down selection menu


spooks

Recommended Posts

Hi

 

Your code looks OK - if you grab it and paste it into a catalog/test.php file file this:

<?php

 require('includes/application_top.php');
 $duration = tep_db_prepare_input($HTTP_POST_VARS['duration']);
$duration_array = array();
 $duration_array[] = array('id' => '0', 'text' => '12 Monate');
 $duration_array[] = array('id' => '1', 'text' => '24 Monate');
 $duration_array[] = array('id' => '2', 'text' => '36 Monate');

  echo tep_draw_pull_down_menu('duration', $duration_array);
?>

 

You'll get a dropdown displayed with the HTML

 

<select name="duration">
 <option value="0">12 Monate</option>
 <option value="1">24 Monate</option>
 <option value="2">36 Monate</option>
</select>

 

So maybe there's something else in there that's interfering with your variables (Oooh err missus!)

Link to comment
Share on other sites

  • Replies 75
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...