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

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -