php-general Digest 28 Aug 2003 08:29:13 -0000 Issue 2263

Topics (messages 160955 through 161010):

IS THIS A BUG?
        160955 by: Steve Todd
        160958 by: DvDmanDT
        160967 by: John W. Holmes
        160968 by: Curt Zirzow
        160971 by: Chris Shiflett
        160972 by: Chris W. Parker
        160973 by: Chris Sherwood
        160974 by: Leif K-Brooks
        160978 by: Leif K-Brooks
        160979 by: Robert Cummings
        160980 by: Curt Zirzow
        160981 by: DvDmanDT
        160986 by: Curt Zirzow
        160988 by: David Otton
        160989 by: Martin Towell

SOLUTION     [PHP] including .shtml file within my php script
        160956 by: Gronquist, Jim M

multiple mailings
        160957 by: Jay Fitzgerald
        160982 by: Curt Zirzow

How to exec PHP as CGI
        160959 by: Lowell Allen

Re: can pdf forms be used to submit data into db?
        160960 by: Curt Zirzow
        160961 by: Curt Zirzow
        160969 by: John W. Holmes
        160970 by: Ryan.K.Look.courts.state.hi.us
        160977 by: John W. Holmes
        160991 by: Evan Nemerson

Re: dealing with arrays
        160962 by: Curt Zirzow
        160994 by: Aris  Santillan

php equivalent to asp's instr()
        160963 by: Chris W. Parker
        160965 by: DvDmanDT
        160984 by: Cody Phanekham
        160987 by: David Otton
        161009 by: David Cuddeback

Re: Implode slows down file reading? [was: str_replace performance in large mailing 
script]
        160964 by: Curt Zirzow

Re: Website templating schemes
        160966 by: John W. Holmes

Re: SMTP server response: 550 5.7.1 Unable to relay for
        160975 by: Chris W. Parker
        161008 by: Manuel Lemos

Re: Thank You for your help
        160976 by: Leif K-Brooks
        160993 by: Justin French

Re: Animating with GD?
        160983 by: Edward Rudd
        160992 by: Cody Phanekham
        160995 by: Ashley M. Kirchner
        160996 by: Ashley M. Kirchner

list so slow... Sobig?
        160985 by: Chris W. Parker

Re: Warning - Page has expired error
        160990 by: jabber.raditha.com

Re: WYSIWYG online editor for Macintosh?
        160997 by: Joel Rees

Re: can pdf forms be used to submit data into a db?
        160998 by: David Robley

installation problem
        160999 by: Jeremiah Breindel

beginner: cut text after " "
        161000 by: Andras Kende
        161002 by: John W. Holmes
        161004 by: David Otton

beginner: remove the string after the first whitespace
        161001 by: Andras Kende
        161003 by: murugesan

Re: fatal protocol error
        161005 by: Ray Van Dolson

Re: mail mime attachment
        161006 by: Manuel Lemos

Re: speed of mail() on two servers
        161007 by: Manuel Lemos

how to block a user downloading a file?
        161010 by: fatih olcer

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]


----------------------------------------------------------------------
--- Begin Message ---
Is it possible to define a variable, such as:
$foo = "bar";
 
and then do as follows to create a totally different variable:
$$foo =  "text here";
 
this seems to mean $bar = "text here";.
 
Is this a bug or can we legally use it.
 
Steve

--- End Message ---
--- Begin Message ---
Considering the manual has examples using that method (or at least had), and
many tutorials, I think you can use it...
When using register_globals=off, this might be off intrest: (notice $$var)
while(list($var,$val)=each($_REQUEST))$$var=$val;

-- 
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]
"Steve Todd" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> Is it possible to define a variable, such as:
> $foo = "bar";
>
> and then do as follows to create a totally different variable:
> $$foo =  "text here";
>
> this seems to mean $bar = "text here";.
>
> Is this a bug or can we legally use it.
>
> Steve
>

--- End Message ---
--- Begin Message --- Steve Todd wrote:

Is it possible to define a variable, such as:
$foo = "bar";
and then do as follows to create a totally different variable:
$$foo = "text here";
this seems to mean $bar = "text here";.
Is this a bug or can we legally use it.

Yes it's legal.


http://us2.php.net/manual/en/language.variables.variable.php

--
---John Holmes...

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

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
* Thus wrote Steve Todd ([EMAIL PROTECTED]):
> Is it possible to define a variable, such as:
> $foo = "bar";
>  
> and then do as follows to create a totally different variable:
> $$foo =  "text here";
>  
> this seems to mean $bar = "text here";.
>  
> Is this a bug or can we legally use it.

perfectly legal, its called a variable variable...

http://php.net/variables.variable


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

--- End Message ---
--- Begin Message ---
--- Steve Todd <[EMAIL PROTECTED]> wrote:
> Is it possible to define a variable, such as:
> $foo = "bar";
>  
> and then do as follows to create a totally different variable:
> $$foo =  "text here";
>  
> this seems to mean $bar = "text here";.
>  
> Is this a bug or can we legally use it.

It is not a bug, but it's still PHP:

http://bbspot.com/News/2000/6/php_suspend.html

Chris

=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

--- End Message ---
--- Begin Message ---
Steve Todd <mailto:[EMAIL PROTECTED]>
    on Wednesday, August 27, 2003 1:28 PM said:

> Is this a bug or can we legally use it.

It's legal. And here is an article that explains it:

http://www.phphideout.com/articleview.php/5

(read near the bottom)


Chris.

--- End Message ---
--- Begin Message ---
No its not a bug

basically what you did was assign a value to a value of a variable

a $$ is how you access the value of a variable as a variable


----- Original Message ----- 
From: "Steve Todd" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 27, 2003 1:27 PM
Subject: [PHP] IS THIS A BUG?


> Is it possible to define a variable, such as:
> $foo = "bar";
>  
> and then do as follows to create a totally different variable:
> $$foo =  "text here";
>  
> this seems to mean $bar = "text here";.
>  
> Is this a bug or can we legally use it.
>  
> Steve
> 

--- End Message ---
--- Begin Message --- Steve Todd wrote:

Is this a bug or can we legally use it.

Please RTFM before posting! http://php.net/variables.variable

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

--- End Message ---
--- Begin Message --- DvDmanDT wrote:

When using register_globals=off, this might be off intrest: (notice $$var)
while(list($var,$val)=each($_REQUEST))$$var=$val;

Why not just turn register_globals on, then?

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

--- End Message ---
--- Begin Message ---
This functionality is a feature and is commonly called variable
variables.

    http://www.php.net/variables.variable

Cheers,
Rob.

On Wed, 2003-08-27 at 16:42, DvDmanDT wrote:
> Considering the manual has examples using that method (or at least had), and
> many tutorials, I think you can use it...
> When using register_globals=off, this might be off intrest: (notice $$var)
> while(list($var,$val)=each($_REQUEST))$$var=$val;
> 
> -- 
> // DvDmanDT
> MSN: [EMAIL PROTECTED]
> Mail: [EMAIL PROTECTED]
> "Steve Todd" <[EMAIL PROTECTED]> skrev i meddelandet
> news:[EMAIL PROTECTED]
> > Is it possible to define a variable, such as:
> > $foo = "bar";
> >
> > and then do as follows to create a totally different variable:
> > $$foo =  "text here";
> >
> > this seems to mean $bar = "text here";.
> >
> > Is this a bug or can we legally use it.
> >
> > Steve
> >
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
-- 
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org   |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.    |
`---------------------------------------------'

--- End Message ---
--- Begin Message ---
* Thus wrote DvDmanDT ([EMAIL PROTECTED]):
> Considering the manual has examples using that method (or at least had), and
> many tutorials, I think you can use it...
> When using register_globals=off, this might be off intrest: (notice $$var)
> while(list($var,$val)=each($_REQUEST))$$var=$val;

Actually there is a funtion for that, php>=4.1.0:
  http://php.net/import_request_variables 

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

--- End Message ---
--- Begin Message ---
I also wanna add that it works for functions as well:
$foo="bar";
$foo();

would call the function bar()... I read this in the manual at some point
like a year ago... This isn't something I would recommend using as you could
in 90% of the cases screw it all badly... Could be useful sometimes though
(I got an example, but I'm a bit lazy...)

-- 
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]
"Steve Todd" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> Is it possible to define a variable, such as:
> $foo = "bar";
>
> and then do as follows to create a totally different variable:
> $$foo =  "text here";
>
> this seems to mean $bar = "text here";.
>
> Is this a bug or can we legally use it.
>
> Steve
>

--- End Message ---
--- Begin Message ---
* Thus wrote Leif K-Brooks ([EMAIL PROTECTED]):
> DvDmanDT wrote:
> 
> >When using register_globals=off, this might be off intrest: (notice $$var)
> >while(list($var,$val)=each($_REQUEST))$$var=$val;
> >
> Why not just turn register_globals on, then?

There are several reasons why not to turn globals on.

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

--- End Message ---
--- Begin Message ---
On Wed, 27 Aug 2003 18:36:26 -0400, you wrote:

>DvDmanDT wrote:
>
>>When using register_globals=off, this might be off intrest: (notice $$var)
>>while(list($var,$val)=each($_REQUEST))$$var=$val;
>>
>Why not just turn register_globals on, then?

I assume you could use it to only pull in variables from POST or GET, or you
could add some complexity to the loop and verify the variables as they come
in.

(Personally, I agree - just turn the damn switch back on. It's always the
first thing I do to an install.)

--- End Message ---
--- Begin Message ---
And also for class names

$foo = "bar";
$blah = new $foo();

$blah would be a new instance of the class bar
I've actually used the above, but it was a special case.. I wouldn't
normally use it.

-----Original Message-----
From: DvDmanDT [mailto:[EMAIL PROTECTED]
Sent: Thursday, 28 August 2003 8:58 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: IS THIS A BUG?


I also wanna add that it works for functions as well:
$foo="bar";
$foo();

would call the function bar()... I read this in the manual at some point
like a year ago... This isn't something I would recommend using as you could
in 90% of the cases screw it all badly... Could be useful sometimes though
(I got an example, but I'm a bit lazy...)

-- 
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]
"Steve Todd" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> Is it possible to define a variable, such as:
> $foo = "bar";
>
> and then do as follows to create a totally different variable:
> $$foo =  "text here";
>
> this seems to mean $bar = "text here";.
>
> Is this a bug or can we legally use it.
>
> Steve
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
__________ Information from NOD32 1.490 (20030820) __________

This message was checked by NOD32 for Exchange e-mail monitor.
http://www.nod32.com

--- End Message ---
--- Begin Message ---
The solution to using .shtml files from within
your PHP scripts is as simple as:

include ("somefile.shtml");

Very handy if you have header, sidebar, footer templates
setup using SSI.

-Jim


-----Original Message-----
From: Gronquist, Jim M 
Sent: Wednesday, August 27, 2003 11:13 AM
To: [EMAIL PROTECTED]
Subject: [PHP] including .shtml file within my php script

I have an open source php script to add items to a mysql database.

I want to wrap the page  using a .shtml file

 

Currently, the .shtml file is:

http://bursar.indiana.edu/gotcha/index.shtml

 

The php script is:

http://bursar.indiana.edu/gotcha/g_add_gotcha.php

 

I believe that I should be able to use one of the commands:

Include, require or virtual in order to have the .shtml file

called from php. I'm having trouble with the syntax.

Has anybody successfully done something like this?

 

I tried:

<?php

require("_header.shtml");

?>

 

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

Jim Gronquist
Computer Network and Programming Analyst

Office of the Bursar

Indiana University

812.856.3026   x6-3026
[EMAIL PROTECTED]

 

--- End Message ---
--- Begin Message --- sorry for the multiple mailings...I'm not meaning to spam the list, but apparently when i send an email to the list, it takes almost 2 hours for me to receive a copy of it letting me know that it went through ok....

================================================
Jay Fitzgerald, Design Director
- Certified Professional Webmaster (CPW-A)
- Certified Professional Web Designer (CPWDS-A)
- Certified Professional Web Developer (CPWDV-A)
- Certified E-Commerce Manager (CECM-A)
- Certified Small Business Web Consultant (CWCSB-A)

Bayou Internet - http://www.bayou.com
Toll Free: 888.30.BAYOU (22968)
Vox: 318.338.2034 / Fax: 318.338.2506
E-Mail: [EMAIL PROTECTED]
ICQ: 38823829 / AIM: bayoujf / MSN: bayoujf / Yahoo: bayoujf
================================================

--- End Message ---
--- Begin Message ---
* Thus wrote Jay Fitzgerald ([EMAIL PROTECTED]):
> sorry for the multiple mailings...I'm not meaning to spam the list, but 
> apparently when i send an email to the list, it takes almost 2 hours for me 
> to receive a copy of it letting me know that it went through ok....
 
Yes the mailling list is a little slow rightnow. 



Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

--- End Message ---
--- Begin Message ---
My PHP script for updating some static HTML pages no longer works on a
commercial host that changed their setup so PHP can't write files to the
public_html directory. The host's tech support says that a PHP script
executed as a CGI can still write to public_html.

The site has PHP 4.3.2 on Apache 1.3.28, with passthru, shell_exec, and
system disabled. I'm not sure how to approach converting my script to work
as a CGI -- if I need to execute the update from a content management system
link, do I use exec()? Does exec() take a Unix command? If so, would that
command just reference my PHP script headed with "#!/usr/bin/php -q"? And
how do I return something to tell me if execution was successful?

I'm searching through the manual, but links to good examples (or outright
explanations) would be greatly appreciated.

--
Lowell Allen

--- End Message ---
--- Begin Message ---
* Thus wrote Chris Boget ([EMAIL PROTECTED]):
> > Yes you can!
> > All the information is on www.php.net/fdf.
> 
> I just read the above page and I can't for the life of me figure out
> why anyone would want to do this.  Of course, it's likely that I am
> simply being myopic.
> Would anyone who's actually used fdf enlighten as to the need to
> do it this way?

I've developed a system that uses fdf for a client just recently.
Some of the fdf is a little overkill, but there are cases when the
pdf forms are a scannable document that uses special fonts for a 
scanner to read.  (much like the little box's you have to fill out
for those silly sat tests.)

To properly have the document print, they voted to use fdf/pdf's
forms to  have the user print their data out so it can be scanned.


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

--- End Message ---
--- Begin Message ---
* Thus wrote Cesar Cordovez ([EMAIL PROTECTED]):
> Yes you can!
> 
> All the information is on www.php.net/fdf.

You don't reall need to compile --with-fdftk, to generate fdf
files.  

If you're not doing really fancy stuff (just filling out a form)
then, be sure to take a look at the notes on this page. There are
some examples of how to easisly generate fdf files from an array of
data (say from a db_fetch_assoc() call).

Cheers.

 

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

--- End Message ---
--- Begin Message --- Chris Boget wrote:

All the information is on www.php.net/fdf.

I just read the above page and I can't for the life of me figure out why anyone would want to do this. Of course, it's likely that I am simply being myopic. Would anyone who's actually used fdf enlighten as to the need to do it this way?

PDF forms offer a lot more formatting capabilities than HTML forms. This is sometimes needed to exactly reproduce forms for you business (especially with goverment/army forms).


You can also email the forms around easier than an HTML form and the user can't modify it at all.

Finally, you can have the actual form submitted along with the user data (will be present in RAW_POST_DATA, IIRC), so you can save the form along with the data in the database and then present it back to the user whenever you want.

--
---John Holmes...

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

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
John, that is EXACTLY what i want, now the question is...have you seen this
implemented somewhere?  so php would pass the data to a database and when a
user/client wants to see that data again, php would "re-generate" the form
with the data that is being requested right?  and that is what FDF can
do...correct?

but help me out here and tell me where i can see some sort of
implementation

and how hard would something like this be

ryan



|---------+---------------------------->
|         |           "John W. Holmes" |
|         |           <[EMAIL PROTECTED]|
|         |           rter.net>        |
|         |                            |
|         |           08/27/2003 12:12 |
|         |           PM               |
|         |           Please respond to|
|         |           holmes072000     |
|         |                            |
|---------+---------------------------->
  
>---------------------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                                                         |
  |       To:       Chris Boget <[EMAIL PROTECTED]>                                    
                                                            |
  |       cc:       Cesar Cordovez <[EMAIL PROTECTED]>, [EMAIL PROTECTED], [EMAIL 
PROTECTED]                              |
  |       Subject:  Re: [PHP] can pdf forms be used to submit data into db?            
                                                         |
  
>---------------------------------------------------------------------------------------------------------------------------------------------|




Chris Boget wrote:

>>All the information is on www.php.net/fdf.
>
> I just read the above page and I can't for the life of me figure out
> why anyone would want to do this.  Of course, it's likely that I am
> simply being myopic.
> Would anyone who's actually used fdf enlighten as to the need to
> do it this way?

PDF forms offer a lot more formatting capabilities than HTML forms. This
is sometimes needed to exactly reproduce forms for you business
(especially with goverment/army forms).

You can also email the forms around easier than an HTML form and the
user can't modify it at all.

Finally, you can have the actual form submitted along with the user data
(will be present in RAW_POST_DATA, IIRC), so you can save the form along
with the data in the database and then present it back to the user
whenever you want.

--
---John Holmes...

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

php|architect: The Magazine for PHP Professionals ? www.phparch.com








--- End Message ---
--- Begin Message --- [EMAIL PROTECTED] wrote:

John, that is EXACTLY what i want, now the question is...have you seen this
implemented somewhere?  so php would pass the data to a database and when a
user/client wants to see that data again, php would "re-generate" the form
with the data that is being requested right?  and that is what FDF can
do...correct?

but help me out here and tell me where i can see some sort of
implementation

and how hard would something like this be

How you describe it is how I understand it.


See this thread at Devshed for an example: http://forums.devshed.com/showthread.php?s=&threadid=71168&highlight=fdf

--
---John Holmes...

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

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
Take a look at php.net/fdf for input to database (easy part). As for 
automatically filling out the PDF, you can actually embed javascript in a 
PDF, although I'm not exactly sure how to do it. PlanetPDF.com will have the 
info, though. Also, there is an excellent PDF forum over at planetpdf.com 
which has been very helpful in the past for me. If that fails, you could try 
comp.text.pdf but IIRC the forums work better.


On Tuesday 26 August 2003 05:52 pm, [EMAIL PROTECTED] wrote:
> hi guys and gals, aloha from hawaii,
>
> Not sure if this is the right place to ask, but i just need to know if it
> is technically possible to have a pdf form be filled out online and then
> once the user hits submit, php takes the data and puts it into a db or some
> sort of db technology and if the need arises to pull up that record once
> more, php fetches the data from the db and dynamically fills out the pdf
> form and presents it to the end user...can do?  or anyone know who i can
> talk to about this...
>
> thanks and mahalo from hawaii
>
> <incentive>
> if anyone can help me or point me in the right direction, i MAY be inclined
> to send some macadamia nuts to the continental US
> </incentive>

--- End Message ---
--- Begin Message ---
* Thus wrote Ford, Mike               [LSS] ([EMAIL PROTECTED]):
> On 27 August 2003 04:22, Aris Santillan wrote:
> 
> > I Have
> > <p>Entry One
> > <input type=text name=name[]>
> > <input type=text name=tel[]>
> > <input type=checkbox name=check[] value=1>
> 
> The way to combat this is to use explicit subscripts in your form field names, like 
> so:
> 
>  <p>Entry One
>  <input type=text name=name[1]>
>  <input type=text name=tel[1]>
>  <input type=checkbox name=check[1] value=1>

I would also add some structure to avoid all the different
variables and makes looping much smoother on the processing script.

<input type=text name="elements[2][name]">
<input type=text name="elements[2][tel]">
<input type=checkbox name="elements[2][checked]" value="1">

Then:

foreach ($_REQUEST['elements'] as $id => $element) {
  
  if ($element['checked']) {
    // its checked
  } else {
    // not checked.. duh..
  }
}


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

--- End Message ---
--- Begin Message ---





hi

this is the piece of code

------------------------------------------------------------------------------------------------
for($s=0;$s<$num;$s++)
  {
    $result = mssql_fetch_array($query);

$result[2] = number_format($result[2], 2);


"<tr border=1>";
echo          "<td><input type=\"text\" name=\"item\" size=40 value=$result[0] 
disabled> </td>";
echo          "<td><input type=\"text\" name=\"amount\" size=7 value=$result[2] 
disabled></td>";
echo          "<td><input type=\"text\" name=\"quantity[$s]\" size=7></td>";
echo          "<td><input type=\"text\" name=\"discount[$s]\" size=7></td>";
echo          "<input type=\"hidden\" name=\"part_no[$s]\" value=\"$result[0]\">";
echo          "<input type=\"hidden\" name=\"price[$s]\" value=\"$result[2]\">";
echo          "<input type=\"hidden\" name=\"salesperson_code[$s]\" 
value=$salesperson_code>";
echo          "<input type=\"hidden\" name=\"customer_code[$s]\" 
value=$customer_code>";
echo          "<input type=\"hidden\" name=\"ship_to_code[$s]\" value=$ship_to_code>";
echo          "<input type=\"hidden\" name=\"date[$s]\" value=\"$date\">";
echo          "<input type=\"hidden\" name=\"status[$s]\" value=\"0\">";

echo          "<td><input type=\"checkbox\" name=\"check[$s]\" value=\"1\"></td>";
echo    "</tr>";

}

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

if u can e this is a dynamic forms with some hidden fields

all i want is to submit entries with check.

something like the web mail system where in you check item w/c
you want to save / delete / add to junk










-----Original Message-----
From: Curt Zirzow [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 27, 2003 2:09 PM
To: Php (E-mail)
Subject: Re: [PHP] dealing with arrays


* Thus wrote Ford, Mike               [LSS] ([EMAIL PROTECTED]):
> On 27 August 2003 04:22, Aris Santillan wrote:
> 
> > I Have
> > <p>Entry One
> > <input type=text name=name[]>
> > <input type=text name=tel[]>
> > <input type=checkbox name=check[] value=1>
> 
> The way to combat this is to use explicit subscripts in your form field names, like 
> so:
> 
>  <p>Entry One
>  <input type=text name=name[1]>
>  <input type=text name=tel[1]>
>  <input type=checkbox name=check[1] value=1>

I would also add some structure to avoid all the different
variables and makes looping much smoother on the processing script.

<input type=text name="elements[2][name]">
<input type=text name="elements[2][tel]">
<input type=checkbox name="elements[2][checked]" value="1">

Then:

foreach ($_REQUEST['elements'] as $id => $element) {
  
  if ($element['checked']) {
    // its checked
  } else {
    // not checked.. duh..
  }
}


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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

--- End Message ---
--- Begin Message ---
Hi.

I don't know why but I've had the darndest time trying to find an easy
equivalent of asp's InStr() function in PHP. I know there is
preg_match(), strpos(), and strstr(), but none of them work like I want
them to.

In fact, except for maybe preg_match(), I can't get any of them to work
right.

I want a function that will return true if the string is found, and
false if it is not found.

Like this:*

$needle = "&";
$haystack = "Belle & Sebastian";

if(FoundInString($needle, $haystack))
{
        echo "found!";
}
else
{
        echo "not found!";
}


Anyone have a function to share?


Thanks,
Chris.


* Anyone catch the Belle & Sebastian show at the Greek Theatre in LA
this past sunday?

--- End Message ---
--- Begin Message ---
Hmm... Are you sure strpos doesn't work for you? Sure worked for me when I
wanted something like that Otherwise, checkout following:
http://se2.php.net/strings

function instr($needle, $haystack,$case_sensitive=true)
{
return
(($case_sensitive?strpos($needle,$haystack):stripos($needle,$haystack))!==fa
lse);
}
try that, although, that's just from the top of my head, not tested or
anything and it's my pretty bad coding style...

also, take a look at ereg()...
-- 
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]
"Chris W. Parker" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
Hi.

I don't know why but I've had the darndest time trying to find an easy
equivalent of asp's InStr() function in PHP. I know there is
preg_match(), strpos(), and strstr(), but none of them work like I want
them to.

In fact, except for maybe preg_match(), I can't get any of them to work
right.

I want a function that will return true if the string is found, and
false if it is not found.

Like this:*

$needle = "&";
$haystack = "Belle & Sebastian";

if(FoundInString($needle, $haystack))
{
echo "found!";
}
else
{
echo "not found!";
}


Anyone have a function to share?


Thanks,
Chris.


* Anyone catch the Belle & Sebastian show at the Greek Theatre in LA
this past sunday?

--- End Message ---
--- Begin Message ---
Chris,

Ive modified your sample code to use strstr() and it works fine. maybe you've mixed 
the $haystack and $needle around ?

<?
$needle = "&";
$haystack = "Belle & Sebastian";

if(strstr($haystack, $needle))
{
        echo "found!";
}
else
{
        echo "not found!";
}
?>

> -----Original Message-----
> From: Chris W. Parker [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 28 August 2003 07:08
> To: [EMAIL PROTECTED]
> Subject: [PHP] php equivalent to asp's instr()
> 
> 
> Hi.
> 
> I don't know why but I've had the darndest time trying to find an easy
> equivalent of asp's InStr() function in PHP. I know there is
> preg_match(), strpos(), and strstr(), but none of them work 
> like I want
> them to.
> 
> In fact, except for maybe preg_match(), I can't get any of 
> them to work
> right.
> 
> I want a function that will return true if the string is found, and
> false if it is not found.
> 
> Like this:*
> 
> $needle = "&";
> $haystack = "Belle & Sebastian";
> 
> if(FoundInString($needle, $haystack))
> {
>       echo "found!";
> }
> else
> {
>       echo "not found!";
> }
> 
> 
> Anyone have a function to share?
> 
> 
> Thanks,
> Chris.
> 
> 
> * Anyone catch the Belle & Sebastian show at the Greek Theatre in LA
> this past sunday?
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


*************************************************************************************
This e-mail, including any attachments to it, may contain confidential and/or personal 
information.
If you have received this e-mail in error, you must not copy, distribute, or disclose 
it, use or take any action 
based on the information contained within it.

Please notify the sender immediately by return e-mail of the error and then delete the 
original e-mail.

The information contained within this e-mail may be solely the opinion of the sender 
and may not necessarily 
reflect the position, beliefs or opinions of Salmat on any issue.

This email has been swept for the presence of computer viruses known to Salmat's 
anti-virus systems.

For more information, visit our website at  www.salmat.com.au.
*************************************************************************************

--- End Message ---
--- Begin Message ---
On Wed, 27 Aug 2003 14:07:34 -0700, you wrote:

>I don't know why but I've had the darndest time trying to find an easy
>equivalent of asp's InStr() function in PHP. I know there is
>preg_match(), strpos(), and strstr(), but none of them work like I want
>them to.
>
>In fact, except for maybe preg_match(), I can't get any of them to work
>right.
>
>I want a function that will return true if the string is found, and
>false if it is not found.
>
>Like this:*
>
>$needle = "&";
>$haystack = "Belle & Sebastian";

Hmm. Would you confirm that this code snippet doesn't work for you?

<?
$needle = "&";
$haystack = "Belle & Sebastian";

if (strstr ($haystack, $needle))
{
    echo ("strstr() worked<br>");
}

if (strpos ($haystack, $needle))
{
    echo ("strpos() worked<br>");
}
?>

Because if it doesn't, I think there's a problem with your install.

BTW, strstr and strpos don't return TRUE if a string is found. strpos
returns an index into $haystack, strstr returns a substring of $haystack.

Maybe you're doing this?

if (strpos ($haystack, $needle) == TRUE)

which would (I would assume) fail. Though PHP plays fast and loose with
types, so it might work.

--- End Message ---
--- Begin Message ---
Hi Chris,

I've always used strstr() for this _exact_ same purpose and it's worked just
fine.  I find it much more useful as an InStr()-like function than for
actually doing anything with the string it returns.  You'll want to note
that the parameter order is $haystack before $needle.  That goes for
strpos() as well.  I noticed that in your original post, you're using a
hypothetical function FoundInString($needle,$haystack).  If you used the
same order ($needle,$haystack) when you tried strstr() or strpos(), then it
would fail because it's a bit difficult to find a haystack in a needle. =/

I _strongly_ recommend using one of these built-in functions, as they will
run much faster than any programmer-defined function.  Below I will explain
how and potential pitfalls.

Only problem I noticed is that you want the function to return an explicit
true if the string is found (and false if it is not).  Both functions will
return an explicit false if the needle is not found, but neither return an
explicit true.  Don't let that stop you from using them though.  If needle
is found, strstr() returns a string and strpos() returns an integer
(possibly 0).  An if statement will consider a string (as returned by
strstr()) as logically true, so you can use strstr() by itself inside an if
statement.  strpos() however returns the offset from the beginning of
$haystack where it found $needle.  This means that if $needle is at the
beginning of $haystack, then it will return an integer 0.  This of course is
considered false by an if statement.  However, you can use
if(strpos($haystack,$needle)!==false).  If you take a look at
http://us3.php.net/manual/en/language.operators.comparison.php, you'll see
that PHP's $a===$b and $a!==$b operators result in a true only if $a and $b
are of the same type (bool, int, etc).  Since an integer 0 is not the same
as a boolean false, strpos()!==false will not choke when it returns an
integer 0.

If you want the function to return an explicit true because you want to
assign the result to a variable, you can do this:
$foo = (strstr($haystack,$needle)!==false)
or anywhere else you plan to use it for that matter.

Documentation for strstr() and strpos()
http://us3.php.net/strstr
http://us3.php.net/strpos

--- End Message ---
--- Begin Message ---
* Thus wrote CPT John W. Holmes ([EMAIL PROTECTED]):
> From: "frederik feys" <[EMAIL PROTECTED]>
> 
> > I thought str_replace caused slow down of my mailing script, but it
> > seems to be this line of code:
> >
> > $fd =
> > implode("",file("http://www.domain.org/store/min/Mailing_template.html";)
> > );
> >
> > I first put the mailing template in $fd (only once) and then replace
> > (str_replace) elements of it to individualize HTML emails.
> > Btw i'm using php version 4.0.6.
> >
> > Are there better(faster) ways to read the contents of a file?
> 
> file_get_contents() ?
unfortantly this is only (PHP 4 >= 4.3.0).

imploading a file all the time from file simply doesn't make sense
to me, i would fread() the file directly into a string instead.

> 
> The slow down is probably because you're going through HTTP to read the
> file. Is there a reason for that? Any way you can cache the file locally so
> it's not read through HTTP all of the time?

Yep, reading through http is  the slowdown.



Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

--- End Message ---
--- Begin Message --- rush wrote:
While PHP is often considered as
template system in it self, I think it is is not very strong, or efficient
one.

Wow... where'd you pull that from?? Any facts to back that up? :)


FYI: I've got a template benchmark site running at http://sepodati.realxl.net/tpl_bench/

Any interest in looking over the code and adding a TemplateTamer benchmark to the list?

--
---John Holmes...

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

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
Àlex Camps <mailto:[EMAIL PROTECTED]>
    on Wednesday, August 27, 2003 12:04 PM said:

> i have windows xp with apache,php and argomail
> but i cant send emails from php why?

According to your subject it looks like the computer you are trying to use to send the 
email does not allow relaying.


> thaks.

Thaks? Nah, I prefer chocolate milk.


hth,
Chris.
--
3:38pm

--- End Message ---
--- Begin Message --- Hello,

On 08/27/2003 04:04 PM, ÀLex Camps wrote:
i have windows xp with apache,php and argomail
but i cant send emails from php why?

It seems you need to authenticate with the SMTP server. You can't do that with the mail() function. Try these classes in conjunction. They come with a function named smtp_mail() that you can use as replacement to the mail() function but you can also specify the user and password to authenticat with the SMTP server:


http://www.phpclasses.org/mimemessage

http://www.phpclasses.org/smtpclass

--

Regards,
Manuel Lemos

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

--- End Message ---
--- Begin Message --- [EMAIL PROTECTED] wrote:

2) this question is more directed to Justin French, but in any case, the
reason i wanted to use the PDF forms is so that i don't have to create them
again in CSS or any other format, the forms are already created and all i
need to do is figure out how to make the data that people enter into them
"submittable." but in any case, have you seen some pretty complex forms
made up of entirely CSS that i can look at? i guess this solution would be
acceptable pending some examples....


CSS does not make forms! HTML makes forms, and CSS can be used to style them.

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

--- End Message ---
--- Begin Message --- On Thursday, August 28, 2003, at 04:29 AM, [EMAIL PROTECTED] wrote:

Hi guys, gals,

first off i just wanted to thank all of you who responded to my question,
they were very helpful...but the answers bring me to several new questions:


1) has anyone seen anything like this done with the reader ver. of acrobat
and not the full version of acrobat...could you point me somewhere where
FDF is actually implemented?

I can't speak for other software, but you need one of the full versions of Acrobat to do forms. There may be a competitor to Acrobat, or one of the PHP-PDF libraries that can do it programatically, but I have no idea about that.


2) this question is more directed to Justin French, but in any case, the
reason i wanted to use the PDF forms is so that i don't have to create them
again in CSS or any other format, the forms are already created and all i
need to do is figure out how to make the data that people enter into them
"submittable." but in any case, have you seen some pretty complex forms
made up of entirely CSS that i can look at? i guess this solution would be
acceptable pending some examples....

I think you mean "forms completely styled with CSS", don't you? The answer is "yes", but it would depend on your definition of "complex".


Do a google search... there's plenty of reading to do out there :)

http://alistapart.com/stories/practicalcss/ is one place to start.


If the forms are already created in PDF, then who created them? That person must have access to the higher versions of Acrobat, therefor must be able to edit the files, specifying a target script on the web to which they will be to POSTed.



Justin French

--- End Message ---
--- Begin Message ---
Not anymore due to the Unisys LZW patent issues.. GD has no support for
GIF file anymore.
Wait until next june.. Then you can create animated GIF files with GD
(Unisys' patent expires).

On Wed, 27 Aug 2003 21:35:43 +0200, Simon Fredriksson wrote:

> Is it possible to create GIF animations using GD?
> 
> //Simon

--- End Message ---
--- Begin Message ---
Couldn't Unisys just renew/extend the patent?

> -----Original Message-----
> From: Edward Rudd [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 28 August 2003 09:49
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: Animating with GD?
> 
> 
> Not anymore due to the Unisys LZW patent issues.. GD has no 
> support for
> GIF file anymore.
> Wait until next june.. Then you can create animated GIF files with GD
> (Unisys' patent expires).
> 
> On Wed, 27 Aug 2003 21:35:43 +0200, Simon Fredriksson wrote:
> 
> > Is it possible to create GIF animations using GD?
> > 
> > //Simon
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


*************************************************************************************
This e-mail, including any attachments to it, may contain confidential and/or personal 
information.
If you have received this e-mail in error, you must not copy, distribute, or disclose 
it, use or take any action 
based on the information contained within it.

Please notify the sender immediately by return e-mail of the error and then delete the 
original e-mail.

The information contained within this e-mail may be solely the opinion of the sender 
and may not necessarily 
reflect the position, beliefs or opinions of Salmat on any issue.

This email has been swept for the presence of computer viruses known to Salmat's 
anti-virus systems.

For more information, visit our website at  www.salmat.com.au.
*************************************************************************************

--- End Message ---
--- Begin Message --- Edward Rudd wrote:

Not anymore due to the Unisys LZW patent issues.. GD has no support for
GIF file anymore.
Wait until next june.. Then you can create animated GIF files with GD
(Unisys' patent expires).


That patent already expired for the US (June 30, 2003). Canadian patent expires July 7, 2004, the counterpart patents in the United Kingdom, France, Germany and Italy expire June 18, 2004, and the Japanese counterpart patents expire June 20, 2004.

--
H| I haven't lost my mind; it's backed up on tape somewhere.
+--------------------------------------------------------------------
Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130
IT Director / SysAdmin / WebSmith . 800.441.3873 x130
Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave. #6
http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A.

--- End Message ---
--- Begin Message --- Ashley M. Kirchner wrote:

>    That patent already expired for the US (June 30, 2003).  Canadian
> patent expires July 7, 2004, the counterpart patents in the United
> Kingdom, France, Germany and Italy expire June 18, 2004, and the
> Japanese counterpart patents expire June 20, 2004.

I forgot to quote the link on Unisys' site:

http://www.unisys.com/about__unisys/lzw/

--
 H| I haven't lost my mind; it's backed up on tape somewhere.
  +--------------------------------------------------------------------
  Ashley M. Kirchner <mailto:[EMAIL PROTECTED]>   .   303.442.6410 x130
  IT Director / SysAdmin / WebSmith             .     800.441.3873 x130
  Photo Craft Laboratories, Inc.            .     3550 Arapahoe Ave. #6
  http://www.pcraft.com ..... .  .    .       Boulder, CO 80303, U.S.A.

--- End Message ---
--- Begin Message ---
Just wanted to get the consesus of the other list members... Is it SoBig
that is making the list so slow? It's taking about hour an or more for
my messages to come back to me.


Chris.

p.s. Probably a good idea to send responses off list if it's just to say
"Yeah that's happening to me too!"

--- End Message ---
--- Begin Message --- Use get instead of post. for the request method. Then please make sure that you are not sending any expires headers in your code.

all the best


Tony Pagliocco wrote:


On a website I am working on, when I go to a page
that pulls a query , then click back to choose another
option, I get an error that says "Warning: page has expired"
then I have to click back twice to get back to the drop down
menu to make a new choice of query. Is there anywhere around this?

Let me know what I can post to help in solving this problem.

Thanks





--
http://www.raditha.com/php/progress.php
A progress bar for PHP file uploads.

--- End Message ---
--- Begin Message ---
> Hi there.  Slightly OT, but it's for a PHP project...  We normally use a
> plug-in WYSIWYG editor so that our clients can manage their content in a
> word-like interface.  Normally this works fine, but this time when we've
> completed the site we've discovered they have an entire department that
> is 100% Macintosh and this editor doesn't work.  Has anyone come across
> one of these that are cross-platform?  Would really appreciate some
> advice

First, the Text Edit application that comes with Mac OS X, coupled with
iDisk, may actually be more than you need. By default, it edits RTF, but
it also edits plain text. iDisk allows you to set up an FTP connection
and edit over the network. It has the OSAX (AppleScript, et. al.)
interface, so there is a way to interface with it programmatically.

BBEdit is supposed to support editing via the web. It's an editor, not a
word processor, but the interface is WYSIWYG, only modal in terms of
switching to raw binary and such. I've used it to good purpose:

    http://www.barebones.com
    http://www.barebones.com/products/bbedit

Mind you, it's a very powerful editor. Includes some neat integration
with perl, and should be easy enough to interface with php. BareBones's
Newer, cheaper TextWrangler is also supposed to support FTP, if that
would be enough. They have a good record about working with their
customers, too.

Hydra is a cute piece, allows people to simultaneous edit the same
text document over the local network. The Coding Monkeys's page seems to
be down right now.

I have only heard mention in passing of Pepper, but it looks like it has
returned to active development:

    http://www.digitalwandering.com/ (Mac fork)
    http://www.hekkelman.com/pepper.html (cross-platform)

Alpha has been highly praised by some I count as friends. It has been
compared with Emacs, although it is not really an Emacs work-alike. But
I don't find any recent information on it, the links all stall.

Hmm. Plugged "text editor macintosh" in at google.com, and got more
information than I want to wade through. Then I went to apple.com,
clicked on the "Made4Mac" tab, and wandered onto this page:

    http://guide.apple.com/uscategories/productivity.lasso

scrolled down, selected text processing and editing utiliities, and got
quite a few hits.

HTH

-- 
Joel Rees, programmer, Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp

--- End Message ---
--- Begin Message ---
In article <OFC01C59D2.F2BFDEC6-ON0A256D8F.0007CBC2-
[EMAIL PROTECTED]>, [EMAIL PROTECTED] 
says...
> hi guys and gals, aloha from hawaii,
> 
> Not sure if this is the right place to ask, but i just need to know if it
> is technically possible to have a pdf form be filled out online and then
> once the user hits submit, php takes the data and puts it into a db or some
> sort of db technology and if the need arises to pull up that record once
> more, php fetches the data from the db and dynamically fills out the pdf
> form and presents it to the end user...can do?  or anyone know who i can
> talk to about this...
> 
> thanks and mahalo from hawaii
> 
> <incentive>
> if anyone can help me or point me in the right direction, i MAY be inclined
> to send some macadamia nuts to the continental US
> </incentive>

I think the FDF (Forms Data Format) functions may be just what you need. 

Cheers
-- 
Quod subigo farinam

$email =~ s/oz$/au/o;
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?

--- End Message ---
--- Begin Message ---
I was recently involved in installing PHP 4.3.2 on a NT 4 server with IIS 4.
We followed all of the installation instructions, but whenever we tried to
run a test script through a browser to see if PHP was installed correctly,
all the page did was load.  And load and load and load.  It never displayed
the text it was supposed to, and it never errored out.  Anybody have any
ideas?

Jeremiah Breindel
[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Hello All,

I have a very simple question:

Want to remove the string after the first whitespace like:

"here is a text what i have"
to:
"here"


Thanks !!

Andras Kende

--- End Message ---
--- Begin Message --- Andras Kende wrote:

Hello All,

I have a very simple question:

Want to remove the string after the first whitespace like:

"here is a text what i have"
to:
"here"

$word = substr($sentence,0,strpos($sentence,' '));


--
---John Holmes...

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

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
On Wed, 27 Aug 2003 21:30:25 -0700, you wrote:

>Want to remove the string after the first whitespace like:
>
>"here is a text what i have"
>to:
>"here"

I'd explode() the string into an array, and take the 0th element of the
array.

$s = 'here is a text what i have';
$a = explode (' ', $s);
echo ($a[0]);

If you want to match  /whitespace/ (tab, space, etc), replace explode() with
split() using the correct regular expression.

(Note: explode() takes a 3rd optional parameter, limit, if you want a
remainder string, too.)

--- End Message ---
--- Begin Message ---
Hello All,

I have a very simple question:

Want to remove the string after the first whitespace like:

"here is a text what i have"
to:
"here"


Thanks !!

Andras Kende

--- End Message ---
--- Begin Message ---
This code is working for me

<?php
$old="Dinesh Dinesh Dinesh Dinesh";
$new="";
for($i=0;$old[$i]!='';$i++)
{

 $new=$new.$old[$i];
 if($old[$i]==' ')
  break;
}
echo $new;
?>

-murugesan
----- Original Message ----- 
From: "Andras Kende" <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Sent: Thursday, August 28, 2003 10:03 AM
Subject: [PHP] beginner: remove the string after the first whitespace


> 
> Hello All,
> 
> I have a very simple question:
> 
> Want to remove the string after the first whitespace like:
> 
> "here is a text what i have"
> to:
> "here"
> 
> 
> Thanks !!
> 
> Andras Kende
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
I'm running PHP 4.3.3 compiled with --with-openssl against Red Hat 8.0's 
latest OpenSSL libraries (patched versions of 0.9.6) and am having some 
strange issues using fopen(), fread() and friends.  Here's my code:

function echo_test() {
  $opts = array(
            'ssl' => array(
              'allow_self_signed' => "TRUE"
                          )
               );
  $context = stream_context_create($opts);

  $handle = fopen("https://www.secureurl.org/";, "r", FALSE, $context);

  while (TRUE) {
    $data = fread($handle, 1024);
    if (strlen($data) == 0) {
      break;
    }
    $stuff .= stripslashes($data);
  }
  fclose($handle);
  return $stuff;
}

When I run this code, the content IS returned correctly and in in the 
server SSL logs I see that a request was made via SSL.  So I'm getting 
the results I want... EXCEPT for this:

Warning: fread(): SSL: fatal protocol error in /WWW/inc/ECHO.php on line 
23

Any idea what this is?  I thought not allowing self signed certs might 
be the problem since this server is using a self-signed one... but 
adding that to my options (reflected above) didn't help any.

I can very easily force the errors not to show up and mosey on since I 
am able to access the data, but I'm curious why this is happening.  Any 
ideas?  There were a few other posts on this topic, but none with any 
concrete answers or solutions...

-- 
Ray Van Dolson ([EMAIL PROTECTED])
http://www.bludgeon.org/~rayvd/

--- End Message ---
--- Begin Message --- Hello,

On 08/27/2003 06:37 AM, Moritz Steiner wrote:
Hi,
has somebody a working code example of sending a mail with attachment,
my code is unfortunately not working...

That may be a bug in the mail() function. You may want to try this other class that has work arrounds for some of the mail() function problems:


http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos

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

--- End Message ---
--- Begin Message --- Hello,

On 08/27/2003 11:34 AM, David T-G wrote:
% For the delivery, you can always tune qmail to try deliverying messages % to more recipients at the same time tweaking concurrencyremote option. % The default it 20 recipients at the same time but you can increase it to % 120 without patches.

Hmmm... That's worth a look; where do I set that?

RTFM! :-)


/var/qmail/control/concurrencyremote

--

Regards,
Manuel Lemos

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

--- End Message ---
--- Begin Message ---
hi,
how to block a user downloading a file?
eg : when  a user enter an address like 
      http://localhost/downloads/testfile.cab
i want to forward him to an other address like
     http://localhost

i'm PHP newbie thanks for help.

--- End Message ---

Reply via email to