i am still learning,pls i need help,i want each and everytime i submit to database all the html tables with value should relect in database,i mean all the table should show in the database
this my posting only display one table ............help thanks

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "add_stock_final_inv")) {
  $insertSQL = sprintf("INSERT INTO ho_add_stock_final_inv (supplier, `day`, `month`, `year`, dollar_amount, pro_forma_inv_no, comm_no, bl_no, lot, container_no, buyer, product_name, `description`, qty, price, hawker, wholesale, retail, total1, cartons, pack_size, colour, `size`, sub_total, vat, total) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['supplier'], "text"),
                       GetSQLValueString($_POST['day'], "text"),
                       GetSQLValueString($_POST['month'], "text"),
                       GetSQLValueString($_POST['year'], "text"),
                       GetSQLValueString($_POST['dollar_amount'], "text"),
                       GetSQLValueString($_POST['inv_no'], "int"),
                       GetSQLValueString($_POST['comm_no'], "text"),
                       GetSQLValueString($_POST['bl_no'], "text"),
                       GetSQLValueString($_POST['lot'], "int"),
                       GetSQLValueString($_POST['container_no'], "int"),
                       GetSQLValueString($_POST['buyer'], "text"),
                       GetSQLValueString($_POST['product_name'], "text"),
                       GetSQLValueString($_POST['description'], "text"),
                       GetSQLValueString($_POST['qty'], "int"),
                       GetSQLValueString($_POST['price'], "int"),
                       GetSQLValueString($_POST['hawker'], "int"),
                       GetSQLValueString($_POST['wholesale'], "int"),
                       GetSQLValueString($_POST['retail'], "int"),
                       GetSQLValueString($_POST['total1'], "int"),
                       GetSQLValueString($_POST['cartons'], "int"),
                       GetSQLValueString($_POST['pack_size'], "int"),
                       GetSQLValueString($_POST['colour'], "text"),
                       GetSQLValueString($_POST['size'], "int"),
                       GetSQLValueString($_POST['sub_total'], "text"),
                       GetSQLValueString($_POST['vat'], "text"),
                       GetSQLValueString($_POST['total'], "text"));

  mysql_select_db($database_universal, $universal);
  $Result1 = mysql_query($insertSQL, $universal) or die(mysql_error());
}

mysql_select_db($database_universal, $universal);
$query_ProForma = "SELECT* FROM ho_add_stock_proforma";
$ProForma = mysql_query($query_ProForma, $universal) or die(mysql_error());
$row_ProForma = mysql_fetch_assoc($ProForma);
$totalRows_ProForma = mysql_num_rows($ProForma);
$query_update="UPDATE* ho_add_stock_final_inv SET WHERE inv_no > 0";
Member Avatar for LastMitch

i am still learning,pls i need help,i want each and everytime i submit to database all the html tables with value should relect in database,i mean all the table should show in the database

What are you doing? Your database design is not good.

Your update should look like this code snippet:

UPDATE [table] SET [Column] = [Value] WHERE [Value]  > [0]

This is incorrected where is your column in here:

$query_update="UPDATE* ho_add_stock_final_inv SET WHERE inv_no > 0";

which should look like this:

$query_update="UPDATE ho_add_stock_final_inv SET [Column] = [Value] WHERE inv_no > 0";
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.