I am struggling with aligning the accept/decline buttons on my website. The cancel button is being pushed too far to the right because of the float: right; command I used, and I can't figure out how to properly align it.
<?php
echo'
<html>
<head>
<style>
p
{
border: 1px solid black;
width: 22%;
text-align: left
}
label
{
display: inline-block;
float: left;
clear: left;
width: 300px;
text-align: left;
padding: 5px;
}
input
{
display: inline-block;
float: right;
}
left
{
float: left;
padding: 5px;
}
</style>
</head>
</html>';
$conn = mysqli_connect('localhost', 'root', 'admin', 'Users');
MYSQLI_SET_CHARSET($conn, "UTF8");
echo '
<FORM ACTION = "Script.php" METHOD = "POST">
<div>
<p>
<label>Username: <input type = "TEXT" name = "ID"> </label>
<br>
<label>Name: <input type = "TEXT" name = "name"></label>
<br>
<label>Surname: <input type = "TEXT" name = "surname"> </label>
<br>
<label>Address <input type = "TEXT" name = "address"></label>
<br>
<left><input type = "submit" value = "Accept"></left>
<input type = "submit" value = "Cancel">
<br>
<br>
<br>
<br>
<br>
</p>
</div>
</form>';
if(ISSET($_POST["ID"]) && ISSET($_POST["name"]) && ISSET($_POST["surname"]) && ISSET($_POST["address"]))
{
$ID = mysql_real_escape_string ($conn, $_post["ID"]);
$ime = mysql_real_escape_string ($conn, $_post["name"]);
$priimek = mysql_real_escape_string ($conn, $_post["surname"]);
$naslov = mysql_real_escape_string ($conn, $_post["address"]);
MYSQLI_query ($conn, "insert into place ( ID, name, surname, address)
VALUES (".$id." , ".$name." '.' ".$surname." , ".$address.")");
if(MYSQLI_AFFECTED_rows($conn) ==0)
ECHO "Information not added! ";
else
ECHO "Information successfully added! ";
}
?>