Reputation: 21
Instead of making few header location like:
header("Location: pagename.php?alert=xxxx");
I want to add ?alert=xxx to current opened page, how to do it?
Upvotes: 0
Views: 19
Reputation: 22500
Try with PHP_SELF
if(!isset($_REQUEST['alert']){
header("Location: ".{$_SERVER['PHP_SELF']}."?alert=xxxx");
}
Upvotes: 1