[thelist] form that sends to emailing list stores in MySQLtablenot working

bruce bedouglas at earthlink.net
Mon Nov 14 09:28:45 CST 2005


w/r to the $_POST vs the $_REQUEST. it depends on where/how the query vars
are coming from. are you sure that the vars are coming from a form using the
'post' action? if not, it's better to use the $_REQUEST. however, i would
argue that to be more complete, the app should validate/check to ensure that
the query vars are coming from the method that you're assuming they're
coming from.


-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org]On Behalf Of Kirill
Sent: Monday, November 14, 2005 12:59 AM
To: thelist at lists.evolt.org
Subject: Re: [thelist] form that sends to emailing list stores in
MySQLtablenot working

Hi Bruce,

First of all, to my mind,
I've found some errors in php:

Check this line please,
probably you missed quotes near (value="<?=$message ?>)

>>> <td><textarea name="message" id="message" value="<?=$message ?>
>>> cols="" rows=""></textarea>

Also, to my mind,

It is better to use this code:

$subject = $_POST['subject'];
$message = $_POST['message'];

instead of:

>>> $subject = $_REQUEST['subject'];
>>> $message = $_REQUEST['message'];

Multiple extra headers should be separated with a CRLF (\r\n).

Try change "\n" with "\r\n" in the lines below:

>>> $sender = "Bruce Gilbert <webguync at gmail.com>\n"; $reply_to =
>>> "<webguync at gmail.com>\n"; $return_path = "webguync at gmail.com\n";
>>> $x_sender = "<webguync at gmail.com>\n";



in the paragraph below:

>>> $message .= "\n\n This is a double opt-in mailing list. All
>>> recipients have confirmed their subscription. If you no longer wish
>>> to receive these emails, please go to
om \n";

Try change in headers "\n" with "\r\n":

>>>      $headers .= "X-Mailer: PHP4\n";
>>>      $headers .= "X-Priority: 3\n";
>>>      $headers .= "Mime-Version:1.0\n Content-Type: text/plain;
>>> charset=\"iso-8859-1\nContent-Transfer-Encoding: 8bit\n";

You'll get some kind of this:

$headers .= "X-Mailer: PHP4" . "\r\n";
$headers .= "X-Priority: 3" . "\r\n";
$headers .= "Mime-Version: 1.0" ."\r\n"; $headers .= "Content-Type:
text/plain; charset=iso-8859-1". "\r\n"; $headers .=
"Content-Transfer-Encoding: 8bit". "\r\n";

this helps.

Best regards,

Kirill Voronin

web-developer, e3internet Ltd,
HYPERLINK "mailto:k.voronin at e3internet.com"k.voronin at e3internet.com
icq: 284462197

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.0/167 - Release Date: 11/11/2005


* * Please support the community that supports you.  * *

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !

More information about the thelist mailing list