Why Is My Redirect Button Not Redirecting?
I am making a mailing system that uses Python Flask. My template has the following HTML:
When I press the "Send" button, It doesn't redirect me anywhere. It just stays at the page it is at. What am I doing wrong?
I do not know flask however in html/js you would use form action="yourwebpage.yourending"> so maybe look into form and action
@joecooldoo So when you go to a website, you are GETting data from the server that runs that website. So imagine there is a library and you borrow a book. Now think of POSTing a comment on Replit. You are giving data to the server. GET is when you receive data (going to the website and reading comments) and POST is when you GIVE the data (when you yourself post a comment). In a form in HTML, you can fill it in and then the it PUTs the data into the server after you submit it. PUT and POST are interchangeable. You can GET a youtube video from the youtube servers and watch it or you can POST a video and PUT it in the youtube servers. When you open a website, you GET the html from the server and it is displayed to you. POST is the opposite. You PUT the data into the server.
@app.route means that you can get HTML from that url.
@app.route(methods=["POST"]) means that that URL is for POSTing data to the Flask app only.