Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End i need to use id from html to php

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #240228
    joseph
    Participant

    plz help i want to use the text i enter in password that after clicking button become in id=”demo” to php symbol $t
    here is the code

    <html>
    <body>
    Password: <input type=”password” id=”myPsw” value=”2″>

    <button onclick=”myFunction()”>Try it</button>

    <script>
    function myFunction() {
    var x = document.getElementById(“myPsw”).value;
    document.getElementById(“demo”).innerHTML = x;
    }

    </script>

    <?php
    $t =the_demo(); // the problem is here

    if ( $t < “10”) {
    echo “Have a good morning!”;
    } elseif ($t < “20”) {
    echo “Have a good day!”;
    } else {
    header(“Location: http://google.com&#8221;);
    die();
    }
    ?>

    </body>
    </html>

Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.