|
Dev - Sort these by name
|
PHP problems. Help?
Posted on December 06, 2006 at 15:16
Hey guys! I am having PHP/MySQL problems. I know there are a lot of you here who develop sites using the above, so dont you hide away!
I have a lil problemo... Ill line out the problem for you. I run a local server on my PC. Everything works perfectly fine. If I use a simple script like this: <?php echo "Yo, welcome to Shotbeak Games"; ?> It works fine. Now I come to the point where I want to include MySQL. Ive run the MySQL Command Line Client to create a database called "shotbeak" and added a table "News" + a field "news". Now I want to connect to MySQL of course with this: <?php $mysqli = mysqli_connect("localhost","root","password","shotbeak"); if(mysqli_connect_errno()) { echo "It failed."; } else { echo "It worked"; } echo "It wont even parse this"; ?> But you see, it doesnt go pass the $mysqli connection. Why? I know this might be a bit vague, but I have no idea why this happens... Everything works fine, but it doesnt want to connect properly...
+0
Dev - Er, any ideas how to make this work?
Related Posts Dev - Warning Dev - After editing rating, make rating display change Dev - When editing, update "edited" column Dev - Restore deleted comments Dev - Display deleted comments if mod (hidden, then with dropdown) Dev - After deletion or during edit, make rating dropdown appear again Dev - Stricter rating rules. Prevent user from rating again Dev - Pages Dev - Reporting
Mysqli...
www.php.net/mysqli How do I make sure I am running a MYSQL server? I did everything according to my tutorial I have. I installed Apach/PHP/MySQL at all the right places... |




Also, you need to be running a mysql server.