[PHP-DB] Header, Directory, and SESSIONs

2003-06-21 Thread nabil
Hi all, wish u all a good weekend..
Guys I have a question as the following:

1- In my wwwroot I have two folders : folder1  and folder2 (actually I have
14 folders)
2- In the same two folders there are same PHP files do the same job, as db
jobs with different databases..
3- I log in the users by register a session, lab lab lab ... etc
4- the logging files in the two folders are different by registering a
different session value.
4- I want if any user jumped to the other directory and logged in with the
correct requested password TO HAVE THE FIRST SESSION UNREGISTERED
automatically, so he can't be logged in in both at same time.. and keep only
the new.. and ofcourse have to re logging if he jumped back to the first
one...
 (the reason that every folder has different DB connection, and the
interface of the two section are identical.. so I need to split it .to avoid
any problems with many users )

5- what I m trying to do is , if there is a possibility to control the
header.. by if { /folder1 go } else { unregister session whatever}
if {/ folder2 .. } else {.} etc

6- IS IT A GOOD WAY TO DO IT , OR NOT? of cource I need a security in the
first place..

I HOPE I WAS CLEAR, and thanks for your patient again...   :))
(sorry because it might be shouldn't in db list)
Regards
Nabil

--
open source world, open mind for all



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] header?

2003-01-19 Thread Addison Ellis
hello,
	i have a page where the user selects a category. they are 
directed to a page that takes them to subactegory and displays the 
subcategory according to category id.
	my question is can i from there direct them to a particular 
page from a list of a number of different pages according to their 
subcategory choice? my thought was to direct them to one page that 
contains all the relations between category and subcategory and if 
subcategory=id where category=$category then include or header 
example.php.
	i wasn't even sure about that.
	anyway... thank you for your time and thoughts. best, addison
--
Addison Ellis
small independent publishing co.
114 B 29th Avenue North
Nashville, TN 37203
(615) 321-1791
[EMAIL PROTECTED]
[EMAIL PROTECTED]
subsidiaries of small independent publishing co.
[EMAIL PROTECTED]
[EMAIL PROTECTED]

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] header

2002-09-05 Thread Devrim GUNDUZ


Hi Meltem,

On Thu, 5 Sep 2002, Meltem Demirkus wrote:

  hi,
 I am new on php  Just want to know I am using mysql and php on a page ..
 and after the page do what it should do , I want it to go to another
 page..so I though  about using header (Location:...)  but it is giving
 error message  iii..

Be sure that your code produces no output before header line.

HTH

-- 

Devrim GUNDUZ

[EMAIL PROTECTED] Tel  : (312) 295 9318
[EMAIL PROTECTED]  Faks : (312) 295 9494

Web : http://devrim.oper.metu.edu.tr
-



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] header

2002-09-05 Thread Meltem Demirkus

I tried but it gave this error

Warning: Cannot add header information - headers already sent by (output
started at C:\FoxServ\www\debugger\project_module\start_html.php:5) in
C:\FoxServ\www\debugger\project_module\project_add_.php on line 11

start_html.php  file includes:

? include(defaults.php) ?
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 3.2 Final//EN
HTML
HEAD
TITLE? echo $page_title ?/TITLE
META http-equiv=Content-Type content=text/html; charset=windows-1254
/HEAD
BODY

There is no output but it is sayin there is an output?...

thanks alot ..
meltem demirkus


- Original Message -
From: Devrim GUNDUZ [EMAIL PROTECTED]
To: Meltem Demirkus [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, September 05, 2002 2:38 PM
Subject: Re: [PHP-DB] header



 Hi Meltem,

 On Thu, 5 Sep 2002, Meltem Demirkus wrote:

   hi,
  I am new on php  Just want to know I am using mysql and php on a
page ..
  and after the page do what it should do , I want it to go to another
  page..so I though  about using header (Location:...)  but it is giving
  error message  iii..

 Be sure that your code produces no output before header line.

 HTH

 --

 Devrim GUNDUZ

 [EMAIL PROTECTED] Tel  : (312) 295 9318
 [EMAIL PROTECTED] Faks : (312) 295 9494

 Web : http://devrim.oper.metu.edu.tr
 -





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] header

2002-09-05 Thread Martin Adler

That's wrong!!!

the output starts erlier
everything and i mean realy everything outside ? ... ? is
output!!!
remember that
it's php native behavior to send stuff outside ? .. ? to the client
with the standard header for plain text

greet
Martin

