A PHP problem

 

<html>

<head>

<title>my data</title>

<link rel="stylesheet" type="text/css" href="style.css" />

<script>

function myfunction(){

document.getElementById("datetime").innerHTML=Date();

}

function clicked(){

var x;

x=document.getElementById('nameCheck').value;

if(x!=""){

document.getElementById('greeting').innerHTML='Hi '+x+', I hope you like this site.';

}

else{

document.getElementById('errorMsg').innerHTML='<font color="red"><i>(required)Name:</i></font>';

}

}

</script>

</head>

<body>

<div class="main">

<div class="navigationbar">

<a href="index.html">home</a>

&nbsp;&nbsp;&nbsp;&nbsp

<a href="aboutme.html">about me</a>

&nbsp;&nbsp;&nbsp;&nbsp

<a href="contactme.html">contact me</a>

&nbsp;&nbsp;&nbsp;&nbsp

<a href="photobooth.html">photo booth</a>

</div>

<div>

<div class="row1">

<img src="images.jpg" hight="130" width="160">

</div>

</div>

<div class="row2">

<div>

<p class="welcome" id="greeting">

hi this is my web site

</p>

<p class="welcome2">since you are here why don't you go and check out

this awesome web site</p></td>

</div>

<div>

<?php

echo "It's PHP!";

?>

</div>

<div>

<form>

<b id="errorMsg">name:</b>

<input type="text" id="nameCheck"/>

<input type="button" value="Click Me" onClick="clicked()"/>

</form>

</div>

</div>

<div>

<div>

<p><a href="http://www.google.com">Google</a></p>

</div>

<div>

<p id="datetime">click the button for date and time</p>

<form>

<input value="click me" type="button" onClick="myfunction()"/>

</form>

</div>

</div>

</div>

<ol>

<li><p>by dumitru vulpe</p></li>

<li><p>:D</p></li>

</ol>

</body>

</html>

sorry i had to spread it out to be readeble

Use pastebin... http://pastebin.com/H29haUd0

Also, What is the problem exactly?

So you want to write on your website with PHP, you could just do this where your PHP is

http://pastebin.com/xbBzXxvr

Yeah, what zanginator said.... From your code there, the "It's PHP" code should work fine presuming you have ANY version of PHP installed and configured on the server...

the php part just would not come up on the on the actual website.

thanks, i have added the "<p></p>" tags and it now works

 

Keep in mind, when you echo anything onto the site, you're actually echoing markup to be interpreted by the browser...