Luno1599
15-12-2007, 10:36 AM
Hey
I have having touble adding this into the database :( it says Successfull but then there is nothing in the database :(
<?php
if($_GET['add'] == "yes"){
//Get Data
$client = $_POST['client'];
$date = $_POST['date'];
$byy = $_POST['by'];
$invoice = $_POST['invoice'];
$acc = $_POST['ac'];
if($by == NULL | $invoice == NULL){
echo "<br /><div class='failed'>You left something blank.<br><a href='javascript:history.back();'>[Back?]</a></div>";
}else{
include("config.php");
$add_invoice = "INSERT INTO invoice (client_id, date, created, for, activ) VALUES ('$client','$date','$byy','$invoice','$acc')";
mysql_query($add_invoice);
//Added?
echo "<br /><div class='success'>The invoice for client ID#$client was added successfully!</div>";
}}
?>Whats up with it?
Dan
Moved by Agesilaus (Forum Moderator) from Design and Development: Please post in the correct forum in future.
I have having touble adding this into the database :( it says Successfull but then there is nothing in the database :(
<?php
if($_GET['add'] == "yes"){
//Get Data
$client = $_POST['client'];
$date = $_POST['date'];
$byy = $_POST['by'];
$invoice = $_POST['invoice'];
$acc = $_POST['ac'];
if($by == NULL | $invoice == NULL){
echo "<br /><div class='failed'>You left something blank.<br><a href='javascript:history.back();'>[Back?]</a></div>";
}else{
include("config.php");
$add_invoice = "INSERT INTO invoice (client_id, date, created, for, activ) VALUES ('$client','$date','$byy','$invoice','$acc')";
mysql_query($add_invoice);
//Added?
echo "<br /><div class='success'>The invoice for client ID#$client was added successfully!</div>";
}}
?>Whats up with it?
Dan
Moved by Agesilaus (Forum Moderator) from Design and Development: Please post in the correct forum in future.