Jump to content



Recommended Posts

hello, i'm new in web programming and encountering a problem in php or mysql, i think i have a little error with my code below<?phpecho 'hello world';$link = mysql_connect("localhost","admin","admin");if (!$link){ die('Could not connect: ' . mysql_error());}echo 'connection success';mysql_close($con);?>when i tried to run the code above, only the 'hello world' string was displayed in the browser, I don't have any idea on what the result of mysql_connect was, i run mysql using '/etc/init.d/mysql start' then i add the user admin but, the error still occur, what might be the problem? FYI im using openSuse,Thank You in advance

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...