PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 27th, 2003, 03:46 PM
itohideo itohideo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: New york
Posts: 56 itohideo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to itohideo Send a message via Yahoo to itohideo
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

Reply With Quote
  #2  
Old January 27th, 2003, 04:47 PM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,840 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Days 36 m 16 sec
Reputation Power: 89
Send a message via ICQ to Onslaught
A: mail()
B: for the link use mailto:someaddress@somedomain.com

Reply With Quote
  #3  
Old January 27th, 2003, 06:10 PM
itohideo itohideo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: New york
Posts: 56 itohideo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to itohideo Send a message via Yahoo to itohideo
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:
<?php

$con
=mysql_connect("localhost","***","***") or die("can not find any database");

$db=mysql_select_db("***",$con) or die("can not find any database");


$name=$_POST["name"];
$email=$_POST["email"];
$mailsubject=$_POST["mailsubject"];
$msg=$_POST["msg"];
$msg stripslashes($msg);
$msg htmlspecialchars($msg);
$msg nl2br($msg);




$sql="select mail from kk where username='$username'";

$result=mysql_query($sql);




if(
strlen($name) && strlen($email) && strlen($mailsubject) && strlen($msg)){

$mail mysql_result($result,0,"mail");
$subject="This is message from $username ";

$ito="Sender Name:\t\t$name\n<br>";
$ito.="Sender E-mail:\t\t$email\n<br>";
$ito.="Sender Tel:\t\t$mailsubject\n<br>";
$ito.="Sender kuni:\t\t$msg\n<br>";


mail($mail,$subject,$ito);



print(
"Thank you very much for sending message to $username.");

}


else{


print(
"Missing something. Please fill out eveything");


}





}


?>


<html>
<body>
<form action="<?php $_SERVER['PHP_SELF'?>" method="post">
<table border=0 cellpadding=3 cellspacing=3>
<tr>
<td>Your Name</td><td><input type=text size=30 name=name></td>
</tr>
<tr>
<td>Your E-mail</td><td><input type=text size=30 name=email></td>
</tr>
<tr>
<td>E-mail Subject</td><td><input type=text size=30 name=mailsubject></td>
</tr>
<tr>
<td>Your message</td><td><textarea rows=3 cols=40 name=msg></textarea></td>
</tr>
</table>
</body>
</html>


here is link to this form

PHP Code:
<a href="mail.php?username='username'"

Reply With Quote
  #4  
Old January 27th, 2003, 09:07 PM
itohideo itohideo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: New york
Posts: 56 itohideo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to itohideo Send a message via Yahoo to itohideo
Does anybody help me with this script?

Some clue or advices!

Thanks

Reply With Quote
  #5  
Old January 28th, 2003, 12:03 AM
AlexNinjaFighte AlexNinjaFighte is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2001
Location: Pittsburgh PA USA
Posts: 105 AlexNinjaFighte User rank is Corporal (100 - 500 Reputation Level)AlexNinjaFighte User rank is Corporal (100 - 500 Reputation Level)AlexNinjaFighte User rank is Corporal (100 - 500 Reputation Level)AlexNinjaFighte User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 16 h 30 m 20 sec
Reputation Power: 9
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:
 FromSomebody <input type=text size=30 name=name value="somebody@somebody.com"
OR ......
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:
 To: <select name=send_to size=1>
<
option>others.1</option>
<
option>others.n</option
</select

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

Reply With Quote
  #6  
Old January 28th, 2003, 12:19 AM
itohideo itohideo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: New york
Posts: 56 itohideo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to itohideo Send a message via Yahoo to itohideo
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

Reply With Quote
  #7  
Old January 28th, 2003, 03:33 AM
micros_bytes micros_bytes is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2002
Posts: 790 micros_bytes User rank is Corporal (100 - 500 Reputation Level)micros_bytes User rank is Corporal (100 - 500 Reputation Level)micros_bytes User rank is Corporal (100 - 500 Reputation Level)micros_bytes User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 10 h 29 m 56 sec
Reputation Power: 10
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?

Reply With Quote
  #8  
Old January 28th, 2003, 02:32 PM
itohideo itohideo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: New york
Posts: 56 itohideo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to itohideo Send a message via Yahoo to itohideo
could you explain with scritp?

So that I will be able to understand it.

Thank you for your time.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > without typing other user's e-mail to send


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT