HTML Forms: Display entered data on a separate page - html

I have a simple HTML form like this:
<form name='input' action='thankyou.jsp' method='post'>
<p>Email Address: <input type='text' name='email' size='16' /><br>
<p>Password: <input type='password' name='password' size='16' /><br>
<p>Verify Password: <input type='password' name='verifypassword' size='16' /><br>
<br>
<input type='submit' value='Submit your data'/>
</form>
I want to be able to take the information a user enters and display it on a thank you page afterwards, how could I go about doing so?

you can first study the server-side scripting language,if you want to read JavaScript than this link may help you.
visit this site Click Here.
you can also choose other scripting language which you understand easily.

Related

Sending an Email Using R Markdown?

I have always wondered if this is possible in R.
On many websites, there is usually an interactive form which allows the user to send an e-mail to the owner of the website for feedback, comments, questions and suggestions:
Is it possible to create such a form within a Rmarkdown/Flexdashboard document?
I found links online that shows something similar :
https://www.w3schools.com/html/tryit.asp?filename=tryhtml_form_mail
How to send email from HTML Form
For example - I copy and paste this code in the Rmarkdown document:
<html>
<body>
<h2> Questions? Send an e-mail! </h2>
<form action="mailto:antonoyaro_9999999999999#hotmail.com" method="post" enctype="text/plain">
Name:<br>
<input type="text" name="name"><br>
E-mail:<br>
<input type="text" name="mail"><br>
Comment:<br>
<input type="text" name="comment" size="50"><br><br>
<input type="submit" value="Send">
<input type="reset" value="Reset">
</form>
</body>
</html>
I think this partially worked - but is there a better way to do this?
Thanks!

How do I get my submit button to work?

I am no expert in coding. As a matter of a fact this is my first true project in CSS. I created the page in Adobe Edge Reflow and exported CSS to dreamweaver. The problem I am running into is that I can't get my form to actually work. I want the form to send directly to my e-mail, in no specific format. Can anyone help me out?
<form method="post" novalidate>
<label id="formgroup">
<p id="text1">
Name*
</p>
<input id="textinput" type="text" value=" Your Name"></input>
</label>
<label id="formgroup1">
<p id="text2">
Company Name
</p>
<input id="textinput1" type="text" value=" Company Name"></input>
</label>
<label id="formgroup2">
<p id="text3">
Email*
</p>
<input id="textinput2" type="text" value=" email"></input>
</label>
<label id="formgroup3">
<p id="text4">
Message*
</p>
<input id="textinput3" type="text" value=" Your message"></input>
</label>
<input id="submit" type="submit" value="Send Message"></input>
<input type="hidden" name="recipient" value="xxx#gmail.com"> </form>
Your HTML markup seems fine for a simple form aimed to post the contents of a range of fields.
However, the HTML code (along with any CSS) will only enable you to determine the presentation/style of the form (i.e. how it looks).
Regarding the functionality of the application actually triggering an email with the form contents to an email address, this will require more code in a 'server-side' language such as PHP (HTML and CSS being 'client-side' languages).
Here is a good article that provides a tutorial on the subject: http://www.html-form-guide.com/php-form/php-form-tutorial.html
Your HTML markup is actually missing something, the "action" property, i.e.
Before:
<form method="post" novalidate>
After:
<form method="post" novalidate action="send-email.php">
As you might have guessed from looking at the above, this "action" property specifies the PHP script/file that triggers the email. And of course it is this file that you are currently missing.
Hope this helps.

Multi-search, single search bar HTML

