Where is the bug - anybody please?
I wrote to you yesterday and this morning about a freelancer's buddy inserting bugs in our script? Well, thank God, I have found one of the scripts where we complained to the freelancer about his staff's grammar: If anyone submits for a job right now, their application does not go beyond the 'Submit' button! But it was okay before the bug insertion. The script begins:
<?php
require_once('
wp-config.php');
global $wpdb;
$job_id = $_POST['job_id'];
$user_id = $_POST['user_id'];
$applied_date = $_POST['applied_date'];
//$sql_insert="INSERT INTO wp_job_applied (`job_id`,`user_id`,`applied_date`) VALUES ( '$job_id','$user_id','$applied_date' )";
//$result_insert = mysql_query($sql_insert);
$tableName,
$tableName = 'wp_job_applied';
$editFormAction = $wpdb->insert (
Array(
'job_id' => $job_id,
'user_id' => $user_id,
'applied_date' => $applied_date
)
);
$success = "Thank you for applying this job. we will contact with you soon.";
header('Content-Type: application/json; charset=utf-8');
if($editFormAction){
echo json_encode( array( 'success' => $success) );
}
?>
Script ends.
Can someone kindly assist and spot/correct the bug please? Thanks.