I am trying to create a simple form with these fields ; Article Title, Article Category, Main Article, Article Tags. I don't know any of PHP or mysql so I tried learning from online tutorials but I could'nt get to even connect to database. Please help either telling me how to connect to database and create tables in sql, OR let me know how to achieve the above. (Give me the code for it) Thanks in advance
What I normally do, is use phpMyAdmin. Do you have pMA installed? If, so it is quite easy to make new databases and tables without having sql knowledge. I don't know what system you are on, but using Google you'll quickly find easy to install packages for both windows or linux. When you have your database set up with your desired tables you need to make a php connection script, like this standard example from the PHP manual: <?php $db = mysql_connect('localhost', 'mysql_user', 'mysql_password'); if (!$db) { die('Could not connect: ' . mysql_error()); } ?> When you have established a connection to the database you can select a db with "mysql_select_db", and then use the built-in mysql php functions like "mysql_db_query" to process your database fields. You really get all the information by looking at the PHP manual
if you have a PC at your home download XAMPP and install it it just acts a localserver,you can create database and tables in the phpadmin in Xampp,it's the best way to learn mysql and php (Also you can execute scripts in mysql)