簡體   English   中英

需要使用提交表單在CSS中轉換HTML表

[英]Need to convert HTML table in a CSS with a Submit form

我開始使用CSS和PHP,並且嘗試將CS​​S和html中的舊代碼完全轉換為CSS。 圖形確定,看起來不錯,但是我對提交表單有問題,因為我在PHP中有一個IF語句,並且嘗試了幾種方法而沒有解決方案。

<div id="DivImg">

<div id="DivFrm">
    <form id="FrmInvioLogin" name="FrmInvioLogin" action="Index.php" method="POST" onsubmit="<? if($Loggatura->Errore == COD002) echo "return ControlloForm();" ?>"  >
        <table  cellpadding="0px" cellspacing="0px" width="80%">
            <tr>
                <td>UserName</td>
                <td><input name="FrmLogin" id="FrmLogin" type="text" size="30" maxlength="30" class="text" /></td>
            </tr>
            <tr>
                <td>Password</td>
                <td><input name="FrmPswd" id="FrmPswd" type="password" size="30" maxlength="30" class="text" /></td>
            </tr>
            <tr><td>&nbsp;</td><td>&nbsp;</td></tr>             
            <?
            # Cambio Password per errore COD002
            if($Loggatura->Errore==COD002) {
                echo "<tr>
                        <td>Nuova Password</td>
                        <td><input name=\"FrmNewPswd\" id=\"FrmNewPswd\" type=\"password\" size=\"30\" maxlength=\"30\" class=\"text\" /></td>
                    </tr>
                    <tr>
                        <td>Ripeti Password</td>
                        <td><input name=\"FrmRptPswd\" id=\"FrmRptPswd\" type=\"password\" size=\"30\" maxlength=\"30\" class=\"text\" /></td>
                    </tr>
            <tr><td>&nbsp;</td><td>&nbsp;</td></tr>                         
                    <tr><td colspan=\"2\"><span class=\"PatCar\">Inserire la password con almeno 8 caratteri. Deve essere pesente almeno un numero ed uno dei seguenti caratteri: $ % & . , ! - _ @</span></td></tr>
                    <tr><td colspan=\"2\"><span class=\"PatCar\">Non si può usare il proprio nominativo o ripetere la password precedente</span></td></tr>";
            }
            ?>

            <tr>
                <td></td>
                <td>
                    <input name="Login" id="Login" type="hidden" value="Invio" />
                    <br /><input type="image" src="Img/BtnLogin.gif" border="0" onclick="document.FrmInvioLogin.submit()" />                    </td>
            </tr>
        </table>
    </form>
</div>

我嘗試了這個:

<div class="container">
    <div class="row">
        <div class="col-sm-6 col-md-4 col-md-offset-4">
            <h1 class="text-center login-title"></h1>
            <div class="account-wall">
                <img class="profile-img" src="Img/" width="150px;" alt="">
                <form class="form-signin" action="Index_new.php" method="post" onsubmit="return ControllaForm()" >
                <input name="FrmLogin" id="FrmLogin" input type="text"  class="form-control" placeholder="UserName" required autofocus>
                <input name="FrmPswd" id="FrmPswd" input type="password" class="form-control" placeholder="Password" required>

                <button class="btn btn-lg btn-primary btn-block" id="FrmInvioLogin" name="FrmInvioLogin" input type="submit" value="Submit">
                    Login</button>

                    </form>
            </div>

        </div>
    </div>
</div> 

函數“ controllaForm已定義,並使用舊代碼可以工作。我知道沒有第二個div用於輸入新密碼,但是與此同時,我至少會看到登錄有效。這是怎么回事?

k。 固定。

<div class="container">
    <div class="row">
            <div class="col-sm-6 col-md-4 col-md-offset-4">
                <h1 class="text-center login-title"></h1>
                <div class="account-wall">

                    <form id="FrmInvioLogin" class="form-signin" name="FrmInvioLogin" action="Index_new.php" method="POST" onsubmit="<? if($Loggatura->Errore == COD002) echo "return ControlloForm();" ?>"  >
                    <img class="profile-img" src="Img/" width="150px;" alt="">

                    <input name="FrmLogin" id="FrmLogin" input type="text"  class="form-control" placeholder="UserName" required autofocus>

                    <input name="FrmPswd" id="FrmPswd" input type="password" class="form-control" placeholder="Password" required>


                <?
                # Cambio Password per errore COD002
                if($Loggatura->Errore==COD002) {?>

                        <div style='margin-bottom': 0px> <input name="FrmNewPswd" id="FrmNewPswd" input type="password" class="form-control" placeholder="Nuova Password" required autofocus>

                        <input name="FrmRptPswd" id="FrmRptPswd" input type="password" class="form-control" placeholder="Ripeti Password" required>

                        <h5 class="text-justify">Inserire la password con almeno 8 caratteri. Deve essere pesente almeno un numero ed uno dei seguenti caratteri: $ % & . , ! - _ @     </h1    >
                        <h5 class="text-justify">Non si può usare il proprio nominativo o ripetere la password precedente.</h1  >

                <?php } else { ?>

                        <?php } ?>




                <button class="btn btn-lg btn-primary btn-block" input name="Login" id="Login" name="Login" type="hidden" value="Invio" onclick="document.FrmInvioLogin.submit()" >
                        Login</button>              
                <label class="checkbox pull-left">


                    </label>
                    <a href="#" class="pull-right need-help">  </a><span class="clearfix"></span>


                    </form>
                </div>

            </div>
        </div>
    </div> 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM