You cannot output anything before headers.

Niklas


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 14. maaliskuuta 2003 8:03
To: [EMAIL PROTECTED]
Subject: [PHP] Can't relocate to a specified URL after submit.


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



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

###########################################
This message has been scanned by F-Secure Anti-Virus for Internet Mail. For
more information, connect to http://www.F-Secure.com/

###########################################
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to