Hey guys, I am a noob and really need help here! Here is what I would like as the outcome:
I currently have a figure in the database (eg; £9.00) i then want a form where a user enters say (£2.00) and it will select the data of £9.00 from the database then add £2.00 to it and then post it back to the database in the same field.
I'm fine with the fields and creation of the database but it is just selecting the information from the "money" field and then adding the new figure "money_new" to it and then when submitted it will add it to the "money field"
Here is what i currently have:
///"<?php
$con = mysql_connect("localhost","user","pass");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("tomwill1_audio", $con);
$sql="SELECT money FROM user + (new_money)
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "Your Account has been added to the database.<br>You will now be directed to the login page! <meta http-equiv=\"refresh\" content=\"2;url=login.php\">";
mysql_close($con)
?>"
Please help I really don't know where to start 🙁