Afficher un message
Vieux 24/06/2007, 22h48   #8
gagal
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: having problem getting php to connect

On Jun 24, 5:42 pm, "peter" <sub...@flexiwebhost.com> wrote:
> > $sql = "INSERT INTO $db_table4
> > (firstName, lastName, dob, category, address1, address2, city,
> > state, zipcode, telephone, cellphone, email1, email2, aimid, url,
> > notes)
> > VALUES
> > ('$firstName', '$lastName', '$dob', '$category', '$address1',
> > '$address2', '$city', '$state', '$zipcode', '$telephone',
> > '$cellphone', '$email1', '$email2', '$aimid', '$url', '$notes')";

>
> Also just noticed I presume that line is meant to actually read:-
>
> $sql = "INSERT INTO $db_table
>
> you have an eroneous 4 at the end of the table name


$db_server = "localhost";
$db_user = "smith_admin";
$db_pass = "password";
$db_name = "smith_website";
$db_table = "blog_category";
$db_table1 = "blog_entry";
$db_table2 = "quotes";
$db_table3 = "ab_category";
$db_table4 = "ab_person";

$connect = mysql_connect($db_server, $db_user, $db_pass) OR DIE ('I
can not connect to server because: ' .mysql_errno(). " -
" .mysql_error());
mysql_select_db($db_name, $connect) OR DIE ('I can not connect to
server because: ' .mysql_errno(). " - " .mysql_error());

  Réponse avec citation
 
Page generated in 0,05604 seconds with 9 queries