I want to build a mysql statement with the keys i get from the POST url. Is that possible? I have a dropdownlist in my html, so I am able to select different tables with different sizes.
So insted of (firstname, lastname), maybe i could get it from the array($keys). I'm very new to all this php. and it's for a school project.
<?php
//array with keys
$keys = array();
foreach($_POST as $key=>$value)
{
array_push($keys, "$key=$value");
}
//
$sql="INSERT INTO $dbTable(firstname, lastname)
VALUES
('$_POST[firstname]','$_POST[lastname]')";
?>