Jump to content

Search the Community

Showing results for tags 'header'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

  1. Hi I've a created wordpress membership site using wishlist member plugin. But I want to have different header.php based on different logins. Eg: Users are: Print, Web and Free When Free user logs in - I want header1.php to load When Print user logs in - I want header2.php to load When Web user logs in - I want header3.php to load If nobody has logged in the default header.php stays. Please assist on how to do this. Regards, Raghav.
  2. Hello there! I'm such a beginner in php coding, i don't know the trick yet. My question is: I have a site, the main files are header.php; index.php; footer.php. I include header and footer in index php The index.php contains the articles, with tags. I want to pass the tags form articles to header.php as meta information. I get the tags from a database query. How can i do this method? Thanks: Robert
  3. Hey guys, So I have this really tricky problem with my login system. I get the cannot modify header information but I havent sent any output ? Here's the error log: [10-Nov-2012 09:38:25 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/sdelkata/public_html/login.php:1) in /home/sdelkata/public_html/login.php on line 16 [10-Nov-2012 09:38:25 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/sdelkata/public_html/login.php:1) in /home/sdelkata/public_html/login.php on line 17 and here's the login.php ( lines 16 and 17 are originally the setcookie lines ) <?php ob_start(); require("connect_db.php"); $email = mysql_real_escape_string($_POST['email']); $password = mysql_real_escape_string($_POST['password']); $msg=""; if (mysql_num_rows(mysql_query("SELECT `id` FROM `blabla` WHERE `email`='$email'"))==0){ $msg = "There is no user named ".wordwrap($email, 33, "<br />\n", 1); }elseif(mysql_num_rows(mysql_query("SELECT `id` FROM `blabla` WHERE `email`='$email' AND BINARY `password`='$password'"))==0){ $msg = "Wrong password!"; }else{ $id = mysql_result(mysql_query("SELECT `id` FROM `blabla` WHERE `email`='$email' AND `password`='$password'"),0); setcookie("dd", md5($id),time()+60*60*24*365*10); setcookie("ff", md5("1"), time()+60*60*24*365*10); sleep(2); echo "<script>document.location.reload(true)</script>"; } if($msg!=""){ sleep(2); echo "<div id='msgboxred'>$msg</div>"; include "login.html"; } ob_end_clean(); ?> I even added ob_start and ob_end_clean but it still gives me the error. What is weird tho is that it works on my 5.4.4 localhost testing server but doesn't work on the online hosting machine which has 5.3.15 ( php version ). Any help is really appreciated!
  4. I have a "save file" button for mp3 files on my site. I've never used the header() function before, so I'm not positive that I'm using it right here. It works perfectly on localhost. When I upload it to my web host it works, but it takes forever for the save dialog to appear. You click the save file button and nothing happens until 20+ seconds later, then the dialog appears. It seems that the browser is downloading the whole file before the save dialog appears, then after selecting a destination the download happens instantaneously. As I've said, I'm not too familiar with the header() function or how it works, so what can I do to pop up the save as dialog first? Here is the download.php <?php header('Pragma: public'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Cache-Control: public'); header('Content-Description: File Transfer'); header('Content-Type: application/force-download'); header('Content-Disposition: attachment; filename="'.basename($_GET['f']).'"'); header('Content-Transfer-Encoding: binary'); readfile($_GET["f"]); ?> Thanks!
  5. Hi. I am designing a CMS site, And in localhost, there are no errors even though error reporting is on and I can see many errors. But, " header already sent " are not visible, and when I uploaded my site online, I am starting to see all these errors. Is there something I am doing wrong with XAMPP?
  6. I have a page that contains both a login and registration form. I set the actions on the forms to be index.php#login and index.php#register so that if the form failed, the user would be taken down the form they were just working with. The problem I am running into is that a successful form completion either logs the user in or brings them to a screen letting them know that they need to verify their email and the #login or #register anchor is being included in the next page's URL. So a user visits my /login.php page, successfully logs in to the site, and sees the next page of /page.php#login instead of just /page.php I read though the manual for header() but didn't really see anything relevant to anchors being preserved or how to flush URL information. Is this information being stored somewhere by the browser and I can just purge it from memory? I was able to find this thread on StackOverflow, but my issue here is that I'm not listing the anchor (fragment as they call it) in the redirect. So according to one of the answers, it should get discarded. I've tried structuring the redirect in two different ways to see if anything can be done as well: header('Location: http://example.com/page.php'); header('Location: /page.php'); Any ideas here? Thanks.
×
×
  • 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.