Document (3)
Document (3)
System with payment integration using HTML, CSS, JavaScript, PHP, and
MySQL. This includes user registration, payment gateway integration, and
email notification.
🌿 1. Project Structure
WorkshopEventSystem/
Index.html (Homepage)
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8”>
</head>
<body>
<div class=”container”>
<div class=”event-card”>
<h2>React Workshop</h2>
<p>Fee: ₹500</p>
</div>
</div>
<script src=”js/script.js”></script>
</body>
</html>
Body {
Background-color: #f0f0f0;
Margin: 0;
Padding: 0;
Color: #333;
Text-align: center;
.container {
Width: 80%;
Max-width: 600px;
Background-color: #fff;
Padding: 20px;
H1 {
Color: #4a90e2;
.event-card {
Background-color: #e3f2fd;
Padding: 15px;
Border-radius: 10px;
Margin-top: 20px;
Button {
Background-color: #007bff;
Color: white;
Border: none;
Padding: 10px 20px;
Cursor: pointer;
Border-radius: 5px;
Button:hover {
Background-color: #0056b3;
Function registerEvent() {
Fetch(‘php/register.php’, {
Method: ‘POST’,
})
.then(data => {
Alert(data.message);
If (data.success) {
Window.location.href = “php/payment.php?amount=500”;
})
} else {
<?php
$host = “localhost”;
$user = “root”;
$password = “”;
$db = “workshop_db”;
If ($conn->connect_error) {
}
?>
<?php
Header(“Content-Type: application/json”);
Include ‘../config.php’;
$name = $data[‘name’];
$email = $data[‘email’];
$event = $data[‘event’];
$fee = $data[‘fee’];
} else {
} else {
?>
<?php
$amount = $_GET[‘amount’];
?>
<!DOCTYPE html>
<html>
<head>
<title>Payment Gateway</title>
</head>
<body>
<script src=https://checkout.razorpay.com/v1/checkout.js
Data-key=”YOUR_RAZORPAY_KEY”
Data-currency=”INR”
Data-name=”Workshop Event”
Data-description=”React Workshop”
Data-prefill.name=”Aditya”
[email protected]
Data-theme.color=”#007bff”>
</script>
</form>
</body>
</html>
<?php
?>
Db/workshop_db.sql
USE workshop_db;
Name VARCHAR(100),
Email VARCHAR(100),
Event VARCHAR(100),
Fee INT,
);