Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

210
Views
Its possible convert variable js in php?

I want to get the input in blur, but I don't know if it's possible to do this in php, so im doing in javascript to convert in php after, but im not getting

<!DOCTYPE html>
<html>

<body>

<h4>
    Change the text of the text field
    ,and then click the button.
</h4>

<label for="domTextElement">Name: </label>
<input type="text" onclick="getValueInput()" onblur="getValueInput()" id="domTextElement">

<form action="teste2.php" method="GET">
    <p <?php //$_SESSION['id'] = echo "<script>document.getElementById('valueInput').innerHTML</script>"; 
        ?> id="valueInput"></p>
</form>

<script type="text/javascript">
    const getValueInput = () => {
        let inputValue = document.getElementById("domTextElement").value;
        document.getElementById("valueInput").innerHTML = inputValue;

    }
</script>
<?php

$id = $_GET['valueInput'];
echo $id;
?>
</body>

</html>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!