Results 1 to 6 of 6

Thread: PHP if & else help needed

  1. #1
    Mr.Bill's Avatar
    Mr.Bill is offline One is glad to be of service
    Join Date
    Dec 2008
    Location
    Redmond, Oregon
    Posts
    828
    Blog Entries
    1
    Thanks
    72
    Thanked 350 Times in 182 Posts

    PHP if & else help needed

    I am looking for a way to show one line of text

    So something like this
    if url = https (show) "secure"
    else
    if url = http (show) "not secure"

    Anyone able to write a snippet that would do that?

    never mind I got it might be a better if there is please share

    Here is what I did

    PHP Code:

    <?php if ($_SERVER['HTTPS'] == 'on' ) { ?>
    You are all nice and secure from the mean people
    <?php } else { ?>
    Your butt is exposed and your are being watched
    <?php ?>

    Reverse IP Check ಠ_ಠ Proxy Sites
    <?php if ($youask == 'stupid question') { echo ('stupid answer'); } ?>

  2. #2
    LogicFlux is offline Newbie Net Builder
    Join Date
    Dec 2008
    Posts
    47
    Thanks
    13
    Thanked 17 Times in 17 Posts
    PHP Code:

    if ($_SERVER['HTTPS'] == 'on')
    {
      echo 
    'Secure<br />';
    }
    else
    {
      echo 
    'Not secure<br />';


  3. Thanked by:

    Will.Spencer (16 February, 2009)

  4. #3
    Mr.Bill's Avatar
    Mr.Bill is offline One is glad to be of service
    Join Date
    Dec 2008
    Location
    Redmond, Oregon
    Posts
    828
    Blog Entries
    1
    Thanks
    72
    Thanked 350 Times in 182 Posts
    Yeah, it all works thank you again. Can see the final out come here on this proxy

    Reverse IP Check ಠ_ಠ Proxy Sites
    <?php if ($youask == 'stupid question') { echo ('stupid answer'); } ?>

  5. #4
    elbandelero's Avatar
    elbandelero is offline Net Builder
    Join Date
    Dec 2008
    Location
    Spain
    Posts
    544
    Thanks
    209
    Thanked 105 Times in 79 Posts
    Quote Originally Posted by Mr.Bill View Post
    Yeah, it all works thank you again. Can see the final out come here on this proxy

    Very nice looking site you have there. Well done!

  6. #5
    stickycarrots's Avatar
    stickycarrots is offline Experienced Net Builder
    Join Date
    Dec 2008
    Location
    QuickInbox.com
    Posts
    753
    Blog Entries
    6
    Thanks
    18
    Thanked 86 Times in 59 Posts
    Quote Originally Posted by elbandelero View Post
    Very nice looking site you have there. Well done!
    I agree. Awesome looking site. Very nice work!

  7. #6
    jane0109 is offline Unknown Net Builder
    Join Date
    Feb 2009
    Posts
    8
    Thanks
    0
    Thanked 1 Time in 1 Post
    Well, both of them is good, but I would prefer the second one which uses single php statement with the echo thingy

Similar Threads

  1. Reg Exp Help needed
    By anantshri in forum Programming
    Replies: 1
    Last Post: 13 April, 2010, 10:48 AM
  2. [WTB] PR writer needed
    By phanirocks in forum Content
    Replies: 0
    Last Post: 10 March, 2010, 17:14 PM
  3. [WTB] DP A/c Needed
    By swift in forum Services
    Replies: 0
    Last Post: 9 September, 2009, 04:05 AM
  4. Adwords Help Needed
    By lethalboom in forum PPC
    Replies: 1
    Last Post: 8 July, 2009, 10:06 AM
  5. MSN SEO Guide needed
    By imported_nikon in forum Promoting
    Replies: 2
    Last Post: 20 June, 2009, 00:41 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •