Hi again, the maths bit is now working, but i have another problem.
When people submit the form it calculates the values i need, but when i check my table, it has updated every row. (prolly cos i said WHERE email='$email', so that makes them all the same.
Any ideas how i can make it simply update the current row pls?
Heres my code;
<html>
<body>
<?php
mysql_connect (localhost,elliott,password);
mysql_select_db ("quote");
mysql_query ("insert inTO main (applicant_id, firstname, surname, situation, title, dob, address, postcode, time_at_address,
previous_address, phone, work_phone, email, contact_time, employment, occupation, contract_length, service_length, accounts,
income_2001, income_2000, income_1999, income1, income2, total_income, ccj, ccj_details, bankruptcy, arrears, details,
lender, mortgage_outstanding, property_sold, loans_outstanding, monthly_payment, loan_expires, cards, cards_outstanding,
property_price, mortgage_req, mortgage_reason, urgency, other_info)
VALUES ('$_GET[applicant_id]', '$_GET[firstname]', '$_GET[surname]', '$_GET[situation]', '$_GET[title]', '$_GET[dob]',
'$_GET[address]', '$_GET[postcode]', '$_GET[time_at_address]', '$_GET[previous_address]', '$_GET[phone]', '$_GET[work_phone]',
'$_GET[email]', '$_GET[contact_time]', '$_GET[employment]', '$_GET[occupation]', '$_GET[contract_length]',
'$_GET[service_length]', '$_GET[accounts]', '$_GET[income_2001]', '$_GET[income_2000]', '$_GET[income_1999]',
'$_GET[income1]', '$_GET[income2]', '$_GET[total_income]', '$_GET[ccj]', '$_GET[ccj_details]', '$_GET[bankruptcy]',
'$_GET[arrears]', '$_GET[details]', '$_GET[lender]', '$_GET[mortgage_outstanding]', '$_GET[property_sold]', '$_GET[loans_outstanding]',
'$_GET[monthly_payment]', '$_GET[loan_expires]', '$_GET[cards]', '$_GET[cards_outstanding]', '$_GET[property_price]', '$_GET[mortgage_req]',
'$_GET[mortgage_reason]', '$_GET[urgency]', '$_GET[other_info]')
");
mysql_close;
mysql_connect (localhost, elliott, password);
mysql_select_db ("quote");
mysql_query ("UPDATE main SET mortgage_quote='$total_income'*3/0.95 WHERE applicant_id='$applicant_id'");
?>
</body>
</html>
Thanks if you can help