While my php4 scripts are running fine at Earthlink.net, I can't get a connect for my_sql:
I get a null value for $n with
<?php
$n = mysql_connect("localhost", "root", "");
echo("n is $n");
?>
Can anyone help?
Thanks,
JW
While my php4 scripts are running fine at Earthlink.net, I can't get a connect for my_sql:
I get a null value for $n with
<?php
$n = mysql_connect("localhost", "root", "");
echo("n is $n");
?>
Can anyone help?
Thanks,
JW
Do they even have mysql access on earthlink? Your script is trying to connect to the server the script is running on as root with no password. If earthlink has mysql running on its servers I'm pretty sure you aren't going to be able to access it as root, let alone root with no password.
Yes, they have SQL.
you need to specify the host address correcly no
where is n set?
Sorry, but I need the specifics for an example:
domain: www.foobar.com
password: sugar
what is my connect statement?
Thanks
<?php
$domain ="www.foobar.com";
$password="sugar";
$username="root"
$n = mysql_connect("$domain", "$username", "$password");
echo("n is $n");
?>
BTW, you gave us no output or error messages, it gets difficult to really help
[man]mysql_connect[/man]
I appreciate the help. My output is:
n is
n other words the mysql_connect function is returning null. There are no error messages. I tried both "root" and "admin" as the username in your example. BTW, when I log onto my account page at Earthlink I use
domain: www.mydomain.com
username: admin
password: mypassword
Suggestions?
Thank you.
maybe earthlink does use the same username password combination for their databases or perhaps they use their database on a none standard port,
you are gonna have to contact them to see what might be the problem
I have spoken to their tech help -- they give absolutely no help with php other than making it available.
Thanks.
Howdy!
I am also on Earthlink.
When I called them about SQL, they told me that it was not available, or any database for that matter.
If that be true, then what options do I have? Remember that I am new to php and databases, therefore I am wondering if I can install a database on my website somehow (cgi bin?) or have to use a flat file (is that the right name for it?).
If they do have SQL and someone knows that for sure, then I will need to knwo if I ahve to set-up anything or have special access coding.
Thanks in advance,
Bill