Question : What do these warnings mean?

Code is attached. Here are the warnings / errors I'm getting. Don't knowwhat's causing it or how to fix it and I would love to get some insight.


Warning: mysqli_real_escape_string() [function.mysqli-real-escape-string]: Couldn't fetch mysqli in /home/hihatweb/public_html/Rainmaker/adm/student_insert_execute.php on line 18

Warning: mysqli_real_escape_string() [function.mysqli-real-escape-string]: Couldn't fetch mysqli in /home/hihatweb/public_html/Rainmaker/adm/student_insert_execute.php on line 20

Warning: mysqli_real_escape_string() [function.mysqli-real-escape-string]: Couldn't fetch mysqli in /home/hihatweb/public_html/Rainmaker/adm/student_insert_execute.php on line 22

Warning: mysqli_real_escape_string() [function.mysqli-real-escape-string]: Couldn't fetch mysqli in /home/hihatweb/public_html/Rainmaker/adm/student_insert_execute.php on line 28

Warning: mysqli_query() [function.mysqli-query]: Couldn't fetch mysqli in /home/hihatweb/public_html/Rainmaker/adm/student_insert_execute.php on line 34

Warning: mysqli_errno() [function.mysqli-errno]: Couldn't fetch mysqli in /home/hihatweb/public_html/Rainmaker/adm/student_insert_execute.php on line 36

Warning: mysqli_error() [function.mysqli-error]: Couldn't fetch mysqli in /home/hihatweb/public_html/Rainmaker/adm/student_insert_execute.php on line 36


Ideas?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
<?php
include ("../carter.inc");
$cxn = mysqli_connect($host,$user,$password,$database)
or die ("couldn't connect to server");

$query = "select email from students where email = '$_POST[email]'";
$result = mysqli_query($cxn, $query)
or die ("Couldn't execute query.");
$query_count = mysqli_num_rows($result);
if($query_count>0){
header("Location:student_duplicate.php");
exit();
}
$sentry_name ="student_insert_execute.php";
require_once('sentry_lock.php');
$page_title = "Student Insert Page";


$first_name = mysqli_real_escape_string($cxn, trim($_POST['first_name']));

$last_name = mysqli_real_escape_string($cxn, trim($_POST['last_name']));

$password = mysqli_real_escape_string($cxn, trim($_POST['password']));

$email = trim($_POST['email']);

$cell_phone = trim($_POST['cell_phone']);

$organization = mysqli_real_escape_string($cxn, trim($_POST['organization']));

$class = trim($_POST['class']);

$insert = "insert into students (first_name, last_name, email, password, cell_phone, organization, class) 
values ('$first_name', '$last_name', '$email', '$password', '$cell_phone', '$organization', '$class')";
$insertexe = mysqli_query($cxn, $insert);
if(!$insertexe) {
$error = mysqli_errno($cxn).': '.mysqli_error($cxn);
die($error);
} 

require_once('header.php');

?>

Answer : What do these warnings mean?

To be honest, I don't know why you are getting those errors. What are the contents of sentry_lock.php?
Random Solutions  
 
programming4us programming4us