Posted by Kiza on 10/13/24 11:31
ZeldorBlat U R right :P
I didn't think about that. Then just del 'if ....'
<?php
//collect vars&values :-D
foreach ( $_REQUEST as $key => $value ) {
$$key = $value;
$fruit_name0 = ("fruit_name like '$value'");
$sql = ("SELECT * FROM fruit_table where $fruit_name0");
$query = mysql_query($sql);
while ( $row = mysql_fetch_array($query) ) {
$fruit_name = $row["fruit_name"];
$price = $row["price"];
echo("$fruit_name = $price<br />");//if U wanth to echo selected data
:)
}
}
?>
Navigation:
[Reply to this message]
|