Code:
<?php
require 'config.php';
$username=$_POST['username'];
$offence=$_POST['offence'];
$punishment= $_POST['punishment'];
mysql_connect ($dbhost,$dbusername,$dbpassword); //used to conneect to the mysql database
mysql_select_db("naughtylist") or die (mysql_error());
SELECT count (*)FROM information_schema.tables;
WHERE table_schema=<naughtylist> AND table_name=<naughty>
mysql_query ("INSERT INTO naughty (username, offence, punishment) VALUES ('$username','$offence', '$punishment')");
?>
That is what I have so far...
SELECT count (*)FROM information_schema.tables;
returns an error:
Parse error: syntax error, unexpected T_STRING
I created the DB and table using Mysql migration toolkit.