Join Form

7 posts by 3 authors in: Forums > CMS Builder
Last Post: November 12, 2010   (RSS)

Hi

I have this issue with form that we are trying to push collected data to the cms builder database to store.

someone fills out the form and it will publish the data to the DB and also email the data, can get the get to email but not publish to the DB.

hope someone can help

thanks

Craig
Thanks



Craig

KC Media Solutions

www.kcmedia.biz
Attachments:

join.php 3K

mail.php 4K

Re: [kcmedia] Join Form

By Chris - November 10, 2010

Hi Craig,

The first thing I'd do would be to add error reporting to your mysql_query, like this:

mysql_query($sql) or die("MySQL Error:<br/>\n". htmlspecialchars(mysql_error()) . "\n");

That should help you figure out what's going wrong.

I hoep this helps! Please let me know if you have any questions.
All the best,
Chris

Re: [chris] Join Form

Hi Chris

where abouts to i put that line of code and on what page.
Thanks



Craig

KC Media Solutions

www.kcmedia.biz

Re: [kcmedia] Join Form

By Chris - November 11, 2010

Hi Craig,

You'll want to add that anywhere you call mysql_query, just to be on the safe side. In the attachments you posted, you're only calling mysql_query in mail.php on line 44.
All the best,
Chris

Re: [chris] Join Form

Hi Chris

I have put that line in now and when i fill out the form this is the error i get

MySQL Error:
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 '10:34 am, Friday, 12/11/10 10:34 am, Craig, kermond, kjkj, kjlkj, jlkj, craig@kc' at line 1

thanks

Craig
Thanks



Craig

KC Media Solutions

www.kcmedia.biz

Re: [Jason] Join Form

By Chris - November 12, 2010

You're going to want to escape those variables too, to prevent against SQL injection attacks!
All the best,
Chris