You're using the wrong concatenation operator. +
is for JavaScript. In PHP we use .
.
or die ("Unable to establish connection to MySQL: " + mysql_error($conn));
should be:
or die ("Unable to establish connection to MySQL: " . mysql_error($conn));
edit
To follow up on @MichaelBerkowski's and @Jessica's comments, you should see nothing as your output from die()
since PHP will type juggle those two strings, type juggle them into zeros, and give you a sum of zero. die(0)
will then output nothing. This will change once you implement the solution mentioned above.