Commit 82ff275c authored by Ranindya Paramitha's avatar Ranindya Paramitha
Browse files

[FIXING] edit search_result default pp

parent 71fe3d49
......@@ -3,7 +3,7 @@
require_once("controller.php");
$user_token = $_COOKIE["login"];
$user_id = getUserIDbyToken($user_token);
echo "MASUK";
// echo "MASUK";
$update_name = $_POST["name"];
$update_address = $_POST["address"];
$update_phone = $_POST["phone"];
......@@ -22,11 +22,11 @@
}
// echo $update_name;
$update = setUserProfile($user_id, $update_name, $update_address, $update_phone, $name, $tmp_name);
// if ($update == 0){
// echo "<script type='text/javascript'>alert 'Update Failed';</script>";
// } else{
// echo "<script type='text/javascript'>alert 'Update Success';</script>";
// }
if ($update == 0){
echo "<script type='text/javascript'>alert 'Update Failed';</script>";
} else{
echo "<script type='text/javascript'>alert 'Update Success';</script>";
}
header('Location: ../profile');
exit;
?>
\ No newline at end of file
......@@ -35,6 +35,10 @@
echo "<div class = \"rows1\">" ;
echo "<div class=\"left\">" ;
$user_prof_pict = '';
if (!isExistProfileImage($user_pp)){
$user_pp = "default.jpg";
}
echo "<img class=\"pp\" src=\"../uploads/$user_pp\" alt=\"Profile Picture\">" ;
echo "</div>";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment