# Combobox setting a default value

**URL:** <https://forum.kirupa.com/t/combobox-setting-a-default-value/134665>\
**Category:** Uncategorized\
**Created:** [January 20, 2005, 11:28am UTC](https://forum.kirupa.com/t/combobox-setting-a-default-value/134665 "2005-01-20T11:28:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![they\_played\_tri](https://avatars.discourse-cdn.com/v4/letter/t/ac8455/32.png) [@they\_played\_tri](https://forum.kirupa.com/u/they_played_tri)\
**Post date:** [January 20, 2005, 11:28am UTC](https://forum.kirupa.com/t/combobox-setting-a-default-value/134665/1 "2005-01-20T11:28:39Z")

</div>

I am currently creating a “join our group” page and playing about with comboboxes. Im trying to find a script that will remember the users entered data from the combobox. At the moment im using \_global. variables that will call up the data. Ive got something like this to try and recall the selected data.

```php
//the global area in which my data will be held before going into a cookie
 _global.myUserInfo = new Array(nameText, emailText, phoneText, daySelect1.selectedItem.label, monthSelect1.selectedItem.label, yearSelect1.selectedItem.label);
  //and to call up the data back into the combobox
  _global.myUserInfo[3] == daySelect1.selectedItem.label;
  _global.myUserInfo[4] == monthSelect1.selectedItem.label;
  _global.myUserInfo[5] == yearSelect1.selectedItem.label;

```

Its not calling the selected info back into the combobox when the user clicks back to ammend something, what am i doing wrong.

I have tried different combinations like

```php
yearSelect1.selectedItem.label == _global.myUserInfo[5];

```

and so on

Many thanks

Scott
