Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top