[PHP-DB] Login session - browser/computer? problem

2003-06-12 Thread Dewi Wahyuni
My boss can't seem to login at all through his laptop to my website.

The login process is as follows: from the index.php the person login goes to 
handler/login.php which checks with the databae, if the user is authorized then put a 
session variable called loginid and redirect the website to a page in.php with a 
welcome  display.

The in.php checks whether the session loginid is empty or exists to identify whether 
the user has logged in.

It works fine in all the desktops in my office but one of my bosses tried to access it 
with his laptop and it keeps saying wrong password.

Our IE version and OS is the same. (XP and IE  7.10) 

Code for login 

  
$sql = SELECT * from Login where loginname='$loginname' and 
loginpass=ENCODE('$password','');

  $result = mysql_query($sql);

   if ($myrow = mysql_fetch_array($result))
   {
 session_start();
 
 $_SESSION[loginid] = $loginname;
   header(blabla);
   }
?

My boss's problem is when he logged in the page got to in.php but in.php says he is 
not logged in yet. Which means he is authorized, but the session data could not be 
retrieved by in.php in his computer.

I checked and the cache timeout is 180 (default) cache limiter is empty and domain is 
empty 

Regards,

Dewi



Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005

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



Re: [PHP-DB] Login session - browser/computer? problem

2003-06-12 Thread Becoming Digital
If it works for everyone else but not your boss, guess where the problem is?
His security settings probably have something to do with it.

Edward Dudlik
Becoming Digital
www.becomingdigital.com


- Original Message -
From: Dewi Wahyuni [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, 12 June, 2003 03:20
Subject: [PHP-DB] Login session - browser/computer? problem


My boss can't seem to login at all through his laptop to my website.

The login process is as follows: from the index.php the person login goes to
handler/login.php which checks with the databae, if the user is authorized then
put a session variable called loginid and redirect the website to a page
in.php with a welcome  display.

The in.php checks whether the session loginid is empty or exists to identify
whether the user has logged in.

It works fine in all the desktops in my office but one of my bosses tried to
access it with his laptop and it keeps saying wrong password.

Our IE version and OS is the same. (XP and IE  7.10)

Code for login


$sql = SELECT * from Login where loginname='$loginname' and
loginpass=ENCODE('$password','');

  $result = mysql_query($sql);

   if ($myrow = mysql_fetch_array($result))
   {
 session_start();

 $_SESSION[loginid] = $loginname;
   header(blabla);
   }
?

My boss's problem is when he logged in the page got to in.php but in.php says he
is not logged in yet. Which means he is authorized, but the session data could
not be retrieved by in.php in his computer.

I checked and the cache timeout is 180 (default) cache limiter is empty and
domain is empty

Regards,

Dewi



Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005

--
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] HELP, Still not be able to connect to MySQL

2003-06-12 Thread nabil
GUYS help me please.
1- mysql server in on my own machine..
2- my machine IP is 192.168.0.1
3- when i tired to connect as localhost, i managed to query.
4- if i tried to to connect using my IP i got no database found...
5- i tried to use mysql_error() ... and it is not an authentication problem
as my fresh Mysql sitting point to :

#
# Dumping data for table `user`
#

INSERT INTO user VALUES ('localhost', 'root', '', 'Y', 'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');
INSERT INTO user VALUES ('%', 'root', '', 'N', 'N', 'N', 'N', 'N', 'N', 'N',
'N', 'N', 'N', 'Y', 'N', 'N', 'N');
INSERT INTO user VALUES ('localhost', '', '', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');
INSERT INTO user VALUES ('%', '', '', 'N', 'N', 'N', 'N', 'N', 'N', 'N',
'N', 'N', 'N', 'N', 'N', 'N', 'N');

so it should accept any host.!!!

6- even i tried from other machine on my local network (from 192.168.0.2) i
still not be able too...

Please help me, am i missing to point to a port number ???
*** all the above is to test how to connect to a remote Mysql server
online...

Nabil



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



[PHP-DB] PHP Paging

2003-06-12 Thread F-A-W®
Hi all,
 
I have some data that need to be shown in pages.
 
How can I do paging in PHP?
 
Any code snippet or links are welcome.
 
Thanks
 
FAW


-
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).

