Connect to database that isn't localhost


Posted on 16th Feb 2014 07:03 pm by admin

I am currently doing a small script for a company that doesn't have mySql support on there hosting. How would I connect to the database on my hosting account? Currently I am using the following but have tried http://www.mysite.com

Did you know?Explore Trending and Topic pages for more stories like this.
$database['host'] = localhost;
No comments posted yet

Your Answer:

Login to answer
93 Like 53 Dislike
Previous forums Next forums
Other forums

the problem with str_replace
$str="hahahahahahahahahahahahahaha";
$nn=1;
$str=str_replace('ha','MyGod',$str,$nn);

Filename and Line Number Custom Error
I have a class, with a method that accepts 2 parameters. I would like to output error messages.

PHP switch function help
Hi, I am trying to create a search function for a directory website. On the search function on html

mails going in spam??
The mails I sent to folks in my database using mail(function) are going in spam??

Any idea ho

Formatting echo from database
So I have a database that stores First and last names, then echos them back to a website, as of now

onClick='location.href=index.htm'> not working
Below is my code:

echo "<input type='button' value='redirect' onClick='location.h

Display search result
Hi!

I have a SQL database with information about albums and track (music).

This is wh

PHP & Java
Hello,

can PHP code be used inside java code?

Code: [Select]<SCRIPT LANGUAGE=&q

Pulling out some result data from MYSQL
Hey Guys,

I've built a PHP page that has a for just imagine something like registration form

Help With Showing Users On the Index Page
Ive got this code which works just how i want it to.

Code: <?
$timenow=time();

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash