2014-03-31 65 views
0

我正在嘗試向我的應用程序添加一個功能,並且它已登錄。如何組合用戶輸入以便有一個帳戶而不是兩個帳戶?將兩個輸入合併爲一個表格

這裏是應用程序:

<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"/> 
    &nbsp;&nbsp; 
    <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

你是什麼意思一個帳戶,而不是兩個? – Chitowns24

+0

從本質上講,我有一個應用程序,我有通知,消息等。我一直在抨擊的調查系統已經在數據庫中輸入用於創建「創建民意調查」,「用戶名」,「密碼」等帳戶。我會重寫輸入到我目前的應用程序。我是新來的PHP。 – user3020410

回答

0

你的問題不清楚,但是我要兩個變量組合的印象。

您可以通過連接它們來組合變量。

例如:

<?php 

$var1 = "Var 1"; 
$var2 = "Var 2"; 

$var_all = $var1 . " " .$var2; 

echo $var_all; 

迴音必瓦爾1無功2

+0

從本質上講,我有一個應用程序,我有通知,消息等。我一直在黑客攻擊的調查系統有輸入數據庫中創建一個帳戶「創建民意調查」,「用戶名」「密碼」等。我會重寫輸入到我目前的應用程序。我是新來的PHP。 – user3020410