I have being unable to Go forward since all these days about this issue.... Here is My code
$sql = 'CREATE TABLE joke(
id INT NOT NULL AUTO_INCREMEMTT PRIMARY KEY,
jokedate DATE NOT NULL
) DEFAULT CHARACTER SET utf8';
if (!mysqli_query($link, $sql)); my line 15
$output = 'Error creating joke table: ' .
mysqli_error($link); my line 18
$output = 'Joke table sucessully Created.';
And here is the Error I am Seeing... What is the Way Out
:mad:"Warning: mysqli_query() expects parameter 1 to be mysqli, null given in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\Createtable\index.php on line 15
Warning: mysqli_error() expects parameter 1 to be mysqli, null given in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\Createtable\index.php on line 18
Error creating joke table::mad:
"I will really Appreciate If I can see a Solution.. thanks
You.. havent connected to a database, or the connection failed. You need to connect to a database (mysqli_connect) first.
AUTO_INCREMEMTT should be AUTO_INCREMENT
That is also true, and will be the next error he gets. The error indicates though that the current problem is that $link does not exist yet.
Also the database will probably demand a size on the id INT field