Re: [PHP-DB] HELP, Still not be able to connect to MySQL

2003-06-12 Thread Doug Thompson
Your IP users have no permissions.  (Hint:  N = No)

How is this a PHP problem?  (Hint: It is all over the mysql list archives.)

Doug


On Thu, 12 Jun 2003 13:35:21 +0300, nabil wrote:

GUYS help me please.
1- mysql server in on my own machine..
2- my machine IP is 192.168.0.1
3- when i tired to connect as localhost, i managed to query.
4- if i tried to to connect using my IP i got no database found...
5- i tried to use mysql_error() ... and it is not an authentication problem
as my fresh Mysql sitting point to :

#
# Dumping data for table `user`
#

INSERT INTO user VALUES ('localhost', 'root', '', 'Y', 'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');
INSERT INTO user VALUES ('%', 'root', '', 'N', 'N', 'N', 'N', 'N', 'N', 'N',
'N', 'N', 'N', 'Y', 'N', 'N', 'N');
INSERT INTO user VALUES ('localhost', '', '', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');
INSERT INTO user VALUES ('%', '', '', 'N', 'N', 'N', 'N', 'N', 'N', 'N',
'N', 'N', 'N', 'N', 'N', 'N', 'N');

so it should accept any host.!!!

6- even i tried from other machine on my local network (from 192.168.0.2) i
still not be able too...

Please help me, am i missing to point to a port number ???
*** all the above is to test how to connect to a remote Mysql server
online...

Nabil



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

2003-06-12 Thread Hutchins, Richard
Go to www.phpclasses.org and do a search for paging. I just did and the
search turns up over 50 PHP classes that will handle paging in any number of
ways.

 -Original Message-
 From: F-A-W. [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 12, 2003 7:20 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] PHP Paging
 
 
 Hi all,
  
 I have some data that need to be shown in pages.
  
 How can I do paging in PHP?
  
 Any code snippet or links are welcome.
  
 Thanks
  
 FAW
 
 
 -
 Do you Yahoo!?
 Free online calendar with sync to Outlook(TM).
 

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



Re: [PHP-DB] PHP Paging

2003-06-12 Thread Becoming Digital
 How can I do paging in PHP?

Search the list archives or use one of the paginating classes in the repository.
This came up just last week.
http://marc.theaimsgroup.com/?l=php-dbw=2r=1s=pagingq=b

Edward Dudlik
Becoming Digital
www.becomingdigital.com


- Original Message -
From: F-A-W® [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, 12 June, 2003 07:19
Subject: [PHP-DB] PHP Paging


Hi all,

I have some data that need to be shown in pages.

How can I do paging in PHP?

Any code snippet or links are welcome.

Thanks

FAW


-
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).


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



[PHP-DB] Postgres BYTEA HOWTO? COMO?

2003-06-12 Thread Quique NoTeLoDigo
Hello,

I am using Postgres and I want to put a binary file into a table. I have the 
table yet, with a bytea field (binary data)

But i don't know how to do the INSERTs and the SELECTs, with PHP

Could someone help me?

Thanks!
---
Hola!

Estoy usando Postgress y quiero guardar ficheros binarios en una tabla. La 
tabla ya la tengo, con un campo bytea (datos binarios)

Pero no se cómo hacer los INSERTs y los SELECTs, con PHP

Podría alguien de ustedes ayudarme?

Gracias!

_
Localiza y ponte en contacto con tus antiguos compañeros de clase en MSN 
Compañeros.  http://mipasado.msn.es/

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


Re: [PHP-DB] Re: MySQL, PHP, and XML

2003-06-12 Thread Hardik Doshi
Hi Manuel,

Do you have any references for generating XML files
from any of the persistent database?

Thanks

Hardik

--- Manuel Lemos [EMAIL PROTECTED] wrote:
 Hello,
 
 On 06/11/2003 11:53 PM, [EMAIL PROTECTED] wrote:
  Is there an automatic way to insert an XML file
 into a MySQL DB through say,
  Load Data InFILE?  
  
  Or does one have to Pick apart the XML with PHP
 and insert data into the
  fields one by one, record by record?
 
 You may want to try this class:
 
 Class: MySQL to XML - XML to MySQL
 http://www.phpclasses.org/mysql_xml
 
 -- 
 
 Regards,
 Manuel Lemos
 
 Free ready to use OOP components written in PHP
 http://www.phpclasses.org/
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



[PHP-DB] hiding db password

2003-06-12 Thread Sallee, Helen
Hi, I'm new to PHP and need to know how I can completely hide Oracle database password 
used in OCILogon call.  Since all .php pages can be read by www user, if the userid 
and password are coded in the .php page, they anyone can fopen this file and view the 
contents (right?) - this presents a security problem.  So how can I have a database 
connection which is secure?  Or am I missing something in here?
The code below is what I have.
 
?php
putenv(TWO_TASK=ORCL2);
putenv(ORACLE_HOME=/u01/home/oracle/product/9.2.0);
$conn = OCILogon(USER1,USER1PASS);
$query = OCIParse($conn,select * from state);
OCIExecute($query);
?
 
Thank you


Helen Sallee 
VIS Database Administrator 


 


Re: [PHP-DB] hiding db password

2003-06-12 Thread Christophe Casalegno
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Le Jeudi 12 Juin 2003 16:31, Sallee, Helen a écrit :
 Hi, I'm new to PHP and need to know how I can completely hide Oracle
 database password used in OCILogon call.  Since all .php pages can be read
 by www user, if the userid and password are coded in the .php page, they
 anyone can fopen this file and view the contents (right?) - this presents a
 security problem.  So how can I have a database connection which is secure?
  Or am I missing something in here? The code below is what I have.

 ?php
 putenv(TWO_TASK=ORCL2);
 putenv(ORACLE_HOME=/u01/home/oracle/product/9.2.0);
 $conn = OCILogon(USER1,USER1PASS);
 $query = OCIParse($conn,select * from state);
 OCIExecute($query);
 ?

 Thank you

Just put the good permission and uid/gid ton your script for solve your 
problem.


for example php un suexec/cgi mode with apache patched for suexec, User toto 
group users, with a 705 chmod... You can also more secure the environnement 
with a kernel patche like grsecurity and access lists.

friendly,

- -- 
Christophe Casalegno | Digital Network | UIN : 153305055
http://www.digital-network.net | http://www.speed-connect.com
http://www.securite-reseaux.com | http://www.dnsi.info
Security engineer network/systems | Intrusion tests specialist.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+6IzU0mOixX2DR8IRAnGHAJ47Dk50xAzeoTn7CxH31FpHvUC3xgCeMXqB
KAcM5gm3dvq/9l2Y6Iss3UI=
=fiK4
-END PGP SIGNATURE-


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



Re: [PHP-DB] hiding db password

2003-06-12 Thread mike karthauser
on 12/6/03 3:31 pm, Sallee, Helen at [EMAIL PROTECTED] wrote:

 ?php
 putenv(TWO_TASK=ORCL2);
 putenv(ORACLE_HOME=/u01/home/oracle/product/9.2.0);
 $conn = OCILogon(USER1,USER1PASS);
 $query = OCIParse($conn,select * from state);
 OCIExecute($query);
 ?
 
 Thank you

Use an include file buried below your site root with

$user=USER1;
$pass=USER1PASS;

Then you should be able to do:

Include/path/to/pass.inc.php;
snip
$conn = OCILogon($user,$pass);

Which is more secure.

-- 
Mike Karthauser 
Managing Director - Brightstorm Ltd

Email[EMAIL PROTECTED]
Web  http://www.brightstorm.co.uk
Tel  0117 9426653 (office)
   07939 252144 (mobile)

SnailmailUnit 8, 14 King Square,
   Bristol BS2 8JJ


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



Re: [PHP-DB] hiding db password

2003-06-12 Thread Christophe Casalegno
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Le Jeudi 12 Juin 2003 16:38, mike karthauser a écrit :

 Then you should be able to do:

 Include/path/to/pass.inc.php;
 snip
 $conn = OCILogon($user,$pass);

 Which is more secure.

I prefer user require_once mort than include for security reasons.
You can also implement security function like crypto for the connexion, etc.. 
But i am thinking the real security problem is the system and the network...

friendly,

- -- 
Christophe Casalegno | Digital Network | UIN : 153305055
http://www.digital-network.net | http://www.speed-connect.com
http://www.securite-reseaux.com | http://www.dnsi.info
Security engineer network/systems | Intrusion tests specialist.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+6I680mOixX2DR8IRAprXAJ9yJCHgx++REy+jfDBD1KTO0QhUVwCcD1hv
lUQRpfuUWz3YMJdCvMfRCpk=
=WB6u
-END PGP SIGNATURE-


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



Re: [PHP-DB] hiding db password

2003-06-12 Thread CPT John W. Holmes
  ?php
  putenv(TWO_TASK=ORCL2);
  putenv(ORACLE_HOME=/u01/home/oracle/product/9.2.0);
  $conn = OCILogon(USER1,USER1PASS);
  $query = OCIParse($conn,select * from state);
  OCIExecute($query);
  ?
 
  Thank you

 Use an include file buried below your site root with

 $user=USER1;
 $pass=USER1PASS;

 Then you should be able to do:

 Include/path/to/pass.inc.php;
 snip
 $conn = OCILogon($user,$pass);

 Which is more secure.

Be careful when you say something is more secure. From a file system
perspective, this method is no different from putting the username/password
in the regular PHP file. From a web server perspective, though, this is
safer because if the web server ever broke and started serving PHP pages
as plain text (been there, done that), then at least no one can get to your
include file through your web server.

---John Holmes...


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



Re: [PHP-DB] hiding db password

2003-06-12 Thread mike karthauser
on 12/6/03 3:48 pm, CPT John W. Holmes at [EMAIL PROTECTED] wrote:

 From a web server perspective, though, this is
 safer because if the web server ever broke and started serving PHP pages
 as plain text (been there, done that), then at least no one can get to your
 include file through your web server.

That is what I meant by more secure. Putting files below webroot prevents
webusers from getting at them.
-- 
Mike Karthauser 
Managing Director - Brightstorm Ltd

Email[EMAIL PROTECTED]
Web  http://www.brightstorm.co.uk
Tel  0117 9426653 (office)
   07939 252144 (mobile)

SnailmailUnit 8, 14 King Square,
   Bristol BS2 8JJ


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



Re: [PHP-DB] hiding db password

2003-06-12 Thread Brent Baisley
I place all my access info in it's own directory that is not directly 
accessible via the web. I usually place this on the same level as the 
CGI directory, which is also not directly accessible. Typically this is 
one level up from your site directory. If the php module breaks, then 
includes and requires won't work so your passwords won't be seen.
/path/to/site/
/path/to/accessfile/
/path/to/cgi/

You do have to specify the directory as an include_path for php.

On Thursday, June 12, 2003, at 10:31 AM, Sallee, Helen wrote:

Hi, I'm new to PHP and need to know how I can completely hide Oracle 
database password used in OCILogon call.  Since all .php pages can be 
read by www user, if the userid and password are coded in the .php 
page, they anyone can fopen this file and view the contents (right?) - 
this presents a security problem.  So how can I have a database 
connection which is secure?  Or am I missing something in here?

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: [PHP] Headers in body - what am I doing wrong???

2003-06-12 Thread -{ Rene Brehmer }-
At 22:48 11-06-2003, you wrote:
You are already pretty far in determining the problem. Indeed the border 
between the header and content of a mail is an empty line.

What if i just give a hint?
Look closely:
  $from = \$name\ $address\r\n;
  $headers .= From: .$from.\r\n;
See ?
Yup ... too many header fields, and just one that ain't ... so hadn't 
noticed it ...

PS some mailservers do not like \r\n, check the manual on mail() and see 
what they suggest, i think it was just \n.
I actually wrote this according to the manual, ... this is an extract of 
the offline version of the PHP 4.2.3 I've got:

Multiple extra headers are separated with a carriage return and newline.

Note: You must use \r\n to seperate headers, although some Unix mail 
transfer agents may work with just a single newline (\n). 

Sounds like you're reversed there ;-)

Mercury only cares about whether or not it's conformant to RFC822 and the 
siblings. Anything non-compliant is simply ignored or discarded ... but my 
webhost use sendmail on Linux, and since I've got another mailscript that 
uses the same basic format, and it works exactly as intended, then I don't 
think it's a problem with the \r\n header seperators...

Thanks to y'all ... now I just gotta figure out why Mercury doesn't process 
the commands. ... commands sent by regular mail are processed ... so it 
must be a problem with the script...

Rene

--
Rene Brehmer
aka Metalbunny
http://metalbunny.net/
References, tools, and other useful stuff...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Problem with 4.3.2

2003-06-12 Thread Ryan Jameson (USA)
When I change over to 4.3.2 I get this message from phpinfo();

The operating system cannot run %1. 

... any ideas? Thanks...

 Ryan

Ryan Jameson
Software Development Services Manager 
International Bible Society

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



[PHP-DB] RE: Problem with 4.3.2

2003-06-12 Thread Ryan Jameson (USA)
More info... I only get that message in ISAPI mode. :-\

 Ryan

-Original Message-
From: Ryan Jameson (USA) 
Sent: Thursday, June 12, 2003 11:10 AM
To: [EMAIL PROTECTED]
Subject: Problem with 4.3.2


When I change over to 4.3.2 I get this message from phpinfo();

The operating system cannot run %1. 

... any ideas? Thanks...

 Ryan

Ryan Jameson
Software Development Services Manager 
International Bible Society

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



RE: [PHP-DB] hiding db password

2003-06-12 Thread Sallee, Helen
Thank you all for your suggestions.  I created a hidden file one level above my root 
directory with significant owner/group permissions that it would be extremely 
difficult to detect.  Looks and works great.  Thanks.


Helen Sallee
VIS Database Administrator



-Original Message-
From: Brent Baisley [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 10:44 AM
To: Sallee, Helen
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] hiding db password


I place all my access info in it's own directory that is not directly 
accessible via the web. I usually place this on the same level as the 
CGI directory, which is also not directly accessible. Typically this is 
one level up from your site directory. If the php module breaks, then 
includes and requires won't work so your passwords won't be seen.
/path/to/site/
/path/to/accessfile/
/path/to/cgi/

You do have to specify the directory as an include_path for php.

On Thursday, June 12, 2003, at 10:31 AM, Sallee, Helen wrote:

 Hi, I'm new to PHP and need to know how I can completely hide Oracle 
 database password used in OCILogon call.  Since all .php pages can be 
 read by www user, if the userid and password are coded in the .php 
 page, they anyone can fopen this file and view the contents (right?) - 
 this presents a security problem.  So how can I have a database 
 connection which is secure?  Or am I missing something in here?

-- 
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577




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



Re: [PHP-DB] PHP Paging

2003-06-12 Thread Cory Hicks
FAW,

I would look at PEAR and then run, don't walkand get the
DB_Pager

It smokes anything else I have tried...

Cory


On Thu, 2003-06-12 at 06:19, F-A-W wrote:
 Hi all,
  
 I have some data that need to be shown in pages.
  
 How can I do paging in PHP?
  
 Any code snippet or links are welcome.
  
 Thanks
  
 FAW
 
 
 -
 Do you Yahoo!?
 Free online calendar with sync to Outlook(TM).
-- 
Cory Hicks [EMAIL PROTECTED]
TRI International


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



Re: [PHP-DB] PHP Paging

2003-06-12 Thread Pierre-Alain Joye
On 12 Jun 2003 16:01:01 -0500
Cory Hicks [EMAIL PROTECTED] wrote:

 FAW,
 
 I would look at PEAR and then run, don't walkand get the
 DB_Pager
 
 It smokes anything else I have tried...

little tutorial on:

http://www.pearfr.org/index.php/en/article/db_pager

hth

pierre

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



RE: [PHP-DB] PHP Paging

2003-06-12 Thread Sallee, Helen
If you are on UNIX, you could just use a cgi script and use sendmail command.


Helen Sallee
VIS Database Administrator
http://village.gtedc.gte.com/dataman/
(972) 453-7680  [EMAIL PROTECTED]


-Original Message-
From: Cory Hicks [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 4:01 PM
To: F-A-W
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] PHP Paging


FAW,

I would look at PEAR and then run, don't walkand get the
DB_Pager

It smokes anything else I have tried...

Cory


On Thu, 2003-06-12 at 06:19, F-A-W wrote:
 Hi all,
  
 I have some data that need to be shown in pages.
  
 How can I do paging in PHP?
  
 Any code snippet or links are welcome.
  
 Thanks
  
 FAW
 
 
 -
 Do you Yahoo!?
 Free online calendar with sync to Outlook(TM).
-- 
Cory Hicks [EMAIL PROTECTED]
TRI International


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




Re: [PHP-DB] PHP Paging

2003-06-12 Thread Pierre-Alain Joye
On Thu, 12 Jun 2003 16:45:00 -0500
Sallee, Helen [EMAIL PROTECTED] wrote:

 If you are on UNIX, you could just use a cgi script and use sendmail
 command.

paging datas (Page 1 fo 3  1 2 3 ), not send a msg to a pager :)

