Hi

I am pretty new to all this so bear with me. I have created some forms on dreamweaver which I want to populate mysql database when completed.

I have created a table using phpmyAdmin through godaddy. I have created a record set which links to each form field. I have also created a connection to the server which tests OK.

I am able to retrieve sample data I have entered into the mysql table but cannot send data to mysql- am getting error messsage 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near...'

Can anybody please help as tearing my hair out with this..

Thanks

Jo

What insert querey you are using to send the information to mysql

Pls provide the INSERT statement that you've written, there might have minor mistakes

i agree with all above reply post that u need to post ur insert statements
but i will give ya small help since phpmyadmin will generate the code used to insert
u can give a look at the code and see what mistake u did .. if u cant plz post the insert statement .. good luck.

Hi

The code is shown below. I think this is the section you are referring to. Do I need to do something to generate the code in myphpadmin?

Jo

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "register")) {
$insertSQL = sprintf("INSERT INTO Registration (email, password, whyregister, subscribe, 'where hear', aceeptT&C) VALUES (%s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST, "text"),
GetSQLValueString($_POST, "text"),
GetSQLValueString($_POST, "text"),
GetSQLValueString(isset($_POST) ? "true" : "", "defined","1","0"),
GetSQLValueString($_POST, "text"),
GetSQLValueString(isset($_POST) ? "true" : "", "defined","1","0"));


mysql_select_db($database_connectionDB, $connectionDB);
$Result1 = mysql_query($insertSQL, $connectionDB) or die(mysql_error());
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.