Hi guys,
I have this code here and when i try to run it it is giving me this error
Parse error: parse error, unexpected T_VARIABLE in /var/www/html/testweb/milad/PSC2/cms/includes/createList.inc.php on line 25
There here is the code please help me!!!!!
🙁
function createList($fromTable)
{
$query = mysql_query("SELECT * FROM $fromTable");
while($queryresult = mysql_fetch_array($query))
{
if($fromTable == "Articles")
{
$id = $queryresult["ID"];
$name = $queryresult["headline"];
$delete = "<input type=\"button\" onClick=\"window.location='remove.php?id=" . $id . "'\" value=\"Delete\" />"
$edit = "<input type=\"button\" onClick=\"window.location='list.php?id=" . $id . "'\" value=\"View\" />"
}elseif($fromTable == "Link")
{
$id = $queryresult["ID"];
$name = $queryresult["title"];
}elseif($fromTable == "Link_Categories")
{
$id = $queryresult["ID"];
$name = $queryresult["name"];
}elseif($fromTable == "Page")
{
$id = $queryresult["ID"];
$name = $queryresult["title"];
}
$list .= "<td>" . $delete . "</td><td>" . $edit . "</td><td>" . $name . "</td>";
}
return $list;
}