Contact Form

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
minds_gifts
Forum Commoner
Posts: 63
Joined: Mon Feb 10, 2003 4:23 am

Contact Form

Post by minds_gifts »

Hello,

I display the list of all persons from a table.Theres a possiblity to contact this person on clicking the link "Contact the person"
When the user clicks on this, I open a page where the user can enter his name, e-mail and some text.So far so good....

Now, When the user submits this information, I want to send an automatic e-mail to the user submitted like:

Hello (the NAME which he submitted),

You have contaced this person with ID.If this is true, click on the following link to activate.

I want to do this activation purpose in-order to avoid spam.

Now, the user e-mail or account has been validated and the admin or the mod can send him the details of the person who he would like to contact.

So, how should i do this one, what are the details i should store in the table, how shld it look like??

Can somebody give me some hints in-order to get this done.

Thanks in advance

Ps: So far, I'm upto here-after the user has submitted the form, i show the user this message...
Hello (the name) and informing the user that an e-mail has been sent in-order to activate his e-mail.
SBukoski
Forum Contributor
Posts: 128
Joined: Wed May 21, 2003 10:39 pm
Location: Worcester, MA

Post by SBukoski »

Is contacting another person going to be done frequently? If so, it could be very annoying to have to confirm that you want to contact a person each time you try it.

However, I've done something very similar to this for registrations. What happens is they register and all the info is stored in a table with a status of 0 (which I've defined as non-verified). The user gets an e-mail asking them to confirm their registration by clicking on a link. This link will bring them to a page and essentially confirm that their registration has completed successfully, and sets the status to 1 (verified and active).

Now, I usually handle this by storing a verification key in the table with this record. I keep it simple and this key is usually an MD5 of their username or some such field taht is unique.

When they click the link it finds the verification ID in the table and activates the user. Fairly simple. nothing too complex, and it serves the purpose.
minds_gifts
Forum Commoner
Posts: 63
Joined: Mon Feb 10, 2003 4:23 am

Post by minds_gifts »

SBukoski,

Contacting other persons aint a frequent one.yeah, the application which you did is almost similart to mine.Could you please show me up your code or could you help me how to proceed further.

Thanks in advance
Post Reply