🔒 Closed Return to same page after update

Status
Not open for further replies.
Di ko alam mag-ajax sir e..nagbasa nga ako kanina..nalito ako..:)

sir na try mo na po to?
PHP:
$query = "UPDATE firm.emp SET groupmem='$groupmem', grouptask='$grouptask' WHERE emp_id='".$_POST['emp_id']."'";
if(mysqli_query($conn, $query)){
 header("Location: profile.php?emp_id=".$_POST['emp_id']);
}else{
  echo "Error: ".mysqli_error();
}
 
sir na try mo na po to?
PHP:
$query = "UPDATE firm.emp SET groupmem='$groupmem', grouptask='$grouptask' WHERE emp_id='".$_POST['emp_id']."'";
if(mysqli_query($conn, $query)){
 header("Location: profile.php?emp_id=".$_POST['emp_id']);
}else{
  echo "Error: ".mysqli_error();
}

Tama to Sir! May ni revise lang ako para may alert..hehe

PHP:
$query = "UPDATE firm.emp SET groupmem='$groupmem', grouptask='$grouptask' WHERE emp_id='".$_POST['emp_id']."'";
if(mysqli_query($conn, $query)){
  echo '<script>';
  echo 'alert("Refreshing...");';
  echo 'window.location.href="profile.php?emp_id=', rawurlencode($_POST['emp_id']), '"';
  echo '</script>';
}else{
  echo "Error: ".mysqli_error();
}

Salamat Sir! Mabuhay! :):)
 
Haha kung sa post mo ang gnwanmontarget ay ibang page refresh agad yan lagyan mo lng ng headerlocation ung target page pabalik
 
Status
Not open for further replies.

About this Thread

  • 28
    Replies
  • 2K
    Views
  • 10
    Participants
Last reply from:
Phcmjal

Trending Topics

Online now

Members online
605
Guests online
2,165
Total visitors
2,770

Forum statistics

Threads
2,318,567
Posts
29,196,284
Members
1,180,986
Latest member
Jalex Ones
Back
Top