Forums
This topic is locked
emailing form info based on client id
Posted 10 Dec 2006 03:34:04
1
has voted
10 Dec 2006 03:34:04 Dave Sharpe posted:
I am trying to create a form where the "$to = " is based on what client info is being displayed. I really do not want to have to create the same form over and over. Please help me out! Replies
Replied 12 Dec 2006 13:55:57
12 Dec 2006 13:55:57 Roddy Dairion replied:
when the client has logged in keep its user_id in a session, then when it reach to this page just create an sql query that will retrieve the clients email address from your customer info table. e.g.
<pre id=code><font face=courier size=2 id=code>
$select = mysql_query("select * from user where user_id = ".$_SESSION['user_id');
$row = mysql_fetch_array($select);
$to = $row['clientemailaddress'];
</font id=code></pre id=code>
<pre id=code><font face=courier size=2 id=code>
$select = mysql_query("select * from user where user_id = ".$_SESSION['user_id');
$row = mysql_fetch_array($select);
$to = $row['clientemailaddress'];
</font id=code></pre id=code>