Current location: Hot Scripts Forums » General Community » Script Requests » If statement using variables and includes


If statement using variables and includes

Reply
  #1 (permalink)  
Old 05-25-09, 06:33 AM
WBGene WBGene is offline
New Member
 
Join Date: May 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
If statement using variables and includes

Hi,

Sorry if this has been touched upon before. I searched quite a bit and either I am searchig the wrong terms or it just isn't there.

I have a Wordpress MU blog network. I need a script to do the following -

If username = this one
than include this txt file

if username = this one
than include this txt file

I have tried a couple different ways to accomplish this, but none have worked. I am not sure what i am doing wrong.

Any help you can give me would be much appreciated.

Thanks,
Gene
Reply With Quote
  #2 (permalink)  
Old 05-26-09, 10:41 AM
bizzar528's Avatar
bizzar528 bizzar528 is offline
Community Liaison
 
Join Date: Sep 2004
Location: Pennsylvania, US
Posts: 1,550
Thanks: 2
Thanked 16 Times in 15 Posts
I guess the obvious question is, what have you tried?

Generally, this should be pretty easy to accomplish just by checking for the session username (isset or not also), and then just adding some php code to pull it off. However, I know this can be tricky since the problem of pathing for a website like WP does trip people up, I recommend using the full path to the file to include.

Other than that, it's trial and error.
Reply With Quote
Reply

Bookmarks

Tags
if else, if statement, if then, variable


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 09:27 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.