Hey guys,
I need help with following issue: I have a db where userinfos are stored. The script connects to this db in order to check whether the user is logged in. Then I have a from where people enter s.th to be stored in another db. The form transports the username as a hidden field. That's all fine, but once I want to store more info in hidden fields I somehow can't get that.Here is the code:
Later I want to get these results and use them in a hidden field like that:
The username is fine, but nor the email.
I need help with following issue: I have a db where userinfos are stored. The script connects to this db in order to check whether the user is logged in. Then I have a from where people enter s.th to be stored in another db. The form transports the username as a hidden field. That's all fine, but once I want to store more info in hidden fields I somehow can't get that.Here is the code:
Code:
<? include_once ("auth.php"); include_once ("authconfig.php"); include_once ("check.php"); $username = $check["uname"]; $result = mysql_query("SELECT email, phone, mobile FROM signup WHERE uname= '[$username]'") or die("SELECT error: ".mysql_error()); // catch any error $row = mysql_fetch_array($result); $email = $row["email"]; ?>
Code:
<input type="hidden" name="username" value="<? print $username ?>"> <input type="hidden" name="email" value="<? print $email ?>">
Comment