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

Home » Imported messages » comp.lang.php » Trouble with sending e-mail from simple php script
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Trouble with sending e-mail from simple php script [message #176547 is a reply to message #176528] Mon, 09 January 2012 13:39 Go to previous messageGo to previous message
C is currently offline  C
Messages: 24
Registered: January 2012
Karma:
Junior Member
On Jan 9, 3:46 am, Jeff North <jnort...@yahoo.com.au> wrote:
> On Sun, 8 Jan 2012 10:57:23 -0800 (PST), in comp.lang.php C
> <wrong.addres...@gmail.com>
> <c18fd10b-1e24-4282-9dad-609366911...@o9g2000yqa.googlegroups.com>
> wrote:
>
> [snip]
>
>> | > Apart from the other posters - you are not getting, validating nor
>> | > sanitising the input data.
>> | >
>> | > >| <?php
>> | > >| $date = date("F jS Y, h:iA");
>> | >
>> | > $name = $_POST['name'];
>> | > $orgn = $_POST['orgn'] etc etc
>> | > //-- now validate and sanitise the data
>> | >
>> | > // then - if all is well, send out the email
>> |
>> | I added four lines for those four variables.
>> | What does this really do? I already have those values in the
>> | variables. Why do we have to do this?
>
-> If you are using just $name == '' then how is the value set from
the
-> user's input? To do this you need to get the users input, place it
-> into your variables, validate and sanitise your data.
->
-> Your form uses the  method='POST' therefore the data will be sent
to
-> the php file in the $_POST array.
>
> [snip 2 end]

It works on two other sites in that way. I did not even know about the
$_POST array until recently.

The contact page is in contact.php, and the action is send_msg.php.
This send_msg.php seems to know the values of Method=Post variables.

I have INPUT TYPE = "text" NAME = "name", etc. and send_msg.php should
know the values of $name, $locn, etc.
[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
Read Message
Read Message
Read Message
Read Message
Previous Topic: scoping inside a block
Next Topic: Best PHP Training | PHP Development Training | PHP Training Institute
Goto Forum:
  

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

Current Time: Mon Nov 25 03:06:47 GMT 2024

Total time taken to generate the page: 0.04557 seconds