OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general Digest 3 Jun 2003 01:14:00 -0000 Issue 2094

php-general-digest-helplists.php.net
Date: Mon Jun 02 2003 - 20:14:00 CDT


php-general Digest 3 Jun 2003 01:14:00 -0000 Issue 2094

Topics (messages 149788 through 149863):

Re: phpauction 2.1
        149788 by: Ferhat BINGOL
        149854 by: chris prior

Re: Making a PHP Script "Very" Cache Friendly
        149789 by: Wendell Brown
        149803 by: Gerard Samuel

zip code validation/regular expression
        149790 by: Jason Paschal
        149802 by: CPT John W. Holmes
        149847 by: pop

Checking for existing records
        149791 by: Michael Egan
        149792 by: Jay Blanchard
        149796 by: Daniel Stark

Re: Checking for existing records[Scanned]
        149793 by: Michael Egan
        149794 by: Michael Egan
        149800 by: Michael Egan

Cookie security
        149795 by: daniel.rhesusb.dk

user (system) authentification
        149797 by: Duncan
        149799 by: bbonkosk.tampabay.rr.com

Re: Strange Behaviour of cookies
        149798 by: Marek Kilimajer

Re: GEnerating PDF's
        149801 by: Brian Paulson

Re: I guess I'll give the list a shot
        149804 by: Marek Kilimajer
        149823 by: Steve Keller

problem with apache 2.0
        149805 by: Franck Collineau
        149810 by: sven

howto set an address for a image
        149806 by: Ferhat BINGOL
        149809 by: Ferhat BINGOL
        149813 by: Wendell Brown
        149826 by: Ferhat BINGOL

Re: Mail - avoid backslash before apostrophe
        149807 by: Dillon, John
        149808 by: Adam Voigt
        149816 by: Hardik Doshi
        149818 by: Marek Kilimajer

Re: Cookies - recomendation please
        149811 by: Justin French

Re: session
        149812 by: Justin French
        149814 by: Justin French

Re: user login idle timeout feature
        149815 by: Justin French

Re: UBB to HTML
        149817 by: Steve Keller

DB2 at Win32
        149819 by: ef

Re: Shipping Rates
        149820 by: Jim Lucas
        149822 by: Jim Lucas

Sessions and redirections - Strange behaviour!
        149821 by: Benja

Re: Apache problem:PHP will not execute
        149824 by: Kjell Hansen
        149827 by: Kjell Hansen
        149828 by: R'twick Niceorgaw

Mail Harvester Warning (was Re: [PHP] I guess I'll give the list a shot [T2003060200WW])
        149825 by: Steve Keller
        149832 by: DvDmanDT
        149851 by: hui zhang

general questions
        149829 by: Dale
        149830 by: Jordan S. Jones
        149831 by: DvDmanDT

preg_replace: literal "/" in pattern string
        149833 by: ROBERT MCPEAK

"update" question
        149834 by: Matt Hedges
        149835 by: Ernest E Vogelsinger

Dynamic value lookups
        149836 by: Vijay Avarachen
        149837 by: Steve Keller
        149838 by: ROBERT MCPEAK

Oracle support under PHP / 8i or 9 and a RedHat 9 / Apache 1.3.X machine
        149839 by: Robert Mena

php affiliate and other php based affiliate programs
        149840 by: hui zhang
        149849 by: hui zhang

Namespace like C++
        149841 by: Steven Walker
        149845 by: Weston Houghton

foreach and mysql_fetch_array problem
        149842 by: Bix
        149863 by: Justin French

Re: "update" question [T20030602013J]
        149843 by: Ernest E Vogelsinger
        149846 by: Bix

Object-Oriented PHP with MySQL
        149844 by: Liam Gibbs
        149853 by: DvDmanDT

Re: Use of undefined constant PHP_SELF - assumed 'PHP_SELF'
        149848 by: Leif K-Brooks

how to get rid off this auto repsonse from TechSupportbonzi.com?
        149850 by: hui zhang
        149852 by: Leif K-Brooks

fulltext mysql search formatting and preg_replace question
        149855 by: daniel.electroteque.org
        149856 by: daniel.electroteque.org

Planning a new job
        149857 by: Tim Burgan
        149861 by: Justin French

Re: Matching titles from distinct data sources
        149858 by: James Robertson

A recommended barcode program
        149859 by: Todd Cary

simple password protect script
        149860 by: Matt Hedges
        149862 by: Ernest E Vogelsinger

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

----------------------------------------------------------------------

attached mail follows:


can you send it to my address... I mean the whole package...

"Chris Prior" <linuxgurutiscali.co.uk>, iletide þunu yazdý
news:20030602130715.47757.qmailpb1.pair.com...
> ive read the read me file a hundred times ive done everything its says
there
> thankyou for the help
>
> "Ferhat Bingol" <ferhatventusvigor.com> wrote in message
> news:20030602124909.33412.qmailpb1.pair.com...
> > pear looks like already installed ...
> >
> > your include diretory is mentined in the error message soput the
necassary
> > files there..
> >
> > I think your answer MUST be in the README or INSTALL documentation.
> >
> > I mean they cannot let a package out without tellin people which files
> will
> > be located where. There MUST be some info about that.
> >
> > Please read it..
> >
> > PEAR is at --> pear.php.net
> >
> >
> >
> > "Chris Prior" <linuxgurutiscali.co.uk>, iletide þunu yazdý
> > news:20030602123857.25291.qmailpb1.pair.com...
> > > i havent got a pear for a common space im using a virtual host , can i
> get
> > > pear and install it ? if so were can i get it from ?
> > >
> > >
> >
> >
>
>

attached mail follows:


im tring to find out if there is a addon to PHPAUCTION 2.1 to aloow listing
fee's and closeing fee's ?

attached mail follows:


On Mon, 02 Jun 2003 02:38:51 -0400, Gerard Samuel wrote:

>For the life of me, according to the output of ethereal (a network
>sniffer), this file is always fetched from the server.

Have you looked at what is actually coming out in the headers? If not,
grab a copy of Sam Spade for windows (http://www.samspade.org/ssw/).
It will let you see the actual headers the browser (and cache) sees.

Here is what it shows on one of my php sites:

HTTP/1.1 200 OK
Date: Mon, 02 Jun 2003 13:16:39 GMT
Server: Apache/1.3.27 (Unix) PHP/4.2.3
Cache-Control: max-age=86400
Expires: Tue, 03 Jun 2003 13:16:39 GMT
Last-Modified: Fri, 30 May 2003 16:33:19 GMT
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html

Some of these headers (Cache-Control for instance) are configured in my
.htaccess file but others are manually sent using header("");

attached mail follows:


Gerard Samuel wrote:

> Searching through the archives, most people are running away from
> caching php scripts.
> Im trying to do the opposite.
> I have a script that fetches css files. Im trying to add header()
> calls to it so
> that browsers can cache it like a normal css file.
> This is what I have at the top of the file ->
> ----------
> header('Content-type: text/css');
> header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 3600) . ' GMT');
> header('Last-Modified: ' . gmdate('D, d M Y H:i:s',
> filemtime('./foo.php')) . ' GMT');
> --------
>
> For the life of me, according to the output of ethereal (a network
> sniffer), this file is always fetched from the server.
> Yes I did breeze by the HTTP 1.1 spec, but I didn't pick up on
> anything special that I should be doing.
>
> Is there a way to make the file be put into cache, or am I barking up
> the wrong tree.
>
> Thanks for your insight.

Ok, I think it has been working all along.
Someone asked if I was viewing the actual headers. Yes I am, using
ethereal.
During my previous tests, I was reloading the page, which caused the
dynamic css file to regenerate output, while the other
css files send a "304". If I were to click on a link normally, the
dynamic file doens't show up in the header stream, so Im
assuming that means its cached. Someone else suggested that I add
header('Cache-Control: max-age=3600');
Ill do that as its the http 1.1 version of expire. Its not going to
hurt anything.