As the title states, I'm trying to incorporate many searches into one search bar. More specifically, Google and Amazon. I have setup a radio option to set which site to search when one is selected.
This is the code I currently have:
<form method="get" action="http://www.google.com/search">
<div align="center" style="font-size:75%">
<input type="text" name="q" size="25" maxlength="255" value="" />
<input type="submit" value="Google or Amazon Search" /></br>
<input type="radio" name="sitesearch" value="" />The Web
<input type="radio" name="sitesearch" value="yoursite.com" checked />This Site
</div>
</form>
I have this form for Amazon, but I'm just unsure how to code it into the one search bar.
<form action="http://amazon.com/s/ref=nb_sb_noss" method="get" target="_blank">
<input type="text" id="twotabsearchtextbox" name="field-keywords">
<input type="submit" value="Search" class="nav-submit-input">
</form>
Use JavaScript to change the actual form action in page's DOM (and other parameters, if needed), depending on the user selection (use onclick event on radio to montior for change for example). Simple as that. You won't be able to do that in pure HTML without using some kind of proxy server to redirect the requests and return the results appropriately.
document.your-form.action = (google_selected) ? "http://www.google.com/search" : "http://amazon.com/s/ref=nb_sb_noss";
etc.

Why does my input box not accept data on my website

I have a form to enable people to provide an email address but it wont allow any input. The site is www.pbadvisory.com.au and here is my HTML code:
<form action="mailto:jdoe#pbadvisory.com.au" method="get">
<input type="text" name="emailaddress" id="newsletter_email" />
<input type="submit" id="newsletter_subscribe" value="Subscribe" name="submit" />
</form>
any suggestions to fix would be appreciated
Just went through your site. Actually it is allowing to input the text. But the text color is white and background is white, so its invisible. Change the text color so you can see it.
You cannot use a mailto: as a form action. If you want a form that sends e-mail, it must be done server-side.
Try with following Changes!
<form action="MAILTO:jdoe#pbadvisory.com.au" method="post" enctype="text/plain">
<input type="text" name="emailaddress" id="newsletter_email" />
<input type="submit" id="newsletter_subscribe" value="Subscribe" name="submit" />
</form>
Form method should be 'post' not get. That's the reason for your problem. Any way here is the full code with email subject is also included.
<form method="post" action="mailto:youremail#youremail.com?Subject=Email Subject" enctype="text/plain">
E-mail:<input id="emailAddress" name="E-mail" type="text" maxlength="24" />
<input type="submit" value="Send Email" />
</form>
Hope it helped.
Update:
Just a note this is not the right way if you want users to get subscribe with your web site.

Passing form variables through URL

What I want to accomplish is logging in to a website by simply typing in the form variables in the URL.
HTML code:
<form action="httpclient.html" onsubmit="return checkSubmit();" method="post" target="_parent" name="frmHTTPClientLogin">
<input type="hidden" name="mode" value="191">
<label>Username</label>
<input border="1" style="width:150px" maxlength="60" name="username">
<label>Password</label></pre>
<input type="password" border="1" style="width:150px" autocomplete="off" name="password" maxlength="60">
This is the relevant past of the code. Now I want to login to this site http://10.100.56.55/httpclient.html just by passing values typed in the url. Firstly is it possible. If yes then what exactly do i need to type for userame :name and password being pass ?
and what encoded URL will be passed in POST method if any?
Change method="post" to method="get"
If you want to type the Querystring in for the username and password, you need to do this in the address field of your browser:
http://10.100.56.55/?username=name&password=pass
EDIT:
You need to find out where the form is going and what it's doing. For this, you need to check what the submit javascript function called 'checkSubmit()' is doing. You can do this by opening the page in your browser and doing a view source. If the javascript is external to the html file, check the js links on the page and open those up to find that function. The function might have the querystring parameters you're looking for.
<input type="text" class="form-control" placeholder="Products" name="search" value="search" id="search">
<input type="text" class="form-control" placeholder="Products" name="search" value="search" id="search2">
<button type="submit" class="btn btn-default" onclick="location.href='\search.php?search='+ document.getElementById('search').value+'&search2='+document.getElementById('search2').value;"> Search</button>
the issue was in the input tag <input type="hidden" name="min_price" value="200"> forward slash was missing,I have added the forward slash and it works now <input type="hidden" name="min_price" value="200"/>.
It's not possible to do that; the form would have to use the GET method.