I've entered all of the code etc. but, it comes up with some errors when I try to run it: Warning: Cannot modify header information - headers already sent by (output started at /home/www/piegames.freehostia.com/PHP GAME/login.php:1) in /home/www/piegames.freehostia.com/PHP GAME/login.php on line 29
Luke
· 1 year ago
If it's telling you that the headers have already been sent, chances are that you've missed the } else { line inside the code. If you do that, PHP will try to output two headers right after each other, which won't work - have you missed a line in your code?
santu
· 1 year ago
thanks a lot...worked perfectly......
Trixxy
· 10 months ago
@Thomas
Put all the PHP code above your HTML, try that. It worked for me ;)
Trxxy
· 10 months ago
@Thomas
Put the php code above HTML. and it will work. PHP.net's answer under...
************************** <html> <?php /* This will give an error. Note the output * above, which is before the header() call */ header('Location: http://www.example.com/'); ?>
Warning: Cannot modify header information - headers already sent by (output started at /home/www/piegames.freehostia.com/PHP GAME/login.php:1) in /home/www/piegames.freehostia.com/PHP GAME/login.php on line 29
Put all the PHP code above your HTML, try that. It worked for me ;)
Put the php code above HTML. and it will work. PHP.net's answer under...
**************************
<html>
<?php
/* This will give an error. Note the output
* above, which is before the header() call */
header('Location: http://www.example.com/');
?>