Need some help with my php coding!

I have added some php coding to my html page and when I open it you can see some of the php coding and it looks bad. The page is www.castlegraphicdesigns.com/login.html I appreciate any assistance you can provide, thank you.

You are using a PHP script in your login.HTML.

If you want to use php you need the .php extension.
However, worry not ! If you like to keep the .HTML then this can be changed with your .htaccess file.

Add the following line in your .htaccess.
[php]AddType application/x-httpd-php .html .htm[/php]

I hope this helps,

Kind Regards,

I am new to php… it seems like i was able to fix the login.php BUT when someone logs in now i get these errors:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/castleg4/public_html/castlegraphicdesigns.com/login.php:7) in /home/castleg4/public_html/castlegraphicdesigns.com/login.php on line 114

Warning: session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent in /home/castleg4/public_html/castlegraphicdesigns.com/login.php on line 115

Warning: Cannot modify header information - headers already sent by (output started at /home/castleg4/public_html/castlegraphicdesigns.com/login.php:7) in /home/castleg4/public_html/castlegraphicdesigns.com/login.php on line 135

man I am lost on what to do. I don’t want to delete any code or change it because I know it is there for a reason. Let me kow your thoughts. THANK YOU!!!

Would be more then helpfull if you could post your full login.php script ;D

[sup]Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/castleg4/public_html/castlegraphicdesigns.com/login.php:7) in /home/castleg4/public_html/castlegraphicdesigns.com/login.php on line 114

Warning: session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent in /home/castleg4/public_html/castlegraphicdesigns.com/login.php on line 115

Warning: Cannot modify header information - headers already sent by (output started at /home/castleg4/public_html/castlegraphicdesigns.com/login.php:7) in /home/castleg4/public_html/castlegraphicdesigns.com/login.php on line 135
[/sup]
all these warnings are kinda the same: there telling you that the headers can’t be set as they have already been sent: in otherwords you are printing something to the screen BEFORE your call to the header function.

use output buffering, this may solve your problem, without seeing your code i can’t be sure?

try putting this:[php]<?php ob_start(); ?>[/php] at the very top of your page

and this:[php]<?php ob_flush_end(); ?>[/php] at the very bottom of the page.

Let me know how you get on with it :wink:

Sponsor our Newsletter | Privacy Policy | Terms of Service