Re: how to fill combobox with dynamic php variables ? | |
Your second listing is wrong:
<?php
include 'actdb.php';
$toon_name=$_GET["name"];
$query = "SELECT * FROM encounter_table WHERE name=" . $toon_name;
$result = mysql_query($query); $name[] = $row['name'];
What's the part in red for (which, in any case, is wrong ) ?
I mean, you use SELECT * which means that you are selecting ALL columns from your table. At this point, you should have something like
$row = mysql_fetch_array($result);
$name = $row['name'];
$field2 = $row[field2'];
etc................................
}
So you put ALL the table data in arrays. Then you should echo the results in the table like
echo "<table border='1'>";
echo "<tr><th>Title</th><th>Start</th><th>End</th><th>Duration</th><th>Damage</th><th>ExtDPS</th><tr>";
$escapedurl = htmlentities("combatant_table.php?encid=$row[0]", ENT_QUOTES); // I don't know what you want to do here, neither where did you get $row[0] from
echo "<tr>" .
"<td><a href='$escapedurl'>$name</a></td>" .
"<td>$field2</td>" .
"<td>$field3td>" .
etc................
"</tr>";
echo "</table>";
__________________
Navaldesign Logger Lite: Low Cost, Customizable, multifeatured Login script Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more.... Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA! |