Skip to content
WJunction - Webmaster Forum

Why this php code not work?

Status
Not open for further replies.
PHP:
<?php

	$siturl = $_POST['burl'];
	$removee = $_POST['doit'];
	
	if (isset($removee)) {
		mysql_query("DELETE FROM wcddl_blacklist WHERE url = '.$siteurl.'");
	}
?>

Any1 know why as iv tried n tried but its not working..
 

6 comments

Escape the query

PHP:
if (isset($_POST['burl']) && isset($_POST['doit'])) {
 $siteurl = mysql_real_escape_string($_POST['burl']); 
 mysql_query("DELETE FROM wcddl_blacklist WHERE url = '.$siteurl.'"); 
 } 
?>
 
Status
Not open for further replies.

About the author

C
Banned · Joined
901
Messages
17
Reactions
18
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom