[PHP-DB] HTTP_SESSION_VARS Question

2001-09-24 Thread Jason Caldwell

I'm trying to use HTTP_SESSION_VARS all over my scripts for security
reasons.  However, for some reason, when I do the following the var isn't
updated in the session file... anyone know why?

session_start();
session_register(s_myvar);

$HTTP_SESSION_VARS[s_myvar] = 1;

If I assign the value to just the var it works fine.

$s_myvar = 1;

Thanks.
Jason



-- 
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] Solved! -- Buuuuttt.

2001-09-24 Thread Jason Caldwell

In the PHP.INI file I had to set REGISTER_GLOBALS = off

The Vars are registering -- but not with an INCLUDE file or FUNCTION
plus, my INPUT tag data (vars) aren't coming over...

What the #%#^ is go'in?

Very frustrating any help would be greatly appreciated.

Thanks
Jason



Jason Caldwell [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I'm trying to use HTTP_SESSION_VARS all over my scripts for security
 reasons.  However, for some reason, when I do the following the var isn't
 updated in the session file... anyone know why?

 session_start();
 session_register(s_myvar);

 $HTTP_SESSION_VARS[s_myvar] = 1;

 If I assign the value to just the var it works fine.

 $s_myvar = 1;

 Thanks.
 Jason





-- 
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] adding the results of a number of calls to mysql_query

2001-09-24 Thread Cable, Christian

system:
win NT4 server (IIS4, php4)

Problem:
I'm writing a web front end to an old in house access database with tables
split over years
(rather than the row having what year it's in)

i.e.

table00_01 table 99_98 etc etc

ideally I'd like to run the same query against each table and the fetch rows
form it the result of
all the queries.

any ideas on how I can do this ?

with thanks

Christian


Christian Cable
ICT Assistant
Careers Service; Lancaster University
Tel: (01524) 594072  Fax: (01524) 592072
http://www.lancs.ac.uk/staff/cable/



-- 
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] adding the results of a number of calls to mysql_query

2001-09-24 Thread Russ Michell

If I have the right end of the stick you want:

SELECT * FROM table99_98,table00_01 WHERE table99_98.foo='$bar' AND 
table00_01.foo='$bar';

Russ


On Mon, 24 Sep 2001 10:50:02 +0100 Cable, Christian [EMAIL PROTECTED] wrote:

 system:
 win NT4 server (IIS4, php4)
 
 Problem:
 I'm writing a web front end to an old in house access database with tables
 split over years
 (rather than the row having what year it's in)
 
 i.e.
 
 table00_01 table 99_98 etc etc
 
 ideally I'd like to run the same query against each table and the fetch rows
 form it the result of
 all the queries.
 
 any ideas on how I can do this ?
 
 with thanks
 
 Christian
 
 
 Christian Cable
 ICT Assistant
 Careers Service; Lancaster University
 Tel: (01524) 594072  Fax: (01524) 592072
 http://www.lancs.ac.uk/staff/cable/
 
 
 
 -- 
 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]
 

#---#

  Believe nothing - consider everything   
  
  Russ Michell
  Anglia Polytechnic University Webteam
  Room 1C 'The Eastings' East Road, Cambridge
  
  e: [EMAIL PROTECTED]
  w: www.apu.ac.uk/webteam

  www.theruss.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]




[PHP-DB] Re: Not so relative but important...

2001-09-24 Thread Geir Eivind Mork

Koutsogiannopoulos Karolos wrote:

 What i want to do is when i have a pdf or doc file ... using a special
 header, when clicking the file
 the page to download the file and not opening it as usual..
 Is tha possible???

just use header
header (Content-Type: mimetype); 

This is a nice list of mimetypes:

http://hostutopia.com/support/s058.html

-- 
PHP Developer, home: http://www.moijk.net | work: http://www.coretrek.com
set_time_limit: limit the maximum execution time | 
http://www.php.net/manual/en/function.set-time-limit.php

-- 
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] Grant statement

2001-09-24 Thread its me

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
   ON database_name.*
   TO username@localhost
   IDENTIFIED BY 'password';


  do i write this is my php file???
and is this its right syntax just put it like this??as i know i put like this when 
using the command line..but in my php file!!i don't know.
my host created the databse for me and gave me a username and password i used them in 
my scripts...do i still have to use GRANT???






-- 
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] adding the results of a number of calls to mysql_query

2001-09-24 Thread Cable, Christian

thanks for the idea but it was a bit too of a headache in my case as I was
generating the sql statement in a messy way
tho lots of bits of code. Reading an oracle book I came across unions and that
has led me onto what I think will solve my prob

merged tables

I'm going try create table alltables (blah blah...) type=MERGE  UNION
(table00_01, table99_98 etc etc) 

thansk for everyone who gave me hints
cheers

Christian
On Monday, September 24, 2001 10:54 AM, Russ Michell
[SMTP:[EMAIL PROTECTED]] wrote:
 If I have the right end of the stick you want:
 
 SELECT * FROM table99_98,table00_01 WHERE table99_98.foo='$bar' AND
table00_01.foo='$bar';
 
 Russ
 

-- 
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] crosstab for MS SQL

2001-09-24 Thread Sommai Fongnamthip

Hi,
MySQL has a method to write Crosstab method but It can't use with MS 
SQL.  Did someone know how to write SQL statement for make cross tab with 
MS SQL 6.5 (both ODBC and TDS connection)?

Thank you
SF


-- 
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] Problems with MSSQL

2001-09-24 Thread James Cornman

Hello. I'm have PHP 4.0.6 compiled as a DSO module for Apache. From the
command line (with the same ./configure line, with out the --with-apxs
paramater) it runs fine, but from the web, it is unable to connect to my
MSSQL server. I've configured php --with-sybase=/usr/local/freetds. I've
tried changing versions of just about everything, but nothing yet works.
Here is the source of the php script.

Thanks in advance

?
putenv(SYBASE=/usr/local/freetds);
putenv(LD_LIBRARY_PATH=/usr/local/freetds/lib);
putenv(TDSVER=70);

$sql = mssql_connect('nacas','argon','SNIP') or die(Could not connect to
SQL\n);

?






-- 
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] Grant statement

2001-09-24 Thread Rick Emery

no, if all you wan the user to do is to read/write data

-Original Message-
From: its me [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 24, 2001 5:03 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Grant statement


GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
   ON database_name.*
   TO username@localhost
   IDENTIFIED BY 'password';


  do i write this is my php file???
and is this its right syntax just put it like this??as i know i put like
this when using the command line..but in my php file!!i don't know.
my host created the databse for me and gave me a username and password i
used them in my scripts...do i still have to use GRANT???






-- 
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 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] Grant statement

2001-09-24 Thread Jason Wong

Subject: [PHP-DB] Grant statement


GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
   ON database_name.*
   TO username@localhost
   IDENTIFIED BY 'password';


  do i write this is my php file???
and is this its right syntax just put it like this??as i know i
put like this when using the command line..but in my php file!!i
don't know.
my host created the databse for me and gave me a username and
password i used them in my scripts...do i still have to use GRANT???


You would need to use the GRANT statement *only* if you wanted to give
access another user. And you're only able to use the GRANT *if* your
host/provider has given you permission to do so using your current
username/password.

Basically, if you're able to access your database right now, then there's
nothing you need to do.


regards
--
Jason Wong
Gremlins Associates
www.gremlins.com.hk
Tel: +852-2573-5033
Fax: +852-2573-5851


-- 
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] Individual Lines of text

2001-09-24 Thread Devon

I am pulling down data from a switch which looks like

Port 1, 33889029532
Port 2, 0
Port 3, 135852
Port 4, 6652941243
etc etc

I need to know if it is possible with PHP to write a script that will pull
the individual lines of this text file and store them into a mysql database
line by line.

