hi,i would like to make a simple hotel.Firstly,I created a simple form(with no validations etc) but i don't know how when i press Submit button then this details to save in a database using Mysql. Can anyone tell me how to do this this?
<br>
<%--
Document : StartPage
Created on : 14-Nov-2010, 16:07:29
Author : theo
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<script>
function onClick()
{
return true;
}
</script>
<html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>Hotel Details</h1>
<form name="form1" action="Details.jsp" method="post" onsubmit="javascript:return onClick()" >
Rooms
<br>
<select id="Origin" name="Origin" onchange = "originChanged()">
<option>Please Choose</option>
<option>Bed and Breakfast</option>
<option>Room</option>
</select>
</br>
<h2></h2>
Number of people
<br>
<select id="Origin" name="Origin">
<option>Please Choose</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
</br>
<h3></h3>
Number of rooms
<br>
<select id="Origin" name="Origin">
<option>Please Choose</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
</br>
<h4></h4>
Type of room
<br>
<select id="Origin" name="Origin" onchange = "originChanged()">
<option>Please Choose</option>
<option>Single</option>
<option>Double</option>
<option>Luxury double</option>
</select>
</br>
<h5></h5>
Breakfast
<br>
<select id="Origin" name="Origin">
<option>Please Choose</option>
<option>Yes</option>
<option>No</option>
</select>
</br>
<br>
<h5></h5>
Start Date
<select id="Origin" name="Origin">
<option>Please Choose</option>
<option>1</option>
</select>
<select id="Origin" name="Origin">
<option>Please Choose</option>
<option>December 2010</option>
<option>January 2011</option>
<option>February 2010</option>
<option>March 2010</option>
<option>April 2010</option>
<option>May 2010</option>
</select>
</br>
<h5></h5>
Until
<select id="Origin" name="Origin">
<option>Please Choose</option>
<option>1</option>
</select>
<select id="Origin" name="Origin">
<option>Please Choose</option>
<option>December 2010</option>
<option>January 2011</option>
<option>February 2010</option>
<option>March 2010</option>
<option>April 2010</option>
<option>May 2010</option>
</select>
</br>
</p>
<p><input id=submit1 type=submit value=Submit name=submit1>
</p>
<form name="form1" action="PageTwo.jsp" method="post">
</form>
</body>
</html>
</br>