473,396 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Warning: mysqli_query() expects parameter 1 to be mysqli, resource given in C:\wamp?

Paul NIcolai Sunga
what is wrong with my code?

Expand|Select|Wrap|Line Numbers
  1. $Link = mysqli_connect("localhost","root","tupi");
  2.             if (!$Link)
  3.               {
  4.               die("Could not connect: " . mysql_error());
  5.               }
  6.             mysql_select_db("registration_form", $Link);
  7.  
  8. $query = mysqli_query($Link, "INSERT INTO registration_form(fname, mname, lname, address, category, bdate, age, contact_no, email, sex, weight, civil_status, blood_type, team, contact_person, relationship, contact_info, contact_address, password, picture, event) values('$firstname', '$middlename', '$surname', '$address', '$category', '$year'.'-'.'$month'.'-'.'$day', '$age', '$pnumber', '$email', '$sex', '$weight', '$cstatus', '$blood', '$team', '$person','$relationship', '$ecnumber', '$contactadd', '$password', '$browse', '$event')");
  9.  
thank you.:)
Jul 29 '09 #1
1 7902
Markus
6,050 Expert 4TB
@Paul NIcolai Sunga
I'm guessing it's that you have used mysql_select_db() instead of mysqli_select_db(). Also, add an 'or die(mysql_error());' to your mysqli_query()s.
Jul 30 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Mini Mouse | last post by:
Hiya folks, I'm getting the following error(s) below and I'm at a bit of a loss as to how to correct it. When I give it a parameter it then complains it needs two parameters and the second one...
1
by: Marco Krechting | last post by:
Hi All, I have a database with the timer function set to warn the user that arecord is due to expire. Is there a Win API that I can use so a loud warning will go off. Not this simpel beep in...
2
by: J˙Giusł vs ::NRG::ius | last post by:
Hi all. I have this script ----------------------------------------------------------- <?php $doc = new DOMDocument(); $doc->load('books.xml'); echo $doc->saveXML(); ?>
9
by: Petr Vileta | last post by:
Hi, I'm new here and excuse me if this question was be here earlier. I have a simple code <html><body> <?php <?php $link = mysql_connect("localhost", "user", "password") or die("Grr: " ....
3
by: siyaverma | last post by:
i am trying to upload csv file from user's computer to main server the code i am using is if(((isset($_GET)) && ($_GET=="yes")) ) { $typefield = $_GET; echo...
11
by: Kurda Yon | last post by:
Hi, I got this warning: mysql_query(): 4 is not a valid MySQL-Link resource. The line which cause this warning is: mysql_query("insert into $tablename (id,priority) values('$id', '0.00')",...
11
by: Jeff | last post by:
I turned on errors in php: ini_set('display_errors','1'); And I got a slew of notices and a couple of warnings. The notices are mostly missing indexes from doing things like this: ...
4
by: fisherd | last post by:
When i run this code, i keep getting this message; Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\wamp\www\checklogin.php on line 26 i use this code to...
2
nomad
by: nomad | last post by:
I having troubles with this code I'm getting a error code. Please not this is not an assignment its from a book called PHP Bible. This book is loaded with errors. Warning: mysql_fetch_array()...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.