Thread: Echo and If
View Single Post
  #2 (permalink)  
Old Aug 27th, 2007, 15:09
alexgeek's Avatar
alexgeek alexgeek is offline
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,793
Blog Entries: 9
Thanks: 0
Thanked 2 Times in 2 Posts
Re: Echo and If

Quote:
Originally Posted by simonb View Post
I have this code on my site. If you are logged in you see ""Logged in stuff"
and if not you see "login"

PHP: Select all

<?php if (isset($_SESSION['MM_Username'])) { 
echo(
"Logged in stuff"); 
} else {
eecho ("login");
 
?>
Here is the problem. I want links in there a form. If I add code i get this error

try this:
PHP: Select all

<?php
 
if (isset($_SESSION['MM_Username'])) { 
echo 
"Logged in stuff"
} else {
echo 
"login";
}
 
?>
Reply With Quote