By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,890 Members | 1,048 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,890 IT Pros & Developers. It's quick & easy.

Inserting data into MySQL using PHP

P: 6
Hi fellow members,
It has been a long journey in the school of PHP and MySQL self study.... I have created MySQL database and can be able to display data from it using PHP.

My problem is everytime I need to enter data I have to do so in MySQL code i.e. INSERT INTO table_name (No, Name.....); I am sure the reason for databases and Websites if for user-friendliness.

Does anyone have an idea of how to Input data into my database via PHP? I will be really grateful and surely if I have this done I will be able to get some sleep.

Thanks in advance.
Nungo
Mar 2 '07 #1
Share this Question
Share on Google+
1 Reply


ronverdonk
Expert 2.5K+
P: 4,258
Whoever said that MySQL should be user friendly? It is for the programmer. It is a relational database of which the data content can be filled and extracted programmatically. It is not a GUI based end-user tool for the desktop!

When you want to insert data into the MySQL database you basically have 3 options:
  1. using a program you use the php commands (starting with mysql_*) to perform all db operations
  2. you use a user interface like phpMyAdmin or the likes. Here also you have to specify SQL statements
  3. load the data from a text file. You also achive this using the LOAD DATA mysql command.

Ronald :cool:
Mar 2 '07 #2

Post your reply

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