Re: Re: Handling an email form

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To each their own.  For me this is exactly what is needed.
On 1/20/2014 9:22 AM, Stuart Dallas wrote:
On 20 Jan 2014, at 14:10, Jim Giner <jim.giner@xxxxxxxxxxxxxxxxxx> wrote:

On 1/19/2014 5:11 PM, Stuart Dallas wrote:
On 19 Jan 2014, at 21:16, Jim Giner <jim.giner@xxxxxxxxxxxxxxxxxx> 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.
What do you have against hosting the form on a website? It seems to me that you're attempting to get a hammer to screw in a screw. You'll be able to do it in some fashion or other, but it's going to be messy and potentially unstable.

-Stuart

The whole process is that I use my website to host and maintain an inventory of wines.  At shopping time I generate an email of those bottles I want to purchase.  At the store I use that list on my phone to gather my purchases.  Prior to this I then went back to my site and sorted thru my bottles and updated the inventory - one by one.  With this idea my shopping list has the inputs built in to it and I can complete the update process very quickly as I complete my shopping trip.  Of course since I can't actually handle the form I have to use an email but it's still easier than the old method.
I think I would put the whole thing on a web page and take email out of the equation. Seems to me that would simplify the whole thing. Either that or look into the multitude of apps out there that facilitate list management.

-Stuart




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





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux