/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php // 1. Create a database connection if (!$connection){ } // 2. Select a database to use if (!$db_select){ } ?> <html> <head> <title>PHP with MySQL</title> </head> <body> <?php // 3. Perform database query if (!$result){ } // 4. Use returned data echo $row["menu_name"]." ".$row["position"]."<br />"; } ?> </body> </html> <?php // 5. Close connection ?>