Warning: mysqli_query() expects at least 2 parameters, 1 given in /srv/disk4/2180192/www/[login to view URL] on line 6 Invalid Entry.
$10-30 USD
Paid on delivery
Can someone explain this error message and tell me what needs to be done to fix it? Please no up-selling after bid acceptance.
*****Below is the error message I am trying to resolve**********
Warning: mysqli_query() expects at least 2 parameters, 1 given in /srv/disk4/2180192/www/[login to view URL] on line 6
Invalid Entry. Please leave this site if you are an unauthorized user.
*****Below is the code for a file called [login to view URL]*******
<?SESSION_START();
include('[login to view URL]');
$_t01=addslashes($_POST['tea_id']);
$query="SELECT teacher_table.tlogin_pass, teacher_table.teacher_id, teacher_table.teacher_gender, teacher_table.teacher_last FROM teacher_table WHERE $_t01=tlogin_pass";
$result=mysqli_query($query); //THIS IS LINE 6. THAT CAUSE ERROR
if(!$result){
echo "<CENTER>Invalid Entry. Please leave this site if you are an unauthorized user.</CENTER>";
echo $_POST[tea_id];
if($_POST[tea_id]=='abc'){echo "right";}
exit;
}
while($record=mysql_fetch_row($result)) {
for($i=0;$i<count($record);$i++) {
if($i==0){$passcd=$record[$i];echo $passcd;}
else if($i==1){$t_id=$record[$i];echo $t_id;}
else if($i==2){$t_gen=$record[$i];echo $t_gen;}
else if($i==3){$t_last=$record[$i];echo $t_last;}
}
}
$greet = "<CENTER>Welcome, $t_gen $t_last! If know one told you this today, know that you are amazing and appreciated.</CENTER><BR>";
Project ID: #11327139
About the project
Awarded to:
9 freelancers are bidding on average $20 for this job
Hello I already have the answer for your problem... We can talk about this and how to fix it. You wont be disappointed.
Hello There, I can help you with this i have 4 years experience in building and developing php / magento/photoshops /wordpress / HTML / CSS and bespoke websites. I am currently available to begin work on this right More
Hey, Its because mysqli_query must have 2 parameter $connection = mysqli_connect('localhost','root','password'); mysqli_query($connection,$yourquery);