Mam taki skrypt, wypisuje mi on toplisty w panelu admina. Przy edytowaniu strony wywala mi błąd w zapytaniu ale edytowane pola są wpisywane do bazy. Gdzie tu jest błąd ?
<?php $xx1 = $_POST['abc']; $xx2 = $_POST['CategoryId']; $xx3 = $_POST['Google']; $xx4 = $_POST['Keywords']; $xx5 = $_POST['Description']; $aaaa = "UPDATE Test SET CategoryId='$xx2', Google='$xx3', Keywords='$xx4' Description='$xx5' WHERE TopsiteName=$xx1"; $aaaa = ""; } else { <div class="left2"> <h3>Lista stron</h3> </div> <div class="left_side2"> <table> <tr> <td id="TAB1">Nazwa</td> <td id="TAB1">Google</td> <td id="TAB1">Kategoria</td> <td id="TAB1">E-mail</td> <td id="TAB1">GaduGadu</td> <td id="TAB1">Status</td> <td id="TAB1">OPCJE</td> </tr> '); $aaaa = mysql_query("SELECT TopsiteName, CategoryId, Description, Email, GaduGadu, Verified, Key
words, Google FROM Test ORDER BY TopSiteName ASC"); <tr> <form method="post"> <input type="hidden" name="abc" value='.$a1.'> <td id="TAB2"><a href="http://www.'.$a1.'.top-site.pl/">'.$a1.'</a></td> <td id="TAB2"><input type="text" rows="1" size="55" name="Google" value="'.$a7.'"></td> <td id="TAB2"><input type="text" rows="1" size="3" name="CategoryId" value="'.$a2.'"></td> <td id="TAB2"><a href="index.php?strona=email&send='.$a4.'">'.$a4.'</a></td> <td id="TAB2"><a href="gg://'.$a5.'/">'.$a5.'</a></td> <td id="TAB2">'.$a6.'</td> <td id="TAB3" rowspan="3"><input type="submit" name="add" id="add" value="Zapisz"><input type="submit" name="del" id="del" value="Usuń"></td> </tr> <tr> <td id="TAB1" colspan="1"><b>OPIS</b></td> <td id="TAB1" colspan="5"><input type="text" rows="1" size="105" name="Description" value="'.$a3.'"></td> </tr> <tr> <td id="TAB1" colspan="1"><b>SŁOWA</b></td> <td id="TAB1" colspan="5"><input type="text" rows="1" size="105" name="Keywords" value="'.$a8.'"></td> </tr> </form> '); } ?>
Za każdym razem wywala mi błąd i nie czy zmieniam dane w innym formularzu a klikam w przycisk w innym zapytanie się wykonuje. Proszę o pomoc lub sugestie w jaki sposób można to innaczej napisać. Pozdrawiam Snap
