doumo3903
doumo3903
2012-09-02 13:25

不工作后用PHP提交HTML按钮

已采纳

I cannot seem to find an answer to my question on the internet. I can't help but think it is a stupid mistake, however I have gone over my code at least 6 - 7 times and even took a break to look at it with fresh eyes. If someone could look it over for me, that would be super sweet!

<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>

The very last two submit buttons don't work. When I take away the php containing the $Profile_Location and $Profile_Referee_Password, the submit buttons work.

Sorry, what I mean by Doesn't work means that the submit button isn't responding. The page doesn't re-load, and it acts like the submit button is disabled. The submit button looks enabled, but it is like it doesn't want to "press".

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • dosin84644 dosin84644 9年前

    After 2 days of headache I have figured it out: When a submit button is outside the bounds of the height and width of any "div", it will not function like a button, but more like a picture. So as a good practice, when a button is not functioning properly, check to see if it is literally "outside" of the container you put it in.
    This error doesn't present itself in viewing the source page, or in any error checking. However, if it does, I don't know about it. I am using a Mac, Safari 6, and CS5 Dreamweaver, if anyone is interested.

    点赞 评论 复制链接分享

相关推荐