<?php
$conn=mysqli_connect("127.0.0.1","root","root","PJ")or die("Failed to connect to the database! Username or Wrong password!");
mysql_select_db("PJ","$conn");
mysql_query($conn,"CREATE TEMPORMARY TABLE 'MESSAGE'");
?>
Error Warning: mysqli_connect(): (HY000/2002):
Are you using mysql or mysqli? These are two different things. Mysqli is an enhanced version of mysqli
What you use to connect is: mysqli_connect(). To select the database later, use The one is: mysql_select_db(), you should also use: mysqli_select_db()