php-general Digest 20 Feb 2001 12:09:11 -0000 Issue 523

Topics (messages 40667 through 40731):

Re: File upload problem on IIS/NT4
        40667 by: John Vanderbeck
        40707 by: Phil Driscoll

Re: mail()
        40668 by: Christopher Allen
        40674 by: David Robley
        40677 by: Peter Houchin

better (cleaner and smaller) code
        40669 by: Christian Dechery

running a big sql script
        40670 by: Christian Dechery
        40687 by: Maxim Maletsky

PHP has encountered an Access Violation at 10014D15
        40671 by: Josh G

Re: File Locking in PHP.
        40672 by: David Robley

Re: Getting values for posted form in HASH array rather than just variables.
        40673 by: David Robley

mysql problem
        40675 by: Josh G
        40678 by: David Robley
        40679 by: Josh G
        40681 by: Josh G
        40690 by: ..s.c.o.t.t..
        40697 by: Thomas Deliduka

Re: Directing Email to a script
        40676 by: Cybercandy Ltd

fread strangeness  (was: nested echo and includes, mixed html / PHP)
        40680 by: Jaxon
        40682 by: David Robley
        40685 by: Jaxon

summing unkown values
        40683 by: Claudia
        40725 by: Robin Vickery

Here Doc syntax
        40684 by: Soma Interesting

Is it possible to use CyberCash w/o MCK?
        40686 by: Ben Schumacher

GD with Jpeg Support Problems
        40688 by: Michael Bryan

Help with prev, next
        40689 by: Keith Devens
        40691 by: David Robley
        40702 by: CC Zona

Re: Two questions
        40692 by: Brian T. Allen

connectivity test
        40693 by: Nicholas W. Miller

id
        40694 by: Brandon Feldhahn
        40696 by: Thomas Deliduka

members page
        40695 by: Brandon Feldhahn
        40699 by: Thomas Deliduka

header
        40698 by: Fabian Fabela
        40700 by: Thomas Deliduka
        40701 by: David Robley

XML Parsing - what's wrong?
        40703 by: Sascha Andres

Re: XML Parsing - what's wrong? - found it
        40704 by: Sascha Andres

Re: ftp_login problem
        40705 by: php3.developersdesk.com

using include_path with file_exists()
        40706 by: Ben Peter

Re: sessions and data missing browser message
        40708 by: Evelio Martinez

Re: Will this work?
        40709 by: Tim Ward

Re: Libraries
        40710 by: Tim Ward
        40712 by: Christian Reiniger

WEALTH ON THE WEB!
        40711 by: Noel Hadfield
        40716 by: Graham Reeves

listing files and directories...
        40713 by: Miguel Loureiro

sending variables
        40714 by: Rosen
        40715 by: Ifrim Sorin
        40717 by: Simon Garner
        40719 by: Ben Peter

Newbie passwordcheck-program problem
        40718 by: Ronald Hemmink
        40722 by: Simon Garner

CLOSE_WAIT - Closing connections to Postgresql database
        40720 by: Ovidiu EFTIMIE

Re: Database Code Portability
        40721 by: Phil Lambert

PHP Variables across files
        40723 by: Jay Klehr
        40724 by: Ben Peter

Fwd
        40726 by: Taylor Silvers

Sablotron Errors
        40727 by: John McKerrell

Strange behaviour: Cannot exit as expected AND Script starts from the beginning, 
executed TWICE. Anyone?
        40728 by: Yasuo Ohgaki

Job [Toronto]
        40729 by: Calexis

Re: Netscape6 with HTML Form using POST method
        40730 by: Yasuo Ohgaki

HTTP Content-length...
        40731 by: Montgomery-Recht, Evan

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


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


ITry searching the drive(s) for the file.  I dont know what the deal is, but
I found on my system that the session path specified in the php.ini file
isn't being used, it is using /tmp instead.  Might be doing the same thing
for the upload path.

- John Vanderbeck
- Admin, GameDesign

----- Original Message -----
From: Josh G <[EMAIL PROTECTED]>
To: PHP User Group <[EMAIL PROTECTED]>
Sent: Monday, February 19, 2001 6:58 PM
Subject: [PHP] File upload problem on IIS/NT4


> Hi guys, I'm having a problem with file uploads, and I can't seem to
> fix it. I'm on IIS using php as an ISAPI module on NT4, and file uploads
> seem to work, but $userfile does not exist. Any ideas on how I can
> fix it?
>
> userfile:\\php8
> userfile_name:notes.txt
>
> Cheers,
>
> Gfunk         -          http://www.gfunk007.com/
>
> I sense much beer in you. Beer leads to intoxication, intoxication to
> hangovers, and hangovers to... suffering.
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





Make sure that upload_tmp_dir in your php.ini file is set to something
sensible for a windows machine.
I have it set to f:\php\temp (and you also need to make sure that the
directory specified actually exists).

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org








