I Have form where I want insert let's say:
- Who paid ? (user_id) in user database
- when (date) incomes database
- how much (sum) incomes database
- Who entering the data (user_id) in user database
and inserting script:
if(empty($_POST['user_id'])){
$data_missing[] = 'User';
} else{
$summa = trim($_POST['user_id']); }
.......
$sql = "INSERT INTO incomes (user_id, date, sum, user_id)
VALUES ('$user_id','$date','$sum','$user_id')";
......
How I can solve to insert two times "user_id", and they may be different or same!
Aucun commentaire:
Enregistrer un commentaire