Note that there are some explanatory texts on larger screens.

plurals
  1. POIm displaying results from a php query and want to display each one in a different slide toggle
    text
    copied!<p>I have got one toggle working which displays the child information but the following toggles don't work and i have no idea how to fix this. I used the code from w3schools to get it working but the other names don't seem to slide down just display them. Any ideas please? </p> <pre><code>&lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt; &lt;/script&gt; &lt;script&gt; $(document).ready(function(){ $("#flip").click(function(){ $("#panel").slideToggle("slow"); }); }); &lt;/script&gt; &lt;style type="text/css"&gt; #panel,#flip { padding:5px; text-align:center; background-color:#e5eecc; border:solid 1px #c3c3c3; } #panel { padding:50px; display:none; } &lt;/style&gt; </code></pre> <p> <pre><code> $connect = mysql_connect("127.0.0.1" , "root" , "") or die ("Couldnt connect to database"); mysql_select_db("travellerfile") or die ("couldnt find the database"); $searchsurname = $_POST['Surname']; $searchfirstname = $_POST['Firstname']; $searchage = $_POST['Age']; $query = mysql_query("SELECT * FROM child WHERE Surname like '%$searchsurname%' and Firstname like '%$searchfirstname%' and Age like '%$searchage%'"); while($row = mysql_fetch_array($query)) { ?&gt; &lt;div id="flip"&gt;&lt;?php echo $row['Firstname']; ?&gt; &lt;?php echo $row['Surname']; ?&gt;&lt;/div&gt; &lt;div id="panel"&gt;&lt;?php echo $row['DateOfBirth']; ?&gt; &lt;br /&gt; &lt;img src="&lt;?php echo $row['sourcepath']; ?&gt;" width="100px" height="100px"&gt; &lt;form method="post" action="childdetail.php"&gt; &lt;input name="Button1" type="submit" value="View" /&gt;&lt;/form&gt; </code></pre> <p></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload