How to use PHP variable in Javascript?

前端 未结 5 1338
遇见更好的自我
遇见更好的自我 2021-01-22 23:18

I know you can\'t directly use PHP variables inside javascript code, but is there a way around it? I need to use these parameter\'s in javascript:

username: \'&l         


        
5条回答
  •  日久生厌
    2021-01-22 23:34

    You can't use the result of a mysql_query() directly. Instead, you have to use mysql_result() or something similar (depending on your SQL query).

提交回复
热议问题