javascript - can insert data to mysql in php call from node js? WITHOUT EXPRESSJS -


i new in nodejs

i want create app use nodejs , php

the scheme this..

nodejs-->id-->php(insert data mysql)

nodejs send value id php page (php receive data nodejs).in php want insert data mysql

my question how send value php nodejs php can receive data? how achieve this?any tutorial explain this?

thanks

node side make post php file. like:

var postrequest = {     host: "mydomain.com",     path: "/myfile.php?do=insert&field1=somedata",     port: 80,     method: "post",     headers: {         'content-type': 'application/x-www-form-urlencoded'       } }; 

and php side recive these stuff like:

$_post['...'] 

then db actions.

heres more info: node.js post request fails

hope helps


Comments