Jump to content

Recommended Posts

 echo '<div id="thankyou_container" style=\\"text-align:left;padding:0px;\\">
<div id="container" style=\\"text-align:left;padding:0px;\\">' . ($_SESSION['iframe'] ? '<div id="logo_phone_menu"><img alt="logo" border="0" hspace="0" src="theme/' . $_SESSION['t'] . '/header.gif" vspace="0"/></div>' : '');

 

This code might have mistakes (since its not working).

I realize that it is supposed to print some variables on to the page.  But am new to PHP, and not sure about the question mark and colon thing.  Any references to simple tutorials on this would be helpful too.  thanks

as it says it seems like a thankyou container for a website that contains an iframe which will display certain code depending on the value and if that value is not what it is supposed to be then it will display nothing.

It uses ternary operators. But basically.. As far as I can see it echos a bit of HTML, which includes session variables. If they're logged in, then it displays the custom theme (note the absolute path).

 

That code is messy and not really supposed to be done that way, PHP variables should be wrapped in HTML not echo'd and escaped so much like so.

 

? is a ternary operator.

; is a new line.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.