How do I limit the results of a php query based on the value of a javascript variable? -
originally had where class_id = 3
in php query learned more server-side things realized wouldn't able change once page loaded without ajax or something. i've taken away where
part of query , getting results class_id
's.
my hope can use radio limit rows returned matching radio button checked.
ex. click class 2
radio button, click go, , rows class_id = 2
show up.
<input type='button' name='go' value='go' onclick='getselected()'> function getselected() { var queryclass = ""; if (classthree.checked) { queryclass = 3; } else if (classtwo.checked) { queryclass = 2; } else if (classone.checked) { queryclass = 1; } }
i can desired value don't know value limit rows. if possible it'd great know how.
Comments
Post a Comment