🔒 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
1,032
Guests online
4,244
Total visitors
5,276

Forum statistics

Threads
2,353,270
Posts
29,378,962
Members
1,080,953
Latest member
CMo22
Back
Top