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
Final year project, please point me in the right direction
hi there for my final year project I'm aiming to build a php script shell to use as an expert system
Displaying an image using echo command
I had done a query on my database, one of the fields being an image reference to a directory where a
Need help adding a timestamp to my filename/variable
Hello,
I'm kind of stupid when it comes to php and I need a tiny bit of help. I've got a f
Problems with array
This code is the last lines in an upload script that uploads 4 images at the same time and writes th
Locking mysql tables with php
Hi
BACKGROUND:
I have multiple instances of the same php script running in a WAMP environ
Need help in log in and log out?
hi there all of u. i have recently created a site for someone. i have placed log in and log out and
Data type mismatch
Hi,
I am migrating data from algol to c.I mapped real datatype in algol to double datatype in
Creating XML with php
I need to creat an XML with php and have successfully produced a valid output.
The problem I hav
Secure FTP
Hi experts,
There is no SFTP action in MII workbench.
This means it needs developing custo
insert mysql embeded videos as blobs?
Using TinyMCE my client will be able to embed images and flash videos into large columns of text whi