-
Notifications
You must be signed in to change notification settings - Fork 0
/
buy.php
104 lines (101 loc) · 2.77 KB
/
buy.php
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE html>
<!doctype html>
<?php require_once("include/connection.php"); ?>
<?php include("include/function.php");?>
<html>
<meta charset="UTF-8">
<head>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/foundation.css">
<link rel="stylesheet" type="text/css" href="css/radio.css">
<link rel="stylesheet" type="text/css" href="css/b.css">
<style>
p.small {
line-height: 20%;
}
</style>
<style>
body {
background: url(Images/nk.jpg) no-repeat center center fixed #000;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: 100% 100%;
overflow: hidden;
}
.over{
position:absolute;
bottom: 10px;
right:10px;
background-color:rgba(185, 68, 49, 0.9);
}
.topq{
height:80px;
width:1000px;
position:relative;
left:120px;
background:rgba(255,255,255,0.5);
}
.mid{
height: 530px;
width:1000px;
position:relative;
left:120px;
border: 1px solid black;
background:rgba(0,0,0,0.2);
padding-left:80px;
}
</style>
</head>
<body>
<?php
echo'<div class="panel radius topq">';
if(isset($_POST["pid1"]))
{
$val=$_POST["pid1"];
}
else $val=$_SESSION['pn'];
$sql = "SELECT id, Name, type,price,points FROM players";
$result = mysql_query($sql,$connection);
while($row = mysql_fetch_array($result))
{
echo'<p class="small">';
if($val==utf8_encode($row["Name"]))
echo "<h1><div align='center'style='position:relative;bottom:10px;'><font 150% color='black'>".utf8_encode($row["Name"])."</font></div></h1>";
echo "</p>";
}
echo"</div>";
?>
<div class="panel mid">
<form action="main.php" method="post">
<div class="pad">
<h3 style="color:white;padding-left:80px">TEAMS</h3>
<?php
$sk=$_SESSION['teams'];
foreach ($sk as $key=>$val)
{
echo"<div class='divi'><input type='radio' name='tid' id='$key' class='radio' value='$key'/><label for='$key' class='lab'>$val</label></div></br>";
}
?>
</div>
<DIV class="container">
<section class="webdesigntuts-workshop">
<form action="main.php" method="POST">
<input type="text" name="pri" placeholder="Final Price...">
<button>Buy Now</button>
<?php if(isset($_POST["pid1"])){
$val=mysql_real_escape_string($_POST["pid1"]);
}
else $val=mysql_real_escape_string($_SESSION['pn']);
$sql = 'SELECT id, Name, type,price,points FROM players WHERE Name= "'.$val.'"';
$result = mysql_query($sql,$connection);
$row = mysql_fetch_array($result);
$_SESSION["pn"]=$val;
?>
</form>
</section>
</DIV>
</div>
<div class="over button alert small"><a href=bid.php style="color:white pt-page-moveToLeft">BACK</a></div>
</body>
</html>