0

Let me explain my situation. I made a local website on Windows Using WAMP. I transfered my files to a MACBOOK, and i installed MAMP

For some odd reason When i submit a login form on Wamp, it shows me Blank page. I searched the internet and i found that my login.php file has html code inside because its a template, and my mamp works only if i have only php code in the login.php file For example:

THIS WAY IT WORKS:

<?php
 echo "Hello World";
?>

THIS DOES NOT WORK:

<html>
<head>
 HTML_CODE_FOR_WEBSITE_TEMPLATE
 </head>
 </html>
 <?php
 echo "hello world";
 ?>

Somehow mamp displays blank page because it thinks the code has errors HOWEVER. the code is 100% working, because it works 100% on Windows

Thanks in advance

2
  • 1
    Your HTML doesn't have a <body> to show the message in. See htmlhelp.com/reference/html40/structure.html for an example what a HTML document should look like (it's HTML 4, but it doesn't really matter) Commented Jan 26, 2014 at 15:53
  • If you are satisfied with an answer, please accept it by clicking the check mark beside it. If not, please tell us what else you need. Welcome to SO. Commented Jan 26, 2014 at 17:05

1 Answer 1

3

Try this:

<!DOCTYPE html>
<html lang="en">

<head>
    <title>HTML CODE FOR WEBSITE TEMPLATE</title>
</head>

<body>
    <?php echo "hello world"; ?>
</body>

</html>

This is HTML5. Remember, the difference isn't between "Mac" and "PC", necessarily. It's between BROWSERS. So you'd want to say something like "it works on Firefox (version 26) but not Safari (version xx.xx)", etc.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.