So I'm taking two simple selection boxes (select...optio ns), the whole shabang.
What I want to do is test the values in these when someone is to select them. My problem is i want a simple way, I'm thinking a php if statement where i can test this. Example is below. There is much more complexity to this problem, but this would get me moving in the correct path.
[code=html]
<select name="list"><op tion value="1">1<opt ion value="2">2</select>
if (list.value == 1){
echo "Hi";
}
[/code]
I believe the value part is my main concern. I am trying to do a php form of javascript regular expression. My biggest question is how can i specify the text that is selected from a selection box and thus perform whatever actions i want after this??????
What I want to do is test the values in these when someone is to select them. My problem is i want a simple way, I'm thinking a php if statement where i can test this. Example is below. There is much more complexity to this problem, but this would get me moving in the correct path.
[code=html]
<select name="list"><op tion value="1">1<opt ion value="2">2</select>
if (list.value == 1){
echo "Hi";
}
[/code]
I believe the value part is my main concern. I am trying to do a php form of javascript regular expression. My biggest question is how can i specify the text that is selected from a selection box and thus perform whatever actions i want after this??????
Comment