Jump to content
djscottyis

Sorry i need help

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();?>

Share this post


Link to post
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.

Share this post


Link to post
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..

Share this post


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

Share this post


Link to post
Share on other sites

never mind got what I want...

Edited by 2old2learn?

Share this post


Link to post
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...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...