Link to home
Start Free TrialLog in
Avatar of Cheryl Lander
Cheryl LanderFlag for United States of America

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?pageid=".$row['pageid']."&valueid=".page."' class='a'>delete</a>
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);

Open in new window

Avatar of PranjalShah
PranjalShah
Flag of United States of America image

page not a variable? should it be $page?
ASKER CERTIFIED SOLUTION
Avatar of PranjalShah
PranjalShah
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Cheryl Lander

ASKER

The value that needs to be passed is "page" but no its not set anywhere.

it needs to be hardcoded.
<a href='delete_bin.php?pageid=".$row['pageid']."&valueid=page' class='a'>delete</a>

perfect.