• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 245
  • Last Modified:

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

0
Cheryl Lander
Asked:
Cheryl Lander
  • 2
  • 2
1 Solution
 
PranjalShahCommented:
page not a variable? should it be $page?
0
 
PranjalShahCommented:
and if its not a variable and just the text than,

<a href='delete_bin.php?pageid=".$row['pageid']."&valueid=page' class='a'>delete</a>
0
 
Cheryl LanderAuthor Commented:
The value that needs to be passed is "page" but no its not set anywhere.

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

perfect.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now