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
help with image upload code
Hello,
right now this code I have resizes images and then places them into the uploads folder
empty() error
Why does
Code: empty($USER_ID = $_SESSION["USER_ID"])
create this error...
do while conditions
i want to display 6 images in a 2x3 table
now what would be the correct logic to
count that th
Linking with Foreign Keys
I have been getting an erro when I try and link:
create table Faculty_Specialty (I_Name v
PHP / MySQL Associative Multidimensional Array:
Hello.
I have data in a MySQL Table that adheres to the below: (note, no index, could add if
PHP form help required
Hi all! Apologies in advance for having to message the forum for help. I know you must get a lot of
Limiting checkboxes?
Hi guys,
I have this code: Code: if(isset($_POST['selected'])) {
foreach($_POST['selec
Calander Basic Spript help
hi, just starting out with PHP and have the following script:
<?php
//This gets t
Help adding strtolower( to my in_array
strtolower i need to add it to this to work, iuno how.
Code: $moderators = array('Admin', 'ba
How to display random record from table?
I have the following code:
Code: <?php
$display_block .= "<input type=