I am trying to greatly shorten code on my pages.
Is it possible to include variables in my fetch fields?
The below will all exist on same php page.
Here is the code I want included in my fetch
// variables to include in fetch
$abc = stripslashes($row->abc);
$def = stripslashes($row->def);
$ghi = stripslashes($row->ghi);
$query = "SELECT * FROM $dbtable WHERE ID = $id";
$result = mysql_query($query);
$row = mysql_fetch_object($result);
if ($row)
{
$name = stripslashes($row->name);
$parentID = $row->parentID;
$content = stripslashes($row->content);
// include abc, def, ghi
}