Re: Re: form javascript and php error

From: Date: Thu, 08 Nov 2001 10:25:38 +0000
Subject: Re: Re: form javascript and php error
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-73855@lists.php.net to get a copy of this message
Love :-) "Bas Jobsen" <bas@startpunt.cc> ha scritto nel messaggio news:008901c1683d$beeecf60$9600000a@lan... > Hi, > > It works, tnx! > > ----- Original Message ----- > From: "dav" <dav@thecloud.o> > To: <php-general@lists.php.net> > Sent: Thursday, November 08, 2001 8:49 AM > Subject: [PHP] Re: form javascript and php error > > > > I think this is your client/server discussion: > > 1) When you click load an image called test.php > > one clicks > > 2) Load the test.php > > 3) SERVER tells client: What is coming now it's an image (it's the header) > > 4) SERVER sends to client a REDIRECTION (not an image) > > 5) The client says: Hey, you should have sent an image, not a redirectio, > > result: image broken. > > > > SOLUTION: > > Showpic function should fopen the remote image and copy byte-to-byte it to > > the output so that the client receive image data and not a redirection to > an > > image > > > > > > "Bas Jobsen" <bas@startpunt.cc> ha scritto nel messaggio > > news:002901c167f6$a89f1c20$9600000a@lan... > > > 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 > > > > > > > > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > >

« previous php.general (#73855) next »