Skip to content

Instantly share code, notes, and snippets.

@WillieYang
Created July 1, 2017 16:46
Show Gist options
  • Select an option

  • Save WillieYang/be14b276d4f93887a9ad48c8255c5aaf to your computer and use it in GitHub Desktop.

Select an option

Save WillieYang/be14b276d4f93887a9ad48c8255c5aaf to your computer and use it in GitHub Desktop.
Cannot use req.body.name to get data in the form
module.exports.searchResults = function(req, res){
var search = req.body.search;
console.log("query:" + search);
renderSearchResults(req, res);
};
// the type of form should be posted, req.body can only get the posted data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment