MySQL Database
Menu mySQL Tests
 

MySQL Connection Test Page - database.html

The plan here is to use a database to store comments, feedback or blog-type text. Visitors can browse these comments and add/edit their own. It is also the start page for SQL tests - starting with a connect and a SELECT php script.

I have a database and I can (have added) add tables and data using phpMyAdmin. The php code is largely taken from the W3C examples

I also started a page on MySQL SELECT.

Connecting to database - connect.php

This is taken by example from the W3C Schools site.



select2.php

- This selects data from MyGuests table I created manually.

The connection code is common(ish) in the two examples above. The ouput is just and echo (to the std output i.e. the screen) of the contents of the table.

Top

Displaying a comment field

I need to create a table for this. This is if I wanted to create an interactive website

Links

Top

References: - a note on these

  • PHP Connect to MySQL - https://www.w3schools.com/php/php_mysql_connect.asp
  • How to create a blog in PHP and MySQL database - https:// codewithawa.com/posts/ how-to-create-a-blog-in-php- and-mysql-database - not sure if this is not just an advertisement for awa???? or a promotion for Disqus - the post seems to be pretty comprehensive although there is no working example and there is also something a little strange about the whole site - I am also not sure why you would want to code your own blog when there are platforms such as Wordpress
  • Disqus Comment System - https:// disqus.com/
  • SQL Tutorial - https:// www.w3schools.com/sql/ default.asp

Site design by Tempusfugit Web Design -