【问题标题】:html submit button with php after not workinghtml在不工作后用php提交按钮
【发布时间】:2012-08-27 12:13:09
【问题描述】:

我似乎无法在互联网上找到我的问题的答案。我不禁认为这是一个愚蠢的错误,但是我已经检查了我的代码至少 6 到 7 次,甚至休息一下用新的眼光看它。如果有人能帮我看一下,那就太好了!

<div id="input_alignment" style="font-size:20px">

<?php 

if(!($Valid_Profile == true)){ ?>
    ...Form that has no issues
<?php }
else{ ?>

    <form action="Redact_Profiles.php" style="font-size:19px" method="post">
    <input type="hidden" value="<?php echo $Valid_Profile ?>" name="Valid_Profile" />
    <input type="hidden" value="<?php echo $Username ?>" name="Username" />
    <input type="hidden" value="<?php echo $Password ?>" name="Password" />

    <br />
    &emsp;&emsp; <?php echo $Profile_Username . "<br>"; ?>
    <input type="submit" style="font-size:9px" value="Edit" name="" />&ensp;<?php echo $Profile_Password . "<br>"; ?>
    <br />
    <br />
    ......<br />
    <input type="submit" style="font-size:9px" value="Edit" name="" />&ensp;<?php echo $Profile_First_Name . "<br>"; ?>
    <input type="submit" style="font-size:9px" value="Edit" name="" />&ensp;<?php echo $Profile_Last_Name . "<br>"; ?>
    &emsp;&emsp; <?php echo $Profile_EMail . "<br>"; ?>
    <br />
    <input type="submit" style="font-size:9px" value="Edit" name="" />&ensp;<?php echo $Profile_Location . "<br>"; ?>
    <input type="submit" style="font-size:9px" value="Edit" name="" />&ensp;<?php echo $Profile_Referee_Password . "<br>"; ?>
    <input type="submit" style="font-size:9px" value="Edit" name="" />
    </form>
<?php }

?>
</div>

最后两个提交按钮不起作用。当我删除包含$Profile_Location$Profile_Referee_Password 的php 时,提交按钮起作用。

抱歉,我所说的不起作用意味着提交按钮没有响应。该页面不会重新加载,并且就像提交按钮被禁用一样。提交按钮看起来已启用,但就像它不想“按下”一样。

【问题讨论】:

  • 当您查看应该回显$Profile_Location$Profile_Referee_Password 的源时会显示什么?您可能会遇到破坏标记的错误。
  • 开启错误报告。
  • 它看起来像我的代码,除了 php 值被它们所代表的值替换......如果这有意义的话。

标签: php html button submit


【解决方案1】:

经过 2 天的头疼后,我想通了:当提交按钮超出任何“div”的高度和宽度的范围时,它不会像按钮一样起作用,而更像是一张图片。因此,作为一种良好做法,当按钮无法正常工作时,请检查它是否确实位于您放入的容器的“外部”。
此错误不会出现在查看源页面或任何错误检查中。但是,如果是这样,我不知道。我正在使用 Mac、Safari 6 和 CS5 Dreamweaver,如果有人感兴趣的话。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-15
    相关资源
    最近更新 更多