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

mr8m - reverse document
Friends,

I'm trying to reverse a document held by MIRO, but it reports the message balan

explode() function problem maybe
Hi I'm having trouble searching my database. When I type two words in the search field it only searc

Data Function is Its Not working IN IE8
This is my first time to use formums. I hope i can get solution for this problem. view plaincopy to

Last character removed
I have created a string from an array. I have inserted commas from my form values. I am trying to re

Update Database
Hi All,


I have a problem with this:

Code: [Select]<?php
session_start();

Extracting Long text from message class with parameters
Hi,

I would like to extract the long text from a message class. However, the long text ha

Save file by click
Hello.
I'm not understand how to save file from page. I'd like make link to file with save abil

Simple Variable Question
Hi everyone.... again,

I am really getting into php still. Learning more every day. I love it

Hotlinking Picasa as the image folder of a website
Hi there PHP freaks, I would like to create a private album in Picasa to use it as the image folder

Check before inserting in DB ???
This is my code
---------------
if ( $_POST ['Submit'])
{{
$username = $_POST ['usernm

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