How to query database using javascript?

后端 未结 8 1188
渐次进展
渐次进展 2020-12-09 20:07

Another question by a newbie. I have a php variable that queries the database for a value. It is stored in the variable $publish and its value will change (in the database)

8条回答
  •  死守一世寂寞
    2020-12-09 20:33

    Well, i think i understand your quaestion, but you have to get a starting point, try to understand this:

    • try to understand what are client variables and server variables.
    • javascript does not comunicate with database.
    • you can use javascript to retrieve data to a specific "Object variable".
    • Using ajax methods of jquery you can post that data do other page, that will execute the proper actions

提交回复
热议问题