Php code that is like a public variable in java?
MYSQL DATA: table schedule
ID | Subject | Day | Slot 1 | Math | MWF | 1 2 | Math | MWF | 0 3 | PE | TTH | 2 4 | Math | Sat | 0
In the Data above I already get how to subtract the slot to 1 when I ADD Schedule to the student and now I already Confucius when I Delete the Schedule on the student the slot will also update to + 1 to specific subject. I just use the same variable that i use in ADD schedule and i just change the - sign to + sign to add, When I run my code my variable is undefined I use one page only.
Code for update the slot for add schedule then subtract the slot:
textslot = $_post['txtslot'];<br> textwholenumber = $_post['wholenumber'];<br> $sql = "UPDATE schedule ". "SET Slot = $textslot - $textwholenumber". "WHERE Subject = '$textsubject' and Day = '$textday'";
Code for update the slot for delete schedule then add the slot:
$sql = "UPDATE schedule ". "SET Slot = $textslot + $textwholenumber". "WHERE Subject = '$textsubject' and Day = '$textday'";
$textwholenumber in the delete code is undefined?