开发者

PHP and form action on 1 line

I had just asked how to get two 2 form actions on 1 line and someone answered that, but now I want a small line of PHP to be on the same line.

Here's what I have so far:

PHP

if ($_SESSION['username'] )   
    echo "welcome, ".$_SESSION['username'];

HTML

<span style="float:right;">
    <form action='logout.php' method='POST'>           
        <input type='submit' value='Logout' />      
    </form>   
</span>
<span style="float:right;">
    <form action='changepassword.php' method='POST'>     
        <input type='submit' value='Change password' />       
    </form>            
</span>

You can view the irritation on my website: www.roundaboutmk.com.

You wi开发者_StackOverflow社区ll need to login to see the problem:

  • username: stackoverflow
  • password: test01


so you want the php echo also in a span with float right??

just place it before the two buttons

if ($_SESSION['username'] )   

    echo "<span style='float:right'>Welcome, ".$_SESSION['username']."</span>";
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