Hi I am trying to retrieve data from MySQL database using PHP and and display it to the user who would be able to edit it I can display information from the database but its not editable how can I do that
@stephan_gerlachSep 13.2006 — #you need to connect to the database server [code=php] mysql_connect('localhost','username','password'); [/code]
Select the desired database [code=php] mysql_select_db('db_name'); [/code]
then run the query like [code=php] $sql = 'SELECT * FROM user WHERE id=2 LIMIT 1'; $query = mysql_query($sql); if (mysql_num_rows($query)==1) { $result=mysql_fetch_assoc($query); } [/code]
@pcthugSep 13.2006 — #Peruse the [url=http://www.php.net/manual/en/ref.mysql.php]MySQL Function set[/url] for tutorials and examples on how to implement a MySQL database with a PHP application. For further insight regarding the MySQL language syntax and datatypes, see the [url=http://dev.mysql.com/doc/]MySQL Online Documentation[/url].