NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHP REDIRECT

David Krings ramons at gmx.net
Wed Sep 5 06:50:36 EDT 2007


PaulCheung wrote:
> With this PHP gets really ticked-off giving me a long error message and 
> points to a line which contains the following coding.
> <script language="JavaScript" type="text/javascript"> As to why, I 
> haven't a clue.

I always fared very well with the header redirects, but those only work 
if you haven't sent any body content yet. For those cases a simple a 
link should do the trick.
Since the error you get has seemingly nothing to do with the 
redirect/link, but some other non-PHP line of code I'd like to see what 
is before the quoted line. Do you use an echo to write that line? If 
yes, did you put the \ in front of all " that are to be printed out?
Oh, and what does the long error message state? Error messages are there 
for a reason and they sometimes are helpful (most often they are not as 
developers think that stupid users deserve crappy error messages and 
that their code never fails anyway).


David



More information about the talk mailing list