HTML with hidden password - html

I want to create an html that ultimately will be sent as an email. The email will have a password but hidden. The email will have something like a submit button. On click of that, the hidden password should be fetched and sent in a POST request. How can I have a hidden password underneath the submit button
I have HTML like below:
<!DOCTYPE html>
<html>
<body>
<form action="/action_page.php">
Username: <input type="text" name="usrname"><br>
<input type="submit" value="Submit">
</form>
</body>
</html>

try this you can fetch password using email and passing to input field
<input id="prodId" name="prodId" type="hidden" value="xm234jq">

Dont put forms in emails. Putting forms in emails is bad.

<input type="hidden" value="thepassword">
however if this really is a "password" i would not recommend this as anyone can just inspect the code and find it even if it is visually hidden. if it is not a "secret password" more like an identifier tag or something, then this works fine though.

Related

I can't get my submit button to send an email, Ive tried several formats

I am using a form id= contact-form with a form loader. I have tried getting my email to submit with form action and html href however nothing has working this is what I am currently trying to get to work. any suggestions?
<form method="post" action="mailto:m_galvin1005#email.campbell.edu" >
<input type="submit" value="Send Email" />
</form>
I placed this form method inside of a form id. Not sure if thats where I am getting held up at
Unfortunately, browsers don't actually know how to send emails. The web browser only really knows how to render HTML, JS and CSS code into a visual experience.
PHP is a language that runs server-side, which you can use to tell a web server to send an email to whatever address you input.
Here's a good article on PHP Emailing: https://css-tricks.com/snippets/php/send-email/
It is important to note that this code REQUIRES a web-space or server to compile.
It will be a very basic email form, having said this I think you are missingpost argument in your form tag. The following should work
<form action="mailto:m_galvin1005#email.campbell.edu" method="post" enctype="text/plain" >
Name:<input type="text" name="Name">
Email:<input type="text" name="Email">
<input type="submit" name="submit" value="Submit">
</form>

Create simple form that redirects to a webpage

Long and short, I had a form input button on my site that worked as an access code to redirect to a specific page on the site. Site broke, and now I don't remember the code I had in place. It was done a long time ago and I only had to do it once. But the gist of it looks like this:
For example the address to site is www.brokensite.com. I had a form input field on the page where the value of the input field when submitted redirected to the page www.brokensite.com/inputvalue. So if I input the access code of helpme, it would redirect to www.brokensite.com/helpme
My current code is:
<form action="/after-school-registration/" method="$_GET" name="access">
<input name="code" value="" type="Text">
<input value="Go" type="Submit">
</form>
Please tell me what I am missing. Or what I did wrong this time. Any help is appreciated.
You could use JavaScript and set the location:
<form>
<input id='urlpage' />
<button type="button" onclick="window.location.href='/after-school-registration/' + document.getElementById('urlpage').value">Go</button>
</form>

HTML Login to another site by clicking a reference

I have been using the post method to login a “Guest” user to another site, like in the following:
<form action="http://example.com/login.asp" method="post" target="_blank">
<input type="hidden" name="username" value="Guest" />
<input type="hidden" name="password" value="0000"/>
<input type="submit" name="btnSubmit" value="Login" />
</form>
I need now to avoid this method and I wish to use the get method instead, like in the following:
Login as Guest
I reach the page and the username and password values are on, but I cannot find what is missing to achieve the login without the need of clicking a button by the user. In other words, the user by clicking the link should be logged in with no further action. Is there any way?
Please advice.
in http://example.com/login.asp at beginning just check username and password is present or not and all others what you want and then logged them in and finaly one thing when you using form then your method is POST but when you go through anchor link then method is GET it's not POST and I think you miss this..

URL building for login

I am working on a Django project, in which a template login.html has code like -
<form name="input" action="welcome.html" method="get">
--------------SOME FORM ELEMENTS-----------------
<input type="submit" value="Login" />
</form>
When I click on Login, I want URL to be -
http://127.0.0.1:8000/welcome.html
or
http://127.0.0.1:8000/welcome.html?xxxxxxxxxxxxxxxxxx
but url comes out to be
http://127.0.0.1:8000/login.html/welcome.html?xxxxxxxxxxxxxxxxxx
(that is, "action" from form gets appended to the URL instead of getting appended to the domain) where "xxxxxxxx" stands for query submitted through form.
How can I achieve this?
<form name="input" action="/welcome.html" method="get">
You should set the action to be "/welcome.html".
thats really wired, try making your action="/welcome.html"

Sending HTML form to address bar

Is it possible to generate a form in html that allows the text that's input to be sent to the address bar?
Sure is, you just make sure the forms METHOD is set to GET:
<form id="myForm" method="GET">
//Form Stuff
</form>
Take a look here for more information
Without any testing and going off the top of my head, this should do the trick (messily):
<form onsubmit="window.location = document.getElementById('addressfield').value; return false;">
<input type="text" id="addressfield" />
</form>