Jump to content

Sorry i need help


djscottyis
 Share

Recommended Posts

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

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

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..
Thanks..
Link to comment
Share on other sites

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...