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();
$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 Like 19 Dislike
Previous forums Next forums
Other forums

How to change Time Zone
HI
I want to change the time zone of the server to another country.How can do that?

Thanks

Reading Most Recent CSV File in Directory
I thought I had wrapped this project up, but found out that the program I use to FTP a csv file to m

Grids not displaying decimals, and behaving differently on different PCs?
Hello,

I coded a relatively simple MII application that allows data from a form to be add

ereg_replace issue
hi there people

i have this code happening with regards to my wamp server. is this something

Just a white page
Okay so, my website, when I click SignUp on it it takes me to /join.php but its a complete white pag

Post PHP form to non-existing page
The company that I work for host their PHP code on IIS on a Windows server, no Apache, so no mod_rew

first few characters only
hi, does anyone know how to use PHP to take the first few words of a text and limit them? i have see

Select Rows as Columns..
is there a way to select COLUMN_NAME from user_tab_columns where table_name='TABLENAME';
and ha

Passing variables with pagination - iterating through unique id per link
Hi everyone,
I have seen a few topics like this one. Still cant find the specific thing, so I am

ASP.NET 2.0 - Enter Key - Default Submit Button
Hi,One of the most annoying things in developing web pages is handling the "Enter key" for form subm

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash