• hey,
    i have question,
    this is my page

    <?php
    // Template Name: annuaire
    get_header();
    get_sidebar('sidebar_ac');
    ?>
    
    <form>
    country:
    <select name="country" id="country" >
      <option value=""></option>
      <option value="1">USA</option>
      <option value="2">ENGLAND</option>
      <option value="3">JAPAN</option>
    
    </select>
    center:
    <select name="commune" id="commune">
      <option value=""></option>
      <option value="1">Washington</option>
      <option value="2">London</option>
      <option value="3">Tokio</option>
    </select>
    
    Cycle:
    <select name="place" id="place" onchange ="showEtab(document.getElementById('country').value,document.getElementById('commune').value,document.getElementById('place').value)">
      <option value=""></option>
      <option value="1">AMERICA</option>
      <option value="2">EUROP</option>
      <option value="3">ASIA</option>
    </select>
    
    </form>
    <?php get_footer(); ?>

    this ismy request in function.php:

    $sql="SELECT * FROM pays WHERE country='$wilaya' and commune='$commune' and place='$place'";

    how i can use ajax to load the result

    [Moderator note: code fixed. Please wrap code in the backtick character or use the code button.]

The topic ‘how use ajax select list’ is closed to new replies.