Re: Can't relocate to a specified URL after submit.
| From: | Ray Hunter | Date: | Fri, 14 Mar 2003 06:48:35 +0000 |
| Subject: | Re: Can't relocate to a specified URL after submit. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-139673@lists.php.net to get a copy of this message | ||
Where is the js code in the mix.
Try putting an exit; after the header function and see if that works.
--
ray
On Thu, 2003-03-13 at 23:02, Larry_Li@amat.com wrote:
> The code looks like:
> if( $actionflag == "delete" )
> {
> //Delete Table ip_enrollment
> $query="delete from ip_enrollment where id='$id'";
> $AMC_DB->query("$query") or die("database server wasn't available
> now.");
>
> //Delete Table ip_evaluation
> $query="delete from ip_evaluation where enrollmentID='$id'";
> $AMC_DB->query("$query") or die("database server wasn't available
> now.");
>
> header( "ip-list.php?subMenuSelect=m1");
> }
>
> It works fine before, but it seems header() doesn't work after I added some
> js code for preventing click submit twice.
>
> <script language="JavaScript">
> <!-- Copyright 2000 by William and Mari Bontrager.
> counter = 0;
> function count() {
> counter++;
> if(counter <= 1)
> document.formname.submit();
> } // -->
> </script>
>
> <a href="javascript:count()">
> <img border=0 src="images/ip_submit.gif"></a>
>
>
> Thanks a lot,
> Larry
>
>