php - How to insert POST data -
I do not know how to insert POST data in the mongodb collection. I try to do this:
$ collection - & gt; Insert ($ _ POST); But in this case I get an internal server error . What is the best and most concise way to do this?
Better method of creating an array of all the positions and data
& Lt ;? Php $ post = array ("username" = & gt; $ _ POST ['username'], "password" = & gt; $ _POST ['' password ']); $ COLLECTION- & gt; Insert ($ post); ? & Gt;
Comments
Post a Comment