Warning: mysqli_query() expects at least 2 parameters, 1 given in /srv/disk4/2180192/www/[login to view URL] on line 6 Invalid Entry.

Completed Posted 7 years ago Paid on delivery
Completed 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>";

MySQL PHP Software Architecture

Project ID: #11327139

About the project

9 proposals Remote project Active 7 years ago

Awarded to:

$25 USD in 1 day
(1 Review)
0.8

9 freelancers are bidding on average $20 for this job

searchtechnow

Hello, READY TO SOLVE THIS PROBLEM__ Look forward for your response. Regards

$19 USD in 1 day
(379 Reviews)
8.3
ptykamikaze

Hello I already have the answer for your problem... We can talk about this and how to fix it. You wont be disappointed.

$10 USD in 0 days
(65 Reviews)
6.4
bhagwansahane89

just a small change...msg me now

$10 USD in 0 days
(40 Reviews)
5.4
freelancersach

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

$20 USD in 1 day
(30 Reviews)
4.9
irfanmochamad26

Hey, Its because mysqli_query must have 2 parameter $connection = mysqli_connect('localhost','root','password'); mysqli_query($connection,$yourquery);

$25 USD in 1 day
(0 Reviews)
0.0
lucassmuller

Hello, I can help you.

$25 USD in 1 day
(0 Reviews)
0.0