Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can't write to a database...using godaddy hosting...

Status
Not open for further replies.

spewn

Programmer
Joined
May 7, 2001
Messages
1,034
i'm trying to store info in a database. i'm running perl and the script executes fine, no problems.

the issue i'm having is the info is not being stored in the database i've created, but no errors show.

i'm using go daddy hosting, (first time), and am not too familiar with it.

Code:
$drh = DBI->install_driver("mysql");

$dsn ="DBI:mysql:database=top_clients;host=h71mysql17.secureserver.net";

$dbh = DBI->connect($dsn,"top_clients","myPass") or die "no db!";

$sth = $dbh->prepare("INSERT INTO my-clients VALUES(0,'$uname','$newPhone','$uemail','$usubject','$umessage','$ustatus','$theFullTimeIs','$theDateIs','$uip')");
$sth->execute;

everyting except my password is exactly how it appears.

is there a simple way to test the connection?

thanks for any help.

- g

 
Well if it doesn't error on the connect line you are getting your connection.

Do a select * from my-clients and see what it says.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those Who Say It Cannot Be Done Are Usually Interrupted by Someone Else Doing It; Give the wrong symptoms, get the wrong solutions;
 
i'm getting the connection. i tried the *, no dice.

i've even added the actual login and pass instead of the variable, and still nothing.

any ideas?

- g
 
wow. i missed the ` on the db table.

thanks for all the help.

- g
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top