Jump to content

aminnuto

Members
  • Posts

    23
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

aminnuto's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ok, i figured something out. it has to go before the <html> tag in my .php file. BUT, i need it to go within the body of my page. how do i do that?
  2. correction, this code gives me the same result. works fine when on a page with no other php code. <?php session_start(); header("Cache-control: private"); // IE6 Fix for Sessions ob_start(); ?> <?php if(isset($_SESSION['box'])) { } else { include('/home/main/www/inc/box.inc'); $_SESSION['box'] = "value"; } ?> but when i put it on a page with other php code, it does this. Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/main/public_html/phppage.php: in /home/main/public_html/phppage.php on line 13 Warning: Cannot modify header information - headers already sent by (output started at /home/main/public_html/phppage.php: in /home/main/public_html/phppage.php on line 15
  3. I'm missing something. <?php if(isset($_SESSION['box'])) { } else { include('/home/main/www/inc/box.inc'); $_SESSION['box'] = "value"; } ?> It shows the box.inc file every time the page is loaded.
  4. I have an empty php file with this code in it. <?php session_start(); if ($_SESSION['box']) { } else { include('/home/maine/www/inc/box.inc'); $_SESSION['box'] = "value"; } ?> and this page works perfectly. Its supposed to check for the session cookie and if its not set, show this file, but if it is set, dont show the file. BUT, when i insert this code on to the pages through website, they all show this error. Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/main/public_html/page.php: in /home/main/public_html/page.php on line 13 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/main/public_html/page.php.php: in /home/main/public_html/page.php on line 13 None of the other pages set a cookie. So, the code works when its by itself, (on its own blank filename.php page but when I put it on anyother.php file page, i get this error. Anyone know how to get around this?
  5. nevermind. i figured it out. thanks for your help.
  6. define it? I need the exact code to put in my php file.
  7. I'm missing something. This is the code in my php file <?php session_start(); if(isset($_SESSION[special])){ include('/home/main/www/events/inc/SPECIAL1.inc'); } ?> but it shows a blank page.
  8. I'm a novice.. How would I insert this code into that code <?php require("/home/main/www/events/inc/SPECIAL1.inc"); ?> I want this code to print to the .php file if the cookie is not set. If it is set, do nothing.
  9. let me clarify because I am also going to use this code to display other include files that are not popups... I need code that will set a session cookie that will display an .inc file if the session cookie is not set. If it is set, do nothing.
  10. I have a file (in an include file) that I want to put on each webpage on my site. It loads a javascript hover window. BUT, I only want it to show up on the first page that a person sees when they come to my site (not necessarily the home page). Once they see the box, I dont want them to see it again as they navigate to through my site, but i want to make sure they see it at least once when they come to my site so i want to put it on each page. That way, when a search engine sends them to one page on my site, they see it but wont see it on every page they go to after that. I need code (i'm guessing a session cookie) that will print my include file if the session has not been set. Once its been set, do nothing. Does anyone know how I can do this?
  11. I just used a perl script counter and set it to countdown instead of count up. thanks anway
  12. could i just use a counter script which decends rather then acends?  then i can put it into an inc file and display that on my page.
  13. I have one php file and i want to show that there are 20 units available of a product.  but every time that product is purchased, i want to display how many units are left. How do i make a countdown counter where a number is displayed on a page and each time someone goes through to my sold page, the counter decends 1.
×
×
  • 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.