I am trying to insert into a mysql database several items, with information passed from pagea.php. below is some code which is on pageb.php
foreach($_POST as $key => $val) {
$insertSQL = sprintf("INSERT INTO transactions (equipid, movement) VALUES (%s, %s)",
GetSQLValueString($key, "int"),
GetSQLValueString($val, "int"));
}
i am receiving the following error when the form is submitted on pageb.php (which initiates the insert).
Parse error: syntax error, unexpected 'GetSQLValueString' (T_STRING)
i am open to other ideas but essentially i have no way of knowing what values are being passed over so i cant define the specific fields to insert.
thanks!