- This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
hi
i tried to populate the select box value based on the selection in another select box and i post that value through ajax posting, and in the second select box if i select any one of the value, rest of the elements in the page must get the data from database based on the value of second select box which i passed it using ajax in the same page but the php in that page doesn’t receive that value. can any one tell how to pass the selected value using ajax in the same page.
main file
$va1= $row1;
?>
$result1=mysql_query($sql);
while($row=mysql_fetch_assoc($result1))
{
$var1= $row;
$pieces = explode(",", $var1);
foreach($pieces as $key=>$value)
{
?>
}
}
?>
php file
if (!$link) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db('mobitara',$link);
$position='hots';
$sql1="select * from userpro where job='$type' and pos='$position'";
$result1=mysql_query($sql1);
?>
http://api.jquery.com/jQuery.ajax/
just sayin’
I haven’t looked to see what else might be wrong but you are using a PHP variable in your script at the top outside of php
xmlhttp.open(“GET”,”$_SERVER[PHP_SELF]?person=”+person,true);
needs to be
xmlhttp.open(“GET”,”?person=”+person,true);