Skip to content

Commit a6c69e7

Browse files
committed
Registeration Form
1 parent 777ad09 commit a6c69e7

7 files changed

Lines changed: 123 additions & 0 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk-17.0.7.7-hotspot">
4+
<attributes>
5+
<attribute name="module" value="true"/>
6+
</attributes>
7+
</classpathentry>
8+
<classpathentry kind="src" path="src"/>
9+
<classpathentry kind="lib" path="C:/tomcat/apache-tomcat-10.0.27/lib/servlet-api.jar">
10+
<attributes>
11+
<attribute name="javadoc_location" value="https://jakarta.ee/specifications/servlet/5.0/apidocs/"/>
12+
</attributes>
13+
</classpathentry>
14+
<classpathentry kind="lib" path="C:/Users/Admin/Downloads/mysql-connector-j-8.3.0/mysql-connector-j-8.3.0/mysql-connector-j-8.3.0.jar"/>
15+
<classpathentry kind="output" path="bin"/>
16+
</classpath>

module1/JavaAllComponents/.project

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>JavaAllComponents</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding/<project>=UTF-8
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5+
org.eclipse.jdt.core.compiler.compliance=17
6+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
8+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10+
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
11+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12+
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
13+
org.eclipse.jdt.core.compiler.release=enabled
14+
org.eclipse.jdt.core.compiler.source=17
2.85 KB
Binary file not shown.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
package allcompo;
2+
3+
import java.sql.Connection;
4+
import java.sql.DriverManager;
5+
import java.sql.PreparedStatement;
6+
import java.util.Scanner;
7+
8+
public class allcompo{
9+
10+
public static void main(String[] args) throws Exception{
11+
// TODO Auto-generated method stub
12+
System.out.println("Enter Your Details :");
13+
Scanner sc = new Scanner(System.in);
14+
System.out.println("Enter Your Name :");
15+
String name = sc.nextLine();
16+
System.out.println("Enter Your Roll No :");
17+
String rollNo = sc.nextLine();
18+
System.out.println("Enter Your Email :");
19+
String email = sc.nextLine();
20+
System.out.println("Enter Your Password :");
21+
String password = sc.nextLine();
22+
System.out.println("Enter Your Date of Birth :");
23+
String dob = sc.nextLine();
24+
System.out.println("Enter Your Phone No :");
25+
String phoneNo = sc.nextLine();
26+
System.out.println("Enter Your Gender :");
27+
String gender = sc.nextLine();
28+
System.out.println("Enter Your Address:");
29+
String address = sc.nextLine();
30+
31+
32+
try {
33+
Class.forName("com.mysql.cj.jdbc.Driver");
34+
Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3308/allCompo","root","Akash@123");
35+
36+
PreparedStatement ps = con.prepareStatement("INSERT INTO allCompo values(?,?,?,?,?,?,?,?)");
37+
ps.setString(1,name);
38+
ps.setString(2,rollNo);
39+
ps.setString(3,email);
40+
ps.setString(4,password);
41+
ps.setString(5,dob);
42+
ps.setString(6,phoneNo);
43+
ps.setString(7,gender);
44+
ps.setString(8,address);
45+
46+
ps.executeUpdate();
47+
System.out.println("Data Inserted Successfully");
48+
}
49+
catch (Exception e) {
50+
System.out.println("Failed to insert data"+e);
51+
}
52+
53+
54+
}
55+
}
56+
57+
/*
58+
create database allCompo;
59+
60+
use allCompo;
61+
62+
create table allCompo(name varchar(255),rollNo varchar(255),email varchar(255),password varchar(255),dob varchar(
63+
255),phoneNo varchar(255),gender varchar(255),address varchar(255));
64+
65+
select * from allCompo;
66+
67+
*/
68+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
*
3+
*/
4+
/**
5+
*
6+
*/

0 commit comments

Comments
 (0)