ginerjm Posted January 19, 2014 Share Posted January 19, 2014 I"m trying to use an email to generate some input to a script of mine. I begin by using the script on my client to generate an email that contains a form with information and an input tag and a submit button. The form triggers this same script again, but with a different intended action which is to gather the input values and update my database. Here is the form from the email: <!DOCTYPE html><html> <form name='emailform' method='POST' action='http://(mydomainname)/(myscriptname)'> (general text) <div style='background-color:#c0c0c0;padding:10px 20px;width:50%;'> <label>#20 - Bottles purchased:</label> <input type='text' name='pq_qty_20' value='' size=3 pattern='[0-9]'> </div> <br> _________<br><br><br> <div style='background-color:#c0c0c0;padding:10px 20px;width:50%;'> <input type='submit' name='btn' value='Post Email Purchases'> </div> </form> </html> So - testing this on my laptop with my browser open and running this script, I generate the email. Going to my email client and grabbing the email I click on the <input tag and my browser immediately opens up a new window running the same script. Filling in the input value and then clicking the submit button opens up a third window on my browser but no other activity occurs. What should be happening is no new browser windows (hopefully) but a process to update a record in my db from the input in the email - this does not happen though. So - I have managed to generate a vaild html email which when I test using the script on my laptop seems to be working. But when using the form from my email client I get screwy and non-existent results. Anyone done this before? Quote Link to comment https://forums.phpfreaks.com/topic/285498-process-an-email-form/ Share on other sites More sharing options...
jazzman1 Posted January 19, 2014 Share Posted January 19, 2014 Maybe the e-mail client restricts you to post/submit data within a form. Did you try using JS? Quote Link to comment https://forums.phpfreaks.com/topic/285498-process-an-email-form/#findComment-1465765 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.