skip to Main Content

Mongodb – Mongoose POST method

I am building a MERN app where I want to use a POST method to send data to my collection in MONGODB. I imported schema as Messages here is the code app.post("/messages/new",(req,res) => { const dbMessage = req.body; Messages.create(dbMessage,(err,data) =>…

VIEW QUESTION

Problem with PHP code(operations on variables)

This is fragment of my code: <?php session_start(); $_SESSION['counter']=0; if(isset($_POST['id'])){ $id = $_POST['id']; $id = strval($id); @$_SESSION['order'] +=','; @$_SESSION['order'] +=strval($id); echo $_SESSION['order']; $_SESSION['counter']+=1; } echo '<br>'.$_SESSION['counter']; ?> and when I open up the page, I see this error "Fatal error:…

VIEW QUESTION
Back To Top
Search