Cutting the code down a bit (just to make the problem obvious) ...

On Mon, 11 Nov 2002, Tom Shearer wrote:
[...]
>       $fp = fopen($targetfile, "a+");
>       if (!$fp)
>                { echo "<strong>Your ...";
>                 echo    "It's the ... ";}
>                        exit;
[...]

> Any idea where I'm going wrong ?

Look where the if() clause finished, then "}" is after the echo, but 
before the exit;

So the code terminates immediately after opening the file.

Also, you might want to use "@fopen" rather than "fopen".  The "@"  
stops PHP from generating any error-HTML.

HTH

Paul.

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
Particle Physics (Theory & Experimental) Groups                   Paul Millar 
Department of Physics and Astronomy                     [EMAIL PROTECTED]
University of Glasgow                                 [EMAIL PROTECTED]
Glasgow, G12 8QQ, Scotland             http://www.astro.gla.ac.uk/users/paulm 
+44 (0)141 330 4717        A54C A9FC 6A77 1664 2E4E  90E3 FFD2 704B BF0F 03E9
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 


_______________________________________________
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish

Reply via email to