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 Like 12 Dislike
Previous forums Next forums
Other forums

PHP If Else statement for breadcrumb
Hi

I am trying to use a PHP if else statement to display a breadcrumb link on wordpress

problem with sql querry in php script
Hello guys,

What I want to do is I want to read out a csv file and then but te conent ot the

How can you detect variable string in a massive string?
Ok guys, i need some help with this one.

I am going to be getting a large string, like 10-20

tell csv import script to ignore blank rows?
Hi i have the below script but i get an error if a row is blank ie a return in the csv file at the e

Extracting Long text from message class with parameters
Hi,

I would like to extract the long text from a message class. However, the long text ha

Creating a function
Basically i wanna put all this code in a seperate file

Code: <?php

Receive Rosettanet Message to SAP 4.6c
Dear all ,

My customer will send the PO details by rosettanet message , Is it

Problem with HTML form
Hello,

I made a HTML form with some fields and check box.
Everything works fine except whe

Alternate messaging
I have 4 strings in MySQL db1

$string1 : Hello
$string2 : Hi
$string3 : Great
$strin

How to set pass login name from htaccess to php
When the user logs into my members page via htaccess, I'd like to retain the username so that I can

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash