Hi,
I have a web site in which I pass many javascript variables to php and the other way round. This is my last passing variable challenge, and I cannot figure it out.
There's an alphabet letter that i pass into showhide1(v) function, and i try to pass it to IN(). For example IN ('b') will retrieve all items beginning with letter b.
The way I did it below does not work for some reason. Does anyone know how to do it?
Thanks
function showhide1(v)
{
<?php
$result = mysql_query("SELECT * FROM birdstable
WHERE left(Name, 1) IN ($_GET[v])
ORDER BY Name;");
while($row = mysql_fetch_assoc($result)){
$varr= $row['BirdID'];
?>
document.getElementById("Layer1").innerHTML = "hello";
<?php
}
?>
}