-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsqlquery.php
More file actions
executable file
·54 lines (30 loc) · 959 Bytes
/
sqlquery.php
File metadata and controls
executable file
·54 lines (30 loc) · 959 Bytes
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
<?php
include('functions.php');
echo "hello";
$con = mysql_connect("127.0.0.1 ","root","root");
// $con = mysql_connect("localhost","cryptexmod","CSImod2016");
if (!$con)
{
echo "Error: Could not connect to database. Please try again later.";
exit;
}
mysql_select_db("cryptex16",$con);
// $sql_query="insert into register (username,fb_id,email) values ('aryan', '13245' , 'aryan.raj000@outlook.com')";
// mysql_query($sql_query);
$sql_query="SELECT username FROM register";
$r=mysql_query($sql_query);
echo "<select name='user'> ";
while($row=mysql_fetch_array($r))
{
echo "<option value='".$row[0]."'>".$row[0]."</option>";
}
echo "</select>";
if(isset($_SESSION['accessToken']))
{echo $_SESSION['accessToken'];
$college = extract_college();
echo $college;
}
else echo "accessToken not set";
$college = extract_college();
echo $college;
?>