dynamic use of control tabs

Hi,

I'm new on this forum, i'm from France so plesae excuse my quite rusty english... I'm currently working on a small website project dealing with car presentations, so to speak models, versions of the models, and a description for each version. Sometimes i would have up to 5 or 6 versions, and descriptions, which may induce al ot of text, that's why Control Tabs interests me (i'm using repeated tables so far, showing php requests on mysql db) The thing i, i need this to go more dynamic, and automatically get the number of version (= number of tabs), the name of the version, the description matching the version, all this for any car model.

Tab title would be my 'version' field, tab content would be my 'description' field. I'm a beginner, i can't figure out how to adpat my code to your script, so i have an ugly yet working display now with meters of down scrolling.

Would you please send me a bit of help on this?

Here is my current php code (rid of all '<') for better display:

Thanks to all of you guys

[code]

$colnameversion2 = "1"; if (isset($GET['id'])) { $colnameversion2 = (getmagicquotesgpc()) ? $GET['id'] : addslashes($GET['id']); } mysqlselectdb($databasevoiture, $voiture); $queryversion2 = sprintf("SELECT * FROM version,neuf WHERE version.modele = neuf.modele AND neuf.id = %s", $colnameversion2); $version2 = mysqlquery($queryversion2, $voiture) or die(mysqlerror()); $rowversion2 = mysqlfetch_assoc($version2);

p>php echo $row_version2['modele']; ?>/p>

?php do { ?>

table style="padding-left:10px"

tr> td> table border="0" cellspacing="4" cellpadding="2" align="left"> tr> td class="version" width="600"> ?php echo $rowversion2['carversion']; ?/td /tr> tr> td class="descriptif"> ?php echo $rowversion2['descriptif']; ?>/td /tr> tr> td class="descriptif">Motorisations: ?php echo $rowversion2['motorisation']; ?>/td> /tr> tr> td class="descriptif">A partir de: ?php echo $rowversion2['detailprix']; ?>%u20AC/td> /tr> /table>/td> /tr>

/table> ?php } while ($rowversion2 = mysqlfetch_assoc($version2)); ?>

Posted November 9th, 2007 at 2:51pm by edelweiss2529

Login or Register to Post