Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa HTML create a one web page

Have Programming Question? Ask it here!
 
 
 


rajasekar
create a one web page
1 Answer(s)      3 years and a month ago
Posted in : HTML


create a one web page with stored values in a database..


Advertisement
View Answers

July 11, 2011 at 12:11 PM


1)form.html:

<html>
<form method="post" action="http://localhost:8080/examples/jsp/insert.jsp">
<table>
<tr><td>First Name:</td><td><input type="text" name="fname"></td></tr>
<tr><td>Last Name:</td><td><input type="text" name="lname"></td></tr>
<tr><td>Email:</td><td><input type="text" name="email"></td></tr>
<tr><td>Password:</td><td><input type="password" name="pass"></td></tr>
<tr><td>Confirm Password:</td><td><input type="password" name="cpass"></td></tr>
<tr><td>Date Of Birth</td><td><input type="text" name="dob"></td></tr>
<tr><td>Age:</td><td><input type="text" name="age"></td></tr>
<tr><td>Gender</td><td><input type="text" name="gender"></td></tr>
<tr><td>Address:</td><td><input type="text" name="address"></td></tr>
<tr><td>Country</td><td><input type="text" name="country"></td></tr>
<tr><td>State:</td><td><input type="text" name="state"></td></tr>
<tr><td>City</td><td><input type="text" name="city"></td></tr>
<tr><td>Telephone No:</td><td><input type="text" name="tno"></td></tr>
<tr><td>Mobile:</td><td><input type="text" name="mobile"></td></tr>
<tr><td></td><td><input type="submit" value="Submit"></td></tr>
</table>
</form>
</html>

2)insert.jsp:

<%@page import="java.sql.*,java.util.*"%>
<table>
<%
String fname=request.getParameter("fname");
String lname=request.getParameter("lname");
String email=request.getParameter("email");
String pass=request.getParameter("pass");
String cpass=request.getParameter("cpass");
String dob=request.getParameter("dob");
int age=Integer.parseInt(request.getParameter("age"));
String gender=request.getParameter("gender");
String address=request.getParameter("address");
String country=request.getParameter("country");
String state=request.getParameter("state");
String city=request.getParameter("city");
int telephone=Integer.parseInt(request.getParameter("tno"));
int mobile=Integer.parseInt(request.getParameter("mobile"));

        try{
         Class.forName("com.mysql.jdbc.Driver");
           Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/roseindia", "root", "root");
           Statement st=con.createStatement();
           int i=st.executeUpdate("insert into student(firstname,lastname,email,pass,confirm_pass,dob,age,gender,address,country,state,city,telephone,mobile) values('"+fname+"','"+lname+"','"+email+"','"+pass+"','"+cpass+"','"+dob+"',"+age+",'"+gender+"','"+address+"','"+country+"','"+state+"','"+city+"',"+telephone+","+mobile+")");
        out.println("Data is successfully inserted!");
        }
        catch(Exception e){
        System.out.print(e);
        e.printStackTrace();
        }