- Original Message -
From: Devrim GUNDUZ [EMAIL PROTECTED]
To: Meltem Demirkus [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, September 05, 2002 2:08 PM
Subject: Re: [PHP-DB] header



 Hi,

 On Thu, 5 Sep 2002, Meltem Demirkus wrote:
 
  Warning: Cannot add header information - headers already sent by (output
  started at C:\FoxServ\www\debugger\project_module\start_html.php:5) in
  C:\FoxServ\www\debugger\project_module\project_add_.php on line 11
 
  start_html.php  file includes:
 
  ? include(defaults.php) ?
  !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 3.2 Final//EN
  HTML
  HEAD
  TITLE? echo $page_title ?/TITLE
  META http-equiv=Content-Type content=text/html;
charset=windows-1254
  /HEAD
  BODY

 Check the error: Warning: Cannot add header information - headers already
 sent by (output started at
 C:\FoxServ\www\debugger\project_module\start_html.php:5) ;

 let's check line 5:

 TITLE? echo $page_title ?/TITLE

 this is an output.

 Best regards.
 --

 Devrim GUNDUZ

 [EMAIL PROTECTED] Tel  : (312) 295 9318
 [EMAIL PROTECTED] Faks : (312) 295 9494

 Web : http://devrim.oper.metu.edu.tr
 -





 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] header function

2002-07-16 Thread Gary . Every

You'll have to get rid of ALL html, including the BR in your code below.

Gary Every
Sr. UNIX Administrator
Ingram Entertainment
(615) 287-4876
Pay It Forward
mailto:[EMAIL PROTECTED]
http://accessingram.com


