Jump to content

2 forms, same line


Russia

Recommended Posts

I want to make 2 forms, basically images that forward to an next page to be on the same line.

 

This is the code:

<form method="post" action="index3.php" >
<input name="username" value="<?php echo $user; ?>" type="hidden"><input name="password" value="<?php echo $pass; ?>" type="hidden"><INPUT TYPE="image" SRC="img/forgotten_password.gif" style="padding: 5px; display: inline;" BORDER="0" ALT="Submit Form">

<form method="post" action="read.php" >
<input name="username" value="<?php echo $user; ?>" type="hidden"><input name="password" value="<?php echo $pass; ?>" type="hidden"><INPUT TYPE="image" SRC="img/stolen_password.gif" style="padding: 5px; display: inline;" BORDER="0" ALT="Submit Form">
</form>

 

But it forwards to index3.php on the second form. but the images are lined up next to each other.

 

 

This is the 2nd code:

<form method="post" action="index3.php" >
<input name="username" value="<?php echo $user; ?>" type="hidden"><input name="password" value="<?php echo $pass; ?>" type="hidden"><INPUT TYPE="image" SRC="img/forgotten_password.gif" style="padding: 5px; display: inline;" BORDER="0" ALT="Submit Form">
</form>
<form method="post" action="read.php" ><input name="username" value="<?php echo $user; ?>" type="hidden"><input name="password" value="<?php echo $pass; ?>" type="hidden"><INPUT TYPE="image" SRC="img/stolen_password.gif" style="padding: 5px; display: inline;" BORDER="0" ALT="Submit Form">
</form>

 

But those images are now under one another, but the second form/image forwards to read.php

 

 

So how do I do it so that the 2 images with different forms, line up next to one another?

Link to comment
Share on other sites

Wrap the forms in a div each and apply a CSS float to the left-most one:

 

<div style="float:left">
<form method="post" action="index3.php" >
<input name="username" value="<?php echo $user; ?>" type="hidden"><input name="password" value="<?php echo $pass; ?>" type="hidden"><INPUT TYPE="image" SRC="img/forgotten_password.gif" style="padding: 5px; display: inline;" BORDER="0" ALT="Submit Form">
</form>
</div>
<div>
<form method="post" action="read.php" ><input name="username" value="<?php echo $user; ?>" type="hidden"><input name="password" value="<?php echo $pass; ?>" type="hidden"><INPUT TYPE="image" SRC="img/stolen_password.gif" style="padding: 5px; display: inline;" BORDER="0" ALT="Submit Form">
</form>
</div>
<br clear="left"/>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.