Noob looking for some help with first useful piece of code
Posted: Sat Nov 22, 2003 2:30 pm
Hi,
I just started playing around with PHP about, 45 minutes ago and, seeing as im the kind of person who wants to learn what wrong with my code, (even if the code itself is useless) i posted here to see if someone could tell me what im doing wrong, so i dont make the mistake again.
Heres the code:
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php
$str = "Your using Inet Explorer<br />"
if (strstr($_SERVER["HTTP_USER_AGENT"], "MSIE")) {
$strtoupper($str);
print $str
}
?>
</body>
</html>
Heres the error:
Parse error: parse error, unexpected T_IF in C:\sokkit\site\test.php on line 8
I have little programming experince although I can code pretty fairly in VB.
Thanks
Lotmr
I just started playing around with PHP about, 45 minutes ago and, seeing as im the kind of person who wants to learn what wrong with my code, (even if the code itself is useless) i posted here to see if someone could tell me what im doing wrong, so i dont make the mistake again.
Heres the code:
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php
$str = "Your using Inet Explorer<br />"
if (strstr($_SERVER["HTTP_USER_AGENT"], "MSIE")) {
$strtoupper($str);
print $str
}
?>
</body>
</html>
Heres the error:
Parse error: parse error, unexpected T_IF in C:\sokkit\site\test.php on line 8
I have little programming experince although I can code pretty fairly in VB.
Thanks
Lotmr