[insert_php]

$_SESSION[“IP”] = “10.184.18.238”;
$_SESSION[“USR”] = “u225625_wenkk”;
$_SESSION[“PWD”] = “19HongKong62”;
$_SESSION[“DB”] = “db225625_wenkk”;

$conn = mysql_connect( $_SESSION[“IP”] , $_SESSION[“USR”] , $_SESSION[“PWD”] );
if (!$conn) {die(“Can not connect: ” . mysql_error() );}
mysql_select_db( $_SESSION[“DB”] , $conn);

$conni = mysqli_connect( $_SESSION[“IP”] , $_SESSION[“USR”] , $_SESSION[“PWD”] , $_SESSION[“DB”] ) ;
if (mysqli_connect_errno())
{ echo “Failed to connect to MySQL: ” . mysqli_connect_error(); }

//$eventcode = strstr(substr($_SERVER[‘REQUEST_URI’] ,1,40) , “/” , true) ; // Voor WENKK omgeving
$eventcode = substr($_SERVER[‘REQUEST_URI’] , 1,20) ; // Voor WORDPRESS omgeving

[/insert_php]
First name
Last name
Bijdrage
[insert_php] //OPSLAAN VAN ENTRY IN MYSQL
//if(isset($_POST[‘Submit’])){
//header(“Location: ./publichome.php?” );
//echo ““;
//}
[/insert_php] [insert_php]

$entrydatetime = date(‘Y-m-d H:i:s’);

$sql_insert = “insert into 2017_entries
( entrydatetime , eventcode, helmfirstname , helmlastname , bartsbash )
values
( ‘$entrydatetime’ , ‘$eventcode’ , ‘$_POST[helmfirstname]’ , ‘$_POST[helmlastname]’ , ‘$_POST[bijdrage]’ )”;

mysql_query($sql_insert,$conn);
[/insert_php] [insert_php]

//TONEN VAN ENTRIES OP SCHERM

$sql = “select @ROW := @ROW +1 as row ,
ID ,
date_format(entrydatetime,’%d %b %H:%i:%S’) as entrydatetime ,
helmfirstname ,
helmlastname,
bartsbash
from 2017_entries , ( SELECT @ROW :=0 )r where eventcode = ‘2017qcup’ order by ID desc limit 15″;

$result = $conni->query($sql);

if ($result->num_rows > -1) {
echo ”

“;
// output data of each row
while($row = $result->fetch_assoc()) {
echo
”
“;
}} else {
echo ”

Sorry, no results available.“;
}
echo ”

Top 15
rows
ID Entrydate Helmname Bijdrage
” . $row[“row”].
“
” . $row[“ID”].
“
” . $row[“entrydatetime”].
“
” . $row[“helmfirstname”]. ” ” . $row[“helmlastname”].
“
” . $row[“bartsbash”].
“

“;

[/insert_php]