Fetch data based on the logged in user information from two different tables
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I have a log-in form where the user input his username and password. Every user has his gradelevel assign and section.
My main concern is my code cannot determine whose user is currently logged in so it cannot get the gradeassign and sectionassign of it so all of data from the tbl_students are displayed.
Hope you can help me with this. Thanks
Here's the table structure
tbl_user
| id | Name | gradeassign | sectionassign | Username | Password
----------------------------------
| 1 | XXXX | 2 | 3 | xxx | xxx
| 2 | YYYY | 1 | 2 | |
| 3 | ZZZZ | 1 | 6 | |
tbl_students
| id | Name | Grade | Section
----------------------------------
| 1 | George| 2 | 3
| 2 | YYYY | 1 | 2
| 3 | ZZZZ | 1 | 1
If the user XXX log-in, the result and date fetched must be:
| id | Name | Grade | Section |
----------------------------------
| 1 | George | 2 | 3 |
Here's my code for the log-in session of the user.
<?php
require_once('connection.php');
session_start();
if(isset($_POST['Login']))
{
if(empty($_POST['Username']) || empty($_POST['Password']))
{
header("location:faculty.php?Empty=All fields are required");
}
else
{
$query="select * from facultyagain where Username='".$_POST['Username']."'
and Pass='".$_POST['Password']."'";
$result=mysqli_query($con,$query);
if(mysqli_fetch_assoc($result))
{
$_SESSION['User']=$_POST['Username'];
header("location:faculty2.php");
}
else
{
header("location:faculty.php?Invalid= Unauthorized Access ");
}
}
}
else
{
echo 'Not Working Now Guys';
}
?>
--------Here's the query I've tried to fetch my desired result.
<?php
$connect = mysqli_connect("localhost", "root", "", "db");
$sql = "SELECT * FROM tbl_students INNER JOIN tbl_user WHERE
tbl_user.gradeassign =
tbl_students.grade AND tbl_user.sectionassign = tbl_students.section";
$result = mysqli_query($connect, $sql);
?>
<?php
if(mysqli_num_rows($result) > 0)
{
while($row = mysqli_fetch_array($result))
{
?>
<tr>
<td><?php echo $row["id"];?></td>
<td><?php echo $row["name"]; ?></td>
<td><?php echo $row["grade"]; ?></td>
<td><?php echo $row["section"]; ?></td>
</tr>
<?php
}
}
?>
php mysqli
add a comment |
I have a log-in form where the user input his username and password. Every user has his gradelevel assign and section.
My main concern is my code cannot determine whose user is currently logged in so it cannot get the gradeassign and sectionassign of it so all of data from the tbl_students are displayed.
Hope you can help me with this. Thanks
Here's the table structure
tbl_user
| id | Name | gradeassign | sectionassign | Username | Password
----------------------------------
| 1 | XXXX | 2 | 3 | xxx | xxx
| 2 | YYYY | 1 | 2 | |
| 3 | ZZZZ | 1 | 6 | |
tbl_students
| id | Name | Grade | Section
----------------------------------
| 1 | George| 2 | 3
| 2 | YYYY | 1 | 2
| 3 | ZZZZ | 1 | 1
If the user XXX log-in, the result and date fetched must be:
| id | Name | Grade | Section |
----------------------------------
| 1 | George | 2 | 3 |
Here's my code for the log-in session of the user.
<?php
require_once('connection.php');
session_start();
if(isset($_POST['Login']))
{
if(empty($_POST['Username']) || empty($_POST['Password']))
{
header("location:faculty.php?Empty=All fields are required");
}
else
{
$query="select * from facultyagain where Username='".$_POST['Username']."'
and Pass='".$_POST['Password']."'";
$result=mysqli_query($con,$query);
if(mysqli_fetch_assoc($result))
{
$_SESSION['User']=$_POST['Username'];
header("location:faculty2.php");
}
else
{
header("location:faculty.php?Invalid= Unauthorized Access ");
}
}
}
else
{
echo 'Not Working Now Guys';
}
?>
--------Here's the query I've tried to fetch my desired result.
<?php
$connect = mysqli_connect("localhost", "root", "", "db");
$sql = "SELECT * FROM tbl_students INNER JOIN tbl_user WHERE
tbl_user.gradeassign =
tbl_students.grade AND tbl_user.sectionassign = tbl_students.section";
$result = mysqli_query($connect, $sql);
?>
<?php
if(mysqli_num_rows($result) > 0)
{
while($row = mysqli_fetch_array($result))
{
?>
<tr>
<td><?php echo $row["id"];?></td>
<td><?php echo $row["name"]; ?></td>
<td><?php echo $row["grade"]; ?></td>
<td><?php echo $row["section"]; ?></td>
</tr>
<?php
}
}
?>
php mysqli
3
My main concern is my code cannot determine whose user is... and my main concern is about the high vulnerability of your query for sql injection..fix this first
– B001ᛦ
Jan 3 at 11:25
What is the realtion between XXX and George?
– Penguine
Jan 3 at 11:35
George will be displayed since its section and grade corresponds with the gradeassign and sectionassign of the user who logged in.
– Mystery
Jan 3 at 11:42
add a comment |
I have a log-in form where the user input his username and password. Every user has his gradelevel assign and section.
My main concern is my code cannot determine whose user is currently logged in so it cannot get the gradeassign and sectionassign of it so all of data from the tbl_students are displayed.
Hope you can help me with this. Thanks
Here's the table structure
tbl_user
| id | Name | gradeassign | sectionassign | Username | Password
----------------------------------
| 1 | XXXX | 2 | 3 | xxx | xxx
| 2 | YYYY | 1 | 2 | |
| 3 | ZZZZ | 1 | 6 | |
tbl_students
| id | Name | Grade | Section
----------------------------------
| 1 | George| 2 | 3
| 2 | YYYY | 1 | 2
| 3 | ZZZZ | 1 | 1
If the user XXX log-in, the result and date fetched must be:
| id | Name | Grade | Section |
----------------------------------
| 1 | George | 2 | 3 |
Here's my code for the log-in session of the user.
<?php
require_once('connection.php');
session_start();
if(isset($_POST['Login']))
{
if(empty($_POST['Username']) || empty($_POST['Password']))
{
header("location:faculty.php?Empty=All fields are required");
}
else
{
$query="select * from facultyagain where Username='".$_POST['Username']."'
and Pass='".$_POST['Password']."'";
$result=mysqli_query($con,$query);
if(mysqli_fetch_assoc($result))
{
$_SESSION['User']=$_POST['Username'];
header("location:faculty2.php");
}
else
{
header("location:faculty.php?Invalid= Unauthorized Access ");
}
}
}
else
{
echo 'Not Working Now Guys';
}
?>
--------Here's the query I've tried to fetch my desired result.
<?php
$connect = mysqli_connect("localhost", "root", "", "db");
$sql = "SELECT * FROM tbl_students INNER JOIN tbl_user WHERE
tbl_user.gradeassign =
tbl_students.grade AND tbl_user.sectionassign = tbl_students.section";
$result = mysqli_query($connect, $sql);
?>
<?php
if(mysqli_num_rows($result) > 0)
{
while($row = mysqli_fetch_array($result))
{
?>
<tr>
<td><?php echo $row["id"];?></td>
<td><?php echo $row["name"]; ?></td>
<td><?php echo $row["grade"]; ?></td>
<td><?php echo $row["section"]; ?></td>
</tr>
<?php
}
}
?>
php mysqli
I have a log-in form where the user input his username and password. Every user has his gradelevel assign and section.
My main concern is my code cannot determine whose user is currently logged in so it cannot get the gradeassign and sectionassign of it so all of data from the tbl_students are displayed.
Hope you can help me with this. Thanks
Here's the table structure
tbl_user
| id | Name | gradeassign | sectionassign | Username | Password
----------------------------------
| 1 | XXXX | 2 | 3 | xxx | xxx
| 2 | YYYY | 1 | 2 | |
| 3 | ZZZZ | 1 | 6 | |
tbl_students
| id | Name | Grade | Section
----------------------------------
| 1 | George| 2 | 3
| 2 | YYYY | 1 | 2
| 3 | ZZZZ | 1 | 1
If the user XXX log-in, the result and date fetched must be:
| id | Name | Grade | Section |
----------------------------------
| 1 | George | 2 | 3 |
Here's my code for the log-in session of the user.
<?php
require_once('connection.php');
session_start();
if(isset($_POST['Login']))
{
if(empty($_POST['Username']) || empty($_POST['Password']))
{
header("location:faculty.php?Empty=All fields are required");
}
else
{
$query="select * from facultyagain where Username='".$_POST['Username']."'
and Pass='".$_POST['Password']."'";
$result=mysqli_query($con,$query);
if(mysqli_fetch_assoc($result))
{
$_SESSION['User']=$_POST['Username'];
header("location:faculty2.php");
}
else
{
header("location:faculty.php?Invalid= Unauthorized Access ");
}
}
}
else
{
echo 'Not Working Now Guys';
}
?>
--------Here's the query I've tried to fetch my desired result.
<?php
$connect = mysqli_connect("localhost", "root", "", "db");
$sql = "SELECT * FROM tbl_students INNER JOIN tbl_user WHERE
tbl_user.gradeassign =
tbl_students.grade AND tbl_user.sectionassign = tbl_students.section";
$result = mysqli_query($connect, $sql);
?>
<?php
if(mysqli_num_rows($result) > 0)
{
while($row = mysqli_fetch_array($result))
{
?>
<tr>
<td><?php echo $row["id"];?></td>
<td><?php echo $row["name"]; ?></td>
<td><?php echo $row["grade"]; ?></td>
<td><?php echo $row["section"]; ?></td>
</tr>
<?php
}
}
?>
php mysqli
php mysqli
edited Jan 3 at 12:36
Billal Begueradj
6,058132950
6,058132950
asked Jan 3 at 11:22
MysteryMystery
42
42
3
My main concern is my code cannot determine whose user is... and my main concern is about the high vulnerability of your query for sql injection..fix this first
– B001ᛦ
Jan 3 at 11:25
What is the realtion between XXX and George?
– Penguine
Jan 3 at 11:35
George will be displayed since its section and grade corresponds with the gradeassign and sectionassign of the user who logged in.
– Mystery
Jan 3 at 11:42
add a comment |
3
My main concern is my code cannot determine whose user is... and my main concern is about the high vulnerability of your query for sql injection..fix this first
– B001ᛦ
Jan 3 at 11:25
What is the realtion between XXX and George?
– Penguine
Jan 3 at 11:35
George will be displayed since its section and grade corresponds with the gradeassign and sectionassign of the user who logged in.
– Mystery
Jan 3 at 11:42
3
3
My main concern is my code cannot determine whose user is... and my main concern is about the high vulnerability of your query for sql injection..fix this first
– B001ᛦ
Jan 3 at 11:25
My main concern is my code cannot determine whose user is... and my main concern is about the high vulnerability of your query for sql injection..fix this first
– B001ᛦ
Jan 3 at 11:25
What is the realtion between XXX and George?
– Penguine
Jan 3 at 11:35
What is the realtion between XXX and George?
– Penguine
Jan 3 at 11:35
George will be displayed since its section and grade corresponds with the gradeassign and sectionassign of the user who logged in.
– Mystery
Jan 3 at 11:42
George will be displayed since its section and grade corresponds with the gradeassign and sectionassign of the user who logged in.
– Mystery
Jan 3 at 11:42
add a comment |
1 Answer
1
active
oldest
votes
You storing username
after login. Please store userId
in session instead of
username. Then try this query to fetch results.
WARNING SQL QUERY IS VULNERABLE FOR SQL-INJECTION
<?php
session_start();
$connect = mysqli_connect("localhost", "root", "", "db");
$current_user_id = $_SESSION['User'];
//I recommend you to validate session for empty or non authorized user.
$sql = "SELECT * FROM tbl_students WHERE tbl_students.id = '$current_user_id' INNER JOIN tbl_user ON tbl_user.id = tbl_students.id";
$result = mysqli_query($connect, $sql);
?>
<?php
if(mysqli_num_rows($result) > 0)
{
while($row = mysqli_fetch_array($result))
{
?>
<tr>
<td><?php echo $row["id"];?></td>
<td><?php echo $row["name"]; ?></td>
<td><?php echo $row["grade"]; ?></td>
<td><?php echo $row["section"]; ?></td>
</tr>
<?php
}
}
?>
All data which grade and section corresponds with the user gradeassign and sectionassign will be fetch, regardless of ID. How can I achieve that?
– Mystery
Jan 3 at 11:46
$current_user_id = $_SESSION['User']; And wait, where does "USER" came from? Please enlighten me sir. Thankyou so much
– Mystery
Jan 3 at 11:50
First you should design the db properly, There isID
but i really don't know, that isrow_id
orstudent_id
or anything else...
– Banujan Balendrakumar
Jan 3 at 11:50
You are already setting the ` $_SESSION['User'];` when user login
– Banujan Balendrakumar
Jan 3 at 11:51
The data will be displayed are all based from the user gradeassign and section assign. How sir?
– Mystery
Jan 3 at 11:53
|
show 3 more comments
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54021337%2ffetch-data-based-on-the-logged-in-user-information-from-two-different-tables%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You storing username
after login. Please store userId
in session instead of
username. Then try this query to fetch results.
WARNING SQL QUERY IS VULNERABLE FOR SQL-INJECTION
<?php
session_start();
$connect = mysqli_connect("localhost", "root", "", "db");
$current_user_id = $_SESSION['User'];
//I recommend you to validate session for empty or non authorized user.
$sql = "SELECT * FROM tbl_students WHERE tbl_students.id = '$current_user_id' INNER JOIN tbl_user ON tbl_user.id = tbl_students.id";
$result = mysqli_query($connect, $sql);
?>
<?php
if(mysqli_num_rows($result) > 0)
{
while($row = mysqli_fetch_array($result))
{
?>
<tr>
<td><?php echo $row["id"];?></td>
<td><?php echo $row["name"]; ?></td>
<td><?php echo $row["grade"]; ?></td>
<td><?php echo $row["section"]; ?></td>
</tr>
<?php
}
}
?>
All data which grade and section corresponds with the user gradeassign and sectionassign will be fetch, regardless of ID. How can I achieve that?
– Mystery
Jan 3 at 11:46
$current_user_id = $_SESSION['User']; And wait, where does "USER" came from? Please enlighten me sir. Thankyou so much
– Mystery
Jan 3 at 11:50
First you should design the db properly, There isID
but i really don't know, that isrow_id
orstudent_id
or anything else...
– Banujan Balendrakumar
Jan 3 at 11:50
You are already setting the ` $_SESSION['User'];` when user login
– Banujan Balendrakumar
Jan 3 at 11:51
The data will be displayed are all based from the user gradeassign and section assign. How sir?
– Mystery
Jan 3 at 11:53
|
show 3 more comments
You storing username
after login. Please store userId
in session instead of
username. Then try this query to fetch results.
WARNING SQL QUERY IS VULNERABLE FOR SQL-INJECTION
<?php
session_start();
$connect = mysqli_connect("localhost", "root", "", "db");
$current_user_id = $_SESSION['User'];
//I recommend you to validate session for empty or non authorized user.
$sql = "SELECT * FROM tbl_students WHERE tbl_students.id = '$current_user_id' INNER JOIN tbl_user ON tbl_user.id = tbl_students.id";
$result = mysqli_query($connect, $sql);
?>
<?php
if(mysqli_num_rows($result) > 0)
{
while($row = mysqli_fetch_array($result))
{
?>
<tr>
<td><?php echo $row["id"];?></td>
<td><?php echo $row["name"]; ?></td>
<td><?php echo $row["grade"]; ?></td>
<td><?php echo $row["section"]; ?></td>
</tr>
<?php
}
}
?>
All data which grade and section corresponds with the user gradeassign and sectionassign will be fetch, regardless of ID. How can I achieve that?
– Mystery
Jan 3 at 11:46
$current_user_id = $_SESSION['User']; And wait, where does "USER" came from? Please enlighten me sir. Thankyou so much
– Mystery
Jan 3 at 11:50
First you should design the db properly, There isID
but i really don't know, that isrow_id
orstudent_id
or anything else...
– Banujan Balendrakumar
Jan 3 at 11:50
You are already setting the ` $_SESSION['User'];` when user login
– Banujan Balendrakumar
Jan 3 at 11:51
The data will be displayed are all based from the user gradeassign and section assign. How sir?
– Mystery
Jan 3 at 11:53
|
show 3 more comments
You storing username
after login. Please store userId
in session instead of
username. Then try this query to fetch results.
WARNING SQL QUERY IS VULNERABLE FOR SQL-INJECTION
<?php
session_start();
$connect = mysqli_connect("localhost", "root", "", "db");
$current_user_id = $_SESSION['User'];
//I recommend you to validate session for empty or non authorized user.
$sql = "SELECT * FROM tbl_students WHERE tbl_students.id = '$current_user_id' INNER JOIN tbl_user ON tbl_user.id = tbl_students.id";
$result = mysqli_query($connect, $sql);
?>
<?php
if(mysqli_num_rows($result) > 0)
{
while($row = mysqli_fetch_array($result))
{
?>
<tr>
<td><?php echo $row["id"];?></td>
<td><?php echo $row["name"]; ?></td>
<td><?php echo $row["grade"]; ?></td>
<td><?php echo $row["section"]; ?></td>
</tr>
<?php
}
}
?>
You storing username
after login. Please store userId
in session instead of
username. Then try this query to fetch results.
WARNING SQL QUERY IS VULNERABLE FOR SQL-INJECTION
<?php
session_start();
$connect = mysqli_connect("localhost", "root", "", "db");
$current_user_id = $_SESSION['User'];
//I recommend you to validate session for empty or non authorized user.
$sql = "SELECT * FROM tbl_students WHERE tbl_students.id = '$current_user_id' INNER JOIN tbl_user ON tbl_user.id = tbl_students.id";
$result = mysqli_query($connect, $sql);
?>
<?php
if(mysqli_num_rows($result) > 0)
{
while($row = mysqli_fetch_array($result))
{
?>
<tr>
<td><?php echo $row["id"];?></td>
<td><?php echo $row["name"]; ?></td>
<td><?php echo $row["grade"]; ?></td>
<td><?php echo $row["section"]; ?></td>
</tr>
<?php
}
}
?>
answered Jan 3 at 11:33
Banujan BalendrakumarBanujan Balendrakumar
9921213
9921213
All data which grade and section corresponds with the user gradeassign and sectionassign will be fetch, regardless of ID. How can I achieve that?
– Mystery
Jan 3 at 11:46
$current_user_id = $_SESSION['User']; And wait, where does "USER" came from? Please enlighten me sir. Thankyou so much
– Mystery
Jan 3 at 11:50
First you should design the db properly, There isID
but i really don't know, that isrow_id
orstudent_id
or anything else...
– Banujan Balendrakumar
Jan 3 at 11:50
You are already setting the ` $_SESSION['User'];` when user login
– Banujan Balendrakumar
Jan 3 at 11:51
The data will be displayed are all based from the user gradeassign and section assign. How sir?
– Mystery
Jan 3 at 11:53
|
show 3 more comments
All data which grade and section corresponds with the user gradeassign and sectionassign will be fetch, regardless of ID. How can I achieve that?
– Mystery
Jan 3 at 11:46
$current_user_id = $_SESSION['User']; And wait, where does "USER" came from? Please enlighten me sir. Thankyou so much
– Mystery
Jan 3 at 11:50
First you should design the db properly, There isID
but i really don't know, that isrow_id
orstudent_id
or anything else...
– Banujan Balendrakumar
Jan 3 at 11:50
You are already setting the ` $_SESSION['User'];` when user login
– Banujan Balendrakumar
Jan 3 at 11:51
The data will be displayed are all based from the user gradeassign and section assign. How sir?
– Mystery
Jan 3 at 11:53
All data which grade and section corresponds with the user gradeassign and sectionassign will be fetch, regardless of ID. How can I achieve that?
– Mystery
Jan 3 at 11:46
All data which grade and section corresponds with the user gradeassign and sectionassign will be fetch, regardless of ID. How can I achieve that?
– Mystery
Jan 3 at 11:46
$current_user_id = $_SESSION['User']; And wait, where does "USER" came from? Please enlighten me sir. Thankyou so much
– Mystery
Jan 3 at 11:50
$current_user_id = $_SESSION['User']; And wait, where does "USER" came from? Please enlighten me sir. Thankyou so much
– Mystery
Jan 3 at 11:50
First you should design the db properly, There is
ID
but i really don't know, that is row_id
or student_id
or anything else...– Banujan Balendrakumar
Jan 3 at 11:50
First you should design the db properly, There is
ID
but i really don't know, that is row_id
or student_id
or anything else...– Banujan Balendrakumar
Jan 3 at 11:50
You are already setting the ` $_SESSION['User'];` when user login
– Banujan Balendrakumar
Jan 3 at 11:51
You are already setting the ` $_SESSION['User'];` when user login
– Banujan Balendrakumar
Jan 3 at 11:51
The data will be displayed are all based from the user gradeassign and section assign. How sir?
– Mystery
Jan 3 at 11:53
The data will be displayed are all based from the user gradeassign and section assign. How sir?
– Mystery
Jan 3 at 11:53
|
show 3 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54021337%2ffetch-data-based-on-the-logged-in-user-information-from-two-different-tables%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
3
My main concern is my code cannot determine whose user is... and my main concern is about the high vulnerability of your query for sql injection..fix this first
– B001ᛦ
Jan 3 at 11:25
What is the realtion between XXX and George?
– Penguine
Jan 3 at 11:35
George will be displayed since its section and grade corresponds with the gradeassign and sectionassign of the user who logged in.
– Mystery
Jan 3 at 11:42