pierre

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



[PHP-DB] How can I get the number of entries retrieved by a SELECT - FROM

2003-06-12 Thread ed anderson
Dell 4500, mem 1g, disk 45g, mhz 2g, Mysql-3.23.54a-linux-i686, PHP-4.30,
httpd_2.0.44



1. How do I trap or collect or save the digit 3 generated the
   mysql SELECT COUNT(*) statement below? 
   
2. The PHP SELECT FROM below (before snip) listed the expected data.
   Is there a way to get the digit 3 into a PHP variable?

SELECT h_id, name FROM tbtm # displays
  WHERE h_id=1# three
 OR h_id=2   # lines
 OR h_id=3;  # of data

SELECT COUNT(*) FROM tbtm   # displays
  WHERE h_id='1'# the
 OR h_id='2'# digit
 OR h_id='3';   # three

+--+
| COUNT(*) |
+--+
|3 |
+--+
1 row in set (0.00 sec)



 The next PHP is the same as the SELECT FROM above.
?php
 $result = mysql_query( SELECT h_id, name, FROM tbtm
  WHERE h_id='1'
 OR h_id='2'
 OR h_id='3',
 $tmtb_db);
#
 printf(ID: %sbr\n,  mysql_result($result,1,h_id));
 printf(name: %sbr\n,mysql_result($result,1,name)); 
 snip   snip
