Re: Re: Handling an email form
| From: | tamouse pontiki | Date: | Wed, 22 Jan 2014 22:37:09 +0000 |
| Subject: | Re: Re: Handling an email form | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-322733@lists.php.net to get a copy of this message | ||
On Tue, Jan 21, 2014 at 8:07 AM, Jim Giner <jim.giner@albanyhandball.com> wrote:
> On 1/21/2014 7:03 AM, tamouse pontiki wrote:
>>
>> On Sun, Jan 19, 2014 at 3:16 PM, Jim Giner <jim.giner@albanyhandball.com>
>> wrote:
>>>
>>> On 1/19/2014 11:40 AM, Jim Giner wrote:
>>>>
>>>>
>>>> I can create a valid html email containing a form and an input and
>>>> submit tag in it. With this I wish to call a script on my website and
>>>> have it take the value of the input and update a record in a mysql
>>>> table. The concept is pretty straight-forward, but I'm having no luck
>>>> with the execution.
>>>>
>>>> For one thing - my email client insists on opening a new browser window
>>>> as soon as I click on the input tag. That is probably some email
>>>> setting that I'll have to dig into. And it does it again when I click
>>>> on the submit button. But the real problem is that the script called
>>>> from this email form doesn't seem to respond. I have tested the form
>>>> right from my website and it manages to call the script correctly and I
>>>> have echoed out my progress to verify my code works, but it just doesn't
>>>> happen from the email.
>>>>
>>>> What's the trick - or can't this be done?
>>>
>>>
>>> Well - for those with an interest here is what I have found.
>>>
>>> 1 - Can't seem to 'send' that email (html) form back to my target
>>> mailbox.
>>> Nor can I forward that mailbox to a php script and receive the post data.
>>>
>>> 2 - Can however change the form's action to be a
>>> 'mailto:' which DOES
>>> capture the post data from the form and send it as a GET string in a
>>> brand
>>> new email with the 'mailto' address all setup in the new email. With
>>> that, I
>>> can then just hit 'send' and the email goes to my designated mailbox
>>> where I
>>> can then execute my script to process the parms in the body of the
>>> message
>>> and my problem is solved.
>>>
>>> So - it's not complete automated, but it's two click to create it and
>>> send
>>> it, then another on my website to process any outstanding emails in that
>>> inbox.
>>
>>
>> Does the query string length limitation matter in this case?
>>
>>>
>>>
>>> --
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
> I perhaps misled you with my reference to GET. Actually it seems to grab my
> input tag contents and create what LOOKS like the query portion of a normal
> GET URL. In this case it is just a string that looks like this:
>
> pq_qty_20=22&pq_qty_18=18&pq_qty_19=19&btn=Post+Email+Purchases
>
> So - with this my script simply breaks it down by "&" and then by "="
> to get
> my values for updating my db. In this case there are 3 sets of data to do
> updates with.
Where/how does that query-like string show up? Is it in the e-mail
message body? I guess I could just give it a go and try it...