What's new

Website Help!

Space

Space

PlayStation 4 ✔
Messages
2,785
Reaction score
1,697
So my site 4inarow.co.uk i have been trying new scripts the pass few days now i need to know who this means click the url to get the error



Warning: mysqli_query() expects parameter 1 to be mysqli, null given in /home1/sam12804/public_html/login.php on line 14

Warning: mysqli_error() expects parameter 1 to be mysqli, null given in /home1/sam12804/public_html/login.php on line 14





Here is the script for login.php

Code:
<?php
include 'inc/database.php';

if(!isset($_SESSION)){ session_start();}

if(isset($_SESSION['username'])){
echo '
<script language="javascript">
window.location.href = "index.php"
</script>
';
}

$checksettings = mysqli_query($con,"SELECT * FROM `settings` LIMIT 1")ordie(mysqli_error($con));
while($row = mysqli_fetch_assoc($checksettings)){
$website = $row['website'];
$paypal = $row['paypal'];
}

?>

<!DOCTYPE html>

<htmllang="en">

<!-- Source created by FyR0z -->
<head>
<metacharset="utf-8">
<title><?php echo $website;?> - Login</title>
<metaname="viewport"content="width=device-width, initial-scale=1.0">
<metaname="description"content="">
<metaname="author"content="">

<!-- Bootstrap core CSS -->
<linkhref="bootstrap/css/bootstrap.min.css"rel="stylesheet">

<!-- Font Awesome -->
<linkhref="css/font-awesome.min.css"rel="stylesheet">

<!-- ionicons -->
<linkhref="css/ionicons.min.css"rel="stylesheet">

<!-- Simplify -->
<linkhref="css/simplify.min.css"rel="stylesheet">

</head>

<bodyclass="overflow-hidden light-background">
<divclass="wrapper no-navigation preload">
<divclass="sign-in-wrapper">
<divclass="sign-in-inner">
<divclass="login-brand text-center">
<iclass="fa fa-refresh fa-spin m-right-xs"></i> I<strongclass="text-skin">Generate</strong>
</div>

<formaction="lib/login.php"method="POST">
<divclass="form-group m-bottom-md">
<inputtype="text"class="form-control"id="username"name="username"placeholder="Username">
</div>
<divclass="form-group">
<inputtype="password"class="form-control"id="password"name="password"placeholder="Password">
</div>

<divclass="form-group">
<divclass="custom-checkbox">
<inputtype="checkbox"id="chkRemember">
<labelfor="chkRemember"></label>
</div>
Remember me
</div>

<divclass="m-top-md p-top-sm">
<center><buttonclass="btn btn-success block">Sign in</button></center>
</div>
</form>
<divclass="m-top-md p-top-sm">
<divclass="font-12 text-center m-bottom-xs">Do not have an account?</div>
<formaction="signup.php">
<center><buttonclass="btn btn-default block">Create an accounts</button></center>
</form>
</div>
</div><!-- ./sign-in-inner -->
</div><!-- ./sign-in-wrapper -->
</div><!-- /wrapper -->

<ahref="#"id="scroll-to-top"class="hidden-print"><iclass="icon-chevron-up"></i></a>

<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->

<!-- Jquery -->
<scriptsrc="js/jquery-1.11.1.min.js"></script>

<!-- Bootstrap -->
<scriptsrc="bootstrap/js/bootstrap.min.js"></script>

<!-- Slimscroll -->
<scriptsrc='js/jquery.slimscroll.min.js'></script>

<!-- Popup Overlay -->
<scriptsrc='js/jquery.popupoverlay.min.js'></script>

<!-- Modernizr -->
<scriptsrc='js/modernizr.min.js'></script>

<!-- Simplify -->
<scriptsrc="js/simplify/simplify.js"></script>

</body>

<!-- Source created by FyR0z -->
</html>

Any help would be helpful lol

 
Nagato

Nagato

Falling In Reverse
Stickied Legendary Veteran Forum Addict
Messages
7,639
Reaction score
3,100
The error line:
PHP:
$checksettings = mysqli_query($con,"SELECT * FROM `settings` LIMIT 1")or die(mysqli_error($con));

Z61 Z61 should be able to help you better.

An empty value is being returned.
 
Z61

Z61

Some times our saints are sinners
Retired
Programmer Forum Addict Odysseus' Summit
Messages
5,476
Reaction score
3,423
Your connection is null, as it states.
 
Top Bottom