This is my current code:
$result = mysql_query("SELECT * FROM characters WHERE namn = 'Jargon'");
while($row = mysql_fetch_array($result))
{
echo "<div class='content_left'>";
echo "<div class='blue_text_header'>Information</div>";
echo "<h1>";
echo $row['Namn'];
echo "</h1>";
echo "<br /><br /><br /><br /><br /><br /><br />";
echo "<div class='red_text_header'>Obekräftade fall</div>";
echo str_replace(',','<br />', $row['unconfirmed']);
echo "</div>";
echo "<div class='content_right'>";
echo "<div class='orange_text_header'>Andra namn</div>";
echo str_replace(',','<br />', $row['Alias']);
echo "<br />";
echo "<br /><br /><br /><br />";
echo "<div class='green_text_header'>Bekräftade fall</div>";
echo str_replace(',','<br />', $row['confirmed']);
}
mysql_close($con);
and as you see, it is the “SELECT * FROM characters WHERE namn = 'Jargon'” that chooses what information to output and I want the users do decide what should be output, so I want like a simple search form, and if people write like “hello” I want the “Jargon” to be switched with hello, if u get it?
And if you can, can you make me both the search form and the post.php file?
Change your first line to these:
…and add such a form: