在表单提交上保存用户总条目

时间:2016-09-09 15:05:08

标签: php cookies

现在我的代码是按下提交按钮时的代码:

date_default_timezone_set("Europe/Amsterdam");
$timestamp = time();
$date = strtoupper(date("d/M/Y H:i"));
mysqli_query($con, "INSERT INTO EnteredTickets (Ticket, Person) VALUES ('$ticketno', '$fullname')");
mysqli_query($con, "UPDATE SoldTickets SET Redeemed=1 WHERE Ticket = '$ticketno' LIMIT 1");
mysqli_query($con, "INSERT INTO ActivityLog (Type, Ticket, Date, Timestamp, Othername) VALUES (3, '$ticketno', '$date', $timestamp, '$fullname')");

echo '<div class="alert alert-success" role="alert">
<strong>Congratulations!</strong><br> You have succesfully been entered into the current lottery!<br />
<center><strong>Entry details</strong><br />
Name: '.$fullname.'<br />
Ticket Number: '.$ticketno.'                                                    
</div>';

我如何将用户总参赛作品保存到比赛中(优先不使用数据库,可能使用Cookie)

然后我会回复到我希望放置“你的参赛作品”的地方。 另外,如何在特定日期删除所有用户条目,因此当比赛结束时,它将再次在“您的条目”中显示“0”!

0 个答案:

没有答案