How can I find a website's login form URL variables? - html

I am trying to make a code that will automatically login into a webpage for you, but I am having trouble finding the url variables for the submission.
How can I find the url variables to submit the login?
i.e.
https://login.fidelity.com/ftgw/Fas/Fidelity/RtlCust/Login/Init
When I submit my username and password on the site, it passes it through to
https://login.fidelity.com/ftgw/Fas/Fidelity/RtlCust/Login/Response
The username <input> has id="userId", and the password <input> has id="password", and this is all under a <form> which has method="POST"
How can I find all variables that I need to submit?

The URL variables aren't always in the URL.
Most Login forms use a method of transferring that data called "POST".
In which the URL data cannot be seen by the user.
You can try using http://www.wireshark.org/ or http://www.charlesproxy.com/ to view the data sent and received by your web browser.
To find the name of the URL parameters (such as ?username=....&pas=...).
You can look into the HTML of the page. Look for something like so:
<form action="login.php" method="post">
<input type="text" name="username" value="User Types Username Here">
<input type="submit">
</form>

Can use Chrome (Ctrl + Shift + J) Network tools. Click "Preserve Log" to ensure you capture payload before page refreshes.

Related

How to make an email with submit button, which triggers a post request

I want to send an email which has a submit button, on click of which, a post request would be triggered.
How can I create such an email?
What kind of code would be required?
The code I have written:
<h1>Show a push button:</h1>
<p>The button below activates a JavaScript when it is clicked.</p>
<br/>
<input type="button" value="Click me" onclick="msg()">
That approach you appear to be trying to take is to use JavaScript. This absolutely will not work. Email clients do not allow JavaScript to execute in HTML formatted email.
You could place a regular form inside the email:
<form action="http://example.com" method="POST">
<button>Submit</button>
</form>
… however, form support in email clients is not perfect.
The safe approach is to ask the user to do a two-step process: use a regular link to a webpage containing the form which the user can load in their web browser and then click the submit button for.
If you don't care about the usual protections, then you could have JavaScript submit the form on that page automatically, or change the endpoint that expects a POST request to expect a GET request and use a regular link in the original email.

How to send a post request to GTMetrix

I want my users to write his website on my site and then be sent to gtmetrix.com to start a new test, but without needing to write his website again.
I am trying with this:
<form method="post" action="https://gtmetrix.com/analyze.html">
<input type="text" placeholder="Enter your Website URL"></input>
<input type="submit">CHECK IT</input>
</form>
But i get a
Analysis Error
You tried to analyze an invalid/malformed URL
What i am doing wrong? is possible to do this?
It seems they require the url in the form data field called url.
You must use the following input tag:
<input type="url" name="url" value="" placeholder="Enter your website URL" maxlength="1024" autofocus="" required="">
Also, they could be blocking external referrers. But first try adding the name attribute.
First of all, I don't know if that website allows you to submit that form from external websites. Make sure that's possible!
Seccond of all, you are trying to sent a form without setting the name of the input field. The resource that receives your request don't know anything to do with it.
If you want to analyse websites on your own website, search for services that provide APIs for using it external.
I am not familiar with gtmetrix, but you need to set the name attribute on your input to send it with the request.

Need help sending Email from form HTML

I have a form that reads
<form action="Send.asp" method="POST" name="Order" id="Order">
in my send a quote page. The submit button reads as follows:
<input name="B1" type="submit" class="style80" value="Submit">
Now when I click on the button, it only redirects to the home page. I would like it to go to the .asp file called Send.asp
That .asp file has the sending methods: connect to SMTP server and compile an email form the input boxes on the request page.
Why is my email not sending? What am I missing from the form tag?
Your input type=submit seems correct. Is the Send.Asp page in the same directory than the html file ?. Maybe you have to use other relative route.
Are you debugging Send.asp file to check if it is being called?.
That could be a start.
Try changing aswell the Send.Asp with full url to discard that the url is not valid.
form action="http://yoururl/yourproject/Send.asp" method="POST" name="Order" id="Order">

How do I make a simple email form submission in HTML?

I tried w3schools but it didn't help and I tried other websites too. I just wanna make a short html script that sends an email to an email address, but I keep reloading my email inbox and nothing comes up. Can you help?
<form action="MAILTO:MY_EMAIL#yahoo.com" method="post" enctype="text/plain">
<input type="text" name="email" value="Email">
<input type="text" name="message" value="Message">
<input value="Submit" type="submit">
</form>
You need to use a server side script here. HTML alone won't help you here. HTML is just the frontend logic. You need some script on backend that accepts this data you submit and actually sends out an email. To take the example in PHP, assuming u have the server set up and all or that your shared
<form action="sendmail.php" method="post" enctype="text/plain">
<input type="text" name="email" value="Email">
<input type="text" name="message" value="Message">
<input value="Submit" type="submit">
</form>
sendmail.php
$email=$_POST['email'];
$message=json_encode($_POST);
$receiver="MY_EMAIL#yahoo.com";
$mailer="mailer#myservice.com";
mail($email,"Message for enquiry or whatever",$message, array("from"=>$mailer));
There were, at some point, browsers that supported forms of this type. However, they're all gone now -- you will need a server-side script to send email. It's impossible to do using HTML alone.
You are confusing a few things.
When you Submit a form, it goes from the client (browser) to your server, which acts upon it. The form action needs to be a URL which handles the request. The mailto: URI scheme is not a valid action to use.
You have two choices:
You can create a mailto: link like this:
Send email
which will open your default email client,
OR
You can put a URL corresponding to an end point on your server, something like
form action="/send/mail"...
and have your server send the email
I believe the easiest way to do this is using a service like Zapier or IFTTT. Both of them offer a way to create Zaps/Applets that can send an email when you post to a specific url.
This is what configuration would look like in IFTTT and Zapier .
IFTTT is simpler to setup, Zapier has more options, like sending to more than one emails. I believe IFTTT only lets you send to your account's email.

How to use the form value in the action?

I am trying to make a form in html that uses the value you enter to form the destination URL.
<form action="../search/${params.q}" method="post" id="q">
Busqueda: <input type="text" name="q" /><br />
</form>
This is what i am doing, but it does not work, any cluess? thanks!
You'd need to handle this using a script - either server-side or on the client (JavaScript).
HTML alone can't handle parameters in the way you're using them.
So you'd need to either POST the form (as you're already doing) and handle the postback by redirecting your request to the new address, or use JavaScript to capture the field's value when a submit button is clicked and loading the new address in the browser window.
I'd suggest server-side is the best option as JavaScript might be disabled or unavailable.