모든 코드 예기치 T_ECHO는이 광고 오류파싱 에러 : 구문 오류
$(document).ready(function(){
$('#sub').click(function() {
var r = confirm("سلام")
if (r==true){
var in_code=document.getElementsByName("code")[0].value;
var echo="<?php
include ('conect.php');
$res2=mysql_query("select * from products where code=".echo('document.write(in_code);');." ");
$row2=mysql_fetch_array($res2);
echo $row2['name'];
?>"
alert(echo); }
else {
document.getElementById("frm1").reset();
}
:
$res2=mysql_query("select * from products where code=".echo('document.write(in_code);');." ");
에코 ('document.write를 (in_code)'); 작동하지 않습니다
어떻게 해결할 수 있습니까?
코드가 작동한다고 생각하지 않습니다. js는 클라이언트 측이고 PHP는 서버 측입니다. – Class
$ sql = "select * from products from code"+ in_code –