Autor | Zpráva | ||
---|---|---|---|
sooly Profil * |
#1 · Zasláno: 18. 6. 2012, 14:37:35
Dobrý den, neustále mi to hází Parse error: syntax error, unexpected '}' in C:\EasyPHP\www\test\accept_reject.php on line 21
nemůžu přijít na to, co je na tom špatně. <?php mysql_connect("127.0.0.1", "root", "") or die("Nelze se připojit k MySQL: " . mysql_error()); mysql_select_db("test") or die("Nelze vybrat databázi: ". mysql_error()); //We check if its an admin and if the id is defined if(isset($_GET['id'])) { $id = intval($_GET['id']); $req1 = mysql_query('select email from test where id="'.$id.'"'); //We check if the website exists if(mysql_num_rows($req1)>0) { $req1 = mysql_fetch_array($req1); //If the admin accept the site if($_GET['ch']=='a') { //We change the status of the website in the DB if(mysql_query('update test set status="ok" where id="'.$id.'"')) } //If the admin reject the website elseif($_GET['ch']=='r') { //We delete the website from the DB if(mysql_query('delete from test where id="'.$id.'"')) }//Otherwise, we delete the website from the DB else { //We delete the website from the DB if(mysql_query('delete from test where id="'.$id.'"')) } } } ?> |
||
Prochy Profil |
#2 · Zasláno: 18. 6. 2012, 14:42:30
Chybí ti středník na 19. řádku za podmínkou.
|
||
Joker Profil |
#3 · Zasláno: 18. 6. 2012, 14:43:08
sooly:
Titulky typu „pomoc!“ jsou k ničemu. - tohle je napsáno vedle políčka pro zadání titulku. Ad chyba viz Nejčastější potíže s PHP (FAQ) |
||
Časová prodleva: 12 let
|
0