I'm fairly new to PHP but i'm starting to get the hang of it.

I'm creating a new login and i'm using this
print l($user->edit account,'user/'.$user->uid);
with the user name going to the account options

My question is how do I change the script to read out" Edit Account" instead of showing the user name?

Thanks,
Greg
site: controlaltdelete.tv

Comments

nevets’s picture

This should do it, the 't' function call makes it translatable.

<?php
print l(t('Edit account'),'user/'.$user->uid);
?>
dfwgreg’s picture

in the script

print l(t('Edit account'),'user/'.$user->uid);

it goes to /?q=user/1, how do i make it go to /?q=user/1/edit?

thanks again,
greg

nevets’s picture

Here you code, link to edit instead of users node

<?php
print l(t('Edit account'),'user/'.$user->uid . '/edit');
?>
dfwgreg’s picture

never mind, gigured it out!

Thanks for the help,
Greg

dfwgreg’s picture

never mind, figured it out!

Thanks everyone for your help!

Greg