Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

161
Views
Express post method doesn't show elements value

The problem is related to the study Express that when input elements are sent to the server, I need to get those elements using router.post(), It doesn't show anything.

    var express = require('express');
    var router = express.Router();
    
    /* GET home page. */
    router.get('/', function(req, res, next) {
      res.render('index', { title: 'Login - Code Station' });
    });
    router.get('/home', function(req, res, next) {
      res.render('home',{value:'home',title:'Home'});
      console.log("Going to Home")
      console.log(req.body)
    })
    router.post('/home',function(req,res){
      console.log(req.body)
    })
    
    module.exports = router;


    <div class="container-fluid d-flex flex-column align-items-center justify-content-center vh-100 ">
        <div class="d-flex flex-column align-items-center justify-content-center p-5 shadow-lg rounded-3">
            <h1>Login</h1>
            <form class="d-flex flex-column align-items-center" action="/home" mathod="post">
                <div>
                    <div class="mb-3">
                    <label for="exampleInputEmail1" class="form-label">Email address</label>
                    <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" name="name" value="1234@123.com">
                    <div id="emailHelp" class="form-text">We'll never share your email with anyone else.</div>
                    </div>
                    <div class="mb-3">
                    <label for="exampleInputPassword1" class="form-label">Password</label>
                    <input type="password" class="form-control" id="exampleInputPassword1" name="pass" value="1234567">
                    </div>
                    <div class="mb-3 form-check">
                    <input type="checkbox" class="form-check-input" id="exampleCheck1">
                    <label class="form-check-label" for="exampleCheck1" name="checkme">Check me out</label>
                    </div>
                </div>
                <button type="submit" class="btn btn-primary">Submit</button>
            </form>
        </div>
    </div>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!