mysqli_error() expects parameter 1 to be mysqli, null given line 18 * I can't figure out what is my error ... Help please!

<?php 

if(isset($_POST['submit_registration'])) {

$first = $_POST['fname'];

 $last = $_POST['lname'];

 $email = $_POST['email'];

 $address1 = $_POST['address1'];

 $address2 = $_POST['address2'];

 $city = $_POST['city'];

   $state = $_POST['state'];

   $phone = $_POST['phone'];

   $postal = $_POST['postalcode'];

 $Distance = $_POST['Distance'];

if (isset($novalue)) {$confirm = 'Please enter all values';}

     else{

         require_once('/home/rfreebur/public_html/WDD420/clermonteasterseals/includes/dbuser.php');

         $insertsql = "INSERT INTO 'runner'('fname', 'lname', 'address1', 'address2', 'city', 'state','phone_number', 'postal_code', 'Distance');

         VALUES ('$first', '$last', '$address1', '$address2', '$city', '$state', '$phone_number', '$postal_code', '$Distance')";

mysqli_query($lrconnect, $insertsql) or die ("Insert failed: ".mysqli_error($lrconnect));

$confirm = 'Thank you for registering!';

}

}

?>

I need help trying to figure my error please Thank you 

Answers 0

Related Articles