[PHP-Budget-updates] phpbudget add.php,1.2,1.3
Status: Planning
Brought to you by:
rodrigoh
|
From: <rod...@us...> - 2002-10-21 21:06:33
|
Update of /cvsroot/php-budget/phpbudget
In directory usw-pr-cvs1:/tmp/cvs-serv31629
Modified Files:
add.php
Log Message:
add.php can now add budgets to the db :)
Index: add.php
===================================================================
RCS file: /cvsroot/php-budget/phpbudget/add.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** add.php 21 Oct 2002 20:27:05 -0000 1.2
--- add.php 21 Oct 2002 21:06:30 -0000 1.3
***************
*** 18,22 ****
{
addslashes($value);
! echo "$key: Value: $value<br\n";
}
//END
--- 18,23 ----
{
addslashes($value);
! //debug _POST vars
! echo "$key: Value: $value<br>\n";
}
//END
***************
*** 53,59 ****
$nIncome4 = $_POST['nIncome4'];
//add new budget
! mysql_query("INSERT INTO B_table(F_b_name, F_b_year, F_b_descr, F_b_month, F_b_income1, F_b_income2, F_b_income3, F_b_income4, F_b_owner) VALUES('$nBname', '$nByear', '$nBdescr', '$nMvalue', '$nIncome1', '$nIncome2', '$nIncome3', '$nIncome3, '$nIncome4', '$B_owner')") OR die("Wops could not add budget");
echo "<HTML><HEAD>\n";
! echo "<meta http-equiv=\"refresh\" content=\"0;URL=$PHP_SELF\">\n";
echo "<META HTTP-EQUIV=PRAGMA CONTENT=\"NO-CACHE\">\n";
echo "</HEAD>\n";
--- 54,61 ----
$nIncome4 = $_POST['nIncome4'];
//add new budget
! mysql_query("INSERT INTO $B_Table(F_b_name, F_b_year, F_b_descr, F_b_month, F_b_income1, F_b_income2, F_b_income3, F_b_income4, F_b_owner) VALUES('$nBname', '$nByear', '$nBdescr', '$nMvalue', '$nIncome1', '$nIncome2', '$nIncome3', '$nIncome4', '$B_owner' )") OR die(mysql_error());
echo "<HTML><HEAD>\n";
! //send the user back to the add page, soon this will be redirected to the add_edit_change page
! echo "<meta http-equiv=\"refresh\" content=\"1;URL=$PHP_SELF\">\n";
echo "<META HTTP-EQUIV=PRAGMA CONTENT=\"NO-CACHE\">\n";
echo "</HEAD>\n";
|