|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
without typing other user's e-mail to send
I am wondering that a user registered from my site. He has username, password, and e-mail. Once he logs in mysite, he will see other e-mails. Whatever he clicks other user's e-mails, he can write messages for them. After that, his message sends to other user who choose.
In other words, like sitepoint.com, If I want to send some messages to other user, I will be able to send without typing other's e-mail. How can I do it? Could you give me a clue for it? Thanks
__________________
no |
|
#3
|
|||
|
|||
|
no that one what I am saying is that when a user logs in and there are many users then if he has a quation, he can write message indiviualy. Then he just writes his questions to the another user.
In that case, he doesn't have to type his e-mail, set it up and show it on the screen. After one logs in, whatever one clicks, it goes his e-mail. Do you understand it? I did script but not working. Could you take a look at it? PHP Code:
here is link to this form PHP Code:
|
|
#4
|
|||
|
|||
|
Does anybody help me with this script?
Some clue or advices! Thanks |
|
#5
|
|||
|
|||
|
I hope this will clarify your question... if not please accept my appologies.
Do you mean to say: 1) If a user (somebody) opens the send e-mail form ... you want that person's e-mail address to automatically appear in the "From:" box .... PHP Code:
2) If a user (somebody) opens the send e-mail form ... you want all the other users (others.x) to be listed in a drop-down box . PHP Code:
In either case you are going to need cookies to identify the users (somebody and others.n) and thier e-mails will have to be in a database. Is this at least what you were searching for? Alex |
|
#6
|
|||
|
|||
|
Thanks but no that one.
what I am saying is that Let's say this site.-->devshed.com when you log in, you see e-mail icon right. Here it is. <img src="http://forums.devshed.com/images/email.gif"> Let's say I would like to send question to Mike by e-mail so that I click e-mail icon. Then when I write a message, it goes to his e-mail. Do you get it?? if you don't get it, click here http://forums.devshed.com/member.ph...rm&userid=12380 That's what I am trying to do. Thanks |
|
#7
|
|||
|
|||
|
The link you posted simply opens a form which contains some hidden fields and some input fields. One of those hidden fields is the userID from the querystring. This userID, along with your message, username,userID or email address are passed along to a script to handle the contents of the form.
I'm just guessing here but, since it's passing the userID, it's pretty safe to assume that the script that handles the form is querying a database to get the email address associated with the userID. The script probably then uses that email address, the subject and message you've entered and your email address to create and send an email. You're just passing information to the script in the $_POST variables. The script does the rest. To try and recreate what this form does, you'll need a database that stores the unique userID and associated email address. You'll also need a way to track who is sending the message (cookies or sessions) and query that user's email address from the database as well. You'll need a form for entering the subject and message and it will need to have a hidden field to store the userID to whom you are sending email. Then you'd need a script to handle the form after you've typed your message. This form would query the db to get the relevant info (email addresses,etc) and then it would use the mail() function to send the email. Basically, the links and form just set up the info that's needed for the final script to create an email to the appropriate user based on the userid passed in the querystring of the link you clicked to send the message. Does that make sense? |
|
#8
|
|||
|
|||
|
could you explain with scritp?
So that I will be able to understand it. Thank you for your time. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > PHP Development > without typing other user's e-mail to send |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|