-Original Message-
From: Mohammad Forouhar-Fard [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 15, 2002 4:51 PM
To: 'Steve Cayford'
Cc: [EMAIL PROTECTED]
Subject: AW: [PHP-DB] header function


Nothing it is only header function.
No I don't have anything outside.
In this case  I am connected to the DB.

if($v_action ==delete){
$DBquery($cfgDB[data],UPDATE $cfgTbl[accounts] SET acc_service='' WHERE
acc_id='$v_id') or die(cannot
UPDATE$cfgTbl[accounts]:br.mysql_error());
header(Location: list.php?message='T');
}

-Ursprüngliche Nachricht-
Von: Steve Cayford [mailto:[EMAIL PROTECTED]] 
Gesendet: Montag, 15. Juli 2002 23:18
An: Mohammad Forouhar-Fard
Cc: [EMAIL PROTECTED]
Betreff: Re: [PHP-DB] header function

What's on line 3 of Auth_user.php ?

If you have anything outside of the ?php ... ? tags it will start the 
html output. Even just an empty line.

-steve

On Monday, July 15, 2002, at 04:09  PM, Mohammad Forouhar-Fard wrote:


 Hi,
 I have a problem with   function  header(Location:xy.php?var=2).
  I have not any text (print echo or display any text) at all before I
 set a cookie
 If I try to execute this function of Apache server in my Company it is
 all OK. But if I try to run at home I have even the same error
 Cannot add header information - headers already sent by (output
started
 at
 C:\httpd\HTDOCS\Auth_user.php on line 3
 Can somebody help my I have at home  this configuration:
 I have Winxp  OmniHTTPd/2.09 Server.




 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Header problem

2002-07-15 Thread Dave Carrera

Hi All
 
My isp decided to upgrade to 4.2.1 without letting us know?
 
So recoded scripts with new $_VARS in place but one thing refuses to
work
 
I have in my script a call to header location.
 
header( Location: ./file.php);
 
Works on my system but not on theirs
 
I have 4.21 also.
 
Is there anything new with header location that I haven't heard of?
 
Any help is most appreciated.
 
Dave C



Re: [PHP-DB] Header problem

2002-07-15 Thread Paul Burney

on 7/15/02 5:09 AM, Dave Carrera at [EMAIL PROTECTED] appended the
following bits to my mbox:

 I have in my script a call to header location.
 
 header( Location: ./file.php);
 
 Works on my system but not on theirs

Not really database related so it should be on php-general.

FWIW, I believe that the location needs to include the scheme and FQDN,
i.e., http://example.com/file.php

Some browsers (notably Lynx) complain or don't work with relative Location
headers.  It's also possible that the . is causing a problem.

Sincerely,

Paul Burney
http://paulburney.com/

?php
while ($self != asleep) {
$sheep_count++;
}
?



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] header function

2002-07-15 Thread Mohammad Forouhar-Fard


Hi,
I have a problem with   function  header(Location:xy.php?var=2).
 I have not any text (print echo or display any text) at all before I
set a cookie
If I try to execute this function of Apache server in my Company it is
all auf OK. But if I try to run at home I have even the same error 
Cannot add header information - headers already sent by (output started
at 
C:\httpd\HTDOCS\Auth_user.php on line 3
Can somebody help my I have at home  this configuration:
I have Winxp  OmniHTTPd/2.09 Server.




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] header function

2002-07-15 Thread Steve Cayford

What's on line 3 of Auth_user.php ?

If you have anything outside of the ?php ... ? tags it will start the 
html output. Even just an empty line.

-steve

On Monday, July 15, 2002, at 04:09  PM, Mohammad Forouhar-Fard wrote:


 Hi,
 I have a problem with   function  header(Location:xy.php?var=2).
  I have not any text (print echo or display any text) at all before I
 set a cookie
 If I try to execute this function of Apache server in my Company it is
 all auf OK. But if I try to run at home I have even the same error
 Cannot add header information - headers already sent by (output started
 at
 C:\httpd\HTDOCS\Auth_user.php on line 3
 Can somebody help my I have at home  this configuration:
 I have Winxp  OmniHTTPd/2.09 Server.




 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




AW: [PHP-DB] header function

2002-07-15 Thread Mohammad Forouhar-Fard

Nothing it is only header function.
No I don't have anything outside.
In this case  I am connected to the DB.

if($v_action ==delete){
$DBquery($cfgDB[data],UPDATE $cfgTbl[accounts] SET acc_service='' WHERE
acc_id='$v_id') or die(cannot
UPDATE$cfgTbl[accounts]:br.mysql_error());
header(Location: list.php?message='T');
}

-Ursprüngliche Nachricht-
Von: Steve Cayford [mailto:[EMAIL PROTECTED]] 
Gesendet: Montag, 15. Juli 2002 23:18
An: Mohammad Forouhar-Fard
Cc: [EMAIL PROTECTED]
Betreff: Re: [PHP-DB] header function

What's on line 3 of Auth_user.php ?

If you have anything outside of the ?php ... ? tags it will start the 
html output. Even just an empty line.

-steve

On Monday, July 15, 2002, at 04:09  PM, Mohammad Forouhar-Fard wrote:


 Hi,
 I have a problem with   function  header(Location:xy.php?var=2).
  I have not any text (print echo or display any text) at all before I
 set a cookie
 If I try to execute this function of Apache server in my Company it is
 all OK. But if I try to run at home I have even the same error
 Cannot add header information - headers already sent by (output
started
 at
 C:\httpd\HTDOCS\Auth_user.php on line 3
 Can somebody help my I have at home  this configuration:
 I have Winxp  OmniHTTPd/2.09 Server.




 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Header error

2001-06-29 Thread Johannes Janson

Hi,

[...]
 Warning: Cannot add header information - headers already sent by (output
 started at /home/thesis/public_html/registro.php:2) in
 /home/thesis/public_html/registro.php on line 80
[...]

you can't have any output before calling header(). Output is any HTML or
even
whitespaces before the opening ?php-tag. You'll have to move the header
before
line 2.

cheers
Johannes




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Header error

2001-06-29 Thread Wilmar Pérez

Hello guys

Thanks very much for your help on the ADODB error, I have already fix it.
Now I've got another weird message.   When I send data to the DataBase from
a form, it does store the data but sends me back the following response:
***
Warning: Cannot add header information - headers already sent by (output
started at /home/thesis/public_html/registro.php:2) in
/home/thesis/public_html/registro.php on line 80
***
I checked line 80 and there is a closing parenthesis in there.

Any idea?

Thanks a lot for your help.
---
Wilmar Pérez
 IT Manager - Central Library
 University of Antioquia
   Medellín - Colombia
  tel: ++57(4)2105145
---


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Header() order

2001-04-06 Thread Lisa Elita

Hi all,

Do you know the header() order?
For example: header("Set-Cookie") should come before/after
header("Location")?
Cause IE seems to be sensitive about this.

Thanks,
Lisa E.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Header() order

2001-04-06 Thread Boget, Chris

 Do you know the header() order?
 For example: header("Set-Cookie") should come before/after
 header("Location")?
 Cause IE seems to be sensitive about this.

Cookies need to come first.

Chris



[PHP-DB] header-ache

2001-01-25 Thread Leo Kuiper

Ok I'm kinda new to this list so I'm very sorry for those who've heard this
question a million times.

How to get binary data (jpg file?) AND text from a database, BUT display it
on the same page?
I know the header-content-type blocks all this (either display text or jpg),
but there must be some way to do it, right?

(can you use two types (text and jpg) in the header, and choose between them
when you want? just a wild guess. or do I just have do it in a totally other
way?)

thanks, leo


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] header-ache

2001-01-25 Thread php3

Addressed to: "Leo Kuiper" [EMAIL PROTECTED]
  [EMAIL PROTECTED]

** Reply to note from "Leo Kuiper" [EMAIL PROTECTED] Thu, 25 Jan 2001 13:06:53 
+0100

 Ok I'm kinda new to this list so I'm very sorry for those who've
 heard this question a million times.

 How to get binary data (jpg file?) AND text from a database, BUT
 display it on the same page? I know the header-content-type blocks
 all this (either display text or jpg), but there must be some way to
 do it, right?

 (can you use two types (text and jpg) in the header, and choose
 between them when you want? just a wild guess. or do I just have do
 it in a totally other way?)

1.  When you get the text out of the db, write the image to a temp
file, and send the name of the temp file in the IMG tag.  Be
sure to close the temp file before you send the html.  Don't forget to
garbage collect the temp files when you are done with them. You can't
do it in the program that creates them.


2.  Use two separate programs.  One gets the text, the other
masquerades as a .jpg file, and does another SELECT on the database and
returns the image.  You can call it like:

   IMG src="getimage.php?show=1234"


3.  Don't bother putting the images in the database at all.  The web
server is designed to get images from the file system, and does it
well.


1 sucks, 2 is better, 3 is probably the best solution.




Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]