what is wrong with my code? -
$Link = mysqli_connect("localhost","root","tupi");
-
if (!$Link)
-
{
-
die("Could not connect: " . mysql_error());
-
}
-
mysql_select_db("registration_form", $Link);
-
-
$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')");
-
thank you.:)
1 7902 @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.
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
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...
|
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();
?>
|
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: " ....
|
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...
|
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')",...
|
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:
...
|
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...
|
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()...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
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...
|
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...
|
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...
|
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,...
| |