[PHP] PHP_AUTH_USER failing, please help me...

2002-11-25 Thread Larry Brown
I just built a new server and loaded with RH8.  I copied my php files over
to the new apache server and modified the links.  I couldn't find any
mention of php in the httpd.conf so I figured it must me compiled into httpd
so I tested it.  The PHP files load, however, the php_auth_user and
php_auth_pw don't work.  They prompt the user yet with :


if (isset( $PHP_AUTH_USER ) && isset($PHP_AUTH_PW)) {

echo $PHP_AUTH_USER;
echo $PHP_AUTH_PW;
} if ( ! $auth )
{
  header( 'WWW-Authenticate: Basic realm="Private"' );
  header( 'HTTP/1.0 401 Unauthorized' );
  echo 'Authorization Required.';
  echo $PHP_AUTH_USER;
  echo $PHP_AUTH_PW;
  echo "OK?";
  exit;

}
else
{
  echo $PHP_AUTH_USER;
  echo $PHP_AUTH_PW;
}

The prompt comes up and asks for a password three times.  After the three it
prints... Authorization Required.OK?
So it appears as though it is not returning the variables.  The php version
is 4.2.2 and apache is 2.0.4 (redhat).





Larry S. Brown
Dimension Networks, Inc.





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




[PHP] RE: PHP_AUTH_USER failing, please help me...

2002-11-25 Thread Larry Brown
Phil,

You da man!  It just doesn't get any sweeter.  Register_globals is off.

Thank you,

Larry S. Brown
Dimension Networks, Inc.


