This topic is locked

Login using Dropdown Box

11/4/2008 3:48:45 AM
PHPRunner General questions
S
swanside author

I am following this code here, but I can not get it to work

http://www.asprunner.com/forums/index.php?showtopic=7196


I have changed the code, as my infomation is in a login table with the field as Engineer_Name, but,
I can not find

<INPUT name=username{$value_username}>



I have

<input name=username {$username_attrs}>


Is this the same box to edit?
Thanks

Paul.

J
Jane 11/5/2008

Paul,

Is this the same box to edit?

Yes.

S
swanside author 11/5/2008

Thanks, but I can not get it to change from a text entry box to a drop down box. I will keep trying.
Thanks
Paul

T
thesofa 12/3/2008

Can you please telll me what to replace

<INPUT name=username {$username_attrs}>



with as I am now using V5 build 689, and when I do the alteration from the post here about dropdown for login I just get

{doevent name="TableName_username"}



showing on the login page where the drop box should be.

I have the following snippet with a function name of

function Tablename_username(&$params)


global $conn;

$strSQL = "select s_login from staff ORDER BY `s_lastname` ";

$rs = db_query($strSQL,$conn);

$str = "";

$str.="<select name=username>";
while ($data = db_fetch_array($rs))

$str.="<option value=".$data["p_login"].">".$data["p_login"]."</option>";
$str.="</select>";

echo $str;


What am I doing wrong now?

this new system is really foxing me, I was just starting to get the hang of the old one too.

J
Jane 12/3/2008

Hi,
you need to replace:

{doevent name="TableName_username"}



with this one:

{$event TableName_username}

T
thesofa 12/3/2008

spot on again, many thanks again Jane