• GoDaddy Community
  • Websites + Marketing | Website Builders
  • Websites + Marketing | Website Builders

    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 
    Go to solution

    POST not working, but GET is working. WHY?

    I'm creating forms and have noticed that $_POST isn't working while $_GET works. Here's the sample code, starting with $_POST that doesn't work:



    <form action="" method="post">
    <input type="text" name="var" id="var"><br>
    <input type="submit" name="submit" id="submit">



    <?php if(isset($_POST['submit'])){
    $test = $_POST['var'];
    echo $test;



    1 REPLY 1
    Community Manager
    Community Manager

    Re: POST not working, but GET is working. WHY?

    Hi @kuk. Welcome to GoDaddy Community! I'm not a web developer, but this might have to do with the empty 'action=""' attribute. I found this Quora post that may be of some help to you. If not, others in the community may have additional suggestions. 


    JesseW - GoDaddy | Community Manager | 24/7 support available at x.co/247support | Remember to choose a solution and give kudos.