Jump to content

jesserules

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jesserules's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. to place header() anywhere, start the whole page with the following: [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--] [span style=\"color:#0000BB\"]<?php ob_start[/span][span style=\"color:#007700\"](); [/span][span style=\"color:#0000BB\"]?> [/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] and end it with this: [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--] [span style=\"color:#0000BB\"]<?php ob_end_flush[/span][span style=\"color:#007700\"](); [/span][span style=\"color:#0000BB\"]?> [/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--]
  2. first of all, it's not $HTTP_COOKIE_VARS['$iVoted'], its without a dollar sign ($HTTP_COOKIE_VARS['iVoted']) unless thats what the var is called. also, i think some PHP versions would use $_COOKIES['iVoted'] or just $iVoted without anything else. im not sure if thats the problem, but i've had problems with cookies before, and i realized i had to use just the var name, without $_COOKIES or $HTTP_COOKIE_VARS. try it and see if it works.
  3. if you want to display an image depending on a var, do it like this: [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--] [span style=\"color:#0000BB\"]<?php $image [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"image.jpg\"[/span][span style=\"color:#007700\"]; echo [/span][span style=\"color:#DD0000\"]\"<img src=$image>\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]?> [/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] the reason you do it like this is that PHP outputs in the form of HTML. in HTML typing in <img src=image.jpg> will include the image, so that's how you do it in PHP.
×
×
  • 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.