I did some more testing and I found that I forgot the first field in the
columns section of the Statement. So now it looks like this:
I also copy and pasted the statement into PHPMYADMIN and it worked fine. It
just doesn't work here????


function AddSignupRequest($Signup_FName, $Signup_LName, $Signup_Address1,
$Signup_Address2, $Signup_City,
    $Signup_State, $Signup_Zip, $Signup_Email, $Signup_Phone,
$Signup_ContactMethod,
    $Signup_Date, $Signup_IP, $Signup_Status, $Signup_Comments) {
    /* Connecting, selecting database */
    $dbh=mysql_connect ($MySQL_Host,  $MySQL_User, $MySQL_Password) or die
('I cannot connect to the database.');
 mysql_select_db ("havasuin_Signups");

    /* Performing SQL query */
    $query = "INSERT INTO SignupRequests ('SignupID', 'FirstName',
'LastName', 'Address1', 'Address2',
     'City', 'State', 'Zip', 'Email', 'Phone', 'ContactMethod', 'Date',
'IP', 'Status', 'Comments')
    VALUES ('', 'Chris', 'Crane', '655 Talcottville Road', 'Apt. 185',
'Vernon', 'CT', '06066', '[EMAIL PROTECTED]',
     '860-659-6464', 'Email', 'August 25, 2002', '64.252.232.82', 'Newly
Requested', 'Testing')";
    $result = mysql_query($query) or die("Query failed");

    /* Free resultset */
    mysql_free_result($result);

    /* Closing connection */
    mysql_close($link);
 print "<br>$Signup_LName, $Signup_FName<br>\n";

}

"Chris Crane" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am getting a failed query error message. Could someone take a look and
let
> me know.
>
> //F U N C T I O N S
> //=================
> function AddSignupRequest($Signup_FName, $Signup_LName, $Signup_Address1,
> $Signup_Address2, $Signup_City,
>     $Signup_State, $Signup_Zip, $Signup_Email, $Signup_Phone,
> $Signup_ContactMethod,
>     $Signup_Date, $Signup_IP, $Signup_Status, $Signup_Comments) {
>     /* Connecting, selecting database */
>     $dbh=mysql_connect ($MySQL_Host,  $MySQL_User, $MySQL_Password) or die
> ('I cannot connect to the database.');
>  mysql_select_db ("havasuin_Signups");
>
>     /* Performing SQL query */
>     $query = "INSERT INTO SignupRequests ('FirstName', 'LastName',
> 'Address1', 'Address2',
>      'City', 'State', 'Zip', 'Email', 'Phone', 'ContactMethod', 'Date',
> 'IP', 'Status', 'Comments')
>     VALUES ('', 'Chris', 'Crane', '655 Talcottville Road', 'Apt. 185',
> 'Vernon', 'CT', '06066', '[EMAIL PROTECTED]',
>      '860-659-6464', 'Email', 'August 25, 2002', '64.252.232.82', 'Newly
> Requested', 'Testing')";
>     $result = mysql_query($query) or die("Query failed");
>
>     /* Free resultset */
>     mysql_free_result($result);
>
>     /* Closing connection */
>     mysql_close($link);
>  print "<br>$Signup_LName, $Signup_FName<br>\n";
>
> }
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to