I have to migrate code originally built using your tools in PHP v.5.0 to v.7.1.
I was able to to establish connection as such -
Connection file:
ORIGINAL IN V.5
$hostname_exhibitions_cx = "00.00.00.000";
$database_exhibitions_cx = "my-database-name";
$username_exhibitions_cx = "GGGGGGG";
$password_exhibitions_cx = "GGGGGGG";
$exhibitions_cx = mysql_pconnect($hostname_exhibitions_cx, $username_exhibitions_cx, $password_exhibitions_cx) or trigger_error(mysql_error(),E_USER_ERROR);
I CHANGED TO V.7
$hostname_exhibitions_cx = "00.00.00.000";
$database_exhibitions_cx = "my-database-name";
$username_exhibitions_cx = "GGGGGGG";
$password_exhibitions_cx = "GGGGGGG";
$exhibitions_cx = new mysqli('hostname_exhibitions_cx', 'username_exhibitions_cx', 'password_exhibitions_cx!', 'database_exhibitions_cx'); ?>
BUT IS CODE BELOW CORRECT ON V.7? I CANT' GET THE DATA TO SHOW
CODE
ORIGINAL IN V.5 IN THE DATA FILE
mysql_select_db($database_exhibitions_cx, $exhibitions_cx);
$query_Recordset1 = "SELECT * FROM sangiacomoexhibitions_tbl WHERE RemovalDate > NOW() ORDER BY RemovalDate ASC";
$Recordset1 = mysql_query($query_Recordset1, $exhibitions_cx) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
I CHANGED TO V7
$exhibitions_cx->select_db(database_exhibitions_cx, $exhibitions_cx);
$query_Recordset1 = $exhibitions_cx->query("SELECT * FROM sangiacomoexhibitions_tbl WHERE RemovalDate > NOW() ORDER BY RemovalDate ASC");
$Recordset1 = mysqli_query($query_Recordset1, $exhibitions_cx);
$row_Recordset1 = mysqli_fetch_row($Recordset1);
$totalRows_Recordset1 = mysqli_num_rows($Recordset1)
HERE'S DATA THAT SHOULD BE DISPLAYED: WHAT NEEDS CHANGING FOR THIS? ALL I GET ON THE PAGE IS THE STATEMENT ""Updating. Please check back later".
<?php
$date = date('Y/m/d');
$mydate = date("Y/m/d",strtotime($row_Recordset1['RemovalDate']));
$Recordset1_endRow = 0;
$Recordset1_columns = 3; // number of columns
$Recordset1_hloopRow1 = 0; // first row flag
do {
if($Recordset1_endRow == 0 && $Recordset1_hloopRow1++ != 0) echo "<tr>";
?>
<?php
if ($mydate < $date) {
echo "Updating. Please check back later";
} else {
do {
echo "<div class='exhibitionswrap'>";
echo "<div class='exhibitions'>";
echo '<p>';
$image = '<img src="images/exhibitions/' . $row_Recordset1['Logoimg'] . '">';
echo "<a target='_new' href=" . "http://" . $row_Recordset1["Website"] . ">" ;
echo "" .$image."";
echo "</a>";
echo '</p>';
echo '<p>';
echo $row_Recordset1["Eventdate"];
echo '<br>';
echo $row_Recordset1["Location"];
echo '</br>';
echo "<a target='_new' href=" . "http://" . $row_Recordset1["Website"] . ">" ;
echo $row_Recordset1["Website"];
echo "</a>";
echo '<br>';
echo '<br>';
echo "</div>";
echo "</div>";
} while ($row_Recordset1 = mysqli_fetch_assoc($Recordset1));
}
?>
<?php $Recordset1_endRow++;
if($Recordset1_endRow >= $Recordset1_columns) {
?>
<?php
$Recordset1_endRow = 0;
}
} while ($row_Recordset1 = mysqli_fetch_row($Recordset1));
if($Recordset1_endRow != 0) {
while ($Recordset1_endRow < $Recordset1_columns) {
echo("");
$Recordset1_endRow++;
}
}
?>