Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: Function Help

Started 1 month, 2 weeks ago by chris2403
Hi, I Have a wordpress blog and when i use the following code to get the id of a specific user: PHP Code: <?php $user = get_userdatabylogin ( Chris ); echo $user -> userid ; ?> it works and i get the correct value, which in this case is 1, printed on the page. what i need to do is use a variable to define the username, ive...
Site: WebDeveloper.com  WebDeveloper.com - site profile
Forum: PHP  PHP - forum profile
Total authors: 2 authors
Total thread posts: 3 posts
Thread activity: no new posts during last week
Domain info for: webdeveloper.com

Other posts in this thread:

aj_nsc replied 1 month, 2 weeks ago
php.net is a big help ( http://www.php.net/define ) When you use the define function, you don't define a variable, you define a constant, so simply take the $ away from in front of $author_name in all parts of your script and it will work.

chris2403 replied 1 month, 2 weeks ago
ahh, that explains a lot. thanks, working now

 

Top contributing authors

Name
Posts
chris2403
2
user's latest post:
Function Help
Published (2009-11-08 20:22:00)
ahh, that explains a lot. thanks, working now
aj_nsc
1
user's latest post:
Function Help
Published (2009-11-08 20:10:00)
php.net is a big help ( http://www.php.net/define ) When you use the define function, you don't define a variable, you define a constant, so simply take the $ away from in front of $author_name in all parts of your script and it will work.

Related threads on "WebDeveloper.com":

Related threads on other sites:

Thread profile page for "Function Help" on http://www.webdeveloper.com. This report page is a snippet summary view from a single thread "Function Help", located on the Message Board at http://www.webdeveloper.com. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity