<?php




$username="151296";
$password="******";
$database="151296";

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");

$last = $_COOKIE['ID_my_site'];










SELECT 'Wing' FROM 'users' WHERE 'username' =$last;







$CC1 = ['CC1']; 
$amount1 = $_POST['amount1']; 
$total = $CC1 + $amount1; 
$UPDATE FROM 'users' WHERE 'username' = $last SET `CC1` = 'CC1'+ '$amount1';










("Location: arming.php"); 
} 

?>

i keep getting a white screen :(

What exactly do you want to do?I cannot get your point here.

basicly........ you have this code........

<form name="nala" action="constructX.php" method="post">


<input style="font-size:8pt;" type=submit name=cons value=Construct>

there is more too it but its not really relavant lol


what im trying to do is update some numbers in the database.....

its saposed to look under the table "users" and see WHO that user is.... then check under his row.. what "Wing" he is in... it would be a #.... then its saposed to insert the data into THAT wing... CC1 is a field in the wings table

$CC1 = ;
$amount1 = $_POST;
$total = $CC1 + $amount1;

$query="UPDATE FROM 'users' SET CC1='.$total.' WHERE 'username'= '.$last.' ";

$result=mysql_query($query);

Member Avatar

fatihpiristine

your sql syntax is incorrect.

change this :
("Location: arming.php");

to this
header("Location: arming.php");

whats this ? => $CC1 = ;
did you assign any value ; before?