hi all
i am trying to submit the form and redirect the form to “action” path url
but after submitting the form i get the redirected to the url
http://localhost/form.php?fdate=1-2-2016&sdate=1-3-2016&submit=submit
how can i remove the &sumit=submit from the url.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<?php
if(isset($_REQUEST['submit']))
{
$fdate = $_REQUEST['fdate'];
$sdate = $_REQUEST['sdate'];
$action = $_SERVER['PHP_SELF']."?fdate=".$fdate."&sdate=".$sdate;
}
?>
<form action="<?php if(isset($action)){echo $action;} ?>" method="get">
<input type="text" name="fdate" />
<input type="text" name="sdate" />
<input type="submit" name="submit" value="submit" />
</form>
</body>
</html>
i tried it with input type=button
<input type="button" name="submit" value="submit" />
but input type button doesnt submit the form and does nothing.
how to remove &submit=submit
vineet