note 106988 deleted from function.header by tularis

From: Date: Tue, 27 Dec 2011 16:12:49 +0000
Subject: note 106988 deleted from function.header by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-185249@lists.php.net to get a copy of this message
Note Submitter: zablocki dot spam at gmail dot com Reason: useless ---- <?php function auto() { return "Location: ".$_SERVER['PHP_SELF']."?id=".$_GET['id'].""; } if($ins) {header(auto()); } else {echo "ERR: ".mysql_error();} ?> After succesfull mysql_query ($ins) you are redirected to the page you were editing And this one is also working for me pretty good: <form name="" action="<?php echo $_SERVER['PHP_SELF'];echo "?id=";echo $_GET['id'];?>" method="POST"> I spent so much time wondering how can this be done, so I decided to post it here.

« previous php.notes (#185249) next »