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
https://forums.phpfreaks.com/topic/175617-2-forms-same-line/
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
https://forums.phpfreaks.com/topic/175617-2-forms-same-line/#findComment-925553
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.