well what does your sql statement look like? do you want it to show all of them or is some one trying to see a paticular one? If you put all of them in an array you would have to show all of them, but you could do an if statement to show the one you want.
you can try something like that.Code:$result = mysql_query ("select * from sql_table"); $num_links =mysql_num_rows($result); for ($i=0; $i<$num_links; $i++) { $row = mysql_fetch_array($result); $age = $row["age"]; } echo"$age";
or if you want
that might work if some one typed an age into a text box.Code:$result = mysql_query ("select * from sql_table where age = $typed_text"); { $row = mysql_fetch_array($result); $age = $row["age"]; $name = $row["name"]; echo"$name"; echo"$age";




Reply With Quote