Search code examples
phpjavascriptjqueryhtmldhtml

I'm not able to redirect the URL to a different webpage after submiting form values


Hello Webmasters iam trying to redirect the webpage to a different URL/webpage after submitting the form elements ...i tried many ways but could not fix it... please check the codes below that i have tried so far...

<?php
if(isset($_REQUEST['down'])){
    header("header("location: domainpath/kothi.html");
}
?>    
<html> 
<body>
    <form action="glitter.php" method="post">
        <input type="radio" name="font" value="fonts/darkcrystaloutline.ttf"/> 
        <input type="radio" name="font" value="fonts/darkcrystalout.ttf"/>
    </form> 
</body> 
</html>

i have also tried

<?php
if(isset($_REQUEST['font'])){
    header("location: domainpath/kothi.html");
};
?>

i also tried

<?php
header("location: domainpath/kothi.html");
?>

please help me to fix the problem....


Solution

  • You have action="glitter.php", which means after submitting the form the result inputs will be accessible into glitter.php file. So in that file you have to redirect to whatever url you wanna go.