so i'm sending a value to php code to update an entry in my sql database, everything is running fine, entry is updating successfully but php not returning any success or failure message to jquery. i've tried both post and ajax method but every time its same. data updated without alerting any message. why should i do ??
$(document).ready(function(){
$("#updateabout").click(function(){
var value = $("#value").val();
$.post("<?= base_url('user_profile/updatebio'); ?>", {val:value}, function(data){
alert(data);
});
});
});
here's my php code for update:
if($this->session->userdata('LoginId')){
$uid = $this->session->userdata('LoginId');
$val = $_POST['val'];
$que = "update dzone_usersignup_details set about_me='$val' where uid='$uid'";
$run = mysqli_query($conn, $ru)
if($run){
echo "hello";
}
}
Check your console, you must missing something.
Or try return instead of echo in php