-Original Message-
From: Philip Hallstrom [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 25, 2002 7:40 PM
To: Larry Brown
Cc: PHP List
Subject: Re: PHP_AUTH_USER failing, please help me...

Just a quick guess that register_globals is probably turned off (check
with a phpinfo() to be sure) and therefore $PHP_AUTH_USER and $PHP_AUTH_PW
are not being set.

Or, try $_SERVER[PHP_AUTH_USER], etc...

On Mon, 25 Nov 2002, Larry Brown wrote:

> I just built a new server and loaded with RH8.  I copied my php files over
> to the new apache server and modified the links.  I couldn't find any
> mention of php in the httpd.conf so I figured it must me compiled into
httpd
> so I tested it.  The PHP files load, however, the php_auth_user and
> php_auth_pw don't work.  They prompt the user yet with :
>
>
> if (isset( $PHP_AUTH_USER ) && isset($PHP_AUTH_PW)) {
>
>   echo $PHP_AUTH_USER;
>   echo $PHP_AUTH_PW;
> } if ( ! $auth )
> {
>   header( 'WWW-Authenticate: Basic realm="Private"' );
>   header( 'HTTP/1.0 401 Unauthorized' );
>   echo 'Authorization Required.';
>   echo $PHP_AUTH_USER;
>   echo $PHP_AUTH_PW;
>   echo "OK?";
>   exit;
>
> }
> else
> {
>   echo $PHP_AUTH_USER;
>   echo $PHP_AUTH_PW;
> }
>
> The prompt comes up and asks for a password three times.  After the three
it
> prints... Authorization Required.OK?
> So it appears as though it is not returning the variables.  The php
version
> is 4.2.2 and apache is 2.0.4 (redhat).
>
>
>
>
>
> Larry S. Brown
> Dimension Networks, Inc.
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



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




[PHP] apache httpd-2.0.40-8 and scanning alternate extensions for php

2002-12-01 Thread Larry Brown
I just moved to a machine with RH8 that has their latest version of apache.
On prior versions httpd.conf had a section that I could set to have the
server scan .html extensions for php tags.  There is no longer such a
section even though the server does appropriately scan .php files.  Does
anyone know how I can have it scan different extensions?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




RE: [PHP] apache httpd-2.0.40-8 and scanning alternate extensions for php

2002-12-01 Thread Larry Brown
That's what I'm saying, there is absolutely no mention of php in httpd.conf.
That line does not exist.  It does in previous versions of RedHat / Apache.
Is it possible that this is some kind of RedHat modification?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Evan Nemerson [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 01, 2002 4:53 PM
To: Larry Brown; [EMAIL PROTECTED]
Subject: Re: [PHP] apache httpd-2.0.40-8 and scanning alternate extensions
for php

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Find the line that looks like "AddType application/x-httpd-php .php", and
change it to "AddType application/x-httpd-php .php .html"


On Sunday 01 December 2002 01:34 pm, Larry Brown wrote:
> I just moved to a machine with RH8 that has their latest version of
apache.
> On prior versions httpd.conf had a section that I could set to have the
> server scan .html extensions for php tags.  There is no longer such a
> section even though the server does appropriately scan .php files.  Does
> anyone know how I can have it scan different extensions?
>
> Larry S. Brown
> Dimension Networks, Inc.
> (727) 723-8388
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE96oTZ/rncFku1MdIRAlXQAJ9lV5cmg2MLXnnSIVsFWW157+puBQCfTzya
TGBEeaXx+9XlBxHbzEtWwos=
=Ajqh
-END PGP SIGNATURE-



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




RE: [PHP] apache httpd-2.0.40-8 and scanning alternate extensions for php

2002-12-01 Thread Larry Brown
Perhaps the new version doesn't need the AddType for the default extension
of php because it worked without this declaration.  However, the declaration
works as I added it and restarted the server.  It now works as I needed.  I
thank you for your help.  I suppose I should have tried this before posting
the question.  Sorry to have wasted your time.  Hopefully someone else will
fail to test it first and find my question before posting and save everyone
time in the future.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Evan Nemerson [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 01, 2002 4:53 PM
To: Larry Brown; [EMAIL PROTECTED]
Subject: Re: [PHP] apache httpd-2.0.40-8 and scanning alternate extensions
for php

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Find the line that looks like "AddType application/x-httpd-php .php", and
change it to "AddType application/x-httpd-php .php .html"


On Sunday 01 December 2002 01:34 pm, Larry Brown wrote:
> I just moved to a machine with RH8 that has their latest version of
apache.
> On prior versions httpd.conf had a section that I could set to have the
> server scan .html extensions for php tags.  There is no longer such a
> section even though the server does appropriately scan .php files.  Does
> anyone know how I can have it scan different extensions?
>
> Larry S. Brown
> Dimension Networks, Inc.
> (727) 723-8388
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE96oTZ/rncFku1MdIRAlXQAJ9lV5cmg2MLXnnSIVsFWW157+puBQCfTzya
TGBEeaXx+9XlBxHbzEtWwos=
=Ajqh
-END PGP SIGNATURE-


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



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




[PHP] Disable refresh?

2002-12-01 Thread Larry Brown
Anyone know of a method of preventing a user from refreshing a page.  I get
multiple updates with the same information in my database...

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




RE: [PHP] Disable refresh?

2002-12-01 Thread Larry Brown
If not, is there a variable that provides information that a refresh
occurred to load the page?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 01, 2002 8:23 PM
To: PHP List
Subject: [PHP] Disable refresh?

Anyone know of a method of preventing a user from refreshing a page.  I get
multiple updates with the same information in my database...

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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



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




RE: [PHP] Disable refresh?

2002-12-01 Thread Larry Brown
Thanks guys this forum is going to get me in trouble.  It is so convenient I
keep asking questions too soon.  After submitting the amendment to the
original question I thought of the solution of setting a session variable
and then clearing it before and after the submittal page.  I'll work the
gray matter a little harder next time before asking.  Thanks again.


Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 01, 2002 8:58 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Disable refresh?

> Anyone know of a method of preventing a user from refreshing a page.  I
> get multiple updates with the same information in my database...

Hello!

You can prevent it multiple ways. Two common solution:

 - When creating form, add a unique id to it in a hidden field.
   After succesful insert put that id into a container table,
   what stores used ids. Before inserting, check the presence of
   that id in that container. You can make unique ids with
   php's uniquid() function, or if mod_unique_id compiled into
   Apache, you can use $_SERVER['UNIQUE_ID'] too. Store expire
   dates too with that ids to be able delete old ids with a
   cronjob.

 - Another way: this is easier, but not too elegant. After
   inserting data, send a location header to browser to
   redirect it from that form-processor page to an another.
   After that, refreshing affects that page.

Heilig (Cece) Szabolcs
[EMAIL PROTECTED] - http://phphost.hu




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




RE: [PHP] PDF Help Please

2002-12-02 Thread Larry Brown
I know this is probably a day late and a dollar short but I was curious
myself whether this would be a good outlet to use for reports for a client
and wondered if there was such a thing.  After seeing your post I went to
there site and it looks like you have to have the PDI side to be able to
modify existing ones.  The $1,000.  Was there a reason you thought there was
some other solution?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Ryan Smaglik [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 02, 2002 5:14 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PDF Help Please

I need to figure out by tonight how to:
1. open a .pdf file using php.
2. add text to certain parts of it.
3. save it and output to browser.
4. Then delete the temp file so the process can be done over again.

I have PDFlib but not the $1000 PDI addition

Please help,

Ryan



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




[PHP] hiding php

2002-12-02 Thread Larry Brown
This should bump up my popularity here...can you run asp on apache?  The
reason I ask is that I understand you can use a php option to hide the fact
that you are running php.  This sounds like a good idea to keep people
guessing, but I also want to use .asp extensions and have them parsed for
the php tags.  I thought this would be nice if someone wanted to screw with
a site they wouldn't even be trying tools that would apply.  However, if you
can't run asp on apache nobody would be fooled.  Any thoughts?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




RE: [PHP] hiding php

2002-12-02 Thread Larry Brown
Because its better to have someone waste time trying known hacks for a
platform I don't have than to have the same person not know the platform and
start spending time figuring out what it is right off the bat.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Justin French [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 03, 2002 12:39 AM
To: Larry Brown; PHP List
Subject: Re: [PHP] hiding php

Why not just make up an extension, like your initials (.lsb) or your
business name (.dim or .dni), and set-up apache to pipe all those files
through PHP...??

That way they'll have no clue at all (if used in conjunction with the "hide
PHP" stuff, etc etc).


Justin

on 03/12/02 4:13 PM, Larry Brown ([EMAIL PROTECTED]) wrote:

> This should bump up my popularity here...can you run asp on apache?  The
> reason I ask is that I understand you can use a php option to hide the
fact
> that you are running php.  This sounds like a good idea to keep people
> guessing, but I also want to use .asp extensions and have them parsed for
> the php tags.  I thought this would be nice if someone wanted to screw
with
> a site they wouldn't even be trying tools that would apply.  However, if
you
> can't run asp on apache nobody would be fooled.  Any thoughts?
>
> Larry S. Brown
> Dimension Networks, Inc.
> (727) 723-8388
>
>
>

Justin French

http://Indent.com.au
Web Development &
Graphic Design




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




[PHP] paging through results of mysql query

2002-12-05 Thread Larry Brown
I know I'm trying to re-invent the wheel, but it is because I don't know how
they do it.  I set up a script to pull a ruleset from mysql and then loop
through each row in the set.  I then check each row as it loops until I get
to the row number I want and start echoing rows.  I create the row numbers
by a $m=0; outside the loop; $m++; inside the loop.  Then I stop echoing
rows when it reaches 50 iterations.  The total iterations achieved is passed
on to the next script that does the same thing but starting where the total
left off.  This causes a lot of overhead as all of the resultset are pulled
for each script.  Does anyone have a magic bullet for this?  This
functionality is what I take search engines to be demonstrating.  If anyone
can help, I could wipe the sweat of my processors brow!  (and mine for that
matter)

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




RE: [PHP] paging through results of mysql query

2002-12-05 Thread Larry Brown
Much Gratefulness on my part!  Finally, my server and I can catch our
breath.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 12:47 PM
To: 'Larry Brown'; 'PHP List'
Subject: RE: [PHP] paging through results of mysql query

> I know I'm trying to re-invent the wheel, but it is because I don't
know
> how
> they do it.  I set up a script to pull a ruleset from mysql and then
loop
> through each row in the set.  I then check each row as it loops until
I
> get
> to the row number I want and start echoing rows.  I create the row
numbers
> by a $m=0; outside the loop; $m++; inside the loop.  Then I stop
echoing
> rows when it reaches 50 iterations.  The total iterations achieved is
> passed
> on to the next script that does the same thing but starting where the
> total
> left off.  This causes a lot of overhead as all of the resultset are
> pulled
> for each script.  Does anyone have a magic bullet for this?  This
> functionality is what I take search engines to be demonstrating.  If
> anyone
> can help, I could wipe the sweat of my processors brow!  (and mine for
> that
> matter)

SELECT * FROM tbl WHERE ... LIMIT $start, $per_page;

Adjust $start and $per_page accordingly to get your "paging"...

---John Holmes...



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



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




[PHP] window size and setting other properties

2002-12-11 Thread Larry Brown
Does PHP have any commands to set the size of the window to be loaded?  For
that matter are there any methods for hiding buttons etc. from PHP?

Larry S. Brown MCSE
Dimension Networks, Inc.
(727) 723-8388




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




[PHP] running perl script via su

2002-12-20 Thread Larry Brown
I am getting a lot of information about running the web server as root and
the associated problems and so on as I've been looking for a quick solution.
I have a perl script that is run by cron that executes sequence of events
via sftp.  The sftp client has no option that I know of to denote a
different user than the one executing the command using rsa so I set up a
user with the same name as the user needed to log into the remote server and
run it under cron for that user.  I want to place a simple button on my web
site that executes that script but it has to be run by that user.  Since
there will be no interface on the site for which commands can be sent using
this page I'm not too worried about any kind of exploit.  I also don't want
to have to go through the process of installing and learning the methods of
use for apache suExec.  I also don't want the entire web server running as
this user.  Does anyone know of a quick and dirty solution for this

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




[PHP] running perl script via su

2002-12-21 Thread Larry Brown
I am getting a lot of information about running the web server as root and
the associated problems and so on as I've been looking for a quick solution.
I have a perl script that is run by cron that executes sequence of events
via sftp.  The sftp client has no option that I know of to denote a
different user than the one executing the command using rsa so I set up a
user with the same name as the user needed to log into the remote server and
run it under cron for that user.  I want to place a simple button on my web
site that executes that script but it has to be run by that user.  Since
there will be no interface on the site for which commands can be sent using
this page I'm not too worried about any kind of exploit.  I also don't want
to have to go through the process of installing and learning the methods of
use for apache suExec.  I also don't want the entire web server running as
this user.  Does anyone know of a quick and dirty solution for this

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388



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




RE: [PHP] No tshowing url in title bar....

2002-12-21 Thread Larry Brown
Before the  tag you have the   tags.  Place Title
of the page and it will show up on the title bar instead of the url.
If you want to get rid of the address bar of the browser window, let me know
and I can post the javascript for creating that window.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Alexander Guevara [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 21, 2002 12:54 PM
To: [EMAIL PROTECTED]
Subject: [PHP] No tshowing url in title bar

Dont know if this concerns to php genral.. but i want to know how can i do
for preventing showing the url in the title bar of the browser.. for example
i click a link that goes to a php page called verify.php and in the windows
browser title bar is show this.. http://www.server.com/verify.php

It is posssible to not show the url..  i mena show a title i dont know.

Thanks!



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



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




[PHP] Problem with the List?

2002-12-21 Thread Larry Brown
Are my posts getting through?  They appear to come back on the list but I
also get this response...

Sorry. Your message could not be delivered to:

php-list,emc (The name was not found at the remote site. Check that the
name has been entered correctly.)


Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




[PHP] printing documents on printer

2002-12-30 Thread Larry Brown
Does anyone know where I might find specific information on methods of
sending documents to a printer from the web server to an attached printer.
My PHP and Perl books don't even touch on the capability for some reason.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




RE: [PHP] printing documents on printer

2002-12-30 Thread Larry Brown
My apologies, this is Linux RH8 to be exact.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 31, 2002 12:05 AM
To: 'Larry Brown'; 'PHP List'
Subject: RE: [PHP] printing documents on printer

> Does anyone know where I might find specific information on methods of
> sending documents to a printer from the web server to an attached
printer.
> My PHP and Perl books don't even touch on the capability for some
reason.

On windows you can use the Printer Functions...

http://www.php.net/manual/en/ref.printer.php

On, *nix... I have no idea.

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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



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




[PHP] web visitor viewing a script?

2003-01-04 Thread Larry Brown
This came up in another group and I just wanted to know from the experts
whether this is possible.  Being someone well versed in PHP can you visit a
web site, hit a script in PHP and be able to view the script on the page
rather than just the html it generates.  Is it true that the only way to
view the script itself is to have some problem with the web server or have a
local login for the server?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




RE: [PHP] web visitor viewing a script?

2003-01-04 Thread Larry Brown
Thank you guys for the confirmation and ...yes I got it. :(

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Michael J. Pawlowsky [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 04, 2003 8:52 PM
To: Larry Brown; [EMAIL PROTECTED]
Subject: Re: [PHP] web visitor viewing a script?

or rename the file to .phps
for PHP source. Many servers recognize this mime type as source and send you
the file.

But if you are thinking about security...  the script is compiled and
executed on the server.
What you see are the results of the application.

Get it?

This is good and bad...  Because it means you can only run each application
once and then you have to call it again.
Possibly with different parameters etc.

It's why I also use JavaScript. The application resides on the client.
Meaning the client can interact with it,
So lets say you have 2 select boxes. You want to populate the second one
with data depending on the selection of the first
with out reloading the page. This can be done in JavaScript. Not in PHP.
When doing something like that I use PHP to populate
my javaScript arrays and JS handle the interaction with the client.


Mike




*** REPLY SEPARATOR  ***

On 04/01/2003 at 7:17 PM Larry Brown wrote:

>This came up in another group and I just wanted to know from the experts
>whether this is possible.  Being someone well versed in PHP can you visit a
>web site, hit a script in PHP and be able to view the script on the page
>rather than just the html it generates.  Is it true that the only way to
>view the script itself is to have some problem with the web server or have
>a
>local login for the server?
>
>Larry S. Brown
>Dimension Networks, Inc.
>(727) 723-8388
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php






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




RE: [PHP] frustrating problem

2003-01-06 Thread Larry Brown
I'm not sure what syntax would work for you with one query.  You might try
the mysql list.  I personally make two queries.  One would be a query to the
foo table to get the name and the second would be a loop to iterate through
each contact info entry.  For each iteration you will get the array with the
individual FooContactID and when you post from that looped result you can do
your update if it needs to be done etc.  I hope that makes sense.

$query = "select FooLName from foo where FooID=$id";
$queryr = mysql_query($query) or die("Failed Foo");

$frow = mysql_fetch_row($queryr);

echo $frow[0].": ";

$query2 = "select FooPhone, FooEmail from foocontact where FooID=$id";
$query2r = mysql_query($query2) or die("Failed FooContact");

$n = 0;

while ($fcrow = mysql_fetch_row($query2r))
{
$n++;
echo $n.". ".$fcrow[0]." ".$fcrow[1]."";
}

That's off the top of my head.  I think that's how I'd do it.  I would
imagine you wanted separate tables so that one person could have multiple
addresses.  Again I might have a typo or two in there.  Just to give you an
idea.



Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Matthew K. Gold [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 06, 2003 4:26 PM
To: [EMAIL PROTECTED]
Subject: [PHP] frustrating problem

I hope that I can explain this problem in a logical and clear way.

In MySQL, I have two tables for information::

foo, which contains
FooID, FooLName, FooFName

and

foocontact, which contains
FooID, FooContactID, FooEmail, FooPhone, FooAddress1, etc.

Honestly, I can't remember why I split up the names and contact info into
two separate tables, but that's the way it is...

In the first hundred or so entries of foocontact, FooID and FooContactID are
identical (both columns are auto-increment).  But because I've occasionally
had problems loading data into the database, and have had to reload some
entries while delete or forgetting to delete others, the numbers are now out
of synch.  For some entries, that doesn't seem to be a problem (I might have
fixed them by hand at an earlier date, but I can't remember), but for
others, it might be.

That may not matter, though.  What I'd like to do is call up info from both
foo and foocontact using only the FooID, which is passed in the url.

I can't understand, though, why the where clause in the folllowing line
isn't working the way I want it to:

SELECT FooLName, FooPhone, FooEmail
FROM foo, foocontact
WHERE foocontact.FooID=$FooID and foo.FooID=$FooID;


I've also tried:

WHERE foocontact.FooID=$FooID and foo.FooID=foocontact.FooID;

any idea why that doesn't work?  does any of this make sense?  sorry if it
doesn't, and thanks in advance for your help.

Matt




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



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




RE: [PHP] Forwarding POST info from a PHP script

2003-01-07 Thread Larry Brown
There is probably a better way but what I do is create hidden fields in the
form of the first page and populate it with the variable I need to go on to
the next one. Ie for variable a, b, c, d coming to the first page...



[Do something with some or all of those variables here]

echo "";
echo "";
echo "";
echo "";
echo "
echo "

That is what I usually do because I don't know of a better way.  So if you
don't find one you can always resort to that.  And if you need these to move
on automatically by telling another frame window what the variables are
while this one is still visible, you can use javascript to send variables to
other frames.  That is out of the scope of this message and I'd have to look
up the syntax for that, but it is definitely possible.



Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: David Barrett [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 07, 2003 9:30 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Forwarding POST info from a PHP script

I want to be able to retrieve POST variable in one PHP script (which is
straight-forward) and then send these from the script to another one
returning the processed input.

I have written a script that will parse a frames-based page and render it as
a flat page (i.e. all frames displayed as a table in one HTML file) - this
is so that I can create a website using frames, and still let browsers that
don't support frames to access it without my having to create a separate
version of the site.

e.g.:
http://www.redradish.co.uk/rr/index.htm (frames based site)
http://www.redradish.co.uk/php/framesprocessor.php?Frameset=http://www.redra
dish.net/rr/index.htm&RenderMethod=1&MainFrame=main&AllHead=1
(the same site
rendered as single page).

The problem is that if in the frames-based site one of the frames is a form
submission, I need to be able to send this data to the original form and
retrieve the output to display in the rendered page.

e.g.
http://www.redradish.co.uk/php/framesprocessor.php?Frameset=http://www.redra
dish.net/rr/index.htm&TargetName=main&Target=http://www.redradish.net/rr/con
tact/contactF.htm&MainFrame=main&RenderMethod=1&LinkSearch=1&AllHead=1&Debug
=1
(this is a page that has a contact form).

I can't find any information on how to forward such a request.

The script in question is located at:
http://www.redradish.co.uk/php/framesprocessor.php

It uses these variables (passed using GET or POST):
  Frameset   frameset page.  This needs to be parsed and a static HTML page
created.
  Target   (optional) full URL of page to be displayed in frmae named
TargetName.
  TargetName  (optional) name of the frame that $Target should appear in.
  MainFrame   (optional) is the frame from which header info, etc. is
taken.
  Default is first frame.
  AllHead  (optional) If set (is 1 or more), copies  content from all
frames.
  RenderMethod  (optional) defines how the frameset is to be represented:
1 - All frames dumped into new page in order they appear in
frameset.
2 - tables are used to attempt to recreate original format
  Default is 1.
  LinkSearch  (optional) how links are replaced:
   1 - Only specific tags are replaced
   2 - Anything within quotes (' or ") that contains document path is
replaced
  Default is 1.
  Debug   If set (greater than 0), debug info is added in comments.

It works to a good degree on most frames-based sites, but does have a couple
of failings (such as the one mentioned) that I would like to overcome.

The other problem is handling JavaScript in e.g. .  There is no way to process JavaScript in
PHP that I am aware of - does anyone have a workaround for this?  i.e. so
that my script can process the JavaScript function and retrieve the relevant
page for inclusion in the rendered page.


Hope someone can help!

Thanks.

Dave




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



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




[PHP] graph libs

2003-01-07 Thread Larry Brown
Can anyone give any suggestions on the best/most intuitive tools or
libraries for generating graphs with PHP?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




RE: [PHP] restrictions

2003-01-07 Thread Larry Brown
Just use the smtp server you use for mail.  Oh you might not use smtp for
corporate environment?  Just use something like outlook express or some
other smtp enabled client to send to these various smtp servers you are
trying to use for the php scripts first.  Then if it works with the mail
client then you should reasonably expect the php to work.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Bruce Levick [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 07, 2003 6:19 PM
To: [EMAIL PROTECTED]
Subject: [PHP] restrictions

I find that my the company that I work for is a little over protective.
My machine is quite restricted (as in firewall and accessability) when
it comes to ftp and telnet. Well basically my hands are tied in that
sense.

I am testing my database build on my local machine which runs fine and
all. I am curious though as to how these restrictions may affect my
attempts to send "mail()" I have tried various external SMTP srervers (i
am running off winxp pro) in my php.ini file and I get nothing. Just the
error code I have placed in (below).



Warning: Failed to connect to mailserver, verify your "SMTP" setting in
php.ini in c:\inetpub\wwwroot\_tasks\email.php on line 21
Mail could not be sent...


Would my local machines restrictions be stopping the mail function from
communicating with the SMTP server??

Cheers



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




RE: [PHP] Re: Need a suggestion on developing a php-related system

2003-01-07 Thread Larry Brown
>From the remark about the arrival and departure time scenario, it sounds
like you want to show whether the updates occurred and when they
began/ended.  If this is accurate, you should find out whether the scripts
used to populate those databases record that information for the database it
is updating.  If so you need to create a script that opens each database and
queries that data.  If they do not record these things you could either
modify them to do so or you could have them also connect to a central db
that you create to store this collection of data to show beginning and
ending of the scripts.  I think either way you should store this in your own
db.  Is this along the lines of what you had in mind?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




On 01/08/2003 03:40 AM, Kelvin Poon wrote:
> HI, I am new to PHP and I am just wondering if anyone could give me some
> help.
>
> I am currently working for infomart.ca, it is basically a company that
> sells articles (news/business).  MY employer require me to develop a
> system using Perl and PHP, and the assignment is as follow:
>
> To develop a system that collects, stores, processes and disseminates
> internally the updating status of our databases.
>
> We currently have over 200 databases from various daily newspapers,
> magazines, TV transcripts and other periodicals.  Most of them are
> updated every weekday between 4a.m. and 7a.m..  Others are updated on a
> weekly or monthly basis.  THe update schedule Tv. the actual status need
> to be captured and made available to internal staff.  This is similar to
> the flight departure/arrival information in an airport.








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




RE: [PHP] graph libs

2003-01-08 Thread Larry Brown
This is by no means an advertisement, just one of the results I got looking
around for charts.  The following link lists a few viable solutions.

http://www.hotscripts.com/PHP/Scripts_and_Programs/Graphs_and_Charts/

Jpgraph renders an excellent image from the examples but the prerequisite
packages were many and ultimately the install/readme didn't work for
compiling the package.  I could have looked further and found a solution,
but with the number of prerequisites I dropped it looking for a faster
install.  The next one I came across that gave a reasonable looking chart
was phplot which only requires GD which is stock on my RH distro.  I got it
up and working without any installation (not to mention dependencies).  So I
am up and running quickly and smoothly with phplot.  It's a shame jpgraphs'
dependencies aren't packaged with the distro. The transparent option on the
colors is really smooth and I just don't have the time.  Thanks to all for
suggestions, I still want to look at one other site that was recommended
here on the list.


Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 9:10 AM
To: Larry Brown
Cc: PHP List
Subject: Re: [PHP] graph libs

http://www.aditus.nu/jpgraph/

Larry Brown wrote:

>Can anyone give any suggestions on the best/most intuitive tools or
>libraries for generating graphs with PHP?
>
>Larry S. Brown
>Dimension Networks, Inc.
>(727) 723-8388
>
>
>
>
>
>


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



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




RE: [PHP] graph libs

2003-01-08 Thread Larry Brown
My extreme apologies to jpgraphs.  They are more in line with phplot.  I
might even end up using them instead.  Vagarant is the more difficult
package.  Again, their graph examples are pretty smooth but required a lot
of package/dependency updates to RH.

>This is by no means an advertisement, just one of the results I got looking
around for charts.  The following link lists a few viable
> solutions.

>http://www.hotscripts.com/PHP/Scripts_and_Programs/Graphs_and_Charts/

>Jpgraph renders an excellent image from the examples but the prerequisite
packages were many and ultimately the install/readme didn't work
 >for compiling the package.  I could have looked further and found a
solution, but with the number of prerequisites I dropped it looking for a
 >faster install.  The next one I came across that gave a reasonable looking
chart was phplot which only requires GD which is stock on my RH
 >distro.  I got it up and working without any installation (not to mention
dependencies).  So I am up and running quickly and smoothly with
 >phplot.  It's a shame jpgraphs' dependencies aren't packaged with the
distro. The transparent option on the colors is really smooth and I
 just >don't have the time.  Thanks to all for suggestions, I still want to
look at one other site that was recommended here on the list.



Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388





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




RE: [PHP] Newbee observation

2003-01-09 Thread Larry Brown
Better yet a script should be run to have all the e-mails listed by the time
they were received at the server instead of what time the e-mail was
submitted.  That should take care of it I would think.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Tom Ray [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 12:07 PM
To: Hendrik van Niekerk; [EMAIL PROTECTED]
Subject: Re: [PHP] Newbee observation

Mail servers play a part in this too. Maybe the admins should pack up
their servers and send them back too :)

-Original Message-
From: "Hendrik van Niekerk" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Thu, 9 Jan 2003 11:11:30 -0600
Subject: [PHP] Newbee observation

> Why does the webmaster not reject messages that are dates > today's
> date eq
> there are numerous messages that have dates with year 2010 and up. A
> moron
> who does not have the correct computer date on his machine should pack
> it up
> and send it back to the company that sold it to them.
>
> JMHO
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


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



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




RE: [PHP] newbee

2003-01-09 Thread Larry Brown
Just a thought, set your form to use the get method so that you can see
exactly what the php page is receiving.  Then before any of your existing
code put the first line to "echo $variable;" without the quotes and using
one of the variables being sent and visible in the url.  The page should
then at least show that one variable.  If that doesn't work there is some
problem with the install I would imagine.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Hendrik van Niekerk [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 12:58 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] newbee

Joseph

I can get the errors to go away but then my example just shows a blank page!
The variable are not being passed through to the .php doc

hendrik

"Joseph W. Goff" <[EMAIL PROTECTED]> wrote in message
003201c2b803$ada54f60$bdcaa8c0@jg42000">news:003201c2b803$ada54f60$bdcaa8c0@jg42000...
> This is because of the default error reporting setting in the newer
version
> of php.  This was not the case when your book was written.
> In your php.ini file set error reporting = E_ALL & ~E_NOTICE and you will
> quit getting the 'Undefined Variable' notices.
> - Original Message -
> From: "Hendrik van Niekerk" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, January 09, 2003 10:50 AM
> Subject: [PHP] newbee
>
>
> > Hi
> >
> > I'm very new to PHP. (have just bought the book "PHP and MySQL Web
> > Deelopment") SAMS authors Luke Welling and Laura Thompson
> >
> > I working with the examples in the book.
> >
> > I have loaded MySQL, Apache and PHP onto a NT server. All the test
passed
> as
> > per the examples in the book.
> >
> > Working with the the first example in chapter one.
> >
> > I have the HTML document that when the quantities are entered the
> > "processorder.php" should be called to show the results and do some
calcs.
> >
> > what happens is that the php file is called but I get an error message:
> >
> > "Warning: Undefined variable typeqty in C:\apache
> > group\apache\htdocs\processorder.php on line 23"
> >
> > this varialbe is defined in the html document exactly as in the php
> > document.
> >
> > now this warning is repeated for all the variables that should have been
> > passed to the php for processing.
> >
> > What am I missing ?
> >
> >
> > thank you in advance
> >
> >
> > Hendrik van Niekerk
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>



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



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




RE: [PHP] session_destroy problem

2003-01-10 Thread Larry Brown
Javascript has a function for performing actions on window close.  You could
have a submit action on the page that is sent when the window closes.  I've
not used it yet but it should work I would think.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Scott Fletcher [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 10:58 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] session_destroy problem

Session Destroy will work if you provide the user a way to log out of the
website.  But if the user closed the browser then that's it.  Session
Destory can't be used because the browser is a client side and Session
Destroy is a server side.  So, once the browser close, it doesn't contact
the server before closing.

You're only option is to clean up the session data from the webserver as I
usually have done.  I also use the database to find out about the session id
and the timestamp it was updated.  That way, I will know which session not
to delete if it is active.

"Ken Nagorski" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi there,
>
> So it is the browsers problem. I tested what you said and Mozilla acts as
> you stated and IE does as well. I guess my question is. Is there no way to
> close clear out the session when the user logs out?
>
> The way I set things up the class that I wrote just gets the current
> sessionid and does a select from the database to see if it has been
logged.
> The problem this creates is that someone could sit down and reopen a
> browser and have access to the site as if they where logged because the
> session is not gone.
>
> Hmm - Like a said I have never used sessions before so I am learning about
> them. Thank you for your input...
>
> Ken
>
>
> > What browser are you running?  I find that IE drops the session when
> > you close the browser window actively working the site.  On Mozilla I
> > have to close every instance of Mozilla regardless of the site before
> > it drops the session.  Pretty aggravating so I'm going to have to start
> > working on a method based on responses to your post.
> >
> > Larry S. Brown
> > Dimension Networks, Inc.
> > (727) 723-8388
> >
> > -Original Message-
> > From: Ken Nagorski [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 09, 2003 1:35 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] session_destroy problem
> >
> > Hi there,
> >
> > I have written a class that manages sessions. I have never used
> > sessions before so all this is new to me. Everything works fine as far
> > as starting the session and logging in however when I call sessoin
> > destroy it doesn't seem to work the function returns 1 as it should if
> > all goes well however if I go to another page and do some other
> > browsing even if I close the browser the session still hangs around. Is
> > there something I don't know about sessions? I have read the
> > documentation on the session_destroy function, I don't think that I am
> > missing anything...
> >
> > Anyone have any suggestions? I am totally confused.
> >
> > Thanks
> > Ken
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>



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



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




RE: [PHP] checking status of a HTML checkbox

2003-01-10 Thread Larry Brown
Also look at empty().  I don't know if the $_POST array will send the key if
it as no variable.  I know on a regular post it does send the variable, but
it has no value.  I have used isset with just receiving post data and got
strange results.  On one I had an isset statement that ran a result that
bypassed some code.  When is submitted the form I got results as if the
isset was being executed and the code was skipped.  Just to make sure this
was the case, I added echo "hello"; on the first line of the isset bypass
coding and after running the script I got the results without the bypass.  I
took the hello back out and it bypassed!  So adding the hello statement
affected whether isset gave a positive or negative response.  The variable
isset was checking in this case was not being sent with a value.  I changed
to empty() and got the result I was looking for.  If $_POST sends the key
but not a value when you submit the form without a value assigned to the
variable then isset may not always work.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Shams [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 4:36 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] checking status of a HTML checkbox

thanks a lot, thats what I was looking for

:o)

Shams

"- Edwin" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> "Shams" <[EMAIL PROTECTED]> wrote:
>
> [snip]
> > At the moment I am doing this:
> >
> > if ( $_POST["insurance"] == "yes" )
> > {
> > }
> >
> > But is there a more "accurate" way of checking the exsistence of
> > "insurance"?
> [/snip]
>
> I think you're looking for isset():
>
>   http://www.php.net/manual/en/function.isset.php
>
> - E
>
> __
> Do You Yahoo!?
> Yahoo! BB is Broadband by Yahoo!  http://bb.yahoo.co.jp/
>



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



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




RE: [PHP] session_destroy problem

2003-01-10 Thread Larry Brown
Question...Do you know if Mozilla runs a browser instance that might handle
the process after one of the browser windows is closed?  Right now the
situation is that IE closes the session when the window that opened it
closes.  I have a site that is authenticated and then runs sessions on the
authenticated user.  If you close the browser window and open another one,
you are prompted for the login and password and have your new
identity/session.  On Mozilla if I close the window actively on the site and
have other windows up on other sites I can open another Mozilla instance and
return to the site and it still has my session open and identity.  I have to
close every Mozilla instance for the session to close.  If Mozilla is run by
one central process I would think maybe it could do this onwindowclose
behaviour?  Maybe a good question for the Javascript list but since it
sounds like you guys have seen this tried before maybe you already know.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Scott Fletcher [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 12:02 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] session_destroy problem

Yes, the JavaScript code can run before the browser is closed but it would
not be finish running because the browser closing had been executed.
Someone had tried it before and struggled with it.   But that is a good
advice, thanks for jumping in.

"Tamas Arpad" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Friday 10 January 2003 17:39, Scott Fletcher wrote:
> > Javascript has a function for performing actions on window close
> That would work only if the webserver IP address is '127.0.0.1' (local
> machine), but not any other IP address.  Because of the ACK synchrious
> communication that get interrupted as result of the browser closing.
I think the javascrit code runs before the browser is closed, other way what
would run it?

Arpi



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



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




RE: [PHP] session_destroy problem

2003-01-10 Thread Larry Brown
It helps for me being able to re-login as a different user.  It's a good
idea but it still leaves a bit to be desired for security.  I'm going to
also post this to the js list and see if they've worked with it before.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Scott Fletcher [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 12:35 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] session_destroy problem

You meant the tab browers.  Like 2 tabs...  I haven't tried it but now that
you mentioned it, I'm going to have to look at it soon.  I do noticed one
thing, the status bar, if it have comments, it will show up on other tabs
even though it is a completely a different website.  I get the impression
that it doesn't seem to be as independent of each other, know what I meant?

What I did with the php script is to expire the session first, at the
beginning of hte webpage before the login page showed up and before
attempting to create a session.  Maybe this will help a little bit.

"Larry Brown" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Question...Do you know if Mozilla runs a browser instance that might
handle
> the process after one of the browser windows is closed?  Right now the
> situation is that IE closes the session when the window that opened it
> closes.  I have a site that is authenticated and then runs sessions on the
> authenticated user.  If you close the browser window and open another one,
> you are prompted for the login and password and have your new
> identity/session.  On Mozilla if I close the window actively on the site
and
> have other windows up on other sites I can open another Mozilla instance
and
> return to the site and it still has my session open and identity.  I have
to
> close every Mozilla instance for the session to close.  If Mozilla is run
by
> one central process I would think maybe it could do this onwindowclose
> behaviour?  Maybe a good question for the Javascript list but since it
> sounds like you guys have seen this tried before maybe you already know.
>
> Larry S. Brown
> Dimension Networks, Inc.
> (727) 723-8388
>
> -Original Message-
> From: Scott Fletcher [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 10, 2003 12:02 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] session_destroy problem
>
> Yes, the JavaScript code can run before the browser is closed but it would
> not be finish running because the browser closing had been executed.
> Someone had tried it before and struggled with it.   But that is a good
> advice, thanks for jumping in.
>
> "Tamas Arpad" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Friday 10 January 2003 17:39, Scott Fletcher wrote:
> > > Javascript has a function for performing actions on window close
> > That would work only if the webserver IP address is '127.0.0.1' (local
> > machine), but not any other IP address.  Because of the ACK synchrious
> > communication that get interrupted as result of the browser closing.
> I think the javascrit code runs before the browser is closed, other way
what
> would run it?
>
> Arpi
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



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



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




RE: [PHP] checking status of a HTML checkbox

2003-01-10 Thread Larry Brown
My apologies for deficient terminology.  I define a "regular post" as the
original   with globals on and the
somewebpage.php using the variable sent without using $_POST.  But I bet you
already knew that :)  You asked for the code...

My first page has ...
...
echo "";
  echo "";
?>

 -  - 

...
my second page has...
...
if(isset($SSN1) )
{
   header( "Location:
".$site."newplace.html?SSN1=".$SSN1."&SSN2=".$S
SN2."&SSN3=".$SSN3."");
}
...

End result being that if they used the text input they would continue with
the second page, skipping the new header.  I could put a value in the text
and leave SSN alone and get sent to the new header.  If I put a value in
SSN1 I would go to the new header.  If I put the echo "hello"; before the
header line and leave use the search text box leaving SSN1 blank I would not
get the new header.  If I used the SSN1 I would get hello and then an error
message that the header had already been sent which is what I expected.
However, upon removing the hello line again, it went right back to sending
the new header whether SSN1 was used or not.  Changing the if to reflect
if($SSN1 > 0) it works as intended except that some SSN's have leading 0's
for their first 3 digits so I am about to use empty().  The > 0 was a quick
fix since they needed to use it immediately.

PS you'll have to contend with "..." as these scripts 242 and  409 lines
long respectively.  I can assure you that the form is properly closed on the
sending page though.


Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of - Edwin
Sent: Friday, January 10, 2003 1:00 PM
To: Larry Brown; Shams
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] checking status of a HTML checkbox

"Larry Brown" <[EMAIL PROTECTED]> wrote:
> Also look at empty().  I don't know if the $_POST array will send the
> key if it as no variable.  I know on a regular post it does send the
> variable, but it has no value.

What's a "regular post" anyway?

Well, the key is passed even when there's even though the field might be
empty.

> I have used isset with just receiving post data and got
> strange results.  On one I had an isset statement that ran a result
> that

Maybe you can post the code--I'm sure somebody here can fix it...

...[snip]...

> then isset may not always work.

At least not in my experience--it always served its purpose ;)

- E

...[snip]...
__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!  http://bb.yahoo.co.jp/



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




RE: [PHP] session_destroy problem

2003-01-10 Thread Larry Brown
You da man.  Unload is perfect.  If the problem he mentioned before prevents
the browser from finishing its communication with the server you can always
send a wait command with sufficient time for things to finish up.  I'll
start testing in a live environment with it now.  Thank you for the help.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Tamás Árpád [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 8:03 PM
To: Larry Brown; Scott Fletcher; PHP List
Subject: Re: [PHP] session_destroy problem

> Yes, the JavaScript code can run before the browser is closed but it would
> not be finish running because the browser closing had been executed.
> Someone had tried it before and struggled with it.   But that is a good
> advice, thanks for jumping in.
I really doubt that browsers doesn't run the code that is in unload event of
the page because the window is closed. That would be a very bad thing. Isn't
it what the unload event is for? I mean to run code when the page is
unloaded, it doesn't matter if the window is being closed or the user is
going to another page. I think the browser should finish all the opened
window's unload code and only after that close the application really.
I made a quick test for it:



function wait(msec){
 var enter_date = new Date();
 var enter_time = enter_date.getTime();

 var leave_date = new Date();
 var leave_time = leave_date.getTime();

 while (enter_time + msec > leave_time)
 {
  leave_date = new Date();
  leave_time = leave_date.getTime();
 }
 alert('unload test');
}




 unload test

http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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




RE: [PHP] session_destroy problem

2003-01-14 Thread Larry Brown
For those who don't mind working with Javascript I have found a method of
maintaining the sessions to a minimum length.  According to the Javascript
list there is no way to get the url of the site the user is going to next so
there is no way to tell if the onunload is due to a site change or the
movement from one page on your site to another.  So here is my solution...

When the user logs on they are given a code that is derived from the time of
login.  Each pages checks that the decoded number results in a time of less
than 8 hours from login.  If it is greater than 8 they are just prompted to
re-login.  There will be a database entry for each time a page is loaded by
the same user.  This time is checked periodically, every 5 minutes should
do.  If they have not loaded a page in the last 5 minutes the session is
removed.  Now, each page that does not post anything will have a refresh set
to 3 minutes so that people that have their browser set to the site in the
background while they work on other programs etc. won't get kicked off.

This has just been arrived at to solve the session destroy problem but it
looks like it will work.  I also don't know what this would do to a high
volume site either but for me it should be workable.  I hope this helps
some.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388





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




[PHP] emacs and php markup

2003-01-15 Thread Larry Brown
Does anyone out there use emacs and are proficient in customizing it?  I
love the highlighting it does while working on .php files.  However, I
usually use different extensions on my files than .php so is there a way to
tell emacs to treat certain extensions as php?  This would help out
immensely!

TIA

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




RE: [PHP] PDF

2003-01-17 Thread Larry Brown
According to pdflib their commercial version gives you the ability to edit
pdf files using the PDI library.  Have you looked at this?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Brian McGarvie [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 17, 2003 7:23 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] PDF

I'm looking to find out if PHP has the ability to do this...

OK I'm looking for a solution that could do the following.

We require to generate PDF files that can then be emailed or printed &
posted to clients.

I can create PDF Files from scratch using PDFLib.

What we will require to do though is, we presently have paper copies of
forms from various parties we deal with, our present Access-based system
simply prints on top of these, I am presently developing in PHP a system to
replace the Access database, we will want it to create these as PDF files
(we can get the printed forms in PDF format) based on supplied PDF files...
for example, generate a PDF for Customer X based on Supplier Z's PDF file.

Any solutions in PHP (open source, free, commercial etc etc.) would be very
much appreciated, or if we need to look at another Language to perform this
part of the solution (i.e. ASP).

The solution I'm developing is PHP, running on a Windows 2000 Server as we
require use of some windows-only software too. So if *cough* ASP is what's
needed to do the above then so be it :\ - really hope not though!!!

Thanks in advance!


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.438 / Virus Database: 246 - Release Date: 07/01/03



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



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




RE: [PHP] PHP Encoders and GPL License

2003-01-19 Thread Larry Brown
I just want to clarify this for myself.  My impression was that the affects
of GPL requiring software developed from the original GPL to also be free
was only applicable to modifications of the program itself.  So if php was
GPL and I modified the source and built my own customized version of php I
couldn't sell it but could only give it away, but if I used php to develop
some other software that runs on php I could sell it without a problem.
Similar to creating software that runs on Linux, the software can be sold
but if I modify Linux itself and turn around and sell it, it would be
against the license.  Is this accurate?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Zeev Suraski [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 19, 2003 6:40 AM
To: [-^-!-%-
Cc: PHP general list
Subject: Re: [PHP] PHP Encoders and GPL License

At 02:45 18/01/2003, [-^-!-%- wrote:

>Food for thought:
>
>As I look through the Zend website, and applaud their efforts to create
>'protected' php applications, I can't help but wonder about the impact
>(or lagality) or their efforts.  Doesn't the use of the Zend Encoder (or
>any other PHP Encoders out there) violate the GPL License or the whole Open
>Source Concept?
>
>As far as I understand it, the GPL License states that the source code
>of any product created from an open source solutions, or is derived from
>the work of an open solutions, must be made availabe to all users.
>
>Since PHP itself is open source, then wouldn't that prohibit a developer
>from encoding any PHP product?
>
>Please correct me, if I'm wrong. I'm just curious.

You're wrong for two reasons:
[1] As other people mentioned here, PHP (or in that case, the Zend Engine,
PHP's core) is not under the GPL license.  Since it is under a BSD style
license, people are free to use it for commercial ventures in any and all
levels.
[2] Even if the Zend Engine was under the GPL, the authors of the software
always have the right to use their software in whatever way they see fit,
and relicense it under any other licenses.  In this case, the author of the
Zend Engine is the same as one that publishes the Zend Encoder, so there's
really no problem at all.

Zeev


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



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




[PHP] dreading OOP

2003-01-21 Thread Larry Brown
I hope this is not too far OT, however, you are the best resource I have for
PHP and if anyone would know, it would be you guys.  I have been writing
scripts off and on for the past year and have an application written in PHP
for a business' internal use.  I have used snippets of Object oriented code
from other people here and there to get by and I have read information on
OOP in a couple of different places.  However, my mind apparently works
different and I keep trying to relate the OOP structure to what I already
know which equates an object to a function.  I am resolving to purchase a
book dedicated to instruction in the inns and outs of OOP.  Specifically at
it relates to PHP would be great but my emphasis is towards something that
teaches someone that is stubborn in his reliance on previously learned
methods.  I hope this makes sense and I'm not alone on this. :)  Any
suggestions would be greatly appreciated!

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




RE: [PHP] dreading OOP

2003-01-21 Thread Larry Brown
The only reason I feel the need to expand my understanding is that I have to
learn other concepts to produce my client's solutions.  For instance I am
now being asked to use SOAP to communicate with a vendor of his.  Now I am
reading about SOAP and frequently the descriptions rely on the reader's
understanding of OOP.  I can individually scrutinize a description and break
it down to its elements.  Then I can picture what is being said, but without
having used those methods in my code, it is frustrating reading.  I don't
know that SOAP is in and of itself OOP but people that write about it use
OOP based consepts to exlain what is happening.  And this is one example.
Don't let me go into the Java and Javascript world!

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Johnson, Kirk [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 10:40 AM
To: PHP List
Subject: RE: [PHP] dreading OOP


> -Original Message-
>
>However, my mind apparently works different and I keep trying to relate the
OOP structure to
> what I already know which equates an object to a function.  I am resolving

> to purchase a book dedicated to instruction in the inns and outs of OOP.
> Specifically at it relates to PHP would be great but my emphasis is
towards
> something that teaches someone that is stubborn in his reliance on
previously learned
> methods.  I hope this makes sense and I'm not alone on this. :)

My only suggestion is that you re-consider why you want to take up OOP. If a
procedural approach works for you, go with it. It's not like we're building
air traffic control systems here ;)

Kirk

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



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




RE: [PHP] Re:[PHP] dreading OOP

2003-01-21 Thread Larry Brown
Thank you, I'll check this book out.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Sukrit [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 12:39 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re:[PHP] dreading OOP

>>>>> "Larry" == Larry Brown <[EMAIL PROTECTED]> writes:

Larry> places.  However, my mind apparently works different and I
Larry> keep trying to relate the OOP structure to what I already
Larry> know which equates an object to a function.  I am resolving

This happens a lot with me too :)

Larry> to purchase a book dedicated to instruction in the inns and
Larry> outs of OOP.  Specifically at it relates to PHP would be
Larry> great but my emphasis is towards something that teaches
Larry> someone that is stubborn in his reliance on previously
Larry> learned methods.  I hope this makes sense and I'm not alone
Larry> on this. :) Any suggestions would be greatly appreciated!

i am having a hard time with OOP too. i did buy a book Object Oriented
Analysis and Design Andrew Haigh. Well, it doesn't have PHP but it's
otherwise very lucid and clear. It also covers UML. Haven't read much
of it till now but i think it might help you.

Learning to think in terms of object is really diffucult imho, for
someone who is still stuck in the older procedural paradigm like
us. It'll take time.

Wishing us all OO enlightenment :)
regards
sukrit


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



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




[PHP] mysql query manipulation vs php results manipulation

2003-02-19 Thread Larry Brown
How do you determine whether or not it is faster/more efficient to run a
complicated query or to run multiple simple queries and join / manipulate
the results with PHP?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




RE: [PHP] mysql query manipulation vs php results manipulation

2003-02-19 Thread Larry Brown
My apologies for the prior html version, I forgot to change back to txt.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388



On Wed, 19 Feb 2003, Larry Brown wrote:

> How do you determine whether or not it is faster/more efficient to run a
> complicated query or to run multiple simple queries and join / manipulate
> the results with PHP?

 



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




RE: [PHP] MAC address user recognition?

2003-02-21 Thread Larry Brown
One other thing you could do is simply set up SSL with your own certificate
so that it will encrypt the connection and then run code via JAVA or some
other client side applet that will get the MAC address from the client
machine directly.  You can then check the MAC against the addresses allowed.
Since the connection is encrypted nobody knows that that is what you are
checking.  Of course there is still a potential for someone that you
previously allowed access to find out how you are identifying them and use
it against you later on, but there are also problems with identifying
someone by their computer unless they keep the computer locked in a closet
while they are away.  I guess it depends on what you are protecting.
National secrets etc.  By the way, open SSL with self signed certs is a free
method but it is not a good idea if you are needing to verify your
credentials to the person coming in.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Leo Spalteholz [mailto:[EMAIL PROTECTED]
Sent: Friday, February 21, 2003 12:59 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] MAC address user recognition?

On February 20, 2003 08:13 pm, Jason Sheets wrote:
> MAC addresses are used for on a LAN and not the Internet.  Using a
> MAC address might work for identification on a LAN BUT in most
> operating systems you can easily change the effective MAC address
> on the card.

Good call.  I thought there was some fundemental problem I just
couldn't remember enough from my networking class to put my finger on
it.

> It would probably be better to look for some other form of
> identification like SSL certificates or a cookie with the secure
> bit on so it will only be sent over an SSL connection.

Yeah I'm not super concerned about security and such, this is only a
personal page so something simple will do the job.  I think I'll just
end up hacking together my own encryption algorithm and then storing
encrypted passwords in a cookie.
Hehe.  Security through obscurity, everyones favorite way :)

Thanks,
Leo

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



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



RE: [PHP] and

2003-02-23 Thread Larry Brown
The onClick should be onClick=window.location("newpage.php") and this has
nothing to do with php.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 12:15 AM
To: Sunfire
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP]  and 

This has nothing to do with PHP, but a button is used to submit a form.
 You'll have to create a form with its action set to the page to direct to.

Sunfire wrote:

>hi..
>
>i have a button on a web page that is supposted to go to another web page
>when either clicked with a mouse or when someone presses enter on it.. :
>
>post a prayer
>
>that is my basic code for the button... my problem is the fact that when
you
>click the button or hit enter on it all it does is refresh the page if it
>even does that.  how would i actually make this button load another page
>using php??
>
>tnx
>
>
>
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003
>
>
>
>

--
The above message is encrypted with double rot13 encoding.  Any unauthorized
attempt to decrypt it will be prosecuted to the full extent of the law.




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



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



RE: [PHP] Emacs?

2003-02-26 Thread Larry Brown
25

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Sascha Braun [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 12:00 PM
To: PHP General list
Subject: [PHP] Emacs?

How many Persons in this List are using Emacs as there default Editor?

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



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



RE: [PHP] Emacs?

2003-02-27 Thread Larry Brown
Oops...I stand corrected.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Matt Giddings [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 27, 2003 12:26 AM
To: 'Larry Brown'; 'PHP List'
Subject: RE: [PHP] Emacs?

Don't you mean 42?

> -Original Message-
> From: Larry Brown [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 26, 2003 7:55 PM
> To: PHP List
> Subject: RE: [PHP] Emacs?
>
> 25
>
> -Original Message-
> From: Sascha Braun [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 25, 2003 12:00 PM
> To: PHP General list
> Subject: [PHP] Emacs?
>
> How many Persons in this List are using Emacs as there default Editor?
>

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 2/25/2003



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



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



[PHP] deciperhing oop

2003-03-03 Thread Larry Brown
Can someone who is used to using php oop help me figure out why this fails?
I know there are probably a thousand classes already designed to do this and
probably 100 times more efficient, but this is how I learn.  From what I've
read this should work but there is obviously something I'm missing.

Quick problem description:
Trying to set up class to connect to mysql db.  Already used a procedural
test successfully connecting to db.  Error is displayed as...

Warning: mysql_select_db(): supplied argument is not a valid MySQL - Link
resource in /var/www/html/oop.php on line 67
Database Selection to main failed.

Code:

Class dbConnect
{
var $machine;
var $port;
var $user;
var $password;
var $query;
var $result;
var $dbase;
var $db;
var $sel;

function dbConnect($machine,$port,$user,$password)
{
$this->machine = $machine;
$this->port = $port;
$this->user = $user;
$this->password = $password;

$db = mysql_pconnect ("$machine","$user","$password")
if (!$db)
{
die ("Initial connection to DB failed.")
}
$this->db = $db;
}
function setDbase($dbase)
{
$this->dbase = $dbase;

$sel = mysql_select_db("$dbase",$db);
if(!$db)
{
die ("Database Selection to $dbase failed.");
}
}
}

$dbn = new dbConnect("localhost","3306","bob","hjhyt4kl5");

$dbn->setDbase("main");






So why can't I use $db?  Isn't the statement $this->db=$db making it
available to the setDbase function?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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



RE: [PHP] deciperhing oop

2003-03-03 Thread Larry Brown
Thank you everyone for helping.  I didn't know you have to put $this-> in
front of all variables in the class.  You learn something new every day ( I
thought you only needed to use that once to make the variable available
everywhere in the class up till now).

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Jim Lucas [mailto:[EMAIL PROTECTED]
Sent: Monday, March 03, 2003 6:50 PM
To: Larry Brown; PHP List
Subject: Re: [PHP] deciperhing oop

the second argument in the mysql_select_db call in not in scope.

you should be using $this->db instead of $db

Jim
- Original Message -----
From: "Larry Brown" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>
Sent: Monday, March 03, 2003 2:52 PM
Subject: [PHP] deciperhing oop


> Can someone who is used to using php oop help me figure out why this
fails?
> I know there are probably a thousand classes already designed to do this
and
> probably 100 times more efficient, but this is how I learn.  From what
I've
> read this should work but there is obviously something I'm missing.
>
> Quick problem description:
> Trying to set up class to connect to mysql db.  Already used a procedural
> test successfully connecting to db.  Error is displayed as...
>
> Warning: mysql_select_db(): supplied argument is not a valid MySQL - Link
> resource in /var/www/html/oop.php on line 67
> Database Selection to main failed.
>
> Code:
>
> Class dbConnect
> {
> var $machine;
> var $port;
> var $user;
> var $password;
> var $query;
> var $result;
> var $dbase;
> var $db;
> var $sel;
>
> function dbConnect($machine,$port,$user,$password)
> {
> $this->machine = $machine;
> $this->port = $port;
> $this->user = $user;
> $this->password = $password;
>
> $db = mysql_pconnect ("$machine","$user","$password")
> if (!$db)
> {
> die ("Initial connection to DB failed.")
> }
> $this->db = $db;
> }
> function setDbase($dbase)
> {
> $this->dbase = $dbase;
>
> $sel = mysql_select_db("$dbase",$db);
> if(!$db)
> {
> die ("Database Selection to $dbase failed.");
> }
> }
> }
>
> $dbn = new dbConnect("localhost","3306","bob","hjhyt4kl5");
>
> $dbn->setDbase("main");
>
>
>
>
>
>
> So why can't I use $db?  Isn't the statement $this->db=$db making it
> available to the setDbase function?
>
> Larry S. Brown
> Dimension Networks, Inc.
> (727) 723-8388
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>




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



[PHP] Version 5?

2003-03-06 Thread Larry Brown
Someone mentioned a facet of version 5 to be expected that I am really
looking forward to.  Does anyone know what the release target date is?  I
didn’t see any mention of it on php.net.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388



[PHP] table cell space under image in IE

2003-03-13 Thread Larry Brown
Has anyone had to address this problem before?  I've created a table and
placed an image inside.  The image is around 12 pxl high and when the table
is displayed in Mozilla the cell border is up against the image on all
sides.  On IE however, the top of the image is up against the cell border
but the bottom has aprox 10pxl of space.  It is only there with the images,
only under the image, and only in IE (I've only checked v6).  If anyone has
seen this and has an idea of how to fix it, PLEASE let me know.  I've tried
setting cellspacing=0, cellpadding=0, and setting spacing to a range of
sized to see the effect and the smallest size it will move to is approx
10pxls below the bottom of the image.  Very frustrating!

I know this is not exactly on topic but I produce all html by php and I
don't want to go out and add myself to an html list (if there is such a
thing).

TIA

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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



RE: [PHP] table cell space under image in IE

2003-03-13 Thread Larry Brown
Here is essentially what view source yields.  I have to use 

1 - 50
https://website/file.php"; METHOD="post">










Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 12:07 PM
To: Larry Brown; PHP List
Subject: Re: [PHP] table cell space under image in IE

> Has anyone had to address this problem before?  I've created a table and
> placed an image inside.  The image is around 12 pxl high and when the
table
> is displayed in Mozilla the cell border is up against the image on all
> sides.  On IE however, the top of the image is up against the cell border
> but the bottom has aprox 10pxl of space.  It is only there with the
images,
> only under the image, and only in IE (I've only checked v6).  If anyone
has
> seen this and has an idea of how to fix it, PLEASE let me know.  I've
tried
> setting cellspacing=0, cellpadding=0, and setting spacing to a range of
> sized to see the effect and the smallest size it will move to is approx
> 10pxls below the bottom of the image.  Very frustrating!

Do you have your code like  with no other whitespace? IE might
be displaying a space or whitespace for some reason, whereas other browsers
will ignore it.

> I know this is not exactly on topic but I produce all html by php and I
> don't want to go out and add myself to an html list (if there is such a
> thing).

Oh man... How horrible would that be?!? an HTML list???

---John Holmes...



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



RE: [PHP] Re: table cell space under image in IE

2003-03-13 Thread Larry Brown
I just posted the code and have the tags on separate lines for clarity, but
in the source they are on the same line with no space between the tags.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Roman Sanchez [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 12:11 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: table cell space under image in IE

If you write




the CR-LF before  counts as an space wich wraps to the next line. It
might be helpful to write

 (in the same line)

instead.

> I know this is not exactly on topic but I produce all html by php and I
> don't want to go out and add myself to an html list (if there is such a
> thing).

Frankly, it´s not on topic at all and no matter how you produce the final
html output you should know how to deal with it.





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



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



RE: [PHP] table cell space under image in IE

2003-03-13 Thread Larry Brown
What kind of @%#$%#! is that?  Why would they have  take up visible
space? Hmm, I guess I'll have to find a new angle or hide the closing form
beyond the table.  Thanks...

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Roman Sanchez [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 12:40 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] table cell space under image in IE

> 
> 
> 1 - 50
> https://website/file.php"; METHOD="post">
> 
> 
> 
> 
>  onClick=document.Second.submit(); onMouseOver="change_it('pic3')"
> onMouseOut="change_back('pic3')">
> 
> 
> 

You don'y say which cell has the problem but, apart from placing the closing
td right after the image try to move the closing form tag out from the
table. At least in IE,  _allways_ produces that extra space no matter
what you do unless you use style sheets to set the form's bottom-margin
yourself.



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



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



[PHP] php mysql array question

2003-07-11 Thread Larry Brown
Is there any php function to pull a query into an array?  I know there is a
way to get the first row of the results in an array, but I'm having to loop
through each row pushing the row onto an array to get the result I'm looking
for and it seems like a lot of code for something that I would think is used
a lot.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388



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



[PHP] Client script opensource plea

2003-07-13 Thread Larry Brown
This, most certainly OT, is a plea for fellow developers oriented in
OpenSource solutions to help resolve a problem in case you have dealt with
it before.  I have written a PHP app that uses function keys at times to
help speed data processing for my client VIA javascript.  This app works
fine when the client is using IE or Netscape on the windows platform.
However, when the client is on Linux, the function keys are not being
captured on Mozilla or Netscape.  I presented this problem in my Javascript
mailing list and on the RedHat mailing list and no one seems to have had any
experience dealing with it and consequently I haven't a work around.  My
apologies for presenting a clearly OT question, but I know there are a ton
of experienced developers here and I reaching for someone who might have
dealt with this.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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



[PHP] console script html tags?

2003-07-14 Thread Larry Brown
How can I rid myself of the html tags around error messages when writing
console scripts?  (Besides avoiding errors)

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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



[PHP] else needed?

2003-07-19 Thread Larry Brown
On if statements, I periodically don't want anything to happen if the
requisite is not met.  In most cases just writing the statement in the
format if (this) { do that; } and nothing more will work.  However, I
periodically get weird results with this and found the only fix was to do
a... if (this) {do that;}else{"echo "";}

I try using continue in the else but get errors about using continue on
level 1 or something to that affect.  I'm assuming that continue is only
used in loops.

It's amazing how far I can code things without these little "foundation
level" bits of information ;-)

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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



[PHP] IE Pagelength issue

2003-06-07 Thread Larry Brown
I am running into a strange problem.  I have a script that parses a database
for results.  It cycles through the data one record at a time looking for
matches to the query.  Up til now I haven't had any problems as the results
have been limited in length.  Now I have one that has a significant length
and the bottom is cut off on IE6.  I haven't tried any earlier versions of
IE but Mozilla loads the entire page without this problem.  Has anyone run
across this?  Is there a way around it?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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



RE: [PHP] IE Pagelength issue

2003-06-07 Thread Larry Brown
Just as an additional note:  the page has one continuous table so another
potential problem would be a limit to the length of a table?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Saturday, June 07, 2003 1:55 PM
To: PHP List
Subject: [PHP] IE Pagelength issue

I am running into a strange problem.  I have a script that parses a database
for results.  It cycles through the data one record at a time looking for
matches to the query.  Up til now I haven't had any problems as the results
have been limited in length.  Now I have one that has a significant length
and the bottom is cut off on IE6.  I haven't tried any earlier versions of
IE but Mozilla loads the entire page without this problem.  Has anyone run
across this?  Is there a way around it?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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



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



[PHP] mysql field getting cut off

2003-05-30 Thread Larry Brown
If anyone can help I seem to be stuck on a problem getting a mysql field
inserted correctly.  For instance the first page would have a field such
as...



info that is placed into the field is "St. Petersburg, FL" (without the
quotes)

the php code for the statement...

$query = "insert into table values( $variable, '$field', $variable2 )";

This is where there are 3 fields in the "table" and the second is the one I
want populated with "St. Petersburg, FL".  It ends up with "St." (I'm not
sure if the period makes it).  I have verified that the entire statement
arrives at the php script in the variable $field and I have used the mysql
client to give the same command with "St. Petersburg, FL" as the value and
it accepts it without a problem.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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



RE: [PHP] mysql field getting cut off

2003-05-30 Thread Larry Brown
That, indirectly, is exactly what happened.  I have a subsequent screen for
modifying the results.  I must have gone back into that screen to change
something else and since it only pulled the St. when I applied it it changed
the field in the database.  Thanks a lot.  It seemed weird.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 29, 2003 9:44 PM
To: 'Larry Brown'; 'PHP List'
Subject: RE: [PHP] mysql field getting cut off

> If anyone can help I seem to be stuck on a problem getting a mysql
field
> inserted correctly.  For instance the first page would have a field
such
> as...
>
> 
>
> info that is placed into the field is "St. Petersburg, FL" (without
the
> quotes)
>
> the php code for the statement...
>
> $query = "insert into table values( $variable, '$field', $variable2
)";
>
> This is where there are 3 fields in the "table" and the second is the
one
> I
> want populated with "St. Petersburg, FL".  It ends up with "St." (I'm
not
> sure if the period makes it).  I have verified that the entire
statement
> arrives at the php script in the variable $field and I have used the
mysql
> client to give the same command with "St. Petersburg, FL" as the value
and
> it accepts it without a problem.

When you run a SELECT from the command line, do you only see "St." in
the column? What kind of column is it?

Are you sure it's not fine in the database and you're just showing it
like:



which will end up like



and will only show "St." in the text box...

---John W. Holmes...

Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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



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



RE: [PHP] IE Pagelength issue

2003-06-07 Thread Larry Brown
Example is a page that displays the concerts and bands at each concert for a
given spectator. Table one gives information on the spectator and has a
field that lists the concert events he/she has been to.  Table two lists
concerts along with location information and date along with bands and then
another table that lists band information.  There are several loops, the
first one is "while $spectator..." and within it a "while $concert..." and
within it a "while $band..."  So the resulting page can have user
information then a list with concert bands, concert bands, concert bands,
for each he/she has been to.  The one we are having a problem with has 27
concerts and IE stops at 25 and Mozilla goes all the way to the 27th.  I
will try and split each concert into its own table.  Just as a not each
concert listed gives the option to edit the concert information and a way to
edit the band information in addition to removing any one of them.  So there
are various buttons throughout.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Saturday, June 07, 2003 6:08 PM
To: 'Larry Brown'; 'PHP List'
Subject: RE: [PHP] IE Pagelength issue

> I am running into a strange problem.  I have a script that parses a
> database
> for results.  It cycles through the data one record at a time looking
for
> matches to the query.  Up til now I haven't had any problems as the
> results
> have been limited in length.  Now I have one that has a significant
length
> and the bottom is cut off on IE6.  I haven't tried any earlier
versions of
> IE but Mozilla loads the entire page without this problem.  Has anyone
run
> across this?  Is there a way around it?

> Just as an additional note:  the page has one continuous table so
another
> potential problem would be a limit to the length of a table?

Probably and IE "feature" of only being able to handle a certain table
size.

The "way around" it would be to end the table and start another every so
many rows... or split your rows up into Prev/Next pages...

Did I read correctly that you're selecting an entire database and then
using PHP to match criteria? Are you using a WHERE clause to do the
sorting? Sounds like you may be going about this the wrong way... if
not, carry on.

---John W. Holmes...

Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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



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



RE: [PHP] IE Pagelength issue

2003-06-08 Thread Larry Brown
Yes, the entire page is visible when selecting view source.  And again, it
does view ok in Mozilla.  I will try breaking the table into smaller tables
and see if that is it.  I won't have access till Tuesday.  If anyone has any
other ideas feel free to throw in.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Saturday, June 07, 2003 9:37 PM
To: 'Larry Brown'; 'PHP List'
Subject: RE: [PHP] IE Pagelength issue

If you "view source" in IE, do you see the entire page? If so, then it's
an IE display issue.

---John W. Holmes...

Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/

> -----Original Message-
> From: Larry Brown [mailto:[EMAIL PROTECTED]
> Sent: Saturday, June 07, 2003 7:30 PM
> To: [EMAIL PROTECTED]; PHP List
> Subject: RE: [PHP] IE Pagelength issue
>
> Example is a page that displays the concerts and bands at each concert
for
> a
> given spectator. Table one gives information on the spectator and has
a
> field that lists the concert events he/she has been to.  Table two
lists
> concerts along with location information and date along with bands and
> then
> another table that lists band information.  There are several loops,
the
> first one is "while $spectator..." and within it a "while $concert..."
and
> within it a "while $band..."  So the resulting page can have user
> information then a list with concert bands, concert bands, concert
bands,
> for each he/she has been to.  The one we are having a problem with has
27
> concerts and IE stops at 25 and Mozilla goes all the way to the 27th.
I
> will try and split each concert into its own table.  Just as a not
each
> concert listed gives the option to edit the concert information and a
way
> to
> edit the band information in addition to removing any one of them.  So
> there
> are various buttons throughout.
>
> Larry S. Brown
> Dimension Networks, Inc.
> (727) 723-8388
>
> -Original Message-
> From: John W. Holmes [mailto:[EMAIL PROTECTED]
> Sent: Saturday, June 07, 2003 6:08 PM
> To: 'Larry Brown'; 'PHP List'
> Subject: RE: [PHP] IE Pagelength issue
>
> > I am running into a strange problem.  I have a script that parses a
> > database
> > for results.  It cycles through the data one record at a time
looking
> for
> > matches to the query.  Up til now I haven't had any problems as the
> > results
> > have been limited in length.  Now I have one that has a significant
> length
> > and the bottom is cut off on IE6.  I haven't tried any earlier
> versions of
> > IE but Mozilla loads the entire page without this problem.  Has
anyone
> run
> > across this?  Is there a way around it?
>
> > Just as an additional note:  the page has one continuous table so
> another
> > potential problem would be a limit to the length of a table?
>
> Probably and IE "feature" of only being able to handle a certain table
> size.
>
> The "way around" it would be to end the table and start another every
so
> many rows... or split your rows up into Prev/Next pages...
>
> Did I read correctly that you're selecting an entire database and then
> using PHP to match criteria? Are you using a WHERE clause to do the
> sorting? Sounds like you may be going about this the wrong way... if
> not, carry on.
>
> ---John W. Holmes...
>
> Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
>
> PHP Architect - A monthly magazine for PHP Professionals. Get your
copy
> today. http://www.phparch.com/
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>




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



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



RE: [PHP] IE Pagelength issue

2003-06-09 Thread Larry Brown
I found the problem.  The script was creating each table within the previous
table.  Apparently there is a limit of 25 nested levels for IE.  I separated
each table and it loads all of them ok.

Thanks John,

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Sunday, June 08, 2003 8:48 PM
To: PHP List
Subject: RE: [PHP] IE Pagelength issue

Yes, the entire page is visible when selecting view source.  And again, it
does view ok in Mozilla.  I will try breaking the table into smaller tables
and see if that is it.  I won't have access till Tuesday.  If anyone has any
other ideas feel free to throw in.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Saturday, June 07, 2003 9:37 PM
To: 'Larry Brown'; 'PHP List'
Subject: RE: [PHP] IE Pagelength issue

If you "view source" in IE, do you see the entire page? If so, then it's
an IE display issue.

---John W. Holmes...

Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/

> -----Original Message-
> From: Larry Brown [mailto:[EMAIL PROTECTED]
> Sent: Saturday, June 07, 2003 7:30 PM
> To: [EMAIL PROTECTED]; PHP List
> Subject: RE: [PHP] IE Pagelength issue
>
> Example is a page that displays the concerts and bands at each concert
for
> a
> given spectator. Table one gives information on the spectator and has
a
> field that lists the concert events he/she has been to.  Table two
lists
> concerts along with location information and date along with bands and
> then
> another table that lists band information.  There are several loops,
the
> first one is "while $spectator..." and within it a "while $concert..."
and
> within it a "while $band..."  So the resulting page can have user
> information then a list with concert bands, concert bands, concert
bands,
> for each he/she has been to.  The one we are having a problem with has
27
> concerts and IE stops at 25 and Mozilla goes all the way to the 27th.
I
> will try and split each concert into its own table.  Just as a not
each
> concert listed gives the option to edit the concert information and a
way
> to
> edit the band information in addition to removing any one of them.  So
> there
> are various buttons throughout.
>
> Larry S. Brown
> Dimension Networks, Inc.
> (727) 723-8388
>
> -Original Message-
> From: John W. Holmes [mailto:[EMAIL PROTECTED]
> Sent: Saturday, June 07, 2003 6:08 PM
> To: 'Larry Brown'; 'PHP List'
> Subject: RE: [PHP] IE Pagelength issue
>
> > I am running into a strange problem.  I have a script that parses a
> > database
> > for results.  It cycles through the data one record at a time
looking
> for
> > matches to the query.  Up til now I haven't had any problems as the
> > results
> > have been limited in length.  Now I have one that has a significant
> length
> > and the bottom is cut off on IE6.  I haven't tried any earlier
> versions of
> > IE but Mozilla loads the entire page without this problem.  Has
anyone
> run
> > across this?  Is there a way around it?
>
> > Just as an additional note:  the page has one continuous table so
> another
> > potential problem would be a limit to the length of a table?
>
> Probably and IE "feature" of only being able to handle a certain table
> size.
>
> The "way around" it would be to end the table and start another every
so
> many rows... or split your rows up into Prev/Next pages...
>
> Did I read correctly that you're selecting an entire database and then
> using PHP to match criteria? Are you using a WHERE clause to do the
> sorting? Sounds like you may be going about this the wrong way... if
> not, carry on.
>
> ---John W. Holmes...
>
> Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
>
> PHP Architect - A monthly magazine for PHP Professionals. Get your
copy
> today. http://www.phparch.com/
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>




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



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



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



[PHP] Pause for user input?

2002-11-20 Thread Larry Brown
Does anyone know of a method to pause during the processing of a script to
prompt a user for information and then incorporate the user's response for
the remainder of the script?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




RE: [PHP] Pause for user input?

2002-11-20 Thread Larry Brown
The idea is to have the script start to load, prompt for a question or more,
then use the data from the response to complete loading the page and avoid
having to post all of the variables from page to page to get all of the
responses back.  A lot of the questions are formed based on the answers to
previous questions so I'm trying to keep the number of separate pages to a
minimum by using such a technique.  I understand that Java can provide this
function, but I want to do as much with PHP and as little as possible with
Java.

Larry S. Brown MCSE
President/CEO
Dimension Networks, Inc.
Member ICCA
(727) 723-8388

-Original Message-
From: @ Edwin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 20, 2002 11:29 AM
To: Larry Brown
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Pause for user input?

Hello,

"Larry Brown" <[EMAIL PROTECTED]> wrote:

> Does anyone know of a method to pause during the processing of a script to
> prompt a user for information and then incorporate the user's response for
> the remainder of the script?

... in addition to what the others already said, let me just ask a couple of
questions:

1. Do you really need to "pause"? What did you exactly mean by "pause"?
2. Is it even necessary to "pause"?

Just wondering...

- E



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




RE: [PHP] Pause for user input?

2002-11-20 Thread Larry Brown
I understand that the Javascript will not pause the page from loading;
however, it should, like you stated, modify the page and hence change what
the client is seeing interactively which could include hiding/revealing
different questions based on their input.  This should ultimately present a
form with answers to those customized questions without traversing a number
of pages.  I only asked the question hoping there was a method of
accomplishing this that I wasn't aware of in PHP.  It is understandable that
it would not be possible server-side, but I figured I would check with the
gurus.

Thanks,

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: @ Edwin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 20, 2002 2:39 PM
To: Larry Brown
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Pause for user input?


"Larry Brown" <[EMAIL PROTECTED]> wrote:

> The idea is to have the script start to load, prompt for a question or
more,
> then use the data from the response to complete loading the page and avoid
> having to post all of the variables from page to page to get all of the
> responses back.  A lot of the questions are formed based on the answers to
> previous questions so I'm trying to keep the number of separate pages to a
> minimum by using such a technique.  I understand that Java can provide
this
> function, but I want to do as much with PHP and as little as possible with
> Java.

I think you're referring to JavaScript and NOT Java.

But, whether it's Java or Javascript, you cannot really pause/stop the
browser then do something to "complete loading the page." (Unless you press
"stop"--but this would require you to reload.)

Anyway, Javascript (if you're referring to it) doesn't have that kind of
function (AFAIK). Javascript can hide/unhide element on your form. It can
also enable/disable a checkbox, for example. But those functions would only
work AFTER the page is already loaded--and _not_ while it is loading. (Also,
*after* the Javascript file--if you're using and external one--is already
downloaded inside the your visitors' disk, etc.)

- E

PS
BTW, Javascript (support) can be turned off by your visitors--maybe you
already know that...

And... not all browsers supports Java. (But then again, you don't even need
a browser to run Java! What am I saying here?...)

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



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




RE: [PHP] How do I initialize a page to do something ONCE

2002-11-22 Thread Larry Brown
Your first post stated..
> The only problem is that it is not processing the second if block --
if($start_over == 1) -- unless I actually set start_over=1 in the get
string.
>

Your second sounds like it is executing the second block...

>The variable $initialize contains "int(1)", so it does set itself within
the last if statement.

If the second block is being executed...

Did you check out php.net and the comments about session_unset()?

If it is not, are you closing the browser between tests?  The session
information stays open even after leaving the site and coming back.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388





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




[PHP] php temp table question

2003-10-27 Thread Larry Brown
Does anyone know whether the use of persistent connections with php will
allow a temp table created by a script to linger around and cause a problem
with the next execution of the script when it tries to create the temp table
again?  Also if it does present a problem with the next script execution
trying to create the temp table again, if I drop the temp table at the end
of the script will I still have problems if the script is run by two client
in tandem?  For instance two people connect, both hit the script at about
the same time.  One script creates the temp table and before it can drop the
table the second script tries to create the table.  Will it see the table
created by the other script?  Again the use of persistent connections would
be a the heart of this I would think.

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



[PHP] php temp table question (for mysql)

2003-10-27 Thread Larry Brown
Does anyone know whether the use of persistent connections with php will
allow a temp table created by a script to linger around and cause a problem
with the next execution of the script when it tries to create the temp table
again?  Also if it does present a problem with the next script execution
trying to create the temp table again, if I drop the temp table at the end
of the script will I still have problems if the script is run by two client
in tandem?  For instance two people connect, both hit the script at about
the same time.  One script creates the temp table and before it can drop the
table the second script tries to create the table.  Will it see the table
created by the other script?  Again the use of persistent connections would
be a the heart of this I would think.

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



RE: [PHP] PHP with Frames (cont.)

2003-10-27 Thread Larry Brown
Are you trying to access variables between frames or just get a php script
to run when it is one frame.  I have php pages running in frames in a number
of places.  You could not access variables between the frames though.  You
would have to use a client side script to do that.  You could have something
like javascript deal with passing variable around on the client's browser
and then ultimately post the result back to the server in a form etc.

-Original Message-
From: rich [mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 2:23 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP with Frames (cont.)


No, he's right - this is an issue.

Do variables persist between PHP files?

In the attached scripts I have a login page which directs the user, on a
sucessful login, to a front page which is a frameset.

The login.php opens a connection to a MySQL database ($connection) but once
the browser has been re-directed to the frame-root.html page this variable
is no longer available.

Kb wrote:

> Hi,
>
> Does anyone know why my PHP pages won't work in Frames?  I have 5 frames,
> each of which are displaying PHP pages.and none of the PHP code works.
>
> If I run the code outside of Frames it works fine!
>
> I've can't find any decent references for PHP in Frames.
>
> Your help would be appreciated.
>
> Thanks
>
> Kevin

--
UEA/MUS::Record Library
--
UEA/MUS::Record Library

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



[PHP] PDFlib not working with explorer based on PHP created file in memory

2003-10-29 Thread Larry Brown
If anyone can help, please...

I have a page that points to a PHP page that dynamically creates a pdf file
using PDFlib.  The page uses a link such as
site.com/page.php?variable=value.  That in turn executes the script that
uses the variable/value to pull info from the db and generate the page.  The
result is that when you click the link you are prompted to save or open the
document.  By openning the document you are presented with the pdf by
acrobat.  This is seemless with Mozilla.  However, on IE it hangs with the
message "Getting File information:".  If you try to save it you get another
error.  I have read some information indicating that the problem is with the
length parameter not being sent.  However, the page I'm using was off an
example someone provided and it already has what seems to be the fix for
page length.  The code that creates the file is as follows...


$p = PDF_new();
if(PDF_open_file($p, "") == 0) {
die("Error: ".PDF_get_errmsg($p));
}

...body goes here...

PDF_end_page($p);
PDF_close($p);

$buf = PDF_get_buffer($p);
$len = strlen($buf);

header("Content-type: application/pdf");
header("Content-Length: $len");
header("Content-Disposition: inline; filename=filename.pdf");
print $buf;

PDF_delete($p);

Again, this is only a problem with m$ IE.  I know this is one of the largest
toolkits (PDFlib) in use for creating well defined printable documents so I
can't believe that this is not a common problem or that I am doing something
really wrong.

Someone on PDFlib's mailing list once mentioned sending the document for
download via "chunks" instead of getting the length except he wrote
something in C/C++ to accomplish it in his app.  Is there some way to tell
the browser to accept via "chunks" in php?  Does the above header look right
for IE?

Any help would be greatly appreciated...

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



RE: [PHP] PDFlib not working with explorer based on PHP created file in memory

2003-10-29 Thread Larry Brown
My apologies for waisting anyone's time.  I found the posting in the
archives that had the correct code to use.

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 3:39 PM
To: PHP List
Subject: [PHP] PDFlib not working with explorer based on PHP created
file in memory


If anyone can help, please...

I have a page that points to a PHP page that dynamically creates a pdf file
using PDFlib.  The page uses a link such as
site.com/page.php?variable=value.  That in turn executes the script that
uses the variable/value to pull info from the db and generate the page.  The
result is that when you click the link you are prompted to save or open the
document.  By openning the document you are presented with the pdf by
acrobat.  This is seemless with Mozilla.  However, on IE it hangs with the
message "Getting File information:".  If you try to save it you get another
error.  I have read some information indicating that the problem is with the
length parameter not being sent.  However, the page I'm using was off an
example someone provided and it already has what seems to be the fix for
page length.  The code that creates the file is as follows...


$p = PDF_new();
if(PDF_open_file($p, "") == 0) {
die("Error: ".PDF_get_errmsg($p));
}

...body goes here...

PDF_end_page($p);
PDF_close($p);

$buf = PDF_get_buffer($p);
$len = strlen($buf);

header("Content-type: application/pdf");
header("Content-Length: $len");
header("Content-Disposition: inline; filename=filename.pdf");
print $buf;

PDF_delete($p);

Again, this is only a problem with m$ IE.  I know this is one of the largest
toolkits (PDFlib) in use for creating well defined printable documents so I
can't believe that this is not a common problem or that I am doing something
really wrong.

Someone on PDFlib's mailing list once mentioned sending the document for
download via "chunks" instead of getting the length except he wrote
something in C/C++ to accomplish it in his app.  Is there some way to tell
the browser to accept via "chunks" in php?  Does the above header look right
for IE?

Any help would be greatly appreciated...

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

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



RE: [PHP] php temp table question (for mysql)

2003-10-31 Thread Larry Brown
I'm now finding that persistent connections is allowing the temp table to
remain.  I have a sql query that creates the table and another that joins
the temp table to another for a result set that I use. If I press refresh on
the browser window I get an error that the sql query creating the table
fails.  I prepend a query that removes the table before the sql that creates
it and then hit refresh and the query works.  If I close the browser thus
ending the session and reopen the browser and log in, the script fails to
remove the temp table since it hasn't been created yet (and must have been
removed).  I changed my method of connecting to use mysql_connect instead of
mysql_pconnect and removed the drop temp sql and it loads and reloads fine.
Perhaps it is the combination of mysql_pconnect with sessions that creates
this problem.

-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 4:43 PM
To: Larry Brown; PHP List
Subject: Re: [PHP] php temp table question (for mysql)


From: "Larry Brown" <[EMAIL PROTECTED]>

> Does anyone know whether the use of persistent connections with php will
> allow a temp table created by a script to linger around

No, the table will still be removed at the end of the script whether you use
persistant connections or not.

> and cause a problem
> with the next execution of the script when it tries to create the temp
table

Temporary tables are unique for that specific question. So you can have the
same script creating the "same" temporary table and 100 people hit it
without issues. Each script creates it's own temporary table with a unique
name that only that connection has access to.

---John Holmes...

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



[PHP] nusoap

2003-11-11 Thread Larry Brown
Does anyone here have any solid experience with nusoap?  Their list has
low volume and I am finding it difficult to find any useable examples or
descriptions of real life uses and how to configure the server/client.

In particular I'm currently trying to figure out the correct syntax to
produce wsdl using "$server->wsdl->addComplexType(..." to describe an
array of the form...

array([0]=>343454[1]=>SMITH[2]=>BOB[3]=>1969-03-17[4]=>234343444[5]2003-11-11 13:23:02)

where data types are string,string,string,date,string,datetime

It appears that the complexType would be a struct although this is
actually an array.  I just need someone who has had experience with this
toolkit for a couple of issues.

Thanks for any assistance,

Larry

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



RE: [PHP] File upload problem

2003-12-20 Thread Larry Brown
According to the documentation you have to have the maxfilesize tag before
the input tag.

-Original Message-
From: Dino Costantini [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 6:34 PM
To: [EMAIL PROTECTED]
Subject: [PHP] File upload problem


i'm trying to write a page which allows user to upload file. theese are my
sources but they didn't work, anyone could help me?
-form.html





upload.php---

---
upload.php doesn't upload anything and doesn't output any error message. i
don't think it's an apache problem, because this is the only page that
doesn't work.

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

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



[PHP] mysql load_file retreival

2003-12-20 Thread Larry Brown
I have set up a script to recieve a pdf file and store it in a mysql db
using "update db set field=load_file('fileIncludingFile') where id=$id".
Afterwards I can see the file has been uploaded into the blob field
successfully and without errors.  Now I want to get the file back out.  I
set up a script with "select field from db where id=$id" and used
mysql_query followed by mysql_fetch_row and did echo header("Content-type:
application/pdf"); and then echo result[0]; where result was the row
fetched.  I get the prompt to open with pdf but pdf fails.  I have
magicquotes on but I understand that the load_file() function within mysql
does the escaping etc.  How can I "un-escape" the data?  The only thing I
saw on the mysql manual is on how to use load_file_infile/load_file_outfile
which does not apply to this.  Can someone lend a hand here?

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



RE: [PHP] sessions problem

2003-12-20 Thread Larry Brown
Make sure you have session_start(); at the beginning of each script you run
from the time you start inserting variables to the time you want the session
to end.

-Original Message-
From: Nitin [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 10:48 AM
To: PHP-General
Subject: [PHP] sessions problem


hi all,

i'm just starting to use sessions.
i've a problem,

i started session and assigned variables to $HTTP_SESSION_VARS
i can very well see these vars in my next script, but i need to get back to
first script for some working, and strangely i dont find these vars there.

any help or suggestions

Nitin

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



RE: [PHP] mysql load_file retreival

2003-12-20 Thread Larry Brown
Oops, my bad on the post.  I am not sending echo header...just header(...

I thought, based on reading from mysql that it did escape certain
characters.  I'll start looking at other possibilities...

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 1:24 PM
To: PHP List
Subject: RE: [PHP] mysql load_file retreival


LOAD_FILE() shouldn't be escaping the data. Are you actually calling : echo
header()? the header function should not be echoed.

header('Content-type: application/pdf');
echo result[0];

-Original Message-----
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 9:29 AM
To: PHP List
Subject: [PHP] mysql load_file retreival


I have set up a script to recieve a pdf file and store it in a mysql db
using "update db set field=load_file('fileIncludingFile') where id=$id".
Afterwards I can see the file has been uploaded into the blob field
successfully and without errors.  Now I want to get the file back out.  I
set up a script with "select field from db where id=$id" and used
mysql_query followed by mysql_fetch_row and did echo header("Content-type:
application/pdf"); and then echo result[0]; where result was the row
fetched.  I get the prompt to open with pdf but pdf fails.  I have
magicquotes on but I understand that the load_file() function within mysql
does the escaping etc.  How can I "un-escape" the data?  The only thing I
saw on the mysql manual is on how to use load_file_infile/load_file_outfile
which does not apply to this.  Can someone lend a hand here?

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

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

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



RE: [PHP] mysql load_file retreival

2003-12-20 Thread Larry Brown
Thanks for the help.  I went through a troubleshooting phase that started
with writing the raw data from the mysql client to disk.  Checking the size
it was apparent that it was much too small.  I tried running my script with
a smaller pdf and it worked.  It turns out that blob has a max of 64k.  A
tad small for general use for holding graphics.  I changed to a mediumblob
which is either 12 or 16 meg, I'm not sure off the top of my head now but,
that is plenty for my needs.  I did end up changing the behaviour of my
script though.  Instead of writing to a file and using load_file, I recieved
the file on upload, base64 encoded it and stored it directly to the db.
Then on retrieval, unencoded and handed it off with content type, size,
name, and application information in the header.  It works very nicely.

Thanks again...

Larry

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 3:49 PM
To: PHP List
Subject: RE: [PHP] mysql load_file retreival


Try looking at the data that's supposed to be outputing the pdf. Something
may be failing somewhere and you might see an error message. If you don't
see any error messages and are apparently seeing gthe pdf data, check for
whitespace outside php tags and any extraneous echo's or print's, that would
very likely cause the pdf to not be able to be read properly.

Chris

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 10:36 AM
To: Chris; PHP List
Subject: RE: [PHP] mysql load_file retreival


Oops, my bad on the post.  I am not sending echo header...just header(...

I thought, based on reading from mysql that it did escape certain
characters.  I'll start looking at other possibilities...

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 1:24 PM
To: PHP List
Subject: RE: [PHP] mysql load_file retreival


LOAD_FILE() shouldn't be escaping the data. Are you actually calling : echo
header()? the header function should not be echoed.

header('Content-type: application/pdf');
echo result[0];

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 9:29 AM
To: PHP List
Subject: [PHP] mysql load_file retreival


I have set up a script to recieve a pdf file and store it in a mysql db
using "update db set field=load_file('fileIncludingFile') where id=$id".
Afterwards I can see the file has been uploaded into the blob field
successfully and without errors.  Now I want to get the file back out.  I
set up a script with "select field from db where id=$id" and used
mysql_query followed by mysql_fetch_row and did echo header("Content-type:
application/pdf"); and then echo result[0]; where result was the row
fetched.  I get the prompt to open with pdf but pdf fails.  I have
magicquotes on but I understand that the load_file() function within mysql
does the escaping etc.  How can I "un-escape" the data?  The only thing I
saw on the mysql manual is on how to use load_file_infile/load_file_outfile
which does not apply to this.  Can someone lend a hand here?

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

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

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

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



RE: [PHP] mysql load_file retreival

2003-12-20 Thread Larry Brown
I was following the example given on the php site that someone was using to
break down large files.  They base64 encoded the file while reading it in,
broke it into pieces (while inputing the pieces into the db), then
re-animated it so to speak afterwards by reversing the process.  I get the
impression that encoding the file will leave it in a state that is palatable
to the database (no quotes,commas,slashes etc) and it seemed that since the
example worked that way that I'd follow suit.  Plus, if I decided that the
file sizes should be split up, I could ultimately simply change a line of
code or so and split it up.  It is only from a lack of thorough
understanding of exactly what characters can be found in a pdf file when
viewed as a single string for the database that I don't step out and design
something of which I have not seen an example.  Plus I figure that I should
learn from people out there of whom many have spent many hours beating their
head against a wall looking for a solution and are later willing to share
that as an example to save others time.

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 5:55 PM
To: PHP List
Subject: RE: [PHP] mysql load_file retreival


Gald to hear it works now. Are you base64 encoding it for any particular
reason? Seems to me that it would waste a lot of db space as base64 encoding
adds quite a bit to the filesize.

Chris

-Original Message-----
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 2:16 PM
To: Chris; PHP List
Subject: RE: [PHP] mysql load_file retreival


Thanks for the help.  I went through a troubleshooting phase that started
with writing the raw data from the mysql client to disk.  Checking the size
it was apparent that it was much too small.  I tried running my script with
a smaller pdf and it worked.  It turns out that blob has a max of 64k.  A
tad small for general use for holding graphics.  I changed to a mediumblob
which is either 12 or 16 meg, I'm not sure off the top of my head now but,
that is plenty for my needs.  I did end up changing the behaviour of my
script though.  Instead of writing to a file and using load_file, I recieved
the file on upload, base64 encoded it and stored it directly to the db.
Then on retrieval, unencoded and handed it off with content type, size,
name, and application information in the header.  It works very nicely.

Thanks again...

Larry

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 3:49 PM
To: PHP List
Subject: RE: [PHP] mysql load_file retreival


Try looking at the data that's supposed to be outputing the pdf. Something
may be failing somewhere and you might see an error message. If you don't
see any error messages and are apparently seeing gthe pdf data, check for
whitespace outside php tags and any extraneous echo's or print's, that would
very likely cause the pdf to not be able to be read properly.

Chris

-----Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 10:36 AM
To: Chris; PHP List
Subject: RE: [PHP] mysql load_file retreival


Oops, my bad on the post.  I am not sending echo header...just header(...

I thought, based on reading from mysql that it did escape certain
characters.  I'll start looking at other possibilities...

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 1:24 PM
To: PHP List
Subject: RE: [PHP] mysql load_file retreival


LOAD_FILE() shouldn't be escaping the data. Are you actually calling : echo
header()? the header function should not be echoed.

header('Content-type: application/pdf');
echo result[0];

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 9:29 AM
To: PHP List
Subject: [PHP] mysql load_file retreival


I have set up a script to recieve a pdf file and store it in a mysql db
using "update db set field=load_file('fileIncludingFile') where id=$id".
Afterwards I can see the file has been uploaded into the blob field
successfully and without errors.  Now I want to get the file back out.  I
set up a script with "select field from db where id=$id" and used
mysql_query followed by mysql_fetch_row and did echo header("Content-type:
application/pdf"); and then echo result[0]; where result was the row
fetched.  I get the prompt to open with pdf but pdf fails.  I have
magicquotes on but I understand that the load_file() function within mysql
does the escaping etc.  How can I "un-escape" the data?  The only thing I
saw on the mysql manual is on how to use load_file_infile/load_file_outfile
which does not apply to this.  Can someone lend a hand here?

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

--
PHP General Mailing List (ht

[PHP] using PDI to pull from data already read into a variable?

2003-12-22 Thread Larry Brown
I have written scripts to upload pdf files into mysql.  I have the scripts
created to access those files and produce them for the user on the fly.  All
well and good.  Now I have a need to access one of those files and insert
its contents into a new pdf report.  I have purchased the PDFlib+PDI and
want to pull the data from the variable returned from mysql.  However, the
function for openning the pdf document to be inserted is looking for a file
on disk to access.  Has anyone done this without writing the document to
disk first and then openning it from there?  It seems that pulling it from
the db in a query and then "handing" it to the PDI functions would be less
intensive than writing it out, parsing it, and then ultimately deleting it
from disk again.

Any help would be greatly appreciated...

TIA

Larry

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



RE: [PHP] PROBLEMS WHEN EXTRACING DATA FROM MSSQL DATABASE WITH PHP

2003-12-22 Thread Larry Brown
Is your field too small?  MySQL doesn't complain when you give it a string
longer than it can accept based on the field's size.  It just cuts off what
doesn't fit :-)

-Original Message-
From: Dale Hersh [mailto:[EMAIL PROTECTED]
Sent: Monday, December 22, 2003 6:50 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PROBLEMS WHEN EXTRACING DATA FROM MSSQL DATABASE WITH PHP


I am having a really unusual problem. In my database, I currently have
string such as:

"I went to the store and bought some food. I then decided to go to the
movies and I saw
Bad Boy II."

When I extract the data out of the database, the data always seems to get
cutoff. In other words, I will only get the follow:
"I went to the store and bought some food. I then decided to go to the
movies and"

Is there some type of variable I need to set in the php.in that control how
long of a string you can have. It only seems to happen when I am storing
long strings in my database.

I am using a mssql database. I don't think it is a database issue because I
am able to update the database just fine. When I check the database it
contains all of the text. When I try to extract the data using php,
everything seems to get cut off.

Any ideas?

Thanks,
Dale

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

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



RE: [PHP] PROBLEMS WHEN EXTRACING DATA FROM MSSQL DATABASE WITH PHP

2003-12-22 Thread Larry Brown
My bad, didn't read far enough...

-Original Message-
From: Chris W. Parker [mailto:[EMAIL PROTECTED]
Sent: Monday, December 22, 2003 7:04 PM
To: Larry Brown; Dale Hersh; PHP List
Subject: RE: [PHP] PROBLEMS WHEN EXTRACING DATA FROM MSSQL DATABASE WITH
PHP


Larry Brown <mailto:[EMAIL PROTECTED]>
on Monday, December 22, 2003 3:59 PM said:

> Is your field too small?  MySQL doesn't complain when you give it a
> string longer than it can accept based on the field's size.  It just
> cuts off what doesn't fit :-)

Uhh... he stated in his original email that he's using MSSQL (not MySQL)
and that the data is being INSERTed completely and without error.

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



RE: [PHP] Re: HTTP headers, IE and downloading

2003-12-22 Thread Larry Brown
In hopes that this may be of help to you...I had a hell of a time getting IE
to download pdfs that I create on the fly and finally with the help of a
couple people I got the magic code which was...

$len = strlen($buf);  //buf was holding the pdf doc.

header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");

header("Content-type: application/pdf");
header("Content-Length: $len");
header("Content-Disposition: inline; filename=".$filename.".pdf");
header("Content-Transfer-Encoding: binary");

and in addition had to set the link as http://mysite.com/myphpPDFscript.php?pdf=anything.pdf

and after all of that it worked.  Which ones you may need is beyond me.  I
do not know enough about how the different browsers handle headers and
really only needed to get that one functionality working for me.  I hope
examining it can help...

Larry

-Original Message-
From: Andreas Magnusson [mailto:[EMAIL PROTECTED]
Sent: Monday, December 22, 2003 1:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: HTTP headers, IE and downloading


Thanks for your reply!

> Have a look at: http://pear.php.net/package/HTTP_Download

I looked at it and it's hard to see what it does differently from what I
do...


> And the first comment of:
> http://www.php.net/manual/en/function.session-cache-limiter.php

Thanks, I've read that and I'm not using output compression.


> Perhaps you should not use ouput-compression, and look at the headers
> generated by PHP
>
> What headers are sent? Do you use sessions?

I use sessions, and I've tried to send the same headers as the webserver
sends if I download a file directly (rather than through PHP).
It doesn't work... Maybe I should just create a temporary file and relocate
the browser to it in case the browser is IE...

> you can see this using Mozilla + Live Headers, Ethereal,
> http://schroepl.net/cgi-bin/http_trace.pl ...

Thanks, I've written my own HTTP header tracer in C++, but it hasn't been
able to help me since the headers looks good to me...

/Andreas

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

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



RE: [PHP] Can't upload file greater than 11kb

2003-12-23 Thread Larry Brown
The mailto:[EMAIL PROTECTED]
Sent: Monday, December 22, 2003 8:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Can't upload file greater than 11kb


I've got a situation where I want to upload a file to a server then enter
the data in that file into mysql. I have used this well documented upload
form


Send this file: 





script on many php servers. However I am on one now which is not allowing me
to upload a file greater than 12kb.

I know the upload_max_filesize is 2M but something else is stopping the
upload and I don't have a clue what it is. I know you should include  in the above form but that
is only a convenience for the user.

This particular server is running php as a cgi module.

Thanks

Chris

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

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



RE: [PHP] Re: progress in PHP

2003-12-23 Thread Larry Brown
How does perl show progress of the upload if it is a server side scripting
language and php can't do it because it is server side?

-Original Message-
From: Manuel Lemos [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 23, 2003 12:46 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: progress in PHP


Hello,

On 12/23/2003 03:31 PM, James Kaufman wrote:
>>>Join the 11,000 people who use megaupload progress bar (with a little
>>>help from perl)
>>>http://www.sourceforge.net/projects/megaupload/
>>
>> I tried. It wasn't worth all the perl mods I would to have had to
>>install to make it work.
>
>
> Check out http://pear.laurent-laville.org/HTML_Progress/. It is a pure
> php approach to displaying a progress bar. I haven't used it, but the
demos
> look good.

This a different thing. This is meant to track progress of server side
tasks. File uploading is a client side task.

Unfortunately, AFAIK there is no way to handle streams of HTTP requests.
Therefore, there is no way to handle upload progress with a PHP only
solution.

The Raditha megaupload solution is based on a combination of Perl with
PHP. It is probably the solution that uses more PHP but the hard work is
done using Perl.

--

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

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

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



RE: [PHP] programming the onclick() event in an anchor

2003-12-25 Thread Larry Brown
You can place  tags around the anchors and use hidden tags and send
via post so the variable is not obvious.  A user reading the source would
see this though...

echo "https://this.site.com/somePage.php\";
method=\"post\">\n";
echo "SomeLinkText\n";
echo "\n";
echo "\n";

I'm not sure off the top of my head if the anchor tag must have any other
description.  You might be able to use onChange instead of onClick to
include selection by using the keyboard, but I'm not sure if the anchor tag
responds to onChange.  You'd have to try it out.

Larry.

-Original Message-
From: Evan Nemerson [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 25, 2003 2:59 AM
To: Peter Walter; [EMAIL PROTECTED]
Subject: Re: [PHP] programming the onclick() event in an anchor


On Wednesday 24 December 2003 08:06 pm, Peter Walter wrote:
> I have written a session-enabled php page which displays a table of
> search results. The first column in the table contains anchor links to
> www.mydomain.com/mypage?seqno= where seqno is a variable I would
> like to pass when the anchor is clicked. However, I do not wish the
> ?seqno= to display in the url of the browser. After googling a lot,
> it appears that I can use JavaScript to set a session variable in the

I doubt it- otherwise it would be pretty easy to set, say
$_SESSION['logged_in']

> onclick() event, but I have not been able to find an example of how to

But you /can/ use JS to set a cookie, which can be retrieved (and stored in
a
session variable if you want) by PHP.

http://www.webreference.com/js/column8/
http://us4.php.net/manual/en/reserved.variables.php#reserved.variables.cooki
es

> do it. Does anyone have experience doing this? Sample code would be
> greatly appreciated.

http://www.webreference.com/js/column8/functions.html

>
> Peter

--
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"There is a certain right by which we may deprive a man of life, but none by
which we may deprive him of death."

-Nietzsche

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

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



RE: [PHP] HTML via echo or not

2003-12-29 Thread Larry Brown
I agree.  I think embedding the  tags is messy and harder to follow.
I do however, treat echo like print. ie echo "The thought would \"have\" to
be clear.";  I've not use CR,.  I'll have to look at that.  Thanks

-Original Message-
From: Robin Kopetzky [mailto:[EMAIL PROTECTED]
Sent: Monday, December 29, 2003 8:02 PM
To: PHP General
Subject: [PHP] HTML via echo or not


Good evening.

I'm probably going to stir up a hornet's nest but have a question.

Does using echo for ALL html pages mean I have a sick mind? Example:

echo CR, '',
   CR, '  ',
 CR, ' etc...';

I like the look. It's more readable, gives me a better view of variables as
they are all single-quoted and stand out nicely in my editor. No messy
jumping into and out of php. I have looked at a bunch of php code written by
others and HEREDOC looks stupid with everything jammed against the left side
of the screen, php tags within HTML breaks up the flow of properly formatted
HTML, which I firmly require for all of my code, and just doesn't look
right. 'print' makes you add \" to all of the HTML attributes but the 'echo'
method makes everything look like php! Since all your doing is dumping text
to the output subsystem, there shouldn't be any speed decrease in the code.

Yes, I know, there are advocates for every kind of method to display HTML
code but just wanting to get others opinions on the subject. If you wish,
email me off-list @ sparkyk-AT-blackmesa-isp.net.

Cheers!

Robin 'Sparky' Kopetzky
Black Mesa Computers/Internet Service
Grants, NM 87020

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

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



RE: [PHP] How do I protect downloadable files?

2003-12-30 Thread Larry Brown
You could have your authorization info in the mysql db including file
locations that are stored along with the authorization level necessary to
download them.  If the person is authenticated to download the file, the php
script uses the file location info from the db to open the file and generate
the headers necessary to start the download.  This way the end user never
has to have direct access to the download directory and you don't have to
copy the file into a temporary directory.

Larry

-Original Message-
From: news.php.net [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 2:13 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How do I protect downloadable files?


Hello, I have wrtten a PHP based web site with a MySql backend and now I
want to password protect downloadable files.  I have logon and session
handling taken care of but I can't figure out how to only allowed those who
are currently logged in and above a certain security level to access the
downloadable content and prevent bookmarking of the file location for
redownloading.

Currently I have a .htaccess file to protect the files but then you need to
enter a User ID and password a second time.  I would prefer a single signon
solution.

I have considered copying the files to a temporary area each time someone
wants to download it and then erase it when the session is killed but these
files can be large (20-100 mb) and I would rather not do all of that copying
if possible.

Creating unique symlinks would be easier but my development machine is
Windows and my server is FreeBSD and I can't create file links under
Windows.  Plus,  my FreeBSD server is not near me so remote development is
difficult.

Thanks to anyone with any ideas,
Andrew

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

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



RE: [PHP] How do I protect downloadable files?

2003-12-30 Thread Larry Brown
Time for them to upgrade to OSX...

I've not tried to crack that nut.  Is there anyone here who has successfully
managed headers for Mac users?  It's hard to believe it hasn't been done.

-Original Message-
From: Kim Steinhaug [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 8:04 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] How do I protect downloadable files?


However I forgot to mention, all theese header tricks are real swell
indeed, but you should get hold of a friend on a macintosh.

The method I use doesnt work on the macintosh, so for the mac
users we just serve the files "as is", meaning they accually dont get
protected...

The other methods aswell should be tested on macintosh systems
just to be sure.

--
Kim Steinhaug
---
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.
---


"Kim Steinhaug" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I would go for the 3rd alternative. There are several ways to
> "stream" the file with the use of headers.
>
> This way you can validate the user securely with your logon system,
> and you can place the files outside the viewable web content.
> Typically oputside your www / public_html folder.
>
> I use this myself in an application I use, streaming files at 50MB
> does not use alot of resources at all, atleast not the way I use.
> My use for the script is to serve high resolution images to several
> customers, often TIF images up to 50MB and larger.
>
> Heres the code I use :
>
> $distribution= "filepathonserver";
> if ($fd = fopen ($distribution, "r")){
> $size=filesize($distribution);
>  $fname = basename ($distribution);
>
> header("Pragma: ");
> header("Cache-Control: ");
> header("Content-type: application/octet-stream");
> header("Content-Disposition: attachment; filename=\"".$fname."\"");
> header("Content-length: $size");
>
>  while(!feof($fd)) {
>   $buffer = fread($fd, 2048);
>   print $buffer;
>  }
>  fclose ($fd);
> exit;
> }
>
> --
> Kim Steinhaug
> ---
> There are 10 types of people when it comes to binary numbers:
> those who understand them, and those who don't.
> ---
>
>
> "Apz" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > On Tue, 30 Dec 2003, news.php.net wrote:
> > > Creating unique symlinks would be easier but my development machine is
> > > Windows and my server is FreeBSD and I can't create file links under
> > > Windows.  Plus,  my FreeBSD server is not near me so remote
development
> is
> > > difficult.
> >
> > 1) windows has symlinks since win2000, however they are named Junctions.
> >I would recommend visiting sysinternals.com and getting junctions
> >tool (win2k/xp/2k3 -> miscalenous). Hey, it even comes with source!
> >
> > 2) another way is to make a redirect, so you do:
> >getFile.php?file=something.zip
> >
> >and in your code you do:
> > >  include "_mylibs.php"
> >  if (userLoggedIn())
> >  header "Location: ".$_REQUEST["file"];
> >  else
> >  echo "Only Valid People Can Login";
> >?>
> >
> > 3) final way is to pass through the file yourself. Safest way, but
> >potentially more resource hungry than the two above
> >in your code you do:
> >
> >
> > >  include "_mylibs.php"
> >  if (userLoggedIn())
> >  {
> > header("Content-type: application/octet-stream");
> > header("Content-Disposition: attachment; ".
> >"filename=".$_REQUEST["file"]);
> > readfile($_REQUEST["file"]);
> >  }
> >  else
> >  echo "Only Valid People Can Login";
> >?>
> >
> >
> >
> > recommended reads:
> >   http://www.php.net/manual/en/function.header.php
> >
> > further recommended things to checkout:
> >   freshmeat , and search for anti leecher scripts.
> >
> >
> >
> > /apz,  bringing joy to the world

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

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



[PHP] PHP New Year

2003-12-31 Thread Larry Brown
Happy New year all!

Looking forward to bigger better things this year.

Larry

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



RE: [PHP] urlencoding.

2004-01-01 Thread Larry Brown
How about this one?  Add it to an include for the site and use it whenever
you have an error check.

function goBack($newSite,$errMsg)
{

  $send = "";

  foreach($_GET as $key=>$value)
{

   $send = $send."&".$key."=".$value;

}
  $goTo = urlencode($newSite."?errMsg=".$errMsg.$send);
  header("Location: $goTo");

  die();

}

if(there is a problem with the data)
{
$errorMessage = "some error";
goBack($HTTP_REFERER,$errorMessage);
}

I'd have to test the $HTTP_REFERER part, but I don't see why it wouldn't
work.  I like the die() in there so I can just use an if statement at the
beginning without having to indent the rest of the script.  Especially if
you have a lot of error checks.





-Original Message-
From: Chris W [mailto:[EMAIL PROTECTED]
Sent: Monday, December 29, 2003 12:02 PM
To: [EMAIL PROTECTED]
Subject: [PHP] urlencoding.


Let me give a quick background.  I am a very experienced programmer but
I haven't done much php and only a little web development in perl.  I am
now creating a web site with Apache, php and MySQL.

I am having the user fill out a form and then save the data in MySQL.
Before I save the data I do a few checks and if there is a problem I do
a redirect back to the form and send all the data back so they don't
have to fill out the whole form again.  Here is some sample code I use
to build my redirect url

$UserID = $_POST['UserID'];
$Password1 = $_POST['Password1'];
$Password2 = $_POST['Password2'];
$Email = $_POST['Email'];
$FName = $_POST['FName'];
$LName = $_POST['LName'];

do checking of data here.

if(there is a problem with the data){
   $ErrorMsg = "some error";
   $redirectStr = "$httpHost/CreateAccount.php?";
   $redirectStr .= "UserID=" . urlencode(stripslashes($UserID));
   $redirectStr .= "&Password=" . urlencode(stripslashes($Password));
   $redirectStr .= "&Email=" . urlencode(stripslashes($Email));
   $redirectStr .= "&FName=" . urlencode(stripslashes($FName));
   $redirectStr .= "&LName=" . urlencode(stripslashes($LName));
   $redirectStr .= "&ErrorMsg=" . urlencode($ErrorMsg);
   header("Location: $redirectStr");
   exit;
}

My problem is that any field that contains a double quote, all data
after the first double quote is missing from the form field.  When I
look at the long URL I do see a %22 where the " are supposed to be, and
all other data is there too.

Any Ideas?  If there is a better way to do this feel free to suggest a
change in my whole method here.  Just as a note validation of the UserID
has to be done on the server side, to check for duplicates in the MySQL db.

I would also welcome insight on standard techniques to make sure the
user isn't trying to break the code by sending bogus data.  I am already
checking that the data isn't longer than I am expecting.

Chris W

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

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



RE: [PHP] Setting a 'life-time' clock to a displayed information

2004-01-01 Thread Larry Brown
The timer on the client browser would have to be done in some client-side
language.

  On the server side you can place any order information that is out with a
supplier in a db field along with the time it was pulled.  When the next
supplier submits a request, the db is parsed for pending jobs whose time has
gone over the 30 minutes.  If it has, then provide the same information to
this supplier and update the record to show who it is out with.  If there
are none that have gone over the 30 then generate a new set for this
supplier and record the time it was provided and the supplier it was given
to.  When the supplier publishes the completed information, check to make
sure it was in time, if it was in time remove the entry from the db so that
it isn't given back out.  If it is too late you can generate an error page
and start back over if he still wants to try.

Note there may be some additional steps necessary to make sure that two
suppliers aren't trying get an expired entry at the same instance where
there is a fraction of a second between checking the time on the record and
taking the record where both check the time and take the same record.  You
will probably have to use locking on the db to avoid this.

Larry

-Original Message-
From: ike strong [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 01, 2004 9:44 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Setting a 'life-time' clock to a displayed information


Hi all,

I'm interested in finding out a way to set a time
limit to a displayed information - i.e. the displayed
information will sieze to appear to a viewer's browser
once a set time period is reached.

What I'm trying to achieve is a situation whereby a
certain 'info' (like an order!) would only appear to a
target viewer (like a supplier!) for example (say) 30
minutes and if that viewer did not react within the
set time, the information will sieze to appear to
his/her browser so that the same information could be
forwarded to the next viewer (supplier)on the list.
The setting of time approach is to avoid having two
people working on the same information at the same
time.

I'd really appreciate any hint/help

Thanks in advance

Ike

__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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

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



RE: [PHP] No cookie is being set?

2004-01-02 Thread Larry Brown
shouldn't $row[member_id] be $row['member_id'].  In case anyone can profit
from this, when I find a function doesn't work right and I am using
variables in its execution I run an echo/die combination immediately before
the function to verify the data being fed to it is as it should be.  In this
example...

...
$id = $_SESSION["user"];
echo "setcookie(\"memberlogin\", ".$id.", ".time() +60*60*24*365.");";
die();
setcookie...

What does this yeild?





-Original Message-
From: Cesar Aracena [mailto:[EMAIL PROTECTED]
Sent: Friday, January 02, 2004 2:28 AM
To: [EMAIL PROTECTED]
Subject: [PHP] No cookie is being set?


Hi again,

I have the following code to first start a session and then write a
cookie... is that so hard? Well it is starting the session but the cookie is
not being set. see:

$row = mysql_fetch_array($result);
$_SESSION["user"] = $row[member_id];
if ($_POST["autologin"] == "yes")
{
 $id = $_SESSION["user"];
 setcookie("memberlogin", $id, time()+60*60*24*365);
 header("Location: $CFG->wwwroot");
 exit();
}
else
{
 header("Location: $CFG->wwwroot");
 exit();
}

What can it be? No error is posted.

Thanks in advanced,

Cesar Aracena

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

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



RE: [PHP] Array into $_SESSION

2004-01-02 Thread Larry Brown
session_register("user");
session_register("authLevel");
session_register("sessionExpire");

$user=$userDataFromForm;
$authLevel = $authLevelFromDB;
$sessionExpire = time() + 3600;

etc...

-Original Message-
From: Cesar Aracena [mailto:[EMAIL PROTECTED]
Sent: Friday, January 02, 2004 2:11 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Array into $_SESSION


Hi all,

can somebody remind me how to propperly insert not just one but many
variables into a $_SESSION handle? php manual doesn't explain it very well.
It just says that it can be done.

Thanks in advanced,

Cesar Aracena

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

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



  1   2   >