Results 1 to 6 of 6

Thread: PHP if & else help needed

Hybrid View

  1. #1
    Join Date
    Dec 2008
    Location
    Redmond, Oregon
    Posts
    828

    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
    PHP Code:

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


  3. #3
    Join Date
    Dec 2008
    Location
    Redmond, Oregon
    Posts
    828
    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'); } ?>

  4. #4
    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!

  5. #5
    Quote Originally Posted by elbandelero View Post
    Very nice looking site you have there. Well done!
    I agree. Awesome looking site. Very nice work!

  6. #6
    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, 18: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
  •