Thanks for your pointers/comments.

attached mail follows:


Simply trying to use regular expressions to validate a 5 or 5+4 zip code,
excluding 00000 and 00000-0000. Looked on http://www.regexlib.com, and
that's where I found the pattern below, but it doesn't work. The best I can
do on my own is two separate regular expressions, one to match a valid zip,
and another to match the 00000 invalid code. I would really like to
condense it into one, just because I think it should be possible.
This code below is suppose to do all this for me, but it's not matching as
I'd hoped. I get results like this:

21832-1234 MATCHES.
00000-0000 MATCHES.
00000 MATCHES.
1234 doesn't match.
ABCDEF doesn't match.
ABC doesn't match.

I'd appreciate any help. Thanks,
jason

<?php

$regex1 = "/^(\?(^00000(|-0000))|(\d{5}(|-\d{4})))$/";

$zips =
array("21243","21832-1234","00000-0000","00000","1234","ABCDEF","ABC");

foreach ($zips as $zip) {
        if (preg_match($regex1,$zip)) {
                echo "$zip MATCHES.<br>";
        } else {
                echo "$zip doesn't match.<br>";
        }
}

?>

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus

attached mail follows:


> Simply trying to use regular expressions to validate a 5 or 5+4 zip code,
> excluding 00000 and 00000-0000. Looked on http://www.regexlib.com, and
> that's where I found the pattern below, but it doesn't work. The best I
can
> do on my own is two separate regular expressions, one to match a valid
zip,
> and another to match the 00000 invalid code. I would really like to
> condense it into one, just because I think it should be possible.
> This code below is suppose to do all this for me, but it's not matching as
> I'd hoped. I get results like this:
>
> 21832-1234 MATCHES.
> 00000-0000 MATCHES.
> 00000 MATCHES.
> 1234 doesn't match.
> ABCDEF doesn't match.
> ABC doesn't match.
>
> I'd appreciate any help. Thanks,
> jason
>
> <?php
>
> $regex1 = "/^(\?(^00000(|-0000))|(\d{5}(|-\d{4})))$/";
>
> $zips =
> array("21243","21832-1234","00000-0000","00000","1234","ABCDEF","ABC");
>
> foreach ($zips as $zip) {
> if (preg_match($regex1,$zip)) {
> echo "$zip MATCHES.<br>";
> } else {
> echo "$zip doesn't match.<br>";
> }
> }
>
> ?>

Don't know of a way to do it all in one regex. You could do something like
this, though:

$pattern = '/[0-9]{5}(-[0-9]{4})?/';

if((int)$zip && preg_match($pattern,$zip))
{ echo "$zip MATCHES"; }
else
{ echo "$zip doesn't match"; }

Casting $zip to an INTEGER and checking for a TRUE value will eliminate
00000, 00000-0000, and anything starting with a letter right off the bat.
Then your regex can handle the rest.

---John Holmes...

attached mail follows:


This didnt make it to the list earlier. Maybe I need some email lessons.

Leonard.
----- Original Message -----
From: pop <lbburt0pop.uky.edu>
To: Jason Paschal <j_paschalhotmail.com>
Sent: Monday, June 02, 2003 10:58 AM
Subject: Re: [PHP] zip code validation/regular expression

