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');
?>
unexpected T_STRING
error log "[Sat Jan 09 18:27:58 2010] [error] [client 127.0.0.1] PHP Parse error: syntax error, unexpected T_STRING in C:\\web\\htdocs\\Filey\\2.php on line
Storing Values taken from a DB...
Using this code it will generate a short list from my database <?phpmysql_connect('localhost','root','');mysql_select_db("clients");$fname = $_POST['firstname'];$SQL = "SELECT *
strptime() equivalent for php4 ?!
Greetings!this is my first post, thank you in advance for your replies. Well, the title says it all, is there an equivalent of the function strptime() for php4 ? I want to parse a timestamp like this
ORA-01017: invalid username/password; logon denied
Dear All,
How to refresh a parent page from a modal popup
Hi,I have a modal popup in which I need to upload a file and store in the database should give a message to the user that file is uploaded and update the parent page when I close the
listing help
Hi,at first, great new design!!! I like it,i got a problem,I want to list some tekst, but there is a users, users can list they own texts, and all teksts, and find words in all texts and in own
Simple email form - Newbie
Hello all,First time poster!I've been asked to create a simple HTML form that submits and sends the information to a particular email.The client is using PHP. Since I have a .NET and C# background,
Echoing a Variable from a Object
How do I get a variable from the new User Class to echo out in this clasS?class MyApp{ function __construct() { global $dbHost; global $dbUser; global $dbPass; global $dbName; $this->DB =
MYSQL INSERT ID NOT WORKING
Code: $id = mysql_insert_id();header("Location: ./?view=$id");Why $id pulling blank nothing?Code: mysql_query("INSERT INTO `prays` (`title`,`prayer`,`time`,`level`,`nameid`,`name`)
Where am I going wrong
Been trying to work this out for hours I have two tables called 'Genres' and 'Films'. Genres contains two columns 'Genre_id' and 'Genre_Name'. Films contains a load of columns, the most important