#
?


Thanks

[EMAIL PROTECTED]


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



Re: [PHP-DB] How can I get the number of entries retrieved by aSELECT - FROM

2003-06-12 Thread Becoming Digital
 The PHP SELECT FROM below (before snip) listed the expected data.
 Is there a way to get the digit 3 into a PHP variable

$data = mysql_result($result,1,name));


 How do I trap or collect or save the digit 3 generated the
 mysql SELECT COUNT(*) statement below?

Same as above.  Store it in a PHP variable and retrieve it later.

Edward Dudlik
Becoming Digital
www.becomingdigital.com


- Original Message -
From: ed anderson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, 12 June, 2003 17:58
Subject: [PHP-DB] How can I get the number of entries retrieved by a SELECT -
FROM


Dell 4500, mem 1g, disk 45g, mhz 2g, Mysql-3.23.54a-linux-i686, PHP-4.30,
httpd_2.0.44



1. How do I trap or collect or save the digit 3 generated the
   mysql SELECT COUNT(*) statement below?

2. The PHP SELECT FROM below (before snip) listed the expected data.
   Is there a way to get the digit 3 into a PHP variable?

SELECT h_id, name FROM tbtm # displays
  WHERE h_id=1# three
 OR h_id=2   # lines
 OR h_id=3;  # of data

SELECT COUNT(*) FROM tbtm   # displays
  WHERE h_id='1'# the
 OR h_id='2'# digit
 OR h_id='3';   # three

+--+
| COUNT(*) |
+--+
|3 |
+--+
1 row in set (0.00 sec)



 The next PHP is the same as the SELECT FROM above.
?php
 $result = mysql_query( SELECT h_id, name, FROM tbtm
  WHERE h_id='1'
 OR h_id='2'
 OR h_id='3',
 $tmtb_db);
#
 printf(ID: %sbr\n,  mysql_result($result,1,h_id));
 printf(name: %sbr\n,mysql_result($result,1,name));
 snip   snip
#
?


Thanks

[EMAIL PROTECTED]


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