answersLogoWhite

0

How do you edit data of a table in php?

Updated: 8/19/2019
User Avatar

Wiki User

13y ago

Best Answer

That depends on what type of table you're talking about.

If you're referring to a database table, that would be done my establishing a connection to the server, and editing the data directly with SQL. For example:

$con = mysql_connect($db_name, $db_username, $db_password);

$db = mysql_select_db($name_of_table);

$q = mysql_query("UPDATE foo SET bar = 'snoo' WHERE blah = 1");

If on the other hand, you're referring to an HTML table, you would need to use Javascript on the user end to send asynchronous requests to the PHP script on the server side. If that's what you're after, you'll want to read up on AJAX.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you edit data of a table in php?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

When would one use a PHP table?

PHP is a type of coding for a forum or website. Any website that uses the PHP coding could use a table to organize data or to show relationships between the specific data that is on the website.


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 do you delete cells in a table without deleting the information in the cell?

It need to export data in the table, for instance, as a string, and after that delete the table. edit mode


How do you get PHP codes for writing on an image?

You can use the GD extension for PHP to edit image files.


How do you print an HTML table using PHP?

It is really simple to print an HTML table in PHP, all you have to do is the following: <?php print "<table>"; print "<tr>"; print "<td>hello</td>"; print "</tr>"; print "</table>"; ?>


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 edit a PHP file?

Open it in Notepad. Add or remove whatever code you want. To test, you will have to upload it to a PHP enabled webhost, or you will need to install MySQL, PHP, and Apache on your computer. Use Editor to edit the PHP file. Example: Notepad++ , editplus ,Zend IDE ,Netbeans IDE


How do you retrieve data from one MySQL table and create another MySQL table with the same data in it using PHP?

Execute a SELECT INTO statement on the mysql database: INSERT INTO destination_table (id, first_name, last_name) SELECT id, first_name, last_name from source_table;


How you can change data type in PHPwrite a script in PHP that change the string data type in numeric data type?

If you will read typecasting on php, you will know more on this. <?php $str = "10"; $num = (int)$str; ?>


What is PHP data coding?

PHP data coding is softwares that allows or has frameworks which can make PHP input to it's own script language. So you may code programs for example with PHP, just that it has to be extended PHP because of new functions and features. It may also be application coding for the web.


How do you rectify HTML to PHP variable error?

To use HTML as variable in PHP . echo the html tag written in double quotes. Example : <?php echo "<table>"; echo "<tr><td></td><td></td></tr>" echo "</table>"; ?>


How do you make dynamic HTML table?

You can use one of the server side scripts/language like PHP or ASP.NET among others to fetch data from server dynamically. You could also use AJAX if you want asynchronous data