Accessing web based mysql database with php on local pc

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tonyeveland
Forum Newbie
Posts: 8
Joined: Thu Jul 14, 2005 11:03 am

Accessing web based mysql database with php on local pc

Post by tonyeveland »

Is it possible to use php on a local pc to access a mysql database hosted on a web site without installing anything on the local pc?
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

yes, you need to have an account created however on your mysql machine that will allow access from the ip of your home machine.

you will need to have php installed on your home machine 8O

I know that was obvious, but you asked if you needed *anything*
tonyeveland
Forum Newbie
Posts: 8
Joined: Thu Jul 14, 2005 11:03 am

Post by tonyeveland »

Can anyone give me the PHP code that reaches out to my web server?
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

Code: Select all

mysql_connect("%webserverip%","username","password")
  or die(mysql_error());
as I said above though, you will need to have an account that will allow your "local" ip.

edit: 8O
tonyeveland
Forum Newbie
Posts: 8
Joined: Thu Jul 14, 2005 11:03 am

Thanks, Burrito Master

Post by tonyeveland »

Again
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Re: Thanks, Burrito Master

Post by Burrito »

tonyeveland wrote:Again
huh? 8O
tonyeveland
Forum Newbie
Posts: 8
Joined: Thu Jul 14, 2005 11:03 am

huh?

Post by tonyeveland »

My subject was Thanks Burrito Master

And my message was Again

You can't send a subject only

Thanks again
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Re: huh?

Post by Burrito »

tonyeveland wrote:My subject was Thanks Burrito Master
:oops:

np amigo
Post Reply