Well may be it is to easy question but:
I want to sort the numbers by clicking an image. I thought that i make a form and add an imagefield.
<form id="form1" name="form1" method="post" action="index.php">
<input name="buyuka" type="image" src="resimler/azalt.gif" />
</form>
Then i will write these codes.
$sorgu='SELECT * FROM urunler';
if(isset($_POST['buyuka'])
{
$sorgu='SELECT * FROM urunler ORDER BY uyeno DESC';
}
$sonuclar=mysql_query($sorgu);
However it doesn't sort. When i try adding submit button in order to add imagefield, it works. So it means i make a really basic mistake but i cant find it.
Thank you for helping. :)
EDIT --- Solved
Actually as Pascal Martin said:
if(isset($_POST['buyuka_x'], $_POST['buyuka_y']))
{
$sorgu='SELECT * FROM urunler ORDER BY uyeno DESC';
}
It must be like that. Thanks :)