Page 1 of 1

PHP code .. help!

Posted: Sat Mar 21, 2009 2:02 pm
by p_sha85
Hi everyone-

I'm taking a PHP course in college and for this assignment, we were supposed to tell what was wrong with a code. I think I did most of it but for some reason, when I try to open it in my browser, it's not working.. it makes the whole thing quit... O_o

Anyways, I'm posting the code below this message.. if someone can tell me what I'm doing wrong I'd appreciate it. Thanks!!


*Pooja*


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Locksmiths</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<p>
<?php>
*/
Pooja
3/21/2009
*/
echo "<h1>California Occupational Guide</h1>";
echo "<h2>Locksmiths</h2>";
echo "A locksmith installs, services, and repairs various types of locks and security
devices. Locksmiths also install and repair door hardware and pneumatic closing fixtures.
Some additional responsibilities of a locksmith may include cutting new or duplicate keys
and stamps with identification and troubleshooting, repairing, and maintaining electronic
keycard systems.";
?>
</p>
</body>
</html>

Re: PHP code .. help!

Posted: Sat Mar 21, 2009 2:07 pm
by jayshields
Get rid of the closing angled bracket after <?php

Re: PHP code .. help!

Posted: Sat Mar 21, 2009 2:09 pm
by califdon
Bad: <?php>
The opening tag is just <?php

Re: PHP code .. help!

Posted: Sat Mar 21, 2009 2:19 pm
by p_sha85
thanks!! =)