Jump to content

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/285498-process-an-email-form/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.