FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » FORMS, validating mail was sent
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: FORMS, validating mail was sent [message #181908 is a reply to message #181907] Sat, 22 June 2013 00:36 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 6/21/2013 8:26 PM, Gordon Burditt wrote:
>>>> I'm a PHP near-newbie working fairly successfully on creating a secure
>>>> PHP e-mail (mail()) function. It occurs to me that the only way a user
>>>> knows (thinks) a form has been sent, is that I tell him so either in a
>>>> line of code or with a Thank You page.
>>>
>>> Since you're a near-newbie, please save the world from having to
>>> block email from your server, and DO NOT put any variables in email
>>> headers, DO NOT put any variables from the user in email headers,
>>> and DO NOT put any variables set in your form in email headers.
>>> Put them in the body of the mail.
>>>
>>> Wrong: From: $email
>>> Right: From: www-data(at)myserver(dot)hostingco(dot)com
>
>
>> I will agree not to put UNVALIDATED data in the Subject: line. But
>> proper validation of the data will solve this problem.
>
> And you expect a self-described "near-newbie" to get that right the
> first time? Note that I didn't call Jerry Stuckle a "near-newbie",
> because he's not.
>

No, but OTOH you're also telling him to unconditionally not do something
which is very valid. It is much better to tell him he can do it - but
must be careful on how it's done.

>> I do agree not to put user-supplied data in the To: or From: fields.
>
>



--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: strange one
Next Topic: how to change old ereg?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 13:14:27 GMT 2024

Total time taken to generate the page: 0.03132 seconds