Jump to content

how do i pass the value of a listbox to an array ??


simbawoomba

Recommended Posts

hi i have a list box which when selected gives different values, such as 1 or 2 ect
i also have some arrays in php, what i want to do is select the entry into the array depending on what the value of the list box is

i have the following code

[code]
<select  size="10" id="templateList" name="templateList" onchange="returnthevalue();<?php $a = strtoint(templateList.value);

    echo 'displayTemplate('.$templateArray[$a][1].',MessageTemplate)';

?>

">;
[/code]

but this does not work, it is not passing the templateList.value properly please help!!!

Archived

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

×
×
  • 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.