djscottyis 0 Posted May 30, 2011 Report Share Posted May 30, 2011 I cant get this data to add to the Mysql database Ive added the correct fields in MYSQl just cant seem to get it to workthe form is http://www.interactive-corporation.com/con...es/contract.htmthis send on submit to post.phFile below I have removed the username and passwordI know it must be simple if you know what your doing .<?php$username="DATABASE USERNAME";$password="DATABASE PASSWORD";$database="DATABASE NAME";mysql_connect(localhost,$username,$password);@mysql_select_db($database) or die( "Unable to select database");$query = "INSERT INTO membership VALUES("$Date", "$FPname", "$FPsurname", "$D1", "$SPname", "$SPsurname", "$Address", "$City", "$Country", "$zipcode", "$nationality", "$homephone", "$mobilephone", "$Fax", "$email1", "$Semail2", "$membershiplemgth", "$membershiptype", "$membershipprice", "$adminfee", "$totalprice", "$deposit", "$balance", "$installments", "$installmentamount", "$firstpayment", "$mtfamount'());mysql_query($query);mysql_close();?> Quote Link to post Share on other sites
thescientist 231 Posted May 30, 2011 Report Share Posted May 30, 2011 you shouldn't be surpressing errors, in fact you should be actively checking for them. like here:http://www.w3schools.com/php/php_mysql_connect.aspyou should be making sure the connection and db selecting are indeed working. Quote Link to post Share on other sites
2old2learn? 0 Posted May 30, 2011 Report Share Posted May 30, 2011 I cant get this data to add to the Mysql database Ive added the correct fields in MYSQl just cant seem to get it to workthe form is http://www.interactive-corporation.com/con...es/contract.htmthis send on submit to post.phFile below I have removed the username and passwordI know it must be simple if you know what your doing .<?php$username="DATABASE USERNAME";$password="DATABASE PASSWORD";$database="DATABASE NAME";mysql_connect(localhost,$username,$password);@mysql_select_db($database) or die( "Unable to select database");$query = "INSERT INTO membership VALUES("$Date", "$FPname", "$FPsurname", "$D1", "$SPname", "$SPsurname", "$Address", "$City", "$Country", "$zipcode", "$nationality", "$homephone", "$mobilephone", "$Fax", "$email1", "$Semail2", "$membershiplemgth", "$membershiptype", "$membershipprice", "$adminfee", "$totalprice", "$deposit", "$balance", "$installments", "$installmentamount", "$firstpayment", "$mtfamount'());mysql_query($query);mysql_close();?>Hey;I like the look of your form...I am interested in how you did it..I am looking to do something like it for my project at work..would like to see the script that makes it look the way it does..if you don't mind..http://www.interactive-corporation.com/con...es/contract.htmThanks.. Quote Link to post Share on other sites
djscottyis 0 Posted May 31, 2011 Author Report Share Posted May 31, 2011 Hey;I like the look of your form...I am interested in how you did it..I am looking to do something like it for my project at work..would like to see the script that makes it look the way it does..if you don't mind..Thanks.. Quote Link to post Share on other sites
2old2learn? 0 Posted May 31, 2011 Report Share Posted May 31, 2011 (edited) never mind got what I want... Edited May 31, 2011 by 2old2learn? Quote Link to post Share on other sites
jeffman 86 Posted May 31, 2011 Report Share Posted May 31, 2011 The end of your query string has mismatched parens and quotation marks. Quote Link to post Share on other sites
2old2learn? 0 Posted May 31, 2011 Report Share Posted May 31, 2011 The end of your query string has mismatched parens and quotation marks.I saw his nice form format I like it and doing the same but the opposite way..I will be drawing from database as invoice..to tenant... Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.