Internal Error 500 Trying to connect

[php]<?php
$username = “homedirectory_spin”;
$password = "qwer1234 ";
$hostname = “localhost”;

//connection to the database
$dbhandle = mysql_connect($hostname, $username, $password)
or die(“Unable to connect to MySQL”);
echo “Connected to MySQL
”;
?>[/php]

Why does this return a 500 error? I am trying to connect to the database which I already created along with a user using phpMyadmin

Any help appreciated!

btw there are no spaces in the password spot, that was a mistake…

so any ideas?

I also noticed I get a 500 error when I try to write to an external file however the same script works in xampp but when i upload a write to file script to my server it returns 500… any suggestions on what i can do to fix this?

It was something on my server hosts end… problem solved.

Sponsor our Newsletter | Privacy Policy | Terms of Service