I have upgraded websrver php and an ld site that was working fine now has errors, I am not understanding the errors but I think it needs to be re written to work, Failing at line 8 and 9 I have edited line 6 and that seems to work but I can’t figure out the others for the later code
these are the site error s I get
Warning: mysqli_query() expects parameter 1 to be mysqli, string given in /server address/pokeradmin/index.php on line 8
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in /server address/pokeradmin/index.php on line 9
the code in use is
[php]<?php
include “…/includes/config.php”;
$validationattempted = false;
if (isset($_POST[“op”]) && ($_POST[“op”]==“adminlogin”))
{
$connection = mysqli_connect($server, $DBusername, $DBpassword, $database) or die ("$DatabaseError");
$query = “SELECT * FROM $admin_table WHERE username=’”.$_POST[‘username’]."’ AND password=’".$_POST[‘password’]."’";
$result = mysqli_query($query);
if (mysqli_num_rows($result) >0 )
{
$validationattempted = true;
$validated = true; // assume validation passed
// If username and password are vaild set the cookie
setcookie (“ValidUserAdmin”, $_POST[‘username’],time()+36000); // expire in 1 hour
}
}
?>
PokerMax Poker League :: Keeping track of your poker tournamnets <meta http-equiv="[/php] <p>any help would be great<br> Tim</p>