Php help and also mysql help!?

Joe Burnett

New member
I know I connected successfully. I didn't include that in my code and my code produces no errors what's wrong with it? Also the variable array $Joe, its post value is a check box submitted through a
form. I'm trying to create a small bank transfer application just a little help will do! Thanks!

//Variables
$Name = $_POST['name'];
$Pass = $_POST['password'];
$Money = $_POST['money'];
$History = $_POST['history'];
//Array Variables
$Joe[0] = $_POST['Joe0'];
//My SQL
$His = mysql_query("SELECT Money FROM Bank
WHERE Name='$Name' && Password='$Pass'");

//END Variables
//Check length of form fields

if($Name == "" || $Pass == "")
{
die("Please enter a name and/or a password!");
$NP = " ";
}

if($Money == "" && $Joe == "")
{
die("Please enter a value to change your
bank account value!");
$M = " ";
}

if($History == "" && $Joe == "")
{
die("Please enter something in the History: column or
choose an available product to buy!");
$H = " ";
}

//END Form field length checking

//Insert data into MYSQL Database!

if($NP == " " && $M == " " && $H = " ")
{
//JOE's Company
if($Joe[0] = "Business_Application")
{
mysql_query("UPDATE Money FROM Bank
SET Money=Money-'50' WHERE Name='$Name'
AND Password='$Pass'");
mysql_query("UPDATE Money FROM Bank
SET Money=Money+'40' WHERE Name='$Name' AND Password='$Pass'");
$JOE0 = mysql_query("SELECT Money
FROM Bank WHERE Name='Joe' AND
Password='joeb34'");
mysql_query("INSERT INTO History
(Name, Money, Text)
VALUES('$Name', '$JOE0', 'History')");
}



}
 
Back
Top