Cheers




-- 
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] Individual Lines of text

2001-09-24 Thread Andreas D. Landmark

At 25.09.2001 01:19, Devon wrote:
I am pulling down data from a switch which looks like

Port 1, 33889029532
Port 2, 0
Port 3, 135852
Port 4, 6652941243
etc etc

I need to know if it is possible with PHP to write a script that will pull
the individual lines of this text file and store them into a mysql database
line by line.

Cheers

if the lines are exactly as you describe them (ie. comma-separated) read 
the file
line by line and use the explode() function to create an array of each line 
and flush
it to the db of your choice...



-- 
Andreas D Landmark / noXtension
Real Time, adj.:
 Here and now, as opposed to fake time, which only occurs there
and then.


-- 
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] Individual Lines of text

2001-09-24 Thread Beau Lebens

or you can fopen() the text file, then fgetcsv() each line, using , as a
separator, which is just a neat, clean way of doing explodes :)

enjoy
beau

// -Original Message-
// From: Andreas D. Landmark [mailto:[EMAIL PROTECTED]]
// Sent: Tuesday, 25 September 2001 8:27 AM
// To: [EMAIL PROTECTED]
// Subject: Re: [PHP-DB] Individual Lines of text
// 
// 
// At 25.09.2001 01:19, Devon wrote:
// I am pulling down data from a switch which looks like
// 
// Port 1, 33889029532
// Port 2, 0
// Port 3, 135852
// Port 4, 6652941243
// etc etc
// 
// I need to know if it is possible with PHP to write a script 
// that will pull
// the individual lines of this text file and store them into 
// a mysql database
// line by line.
// 
// Cheers
// 
// if the lines are exactly as you describe them (ie. 
// comma-separated) read 
// the file
// line by line and use the explode() function to create an 
// array of each line 
// and flush
// it to the db of your choice...
// 
// 
// 
// -- 
// Andreas D Landmark / noXtension
// Real Time, adj.:
//  Here and now, as opposed to fake time, which only 
// occurs there
// and then.
// 
// 
// -- 
// 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 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] Multiple lines in database.

2001-09-24 Thread Chris Soyars

Ok I need to beable to print to HTML each line on its own

right now I would have in the database:
A
B
C
D

and it will print A B C D

Help!  Need this for school.



-- 
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] Re: Multiple lines in database.

2001-09-24 Thread Hugh Bothwell


Chris Soyars [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Ok I need to beable to print to HTML each line on its own

 right now I would have in the database:
 A
 B
 C
 D

 and it will print A B C D

 Help!  Need this for school.

Um, br maybe?



-- 
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] Multiple lines in database.

2001-09-24 Thread Beau Lebens

print the results using nl2br($stuff)
which converts new lines (nl) to (2) breaks (br) in html (br)

// -Original Message-
// From: Chris Soyars [mailto:[EMAIL PROTECTED]]
// Sent: Tuesday, 25 September 2001 10:04 AM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] Multiple lines in database.
// 
// 
// Ok I need to beable to print to HTML each line on its own
// 
// right now I would have in the database:
// A
// B
// C
// D
// 
// and it will print A B C D
// 
// Help!  Need this for school.
// 
// 
// 
// -- 
// 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 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] sessions in PHP

2001-09-24 Thread nirat

can anyone guide me to using sessions in PHP i've tried it a lot of times
but its not working. any help tutorials would be helpful...


--
Nirat




-- 
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] sessions in PHP

2001-09-24 Thread Dave Watkinson

http://www.php.net/session



-Original Message-
From: nirat [mailto:[EMAIL PROTECTED]]
Sent: 25 September 2001 06:46
To: [EMAIL PROTECTED]
Subject: [PHP-DB] sessions in PHP


can anyone guide me to using sessions in PHP i've tried it a lot of
times
but its not working. any help tutorials would be helpful...


--
Nirat




-- 
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 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]