I have a php form that needs to update information in aSQL database. I have read numerous replies on here but for some reason I am not getting my code to work.
I am using "POST" in the form and this is the code I use in the PHP action page.
{   global $host;
    global $username;
    global $password;
    global $db_name;
$imei = $_REQUEST['imei'];
$insertSuccessful = false;
   $sql = "UPDATE tracking_sim SET      
        imei = '".$imei."',
                    loaded_by = '".$loaded_by."'
        Where card_no='$card_no'"; 
    if (mysql_query($sql, $con)) {
            $insertSuccessful = true;
        } else {
            echo mysql_error ();
            echo $sql;
            print_r($_POST);
            echo mysql_errno($link) . ": " . mysql_error($link) . "\n";
            echo "mysql err no : " . mysql_errno($con);
        }
    return $insertSuccessful;
Function Def:
//update database
update_lbs($msisdn, $reqby1, $reqdate, $reqtime, $client, $clientcase, $saps, 
$cas, $reason, $reqby, $long, $lat, $msisdn, $dist, $response);
//update database
function update_lbs($imei, $serial, $status, $msisdn_no, $card_no, $client_name,
 $inst_date, $tech, $inst_cert, $isp, $account, $account_price, $deposit, $cont_start,  
$cont_end, $rica, $date_rica, $prod, $suspended, $loaded_by)
All brackets are closed and some smaller code in between have been left out. Connection to SQL is completed and no errors as well. Even if I post the form doesn't show me any errors at all
Please guide me in right direction here
 
     
    