i m trying to creat a small search into a table
here is my summury of my code
//---Artist--
$motsArt = str_replace('%', '', $motsArt);
$motsArt = str_replace('_', '', $motsArt);
$motsArt = trim($motsArt);
if ($motsArt != '')
{
$WhrArt = " and Artist.ArtistNm LIKE '%".addslashes($motsArt)."%'";
// $WhrArt = " AND Artist.ArtistNm LIKE '%" . $motsArt . "%'";
$criteres = "?motsArt=".urlencode($motsArt);
}
else
{
$WhrArt = '';
$criteres = "?";
}
//--
// looking for answers
$LstSgQ = 'SELECT song.title, song.filesize , song.time, artist.artistnm, album.albumnm ';
$LstSgQ .= 'FROM rel, artist, album, song ';
$LstSgQ .= 'Where rel.albumid = album.albumid and rel.artistid = artist.artistid and rel.songid = song.songid';
$LstSgQ .= $WhrArt;
$LstSgQ .= ' ORDER BY title';
//-form for search
echo "<FORM METHOD=GET>\n";
echo "<B>Artist :</B> ";
$motsArt = stripslashes(htmlspecialchars($motsArt));
echo "<INPUT TYPE='text' NAME='MotsArt' VALUE=\"".$motsArt."\">";
echo " <INPUT TYPE='submit' VALUE='Go !'>";
echo "</FORM>\n";
/// end
i don t know what s wrong with it, well i reconize i m not very familiar with POST and GET, but with the litle i know it should work
If u have any question fill free to email me
thanx for your help and long life for phpbuilder.com