I want it to be like this:
You fill in all the data then click add more contractors as seen here:
http://www.icdcommercial.com/database/contractor1.jpg
Then once you do that it looks like this:
http://www.icdcommercial.com/database/contractor2.jpg
------------------------------------------------
Is this possible? It probably has to be done with some javascript I would imagine, or a clever use of forms.
Any ideas?
EDIT:
Here is some more info, I am going to have the contractor data go into the mysql as this: "
contractor1,contact1,pricing1;
contractor2,contact2,pricing2;
contractor3,contact3,pricing3;
contractor4,contact4,pricing4;
contractor5,contact5,pricing5;
contractor6,contact6,pricing6;
And it outputs like this:
http://www.icdcommercial.com/database/array.php
And here is the code for that:
Code: Select all
<?
session_start();
include("config.inc.php");
include("templates/".$template."/".$template.".cfg");
$title = $sitename . " .:. Index";
include("templates/".$template."/overall_header.tpl");
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM contractor";
$result=mysql_query($query);
$conttemp=mysql_result($result,0,"contractor");
$conrow = explode(";",$conttemp);
$numrows=count($conrow)-1;
$i=0;
echo "<table border width=90%><tr><td>Contractor</td><td>Contact</td><td>Pricing</td></tr>";
while($i<$numrows){
echo "<tr>";
$concol = explode(",",$conrowї$i]);
echo "<td>".$concolї0]."</td><td>".$concolї1]."</td><td>".$concolї2]."</td>";
echo "</tr>";
$i++;
}
echo "</table>";
include("templates/".$template."/overall_footer.tpl");
?>