Hello World!
I’ve been writing a website in php and I am making a commenting system. Everything works fine, I just need to be able to read the database. Here’s my script:
mysql_connect("localhost","root","");
echo "Connected!"; //testing purposes only
mysql_select_db("ycomment");
echo "DBSelected!"; //testing purposes only
$result = mysql_query("SELECT * FROM comments");
echo "Variable created!"; //testing purposes only
while($row = mysql_fetch_array($result)) {
echo "Name: " . $row['name'] . "<br />";
echo "Comment: " . $row['comment'] . "<br />";
}