PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
You should really pull your finger out and learn how to do this yourself.. asking people to re-write your code usually tends to <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> people off, especially when it's this simple.. but here it is anyway.. don't make a habbit of it.
Please do you have an easy way to do this???
Sending an HTTP headers to the browser before any HTML code is generated is giving me a lot bottleneck.
Any easy way???
Please tell me.
The headers are automatically sent... you won't be needing to send any headers except maybe some location or cache if you're doing something complicated.
Please do you have an easy way to do this???
Sending an HTTP headers to the browser before any HTML code is generated is giving me a lot bottleneck.
Any easy way???
Please tell me.
If you are having 'header' problems with your script then just make sure you don't echo() anything before your HTML kicks in.
You can open PHP ( <?php ) setup variables then close PHP again ( ?> ) before your HTML. You can then do your HTML stuff and re-open your PHP, the variables will still be there.. they don't go anywhere unless you jump to another page or get rid of them.
You would do exactly the same thing if you were using Cookies as these need to be excuted before any page 'headers' are sent.
It might be worth checking out the PHP manuals and scritps on this site to get your head around a few ways of working with PHP.