| View previous topic :: View next topic |
| Author |
Message |
Colocation Site Admin

Joined: Jan 07, 2004 Posts: 412
|
Posted: Fri Jul 22, 2005 10:00 am Post subject: Populate Add Link With Username |
|
|
Regarding the add link function code from /modules/Web_links/index.php
What edits can be made to populate this form with the username that is currenty logged in.
The anonaddlinklock is active so a user must be logged in to even get to that page and add a link, though we need this tied in to the actual username rather than offer the user to add a name and e-mail address.
For some reason the code could not be added into
|
|
| Back to top |
|
 |
flann Newbie

Joined: Jul 13, 2005 Posts: 35
|
Posted: Mon Aug 01, 2005 1:03 pm Post subject: |
|
|
I'm more familiar with asp.net, in fact I've never used php. If it is logic you are looking for, perhaps I can help. If you pass the user name from page to page using a cookie, then when that add link page loads, grab that username from the cookie.
If you check the username against the database, then you can populate the field that way. I look at .php to see how it could be done. |
|
| Back to top |
|
 |
flann Newbie

Joined: Jul 13, 2005 Posts: 35
|
Posted: Mon Aug 01, 2005 1:07 pm Post subject: |
|
|
maybe this would work
'<input type='text' name='<?php variableThatHoldUserName; ?>' /> |
|
| Back to top |
|
 |
|