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

264
Views
ob_get_clean() remove value of input

console.log(ab_id_transakce); return empty variable because there is in php ob_get_clean(). Im novice so i dont understand what this doing. If i remove line with ob_get_clean() ab_id_transakce have correct variable from form input.

How to make function affilate() works also with ob_get_clean()?

<?php
            ob_start();
                ?>
                <div class="form-wrapper">
                    <input type="email" name="email" id="email" placeholder="E-mail *" class="required">
                      <button type="submit" class="full-width secondary submit-form" onclick="affilate()"><span class="outer-no-height align-center"><span class="middle"><i class="ct-icon-envelope"></i></span><span class="middle">Send</span></span></button>
                    </form></div>

                    <script>
function affilate() {                   
    var ab_instance = "xxxx";
    var ab_kampan = 3;
    var ab_cena = 1; 
    var ab_id_transakce = document.getElementById("email").value;          
                                
console.log(ab_id_transakce);
    
            var script_tag = document.createElement("script");
        script_tag.src = "https://xxxx.cz/t3.js";
        script_tag.type = "text/javascript";
        script_tag.async = true;
        script_tag.defer = true;
        document.head.appendChild(script_tag);  
}
</script>
                </div>  
            
                <?php
          $html_form = ob_get_clean();
            ?>
            <div class="something"> 
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!