Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $m = new MongoDB\Client("");
- $db=$m->PHP;
- $collection=$db->Users;
- if($_POST)
- {
- $insert= array(
- 'name' => $_POST['name'],
- 'email' => $_POST['email'],
- 'qebsite' => $_POST['website'],
- );
- if($collection->insertOne($insert))
- {
- echo "data is Inserted";
- }
- else{
- echo "some issue";
- }
- }
- else{
- echo "No data to store";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement