djscottyis Posted May 30, 2011 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();?> Link to comment Share on other sites More sharing options...
thescientist Posted May 30, 2011 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. Link to comment Share on other sites More sharing options...
2old2learn? Posted May 30, 2011 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.. Link to comment Share on other sites More sharing options...
djscottyis Posted May 31, 2011 Author 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.. Link to comment Share on other sites More sharing options...
2old2learn? Posted May 31, 2011 Share Posted May 31, 2011 never mind got what I want... Link to comment Share on other sites More sharing options...
jeffman Posted May 31, 2011 Share Posted May 31, 2011 The end of your query string has mismatched parens and quotation marks. Link to comment Share on other sites More sharing options...
2old2learn? Posted May 31, 2011 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... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.