6 Replies - 1472 Views - Last Post: 08 January 2002 - 06:19 PM Rate Topic: -----

#1 Muskan Messenger  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 109
  • Joined: 04-January 02

PHP Help...

Posted 04 January 2002 - 09:43 PM

Well, I'm rather new to PHP, and I have some questions about switches in switches. How would I do a subswitch that would allow to have almost like a separate moderator profile, like index.php?p=mods&mod=username
I can do it, but I always get the text from both showing up on the second. For example, if I put "Test" in the first echo for the mods page, and I put test name in the username echo, on the first page I get "Test", like I wanted, but on the second page I get "Testtest name"
How would I make it so ONLY "test name" is on the second page, and JUST "test" is on the first? Thanks.

Is This A Good Question/Topic? 0
  • +

Replies To: PHP Help...

#2 The Neoracle  Icon User is offline

  • Check, check, 1, 2.
  • member icon

Reputation: 21
  • View blog
  • Posts: 4,097
  • Joined: 30-March 01

Re: PHP Help...

Posted 07 January 2002 - 07:58 PM

I'm totally not following what you are doing. Can you give more background info as to what the project is?
Was This Post Helpful? 0
  • +
  • -

#3 Muskan Messenger  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 109
  • Joined: 04-January 02

Re: PHP Help...

Posted 07 January 2002 - 08:03 PM

I'm trying to make a personal profile page for my CB team, totally away from the forums. I was making the profile pages (e.g. index.php?p=profile&user=blah) I understand everything, but my swithces are messed.
Was This Post Helpful? 0
  • +
  • -

#4 The Neoracle  Icon User is offline

  • Check, check, 1, 2.
  • member icon

Reputation: 21
  • View blog
  • Posts: 4,097
  • Joined: 30-March 01

Re: PHP Help...

Posted 07 January 2002 - 08:50 PM

Well, are you using If, Else statements?  It seems like your using the wrong kind of "switch" and both are true so it's printing both.
Was This Post Helpful? 0
  • +
  • -

#5 Muskan Messenger  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 109
  • Joined: 04-January 02

Re: PHP Help...

Posted 08 January 2002 - 07:40 AM

Yeah it's printing both, and thats what I don't want....how would I fix that?
Was This Post Helpful? 0
  • +
  • -

#6 The Neoracle  Icon User is offline

  • Check, check, 1, 2.
  • member icon

Reputation: 21
  • View blog
  • Posts: 4,097
  • Joined: 30-March 01

Re: PHP Help...

Posted 08 January 2002 - 09:11 AM

You want to use an if. . . else statement.  
ie

if $foo=1 (
echo (yes)
)
else if $foo=0 (
echo (no)
)

hope that helps.  I'm not sure that's proper syntax, you will obviously need to adapt it to your project.

Was This Post Helpful? 0
  • +
  • -

#7 Muskan Messenger  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 109
  • Joined: 04-January 02

Re: PHP Help...

Posted 08 January 2002 - 06:19 PM

Thanks :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1