Challenge of variable php in js



  • When pressurized, the goes straight to the blade without calling. confirmalthough variable row No problem.

    $testquery = "INSERT INTO education(employee_id, education_type_id, institution_id, course_name, period_from, period_till, education_document_id) VALUES($row[0], 2001134, 2001142, $coursename, $teststartdateresult, $testenddateresult, 2001149)";
    

    $link = '<a onclick = "if(confirm('Send result')) { alert('.$testquery.'); } else return false" href = "link='.$row[0].'" target = "_blank">Send result</a>';

    Privacy confirm We'll be on the page, nothing else.



  • We need to add to the alerant text:

    $link = '<a onclick = "if(confirm(\'Send result\')) { alert(\''.$testquery.'\'); } else return false" href = "link='.$row[0].'" target = "_blank">Send result</a>';
    

    It's weird that you didn't see a mistake js in the browser's console there wouldn't be any questions.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2