...

View Full Version : Urgent - Please help



dhtmlhelp
01-22-2003, 03:32 AM
Hi,

can someone help me witht his problem as soon as possible, thank you.

I have the following script but I can't find a way to have the input buttons display one set of restaurants by cuisine at a time as each radio button is clicked. I guess I should put the input buttons inside the loop, and probably give them a value like $buttons

<html><head><title>radiobuttons.php</title>
<style>
h1, h2, h3 {font-family: sans-serif; text-align: center}
dt {font-weight: bold}
</style></head>
<body><h1>Reviews</h1><dl>

<center>
<input type='radio' name='cuisine' value='alsatian'>Alsatian
<input type='radio' name='cuisine' value='italian'>Italian
<input type='radio' name='cuisine' value='british'>British
<input type='radio' name='cuisine' value='french'>French
<input type='radio' name='cuisine' value='indian'>Indian
</center>

<?
$buttons
$remember = "";
$restaurant = file("rest.txt");
foreach ($restaurant as $record) {
list($restname, $cuisine, $review) = split ("\t",$record,3);
if ($cuisine != $remember) {
print "</dl><h3>$cuisine</h3><dl>";
$remember = $cuisine;
};
print "<dt>$restname</dt><dd>$review</dd>";
};

?>

</dl></body></html>

Can you please help me,

thanks,

DH

dhtmlhelp
01-22-2003, 10:28 AM
rest.txt is a tab separated text file with 3 elements per line: restaurant_name, cuisine, and review. Just to clarify.

Any suggestions??

DH

jcma
01-22-2003, 10:51 AM
i didnīt really understand what you want do to, but if is to change some values as the client clicks on a radio button i think you should use javascript.


maybe if you could explain better or give an example....



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum