Yes you can do this easily in php. Since you are a newbie @ php, you may have a little difficulty at first, but practice makes perfect
First off, in your web hosting control panel, create a user, and a database, and add them together with ALL permissions set. Next, go to your administration for mysql (if you have one, usually it is phpMyAdmin), click on the database name you created to the left, and click on the SQL tab on the top.
From there, run this query:
PHP Code:
CREATE TABLE `reviews` (
`id` int(11) NOT NULL auto_increment,
`genre` varchar(255) collate latin1_general_ci NOT NULL,
`horror` varchar(255) collate latin1_general_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1 ;
Then, to add stuff to the DB, make a page called 'insert.php', and cut and paste this code into it:
PHP Code:
<?php
mysql_connect("YOUR_HOST", "YOUR_DB_USER", "YOUR_DB_PASS") or die(mysql_error());
mysql_select_db("YOUR_DB_NAME") or die(mysql_error());
$mystery = $_POST['mystery'];
$horror = $_POST['horror'];
mysql_query("INSERT INTO reviews (mystery, horror) VALUES('$mystery, '$horror') ") or die(mysql_error());
?>
<html>
<form action=insert.php method=post>
Review for genre: <input type=text name=genre><br />
Review for horror: <input type=text name=horror><br />
<input type=submit value='Submit Review To Database'></form>
</html>
From that, you will have information orgranized into a nice and neat format in mysql. Hope you enjoy PHP!
Bookmarks