PHP code .. help!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
p_sha85
Forum Commoner
Posts: 30
Joined: Sat Mar 21, 2009 1:55 pm

PHP code .. help!

Post 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>
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: PHP code .. help!

Post by jayshields »

Get rid of the closing angled bracket after <?php
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: PHP code .. help!

Post by califdon »

Bad: <?php>
The opening tag is just <?php
p_sha85
Forum Commoner
Posts: 30
Joined: Sat Mar 21, 2009 1:55 pm

Re: PHP code .. help!

Post by p_sha85 »

thanks!! =)
Post Reply