Easiest Question To Answer for a newbie EVER

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

xplodersuv
New php-forum User
New php-forum User
Posts: 4
Joined: Wed Feb 26, 2003 8:40 am
Location: CA
Contact:

Easiest Question To Answer for a newbie EVER

Postby xplodersuv » Wed Feb 26, 2003 8:45 am

ok, like the title says, I'm very new to php/mysql. So my server has mysql set up and i can use it through an admin area. That's great, but i want to test scripts without having to ftp it and everything.

So take the first line
mysql_connect('localhost,'username','****')

I want to replace localhost by the actual address/IP/whatever, can I do this? is it as simple as myDomainName + something else? do i have to get this information from my host?

Please help me, i swear i can program, just this is all too new for me...lol

User avatar
xlordt
New php-forum User
New php-forum User
Posts: 34
Joined: Thu Dec 12, 2002 9:00 pm
Location: NJ
Contact:

Postby xlordt » Wed Feb 26, 2003 8:49 am

Yes you can replace it with the ip addr or host name as long as localhost == ip == hostname then it will work

xplodersuv
New php-forum User
New php-forum User
Posts: 4
Joined: Wed Feb 26, 2003 8:40 am
Location: CA
Contact:

Postby xplodersuv » Wed Feb 26, 2003 8:55 am

just the address alone???
let's say i was running eBay...

localhost := http://www.ebay.com
or
localhost := http://www.ebay.com
or
localhost := ebay.com
or
localhost := 12.123.123.123
???

User avatar
xlordt
New php-forum User
New php-forum User
Posts: 34
Joined: Thu Dec 12, 2002 9:00 pm
Location: NJ
Contact:

Postby xlordt » Wed Feb 26, 2003 9:00 am

yes as long as its pointing to the same thing

xplodersuv
New php-forum User
New php-forum User
Posts: 4
Joined: Wed Feb 26, 2003 8:40 am
Location: CA
Contact:

Postby xplodersuv » Wed Feb 26, 2003 9:06 am

i tried everything

except installing php on my computer....... rrrrrr

Why do i need to install php on my computer when it can already handle it for current webpages?

User avatar
Redcircle
Moderator
Moderator
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Postby Redcircle » Wed Feb 26, 2003 11:46 am

most servers will have it set to localhost if the database is on the same server as the web server software.


Return to “PHP coding => General”

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron