Ive been trying to get my SQL code to actually check if a DB and table exists, and then based on that, take the next action. If they dont exist, then the code should create them. If they do exist, simply proceed to insert the values.This is my progress so far. <?php$username=$_POST['username'];$offence=$_POST['offence'];$punishment= $_POST['punishment'];mysql_connect ('localhost','root','panda'); mysql_query IF NOT EXISTS (select * from sys.databases where name = 'naughtylist'); create database naughtylistif (object_id('watchlist') is NULL)CREATE TABLE watchlist (username VARCHAR(16) NOT NULLoffence TEXT NOT NULLpunishment TEXT NOT NULLPRIMARY KEY (username));$sql=mysql_query ("INSERT INTO watchlist (username, offence, punishment) VALUES ('$username','$offence', '$punishment')");$sql2="SELECT * FROM table_anme WHERE data = data_inserted LIMIT 1;"echo $sql;echo $sql2;?>