我正在尝试向我的应用程序添加一项功能,并且它已登录。如何组合用户输入以便有一个帐户而不是两个?
以下是申请表:
<input type="text" class="login_txt" name="user_name" id="login_userName" title="Username" value="<?php echo $_GET['user_name'];?>" tabindex="1"/>
<span class="hide"></span> </li>
<li>
<?php if ($_GET['email']) { ?><input type="hidden" id="userEmail" /><?php } ?>
<input type="text" class="login_txt" id="login_account" title="Account (email)" name="email" value="<?php echo $_GET['email']; ?>" tabindex="2" />
<span class="hide"></span> </li>
<li>
<input type="text" class="login_txt" id="login_password_txt" tabindex="3" title="Password" value="Password"/>
<input type="password" name="password" title="Password" id="login_password" class="login_txt tny-hide">
<span class="hide"></span> </li>
<li<?php if ($this->fromuid || $this->icode || (get_setting('register_seccode') == 'N')) { ?> style="display:none;"<?php } ?>>
<input type="text" class="login_txt auth_code" id="authCode" name="seccode_verify" title="Verification code" value="Verification code" tabindex="4" />
<em class="auth_img"><img src="" onclick="this.src = GET_BASE_URL + '/account/captcha/rnd-' + Math.floor(Math.random() * 10000);" id="seccode" /></em> <span class="hide"></span> </li>
<li id="global_err" class="tny-hide">
<p class="global-err tny-small tny-err_bg"><em class="e"></em><span id="glo_Err">Account number or password is incorrect, please try again</span></p>
</li>
<li class="user_treaty">
<input type="checkbox" name="agreement_chk" value="agree" id="user_agreement" checked="true"/>
<label for="user_agreement">I agree <a href="javascript:;" onClick="$.register.s.EveClick();">User agreement</a> terms</label>
<div class="usertt reg_treaty_bg rel tny-hide" id="user_agre"><span class="reg_arrows abs tny-small"></span><div class="txt" id="register_agreement">Loading......</div></div>
</li>
<li><a href="javascript:;" class="login_sub tny-cl_06 tny-fb_14 tny-right" title="Register now" tabindex="5" onClick="$.register.reg.register().callback(function () { aj
Here's the polling system:
<?php if (!empty($this->config["logo"])): ?>
<a href="<?php echo $this->config["url"] ?>"><img src="<?php echo $this->config["url"] ?>/static/<?php echo $this->config["logo"] ?>" alt="<?php echo $this->config["title"] ?>"></a>
<?php else: ?>
<h3><a href="<?php echo $this->config["url"] ?>"><?php echo $this->config["title"] ?></a></h3>
<?php endif ?>
</div>
<?php echo Main::message() ?>
<form role="form" class="live_form form" id="login_form" method="post" action="<?php echo Main::href("index.php?a=user/login","user/login")?>">
<div class="form-group">
<label for="email"><?php echo e("Email address")?>
<?php if($this->config["users"]): ?>
<a href="<?php echo Main::href("index.php?a=user/register","user/register")?>" class="pull-right">(<?php echo e("Create account")?>)</a>
<?php endif ?>
</label>
<input type="email" class="form-control" id="email" placeholder="Enter email" name="email">
</div>
<div class="form-group">
<label for="pass"><?php echo e("Password")?> <a href="#forgot" class="pull-right" id="forgot-password">(<?php echo e("Forgot Password")?>)</a></label>
<input type="password" class="form-control" id="pass" placeholder="Password" name="password">
</div>
<div class="form-group">
<label>
<input type="checkbox" name="rememberme" value="1" data-class="blue">
<span class="check-box"><?php echo e("Remember me")?></span>
</label>
</div>
<?php echo Main::csrf_token(TRUE) ?>
<button type="submit" class="btn btn-primary"><?php echo e("Login")?></button>
</form>
<form role="form" class="live_form" id="forgot_form" method="post" action="<?php echo Main::href("index.php?a=user/forgot","user/forgot")?>">
<div class="form-group">
<label for="email1"><?php echo e("Email address")?></label>
<input type="email" class="form-control" id="email1" placeholder="Enter email" name="email">
</div>
<?php echo Main::csrf_token(TRUE) ?>
<button type="submit" class="btn btn-primary"><?php echo e("Reset Password")?></button>
<a href="<?php echo Main::href("user/login") ?>" class="pull-right">(<?php echo e("Back to login")?>)</a>
</form>
</div>
答案 0 :(得分:0)
你的问题不清楚,然而我的印象是你希望合并两个变量。
您可以通过连接变量来组合变量。
例如:
<?php
$var1 = "Var 1";
$var2 = "Var 2";
$var_all = $var1 . " " .$var2;
echo $var_all;
将回显 Var 1 Var 2