I have several php scripts that have the following structures:
$count = $_GET['count'];
$sort = $_GET['sort'];
$car = $_GET['car'];
$driver = $_GET['driver'];
...
$SQL = "SELECT car, truck FROM autos WHERE car='$car' AND truck='truck'";
...
Another script will be identical to the script except for the car, truck, or table. I will work with another table, with different variables and, possibly, with more or less variables. Is there a way or a good design template to use, so I need to write only one instance of this script of vice version 15 or so, which I could write.
source
share