> I have a mail script that works fine except that it does not send to the
CC
> in my header options... nor will it send to multiple addresses can some
one
> please give me some advice on this... I've looked in the php manual as
well
> as other web pages  but neither have an answer for me.
>
> $headers .= "cc:[EMAIL PROTECTED],[EMAIL PROTECTED]\n"; // CC
to
> $mailsend = mail("$address", "$subject", "$body.", "$headers
\nContent-Type:
> text/plain; charset=iso-8859-1\nContent-Transfer-Encoding: 8bit" );
> print ("$mailsend");

Is there supposed to be a "dot" after body?
Whats the result in $mailsend? have you tried with just the cc's and no
X-header info?
Have you tried just these two:

$headers = "mailto:cc:[EMAIL PROTECTED], [EMAIL PROTECTED] \n;
$mailsend = mail("$address", "$subject", "$body", "$headers " );






On Tue, 20 Feb 2001 08:52, Peter Houchin wrote:

> > I have a mail script that works fine except that it does not send to
> the CC in my header options... nor will it send to multiple addresses
> can some one please give me some advice on this... I've looked in the
> php manual as well as other web pages  but neither have an answer for
> me.
>
> my code is below
>
> Thanks in advance
> Peter Houchin
>
<SNIP CODE>
>
> $headers .= "cc:[EMAIL PROTECTED],[EMAIL PROTECTED]\n"; //
> CC to

You might try using Cc: name@domain
Note capital C and space after the colon.

>
> //send the email
>
> $mailsend = mail("$address", "$subject", "$body.", "$headers
> \nContent-Type: text/plain;

Someone else pointed out the full stop :-)
> charset=iso-8859-1\nContent-Transfer-Encoding: 8bit" ); print
> ("$mailsend");

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




When i use Cc: name@domain it doesnt send any emails if i use CC it gives me
the same result as cc, any other suggestions?

-----Original Message-----
From: David Robley [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 20, 2001 11:28 AM
To: Peter Houchin; PHP MAIL GROUP
Subject: Re: [PHP] mail()


On Tue, 20 Feb 2001 08:52, Peter Houchin wrote:

> > I have a mail script that works fine except that it does not send to
> the CC in my header options... nor will it send to multiple addresses
> can some one please give me some advice on this... I've looked in the
> php manual as well as other web pages  but neither have an answer for
> me.
>
> my code is below
>
> Thanks in advance
> Peter Houchin
>
<SNIP CODE>
>
> $headers .= "cc:[EMAIL PROTECTED],[EMAIL PROTECTED]\n"; //
> CC to

You might try using Cc: name@domain
Note capital C and space after the colon.

>
> //send the email
>
> $mailsend = mail("$address", "$subject", "$body.", "$headers
> \nContent-Type: text/plain;

Someone else pointed out the full stop :-)
> charset=iso-8859-1\nContent-Transfer-Encoding: 8bit" ); print
> ("$mailsend");

--
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA

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






To handle sql syntax errors (including, the query, the Line number of the 
code and possibly the file name) I came up with this...

define(LN,__LINE__);

$query="bogus query to cause error";
$rslt=mysql_query($query) or query_error(LN,$query);  (*)
this one works fine but I have to pass __LINE__ (LN) as an argument... and 
I don't like that...
(*)

function query_error($line,$query="unspecified)
{
         $errstr="<font face=verdana size=2 color=ff0000><b>SQL Error</b>: 
'$query' failed at line $line<br>\n";
         $errstr.=mysql_errno()." : ".mysql_error()."</font>";
         die($errstr);
}

or

$rslt=mysql_query($query) or user_error(mysql_error()." at 
'$query'",E_USER_ERROR);
works fine too, gives me the filename, the line and handles the error more 
PHP-likely... but still it's a huge function call to EVERY single query...

I want to write at least code as possible and get the error, the query, the 
line number and (possibly) the filename..

isn't there anyway I could build a mask for a function or something like 
that to pass __LINE__ as an argument always.. I don't know... any ideas?

____________________________
. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer




I have a complex query, that because of mysql's lack of resources became 
twice as big and complex.

I had to create a temporary table and put stuff in it and then select data 
from it, cuz 'union' is not available...


but I can't execute the whole script once, can I?

like

$sql="create temporary table tmp; insert into tmp select bla bla bla; ";
$sql.="insert into tmp select bla bla; select * from tmp;";

I cant mysql_query($sql)... it gives me an error msg? Do I really have to 
run each step of the script as a separated query????
____________________________
. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer





Yes you do.
It comes easier for eyes if you use a database abstraction layer, but still
it's a different query.

Cheers,
Maxim Maletsky




-----Original Message-----
From: Christian Dechery [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 20, 2001 10:20 AM
To: [EMAIL PROTECTED]
Subject: [PHP] running a big sql script


I have a complex query, that because of mysql's lack of resources became 
twice as big and complex.

I had to create a temporary table and put stuff in it and then select data 
from it, cuz 'union' is not available...


but I can't execute the whole script once, can I?

like

$sql="create temporary table tmp; insert into tmp select bla bla bla; ";
$sql.="insert into tmp select bla bla; select * from tmp;";

I cant mysql_query($sql)... it gives me an error msg? Do I really have to 
run each step of the script as a separated query????
____________________________
. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer


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




PHP has encountered an Access Violation at 10014D15

What the crap does that mean?

Gfunk         -          http://www.gfunk007.com/

I sense much beer in you. Beer leads to intoxication, intoxication to
hangovers, and hangovers to... suffering.
  






On Tue, 20 Feb 2001 08:50, Matthew Toledo wrote:
> Hello, I am just starting to use PHP.  I have been using PERL for quite
> some time.  I was wondering if there is any specific FILE LOCKING I
> need to implement to keep more than one person from altering a text
> file at the same time.
>
> For instance, in PERL, you use the flock command to set up an advisory
> file lock.  Lets say that if I have a web page with a text based
> database, and more than one person wants to write to the file at the
> same time.  In perl, if you use flock(FILE, 2).  This causes person A
> to wait while person B writes to the file.  flock(FILE, 8) unlocks the
> file.  Then person A is allowed to write to the file.
>
> Does the perl equivalent of flock happen automatically in PHP?
>
> If not, how do you lock a file?
>
> Is it an advisory lock, or will it cause an error if two people try to
> access the same file at the same time for the same purpose (writing).
>
> Thanks,

The flock() function in PHP seems to do pretty much what you are looking 
for - it allows setting a shared or exclusive lock and you can control 
blocking while locking (at least according to the manual!)

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




On Tue, 20 Feb 2001 08:56, Matthew Toledo wrote:
> SUBJECT: Getting values for posted form in HASH array rather than just
> variables.
>
> I've been using perl for a while and am just starting with PHP.  I like
> it.
>
> Is there an array that holds all the information that was submitted via
> a FORM post or get.
>
> I know that PHP automatically creates variables that are named after
> the name of the INPUT tag on the HTML form.  But what if I don't know
> what the names of the input tags are?
>
> Are they stored in a HASH array as well?
>
> What is the name of the array?
>
> I.E. in perl, if you use cgi-lib.pl, all the form elements are stored
> in a HASH array called %in.  You don't need to know the names of the
> input tags to get the data from them.
>
> HTML HAS...
> <input name="joe" type="text>
> <input name="alice type="text>
>
> PERL Example.
> # library for handling CGI in
> require 'cgi-lib.pl';
>
> # get all the info from the form,
> # put it in HASH array called %in
> &ReadParse();
>
> foreach $key (sort keys %in) {
>     print $in{$key};
> }
>
> PHP EXAMPLE...
> # is there a hash array equivalent of %in like in the perl above?

Check out the section of the manual on PHP Variables (in the Variables 
chapter 7)

HTTP_POST_VARS and HTTP_GET_VARS will be the ones you are looking for - 
oh and possibly HTTP_COOKIE_VARS.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




Hi, sorry to post this here, but it's driving me crazy. On my local
machine, the following works no furys:

create table category (category_id integer primary key auto_increment,name
varchar(255) );

But on the production machine, I get:

ERROR 1064: parse error near 'auto_increment,name varchar(255) )' at line 1

Any idea why???? It's driving me nuts......

Gfunk         -          http://www.gfunk007.com/

I sense much beer in you. Beer leads to intoxication, intoxication to
hangovers, and hangovers to... suffering.







On Tue, 20 Feb 2001 10:57, Josh G wrote:
> Hi, sorry to post this here, but it's driving me crazy. On my local
> machine, the following works no furys:
>
> create table category (category_id integer primary key
> auto_increment,name varchar(255) );
>
> But on the production machine, I get:
>
> ERROR 1064: parse error near 'auto_increment,name varchar(255) )' at
> line 1
>
> Any idea why???? It's driving me nuts......
>
> Gfunk         -          http://www.gfunk007.com/
>

Is the version of Mysql on the production box an older one? autoincrement 
is comparatively new, I think.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




Nope, I've been using autoincrement on that box for a year or so.

It's not a copy/paste thing, cause I'm getting it when I type the lines
in by hand, too...

Gfunk         -          http://www.gfunk007.com/

I sense much beer in you. Beer leads to intoxication, intoxication to
hangovers, and hangovers to... suffering.


----- Original Message -----
From: "David Robley" <[EMAIL PROTECTED]>
To: "Josh G" <[EMAIL PROTECTED]>; "PHP User Group"
<[EMAIL PROTECTED]>
Sent: Tuesday, February 20, 2001 11:41 AM
Subject: Re: [PHP] mysql problem


> On Tue, 20 Feb 2001 10:57, Josh G wrote:
> > Hi, sorry to post this here, but it's driving me crazy. On my local
> > machine, the following works no furys:
> >
> > create table category (category_id integer primary key
> > auto_increment,name varchar(255) );
> >
> > But on the production machine, I get:
> >
> > ERROR 1064: parse error near 'auto_increment,name varchar(255) )' at
> > line 1
> >
> > Any idea why???? It's driving me nuts......
> >
> > Gfunk         -          http://www.gfunk007.com/
> >
>
> Is the version of Mysql on the production box an older one? autoincrement
> is comparatively new, I think.
>
> --
> David Robley                        | WEBMASTER & Mail List Admin
> RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
> AusEinet                            | http://auseinet.flinders.edu.au/
>             Flinders University, ADELAIDE, SOUTH AUSTRALIA
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





Ok, I've fixed the problem, it seems there's some major differences
between the linux / win32 ports of the client.

instead of

blah integer primary key auto_increment

which works on windows, I used

blah integer not null auto_increment primary key

and now it works... I love computers, I really do.

Gfunk         -          http://www.gfunk007.com/

I sense much beer in you. Beer leads to intoxication, intoxication to
hangovers, and hangovers to... suffering.


----- Original Message -----
From: "Josh G" <[EMAIL PROTECTED]>
To: "PHP User Group" <[EMAIL PROTECTED]>
Sent: Tuesday, February 20, 2001 11:42 AM
Subject: Re: [PHP] mysql problem


> Nope, I've been using autoincrement on that box for a year or so.
>
> It's not a copy/paste thing, cause I'm getting it when I type the lines
> in by hand, too...
>
> Gfunk         -          http://www.gfunk007.com/
>
> I sense much beer in you. Beer leads to intoxication, intoxication to
> hangovers, and hangovers to... suffering.
>
>
> ----- Original Message -----
> From: "David Robley" <[EMAIL PROTECTED]>
> To: "Josh G" <[EMAIL PROTECTED]>; "PHP User Group"
> <[EMAIL PROTECTED]>
> Sent: Tuesday, February 20, 2001 11:41 AM
> Subject: Re: [PHP] mysql problem
>
>
> > On Tue, 20 Feb 2001 10:57, Josh G wrote:
> > > Hi, sorry to post this here, but it's driving me crazy. On my local
> > > machine, the following works no furys:
> > >
> > > create table category (category_id integer primary key
> > > auto_increment,name varchar(255) );
> > >
> > > But on the production machine, I get:
> > >
> > > ERROR 1064: parse error near 'auto_increment,name varchar(255) )' at
> > > line 1
> > >
> > > Any idea why???? It's driving me nuts......
> > >
> > > Gfunk         -          http://www.gfunk007.com/
> > >
> >
> > Is the version of Mysql on the production box an older one?
autoincrement
> > is comparatively new, I think.
> >
> > --
> > David Robley                        | WEBMASTER & Mail List Admin
> > RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
> > AusEinet                            | http://auseinet.flinders.edu.au/
> >             Flinders University, ADELAIDE, SOUTH AUSTRALIA
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





ahhh... yes...   :)

the linux version is much stricter when it comes
to table definitions... 

i had the same problem trying to declare an INDEX
for my table too.... for linux, any key that
you use as an INDEX on a table must be declared
NOT NULL (whereas the win32 port doesnt seem
to care very much)...

for future reference, i reccomend trying out your
SQL code in the MySQL monitor (the command line
utility that comes with the server)... generally
the error messages are *MUCH* more helpful
than the ones i get via PHP


> -----Original Message-----
> From: Josh G [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 19, 2001 17:00
> To: PHP User Group
> Subject: Re: [PHP] mysql problem
> 
> 
> Ok, I've fixed the problem, it seems there's some major differences
> between the linux / win32 ports of the client.
> 
> instead of
> 
> blah integer primary key auto_increment
> 
> which works on windows, I used
> 
> blah integer not null auto_increment primary key
> 
> and now it works... I love computers, I really do.
> 
> Gfunk         -          http://www.gfunk007.com/
> 
> I sense much beer in you. Beer leads to intoxication, intoxication to
> hangovers, and hangovers to... suffering.
> 
> 
> ----- Original Message -----
> From: "Josh G" <[EMAIL PROTECTED]>
> To: "PHP User Group" <[EMAIL PROTECTED]>
> Sent: Tuesday, February 20, 2001 11:42 AM
> Subject: Re: [PHP] mysql problem
> 
> 
> > Nope, I've been using autoincrement on that box for a year or so.
> >
> > It's not a copy/paste thing, cause I'm getting it when I type the lines
> > in by hand, too...
> >
> > Gfunk         -          http://www.gfunk007.com/
> >
> > I sense much beer in you. Beer leads to intoxication, intoxication to
> > hangovers, and hangovers to... suffering.
> >
> >
> > ----- Original Message -----
> > From: "David Robley" <[EMAIL PROTECTED]>
> > To: "Josh G" <[EMAIL PROTECTED]>; "PHP User Group"
> > <[EMAIL PROTECTED]>
> > Sent: Tuesday, February 20, 2001 11:41 AM
> > Subject: Re: [PHP] mysql problem
> >
> >
> > > On Tue, 20 Feb 2001 10:57, Josh G wrote:
> > > > Hi, sorry to post this here, but it's driving me crazy. On my local
> > > > machine, the following works no furys:
> > > >
> > > > create table category (category_id integer primary key
> > > > auto_increment,name varchar(255) );
> > > >
> > > > But on the production machine, I get:
> > > >
> > > > ERROR 1064: parse error near 'auto_increment,name varchar(255) )' at
> > > > line 1
> > > >
> > > > Any idea why???? It's driving me nuts......
> > > >
> > > > Gfunk         -          http://www.gfunk007.com/
> > > >
> > >
> > > Is the version of Mysql on the production box an older one?
> autoincrement
> > > is comparatively new, I think.
> > >
> > > --
> > > David Robley                        | WEBMASTER & Mail List Admin
> > > RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
> > > AusEinet                            | http://auseinet.flinders.edu.au/
> > >             Flinders University, ADELAIDE, SOUTH AUSTRALIA
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 




I think if you echo the error (echo mysql_error();) you will see the exact
error you would get if connected directly to the db.

You can do something like:

$result = @mysql_query($sql_query); // hide any errors
If (!$result) {
    echo "Error: " . Mysql_error() . "<BR>";
}

On 2/20/01 2:57 AM this was written:

> ahhh... yes...   :)
> 
> the linux version is much stricter when it comes
> to table definitions...
> 
> i had the same problem trying to declare an INDEX
> for my table too.... for linux, any key that
> you use as an INDEX on a table must be declared
> NOT NULL (whereas the win32 port doesnt seem
> to care very much)...
> 
> for future reference, i reccomend trying out your
> SQL code in the MySQL monitor (the command line
> utility that comes with the server)... generally
> the error messages are *MUCH* more helpful
> than the ones i get via PHP

-- 

Thomas Deliduka
IT Manager
     -------------------------
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/






I've done this using qmail which is installed on my ISP's server.

I had to set up a qmail file named like this and dropped into my root:

.qmail-allan

Where allan is the email address that the emails are coming into (i.e
[EMAIL PROTECTED])

This file must contain a pipe to the script in this form:

|/home/yourdirectory/script.php


And that's it the email is now sent to the script.



To pick up the email being sent to the script you use something like the
following:

$fp = @fopen("php://stdin", "r");         //This removes the message from
the stream

        while (!feof($fp)) {
                $incoming .= fgets($fp, 4096);
        } // end while

fclose($fp);           // closes stream


At the end of this $incoming will contain the email

How you parse the email is another can of worms.

regards

Allan
Cybercandy Ltd



----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 19 February 2001 11:26 AM
Subject: [PHP] Directing Email to a script


> Hi,
>
> I`m sure its possible but I can`t find any info on it, anyone know of any
> source or tutorials etc about directing email to a PHP script.
>
> TIA
> Ade
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





Same problem, found it's coming from somewhere else :(
It looks as if fread or fopen is preventing PHP from from parsing ...

index.php:

<?
$file="test.inc";
$fd = fopen ($file, "r");
$string = fread ($fd, filesize ($file));
fclose ($fd);
echo "$string";  
?>

test.inc:

<html>
<body>
<? echo "this comes from inside of test.inc"; ?>
</body>
</html>

index.html show a blank html page, with the contents of test.inc visible via
view source...grr.  how can I get it to actually parse the PHP?

help!
jaxon



On 2/19/01 6:16 PM, "Jaxon" <[EMAIL PROTECTED]> wrote:

> Hi PHPers!
> 
> I'm doing a simple page build by:
> - reading file.html into $string
> - reading variables into $array
> 
> and then:
> echo (strtr($string, $array);
> 
> The file.html held in $string contains some PHP <?php include("file.inc") ?>
> and file.inc also has some PHP <?php echo("this is inside file.inc)"; ?>
> 
> I'm doing this to assemble the page via little 'modules'.
> 
> This is not working, e.g. the PHP in $string is not getting parsed by PHP
> before being output to the browser, although I DO see the PHP in the
> resultant page source...any ideas?
> 
> Any comments welcome!
> 
> regards,
> jaxon
> 





On Tue, 20 Feb 2001 11:37, Jaxon wrote:
> Same problem, found it's coming from somewhere else :(
> It looks as if fread or fopen is preventing PHP from from parsing ...
>
> index.php:
>
> <?
> $file="test.inc";
> $fd = fopen ($file, "r");
> $string = fread ($fd, filesize ($file));
> fclose ($fd);
> echo "$string";
> ?>
>
> test.inc:
>
> <html>
> <body>
> <? echo "this comes from inside of test.inc"; ?>
> </body>
> </html>
>
> index.html show a blank html page, with the contents of test.inc
> visible via view source...grr.  how can I get it to actually parse the
> PHP?
>
> help!
> jaxon
>

eval() is possibly what you need.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




David - very cool, thanks much for your help!

if any other newbies run into the same problem:

echo "stuff";   //prints "stuff"
echo $string;   //prints contents of string, does NOT parse.

include(filename);  //whenever encountered, prints contents of file
                    //parses only if PHP tags present.

require(filename);  //builds contents into page as if part of script
                    //even if require() inside conditional 'false'
                    //if doesn't parse right, script breaks.

eval($string); //prints contents of $string AFTER parsing PHP tags.

nesting them in multiple ways allows very dynamic code reuse and modular
page building, which is your friend.

cheers!
jaxon






On 2/19/01 8:03 PM, "David Robley" <[EMAIL PROTECTED]>
wrote:

> On Tue, 20 Feb 2001 11:37, Jaxon wrote:
>> Same problem, found it's coming from somewhere else :(
>> It looks as if fread or fopen is preventing PHP from from parsing ...
>> 
>> index.php:
>> 
>> <?
>> $file="test.inc";
>> $fd = fopen ($file, "r");
>> $string = fread ($fd, filesize ($file));
>> fclose ($fd);
>> echo "$string";
>> ?>
>> 
>> test.inc:
>> 
>> <html>
>> <body>
>> <? echo "this comes from inside of test.inc"; ?>
>> </body>
>> </html>
>> 
>> index.html show a blank html page, with the contents of test.inc
>> visible via view source...grr.  how can I get it to actually parse the
>> PHP?
>> 
>> help!
>> jaxon
>> 
> 
> eval() is possibly what you need.





I would like to sum totals for unknown values.

Here is the design

Course names are entered in separate table -- courses
If the course is still being tested the course status = open
This status is stored in the Course table. Each course name is unique
in this table.

Test information including test time is entered in a different table -- issues
The issues table includes the test time and course name values.
Several entries with the same course name will be made to this table

 I would like to sum the total time tested based on Open courses.


First I would like to know how to select the correct courses from the issues database 
based on the course_status in the courses databases.  

Would the following statement work??

$query = "select issues.course_name, issues.time_tested from issues
  where courses.course_status = 'open'";
$result = mysql_query( $query );

Then I need to sum the time_tested fields for all courses with the same name in the 
issues database that were just selected as being Open.

I have been looking for some code that would do something similar to this. 
If anyone can point me to code or has some thoughts I would appreciate.









>>>>> "C" == "Claudia"  <[EMAIL PROTECTED]> writes:

 > I would like to sum totals for unknown values.

 > Here is the design

 > Course names are entered in separate table -- courses If the course
 > is still being tested the course status = open This status is
 > stored in the Course table. Each course name is unique in this
 > table.

 > Test information including test time is entered in a different
 > table -- issues The issues table includes the test time and course
 > name values.  Several entries with the same course name will be
 > made to this table

 >  I would like to sum the total time tested based on Open courses.


 > First I would like to know how to select the correct courses from
 > the issues database based on the course_status in the courses
 > databases.

 > Would the following statement work??

 > $query = "select issues.course_name, issues.time_tested from issues
 > where courses.course_status = 'open'"; 

Almost, but you need the courses table in the 'from' part of the query
and you need some kind of relation between the two tables.

$query = "SELECT issues.course_name, issues.time_tested " .
         "FROM issues, courses " .
         "WHERE courses.course_status = 'open' AND "
               "courses.course_name   = issues.course_name";

As an aside, it's usually not a good idea to use something like a name
to relate two tables. It would have been better to give each course an
ID number and made that the primary key for the courses table. And then
stored the ID for the relevant course in the issues table instead of the
name. Your query would only change slightly, to something like this:

$query = "SELECT courses.course_name, issues.time_tested " .
         "FROM issues, courses " .
         "WHERE courses.course_status = 'open' AND "
               "courses.course_id   = issues.course_id";

But it would let you correct typos in the course names without worrying
about the issues table. It would also let you have more than one course
of the same name (one current 'open' course and several old ones perhaps)

 > Then I need to sum the time_tested fields for all courses with the
 > same name in the issues database that were just selected as being
 > Open.

By the sounds of it, you could let the database do all the work, by
changing your query to something like this:

$query = "SELECT issues.course_name, SUM(issues.time_tested) AS total_time " .
         "FROM issues, courses " .
         "WHERE courses.course_status = 'open' AND " .
               "courses.course_name   = issues.course_name " .
         "GROUP BY issues.course_name";

The result would be a single entry for each course with the total time.

        hope this helps
           -robin

-- 
Robin Vickery.................................................
BlueCarrots, 14th Floor, 20 Eastbourne Terrace, London, W2 6LE





I'm having a real love/hate relationship with PHP's here-doc support.

I love that it spares me from breaking in and out of PHP mode or using echo 
and back slashes for outputting largish bodies of dynamic HTML....

but I hate a) that the EOT; has to be the first thing on the line and b) I 
find that here-doc seems to make scripts unparsable on many occasions and I 
can never find the bug. I'd say 1/5 times I wind up breaking the script 
just sticking an:

        echo <<<EOT
        <table width="450" border="0" cellspacing="0" cellpadding="2" 
bordercolor="#000000">
        <tr>
        <td bgcolor=orange>
        <font color=red>{$error}</font><P>
        </td>
        </tr>
        </table>
EOT;

into a page some place. Any suggestions from anyone?

Appreciated.





Hello-

Does anybody have any example code for using CyberCash w/o the Merchant 
Connection Kit?  I'm trying to setup secure credit card transactions on my 
site using CyberCash, but my provider doesn't have & won't install the MCK 
(no PHP support for it either).  I haven't tried installing the MCK myself, 
but from my previous experience with it, I would rather just find a way 
around using it.

So I guess all I really need to know is if somebody has another way of 
using CyberCash with PHP without using their software.

Thanks,
Ben Schumacher





Hey Guys..

I've been working on installing GD with support for Jpeg.  I cannot seem to
get it working in PHP, however.  When I try to use it in practice, I get the
following error:

Warning: ImageCreateFromJpeg: No JPEG support in this PHP build

Here's the configure command I used:

./configure --with-apache=/usr/local/src/SOURCES/apache_1.3.12 --with-mysql=
/usr/local --with-jpeg-dir=/usr --with-gd=/usr/local --enable-track-vars

I've tried all different types of directories in the --with-jpeg, and I
can't get anything to work.  I thought that perhaps GD wasn't compiled with
Jpeg Support, so I went ahead and installed the RPMs from Redhat, which I
know are compiled with that support..because they require the libjpg package
to install.

What am I doing wrong?  I've compiled until I'm blue in the face.

The GD Section of phpinfo() shows the following information:
--------------------
GD Support enabled
GD Version 1.6.2 or higher
PNG Support enabled
WBMP Support enabled
---------------------
But, why is Jpeg Support not enabled?

Thanks,

Michael Bryan
Virginia Beach, VA






Hi, I'm getting some weird behavior from prev() and next(). If anyone knows
what's going on please let me know. Also, please make sure you e-mail me
personally in addition to the list.

Anyway, here's the problem. Check out the following code:

<?php
$arr = Array(1, 2, 3, 4);

echo current($arr) . "<br>"; #prints out 1
echo next($arr) . "<br>"; #prints out 2
echo next($arr) . "<br>"; #prints out 3
echo next($arr) . "<br>"; #prints out 4
echo prev($arr) . "<br>"; #prints out 3
echo prev($arr) . "<br>"; #prints out 2
echo prev($arr) . "<br>"; #prints out 1
?>

It does the expected and prints out 1234321 (without the <br>s). However, if
I add one more call to next() in there, it only prints out 1234. It seems
like the call to next that goes past the end of the array sort of "breaks"
it so you can't go back again. If I do a call to end() it prints out 4, so
the array still 'works', but I can't get back using prev(). Anyone know why?
Thanks!

Keith





On Tue, 20 Feb 2001 15:10, Keith Devens wrote:
> Hi, I'm getting some weird behavior from prev() and next(). If anyone
> knows what's going on please let me know. Also, please make sure you
> e-mail me personally in addition to the list.
>
> Anyway, here's the problem. Check out the following code:
>
> <?php
> $arr = Array(1, 2, 3, 4);
>
> echo current($arr) . "<br>"; #prints out 1
> echo next($arr) . "<br>"; #prints out 2
> echo next($arr) . "<br>"; #prints out 3
> echo next($arr) . "<br>"; #prints out 4
> echo prev($arr) . "<br>"; #prints out 3
> echo prev($arr) . "<br>"; #prints out 2
> echo prev($arr) . "<br>"; #prints out 1
> ?>
>
> It does the expected and prints out 1234321 (without the <br>s).
> However, if I add one more call to next() in there, it only prints out
> 1234. It seems like the call to next that goes past the end of the
> array sort of "breaks" it so you can't go back again. If I do a call to
> end() it prints out 4, so the array still 'works', but I can't get back
> using prev(). Anyone know why? Thanks!
>
> Keith

Ha - finally a use for all that stuff I learned about pointers in 
Advanced Programming :-) (And it's in the docs if you look)

According to the docs, "If advancing the internal array pointer results 
in going beyond the end of the element list, next() returns false" so 
when you try an print out the result, you get nothing. And once the 
pointer goes beyond the end (or beginning, with prev) its position is 
undefined and you need to use an absolute positioning instruction like 
end or reset to relocate the pointer in a known position.

Analogy - it's a bit like walking up and down stairs - if you are 
currently on a step then 'go up one step' or 'go down one step' makes 
sense; but if you step off the stairs then you could be anywhere in 
relation to the stairs, even out side the building.

Hmm, that's not a real good analogy - someone else?


-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




In article <01022015290505.09282@hermes>, 
[EMAIL PROTECTED] (David Robley) wrote:

> According to the docs, "If advancing the internal array pointer results 
> in going beyond the end of the element list, next() returns false" so 
> when you try an print out the result, you get nothing. And once the 
> pointer goes beyond the end (or beginning, with prev) its position is 
> undefined and you need to use an absolute positioning instruction like 
> end or reset to relocate the pointer in a known position.
> 
> Analogy - it's a bit like walking up and down stairs - if you are 
> currently on a step then 'go up one step' or 'go down one step' makes 
> sense; but if you step off the stairs then you could be anywhere in 
> relation to the stairs, even out side the building.
> 
> Hmm, that's not a real good analogy - someone else?

Pages in a book...?  Flipping back a page or forward a page makes sense 
when you have a bookmark tucked in there somewhere.  But once the bookmark 
falls out, "next page" and "previous page" lose their meaning because the 
question becomes "Ummm, next/previous relative to *which page, please?"

-- 
CC




SELECT SUBSTRING(COL3,0,100) AS COL3 FROM TABLE

That will return the first 100 characters of your 10 pages of text...

If you want characters 200 through 299 do:
SELECT SUBSTRING(COL3,200,100) AS COL3 FROM TABLE

Untested, but I am 99.9% sure that will meet your needs.

Brian


>
>   hmm...I don`t need the stuff from different rows. I have 10pages of text
> in one in one rows one column, eg
> col1 col2 col3 here is 10pages
>
> S.
>
>
> >     SELECT * FROM x LIMIT 1,10;
> >
> > Where  1 = Start record,
> >       10 = How many records...
> >
> > Nexts queries will be:
> >
> >     SELECT * FROM x LIMIT 11,10;
> > and
> >     SELECT * FROM x LIMIT 21,10;
> > etc...
> >
> >
> >          - Diogo Zulli
> >
> > ----------------------[ www.sphynx.com.br ]---------------------------
> >         "Why Live on The Edge When You Can BASE Jump Off It"
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





Is it possible to test a user's line speed with PHP?

I have a site with a lot of video.  Each clip has the standard 
28/56/128 speed choice.  I would like to offer the user an interface 
where they can test their line speed and get a suggestion on which 
file to view.

Any experience ... ideas?

Nick




when poeple sign up to my site, how can i make a code that finds if
there username is already in the database?





On 2/20/01 1:08 AM this was written:

> when poeple sign up to my site, how can i make a code that finds if
> there username is already in the database?

Um... Search for it.

$findit = mysql_query("Select username from usertable where username =
'$inputted_username'");
If (mysql_num_rows($findit)) {
    echo "Error! username exists";
}

Or whatever code you want to add there.
-- 

Thomas Deliduka
IT Manager
     -------------------------
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/






im making a webdesign website that has a members login, do i have to
make a member page for each member or can i get the
info from the database of the person whom logged in and put it on the
members page





On 2/20/01 1:11 AM this was written:

> im making a webdesign website that has a members login, do i have to
> make a member page for each member or can i get the
> info from the database of the person whom logged in and put it on the
> members page

If you create a table in a database that holds the information that you want
to capture for them with the username as the key to the database (no
duplicates) then when they login and they're authenticated. You can pull all
necessary information you want to track on them from the table and create
your page. So, one, physical page for all users.

If you're authenticating via .htaccess you can use the environment variable
"REMOTE_USER" to use as the username to do the select on the db. Something
like:

$user = getenv("REMOTE_USER");
$sql = "Select * from usertable where username = '$user'";
-- 

Thomas Deliduka
IT Manager
     -------------------------
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/






Do I have to have special configuration to use the header function, this is because it 
is not responding.

I use it like this.

header('Location: contrato.html');

Thank you.

Fabian Fabela
[EMAIL PROTECTED]
www.vacagorda.com




Do you get an error?  Remember that there can be no breaklines before the
start of you php tag (<? Or <?php) at the beginning of the doc. If you have
any text or HTML above a header function, it will not work.

On 2/20/01 1:49 AM this was written:

> Do I have to have special configuration to use the header function, this is
> because it is not responding.
> 
> I use it like this.
> 
> header('Location: contrato.html');

-- 

Thomas Deliduka
IT Manager
     -------------------------
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/






On Tue, 20 Feb 2001 17:19, Fabian Fabela wrote:

> > Do I have to have special configuration to use the header function,
> this is because it is not responding.
>
> I use it like this.
>
> header('Location: contrato.html');
>
> Thank you.
>
> Fabian Fabela
> [EMAIL PROTECTED]
> www.vacagorda.com

You may find you need to use a full URL. For more information on how raw 
http headers work, see

http://www.w3.org/Protocols/rfc2616/rfc2616

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




hi, 
i try to parse an xml document.
but the function characterData which should process
the found data is never called. 
startElement and endElement are called.

it does not fails opening it and it gets te correct number of
stories.u can have a look on the output at
http://www.programmers-world.net/test/slashdot.php.

thanks for any help

bye

sascha






-----Original Message-----
From: Sascha Andres [mailto:[EMAIL PROTECTED]]
Sent: Dienstag, 20. Februar 2001 08:25
To: [EMAIL PROTECTED]
Subject: [PHP] XML Parsing - what's wrong?


hi, 
i try to parse an xml document.
but the function characterData which should process
the found data is never called. 
startElement and endElement are called.

it does not fails opening it and it gets te correct number of
stories.u can have a look on the output at
http://www.programmers-world.net/test/slashdot.php.

thanks for any help

bye

sascha





Addressed to: [EMAIL PROTECTED]
              [EMAIL PROTECTED]

** Reply to note from [EMAIL PROTECTED] Mon, 19 Feb 2001 15:22:49 -0600
>
>    I wanted to check with all of you before I report a bug.
>
> Here is the problem:
> I am attempting to access a OS2 server via ftp.  When I login on the
> command line as anonymous to this server it does not require a password.
> When I try to login via PHP (ftp_login) it requires that I use a password.
> When I try to just put in just any password ftp_login comes back with a
> login failed message.
>
> here is the error:
> Warning: ftp_login: User anonymous logged in. in /home/httpd/html/php/ftpget.php on 
>line 15
>
> You can see the message that the server is returning is saying that my login was ok 
>but ftp_login does not return success.
>
>
> If anyone has insight into this please let me know,



I suggest you put a password on that box, before someone else finds it!
Besides being more secure, it will allow you to use PHP's ftp as it is
usually used.

Also, since we are talking anonymous login to ftp, you might try using
an email address for a password.  That seems to be a common convention.


You are MUCH better off password protecting the OS/2 box:

Double click on: TCP/IP Internet (LAN) - you may have to look for it in
OS/2 System.

In that folder, double click on TCP/IP Configuration (LAN).

I know these say LAN, but things like FTP passwords will affect dial up
networking too.

Click on the Security Tab.

Click on the Add button.

Fill out the form with an explicit username/password combination, and
optionally a specific drive and directory you wish to serve via ftp. The
directory you specify here will be the 'home' directory for the
specified user, and the only area your machine will serve files from.

If you have more than one user who wants access, you can create as many
authorized users as you wish by repeating the instructions starting at
the Add button.


P.S.  It is nice to see I am not the only OS/2 user left...   :)




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




Hi all,

is there a decent way to check whether a file is available on the
include_path? The only soultion I have found is

if ( ( $fd = fopen( 'my_file', 'r', 1 ) ) ) {
    fclose( $fd );
    /* ok, file is there */
}

That one's not really nice, at it opens the file for reading.

It would be best to have the include_path switch for file_exists, just
as it works with fopen.

Can someone better my workaround above?

Cheers,
Ben




"Martin A. Marques" escribió:

> Mensaje citado por: Evelio Martinez <[EMAIL PROTECTED]>:
>
> >
> > Hi!
> >
> > is there any relation between use of sessions (php 4.0.4) and  the
> > following browser message ?
> >
> > Data Missing
> >
> > This document resulted from a POST operation and has expired from the
> > cache. If you wish you can repost the form
> > data to recreate the document by pressing the reload button.
>
> Whta does the error file say (error_log in apache)?

Nothing at all

>
>
> > I am having this message since I include session handling in the code.

>
> Change the expire time?

Do you mean php.ini session.cache_expire ?  Now it contains 180.
The funny thing is that the pages that provoke it do not have anything
related with expire time, just the first login page.

I have done some test with GET instead of POST and now it seems to work ok.

Any explanation?

>
>
> > Is there any way to avoid this?
>
> Martin Marques

Thanks

--
Evelio Martínez






empty test type input are always available even if empty. checkboxes and
radio buttons are not set if empty but text inputs are always there. your
test does not check for the fields not having been filled in.

        Tim Ward
        Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


> -----Original Message-----
> From: W.D. [mailto:[EMAIL PROTECTED]]
> Sent: 19 February 2001 21:26
> To: Jason Cox; [EMAIL PROTECTED]
> Subject: Re: [PHP] Will this work?
> 
> 
> Ok, I removed the (" ") from action and it worked, but it 
> doesnt validate,
> just sends to thanks page regardless of whether the fields 
> are filled or
> not. Am I mistaking IsSet for handling that?
> 
> > Hi,
> >
> > > <form method="POST" action="<?php print("$PHP_SELF"); ?>">
> > > First Name: <input type=TEXT name="FirstName" size=15><p>
> > > Last Name: <input type=TEXT name="LastName" size=25><p>
> > > E-mail Address: <input type=TEXT name="Email" size=25><p>
> > > <input type=SUBMIT> <input type=RESET>
> > > </form>
> >
> > The form should work.
> >
> > > <?php
> > > if(!IsSet($FirstName, $LastName, $Email))
> > >  {
> > >  header("Location: http://www.SITE.com/error.php");
> > >  exit;
> > >  }
> > > else
> > >  {
> > >  header("Location:
> > > http://www.SITE.com/thanks.php");
> > >  exit;
> > >  }
> > > ?>
> >
> > This won't work.  I assume that this code is included on 
> the page with the
> > form above.  First, the header() function must be called 
> before any output
> > is sent to the browser or it will throw an error and stop.  
> The second
> > problem is that the first time a user comes to this page, 
> it will throw
> then
> > to the error page because the vars won't be set.  Try this:
> >
> > <?
> >     if($HTTP_SERVER_VARS["REQUEST_METHOD"] == "POST")
> >     {
> >         (!isset($Email)||!isset($FirstName)||!isset($LastName))?
> >             header("Location: http://www.SITE.com/error.php"):
> >             header("Location: http://www.SITE.com/thanks.php");
> >     }
> > ?>
> >
> > Then put your form below it.  This will work unless you do 
> a form post to
> > this page from another page in which case it will throw you 
> to the error
> > page.
> >
> > Jason
> 
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 




> -----Original Message-----
> From: Kath [mailto:[EMAIL PROTECTED]]
> Sent: 19 February 2001 22:40
> To: Martin A. Marques
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Libraries
> 
> 
> I don't exactly try to reinvent a new and better wheel... I 
> just find that
> writing my own libraries makes the site feel like it is more all mine.

... and when you need to do something genuinely original you've got the
skills and experience to do it. Also the existing wheel isn't always round

> 
> - Kath
> 
> 
> ----- Original Message -----
> From: "Martin A. Marques" <[EMAIL PROTECTED]>
> To: "Kath" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Monday, February 19, 2001 4:59 PM
> Subject: Re: [PHP] Libraries
> 
> 
> > Mensaje citado por: Kath <[EMAIL PROTECTED]>:
> >
> > > Why do a lot of people use libraries like PHPLib?
> > >
> > > I find it a lot better to write my own basic functions.
> > >
> > > Is it just the attitude "Someone else coded it already, 
> why should I?"
> >
> > Like some said to me "Don't re-invent the wheel"
> >
> > Saludos... :-)
> >
> >
> 
> 




On Monday 19 February 2001 22:42, Kath wrote:

> > Why do a lot of people use libraries like PHPLib?
>
> I find it a lot better to write my own basic functions.
>
> Is it just the attitude "Someone else coded it already, why should I?"

Well, if you take a library you can be pretty sure that someone invested 
quite some work into making it as powerful and bug-free as possible (that 
includes things like having really researched the RFCs for e.g. that 
popular mail class etc).

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Drink wet cement. Get stoned.




Get a FREE copy of the exciting 48-page booklet "Inside Secrets to Wealth 
on the Web".

Just hit Reply and send a blank message with "Inside Secrets" on the 
Subject line.




mmmmmm..... I wonder what this guy is up to :  8-)


----- Original Message -----
From: Noel Hadfield <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 20, 2001 11:17 AM
Subject: [PHP] WEALTH ON THE WEB!


> Get a FREE copy of the exciting 48-page booklet "Inside Secrets to Wealth
> on the Web".
>
> Just hit Reply and send a blank message with "Inside Secrets" on the
> Subject line.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>






Hello all,
To see all fields(directories and files) inside a directory I use the "dir" and 
"read", what I would like to know is, if there other way to do the same, others 
commands because now I have to problems, I want to make a sort of the list (by name or 
by date), and I have to use my program in irix system, any ideas ???
Thank you all
Best Regards




Hi,
I have two simple php files:

main.php:
<A HREF="test1.php?rosen=11">LIST</A>

test1.php:

<?print("$rosen");?>



But this doesn't work !

please HELP !



Rsen Marinov










In test1.php you shoul have

<?
    $qry=getenv("QUERY_STRING");
    $rosen=substr($qry,6);
    print("$rosen");
?>

Sorin Ifrim

Rosen <[EMAIL PROTECTED]> wrote in message
96tdvp$oo7$[EMAIL PROTECTED]">news:96tdvp$oo7$[EMAIL PROTECTED]...
> Hi,
> I have two simple php files:
>
> main.php:
> <A HREF="test1.php?rosen=11">LIST</A>
>
> test1.php:
>
> <?print("$rosen");?>
>
>
>
> But this doesn't work !
>
> please HELP !
>
>
>
> Rsen Marinov
>
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





From: "Ifrim Sorin" <[EMAIL PROTECTED]>

> In test1.php you shoul have
> 
> <?
>     $qry=getenv("QUERY_STRING");
>     $rosen=substr($qry,6);
>     print("$rosen");
> ?>
> 
> Sorin Ifrim


wtf? Most certainly do NOT do it like that. That's a ridiculous kludge.

Rosen, when you say "it doesn't work" what do you mean?





> 
> Rosen <[EMAIL PROTECTED]> wrote in message
> 96tdvp$oo7$[EMAIL PROTECTED]">news:96tdvp$oo7$[EMAIL PROTECTED]...
> > Hi,
> > I have two simple php files:
> >
> > main.php:
> > <A HREF="test1.php?rosen=11">LIST</A>
> >
> > test1.php:
> >
> > <?print("$rosen");?>
> >
> >
> >
> > But this doesn't work !
> >
> > please HELP !
> >
> >
> >
> > Rsen Marinov
> >
> >






No,

PHP makes get variables available in $HTTP_GET_VARS. Thus, Rosen can
access his variable as $HTTP_GET_VARS['rosen'].

If register_globals is true, the variable is also available in the
global scope as $rosen (as in Rosen's example).
If this does not work, it would seem that register_globals is not set.

Rosen, could you perhaps put something around the output in test1.php
and post that? Something like:

<? print(" The value of \$rosen is: $rosen ."); ?>

Also, please tell us which version of PHP you're using.

Cheers,
Ben

Ifrim Sorin wrote:
> 
> In test1.php you shoul have
> 
> <?
>     $qry=getenv("QUERY_STRING");
>     $rosen=substr($qry,6);
>     print("$rosen");
> ?>
> 
> Sorin Ifrim
> 
> Rosen <[EMAIL PROTECTED]> wrote in message
> 96tdvp$oo7$[EMAIL PROTECTED]">news:96tdvp$oo7$[EMAIL PROTECTED]...
> > Hi,
> > I have two simple php files:
> >
> > main.php:
> > <A HREF="test1.php?rosen=11">LIST</A>
> >
> > test1.php:
> >
> > <?print("$rosen");?>
> >
> >
> >
> > But this doesn't work !
> >
> > please HELP !
> >
> >
> >
> > Rsen Marinov
> >
> >
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




Hello there fellow programmer,

I just started learning PHP (I got version 4 installed with Apache on a
Win98 machine). At the moment I'm trying to write a little program that
verifies a user login.
I know the program is not professional but for me it will do. Only I got
stuck with the following problem. I have written a class (I'm not very sure
if this is the right way to do this) in which I specified a function that
does the password check.
Now I like the program to check the password and return me a true or a false
which I can read from somewhere else in my program.
I wrote it like this:

<html>
<head>
       <title>Password Check</title>

<?PHP class password
{
 function checkpwd()
 { ?>

 <FORM ACTION="<?php print("$PHP_SELF"); ?>" METHOD="POST">
 User name is:<BR>
 <INPUT TYPE="text" NAME="UserName"> <P>

 <?php echo "Give Password:<BR>" ?>

 <INPUT TYPE="PASSWORD" NAME="passwd">
 <INPUT TYPE="HIDDEN" NAME="GeefInfo" VALUE=1> <p>
 <INPUT TYPE="submit">

 <?PHP if (IsSet($this->GeefInfo)&&IsSet($this->UserName))
       {
        $this->UserName=strtoupper($this->UserName);
         $this->passwd=strtoupper($this->passwd);

           if (IsSet($this->passwd))
             {
                if ($this->passwd=="MYPASS" && $this->UserName=="RONALD")
                {
                 $this-> testvar=1;
                 exit(1);
                }
                else
                {
                 $this-> testvar=0;
                 exit(0);
                }

             }

        }
  }
}?>

</head>
<body>

<?php $exec_pwd=new password;
$vexec_pwd->checkpwd();
print $exec_pwd;                     // Where is my output   ?????
?>

</body>
</html>

If you can and like to help me I will be very pleased.
Thanks in advance !!!

Ronald







Hi Ronald,


> Hello there fellow programmer,
>
> I just started learning PHP (I got version 4 installed with Apache on a
> Win98 machine). At the moment I'm trying to write a little program that
> verifies a user login.
> I know the program is not professional but for me it will do. Only I got
> stuck with the following problem. I have written a class (I'm not very
sure
> if this is the right way to do this) in which I specified a function that
> does the password check.
> Now I like the program to check the password and return me a true or a
false
> which I can read from somewhere else in my program.
> I wrote it like this:

First of all, you don't need a class for this. Unless you expect the program
to get a lot more complicated, you could just use a function.



>
> <html>
> <head>
>        <title>Password Check</title>
>
> <?PHP class password
> {
>  function checkpwd()
>  { ?>
>
>  <FORM ACTION="<?php print("$PHP_SELF"); ?>" METHOD="POST">
>  User name is:<BR>
>  <INPUT TYPE="text" NAME="UserName"> <P>
>
>  <?php echo "Give Password:<BR>" ?>
>
>  <INPUT TYPE="PASSWORD" NAME="passwd">
>  <INPUT TYPE="HIDDEN" NAME="GeefInfo" VALUE=1> <p>
>  <INPUT TYPE="submit">
>
>  <?PHP if (IsSet($this->GeefInfo)&&IsSet($this->UserName))
>        {
>         $this->UserName=strtoupper($this->UserName);
>          $this->passwd=strtoupper($this->passwd);


$this->GeefInfo and $this->UserName will never be set. You need to change
this to something like:

if (isset($HTTP_POST_VARS["GeefInfo"]) &&
isset($HTTP_POST_VARS["UserName"]))




>
>            if (IsSet($this->passwd))

Similarly here.

if (isset($HTTP_POST_VARS["passwd"]))


>              {
>                 if ($this->passwd=="MYPASS" && $this->UserName=="RONALD")
>                 {
>                  $this-> testvar=1;
>                  exit(1);
>                 }
>                 else
>                 {
>                  $this-> testvar=0;
>                  exit(0);

I think you might be expecting exit() to do something different to what it
does here. The function exit() will terminate script execution. I suspect
what you wanted was return.

return 1;

else

return 0;




>                 }
>
>              }
>
>         }
>   }
> }?>
>
> </head>
> <body>
>
> <?php $exec_pwd=new password;
> $vexec_pwd->checkpwd();
> print $exec_pwd;                     // Where is my output   ?????


You won't get any output. $exec_pwd contains an object (an instance of your
"password" class).

If you want to output the return value from checkpwd(), do:

$exec_pwd = new password;
print $exec_pwd->checkpwd();


I think you may be a bit confused about how variables, classes and objects
work in PHP. Have a closer read through the manual. Moreover, if you're just
starting out with PHP then steer clear of objects entirely - you don't need
them!


> ?>
>
> </body>
> </html>
>
> If you can and like to help me I will be very pleased.
> Thanks in advance !!!
>
> Ronald


Hope this helps.


Cheers

Simon Garner





Hi,
I'm using non-persistent connections in a page which is accessed by a client
once a second( yes once a second) for about 12 hours.
Doing a netstat -apn|grep 5432|grep httpd a see that the php doesn't close
the connection, in fact the connection is in CLOSE_WAIT state.
I have tried to let the php to close the connection, but also I have
explicitely close it but the result is the same : the database will no
longer accept connections because the number of allowed clients is reached.

Anybody has any ideea ?
I know that I should use persistent connections but I want to know if this
is a bug or I'm missing something.

I'a running php 4.0.3pl1 on a RH 6.2 box with apache 1.3.14.


Ovidiu





Hi Dave,
    ODBC is probably your best bet but if your working on Unix/Linux it can
be a bit of a problem as ODBC is primarily a Microsoft system.  I'm working
on something like this for my final year degree project.  My script's are
being developed using Postgres but the final version will use MS SQL.
There's a few ODBC systems available for Linux, but the one I used was
unixODBC (www.unixodbc.org).  It works pretty well but was a bit of a swine
to setup and configure (as the documentation is incomplete).  Once running
you can use the ODBC commands built into PHP which *should* make you as
database-independent as possible.

Phil

Andrew Hill <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Dave,
>
> The ODBC functions in PHP mostly address this.  A good ODBC driver will
also
> translate full SQL92 functionality into the underlying dialect that the
> database supports.
>
> Let me know if you have any questions.
>
> Best regards,
> Andrew
> ---------------------------------------
> Andrew Hill - OpenLink Software
> Director Technology Evangelism
> eBusiness Infrastructure Technology
> http://www.openlinksw.com
>
>
> On 2/16/01 11:54 PM, "Dave Haggerty" <[EMAIL PROTECTED]> wrote:
>
> > I haven't seen this issue discussed, sorry if I missed it:
> >
> > My question is why are the PHP database functions so unportable?  Is
there a
> > reason why they have to be specific to, say MySQL.  It seems to me (even
> > though I am an amatuer to this stuff) that the code should be much more
> > easily portable from one db to another?
> >
> > Do most coders add an abstraction layer themselves?  Or maybe people
just
> > don't port PHP code much and so don't worry about it?
> >
> > Mainly curious....
> >
> > Dave
> >
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Hey all,

I have a question about using a variable across multiple PHP files.

I want to set a path variable such as:  $root_path = /www2/yoursite/docs

and I want this variable to be able to be changed in case the site is moved
to another server that has a different root path.

I was thinking that I could put this variable into another include file,
such as variables.inc and then include or require this file in the script.
However, what if these multiple PHP files that will use this variable are
spread across multiple directories?  I can't really just do this:
include("variables.inc")  because variables.inc won't be in the same
directory as that particular PHP file.  So once again I am presented with
the same problem of telling these PHP scripts where to look for files.

Is there a simple solution in PHP that I am overlooking?  Some sort of
cross-PHP file GLobal variable I can set or something?  =)

I'm REALLY new at PHP, but fairly knowledgeable in PERL, so I'm still trying
to make the switch over.

Thanks in advance for any help that you can provide, and I hope I can
participate a lot on this list.

Thanks again,

Jay Klehr





Jay,

to make variables.inc available from wherever you are, set the value of
include_path in your php.ini or httpd.conf or .htaccess t something like
".:/path/to/where/variables.inc/is:/other/paths"

as an alternative, use the auto_prepend_file directive to include
variables.inc before any script.

See the 'configuration' section in the php manual on how to do this.

Cheers,
Ben

Jay Klehr wrote:
> 
> Hey all,
> 
> I have a question about using a variable across multiple PHP files.
> 
> I want to set a path variable such as:  $root_path = /www2/yoursite/docs
> 
> and I want this variable to be able to be changed in case the site is moved
> to another server that has a different root path.
> 
> I was thinking that I could put this variable into another include file,
> such as variables.inc and then include or require this file in the script.
> However, what if these multiple PHP files that will use this variable are
> spread across multiple directories?  I can't really just do this:
> include("variables.inc")  because variables.inc won't be in the same
> directory as that particular PHP file.  So once again I am presented with
> the same problem of telling these PHP scripts where to look for files.
> 
> Is there a simple solution in PHP that I am overlooking?  Some sort of
> cross-PHP file GLobal variable I can set or something?  =)
> 
> I'm REALLY new at PHP, but fairly knowledgeable in PERL, so I'm still trying
> to make the switch over.
> 
> Thanks in advance for any help that you can provide, and I hope I can
> participate a lot on this list.
> 
> Thanks again,
> 
> Jay Klehr
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




Dear Friends & Future Millionaire: 
AS SEEN ON NATIONAL TV: ''Making over half million dollars 
every 4 to 5 months from your home for an investment of only 
$25 U.S. Dollars expense one time'' 
BE A MILLIONAIRE LIKE OTHERS WITHIN A YEAR!!! Before you say 
''Bull'', please read the following. This is the letter you 
have been hearing about on the news lately. Due to the 
popularity of this letter on the Internet, a national weekly 
news program recently devoted an entire show to the 
investigation of this program described below, to see if it 
really can make people money. The show also investigated 
whether or not the program was legal. 
Their findings proved once and for all that there are 
''absolutely NO Laws prohibiting the participation in the 
program and if people can -follow the simple instructions, 
they are bound to make some mega bucks with only $25 out of 
pocket cost''. DUE TO THE RECENT INCREASE OF POPULARITY & 
RESPECT THIS PROGRAM HAS ATTAINED, IT IS CURRENTLY WORKING 
BETTER THAN EVER. 
This is what one had to say: '' Thanks to this profitable 
opportunity. I was approached many times before but each 
time I passed on it. I am so glad I finally joined just to 
see what one could expect in return for the minimal effort 
and money required. To my astonishment, I received total $ 
610,470.00 in 21 weeks, with money still coming in''. Pam 
Hedland, Fort Lee, New Jersey. 
============================================================ 
Here is another testimonial: ''' this program has 
been around for a long time but I never believed in it. But 
one day when I received this again in the mail I decided to 
gamble my $25 on it. I followed the simple instructions and 
walaa ..... 3 weeks later the money started to come in. 
First month I only made $240.00 but the next 2 months after 
that I made a total of $290,000.00. So far, in the past 8 
months by re-entering the program, I have made over 
$710,000.00 and I am playing it again. The key to success in 
this program is to follow the simple steps and NOT change 
anything.'' More testimonials later but first, 
======== PRINT THIS NOW FOR YOUR FUTURE REFERENCE ========== 
(Or Have it E-mailed to you-See Submit Button Below) 
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 
If you would like to make at least 
$500,000 every 4 to 5 months easily and comfortably, please 
read the following...THEN READ IT AGAIN and AGAIN !!! 
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 
FOLLOW THE SIMPLE INSTRUCTION BELOW AND YOUR FINANCIAL 
DREAMS WILL COME TRUE, GUARANTEED! INSTRUCTIONS: 
===== Order all 5 reports shown on the list below. ========= 
For each report, send $5 CASH, THE NAME & NUMBER OF THE 
REPORT YOU ARE ORDERING and YOUR E-MAIL ADDRESS to the 
person whose name appears ON THAT LIST next to the report. 
MAKE SURE YOUR RETURN ADDRESS IS ON YOUR ENVELOPE TOP LEFT 
CORNER in case of any mail problems. 
=== When you place your order, make sure you order each of 
the 5 reports. You will need all 5 reports so that you can 
save them on your computer and resell them. YOUR TOTAL COST 
$5 X 5=$25.00. 
=== Within a few days you will receive, vie e-mail, each of 
the 5 reports from these 5 different individuals. Save them 
on your computer so they will be accessible for you to send 
to the 1,000's of people who will order them from you. Also 
make a floppy of these reports and keep it on your desk in 
case something happen to your computer. 
=== IMPORTANT __ DO NOT alter the names of the people who 
are listed next to each report, or their sequence on the 
list, in any way other than what is instructed below in step 
'' 1 through 6 '' or you will lose out on majority of your 
profits. Once you understand the way this works, you will 
also see how it does not work if you change it. Remember, 
this method has been tested, and if you alter, it will NOT 
work !!! People have tried to put their friends/relatives 
names on all five thinking they could get all the money. But 
it does not work this way. Believe us, we all have tried to 
be greedy and then nothing happened. So Do Not try to change 
anything other than what is instructed. Because if you do, 
it will not work for you. Remember, honesty reaps the 
reward!!! 
1.... After you have ordered all 5 reports, take this 
advertisement and REMOVE the name & address of the person in 
REPORT # 5. This person has made it through the cycle and is 
no doubt counting their fortune. 2.... Move the name & 
address in REPORT # 4 down TO REPORT # 5. 3.... Move the 
name & address in REPORT # 3 down TO REPORT # 4. 4.... Move 
the name & address in REPORT # 2 down TO REPORT # 3. 5.... 
Move the name & address in REPORT # 1 down TO REPORT # 2 
6.... Insert YOUR name & address in the REPORT # 1 Position. 
PLEASE MAKE SURE you copy every name & address ACCURATELY! 
============================================================ 

**** Take this entire letter, with the modified list of 
names, and save it on your computer. DO NOT MAKE ANY OTHER 
CHANGES. Save this on a disk as well just in case if you 
lose any data. To assist you with marketing your business on 
the internet, the 5 reports you purchase will provide you 
with invaluable marketing information which includes how to 
send bulk e-mails legally, where to find thousands of free 
classified ads and much more. There are 2 Primary methods to 
get this venture going: 
METHOD # 1: BY SENDING BULK E-MAIL LEGALLY 
============================================================ 
Let's say that you decide to start small, just to see how it 
goes, and we will assume You and those involved send out 
only 5,000 e-mails each. Let's also assume that the mailing 
receive only a 0.2% response (the response could be much 
better but lets just say it is only 0.2%. Also many people 
will send out hundreds of thousands e-mails instead of only 
5,000 each). Continuing with this example, you send out only 
5,000 e-mails. 
With a 0.2% response, that is only 10 orders for report # 1. 
Those 10 people responded by sending out 5,000 e-mail each 
for a total of 50,000. Out of those 50,000 e-mails only 0.2% 
responded with orders. That's=100 people responded and 
ordered Report # 2. 
Those 100 people mail out 5,000 e-mails each for a total of 
500,000 e-mails. The 0.2% response to that is 1000 orders 
for Report # 3. 
Those 1000 people send out 5,000 e-mails each for a total of 
5 million e-mails sent out. The 0.2% response to that is 
10,000 orders for Report # 4. 
Those 10,000 people send out 5,000 e-mails each for a total 
of 50,000,000 (50 million) e-mails. The 0.2% response to 
that is 100,000 orders for Report # 5 THAT'S 100,000 ORDERS 
TIMES $5 EACH=$500,000.00 (half million). 
Your total income in this example is: 1..... $50 + 2..... 
$500 + 3..... $5,000 + 4..... $50,000 + 5..... $500,000 
........ Grand Total=$555,550.00 
NUMBERS DO NOT LIE. GET A PENCIL & PAPER AND FIGURE OUT THE 
WORST POSSIBLE RESPONSES AND NO MATTER HOW YOU CALCULATE IT, 
YOU WILL STILL MAKE A LOT OF MONEY ! 
============================================================ 
REMEMBER FRIEND, THIS IS ASSUMING ONLY 10 PEOPLE ORDERING 
OUT OF 5,000 YOU MAILED TO. Dare to think for a moment what 
would happen if everyone or half or even one 4th of those 
people mailed 100,000 e-mails each or more? There are over 
150 million people on the Internet worldwide and counting. 
Believe me, many people will do just that, and more! 
METHOD # 2 : BY PLACING FREE ADS ON THE INTERNET 
============================================================ 
Advertising on the net is very very inexpensive and there 
are hundreds of FREE places to advertise. Placing a lot of 
free ads on the Internet will easily get a larger response. 
We strongly suggest you start with Method # 1 and add METHOD 
# 2 as you go along. For every $5 you receive, all you must 
do is e-mail them the Report they ordered. That's it. Always 
provide same day service on all orders. 
This will guarantee that the e-mail they send out, with your 
name and address on it, will be prompt because they can not 
advertise until they receive the report. 
====================== AVAILABLE REPORTS==================== 
ORDER EACH REPORT BY ITS NUMBER & NAME ONLY. Notes: Always 
send $5 cash (U.S. CURRENCY) for each Report. Checks NOT 
accepted. Make sure the cash is concealed by wrapping it in 
at least 2 sheets of paper. On one of those sheets of paper, 
Write the NUMBER & the NAME of the Report you are ordering, 
YOUR E-MAIL ADDRESS and your name and postal address. 
PLACE YOUR ORDER FOR THESE REPORTS NOW : 
============================================================ 
REPORT # 1 : ''The Insider's Guide to Advertising 
for Free on the Net'' 
Order Report # 1 from: 
Jeff Nickel
P.O. Box 560005
Charlotte, NC 28256-0005 USA
____________________________________________________________ 
REPORT # 2 : ''The Insider's Guide to Sending Bulk e- 
mail on the Net'' 
Order Report # 2 from : 
D. Gilstrap 
P.O. Box 311079 
Atlanta, GA 31131 USA 
____________________________________________________________ 
REPORT # 3 : ''The Secret to Multilevel marketing on 
the net'' 
Order Report # 3 from: 
Stella Dottir 
2327 1/2 Chartres St. 
New Orleans, LA 70117 USA 
____________________________________________________________ 
REPORT # 4 : ''How to become a millionaire utilizing 
MLM & the Net'' 
Order Report # 4 from: 
Amos Miller 
261 Joost Ave. 
San Francisco, CA 94131 USA 
____________________________________________________________ 
REPORT # 5 : ''HOW TO SEND 1 MILLION E-MAILS FOR FREE'' 
Order Report # 5 from: 
Loren Stone 
P.O. Box 6232 
Clearfield, UT 84089 USA  
____________________________________________________________ 
$$$$$$$$$ YOUR SUCCESS GUIDELINES $$$$$$$$$$$ 
Follow these guidelines to guarantee your success: 
=== If you do not receive at least 10 orders for Report #1 
within 2 weeks, continue sending e-mails until you do. 
=== After you have received 10 orders, 2 to 3 weeks after 
that you should receive 100 orders or more for REPORT # 2. 
If you did not, continue advertising or sending e-mails 
until you do. 
=== Once you have received 100 or more orders for Report # 
2, YOU CAN RELAX, because the system is already working for 
you, and the cash will continue to roll in ! THIS IS 
IMPORTANT TO REMEMBER: Every time your name is moved down on 
the list, you are placed in front of a different report. 
You can KEEP TRACK of your PROGRESS by watching which report 
people are ordering from you. IF YOU WANT TO GENERATE MORE 
INCOME SEND ANOTHER BATCH OF E-MAILS AND START THE WHOLE 
PROCESS AGAIN. There is NO LIMIT to the income you can 
generate from this business !!! 
============================================================ 
FOLLOWING IS A NOTE FROM THE ORIGINATOR OF THIS PROGRAM: You 
have just received information that can give you financial 
freedom for the rest of your life, with NO RISK and JUST A 
LITTLE BIT OF EFFORT. You can make more money in the next 
few weeks and months than you have ever imagined. Follow the 
program EXACTLY AS INSTRUCTED. Do Not change it in any way. 
It works exceedingly well as it is now. Remember to e-mail a 
copy of this exciting report after you have put your name 
and address in Report #1 and moved others to #2 ...........# 
5 as instructed above. One of the people you send this to 
may send out 100,000 or more e-mails and your name will be 
on every one of them. Remember though, the more you send out 
the more potential customers you will reach. So my friend, I 
have given you the ideas, information, materials and 
opportunity to become financially independent. IT IS UP TO 
YOU NOW! 
==================== MORE TESTIMONIALS====================== 
'' My name is Mitchell. My wife, Jody and I live in Chicago. 
I am an accountant with a major U.S. Corporation and I make 
pretty good money. When I received this program I grumbled 
to Jody about receiving ''junk mail''. I made fun of the 
whole thing, spouting my knowledge of the population and 
percentages involved. I ''knew'' it wouldn't work. Jody 
totally ignored my supposed intelligence and few days later 
she jumped in with both feet. I made merciless fun of her, 
and was ready to lay the old ''I told you so'' on her when 
the thing didn't work. Well, the laugh was on me! Within 3 
weeks she had received 50 responses. Within the next 45 days 
she had received total $ 147,200.00 ........... all cash! I 
was shocked. I have joined Jody in her ''hobby''. Mitchell 
Wolf M.D., Chicago, Illinois 
============================================================ 
'' Not being the gambling type, it took me several 
weeks to make up my mind to participate in this plan. But 
conservative that I am, I decided that the initial 
investment was so little that there was just no way that I 
wouldn't get enough orders to at least get my money back''. 
'' I was surprised when I found my medium size post office 
box crammed with orders. I made $319,210.00 in the first 12 
weeks. The nice thing about this deal is that it does not 
matter where people live. There simply isn't a better 
investment with a faster return and so big''. Dan Sondstrom, 
Alberta, Canada 
============================================================ 
'' I had received this program before. I deleted 
it, but later I wondered if I should have given it a try. Of 
course, I had no idea who to contact to get another copy, so 
I had to wait until I was e-mailed again by someone 
else.........11 months passed then it luckily came 
again...... I did not delete this one! I made more than 
$490,000 on my first try and all the money came within 22 
weeks''. Susan De Suza, New York, N.Y. 
============================================================ 
'' It really is a great opportunity to make 
relatively easy money with little cost to you. I followed 
the simple instructions carefully and within 10 days the 
money started to come in. My first month I made $ 20,560.00 
and by the end of third month my total cash count was $ 
362,840.00. Life is beautiful, Thanx to internet''. Fred 
Dellaca, Westport, New Zealand 
============================================================ 
ORDER YOUR REPORTS TODAY AND GET STARTED ON YOUR ROAD TO 
FINANCIAL FREEDOM ! 
============================================================ 
If you have any questions of the legality of this 
program, contact the Office of Associate Director for 
Marketing Practices, Federal Trade Commission, Bureau of 
Consumer Protection, Washington, D.C. 
============================THE END========================= 







Hi,
   Not sure if this has been covered on here but... In recent versions
PHP/Sablotron I've found that parse errors in the XML/XSL cause fatal
errors. I'd much rather not have this happen so is there a way I can get
around it? I'm doing xslt_process( ... ) which is meant to return false
on errors so how can I get it to do that again rather than generating a
fatal error that stops processing. I've tried putting my own dummy
errorhandler in that doesn't do anything but that won't do it. Can you
help?
  John




This is really strange. PHP fails to exit / die form script after include / require / include_once / required_once (I tested with all of them, same result). In addition to this, script gets started again automatically from the beginning. (You probably think this is a another newbie mistakes, but I think it is not) Does anyone have the same experience? I'm asking to decide if this is worth to report as a bug. If anyone does not have this problem but me. I'll just leave it alone. (I cannot reproduce this with simple script anyway) I cannot reproduce this behavior with simple script, but it does every time on my script. PHP 4.0.4pl1 with PostgreSQL, mhash, mcript, gd, and others Apache 1.3.17 (mod_php, mod_gzip, mod_ssl and others) RedHat Linux7.0.1/ja (Apache and PHP are build from source) My code does as follows In user registration form (regist.php) - require_once() to include registration function - call registration function - if the function does not exit, display HTML in this registration file. regist.php looks like ------------ <?php require_once('regist_util.inc'); $msg = user_regist(); // defined in regist_util.inc ?> <html> <form method=post action=regist.php> <?php @print($msg); // print errors for users' inputs if there is ?> ........................ <input type="text" name="username"></input> <input type="text" name="email"></input> ........................ </html> ------------- regist_util.inc does <= THIS FILE HAS PROBLEM - check if there is the same user name is registered - if there is, return 'Choose other name' error (or other error) - if not, insert user data into database and send notify email, include other html file to show user registered successfully. Then exit script. regist_util.inc looks like -------------- <?php function regist_user() { global $HTTP_POST_VARS; $error = array(); // check inputs add errors, add error like $error[] = 'Error1'; $error[] = 'Error2'; // check database $db = pg_pconnect(); $qid = pg_exec("select * from user where username = '". $HTTP_POST_VARS['username'] ."'"); if (pg_numrow($qid) > 0) { $error[] = 'Choose other name'; } if (count($error) == 0) { // INSERT DATA - data is inserted if username is new ......................... // SEND EMAIL - mail is sent if username is new ....................... <= **** if I put die() or exit() BEFORE include PHP exits from script as expected. **** // include HTML file (with just a little PHP code) include('registered.php'); <= **** THIS IS NOT DISPLAYED AT ALL ****** // If I remove include(), it exits from script. exit; <= ************* DOES NOT EXIT or DIE HERE ************* // Script seems start from the beginning. It shows 'Choose other name' error and // there is the data newly creating in database, even if the user table is empty. // Because data with the username was inserted at 1 first time script iteration. // For the second time, script finds the username (of course) and return 'Choose // other name' error. // Since I did get ANY additional HTML, but HTML codes in regist.php when // this happened, I thought it might something to do with 'ob_gzhandler'. I // disabled it. But no difference. This makes difficult to find out what PHP is // doing, now I'm sure PHP is executing the scripts TWICE. // Reason: // 1) There will be a new db table row every time I use new username. // 2) I get notification email every time I use new username. // (I thought PHP never buffer outputs unless user explicitly to do so) // If I redirect, it works as expected.... I would rather not to show registered.php, since // user does not have to access this page directly. (I can work around this with different // way, so I will do so) // By the way, I use EUC-JP code, which is multi-byte char code set, in scripts // and HTML part, etc. EUC-JP supposed to work well for many programs written // for single byte char code set. However, it might something to do with char code. // I'm using. So far, I didn't have problems. May be this is the first time. (I haven't // investigated yet) } } --------------- registered.php looks like -------------- <html> <body> You have been registered to this web site<br> username = <?php @print($HTTP_POST_VARS['username']; ?><br> .......................... </body> </html> --------------- -- Yasuo Ohgaki



Downtown Toronto web developer seeks experienced PHP/Perl/SQL developer
with 2-3 years web experience to work on new and existing websites. Strong
database and Apache on unix knowledge an asset. Please email resumes to
[EMAIL PROTECTED]





>
>I'm having problem with Netscape6 does not resend valid POST data to PHP.
>Netscape is waiting until connection timeout. If I hit stop button, it logs
>warning message attached to this mail. (These forms work fine with IE5.x,
>NN4.5)

I found out work around days ago, but I didn't post list..
Anyway, NN6 does not display page as expected if

HTML has <input type='file'> and <form encode='muiti-part/form-data'>
User does not specify file to upload and go to next page.
User hit browser's back button.

When this condition meets, NN6 does not send any data to server and
waits until timeouts.
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





I'm working through geting the raw sockets implementation to send a http
post command to a cgi-script.

But there's one thing I'm trying to figure out.

How do I create the content-length?

I don't see a obvious way but my expection would be the following code.

$string ="foo=bar&food=apple";
$contentlength=$string.size;
$uuencodestring=uuencode($string);

but I don't seem to see the easy $string.size ?

any ideas on a good way to do this?

thanks,

evan


Reply via email to