Cheryl Lander
asked on
trouble
I have some code below which is used to delete an item row.
Problem is when I run the page which contains the "link code" I get the following error.
Notice: Use of undefined constant page - assumed 'page' in C:\wamp\www\recyclebin.php on line 98
line 98 is <a href='delete_bin.php?pagei d=".$row[' pageid']." &valueid=" .page."' class='a'>delete</a>
Problem is when I run the page which contains the "link code" I get the following error.
Notice: Use of undefined constant page - assumed 'page' in C:\wamp\www\recyclebin.php
line 98 is <a href='delete_bin.php?pagei
link
-------------------
<a href='delete_bin.php?pageid=".$row['pageid']."&valueid=".page."' class='a'>delete</a>
delete_bin.php
-------------------
//Delete Page Item Permanently
if ($_GET['valueid']== "page"){
$query="DELETE FROM pages WHERE pageid = '" . $_GET['pageid'] . "'";
@mysql_select_db($database) or die("Couldn't execute query");
mysql_query($query);
page not a variable? should it be $page?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The value that needs to be passed is "page" but no its not set anywhere.
it needs to be hardcoded.
it needs to be hardcoded.
ASKER
<a href='delete_bin.php?pagei d=".$row[' pageid']." &valueid=p age' class='a'>delete</a>
perfect.
perfect.