answersLogoWhite

0


Best Answer

Im not entirely sure what you mean. But say you have some text you want to save and load later on... you can put it into a database (e.g. MySQL) or even better a flat file database (e.g. a simple text file). Say for example you have a chatbox. And you want to save the text into a .txt file so u can load it later on using php as well. However if you want to save important data (e.g. passwords credit card information) then i would recommend using a proper database like phpMyAdmin. If u need to no more just send an email to wasim-ilyas@hotmail.co.uk (my email address). Thanks,

Wasim Ilyas

User Avatar

Wiki User

16y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you insert files into a database using PHP?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is an insert query in PHP and MySQL?

In a database table, the INSERT INTO statement is used to insert new rows. Let's create a SQL query with acceptable values using the INSERT INTO statement, and then run it by passing it to the PHP mysqli query() function to insert data into the table. To learn more about data science please visit- Learnbay.co


How do you store pdf file to database using PHP?

Files cannot be directly stored in a MySQL database. However, a path to the file or the contents of the file can.


How do you insert value to a dropdownlist from textbox input php?

Store the textbox input in a database using a html form prefarably. Using a loop get all the textbox input from database and use print/echo to show them in a dropdown.


How can i Have php post to self with mysql?

Mysql is an Database where Data from HTML forms will be inserted to it by some scripts like ASP 3 (classic), ASP.NET, PHP, ColdFusion and... What you need is a form (By HTML), an Database and table in Mysql and PHP to insert data from your form to the table. mysql insert command is: INSERT INTO table_name_here (column1, column2, ..) VALUES (value_of_column_1, value_of_column_2, ...)


How are the simple coding of php with database?

Working with mySQL databases: <?php // Connects to the database mysql_connect(servername,username,password); // Inserts into a database mysql_query(INSERT INTO table(cat1, cat2, cat3) VALUES(one,two,three)); ?>


How do you save image url in database by using php?

To save an image URL in a database using PHP, you can create a table with a column to store the URL. When inserting data, you can use SQL queries with PHP to insert the URL into the database. Make sure to properly sanitize and validate the input to prevent SQL injection or other security vulnerabilities.


What are the advantages and disadvantages of PHP with mysql?

Ultimately PHP is a programming language and MySQL is a database language. Using PHP with MySQL is a nice combination with built-in support and the simplicity of it all. However, there aren't a lot of disadvantages of using PHP with a database, it just allows for better data organization and whatnot. There are definitely advantages and disadvantages to using a database other than MySQL (such as MongoDB or PostgreSQL).


How do you copy php files to a CD?

Create Data CD with any available CD burning software and insert the files. Burn.


Insert date on web page?

Using PHP: <?php echo date("d/m/y"); ?>


What is the database not found error in PHP with MySQL?

It would mean the database you are trying to select in your PHP script couldn't be found, you will need to check to see if you are using the correct details.


How do you close a MySQL database connection using PHP?

To close your MySQL database connection you need to use the mysql_close() function. Please see the example below: <?php mysql_close(); ?> If your connection data is stored in a variable you would close the connection like this instead: <?php mysql_close($db_conn); ?> That's useful for if you're using more than one database connection in a PHP script.


How can files be converted into HTML using PHP?

To rename a file in PHP the easiest way to do it is to use the rename() function. <?php rename("before.txt", "after.html"); ?>