hi im a student who is learning php i would like to know how to create some dynamic div from a select sql request and showing it with javascript with the style display ty in advance im having a hard time to know how to do it p.s. my button must be in php ty if anyone can help me
atm in this code there is no select sql request im just testing the stuff but i have some trouble already hehe help plz <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled 1</title> <script language="javascript"> function showdiv(id) { if (document.getElementById) document.getElementById(id).style.display = 'block'; } function hidediv(id) { if (document.getElementById) document.getElementById(id).style.display = 'none'; } </script> </head> <body> <?php echo '<div class="page" id="page1" style="width: 212px; height: 441px; left: -7px; top: 198px; display:none;">'; echo "test"; echo '</div>'; echo '<input type="button" value="<<" onClick="showdiv(page1)"/>'; ?> </body> </html>