This topic is locked

Email to an other user

7/23/2008 11:37:01 AM
PHPRunner General questions
T
tiburti author

Hi all,

I have searched the whole forum but could not find the same problem.

Here it is;

A user(user1) adds an item in the website, an other user(user2) views the item and wants to send an email related to the item.

The email addresses will be retrieved from the users table(users.email) for both sender and receiver. Also there must be a text field for the mesage. I do not want that the sender sees the receiver's email address.

How can I solve that?

Thanks in advance

tiburti

T
tiburti author 7/24/2008

Hi all,

I think that I can get the user2's email from here;
global $conn;

$rs = db_query("select * from login where username='".$_SESSION["UserID"]."'", $conn);

$data = db_fetch_array($rs);

$_SESSION["userEmail"] = $data["Email"];
but how can I get the user1's email address?

I need help...

Thanks

T
tiburti author 7/24/2008

Hi all,

is this that difficult?

Nobody helped me, at least show me the way.

Thanks

J
Jane 7/25/2008

Hi,
I suppose user1 email address is stored in the item record.

In this case you can select user1 email address in the View page: Before display event:

$_SESSION["userEmail1"] = $values["EmailField"];



where EmailField is your actual field names where address is stored.