logo-dw

Go Back   Dreamweaver Club Forums > Dreamweaver forums > Dreamweaver General
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 05-02-2015, 04:18 AM   #1
theowls
 
Join Date: Feb 2015
Posts: 10
Default My Account

On my menu I have "My Account", now I would like this to be invisible until the user has logged on. This my code for the menu:-
<div class="menubar">
<ul id="menu">
<li><a href="index.php">Home</a></li>
<li><a href="all_products.php">All Products</a></li>
<li><a href="customer/my_account.php">My Account</a></li>
<li><a href="customer_register.php">Sign Up</a></li>
<li><a href="cart.php">Shopping Cart</a></li>
<?php
if(!isset($_SESSION['customer_email'])){
echo "<a href='checkout.php' style='colorrange;'>Login</a>";
}
else {
echo "<a href='logout.php' style='colorrange;'>Logout</a>";
}
?>
<li><a href="checkout.php">Checkout</a></li>
<li><a href="contact_us.php">Contact Us</a></li>
<li><a href="admin_area/index.php">Admin</a></li>
</ul>
</div>
Could someone help me achieve this please?
Thanks in advance
theowls is offline   Reply With Quote
Old 05-02-2015, 07:55 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

if(isset($_SESSION['customer_email'])){
echo "......the <li>. With my account";
}
Sorry I'm using a headphone so not easy to write full code
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 05-02-2015, 10:37 PM   #3
theowls
 
Join Date: Feb 2015
Posts: 10
Default

Thanks edbr for your reply, but i really don't understand it, plus your headphone quote has thrown me..sorry
theowls is offline   Reply With Quote
Old 05-04-2015, 01:08 AM   #4
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

haha no problem i meant handphone but predictive text

Code:
if(isset($_SESSION['customer_email'])){
echo "<li><a href="customer/my_account.php">My Account</a></li>";
}
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:25 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com