My query is being run with no results.
Posted on
16th Feb 2014 07:03 pm by
admin
I have this.
Code: function DropUser($duser_id, $user_email, $user_username) {
if(isset($_SESSION['admin_username']) && isset($_SESSION['admin_id']) && isset($_SESSION['admin_session_key'])) {
$this->duser_id = mysql_real_escape_string(trim(addslashes(strip_tags(is_numeric($duser_id)))));
$this->user_email = mysql_real_escape_string(trim(addslashes(strip_tags($user_email))));
$this->user_username = mysql_real_escape_string(trim(addslashes(strip_tags($user_username))));
if(!empty($this->duser_id) && !empty($this->user_email) && !empty($this->user_username)) {
$this->dropusersql = "DELETE FROM `members` WHERE `members`.`user_id` = '$this->duser_id' AND `members`.`username` = '$this->user_username' AND `members`.`emailaddress` = '$this->user_email' LIMIT 1";
$this->run_dropusersql = mysql_query($this->dropusersql) or trigger_error('Query failed: ' . mysql_error(), E_USER_ERROR);
$this->removecomplete = '<font color="green"> - The user you select was removed.</font>';
return($this->removecomplete);
} else {
$this->emptyfields = "<font color='red'> - You have left mandatory fields empty.</font>";
return($this->emptyfields);
}
} else {
header('Location: login.php');
}
}
(Part of a class). I get the print back (<font color="green"> - The user you select was removed.</font>) but the query isnt deleting the row.
Many thanks,
No comments posted yet
Your Answer:
Login to answer
140
12
Other forums
how to easy edit text, with box? Help.
Hi.
I have a little problem. I'm doing a webpage for my aunt and I would like to make it as easy
Populate drop down list from table??
Lets say for arguments sake that i have a table which contains the numbers 1 to 10.
How can i get
form help
this doesn't work. i want the form action to go the location.href of the submit button chosen.. how
Validating time
Hi Guys
what do you think of the following approach to validate a 24hour time:
http://
Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne
Simple Question
I know this is a simple question, that if I knew what it was technically called i could probably loo
Array becomes unset by itself?
Hi,
I have a bit of experience with PHP but not extensive. It seems I cannot store any items
Printing issues with xMII 11.5
For some reason, we have one report (and only one) that is giving us fits when trying to print. The
Parse Error
Hi Guys,
I have a function in my class which returns a string link variable. The problem is i
dynamic table with forms
I have a table that is populated with mysql data and in teh first column there is a raido button tha