merge my code with Ajax code>>> problem

Posted by sandy on Stack Overflow See other posts from Stack Overflow or by sandy
Published on 2010-04-11T22:59:10Z Indexed on 2010/04/11 23:03 UTC
Read the original article Hit count: 233

Filed under:
|

I want to help me

In the following link i found nice code in Ajax http://www.w3schools.com/php/php_ajax_livesearch.asp

I want to link my code with the code you see in the link above and replace dropdown list How can I do it for I could not

where is it change in code even my code work as Ajax ??

I wish .... I wish .... I wish any somebody can help me

<?php

include ("connect.php");

    print_r($_POST['sector_list']); 


$member_id = intval($_POST['sector_list']); 


if($member_id == 0) { 
    // Default choice was selected 
} 
else { 
    $res = mysql_query("SELECT * FROM members WHERE MemberID = $member_id LIMIT 1"); 
    if(mysql_num_rows($res) == 0) { 
        // Not a valid member 
    } 
    else { 
        // The member is in the database 
    } 
} 

?>


    <form method="POST" action=<?php echo $_SERVER["PHP_SELF"]; ?> > 
    <input type="hidden" name="sector" value="sector_list"> 
    <select name="sector_list[]" class="inputstandard" multiple="multiple"> 
    <option  size ="40" value="default">send to </option> 

    <?php 
       $result = mysql_query('SELECT * from members') or die(mysql_error());   

        while ($row = mysql_fetch_assoc($result)) { 
            echo '<option value="' . $row['MemberName'] . '">' . $row['MemberName']. '</option>';  
        }
    ?> 

      <input type ="submit" name ="go" value = "go" >

    </select> 
    </form>

© Stack Overflow or respective owner

Related posts about AJAX

Related posts about php