Let's Get Started with a PHP/MySQL Table Page!
- Open Notepad++
- Choose:
File -> New
- Copy the PHP Table Template (PHP) code (below)
- Paste that code into your new file
- Change the put-title-of-this-page-here
- Change these lines:
$query = "_________________________";
$query .= "________;";
to:
$query = "SELECT dish_name, price, is_spicy ";
$query .= "FROM dishes;";
- Click: File -> Save As
- Name your file: webtable.php
- Change the
Save as type:
to: PHP Hypertext Preprocessor (*.php)
- Click: Save
- Start your local web server if it is not already running
- Visit your page (http://localhost/table.php) in your favorite web browser
- Make any changes
- Save your changes
PHP Table Template (PHP)
Output