|
|
|
Enhancing the contact form |
|
|
|
Written by Peter Koch
|
|
Tuesday, 19 October 2004 |
|
With two lines of embedded code you can enhance your contact form, so it prefills the name and email for registred users:
The record of the current visitor is stored in the global variable $my. Enter this code into the value field of the name: <?php global $my; return $my->name; ?>
And this code into the value field of the email: <?php global $my; return $my->email; ?>
For unregistred guest both entryfields will still be empty, but for logged in members the fields are now preset.
If you want to know more about $my, use phpMyAdmin and have a look into the table mos_users
Comments
boesh
2004-12-03 11:36:18
Guest
2005-01-14 15:32:44
Guest
2005-02-17 15:06:00
Guest
2005-03-31 08:32:43
Guest
2005-06-02 18:20:02
babubo
2005-08-24 05:32:09
Partic
2006-05-20 03:23:37
Partic
2005-09-30 11:27:50
Partic
2005-09-30 11:28:15
Partic
2005-10-01 01:39:05
jpdiamond
2006-03-17 12:33:09
johnhansen
2006-05-26 10:05:40
SirBerberitz
2006-06-01 10:23:52
japasco
2006-10-03 13:20:10
japasco
2006-10-03 13:22:50
japasco
2006-10-03 13:25:46
verblakt
2006-11-26 15:37:00
partic
2006-12-02 06:16:41
cyrulution
2006-12-13 00:58:12
jflowers
2007-02-21 10:51:27
jflowers
2007-02-21 11:03:22
valhario
2007-05-01 04:47:17
toltec
2007-11-01 15:41:28
Only registered users can write comments. Please login or register. |
|
|