[eluser]toopay[/eluser]
[quote author="ohale" date="1303890286"]I cant seem to get the comment form to connect with the database.[/quote]
First, you must create the database (with user related to that daabase). Then, under 'application/config/' edit database.php with apropriate value, eg :
Code:
$config['hostname'] = "localhost";
$config['username'] = "myusername";
$config['password'] = "mypassword";
$config['database'] = "mydatabase";
$config['dbdriver'] = "mysql";
$config['dbprefix'] = "";
$config['pconnect'] = FALSE;
$config['db_debug'] = TRUE;
then before you can use $this->db...you must load the database
Code:
$this->load->library('database');
[quote author="ohale" date="1303890286"]also the submit button dose nothing...
this is my comment_view.php
Code:
<html>
<head>
<title><?=$title?></title>
</head>
<body>
<h1><?=$heading?></h1>
<p><textarea name="body" rows="10"></textarea></p>
<p><input type="text" name="author" /></p>
<p><input type="submit" value="Submit Comment" /></p>
</form>
</body>
</html>
[/quote]
i'm not see form opening tag there
Code:
<form action="/controllername/function" method="POST">
...the rest