Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Quick HTML/CSS/PHP/WTVR Question.

Name: Anonymous 2006-04-11 14:51

I have a way I want a bunch of information presented on a webpage, in a certain table arrangement. Say it has, 3 fields. I want to be able to do something like this [just an example]:
<class=3fields>
f1=Bob;
f2=Yes, I'm gay;
f3=EMAIL@DOOD.NET;
</class>

That will reference some HTML/PHP/WTVR that has blank values, and fill in those values with those 3 things. If that makes sense.

How can I do this?

Name: Anonymous 2006-04-11 16:25

what do you want to do? do you want to display f1, f2, and f3 in a webpage? or pass information from the page with the choices to another page? I'm confused

Name: Anonymous 2006-04-11 16:38

Sorry about the confusion. Lemme rephrase.

I want to have a common table layout:

3fields:
<table>
  <tr>
    <td rowspan="2">F1</td>
    <td>F2</td>
  </tr>
  <tr>
    <td>F3</td>
  </tr>
</table>

And in the page a user goes to, I want to be able to just have this in the code:

<class=3fields>
f1=Bob;
f2=Yes, I'm gay;
f3=EMAIL@DOOD.NET;
</class>
<class=3fields>
f1=Sandy;
f2=Just bisexual.
f3=JESUS@F***INCHR.IST;
</class>

Which would reference to the table layout, and output the table with the values filled in. Twice, once for the Bob set of values and once for the Sandy set.

End result: User sees two tables with the same table layout, filled with different value sets.

Make a bit more sense I hope?

Name: Anonymous 2006-04-11 16:52

any scripting language will do, this one's in PHP

function showTable($f1, $f2, $f3)
{
    ?>
    <table><tr><td rowspan="2"><? echo $f1; ?></td>
    <td><? echo $f2; ?></td></tr>
    <tr><td><? echo $f1; ?></td>
    </table>
}


then just call the function

showTable("Bob","yes, I'm gay", "email@dood.net";);



Name: Anonymous 2006-04-11 16:54

sorry, forgot to close
<?
function showTable($f1, $f2, $f3)
{
?>
    <table><tr><td rowspan="2"><? echo $f1; ?></td>
    <td><? echo $f2; ?></td></tr>
    <tr><td><? echo $f1; ?></td>
    </table>
<?
}
?>

Name: Anonymous 2006-04-11 17:23

And with that I learned more useful things than hours of classing and tutorials taught me. Thanks a ton.

Name: Anonymous 2009-01-14 4:49

Use dynamic table generation with javascript and display the final table at once

Name: Anonymous 2010-12-27 0:40

Don't change these.
Name: Email:
Entire Thread Thread List