Skip to content

Commit ab0a92a

Browse files
committed
form
1 parent 20f7726 commit ab0a92a

9 files changed

+519
-7
lines changed

Database_Project.zip

1.71 MB
Binary file not shown.

accept.php

+28-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
22
require 'loginsystem/partials/dbconnect.php';
3+
34
$id = $_GET['id'];
45
$query = "select * from `requests` where `id` = '$id' ";
56

@@ -13,11 +14,37 @@
1314
$username = $fetch['username'];
1415
$password = $fetch['password'];
1516
$pack=$fetch['pack'];
16-
$query = "INSERT INTO `accounts` (`firstname`, `lastname`, `username`, `password`, `pack`) VALUES ('$firstname', '$lastname', '$username', '$password','$pack');";
17+
$email=$fetch['email'];
18+
$query = "INSERT INTO `accounts` (`firstname`, `lastname`, `username`, `password`, `pack`, `email`) VALUES ('$firstname', '$lastname', '$username', '$password', '$pack', '$email');";
1719

1820
$result=mysqli_query($con,$query);
1921
if($result){
2022
echo "Account has been accepted.";
23+
// require "PHPmailer/compr.php";
24+
25+
// $mail= new PHPMailer(true);
26+
// $mail-> isSMTP(true);
27+
28+
// $mail-> Host='smtp.gmail.com';
29+
// $mail-> Port=587;
30+
// $mail-> SMTPAuth=true;
31+
// $mail-> SMTPSecure='tls';
32+
// $mail->SMTPAuth=true;
33+
// $mail-> Username='rnrathod37@gmail.com';
34+
// $mail-> Password='Rnrathod@07';
35+
36+
// $mail-> setFrom('rnrathod37@gmail.com');
37+
// $mail-> addAddress($email);
38+
// $mail-> isHTML(true);
39+
40+
// $mail-> Subject='Account Request';
41+
// $mail-> Body='Hii '. $_POST['firstname'].' '. $_POST['lastname'] .' Your Account Request Has been Accepted You can now Login';
42+
// $mail-> SMTPOptions= array('ssl'=>array(
43+
44+
// 'verify_peer'=>false,
45+
// 'verify_peer_name'=>false,
46+
// 'allow_self_signed'=>false
47+
// ));
2148

2249
}else{
2350
echo "Unknown error occured. Please try again.";

contact.php

+25
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,31 @@
1313

1414
if($result){
1515
echo "<script> alert('Your Message has been Submited We will contact You Very Soon'); </script>";
16+
// require "PHPmailer/compr.php";
17+
18+
// $mail= new PHPMailer(true);
19+
// $mail-> isSMTP(true);
20+
21+
// $mail-> Host='smtp.gmail.com';
22+
// $mail-> Port=587;
23+
// $mail-> SMTPAuth=true;
24+
// $mail-> SMTPSecure='tls';
25+
// $mail->SMTPAuth=true;
26+
// $mail-> Username='rnrathod37@gmail.com';
27+
// $mail-> Password='Rnrathod@07';
28+
29+
// $mail-> setFrom('rnrathod37@gmail.com');
30+
// $mail-> addAddress('rnrathod37@gmail.com');
31+
// $mail-> isHTML(true);
32+
33+
// $mail-> Subject='Contact Request';
34+
// $mail-> Body='Hello I am '. $_POST['firstname'].' ,'. $_POST['lastname'] .' <br> My Email is :- '.$_POST['email'].' <br> Message:- '.$_POST['message'];
35+
// $mail-> SMTPOptions= array('ssl'=>array(
36+
37+
// 'verify_peer'=>false,
38+
// 'verify_peer_name'=>false,
39+
// 'allow_self_signed'=>false
40+
// ));
1641
}
1742

1843
else{

index.php

+10-6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
include "login.php";
99
include "signup.php";
10+
include "personalSignup/startersignup.php";
11+
include "personalSignup/mediumsignup.php";
12+
include "personalSignup/completesignup.php";
13+
1014

1115

1216

@@ -476,7 +480,7 @@
476480
<div class="card-subtitle">Just to see what can be achieved</div>
477481
<hr class="cell-divide-hr">
478482
<div class="price">
479-
<span class="currency">$</span><span class="value">199</span>
483+
<span class="currency">Rs</span><span class="value">199</span>
480484
<div class="frequency">monthly</div>
481485
</div>
482486
<hr class="cell-divide-hr">
@@ -503,7 +507,7 @@
503507
</li>
504508
</ul>
505509
<div class="button-wrapper">
506-
<a class="btn-solid-reg page-scroll" data-bs-toggle="modal" data-bs-target="#signupmodal" style="color:black;">REQUEST</a>
510+
<a class="btn-solid-reg page-scroll" data-bs-toggle="modal" data-bs-target="#startersignupmodal" style="color:black;">REQUEST</a>
507511
</div>
508512
</div>
509513
</div>
@@ -517,7 +521,7 @@
517521
<div class="card-subtitle">Very appropriate for the short term</div>
518522
<hr class="cell-divide-hr">
519523
<div class="price">
520-
<span class="currency">$</span><span class="value">299</span>
524+
<span class="currency">Rs</span><span class="value">299</span>
521525
<div class="frequency">monthly</div>
522526
</div>
523527
<hr class="cell-divide-hr">
@@ -544,7 +548,7 @@
544548
</li>
545549
</ul>
546550
<div class="button-wrapper">
547-
<a class="btn-solid-reg page-scroll" data-bs-toggle="modal" data-bs-target="#signupmodal" style="color:black;" >REQUEST</a>
551+
<a class="btn-solid-reg page-scroll" data-bs-toggle="modal" data-bs-target="#mediumsignupmodal" style="color:black;" >REQUEST</a>
548552
</div>
549553
</div>
550554
</div>
@@ -561,7 +565,7 @@
561565
<div class="card-subtitle">Must have for large companies</div>
562566
<hr class="cell-divide-hr">
563567
<div class="price">
564-
<span class="currency">$</span><span class="value">399</span>
568+
<span class="currency">Rs</span><span class="value">399</span>
565569
<div class="frequency">monthly</div>
566570
</div>
567571
<hr class="cell-divide-hr">
@@ -588,7 +592,7 @@
588592
</li>
589593
</ul>
590594
<div class="button-wrapper">
591-
<a class="btn-solid-reg page-scroll" data-bs-toggle="modal" data-bs-target="#signupmodal" style="color:black;">REQUEST</a>
595+
<a class="btn-solid-reg page-scroll" data-bs-toggle="modal" data-bs-target="#completesignupmodal" style="color:black;">REQUEST</a>
592596
</div>
593597
</div>
594598
</div>

personalSignup/completesignup.php

+143
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
<!-- Button trigger modal
2+
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#completesignupmodal">
3+
Launch demo modal
4+
</button> -->
5+
<?php
6+
if((isset($_POST['c']))){
7+
$firstname = $_POST['firstname'];
8+
$lastname = $_POST['lastname'];
9+
$username = $_POST['username'];
10+
$password = $_POST['password'];
11+
// $pack=$_POST['pack'];
12+
$email=$_POST['email'];
13+
$phone=$_POST['phone'];
14+
$address=$_POST['address'];
15+
16+
$query="SELECT username FROM `requests` WHERE username='$username'";
17+
$exists=mysqli_query($con,$query);
18+
19+
$num=mysqli_num_rows($exists);
20+
21+
22+
if($num>0){
23+
echo "<script>alert('Username Already exists Please try Another Username');</script>";
24+
25+
}
26+
27+
// $message = "$lastname $firstname would like to request an account.";
28+
else{
29+
$query = "INSERT INTO `requests` (`firstname`, `lastname`, `username`, `password`, `pack`, `date`,`email`, `phone`, `address`) VALUES ('$firstname', '$lastname', '$username', '$password', 'complete', current_timestamp(), '$email', '$phone', '$address');";
30+
$result=mysqli_query($con,$query);
31+
if($result){
32+
echo "<script>alert('Your account request is now pending for approval. Please wait for confirmation. Thank you.')</script>";
33+
}else{
34+
echo "<script>alert('Unknown error occured.')</script>";
35+
}
36+
}
37+
38+
// require "PHPmailer/compr.php";
39+
40+
// $mail= new PHPMailer(true);
41+
// $mail-> isSMTP(true);
42+
43+
// $mail-> Host='smtp.gmail.com';
44+
// $mail-> Port=587;
45+
// $mail-> SMTPAuth=true;
46+
// $mail-> SMTPSecure='tls';
47+
// $mail->SMTPAuth=true;
48+
// $mail-> Username='rnrathod37@gmail.com';
49+
// $mail-> Password='Rnrathod@07';
50+
51+
// $mail-> setFrom('rnrathod37@gmail.com');
52+
// $mail-> addAddress('rnrathod37@gmail.com');
53+
// $mail-> isHTML(true);
54+
55+
// $mail-> Subject='Account Request';
56+
// $mail-> Body='There is An New Account Request From'. $_POST['firstname'].' '. $_POST['lastname'] .' For Pack :- '.$_POST['pack'];
57+
// $mail-> SMTPOptions= array('ssl'=>array(
58+
59+
// 'verify_peer'=>false,
60+
// 'verify_peer_name'=>false,
61+
// 'allow_self_signed'=>false
62+
// ));
63+
}
64+
65+
?>
66+
<head>
67+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
68+
</head>
69+
<div class="modal fade" id="completesignupmodal" tabindex="-1" aria-labelledby="completesignupmodalLabel" aria-hidden="true">
70+
<div class="modal-dialog">
71+
<div class="modal-content">
72+
<div class="modal-header">
73+
<h5 class="modal-title" id="completesignupmodalLabel">Complete Pack Signup</h5>
74+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
75+
</div>
76+
<div class="modal-body">
77+
<form method="POST">
78+
<div class="mb-3">
79+
<label for="exampleInputname" class="form-label">FirstName</label>
80+
<input type="text" name="firstname" class="form-control" id="exampleInputname" aria-describedby="emailHelp">
81+
82+
</div>
83+
<div class="mb-3">
84+
<label for="exampleInputlast" class="form-label">LastName</label>
85+
<input type="text" name="lastname" class="form-control" id="exampleInputlast" aria-describedby="emailHelp">
86+
87+
</div>
88+
<div class="mb-3">
89+
<label for="exampleInputEmail1" class="form-label">UserName</label>
90+
<input type="text" name="username" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">
91+
92+
</div>
93+
<div class="mb-3">
94+
<label for="exampleInputPassword1" class="form-label">Password</label>
95+
<input type="password" name="password" class="form-control" id="exampleInputPassword1">
96+
</div>
97+
<!-- <div class="form-group">
98+
<label for="exampleInputPack" class="form-label">Select one Pack</label>
99+
<select class="form-control-select" id="rselect" required>
100+
<option class="select-option" value="" disabled selected>Interested in...</option>
101+
<option class="select-option" value="Personal Loan">Starter</option>
102+
<option class="select-option" value="Car Loan">Medium</option>
103+
<option class="select-option" value="House Loan">Complete</option>
104+
</select>
105+
<div class="help-block with-errors"></div>
106+
</div> -->
107+
108+
<div class="mb-3">
109+
<label for="exampleInputPack" class="form-label">Pack Selected</label><br>
110+
<input type="text" class="form-control" value="Complete" id="exampleInputPack">
111+
</div>
112+
113+
114+
<div class="mb-3">
115+
<label for="exampleInputemail" class="form-label">Email</label>
116+
<input type="email" name="email" class="form-control" id="exampleInputemail">
117+
</div>
118+
119+
<div class="mb-3">
120+
<label for="exampleInputPhone" class="form-label">Phone</label>
121+
<input type="number" name="phone" class="form-control" id="exampleInputPhone">
122+
</div>
123+
124+
<div class="mb-3">
125+
<label for="exampleInputPhone" class="form-label">Address</label>
126+
<textarea class="form-control" name="address" id="floatingTextarea2" style="height: 100px"></textarea>
127+
128+
</div>
129+
<div class="form-group checkbox">
130+
<input type="checkbox" id="rterms" value="Agreed-to-Terms" name="rterms" required>I agree with EBase's stated <a href="privacy-policy.html">Privacy Policy</a> and <a href="terms-conditions.html">Terms & Conditions</a>
131+
<div class="help-block with-errors"></div>
132+
</div>
133+
<div class="text-center">
134+
135+
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
136+
<button type="submit" name="c" class="btn btn-primary col-3 my-3">SignUp</button>
137+
</div>
138+
</form>
139+
</div>
140+
141+
</div>
142+
</div>
143+
</div>

0 commit comments

Comments
 (0)