Jump to content

Cabbage

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

About Cabbage

  • Birthday 05/27/1985

Contact Methods

  • Website URL
    http://www.airsoftzone.org

Profile Information

  • Gender
    Male
  • Location
    Guernsey

Cabbage's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi guys, Im new to PHP/MySQL and this forum so go easy A friend and I are experimenting with a website we're building. http://www.guernseytraders.com/home_2ad.php (this is just an example of how one page might look) The idea being that theres going to be (hopefully) a few companies on this website and the website will be split into different categories. For example there might be a tradesman page where I want a list of all the local tradesmen. We've decided to put the companies and there data into a MySQL database and have PHP call up each company ad into the different boxes. It looks like I'm going to have to customise the code for each individual advert? Is it worth doing in a database or would I be better off flatcoding everything into HTML? The PHP I'm using looks something like this... <div class="adtextbox"> <?php $con = mysql_connect("xxxxx.net","xxxxx,"xxxxx"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("xxxxxx", $con); $result = mysql_query("SELECT * FROM Companies WHERE Number = '2'"); echo "<table border='0'> ";while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row[6] . "</td>"; echo "<td>" . $row[3] . "</td>"; echo "</tr>"; } echo "</table>";mysql_close($con); ?> </div> Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.