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
I apologise! It's a newbie to PHP feedback form problem!
Hi,
I am a total newbie to PHP. I am also a unemployed and need to get a job. So after 100% r
PHP code for a proxy
I was wondering which function I could use to create an online proxy tool. I was thinking cURL would
Windows 7
Windows 7 default user account control worries experts. Corporate IT departments should be pleased w
Need help with unexpected T-STRING error
I'm a newbie and I'm still learning PHP. However this error has me stumped. I've googled, searched t
Variable Clash
In the past I've had variables clash. For example:
Code: <?php
$c = 5;
$ca
need help in mysql_num_rows()
please tell me what i am doing wrong in this query. it displays this error
Code: Warning: mys
Deleting a record php
Attempting to setup delete a record page. The below code I put together doesn't seem to work.
Having Problem with Date
l have a submit buttom where user have the possibility to add a date to specify when his message s
Contents of variable not echoing
Hey guys, hopefully this is an easy one...
In this line, the variables are not echoing out. T
ClientScript.RegisterClientScriptBlock Issue
This is what I haveview plaincopy to clipboardprint?Protected Sub posrback_Click(ByVal sender As Obj