Jump to content
  • Advertisement

Archived

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

jumpjumpjump

php & mysql

This topic is 5257 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

ok i have my sql url but i can''t access it thorught the following script: $conn = mysql_connect( $sqlurl, $username, $pass) or die("could not connect/n"); What else should i try? the url var is a form that asks. Only thing i can think of is that it doesn''t work becasue i dont have http:// type of thing just akjfj.lkadfj.net. Is there a normal thing that goes before the url liek http:// for sql? Sharp Basic baby!
My Homepage | My Forums Please Register | Google | Sharp Basic - Coming summer 2004! Wanna Beta test? Clicky!

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Generally with mysql & php on a server the url string for the connect command should be "localhost" unless you''re trying to connect to a database on a different server...so I''d suggest using $sqlurl = "localhost";

You really need to be more informative about what the problem is - what are the symptoms ? I''m assuming you get a webpage back with the words "could not connect" printed on it?

Share this post


Link to post
Share on other sites
/* Connect to database */
$link = mysql_connect("localhost", "$username", "$password")
or die("Could not connect : " . mysql_error());
mysql_select_db("aaronds") or die("Could not select database");

This is what I use.
youll need to set
$username = "somename";
$password = "somepassword";

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!