im setting up a new mysql/php server, im trying to pull data from the mysql db but everything after the <?php
tag is cutoff
ive tried putting test html, <p>test</p>
above the php and after, only the test html above html was displayed
<?php
mysql_connect("localhost","root","");
mysql_select_db("pet");
$sql = mysql_query("SELECT * FROM pet");
$name = 'name';
$owner = 'owner';
$species = 'species';
$sex = 'sex';
$birth = 'birth';
$death = 'death';
$rows = mysql_fetch_assoc($sql);
echo 'Name: ' . $rows[$id] . '<br>' . 'Owner: ' . $rows[$owner] . '<br>' . 'Species: ' . $rows[$species] . '<br>' . 'Sex: ' . $rows[$sex] . '<br>' . 'Birthday: ' . $rows[$birth];
?>
i expected the table to be displayed, but the output was just the above mentioned "test" from <p>test</p>
at the top, nothing else
edit: forgive me, this is my first post and im new to sql and php