How could I do this?
Posted on
16th Feb 2014 07:03 pm by
admin
Ive got a simple lottery game, and am using an sql database to keep track of the numbers bought. But, when the person comes to buy the ticket, I have to replay to my process page which ticket they want. How could I do this?
Code: <?php
session_start();
Did you know?Explore Trending and Topic pages for more stories like this.
$page = array();
$page['title'] = 'OpenTheBox | DuffLotto';
$number = 1;
include('header.php');
require_once('/home/davespri/hidden/dbcon.php');
echo '<h1>OpenTheBox - The Original Community Game</h1>';
echo '<center>
Available Numbers
</center>';
$connect = mysql_connect($host, $user, $pass);
if (!$connect) {
die('Unable to connect to Mysql');
}
mysql_select_db('davespri_Gamerecords', $connect);
$result = mysql_query("SELECT * FROM OpenTheBox2");
echo "<center><table border='1'><tr><th>Slot:</th><th>Taken by:</th></tr>";
while ($row = mysql_fetch_array($result)) {
echo "<tr>";
if ($row['Nickname'] = 'NULL') {
$row['Nickname'] = "<center><form action=http://dufflotto.hostcell.net method=post>
<input type=submit value=Buy! name=" . $row['Slot'] . ">
</form>";
}
echo "<td>" . $row['Slot'] . "</td>";
echo "<td>" . $row['Nickname'] . "</td>";
echo "</tr>";
}
echo "</center></table></center>";
include('footer.php');
?>
No comments posted yet
Your Answer:
Login to answer
200
19
Other forums
Change Web page language
i doing this thing first time but i dont find any suitable solution for it. On the demand of user. I
Load file in PHP
I have 2 files. The first is a PHP generated XML file that's dependent by 2 inputs. The second is a
column name cancatenation within PL/SQL
I have a PLSQL store procedure, and the following statement is part of a subquery
fname||lnam
quick question
Hi ..
i have a question
how do i set a var so it displays via an echo
Code: $logo = '&a
javascript in php code causes page to display white
Hi All,
Odd one this, I've got the following code (below) which is a simple log in form. The
Suggestions for Functional module
Hello experts,
I Have done B.Sc(Mathematics) and MCA & have learnt SAP/ABAP but do n
Comma seperated implode & modifying returned string.
I have a PHP post form that posts up to 4 variables. I need whatever variables are passed to be comb
User input in to variable
Hi all,
I'm sure this is very easy but I'm having another brain freeze!
At the end of
To change the name of label on SAP screen XK02.
Hi All,
Can one suggest me how to change the label of an input field of a sap standard s
Reading waves
Hi,
I am trying to find a way of finding the highs and lows on a graph line, the line points