Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
F1-Website
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
suleman.hussain
F1-Website
Commits
13313c84
Commit
13313c84
authored
Jan 25, 2023
by
suleman.hussain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dcfsdf
parent
84dd5b96
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
152 additions
and
0 deletions
+152
-0
drivers.php
drivers.php
+79
-0
f1_background.jpg
f1_background.jpg
+0
-0
home.php
home.php
+35
-0
main.js
main.js
+9
-0
style.css
style.css
+29
-0
No files found.
f1_test
.php
→
drivers
.php
View file @
13313c84
<!DOCTYPE html>
<html>
<head>
<title>
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"style.css"
>
</head>
<body>
<?php
// Connects to database
$conn
=
mysqli_connect
(
"ysjcs.net"
,
"suleman.hussain"
,
"WF8L8LE8"
,
"sulemanhussain"
);
if
(
!
$conn
)
{
die
(
"Connection failed: "
.
mysqli_connect_error
());
}
$sql
=
"SELECT * FROM Drivers"
;
$results
=
mysqli_query
(
$conn
,
$sql
);
/*
while($row = mysqli_fetch_assoc($results)) {
echo $row["First_Name"];
echo"<br/>";
foreach($row as $row){
echo $row . "|\t|";
}
echo"<br/>";
}
*/
// Table
echo
"<table>"
;
echo
"<tr>"
;
echo
"<th>First Name</th>"
;
echo
"<th>Last Name</th>"
;
echo
"<th>DoB</th>"
;
/*
echo "</tr>";
while($row = mysqli_fetch_assoc($results)){
echo "<tr>";
...
...
@@ -41,29 +27,53 @@ while($row = mysqli_fetch_assoc($results)){
echo "</tr>";
}
echo "</table>";
*/
echo
'<form action="submit.php" method="post">'
;
if
(
isset
(
$_POST
[
'search'
]))
{
$search_term
=
$_POST
[
'search_term'
];
echo
'<label>Driver ID:</label>'
;
echo
'<input type="text" name="Driver_ID">'
;
echo
'<br>'
;
echo
'<label>First Name:</label>'
;
echo
'<input type="text" name="First_Name">'
;
echo
'<br>'
;
echo
'<label>Last Name:</label>'
;
echo
'<input type="text" name="Last_Name">'
;
echo
'<br>'
;
echo
'<label>Team ID:</label>'
;
echo
'<input type="text" name="Team_ID">'
;
echo
'<br>'
;
echo
'<label>Driver Number:</label>'
;
echo
'<input type="text" name="Driver_Number">'
;
// Connect to the database
$conn
=
mysqli_connect
(
"ysjcs.net"
,
"suleman.hussain"
,
"WF8L8LE8"
,
"sulemanhussain"
);
echo
'<button type="submit">Submit</button>'
;
// Call the stored procedure
$results
=
mysqli_query
(
$conn
,
"CALL search_proc('
$search_term
')"
);
// Display the results
echo
"</tr>"
;
while
(
$row
=
mysqli_fetch_assoc
(
$results
)){
echo
"<tr>"
;
echo
"<td>"
.
$row
[
"First_Name"
]
.
"</td>"
;
echo
"<td>"
.
$row
[
"Last_Name"
]
.
"</td>"
;
echo
"<td>"
.
$row
[
"DoB"
]
.
"</td>"
;
echo
"</tr>"
;
}
echo
"</table>"
;
}
?>
<head>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"style.css"
>
<script
src=
"main.js"
></script>
</head>
<h2
id=
"header"
><span
class=
"highlight"
>
Select to view
</span></h2>
<button
class=
"Button"
onclick=
"location.href='home.php'"
>
<span>
Home
</span></button>
<button
class=
"Button"
onclick=
"location.href='drivers.php'"
>
<span>
Drivers
</span></button>
<form
method=
"post"
action=
""
>
<input
type=
"text"
name=
"search_term"
id=
"search-bar"
placeholder=
"Search Driver First Name"
>
<button
type=
"submit"
name=
"search"
id=
"search-btn"
>
<i
class=
"fa fa-search"
></i>
</button>
</form>
?>
</body>
</html>
\ No newline at end of file
f1_background.jpg
View replaced file @
84dd5b96
View file @
13313c84
This diff is collapsed.
Click to expand it.
home.php
0 → 100644
View file @
13313c84
<!DOCTYPE html>
<html>
<body>
<?php
// Connects to database
$conn
=
mysqli_connect
(
"ysjcs.net"
,
"suleman.hussain"
,
"WF8L8LE8"
,
"sulemanhussain"
);
if
(
!
$conn
)
{
die
(
"Connection failed: "
.
mysqli_connect_error
());
}
$sql
=
"SELECT * FROM Drivers"
;
$results
=
mysqli_query
(
$conn
,
$sql
);
?>
<head>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"style.css"
>
<script
src=
"main.js"
></script>
</head>
<h2
id=
"header"
><span
class=
"highlight"
>
Select to view
</span></h2>
<button
class=
"Button"
onclick=
"location.href='home.php'"
>
<span>
Home
</span></button>
<button
class=
"Button"
onclick=
"location.href='drivers.php'"
>
<span>
Drivers
</span></button>
</body>
</html>
\ No newline at end of file
main.js
0 → 100644
View file @
13313c84
const
h2
=
document
.
getElementById
(
"
header
"
);
const
h2Text
=
h2
.
innerHTML
;
const
h2Wrapper
=
document
.
createElement
(
"
span
"
);
h2Wrapper
.
style
.
backgroundColor
=
"
#F5A623
"
;
h2Wrapper
.
style
.
color
=
"
#fff
"
;
h2Wrapper
.
style
.
padding
=
"
0.2em
"
;
h2Wrapper
.
innerHTML
=
h2Text
;
h2
.
innerHTML
=
""
;
h2
.
appendChild
(
h2Wrapper
);
style.css
View file @
13313c84
...
...
@@ -20,3 +20,32 @@ form {
transform
:
translate
(
-50%
,
-50%
);
}
button
{
background-color
:
blue
;
/* sets the background color of the button */
color
:
white
;
/* sets the text color of the button */
padding
:
10px
20px
;
/* sets the padding around the text inside the button */
border
:
none
;
/* removes the border around the button */
border-radius
:
5px
;
/* adds rounded corners to the button */
font-size
:
16px
;
/* sets the font size of the text inside the button */
cursor
:
pointer
;
/* changes the cursor to a pointer when hovered over the button */
transition
:
transform
0.3s
ease
;
/* adds a transition to the transform property */
}
button
:hover
{
background-color
:
red
;
/* changes the background color of the button when hovered over */
transform
:
scale
(
1.1
);
/* scales the button up by 10% when hovered over */
transform
:
rotate
(
180deg
);
}
.highlight
{
background-color
:
#F5A623
;
color
:
#fff
;
padding
:
0.2em
;
}
#search-form
{
display
:
flex
;
justify-content
:
flex-end
;
align-items
:
center
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment