🔒 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
380
Guests online
7,106
Total visitors
7,486

Forum statistics

Threads
2,341,192
Posts
29,320,262
Members
1,116,449
Latest member
zurii69
Back
Top