Click here to Skip to main content
14,488,259 members
Rate this:
Please Sign up or sign in to vote.
See more:
 $id = ''; 
if( isset( $_GET['id'])) {
    $id = $_GET['id']; 
    $query = "SELECT * FROM `listhouse` WHERE `id` = '$id'; ";  
      if(count(fetchAll($query)) > 0)
        foreach(fetchAll($query) as $row)
            $query = "INSERT INTO `approvedhouse`(`taxno`, `id`, `name`, `phno`, `paddress`, `pincode`, `lsno`, `bu`, `regno`, `area`, `l`, `municipal`, `engname`, `c`, `date`, `message`, `status`) VALUES (NULL,'$id','$name''$phno','$paddress','$pincode','$lsno','$bu','$regno','$area','$l','$municipal','$engmane','$c','$date','approved','unread') ;";
        $query .= "DELETE FROM `listhouse` WHERE `listhouse`.`id` = '$id';";
            echo "Account has been accepted.";
            echo "Unknown error occured. Please try again.";
       // }
      //  echo "Error occured.";

What I have tried:

the error occured when execution this program
and it worked before but not now
Updated 1-Nov-19 8:29am
MadMyche 1-Nov-19 14:30pm
I'll consider looking into this when you start fixing the other problems people are noticing; such as the SQL Injection Vulnerability which has been pointed out to you on every one of your posts regarding this block of code

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Try to replace


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100