Related Tutorials/Questions & Answers:
create a one web page
create a one web page  create a one web page with stored values in a database
how to create web page on jsp?
how to create web page on jsp?  how to create web page on jsp
Advertisements
at one click to reveal the paricular part of a web page
at one click to reveal the paricular part of a web page  How to reveal the hidden code of particular part of a web page? Note:That hidden code coming from database(in while loop
May I know how to create a web page?
May I know how to create a web page?  can u suggest me how to start
Create Web Page with jsp
Web Page with jsp       In this example we will show you how to create first web page on tomcat.... For this we will create a simple dynamic JSP page with java.util.Date class (<
WEB PAGE
WEB PAGE  How To Create A Simple web Page Of a gmail using applet
web page
web page  1.Create a web page with the following using HTML i) To embed an image map in a web page ii) To fix the hot spots iii) Show all the related information when the hot spots are clicked
Web Page
Web Page    Use any programming language or package to create a Project 2 .The Main menu should only be displayed, if the user is valid and uses... or package to create a basic User Interface that will be able to accept multi-level menu
Two Pagination in one page
Two Pagination in one page  hai friends any one help me. how do u make two pagination script in same page i'm used some ajax coding one pagination script is working but another pagination is not working please help me urgent
connect a web page to a database
connect a web page to a database  how to connect a web page to a database
how to create web aplli
how to create web aplli  how to Create a web application using any technology to display 10 most relevant tweets from Twitter in real-time for the keyword "@cldmgc
how to create web aplli
how to create web aplli  how to Create a web application using any technology to display 10 most relevant tweets from Twitter in real-time for the keyword "@cldmgc
Web page example
Web page example  Hi, How to make sample web page? Thanks   Hi, If you are aware of HTML then you can write simple web page for your... any HTML editor to create website pages. Thanks
new web page
new web page  I am creating a new web page for an user to sign up....how to give error messages if an user has not entered some fields(it can be one or many)... An example could be your webpage where you have indicated in red
php web page capture
php web page capture  How to capture the history of a web page using PHP
setting web page size
setting web page size  How to set the webpage size in Java
create a folder in jsp page
create a folder in jsp page  i want to create a folder in jsp page And it can be delete aslo
parser xml one page to another
parser xml one page to another  parser xml one page to another
web page design
web page design  Great Applianz Ltd. was established in 1985, in New.... The website should provide the following functionality: A Welcome page that gives the user a brief introduction about the company. This page should display the name
Web Page Transaction
Web Page Transaction  Hello sir, i want to add an Effective page transaction when i go to my home page to other page in js...plllzzz help me...rppy soon
map on web page
map on web page   i want to insert an area map in my web page how can i do it ? please answer me soon. Its urgent
create main page
create main page  <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@page import="java.sql.*"%> <%@page import="java.util.*"%> <%@ page session="true
web page access
web page access  I was store project in server and i will open that project file in client side add="http://server:8080/project..." this is very..." and project code = "Java Server Page" "HOW TO WRITE CODE CLIENT ACCESS SERVER
how to add web cam in web page
how to add web cam in web page  how do i embed my webcam in web page. code for embedding web cam in web page
how to create a xml page
how to create a xml page  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML...;head> <meta name="Description" content="Information architecture, Web Design, Web Standards." /> <meta name="Keywords" content="your, keywords
web page reading in java
web page reading in java  i wanna read webpage in that i want to get the data from the particular tags like (,) and store into the data base...... can any body tell me the solution? plz urgnt. thanks and regards, jasti  
web service call in jsp page
web service call in jsp page  I am wandering on internet for hours looking for a simple and good example on how to create a simple JSP page to call a web service when you have a WSDL. I am using tomcat web server and eclipse
Bangla web page - JSP-Servlet
Bangla web page   what is the process to make a bangla web page in jee
how to create a login page and registration page?
how to create a login page and registration page?  hellow, pls tell me the code for how we can create a login page and registration page and how we can store the info in database.only in advance java as jsp
validation web page
validation web page  vivek i want to crate a webpage with specfic email id and password to that webpage . using jsp & servlets   Hi Friend, Try the following code: <html> <script> function checkMail
Download Current Web Page As PDF
Download Current Web Page As PDF  Need a utility to save current web page as pdf file into specified directory... Thanks In Adv
get JavaScript onto a web page
get JavaScript onto a web page  How do we get JavaScript onto a web page
Add music to my web page
Add music to my web page  How do I add midi music to my web page
transferring user to new web page
transferring user to new web page  How to transferring user to new web page automatically
html program to create home page
html program to create home page  html program to create home page
how to create a jsp page like gmail inbox page
how to create a jsp page like gmail inbox page  in my struts project i need to create a page like gmail inbox page..........how can i create this? help me some one
one to many video chatting in web application
one to many video chatting in web application  Hi all....I am developing a web application,where video chatting is its one of the main feature.Can anybody tell me which technology to be used.Currently i am using Jsp and servlet
Create HTML page using java
Create HTML page using java   Hi, I need to create an html page to export some information. Currently, by using java, i've exported information to excel. But now, I would like to view it in HTML instead of excel. Is there any
How to change functionlatiy in web page
How to change functionlatiy in web page  i need to change functionality of my web page..i came to know that by using collections it is possible..but i dont know how to use it...is any other way to change functionality of my web
How to fetch entries/values from database to a jsp page one by one?
How to fetch entries/values from database to a jsp page one by one?  I have a table in Microsoft SQL server Management Studio with two columns title and data and each column has 10 enteries. I have a jsp page on which i want
creating web page for form registration
creating web page for form registration  I am creating web page for form registration to my department ..I have to Reprint the Application Form (i.e Download the PDf File from the Database ) , when the user gives the Application
create web application using maven
In this section, you will learn to create a web application using maven
to bring checked data from one page to another
to bring checked data from one page to another  thanks for your help... there is one jsp page , on it there is a link, on click of which it is opening second jsp page which is connected with servlet at the back and through which i am
ZF Page Redirect
Redirect to another page using submit button, in ZF: It is one of the most common activity in a web application to redirect one web page to another web page... one page to another
insert , edit , and delete button in one jsp page
insert , edit , and delete button in one jsp page  hello I want to ask about the way of creating a jsp page contains insert , edit , and delete buttons and manipulate data in database directly. any help please or hints
Front Page Web Hosting
Front Page Web Hosting Microsoft Front Page is leading WYSIWYG editor for the development of web site using HTML and DHTML. Front Page is used... providers provides Front Page Support on their web servers. Front Page extensions
Writing a web page to test drive each method in the web app
Writing a web page to test drive each method in the web app  I got an assignment in my university. I need to write a single web page, that lists all the classes in the particular web app. Selecting a class, the page should list
Create dynamic page through JSP
how to create dynamic page. This code shows one by one record of student from... Create dynamic page through JSP..., application fetch next record from database. Create a database :  Before
how to do two database tables in one page?
how to do two database tables in one page?  dear all: i want to show these two database tables in one page. one table on the left (dbtable.jsp...*** <%@page import="java.sql.*"%> <html> <table border="1"> <
Create Security header in web services - WebSevices
Create Security header in web services  How we can create a security header in the web services.Please provide me the code if anyone available thanks in advance
 

 

 

DMCA.com