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
Backflush
I am looking for a report in SAP that would give me a list of all parts that are populated with a ba
Snapshot from video
anyone knw how to make a snapshot maker from avi n mkv format.
for example if i give a direct lin
DateObject and Nulls
Hi all,
I have an array mapped to a value object. One of the items in the array is a PHP Date
change text color with a jQuery code
Hihow can I change the text in a asp:TextBox to a different color when I start typing using jQuery?I
problem with query error
First Thanks to those who helped me on my previous posts, and the following code i'm using is not mi
some questions
Hello,
I am looking for the answers for following questions:
1) Does PHP support overl
php/mysql auto logout after 2 hour and reset password
Hi all,
This I hope will make sense. I've the following code which when a user logins in, cr
PHP & Java
Hello,
can PHP code be used inside java code?
Code: [Select]<SCRIPT LANGUAGE=&q
disable all input buttons
Hello Friends,
suppose i do have a file ( file.php ) has a submit button
Code: [Sele
is_dir() problem
Hello,
I'm buidling a php scripts that dynamically get's subfolders from a specific folder.