Zubrag.com
October 19, 2018, 01:59:38 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: adding login form to existing page problem  (Read 7111 times)
pipedragon72
Newbie
*
Posts: 1


« on: April 22, 2010, 06:43:33 AM »

I've made the login form successfully and it works but when I try and add the code to an existing page so form sites on the right hand column it won't work, saying:

Warning: Cannot modify header information - headers already sent by (output started at /home/sites/XXX.co.uk/public_html/pwd/index.php:Cool in /home/sites/XXX.co.uk/public_html/pwd/index.php  on line 191

Is it possible to incorporate the login form with a page already set up and also possible to just show a password box rather than both user name and password?

thanks for any ideas anyone!

Logged
zubrag
Administrator
Hero Member
*****
Posts: 788


WWW
« Reply #1 on: April 22, 2010, 09:09:18 AM »

It says that password protection code (<?php ....login.php ... ?>) was not placed at the top of the file. It must be placed at the very beginning, the first line. In your case /home/sites/XXX.co.uk/public_html/pwd/index.php outputs something at line 8.

To just show a password box, update settings.php, this code:

// request login? true - show login and password boxes, false - password box only
define('USE_USERNAME', true);
Logged
wpatters1229
Newbie
*
Posts: 1


« Reply #2 on: June 07, 2010, 02:24:28 PM »

I ran the help and took the include file and added it at the very top above the doctype declaration and nothing happens with the page at http://www.developmentbaseball.com/sitemap.php 
Can someone look at it? 
This is a test page before I try it on the page I want.  I put the password_protect file in the root of the site.
Logged
zubrag
Administrator
Hero Member
*****
Posts: 788


WWW
« Reply #3 on: June 07, 2010, 03:41:21 PM »

I see login/password prompt when i open it. Do you see something else?
Logged
Alisa
Newbie
*
Posts: 2


« Reply #4 on: June 18, 2010, 09:04:49 PM »


I REALLY need help with this also.
My protected page is 'Getting Started.php'

Editing with notepad, when I put the code at the very top of the page, I get this error:

Warning: Cannot modify header information - headers already sent by (output started at /home/insomni7/public_html/Getting-Started.php:1) in /home/insomni7/public_html/borek/login.php on line 67

Here is the top portion of my protected page file:
--------------------------------------------------------
<?php include("/home/insomni7/public_html/borek/login.php"); ?>
<?php echo '<?xml version="1.0" encoding="utf-8"?>'; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Insomnia Marketing Group, LLC</title>
<meta http-equiv="Content-Type" content="text/html; charset =utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="generator" content="Rvglobalsoft" />..........................
-------------------------------------------------------------------

Help PLEASE!!!
Alisa
Logged
Alisa
Newbie
*
Posts: 2


« Reply #5 on: June 18, 2010, 09:18:18 PM »


I figured it out after much hard work.  It was a very simple fix actually.

I downloaded my protected page and opened it with notepad again.  This time, I did a 'save as' and changed the encoding to ANSI.

Reuploaded the protected page, and no longer getting that error.

Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC