form javascript and php error
| From: | Bas Jobsen | Date: | Thu, 08 Nov 2001 01:41:41 +0000 |
| Subject: | form javascript and php error | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-73831@lists.php.net to get a copy of this message | ||
Hello,
I have got this php file:
--
<form method='post'>
<input type='submit' value='SEND'>
</form>
<script type="text/javascript" language="JavaScript">
<!--
d=document;
d.write("<img src='test.php'>");
</script>
--
and test.php:
--
<?
function showpic()
{
header ("location: http://www.linkotheek.nl/images/logo.gif");
exit;
}
showpic();
exit;
?>
--
pressing the submit button will give my a broken image.
I don't understand why?
Thanks,
Bas