Hi there,
i have this code:
<?php if ( $user_ID ) {
<div id='changepicture'>
<a class='changepicture' href='#'>
echo "Change Picture";
}
?>
</a>
</div>
However, i have the div style still remains on the site.
How can i wrap this around the div aswell? When i try it, it conflicts with the '"' speechmarks.
You can't just place HTML into PHP like you've done above..
Try this..
<?php if ( $user_ID ) { ?>
<div id='changepicture'>
<a class='changepicture' href='#'> Change Picture</a>
</div>
<?php } ?>
...not sure that's what you were aiming for, i just fixed the code for you... ;)
ah ok, thank you so much.
I just had a mental glitch and forgot that.
Thank you, i have learnt something :-)
Some addition: switch $user_ID to is_user_logged_in()
Same thing but much clearer. :P