This is my current code
<?php
include "../config/config.php";
include "../functions/fun_db.php";
include "../functions/fun_table.php";
echo "<center><font face='Verdana, Arial, Helvetica, sans-serif' size='2' color ='000000'>View all records</font></center>";
db_connect();
db_select ($db_info);
#$fields = "uid, cust_firstname, cust_lastname";
#$query = "SELECT $fields FROM aq_info ORDER BY uid ASC";
$query = "SELECT * FROM aq_info WHERE enabled = 1 ORDER BY uid DESC";
$result = mysql_query( $query);
head_table("center","200%","1","0","0",$tablecolor);
tr_table();
col_table("","ID","2","000000","left","top",$tablecolor);
col_table("","Customer Name","2","000000","center","top",$tablecolor);
col_table("","Customer Road","2","000000","center","top",$tablecolor);
col_table("","Customer City","2","000000","center","top",$tablecolor);
col_table("","Customer Post Code","2","000000","center","top",$tablecolor);
col_table("","Customer Tel One","2","000000","center","top",$tablecolor);
col_table("","Customer Tel Two","2","000000","center","top",$tablecolor);
col_table("","Customer Fax","2","000000","center","top",$tablecolor);
col_table("","Company Name","2","000000","center","top",$tablecolor);
col_table("","Company Road","2","000000","center","top",$tablecolor);
col_table("","Company City","2","000000","center","top",$tablecolor);
col_table("","Company Post Code","2","000000","center","top",$tablecolor);
col_table("","Company Tel One","2","000000","center","top",$tablecolor);
col_table("","Company Tel Two","2","000000","center","top",$tablecolor);
col_table("","Company Fax","2","000000","center","top",$tablecolor);
col_table("","Note","2","000000","center","top",$tablecolor);
col_table("","Time Stamp","2","000000","center","top",$tablecolor);
col_table("","Enabled","2","000000","center","top",$tablecolor);
trend_table();
$color = "0";
while ( $row = mysql_fetch_array ( $result))
{
$f_cust_id= $row[0];
$f_cust_title= $row[1];
$f_cust_firstname= $row[2];
$f_cust_lastname= $row[3];
$f_cust_road= $row[4];
$f_cust_city= $row[5];
$f_cust_post= $row[6];
$f_cust_telareaone= $row[7];
$f_cust_telone= $row[8];
$f_cust_telnoteone= $row[9];
$f_cust_telareatwo= $row[10];
$f_cust_teltwo= $row[11];
$f_cust_telnotetwo= $row[12];
$f_cust_faxareaone= $row[13];
$f_cust_faxone= $row[14];
$f_cust_faxnoteone= $row[15];
$f_comp_name= $row[16];
$f_comp_road= $row[17];
$f_comp_city= $row[18];
$f_comp_post= $row[19];
$f_comp_telareaone= $row[20];
$f_comp_telone= $row[21];
$f_comp_telnoteone= $row[22];
$f_comp_telareatwo= $row[23];
$f_comp_teltwo= $row[24];
$f_comp_telnotetwo= $row[25];
$f_comp_faxareaone= $row[26];
$f_comp_faxone= $row[27];
$f_comp_faxnoteone= $row[28];
$f_info_note= $row[29];
$f_stamp= $row[30];
$f_db_src= $row[31];
$f_enabled= $row[32];
tr_table();
if ($color=="0")
{
colnew_table("<form action='customer.php' method='POST'><input name='edi' type='hidden' value='$f_cust_id'><input name='do' type='hidden' value='edi'><input name='' type='submit' value='$f_cust_id' $buttonstyle></form>","2","000000","left","top",'FFFFFF');
colnew_table("$f_cust_title $f_cust_firstname $f_cust_lastname","2","000000","center","top","FFFFFF");
colnew_table("$f_cust_road","2","000000","center","top","FFFFFF");
colnew_table("$f_cust_city","2","000000","center","top","FFFFFF");
colnew_table("$f_cust_post","2","000000","center","top","FFFFFF");
colnew_table("($f_cust_telareaone) $f_cust_telone [$f_cust_telnoteone]","2","000000","center","top","FFFFFF");
colnew_table("($f_cust_telareatwo) $f_cust_teltwo [$f_cust_telnotetwo]","2","000000","center","top","FFFFFF");
colnew_table("($f_cust_faxareaone) $f_cust_faxone [$f_cust_faxnoteone]","2","000000","center","top","FFFFFF");
colnew_table("$f_comp_name","2","000000","center","top","FFFFFF");
colnew_table("$f_comp_road","2","000000","center","top","FFFFFF");
colnew_table("$f_comp_city","2","000000","center","top","FFFFFF");
colnew_table("$f_comp_post","2","000000","center","top","FFFFFF");
colnew_table("($f_comp_telareaone) $f_comp_telone [$f_comp_telnoteone]","2","000000","center","top","FFFFFF");
colnew_table("($f_comp_telareatwo) $f_comp_teltwo [$f_comp_telnotetwo]","2","000000","center","top","FFFFFF");
colnew_table("($f_comp_faxareaone) $f_comp_faxone [$f_comp_faxnoteone]","2","000000","center","top","FFFFFF");
colnew_table("$f_info_note","2","000000","center","top","FFFFFF");
colnew_table("$f_stamp","2","000000","center","top","FFFFFF");
colnew_table("$f_enabled","2","000000","center","top","FFFFFF");
$color = "1";
}
else
{
colnew_table("<form action='customer.php' method='POST'><input name='edi' type='hidden' value='$f_cust_id'><input name='do' type='hidden' value='edi'><input name='' type='submit' value='$f_cust_id' $buttonstyle></form>","2","000000","left","top",$tablecolor);
colnew_table("$f_cust_title $f_cust_firstname $f_cust_lastname","2","000000","center","top",$tablecolor);
colnew_table("$f_cust_road","2","000000","center","top",$tablecolor);
colnew_table("$f_cust_city","2","000000","center","top",$tablecolor);
colnew_table("$f_cust_post","2","000000","center","top",$tablecolor);
colnew_table("($f_cust_telareaone) $f_cust_telone [$f_cust_telnoteone]","2","000000","center","top",$tablecolor);
colnew_table("($f_cust_telareatwo) $f_cust_teltwo [$f_cust_telnotetwo]","2","000000","center","top",$tablecolor);
colnew_table("($f_cust_faxareaone) $f_cust_faxone [$f_cust_faxnoteone]","2","000000","center","top",$tablecolor);
colnew_table("$f_comp_name","2","000000","center","top",$tablecolor);
colnew_table("$f_comp_road","2","000000","center","top",$tablecolor);
colnew_table("$f_comp_city","2","000000","center","top",$tablecolor);
colnew_table("$f_comp_post","2","000000","center","top",$tablecolor);
colnew_table("($f_comp_telareaone) $f_comp_telone [$f_comp_telnoteone]","2","000000","center","top",$tablecolor);
colnew_table("($f_comp_telareatwo) $f_comp_teltwo [$f_comp_telnotetwo]","2","000000","center","top",$tablecolor);
colnew_table("($f_comp_faxareaone) $f_comp_faxone [$f_comp_faxnoteone]","2","000000","center","top",$tablecolor);
colnew_table("$f_info_note","2","000000","center","top",$tablecolor);
colnew_table("$f_stamp","2","000000","center","top",$tablecolor);
colnew_table("$f_enabled","2","000000","center","top",$tablecolor);
$color = "0";
}
trend_table();
}
foot_table();
db_close();
?>
Is there a way to do it so that you only get like the first 2 colums up or so that if in the config file it says cust_name_val ="1" and the rest say ="0" then it will only show the fields with the value set to 1?
If that makes any sense at all?