Help - Search - Member List - Calendar
Full Version: Help passing form data with php/javascript
WorkTheWeb Forums > Web Hosting Help > PHP Help
Support our Sponsors!
noe0729
I have a guestbook script that allows visitors to send e-mails to the folks that sign my guestbook. In order to protect their e-mail address I wrote a script that uses a javascript submited form to pass the hidden e-mail field to another web form where the user can send an e-mail without ever seeing the actual e-mail address. The problem I am having is that when submited I cannot gather the hidden form fields using $_POST method. I relize I can just encrypt the e-mail address and put it in the url and grab it via $_GET but I would rather just pass it in a hidden form. The script is rather long but if anyone needs to see it just let me know and I will post it.

Any thoughts/ideas?

-Dustin W Noe
phpfreak
QUOTE(noe0729 @ Feb 28 2005, 10:13 AM)
I have a guestbook script that allows visitors to send e-mails to the folks that sign my guestbook.  In order to protect their e-mail address I wrote a script that uses a javascript submited form to pass the hidden e-mail field to another web form where the user can send an e-mail without ever seeing the actual e-mail address.  The problem I am having is that when submited I cannot gather the hidden form fields using $_POST method.  I relize I can just encrypt the e-mail address and put it in the url and grab it via $_GET but I would rather just pass it in a hidden form.  The script is rather long but if anyone needs to see it just let me know and I will post it.

Any thoughts/ideas?

-Dustin W Noe
*




I think you're on the right track with the hidden information. I would never put an email address anywhere in the HTML code on the website.

You'll need to figure out some way to put a form element (maybe from a select menu) to pass to the next script. That form element must have a way to identify who to send the email through. You can use ID numbers, names, or whatever, but the code that processes the actual Email should do the lookup and send the mail to the right person.

If you look at http://www.Work the web.com/contact.php you'll see that our email addresses are not found, which is a secure thing!

Sincerely,
noe0729
I just had a "Duh!" moment. Your reply made me relize I already knew the answer. Thanks!

-Dustin
phpfreak
QUOTE(noe0729 @ Feb 28 2005, 01:54 PM)
I just had a "Duh!" moment.  Your reply made me relize I already knew the answer.  Thanks!

-Dustin
*



smile.gif Sometimes all that you need is a nice kick in the rear and the answers start coming in!
noe0729
Got the script running like I wanted other than a few other visual things. Thanks again for the "nice kick in the rear."

PHP Help | Linux Help | Web Hosting | Reseller Hosting | SSL Hosting
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2006 Invision Power Services, Inc.