(beginner)code not working
Posted: Wed Jul 01, 2009 3:40 am
I hv just started to learn PHP. Here is my first code snippet where I hv embedded php in html.
But when I run it in browser, only the title changes and nothing is rendered.
And the source file in browser is as follows,
It shows that the dynamic HTML is not generated.
please help ???
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Script Two</title>
</head>
<body>
<b> <? print "This"; ?></b>
<font color='red'> <? print "is"; ?> </font>
<i> <? print "Line"; ?> </i>
<font color='blue'> <?= "Of"; ?> </font>
<h1 <? = "text"; ?> </h1>
</body>
</html>And the source file in browser is as follows,
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Script Two</title>
</head>
<body>
<b> <? print "This"; ?></b>
<font color='red'> <? print "is"; ?> </font>
<i> <? print "Line"; ?> </i>
<font color='blue'> <?= "Of"; ?> </font>
<h1 <? = "text"; ?> </h1>
</body>
</html>please help ???