> Since you are only trying to match a 00000-0000 and 00000 why not add a if
> statement b4 it compares the regex. I think that might be the simplest.
>
> Leonard
>
>
> <?php
>
> $regex1 = "/^(\?(^00000(|-0000))|(\d{5}(|-\d{4})))$/";
>
> $zips =
> array("21243","21832-1234","00000-0000","00000","1234","ABCDEF","ABC");
>
> foreach ($zips as $zip) {
> if (($zip=="00000-0000") or ($zip=="00000"))
> {
> echo "$zip doesn't match.<br>";
> }
> else
> {
> if (preg_match($regex1,$zip))
> {
> echo "$zip MATCHES.<br>";
> }
> else
> {
> echo "$zip doesn't match.<br>";
> }
> }
>
> ?>
>
> ----- Original Message -----
> From: Jason Paschal <j_paschalhotmail.com>
> To: <php-generallists.php.net>
> Sent: Monday, June 02, 2003 9:24 AM
> Subject: [PHP] zip code validation/regular expression
>
>
> > Simply trying to use regular expressions to validate a 5 or 5+4 zip
code,
> > excluding 00000 and 00000-0000. Looked on http://www.regexlib.com, and
> > that's where I found the pattern below, but it doesn't work. The best I
> can
> > do on my own is two separate regular expressions, one to match a valid
> zip,
> > and another to match the 00000 invalid code. I would really like to
> > condense it into one, just because I think it should be possible.
> > This code below is suppose to do all this for me, but it's not matching
as
> > I'd hoped. I get results like this:
> >
> > 21832-1234 MATCHES.
> > 00000-0000 MATCHES.
> > 00000 MATCHES.
> > 1234 doesn't match.
> > ABCDEF doesn't match.
> > ABC doesn't match.
> >
> > I'd appreciate any help. Thanks,
> > jason
> >
> > <?php
> >
> > $regex1 = "/^(\?(^00000(|-0000))|(\d{5}(|-\d{4})))$/";
> >
> > $zips =
> > array("21243","21832-1234","00000-0000","00000","1234","ABCDEF","ABC");
> >
> > foreach ($zips as $zip) {
> > if (preg_match($regex1,$zip)) {
> > echo "$zip MATCHES.<br>";
> > } else {
> > echo "$zip doesn't match.<br>";
> > }
> > }
> >
> > ?>
> >
> > _________________________________________________________________
> > MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> > http://join.msn.com/?page=features/virus
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>

attached mail follows:


Hello all,

I'm looking for the sort of programming inspiration I suspect I won't find in manuals - I have checked the web first!

When saving records to a table I generally do a fairly standard check to ensure that there is not already a record of the same name. I even put a big warning message on the page asking users to check to ensure that a record of a particular name doesn't already exist before they create a new record. But this hasn't stopped entries such as the following:

Record x: "The Prince's Trust"
Record y: "The Princes Trust"
Record z: "the Prince's Trust"

Two of these were entered as consecutive records by the same person!

I know I won't be able to make any application entirely foolproof but are there any steps I could use within the combination of MySQL and PHP that might minimize such duplication?

Thanks in advance,

Michael Egan

attached mail follows:


[snip]
When saving records to a table I generally do a fairly standard check to
ensure that there is not already a record of the same name. I even put
a big warning message on the page asking users to check to ensure that a
record of a particular name doesn't already exist before they create a
new record. But this hasn't stopped entries such as the following:

Record x: "The Prince's Trust"
Record y: "The Princes Trust"
Record z: "the Prince's Trust"

I know I won't be able to make any application entirely foolproof but
are there any steps I could use within the combination of MySQL and PHP
that might minimize such duplication?
[/snip]

Just some very quick thoughts....

Convert to either all uppers or all lowers (in the background) and check
againsts something done to the DB similarly. I would say that you could
do a LIKE query against the DB entries where the string length is
similar (a diff of one or two characters, but this could be really
innefficent and perhaps inaccurate. I am in the middle of trying to make
a LIKE query more efficient....it is a bear! Anyhow, that is some very
quick thoughts...

HTH!

Jay

attached mail follows:


You might also look into word stemming (removing suffixes and possibly
prefixes) and comparing stemmed titles. Another possibility would be to
find a list of commonly misspelled/misused words like (there, their,
they're) and substitute all possibilities with one version for the
purposes of checking the title. Also removing stop words like (the, of,
and) and then comparing titles would be a good method. Hint: lots of
these methods are used in Keyword finding algorithms.

You might also make the process more interactive for your users. If you
find a title through the above methods that seems like a hit present it
to the user and say:

"The following records were already found in the system, please verify
that the record you are adding is unique."

Then let the user indicate whether the record is in fact unique.

hth,
Dan

On Monday, June 2, 2003, at 08:32 AM, Michael Egan wrote:

> Hello all,
>
> I'm looking for the sort of programming inspiration I suspect I won't
> find in manuals - I have checked the web first!
>
> When saving records to a table I generally do a fairly standard check
> to ensure that there is not already a record of the same name. I even
> put a big warning message on the page asking users to check to ensure
> that a record of a particular name doesn't already exist before they
> create a new record. But this hasn't stopped entries such as the
> following:
>
> Record x: "The Prince's Trust"
> Record y: "The Princes Trust"
> Record z: "the Prince's Trust"
>
> Two of these were entered as consecutive records by the same person!
>
> I know I won't be able to make any application entirely foolproof but
> are there any steps I could use within the combination of MySQL and
> PHP that might minimize such duplication?
>
> Thanks in advance,
>
> Michael Egan
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


Thanks - I'll try to add these checks.

Life would be so much easier if it weren't for the users :-)

Michael Egan

-----Original Message-----
From: Jay Blanchard [mailto:jay.blanchardniicommunications.com]
Sent: 02 June 2003 14:38
To: Michael Egan; PHP General (E-mail)
Subject: RE: [PHP] Checking for existing records[Scanned]

[snip]
When saving records to a table I generally do a fairly standard check to
ensure that there is not already a record of the same name. I even put
a big warning message on the page asking users to check to ensure that a
record of a particular name doesn't already exist before they create a
new record. But this hasn't stopped entries such as the following:

Record x: "The Prince's Trust"
Record y: "The Princes Trust"
Record z: "the Prince's Trust"

I know I won't be able to make any application entirely foolproof but
are there any steps I could use within the combination of MySQL and PHP
that might minimize such duplication?
[/snip]

Just some very quick thoughts....

Convert to either all uppers or all lowers (in the background) and check
againsts something done to the DB similarly. I would say that you could
do a LIKE query against the DB entries where the string length is
similar (a diff of one or two characters, but this could be really
innefficent and perhaps inaccurate. I am in the middle of trying to make
a LIKE query more efficient....it is a bear! Anyhow, that is some very
quick thoughts...

HTH!

Jay

attached mail follows:


I should have looked at the manual a bit more thoroughly.

I've just come across the similar_text() function which should do just what I'm after :-)

Thanks,

Michael Egan

attached mail follows:


Thanks Daniel.

I think the approach I'll settle for will be to do an initial check to make sure that no record of exactly the same name exists and then look through the records to see if there are any similar records using the similar_text() function.

I'll present the records from the second stage to the user to prompt them to see if they really want to add the record name they have just entered.

If there are any improvements to this I'll be happy to take them on board.

I confess that by far and away my preferred solution would be to get the staff of the section using the application to put their brains into gear before using it - but I suppose if everybody did this some of us might be out of a job.

Sorry about the rant but it's been one of those weeks - and it's only Monday!!

Thanks,

Michael Egan

-----Original Message-----
From: Daniel Stark [mailto:dstarkmac.com]
Sent: 02 June 2003 15:11
To: Michael Egan
Cc: PHP General (E-mail)
Subject: Re: [PHP] Checking for existing records[Scanned]

You might also look into word stemming (removing suffixes and possibly
prefixes) and comparing stemmed titles. Another possibility would be to
find a list of commonly misspelled/misused words like (there, their,
they're) and substitute all possibilities with one version for the
purposes of checking the title. Also removing stop words like (the, of,
and) and then comparing titles would be a good method. Hint: lots of
these methods are used in Keyword finding algorithms.

You might also make the process more interactive for your users. If you
find a title through the above methods that seems like a hit present it
to the user and say:

"The following records were already found in the system, please verify
that the record you are adding is unique."

Then let the user indicate whether the record is in fact unique.

hth,
Dan

attached mail follows:


Hi all!

I'd like to use cookies in sessions on my backend to eliminate the
possibility of "session hijacking," but I'm a bit concerned about cookie
security. If you set a cookie to last until the browser session is ended,
what happens to the cookie if the system/browser crashes? Can I trust every
browser to check for old cookies on startup and eliminate them? And still,
even if I can, wouldn't the cookie be intact to read on the harddrive until
the browser is started again? I was thinking about slicing the username and
password strings in two, and storing the halves in cookies and server
sessions respectively, e.g.:

Username = Admin -> Cookieusername = Ad, Sessionusername = min
Password = Secret -> Cookiepassword = Sec, Sessionpassword = ret

...and then do database connections with <cookie+session>...

Any thoughts on this approach? Good idea or bad idea?

TIA,
Daniel

attached mail follows:


Hi,

is there a way, to verify a password via php, if it matches it's entry
in /etc/shadow ?
I am trying to write a script, which needs a user authentification on a
server wide basis and since the users come and go rather fast on the
server in question, i thought that the best way would be to let the user
enter his system username & password and validate it with the one set in
/etc/shadow for that entered username.

md5() didn't work, so i guess that i am using the wrong method. Does
anyone know, how i can achieve this?

Regards,
Duncan

attached mail follows:


Well, make sure you tunnel it securly with SSL or the like, but have a look at:
http://us3.php.net/manual/en/function.crypt.php

-Brad

> Hi,
>
> is there a way, to verify a password via php, if it matches it's entry
> in /etc/shadow ?
> I am trying to write a script, which needs a user authentification on a
> server wide basis and since the users come and go rather fast on the
> server in question, i thought that the best way would be to let the user
> enter his system username & password and validate it with the one set in
> /etc/shadow for that entered username.
>
> md5() didn't work, so i guess that i am using the wrong method. Does
> anyone know, how i can achieve this?
>
> Regards,
> Duncan
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


I think this is a bug in IE. Try other browsers, and if your code works,
all you can do is to use a workaround (metarefresh).

Haseeb Iqbal wrote:
> Hi all,
> don't know for sure if this is heppening to me only or there are others who faced the same problem
> here is whats wrong
> when ever i set a cookie it didn't get set even i refresh the page (with php header function) but then i echo something on the page and then use HTML meta refresh the cookie becomes availble on the next page.
> what is it that i am missing here.
> Haseeb
>
>

attached mail follows:


Petre,

        We use the R&OS PDF Class its very easy to set up and has a ton
of options, best part is that you don't need PDFLIB.

http://www.ros.co.nz/pdf

Hth

Thank You
Brian Paulson
Sr. Web Developer
Email: BpaulsonChieftain.com
Phone: 1-800-279-6397
Fax: 1-719-544-0264
URL: www.chieftain.com
-------------------------------------------

-----Original Message-----
From: Petre Agenbag [mailto:internetvsa.co.za]
Sent: Monday, June 02, 2003 12:32 AM
To: php-generallists.php.net
Subject: [PHP] GEnerating PDF's

Hi List

I'm investigating different possibilities to generate printable and
read-only documents, and the "best" method seems to be generating PDF's,
however, I have NO experience with working with PDF's, and the examples
in the manual only list a simple "one-liner" text pdf.
Where can I find more material that will explain in layman's terms how
to generate pdf's from various sources. As example, I'd like to generate
PDF's of a webpage "on-the-fly" or even from data in MySQL tables. It
seems that you need to provide the pdf generation process with the
co-ordinates and size of each "element", but it is the location of the
"elements" that I have trouble with, ie. what is needed to define each
element?

Thanks for the help.

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

attached mail follows:


Look at www.oscommerce.com and its solution

David McGlone wrote:
> Hi all, I've got a really tough question, I am building an application that
> allows PayPal's shopping cart to have multiple items, but also multiple
> prices for the same item, but a different style or size or color, and Im
> quite stuck on how I would get the prices of the item according to it's color
> or description from a dropdown and insert it into a hidden field to be
> inserted into the shopping cart, as far as I know I can't modify the dropdown
> or it will not show up in the options of the shopping cart, so I need to work
> around the dropdowns.
>
> Basically what Im trying to do is when lets say "black" is selected from the
> dropdown, then the price for a black shirt is grabbed from the database and
> inserted into a hidden field.
>
> Did I explain the right?

attached mail follows:


At 5/30/2003 09:47 PM, David McGlone wrote:

> Basically what Im trying to do is when lets say "black" is selected from
the
> dropdown, then the price for a black shirt is grabbed from the database and
> inserted into a hidden field.

If you want this to happen dynamically, as the user is on the page, then
you're not doing it with PHP. However, if you can stand refreshing the page
every time the user makes a change, then PHP is for you.

Client-side is javascript. I'll be happy to offer some assistance with the
javascript, but not on this list.

--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: skellerhealthtvchannel.org
Web: www.healthtvchannel.org

attached mail follows:


Greeting,

I have just change my server to apache 2.0.44 and php 4.3.1 (from mandrake
9.1) and i have a problem now

When i pass a numeric parameter to a php script from a form, the parameter is
equal zero !

Here is my form:
<p > Modification d'un matériel: </p>

<table>
<tr>
        <td align="right">Numéro: </td>
        <td><form action="edit.php" method="POST" target="bas" name="forme">
        <input type="text" name="id" size="3"></td>
        <td><input value="Modifier" type="submit"></td>
        </form>
</tr>
</table>

here is my script php:

<?
       $taille=strlen($id);
        print("ident: $id <br>");
        $id=(int) $id;
?>

where does the problem come from ?

Thanks
Franck

attached mail follows:


php.ini: register_globals = off?
look at $_POST['id'].
ciao

"Franck Collineau" <franck1.collineaurd.francetelecom.com> schrieb im
Newsbeitrag
news:200306021703.27831.franck1.collineaurd.francetelecom.com...
> Greeting,
>
> I have just change my server to apache 2.0.44 and php 4.3.1 (from mandrake
> 9.1) and i have a problem now
>
>
> When i pass a numeric parameter to a php script from a form, the
parameter is
> equal zero !
>
> Here is my form:
> <p > Modification d'un matériel: </p>
>
> <table>
> <tr>
> <td align="right">Numéro: </td>
> <td><form action="edit.php" method="POST" target="bas"
name="forme">
> <input type="text" name="id" size="3"></td>
> <td><input value="Modifier" type="submit"></td>
> </form>
> </tr>
> </table>
>
>
> here is my script php:
>
> <?
> $taille=strlen($id);
> print("ident: $id <br>");
> $id=(int) $id;
> ?>
>
>
> where does the problem come from ?
>
>
> Thanks
> Franck

attached mail follows:


Hi,

I wan to do something like that, I saw some sites do but how?

I wanto code in HTML like that

<img src=http://www.myserver.com/image.php?id=12321>

so it will go and that the image like the id and display it in html..

TIA

attached mail follows:


<?
$r = 255;
$g = 0;
$b = 0;
header("Content-Length: 43");
header("Content-Type: image/gif");
printf("GIF89a\1\0\1\0%c\0\0%c%c%c\0\0\0%s,\0\0\0\0\1\0\1\0\0%c%c%c\1\0;",
144,
$r,
$g,
$b,
pack("c8",33,249,4,5,16,0,0,0), 2,2,4 );
?>

this works fine... a 1x1 transperant GIF file....

attached mail follows:


On Mon, 2 Jun 2003 17:07:17 +0200, Ferhat BINGOL wrote:

>I wan to do something like that, I saw some sites do but how?
>I wanto code in HTML like that
><img src=http://www.myserver.com/image.php?id=12321>
>so it will go and that the image like the id and display it in html..

Are you intending to create an image with the php, redirect to an
existing image or simply create a link in the HTML to an existing
image?

If you intend to create an image (which the code above appears to
suggest) you might want to check out the info on the image functions
(http://us4.php.net/manual/en/ref.image.php).

If you intend to do a redirect to an existing image, you might be able
to simply return the following (untested, but I think it should work -
at least with reasonably new browsers):

<?php
header("Location: http://www.myserver.com/image/" . $_GET["id"] .
".gif");
exit;
?>

Of course you could also generate the "<image...>" tag via php. Then
instead of:

<img src=http://www.myserver.com/image.php?id=12321>

you would have....

<?php
  
  $image = 12321;

  echo '<img src="http://www.myserver.com/' . $image . '.gif">';
?>

attached mail follows:


that helped a lot ..

thanks..

attached mail follows:


I have a text box on a web page and submit button. The php code sends the
text as an email. If the text includes an inverted comma/apostrophe the
email will include a backslash before it, thus: \'. I know how to
str_replace in php, but what do I need to replace the apostrophe with to
avoid the \? The HTML for ' is &#39; if that helps. I've looked at ASCII
in google, but am unenlightened. Can't find the answer in php.net under
mail() function either.

John

                                           http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are confidential. If you are not the named recipient please notify the sender and immediately delete it. You may not disseminate, distribute, or forward this e-mail message or disclose its contents to anybody else. Copyright and any other intellectual property rights in its contents are the sole property of Cantor Fitzgerald.
     E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.
     Although we routinely screen for viruses, addressees should check this e-mail and any attachments for viruses. We make no representation or warranty as to the absence of viruses in this e-mail or any attachments. Please note that to ensure regulatory compliance and for the protection of our customers and business, we may monitor and read e-mails sent to and from our server(s).

For further important information, please read the Important Legal Information and Legal Statement at http://www.cantor.com/legal_information.html

attached mail follows:


Umm, try this:

$body = str_replace('\'','&#39;',stripslashes($_POST['message']));

mail($to,$subject,$body,"Content-type:text/html\r\n");

On Mon, 2003-06-02 at 11:12, Dillon, John wrote:
> I have a text box on a web page and submit button. The php code sends the
> text as an email. If the text includes an inverted comma/apostrophe the
> email will include a backslash before it, thus: \'. I know how to
> str_replace in php, but what do I need to replace the apostrophe with to
> avoid the \? The HTML for ' is &#39; if that helps. I've looked at ASCII
> in google, but am unenlightened. Can't find the answer in php.net under
> mail() function either.
>
> John
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> http://www.cantor.com
> CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are confidential. If you are not the named recipient please notify the sender and immediately delete it. You may not disseminate, distribute, or forward this e-mail message or disclose its contents to anybody else. Copyright and any other intellectual property rights in its contents are the sole property of Cantor Fitzgerald.
> E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.
> Although we routinely screen for viruses, addressees should check this e-mail and any attachments for viruses. We make no representation or warranty as to the absence of viruses in this e-mail or any attachments. Please note that to ensure regulatory compliance and for the protection of our customers and business, we may monitor and read e-mails sent to and from our server(s).
>
> For further important information, please read the Important Legal Information and Legal Statement at http://www.cantor.com/legal_information.html
--
Adam Voigt (adamcryptocomm.com)
Linux/Unix Network Administrator
The Cryptocomm Group

attached mail follows:


Hi there,

I think you need to check magic quotes setting under
php.ini. I guess it should be on. Try to make it off
and try your mail function.

Thanks

Hardik Doshi

--- "Dillon, John" <JDilloncantor.co.uk> wrote:
> I have a text box on a web page and submit button.
> The php code sends the
> text as an email. If the text includes an inverted
> comma/apostrophe the
> email will include a backslash before it, thus: \'.
> I know how to
> str_replace in php, but what do I need to replace
> the apostrophe with to
> avoid the \? The HTML for ' is ' if that helps.
> I've looked at ASCII
> in google, but am unenlightened. Can't find the
> answer in php.net under
> mail() function either.
>
> John
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
                                           http://www.cantor.com
> CONFIDENTIAL: This e-mail, including its contents
> and attachments, if any, are confidential. If you
> are not the named recipient please notify the sender
> and immediately delete it. You may not disseminate,
> distribute, or forward this e-mail message or
> disclose its contents to anybody else. Copyright and
> any other intellectual property rights in its
> contents are the sole property of Cantor Fitzgerald.
> E-mail transmission cannot be guaranteed to be
> secure or error-free. The sender therefore does not
> accept liability for any errors or omissions in the
> contents of this message which arise as a result of
> e-mail transmission. If verification is required
> please request a hard-copy version.
> Although we routinely screen for viruses,
> addressees should check this e-mail and any
> attachments for viruses. We make no representation
> or warranty as to the absence of viruses in this
> e-mail or any attachments. Please note that to
> ensure regulatory compliance and for the protection
> of our customers and business, we may monitor and
> read e-mails sent to and from our server(s).
>
> For further important information, please read the
> Important Legal Information and Legal Statement at
> http://www.cantor.com/legal_information.html
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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

attached mail follows:


You have magic_quotes on, with this setting php runs addslashes() on
every $_REQUEST variable (so you can use them in sql queries right
away). So you need to use stripslashes() before sending it as mail.

Dillon, John wrote:
> I have a text box on a web page and submit button. The php code sends the
> text as an email. If the text includes an inverted comma/apostrophe the
> email will include a backslash before it, thus: \'. I know how to
> str_replace in php, but what do I need to replace the apostrophe with to
> avoid the \? The HTML for ' is &#39; if that helps. I've looked at ASCII
> in google, but am unenlightened. Can't find the answer in php.net under
> mail() function either.
>
> John
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> http://www.cantor.com
> CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are confidential. If you are not the named recipient please notify the sender and immediately delete it. You may not disseminate, distribute, or forward this e-mail message or disclose its contents to anybody else. Copyright and any other intellectual property rights in its contents are the sole property of Cantor Fitzgerald.
> E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.
> Although we routinely screen for viruses, addressees should check this e-mail and any attachments for viruses. We make no representation or warranty as to the absence of viruses in this e-mail or any attachments. Please note that to ensure regulatory compliance and for the protection of our customers and business, we may monitor and read e-mails sent to and from our server(s).
>
> For further important information, please read the Important Legal Information and Legal Statement at http://www.cantor.com/legal_information.html
>
>

attached mail follows:


http://au3.php.net/manual/en/features.cookies.php

(not intended as a smart-arse post)

on 01/06/03 11:56 PM, Ryan A (ryanjumac.com) wrote:

> Hi everyone,
> Some time back I had no idea about sessions and I asked this list to give me
> a few links on the web where i can learn about them, thanks to you guys I
> understand sessions and use them without any problem.
>
> Now I have the same problem with cookies, I of course first went to our
> friend (google) and asked him about cookies in PHP, the problem is I got a
> hell of a lot of answers from him....which one is good? I am a total newbie
> when it comes to cookies so can you recomend any one (or two) URL/s which
> gives a step by step totural on using cookies in PHP? hopefully in baby
> steps if cookies are too complicated.
>
> Thanks,
> -Ryan
>

attached mail follows:


on 02/06/03 9:55 PM, Aris Santillan (arisfemalenetwork.com) wrote:

<?
session_start();
$_SESSION['name'] = $_POST['name'];
echo $_SESSION['name'];
?>

Justin

attached mail follows:


on 02/06/03 6:03 PM, Adrian Portsmouth (forumssilkwd.com) wrote:

> The value isn't available until the next page

Huh???? It's available straight away.

Justin

attached mail follows:


on 02/06/03 8:06 PM, electroteque (danielelectroteque.org) wrote:

> thats what i was thinking of logic but i may be having about 10 users logged
> in doing full text searching on a 200 meg + database will that affect it ?

the issue shouldn't be your full text searching... the issue should be your
session timeouts...

the particular code as discussed will only be one or two small, one-row
queries on (i'd hope) a highly optimised and appropriately indexed table.

get this working.

then if full-text searching on a huge database creates issues, you can
address that, since it's clearly the bigger problem. the answer might be
massive indexing, or query caching, or something else.

at least that's the way i'd approach it.

justin

attached mail follows:


At 6/1/2003 09:05 PM, zavaboy wrote:

> How can I strip ALL HTML tags, then turn UBB code to HTML. And I also want
> to know how to turn the HTML back to UBB?

http://us3.php.net/manual/en/function.strip-tags.php

http://promoxy.mirrors.phpclasses.org/browse.html/package/818.html

Google is your friend, Zava.

--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: skellerhealthtvchannel.org
Web: www.healthtvchannel.org

attached mail follows:


Hi everyone

Someone know how to set PHP work with DB2 on Win32 ?

Thanks in advanced

--
EF.

attached mail follows:


is this correct?

wouldn't you want the array to be like this?

        $rates = array('7.45'=>20,
                       '8.45'=>35,
                       '9.45'=>55,
                       '10.45'=>80,
                       '11.45'=>100,
                       '13.45'=>150,
                       '15.55'=>200,
                       '19.45'=>999999999);

otherwise your foreach would need to be a for loop something like this.

        for($i=0; $i<count($rates); $i++ )) {
            if( $num > current( key( $rates[$i] ) ) ) continue;
            else { $price = key( $rates[$i] ); break; }
        }

Correct me if I am wrong.

Jim Lucas

----- Original Message -----
From: "Rasmus Lerdorf" <rasmuslerdorf.com>
To: "Ralph" <ralphnqionline.com>
Cc: "PHP General Mailing List" <php-generallists.php.net>
Sent: Sunday, June 01, 2003 2:26 AM
Subject: Re: [PHP] Shipping Rates

> Better approach in what sense? From a performance perspective you are not
> going to beat a specific set of if conditions unless there is an distinct
> formula you can apply. I will assume there is no simple mathematical
> relationship for your full set of data and what you are really looking for
> is a way to just feed the pricing structure into your code by some
> mechanism and then have it just work, so your goal is to make it more
> maintenable. To that end, you could stick your pricing table into an
> array of arrays and simple loop through it. Something like this:
>
> function find_rate($num) {
> $rates = array(array('7.45'=>20),
> array('8.45'=>35),
> array('9.45'=>55),
> array('10.45'=>80),
> array('11.45'=>100),
> array('13.45'=>150),
> array('15.55'=>200),
> array('19.45'=>999999999));
>
> foreach($rates as $i => $vals) {
> if($num > current($vals)) continue;
> else { $price = key($vals); break; }
> }
> return $price;
> }
>
> This should return the correct shipping price for whatever you pass into
> find_rate().
>
> -Rasmus
>
> On Sun, 1 Jun 2003, Ralph wrote:
>
> > Maybe it's just that it's late, but can't seem to figure this out. I
> > want to show a shipping price depending on the amount of purchase. I
> > thought about using a lot of if() statements, but I know this is not the
> > best way to go about this.
> >
> > Can anybody enlighten me on this one and give me a better approach.
> >
> > Here is an example of my shipping rates:
> >
> > Less than $20.00 = $7.45
> > $20.01-$35.00 = $8.45
> > $35.01- $55.00 = $9.45
> > $55.01-$80.00 = $10.45
> > $80.01-$100.00 = $11.45
> > $100.01-$150.00 = $13.45
> > $150.01-$200.00 = $15.55
> > $200.01 or more = $19.45
> >
> > 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
>
>

attached mail follows:


Answering my own answer. I see now how you are extracting the sub array
information.

My mistake.

Jim Lucas
----- Original Message -----
From: "Jim Lucas" <phplistzonedzero.net>
To: "Rasmus Lerdorf" <rasmuslerdorf.com>; "Ralph" <ralphnqionline.com>
Cc: "PHP General Mailing List" <php-generallists.php.net>
Sent: Monday, June 02, 2003 9:57 AM
Subject: Re: [PHP] Shipping Rates

> is this correct?
>
> wouldn't you want the array to be like this?
>
> $rates = array('7.45'=>20,
> '8.45'=>35,
> '9.45'=>55,
> '10.45'=>80,
> '11.45'=>100,
> '13.45'=>150,
> '15.55'=>200,
> '19.45'=>999999999);
>
> otherwise your foreach would need to be a for loop something like this.
>
> for($i=0; $i<count($rates); $i++ )) {
> if( $num > current( key( $rates[$i] ) ) ) continue;
> else { $price = key( $rates[$i] ); break; }
> }
>
> Correct me if I am wrong.
>
> Jim Lucas
>
> ----- Original Message -----
> From: "Rasmus Lerdorf" <rasmuslerdorf.com>
> To: "Ralph" <ralphnqionline.com>
> Cc: "PHP General Mailing List" <php-generallists.php.net>
> Sent: Sunday, June 01, 2003 2:26 AM
> Subject: Re: [PHP] Shipping Rates
>
>
> > Better approach in what sense? From a performance perspective you are
not
> > going to beat a specific set of if conditions unless there is an
distinct
> > formula you can apply. I will assume there is no simple mathematical
> > relationship for your full set of data and what you are really looking
for
> > is a way to just feed the pricing structure into your code by some
> > mechanism and then have it just work, so your goal is to make it more
> > maintenable. To that end, you could stick your pricing table into an
> > array of arrays and simple loop through it. Something like this:
> >
> > function find_rate($num) {
> > $rates = array(array('7.45'=>20),
> > array('8.45'=>35),
> > array('9.45'=>55),
> > array('10.45'=>80),
> > array('11.45'=>100),
> > array('13.45'=>150),
> > array('15.55'=>200),
> > array('19.45'=>999999999));
> >
> > foreach($rates as $i => $vals) {
> > if($num > current($vals)) continue;
> > else { $price = key($vals); break; }
> > }
> > return $price;
> > }
> >
> > This should return the correct shipping price for whatever you pass into
> > find_rate().
> >
> > -Rasmus
> >
> > On Sun, 1 Jun 2003, Ralph wrote:
> >
> > > Maybe it's just that it's late, but can't seem to figure this out. I
> > > want to show a shipping price depending on the amount of purchase. I
> > > thought about using a lot of if() statements, but I know this is not
the
> > > best way to go about this.
> > >
> > > Can anybody enlighten me on this one and give me a better approach.
> > >
> > > Here is an example of my shipping rates:
> > >
> > > Less than $20.00 = $7.45
> > > $20.01-$35.00 = $8.45
> > > $35.01- $55.00 = $9.45
> > > $55.01-$80.00 = $10.45
> > > $80.01-$100.00 = $11.45
> > > $100.01-$150.00 = $13.45
> > > $150.01-$200.00 = $15.55
> > > $200.01 or more = $19.45
> > >
> > > 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 General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


Hi all,
I noticed a strange behaviour of Explorer with HTTP redirections (301/302)
and sessions.

2 web sites, A and B.
Web site A set cookie session and redirect (HTTP 302) directly to web site B
that uses simple sessions.

When going directly to site B, session is kept during all the navigation and
when the browser is closed, session is lost.
This is the expected behaviour.

But if going by site A and being redirected, the session ID used on site B
is the one set by the site A and so the session is kept in cookie and is not
destroyed when browser is closed.

I don't know if I'm completely clear.... hope so.

Looks like a bug for me. Or at least, it's a quite surprising process...

Is any of you has more info on that ?
I'm not sure to be right though...

Thanks,
Benja.

attached mail follows:


Sorry for the delay...
Yes, it is set (I even removed the <IfModule mod_php4.c> directives) but it's still no executing but acting more like downloads :(

Any suggestions?
/Kjell

----- Original Message -----
From: "electroteque" <danielelectroteque.org>
To: "Kjell Hansen" <kjell.hansentelia.com>; <php-generallists.php.net>
Sent: Sunday, May 25, 2003 3:42 PM
Subject: RE: [PHP] Apache problem:PHP will not execute

> set the application type for php
>
> AddType application/x-httpd-php .php
>
> -----Original Message-----
> From: Kjell Hansen [mailto:kjell.hansentelia.com]
> Sent: Sunday, May 25, 2003 8:56 PM
> To: php-generallists.php.net
> Subject: [PHP] Apache problem:PHP will not execute
>
>
> Hi ye all,
> I've just installed an Apache-server and it reports that PHP is enabled
> but when I try to open a test page it will not execute but rather
> download (like an unknown file type)
>
> Where's the setting I've missed?!?!?
>
> Thanx
> /Kjell
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


Sorry, for the delay in responding and for not indicating my OS...
Linux SuSE8.1 is where I can't get i working, on my w2k it's functioning like it's supposed.

/Kjell
----- Original Message -----
From: "Gurhan Ozen" <ergenekonstarpower.net>
To: "Kjell Hansen" <kjell.hansentelia.com>
Cc: <php-generallists.php.net>
Sent: Sunday, May 25, 2003 6:38 PM
Subject: Re: [PHP] Apache problem:PHP will not execute

> On Sun, 2003-05-25 at 06:55, Kjell Hansen wrote:
> > Hi ye all,
> > I've just installed an Apache-server and it reports that PHP is enabled
> > but when I try to open a test page it will not execute but rather
> > download (like an unknown file type)
> >
> > Where's the setting I've missed?!?!?
> >
> > Thanx
> > /Kjell
> >
> Hi Kjell,
> There is step-by-step instructions here:
> http://www.thesitewizard.com/archive/php4install.shtml
>
> Go through it, and make sure you have done all steps correctly
> Gurhan
>
>
>
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
>
>

attached mail follows:


Make sure your have the following line in your apache config file (usually
httpd.conf). If its not there then add it somewhere and restart apache.

AddType application-x-httpd-php .php

HTH
R'twick
----- Original Message -----
From: "Kjell Hansen" <kjell.hansentelia.com>
To: "Gurhan Ozen" <ergenekonstarpower.net>
Cc: <php-generallists.php.net>
Sent: Monday, June 02, 2003 2:28 PM
Subject: Re: [PHP] Apache problem:PHP will not execute

Sorry, for the delay in responding and for not indicating my OS...
Linux SuSE8.1 is where I can't get i working, on my w2k it's functioning
like it's supposed.

/Kjell
----- Original Message -----
From: "Gurhan Ozen" <ergenekonstarpower.net>
To: "Kjell Hansen" <kjell.hansentelia.com>
Cc: <php-generallists.php.net>
Sent: Sunday, May 25, 2003 6:38 PM
Subject: Re: [PHP] Apache problem:PHP will not execute

> On Sun, 2003-05-25 at 06:55, Kjell Hansen wrote:
> > Hi ye all,
> > I've just installed an Apache-server and it reports that PHP is enabled
> > but when I try to open a test page it will not execute but rather
> > download (like an unknown file type)
> >
> > Where's the setting I've missed?!?!?
> >
> > Thanx
> > /Kjell
> >
> Hi Kjell,
> There is step-by-step instructions here:
> http://www.thesitewizard.com/archive/php4install.shtml
>
> Go through it, and make sure you have done all steps correctly
> Gurhan
>
>
>
> >
> > --
> > 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

attached mail follows:


Just wanted to pass a little warning on to the list. I sent a reply to
David McGlone (davidedificationweb.com) and my email got forwarded to an
address at Bonzi.com. I'm not sure if they're using list replies to harvest
email addresses or not, but I'll definitely be watching my in-box.

>From: TechSupport <TechSupportbonzi.com>
>To: skellerhealthtvchannel.org
>Date: Mon, 02 Jun 2003 17:17:55 GMT
>Subject: Re: [PHP] I guess I'll give the list a shot [T2003060200WW]
>
>This is an automatic reply to acknowledge that your message has been
>received. PLEASE DO NOT REPLY TO THIS MESSAGE.
>
>--------------------------------------------------------------------------
>
>Dear skellerhealthtvchannel.org,
>
>Thank you for submitting your question to our Technical Support
>Department. We received it on 6/2/2003 at 10:17:55 AM. Your tracking
>number for this message is: T2003060200WW. This message and tracking
>number are your assurance that we have received your message and will
>respond to it as quickly as possible.
>
>At BONZI Software we attempt to answer all of the questions we get on a
>first-come, first-served basis, as quickly as possible. On occasion we
>receive a large volume of e-mail that prevents us from answering your
>message as quickly as we would like. Please be assured that we have your
>message and will respond to it as quickly as we can.
>
>If your question to us is of a support nature, you can visit
>http://www.bonzi.com/support.htm to try and find an answer to your
>question in our online support center. This will often be quicker than we
>can reply to your message by hand, so we encourage you to try it out.
>
>Sincerely,
>
>Customer Support
>BONZI Software
>HTTP://www.bonzi.com

--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: skellerhealthtvchannel.org
Web: www.healthtvchannel.org

attached mail follows:


That mail came to me as well... We must get rid of them! Only one mail was
painful enough...
"Steve Keller" <skellerhealthtvchannel.org> skrev i meddelandet
news:5.1.1.6.0.20030602093208.00aad648207.159.149.141...
> Just wanted to pass a little warning on to the list. I sent a reply to
> David McGlone (davidedificationweb.com) and my email got forwarded to an
> address at Bonzi.com. I'm not sure if they're using list replies to
harvest
> email addresses or not, but I'll definitely be watching my in-box.
>
>
>
> >From: TechSupport <TechSupportbonzi.com>
> >To: skellerhealthtvchannel.org
> >Date: Mon, 02 Jun 2003 17:17:55 GMT
> >Subject: Re: [PHP] I guess I'll give the list a shot [T2003060200WW]
> >
> >This is an automatic reply to acknowledge that your message has been
> >received. PLEASE DO NOT REPLY TO THIS MESSAGE.
> >
>
>--------------------------------------------------------------------------
> >
> >Dear skellerhealthtvchannel.org,
> >
> >Thank you for submitting your question to our Technical Support
> >Department. We received it on 6/2/2003 at 10:17:55 AM. Your tracking
> >number for this message is: T2003060200WW. This message and tracking
> >number are your assurance that we have received your message and will
> >respond to it as quickly as possible.
> >
> >At BONZI Software we attempt to answer all of the questions we get on a
> >first-come, first-served basis, as quickly as possible. On occasion we
> >receive a large volume of e-mail that prevents us from answering your
> >message as quickly as we would like. Please be assured that we have your
> >message and will respond to it as quickly as we can.
> >
> >If your question to us is of a support nature, you can visit
> >http://www.bonzi.com/support.htm to try and find an answer to your
> >question in our online support center. This will often be quicker than we
> >can reply to your message by hand, so we encourage you to try it out.
> >
> >Sincerely,
> >
> >Customer Support
> >BONZI Software
> >HTTP://www.bonzi.com
>
>
>
> --
> S. Keller
> UI Engineer
> The Health TV Channel, Inc.
> (a non - profit organization)
> 3820 Lake Otis Pkwy.
> Anchorage, AK 99508
> 907.770.6200 ext.220
> 907.336.6205 (fax)
> Email: skellerhealthtvchannel.org
> Web: www.healthtvchannel.org
>

attached mail follows:


guys, did you find the reasons and how to get rid off it?

attached mail follows:


I am new to php and I just have some general questions.

1. when you create a new variable such as an integer, is it automatically
initialized or is it considered empty similar to asp?
2. If I were to create an array and filled the array with a Boolean value, a
string, and an integer what type would the array take on?

Thanks,
Dale

attached mail follows:


Dale,

1. If my memory serves me correctly, when you initialize a variable, it
is given the default value of NULL until something is assigned to it.
2. PHP is not a strongly typed language, meaning that your array would
act as so:

    $arr_test[0] = 1; /// Integer type
    $arr_test[1] = "My Name"; /// String type
    $arr_test[2] = true; /// Boolean type

Hope this helps,

Jordan S. Jones

Dale wrote:

>I am new to php and I just have some general questions.
>
>1. when you create a new variable such as an integer, is it automatically
>initialized or is it considered empty similar to asp?
>2. If I were to create an array and filled the array with a Boolean value, a
>string, and an integer what type would the array take on?
>
>Thanks,
>Dale
>
>
>
>
>

attached mail follows:


You create a variable by assigning a value to it sorta...

Am I misstaken or would every value be considered as different types? Don't
think you would get problems with it... Maybe string... In PHP, it doesn't
really matter all that much if a number is int or string as they are
automaticly converted...
"Dale" <DaleHershhotmail.com> skrev i meddelandet
news:20030602185130.92444.qmailpb1.pair.com...
> I am new to php and I just have some general questions.
>
> 1. when you create a new variable such as an integer, is it automatically
> initialized or is it considered empty similar to asp?
> 2. If I were to create an array and filled the array with a Boolean value,
a
> string, and an integer what type would the array take on?
>
> Thanks,
> Dale
>
>

attached mail follows:


Search through the docs/archive and can't figure this one out. Surely I'm overlooking something obvious.

I can't figure out how to escape a literal "/" in $q. Adding the line: $q=str_replace("/", "\/", $q); yields a literal "\/" in $content.

$q_upper=strtoupper($q);
$q_lower=strtolower($q);
$q_ucfirst=ucfirst($q);

$patterns[0] = "/$q/";
$patterns[1] = "/$q_upper/";
$patterns[2] = "/$q_lower/";
$patterns[3] = "/$q_ucfirst/";

$content = preg_replace($patterns, $replacements, $content);

Thanks in advance, sincerely!

attached mail follows:


Hello, I am new to PHP and would greatly appreciate any help.

I am building a webpage for my sister's sorority- http://olemissddd.com. I
have built a page that allows them to update the officers each year-
http://hedges.org/ddd/olemiss/updateofficers.php and then view those
officers- http://hedges.org/ddd/olemiss/officers.php .

However, what I want to be able to do that I can't figure out is for when
they leave one of the fields blank it doesn't change anything. As it is
now, when they change one of the fields and leave the others blank it will
overwrite the names it had for them with blank spaces. I want to be able to
do this so for example if they mistype someone's name, etc. So somehow I
need to be able to tell it that when the user leaves the field blank, not to
change that field in MySQL.

Thanks very much,
Matt Hedges
matthedges.org

--
___________________________
| Matt Hedges
| http://hedgesinnovations.com
|

attached mail follows:


At 21:12 02.06.2003, Matt Hedges said:
--------------------[snip]--------------------
>Hello, I am new to PHP and would greatly appreciate any help.
>
>I am building a webpage for my sister's sorority- http://olemissddd.com. I
>have built a page that allows them to update the officers each year-
>http://hedges.org/ddd/olemiss/updateofficers.php and then view those
>officers- http://hedges.org/ddd/olemiss/officers.php .
>
>However, what I want to be able to do that I can't figure out is for when
>they leave one of the fields blank it doesn't change anything. As it is
>now, when they change one of the fields and leave the others blank it will
>overwrite the names it had for them with blank spaces. I want to be able to
>do this so for example if they mistype someone's name, etc. So somehow I
>need to be able to tell it that when the user leaves the field blank, not to
>change that field in MySQL.
--------------------[snip]--------------------

Try something like

    if (!empty($_REQUEST['fieldname']))
       dbupdate('fieldname');

http://www.php.net/manual/en/function.empty.php

--
>O Ernest E. Vogelsinger
   (\) ICQ #13394035
    ^ http://www.vogelsinger.at/

attached mail follows:


Ok I am attempting to do something very simple and I know it can be
done, but I have been told otherwise. I have two select menu's,
Products and Components. There is a one to many relationship between
them (one product can have many components). I just want it so that
when the user selects an entry in Products, Components get dynamically
loaded (I know I gotta do somethign with onchange="" but not sure what).
Value of Products and Components are being pulled form a database.

Someone told me the only way to do this is to load all the values of
components into an array and pass it around. Thats just dont' sound
right to me.

I was thinking perhaps I can just do somthing like
onchange="PHP_SELF?product=<value>". No I know thats not the syntax but
you get the idea =)

Any help would be appreciated. Please keep in mind i have very very
little knowledge of javascript.

Sincerely,
Vijay Avarachen

attached mail follows:


At 6/2/2003 02:44 PM, Vijay Avarachen wrote:

> I know I gotta do somethign with onchange=""

That's Javascript, not PHP.

> I was thinking perhaps I can just do somthing like
onchange="PHP_SELF?product=<value>". No I
> know thats not the syntax but you get the idea =)

That won't "dynamically load" anything. If you use onchange to submit the
form to a new PHP page, the user will see it refresh every time they make a
change. It won't work automatically.

> Please keep in mind i have very very little knowledge of javascript.

All the more reason for you to ask Javascript questions on a Javascript
mailing list, this one's for PHP. And, since PHP is server-side and
Javascript is client-side, what you want to do cannot be done with PHP.

--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: skellerhealthtvchannel.org
Web: www.healthtvchannel.org

attached mail follows:


I agree that you will probably have to build all possible select value arrays on pageload if you want the select list to switch without a page reload. PHP is parsed by the webserver and then sent to the page. Javascript is parsed by the browser. You can use PHP to "dynamically" generate Javascript, which can be pretty cool.

A great example of what you're trying to do can be seen on many car dealership websites, where you first select a car "make" and then all possible models for that make appear with a page refresh in the "model" select list. Snoop around for that javascript source and you'll be on your way.

I agree with prior respondant that this is a PHP list, so that's it about JS from me. Just know that you can do anything with PHP as long as you can get a page load in there to parse the script. Keep in mind ways you can use PHP to build JS on the fly at on pageload.

Good luck!

>>> Vijay Avarachen <stalioneavarachen.net> 06/02/03 03:44PM >>>
Ok I am attempting to do something very simple and I know it can be
done, but I have been told otherwise. I have two select menu's,
Products and Components. There is a one to many relationship between
them (one product can have many components). I just want it so that
when the user selects an entry in Products, Components get dynamically
loaded (I know I gotta do somethign with onchange="" but not sure what).
Value of Products and Components are being pulled form a database.

Someone told me the only way to do this is to load all the values of
components into an array and pass it around. Thats just dont' sound
right to me.

I was thinking perhaps I can just do somthing like
onchange="PHP_SELF?product=<value>". No I know thats not the syntax but
you get the idea =)

Any help would be appreciated. Please keep in mind i have very very
little knowledge of javascript.

Sincerely,
Vijay Avarachen

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

attached mail follows:


Hi,

I have a server (currently 7.1) with apache + php
compiled with oracle (mcrypt, imap, gettext) support.

In order to do so I've installed the 8i linux
versions, make a tar.gz of the libs directory and
installed in my server.

I runs fine accessing a remote (not mantained by me)
oracle database.

I am planning to switch to a newer distribution and
was considering the RH9 but with the "old" apache.

Since I do not actually use Oracle (just enable php
scripts to do so) I am kind of lost if the combo (old
8i libs with redhat 9) are stable enough or should I
try a newer version, such as oracle 9.

And in that case if PHP level of support is the same
(oracle 8 or 9).

Since the answer can be slighty OT fell free to send
me directly.

Thanks.

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

attached mail follows:


hi, i am looking for an affiliate program (good freeware or good cheap
commercail software).

i went to http://www.hotscripts.com to look in its php scripts - affiliate
category.

not too many to select from.

anyone has experience in any of them or other php based affiliate program?
please share your experience with me? any information you think that will
help.

how about the "php affiliate"? it seems that it was an old one. but the
"php affiliate" only has a new forum with only 30 posts and i think "php
affiliate" team is busy in making the new commercial version. i cannot find
good help in the php affilate free version.

any help? better if I can find a good affiliate program supporting 4
languages English, French, German, and Dutch, that will be great.

Thanks!

attached mail follows:


name space guys, you posted not related questions as the response to my
original question. could any one post to answer my original question?

thanks

attached mail follows:


Hi,

I was wondering if there is a way in PHP to define namespaces (as in
C++ or some similar scope classification technique). I didn't find any
related documentation. Is it possible?

Steven J. Walker
Walker Effects
www.walkereffects.com
stevewalkereffects.com

attached mail follows:


Nope.
They've been looking to add it in the next version of the Zend Engine,
but to be honest, it isn't working out well for a language like PHP. As
of last week, the decision was actually to remove the somewhat dubious
namespace support that had already been added.

Cheers,
Wes

On Monday, June 2, 2003, at 05:22 PM, Steven Walker wrote:

> Hi,
>
> I was wondering if there is a way in PHP to define namespaces (as in
> C++ or some similar scope classification technique). I didn't find any
> related documentation. Is it possible?
>
> Steven J. Walker
> Walker Effects
> www.walkereffects.com
> stevewalkereffects.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


Hi all,

I am trying to build up a table using values from a db as follows...

 mysql_select_db($db, $sql_connection);
 $result = mysql_query("SELECT * FROM $table WHERE $query LIMIT
$limit",$sql_connection);
 $output = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"
width=\"370\">\n";
 foreach(mysql_fetch_array($result) as $key => $article){
  //stuff
 }

now if I use a while loop ie:

while ($array = mysql_fetch_array($result)){
 //stuff
}

all the matched rows are processed, however with the foreach model, $article
isnt an array, it is the first row all merged together.

Any ideas?

;o)

attached mail follows:


This is correct:

while($myrow = mysql_fetch_array($result))
    {
    // ...
    }

The iteration of the while loop represents one returned row from the mysql
result, with $myrow being an array of values returned.

Rather than a SELECT * query, let's look at a something where we know the
column names:

<?
$sql = "
    SELECT first, surname, age
    FROM employee
    WHERE age >= 18
    LIMIT 50
    ";
$result = mysql_query($sql);
while($myrow = mysql_fetch_array($result))
    {
    echo "Name: {$myrow['first']} {$myrow['surname']}. Age:
{$myrow['age']}<br />";
    }
?>

Now, given the above code, what else do you need to do?

Justin

on 03/06/03 8:25 AM, Bix (phpbix.cc) wrote:

> Hi all,
>
> I am trying to build up a table using values from a db as follows...
>
<