1

我是新人,所以不要在这里对我施加压力。我正在尝试将此注册表单分成两行,但每次我尝试时它都不会发布表单两行中的所有值,只是第一行。

http://i.stack.imgur.com/TSnjl.png

<table width="990" border="0">
  <tr>
    <td width="486" height="221"><form id='register' action='<?php echo $fgmembersite->GetSelfScript(); ?>' method='post' accept-charset='UTF-8'>
      <fieldset >
        <legend>Register</legend>
        <input type='hidden' name='submitted' id='submitted' value='1'/>
        <div class='short_explanation'>* required fields</div>
        <input type='text'  class='spmhidip' name='<?php echo $fgmembersite->GetSpamTrapInputName(); ?>' />
        <div class="container"><span class='error'><?php echo $fgmembersite->GetErrorMessage(); ?></span>
          <label for='name' >Your First Name*: </label>
          <br/>
          <input type='text' name='name' id='name' value='<?php echo $fgmembersite->SafeDisplay('name') ?>' maxlength="50" />
          <br/>
          </div>
        <div class='container'>
          <label for='lastname' >Your Last Name*: </label>
          <br/>
          <input type='text' name='lastname' id='lastname' value='<?php echo $fgmembersite->SafeDisplay('lastname') ?>' maxlength="50" />
          <br/>
          <span id='register_name_errorloc' class='error'></span> </div>
        <div class='container'>
          <label for='email' >Email Address*:</label>
          <br/>
          <input type='text' name='email' id='email' value='<?php echo $fgmembersite->SafeDisplay('email') ?>' maxlength="50" />
          <br/>
          <span id='register_email_errorloc' class='error'></span> </div>
        <div class='container'>
          <label for='username' >UserName*:</label><br/>
          <input type='text' name='username' id='username' value='<?php echo $fgmembersite->SafeDisplay('username') ?>' maxlength="50" /><br/>
          <span id='register_username_errorloc' class='error'></span>
          <br/>
          <span id='register_username_errorloc' class='error'></span> </div>
        <div class='container' style='height:80px;'>
          <label for='password' >Password*:</label>
          <br/>
          <div class='pwdwidgetdiv' id='thepwddiv' ></div>
          <noscript>
            <input type='password' name='password' id='password' maxlength="50" />
            </noscript>
          <div id='register_password_errorloc' class='error' style='clear:both'></div>
          </div>
        <input type='text'  class='spmhidip' name='<?php echo $fgmembersite->GetSpamTrapInputName(); ?>2' />
        <div class="container">
          <p><span class='error'><?php echo $fgmembersite->GetErrorMessage(); ?></span>
            <label for='phonenumber' >Phone Number: </label>
            <br/>
            <input type='text' name='phonenumber' id='phonenumber' value='<?php echo $fgmembersite->SafeDisplay('phonenumber') ?>' maxlength="15" />
            <br/>
            </p>
          </div>
        <div class='container'>
          <label for='address' >Address: </label>
          <br/>
          <input type='text' name='address' id='address' value='<?php echo $fgmembersite->SafeDisplay('address') ?>' maxlength="40" />
          <br/>
          </div>
        <div class='container'>
          <label for='city' >City:</label>
          <br/>
          <input type='text' name='city' id='city'value='<?php echo $fgmembersite->SafeDisplay('city') ?>' maxlength="20">
          <br/>
          </div>
        <div class='container'>
          <label for='State' >State:</label>
          <br/>
          <input type='text' name='state' id='state' value='<?php echo $fgmembersite->SafeDisplay('state') ?>' maxlength="2" />
          </div>
        <div class='container'>
          <label for='State' >Country:</label>
          <br/>
          <input type='text' name='country' id='country' value='<?php echo $fgmembersite->SafeDisplay('country') ?>' maxlength="3" />
          <br/>
          </div>
        <div class='container' style='height:80px;'>
          <p>
            <label for='zip' >ZipCode:</label>
            <br/>
            <input type='text' name='zipcode' id='zipcode' value='<?php echo $fgmembersite->SafeDisplay('lastname') ?>' maxlength="5" />

            </p>
          <div class='container'>
            <input type='submit' name='Submit' value='Submit' />
            </div>
          <p>&nbsp;</p>
          </div>
        </fieldset>
    </form></td>
    <td width="494" valign="top"><a href="http://isagrading.com/general_news_01.php"><h2>&nbsp;</h2></a></td>
  </tr>
  <tr>
    <td colspan="2">&nbsp;</td>
  </tr>
</table>
4

1 回答 1

0

我认为错误可能在于您使用双引号和单引号的方式。

value='<?php echo $fgmembersite->SafeDisplay('username') ?>'

应该改为

value="<?php echo $fgmembersite->SafeDisplay('username') ?>"

如果你在所有情况下都这样做,你能告诉我会发生什么吗

于 2013-06-26T20:11:22.803 回答