Created
July 1, 2017 16:46
-
-
Save WillieYang/be14b276d4f93887a9ad48c8255c5aaf to your computer and use it in GitHub Desktop.
Cannot use req.body.name to get data in the form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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