sorry here is the code
[PHP]<?php
//connect to database
$hostname = 'h41mysql47.secureserver.net';
$username = ' username';
$password = 'userpass';
$dbname = 'dbname';
$usertable = 'usertable';
$yourfield = ' yourfield';
mysql_connect($hostname, $username, $password) OR DIE
(' unable to connect to database! please try again later.');
mysql_select_db ($databasename);
$query = 'select * from $usertable';
$result = mysql_query ($query);
if ($result) {
while ($row = mysql_fetch-array ($result)) {
$name = $row ['$parts'];
echo 'name:'. $name;
}
}
?>[/PHP]
When I use this code it gives me the error
Quote:
#1064 you have an error in you r SQL Synax, check the manual that corresponds to you mySQL sever version for the right synax to use near '<?php
//connect to database
$hostname = 'h41mysql47.securesever.net at line1
This is the code & the error that i'm getting & godaddy Tech. support gave me this code & would not help my out any futher. I'm at the point to were I'm ready to get rid of godaddy.
What do you think?