![]() |
Form to sendmail dynamic email?
I have a form that I'm using that currently works well using the following sendmail.php file:
Quote:
What I'd like to be able to do is have a form on a page (with a unique id assigned to it) that will pull the user who uploaded the document to the databases registered email and, when the html form is filled out, it sends the email to them directly, without having to type their email address in the html form itself, does that make sense? So if John submitted a document that is available on documents.php?id=123 it pulls his email from the registered user database (via the array if possible) and prefills the form (with a hidden field) so all my proofer has to do is fill out the message field and hit submit. This is the current form HTML I'm using: Quote:
|
Instead of using POST through a form to insert the user's email, you'll just get it from the database instead.
Check if user is logged in. If so, get the user's email from the database and set the variable. You don't have to submit the email address (HTTP POST) using the form page, but rather verify and add the user's email address on the sendemail.php page. This will also prevent anyone who isn't logged in to the website, from sending a POST request to that link directly. If you do the email address validation part on the form page, someone can just bypass the whole form page by making a direct POST request to the sendemail.php file directly (and abuse it to send spam). Also, the code for your sendemail.php page isn't secure... at all! |
The questions are getting more and more basic.
|
Quote:
:fart # |
my post was erased LOL
|
Quote:
|
All times are GMT -7. The time now is 11:33 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc