-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate.html
115 lines (104 loc) · 4.75 KB
/
create.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Sign Up Page</title>
<!-- Link to Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link href="css/style.css" rel="stylesheet">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
<link href="css/tiny-slider.css" rel="stylesheet">
<link href="css/bootstrap.min.css" rel="stylesheet">
<style>
/* Custom CSS for the sign-up page */
body {
background-color: #f8f9fa;
}
.signup-container {
max-width: 400px;
margin: 0 auto;
padding: 20px;
background-color: #ffffff;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
margin-top: 100px;
}
</style>
</head>
<body>
<script>
const form = document.querySelector('form');
form.addEventListener('submit', (event) => {
event.preventDefault();
// Handle file upload
const file = event.target.elements.image.files[0];
if (file) {
// Send the file to the server using AJAX
const formData = new FormData();
formData.append('image', file);
fetch('upload.php', {
method: 'POST',
body: formData
})
.then(response => response.json())
.then(data => {
console.log('Image uploaded successfully!');
})
.catch(error => {
console.error('Error uploading image:', error);
});
}
});
</script>
<div class="container">
<div class="row">
<div class="col-md-6 offset-md-3 signup-container">
<h2 class="text-center mb-4">Create Event</h2>
<form action="create.php" method="post" enctype="multipart/form-data">
<div class="form-row">
<div class="form-group col-md-6">
<label for="eventName">Event Name</label>
<input type="text" class="form-control" id="eventName" placeholder="Enter the event name" name="eventname" required>
</div>
<div class="form-group col-md-6">
<label for="noofparticipants">No of Participants</label>
<input type="text" class="form-control" id="noofparticipants" placeholder="Enter the number of participants" name="noofparticipants" required>
</div>
</div>
<div class="form-group">
<label for="eventName">Event Description</label>
<input type="text" class="form-control" id="eventdescription" placeholder="Enter the event description" name="eventdescription" required>
</div>
<div class="form-group">
<label for="date">Date</label>
<input type="date" class="form-control" id="date" placeholder="Enter the date" name="event_date" required>
</div>
<div class="form-group">
<label for="time">Time</label>
<input type="time" class="form-control" id="time" placeholder="Enter the time" name="event_time" required>
</div>
<div class="form-group">
<label for="venue">Venue</label>
<input type="text" class="form-control" id="venue" placeholder="Enter the venue" name="venue" required>
</div>
<div class="form-group">
<label for="image">Event Poster</label>
<input type="file" class="btn btn-primary btn-block" name="image" required>
<br></br>
<button type="submit" class="btn btn-primary btn-block">Create Event</button>
</div>
</form>
</div>
</div>
<p>
</p>
</div>
<!-- Link to Bootstrap JS and jQuery -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</body>
</html>