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
19
Other forums
Modal Popup Help
Hi guys, I have a modal popup with an iframe. How can i send data from a label or textbox to the ifr
array_combine() trouble w/csv file
I have a problem with a piece of code I wrote to import some records from a csv file into mysql. I h
$get problem
Hi Guys ...
can you please tell me what i am doing wrong here
Code: <?php
trim function issues
Hi guys, total noob here...
So I've been tinkering around with a html and am using php to em
Comparing Values
Hi
I'm reading data from a database and this seems to work OK.
Each system has an associat
Converting from one format to another
"I have got a date in DD/MM/YYYY but I need it in MM-DD-YYYY. Help!"
Showing selected item at top of list
Hi,
I've got a list of names which i am fetching from database like this:
$qry = db_query
PHP Include not working
The website is http://www.grlistingservices.com
The code block is as follows:
<
Problems with adding a link to one position in a 'foreach' loop, please help
Hello!
Iam pretty new to programming and I wanna create a table with users from an array. It
Consuming MII WebService in Java WebDynpro
Hello,
We are facing a strange situation...
We define a transaction in MII to