i'm making a website and i want to create a mysql database that will link to it.
it's a car website. the database will contain one table which will contain a list of cars and there specifications.
i want to link this table with the website, so that all i have to do is type the car id at the top of a template page, and the rest of page will show all the car specs in a table.
this what i want to do:
<?php
connect to mysql databse, etc..........
$car_id="4"
?>
<table>
<tr>
<td>Make</td>
<td><?php print "SELECT Make FROM Cars WHERE car_id='$car_id'" ?></td>
</tr>
<tr>
<td>Model</td>
<td><?php print "SELECT Model FROM Cars WHERE car_id='$car_id'" ?></td>
</tr>
</table>
etc.
does this all make sense?
it's a car website. the database will contain one table which will contain a list of cars and there specifications.
i want to link this table with the website, so that all i have to do is type the car id at the top of a template page, and the rest of page will show all the car specs in a table.
this what i want to do:
<?php
connect to mysql databse, etc..........
$car_id="4"
?>
<table>
<tr>
<td>Make</td>
<td><?php print "SELECT Make FROM Cars WHERE car_id='$car_id'" ?></td>
</tr>
<tr>
<td>Model</td>
<td><?php print "SELECT Model FROM Cars WHERE car_id='$car_id'" ?></td>
</tr>
</table>
etc.
does this all make sense?