Jump to content

Mysql_connect()


keyser_soze

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...