Phsycoslaya Posted November 13, 2006 Share Posted November 13, 2006 How do I make a form and stuff to submit info into a MYSql database, and then make it so it shows up on a page..[code]<?php$id = 1;$conn mysql_connect('Localhost', 'root', '******')or die('Could not connect');mysql_connect_db('website', $conn) or die('Could not connect to database');$sql = "SELECT title, body FROM news WHERE id=$id";$result = mysql_query($sql) or die(mysql_error());$row = mysql_fetch_array($result, MYSQL_ASSOC);echo $row['title'];echo $row['body'];?>[/code]I just don't know how to make a page for Editing it, and adding new news.. Please help. Link to comment https://forums.phpfreaks.com/topic/27067-a-mysql-php-or-php-mysql-tables/ Share on other sites More sharing options...
joquius Posted November 13, 2006 Share Posted November 13, 2006 Ok there are a few questions. One is do you want to learn PHP or simply use it. If you want to use it, download a fully functional script from one of the many available resources on the web. If you want to learn it this brings us to another question, how much do you want to learn. If you want to have a comprehensive knowledge of the fine paininthearse art of PHP, I would advise you to consult a manual, such as on http://www.php.net/. If you want to learn it just for this, give up and download a script eh?This is a help forum, not a do-it-for-me forum. Link to comment https://forums.phpfreaks.com/topic/27067-a-mysql-php-or-php-mysql-tables/#findComment-123832 Share on other sites More sharing options...
.josh Posted November 13, 2006 Share Posted November 13, 2006 http://www.phpfreaks.com/tutorials/142/0.php Link to comment https://forums.phpfreaks.com/topic/27067-a-mysql-php-or-php-mysql-tables/#findComment-123836 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.