Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

PHP cookie problem

  • 19-03-2005 2:35pm
    #1
    Closed Accounts Posts: 22,479 ✭✭✭✭


    When I use this command to set a cookie when you login
    <?php
    if ($pass == ****) {
    
      setcookie("admin", 1);
     
        echo "You have logged in successfully!! You will be redirected to the posting area in 3 seconds!";
    
    } 
    else {
      
    echo " You have entered the incorrect password!! You will be redirected in 3 seconds!"; 
    
    }
    ?> 
    

    It always gives me this error below
    Warning: Cannot modify header information - headers already sent by (output started at /home/jakkass/public_html/thebuilder/createcookie.php:4) in /home/jakkass/public_html/thebuilder/cookiestuff.php on line 4
    

    could any1 tell me what to do to fix this


Comments

  • Registered Users, Registered Users 2 Posts: 1,481 ✭✭✭satchmo


    If you want to output headers to the webpage, you can't have printed anything to the page beforehand or you'll get that error message. You have to print headers first (cookies, content-description etc, session_start() and so on), and then start printing html. What are you doing at line 4 of createcookie.php?


  • Closed Accounts Posts: 22,479 ✭✭✭✭philologos


    im adding images to the page


  • Closed Accounts Posts: 22,479 ✭✭✭✭philologos


    <div style="position: absolute; width: 785px; height: 864px; z-index: 1; left: 10px; top: 15px; background-color: rgb(0, 0, 0);" id="layer1">
    <img src="index_files/banner.JPG" border="0" height="83" width="785">
    <img src="index_files/home.JPG" border="0" height="20" width="117"><img src="index_files/contact.JPG" border="0" height="20" width="117"><p align="center">
    <img src="index_files/images.jpg" border="0" height="106" width="141"><img src="index_files/images2.jpg" border="0" height="106" width="144"><img src="index_files/images5.jpg" border="0" height="106" width="149"><img src="index_files/images7.jpg" border="0" height="107" width="142"><img src="index_files/images8.jpg" border="0" height="108" width="156"></p>
    <br> <?


  • Closed Accounts Posts: 22,479 ✭✭✭✭philologos


    never mind fixed problem thanx


Advertisement