Help! Errors in me site.

Gestart doorMounssif49 reacties92 weergaven

50 berichten · pagina 3 van 4

Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
In php.ini is dit allemaal in te stellen.. smile
0
Mounssif

Lid · Topicstarter

Berichten
1.284
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
(line 613):

$id = mysql_real_escape_string($_GET[id]);


[/quote]

Maak er is dit van:

[COLOR= #0000BB]<?php[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]])){[/COLOR]
[COLOR= #0000BB]$id[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]);
}[/COLOR]

?>


[/quote]

En deze dan? Notice: Undefined index: p in
line 617 :

[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]p[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"nieuws_bekijken"[/COLOR] [COLOR= #007700]&&[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql_bericht[/COLOR][COLOR= #007700]) !=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]){[/COLOR] ?>
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Hetzelfde doen, of IN de if statement kijken of isset() true is.
0
Mounssif

Lid · Topicstarter

Berichten
1.284
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Snap het niet echt, kan je niet de verbeterde code geven ofzo

Hartelijk bedankt.
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]p[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"nieuws_bekijken"[/COLOR] [COLOR= #007700]&&[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql_bericht[/COLOR][COLOR= #007700]) !=[/COLOR] [COLOR= #0000BB]0[/COLOR] [COLOR= #007700]&&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]p[/COLOR][COLOR= #007700]]) ){[/COLOR] ?>
0
Mounssif

Lid · Topicstarter

Berichten
1.284
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
is toch geen verschil?
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
je controleert hier nu i.p.v. 2 voorwaarden nu op 3.
Kijk maar eens goed...

Ik denk dat het beter is om die isset net als het vorige voorbeeld om je hele if-else statement te plaatsen:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]p[/COLOR][COLOR= #007700]])) {[/COLOR]
   [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]p[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"nieuws_bekijken"[/COLOR] [COLOR= #007700]&&[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql_bericht[/COLOR][COLOR= #007700]) !=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) ){[/COLOR] 
    [COLOR= #FF8000]// doe eens wat...[/COLOR]
   [COLOR= #007700]}
}[/COLOR]
 
?>
0
Mounssif

Lid · Topicstarter

Berichten
1.284
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Aarclay schreef:
je controleert hier nu i.p.v. 2 voorwaarden nu op 3.
Kijk maar eens goed...

Ik denk dat het beter is om die isset net als het vorige voorbeeld om je hele if-else statement te plaatsen:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]p[/COLOR][COLOR= #007700]])) {[/COLOR]
   [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]p[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"nieuws_bekijken"[/COLOR] [COLOR= #007700]&&[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql_bericht[/COLOR][COLOR= #007700]) !=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) ){[/COLOR] 
    [COLOR= #FF8000]// doe eens wat...[/COLOR]
   [COLOR= #007700]}
}[/COLOR]
 
?>
Parse error: syntax error, unexpected else (T_ELSE) in /home/mounssif/domains/habbotoolz.eu/public_html/index.php on line 624
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Blackbullet schreef:
Eerdere citaten tonen
Aarclay schreef:
je controleert hier nu i.p.v. 2 voorwaarden nu op 3.
Kijk maar eens goed...

Ik denk dat het beter is om die isset net als het vorige voorbeeld om je hele if-else statement te plaatsen:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]p[/COLOR][COLOR= #007700]])) {[/COLOR]
   [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]p[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"nieuws_bekijken"[/COLOR] [COLOR= #007700]&&[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql_bericht[/COLOR][COLOR= #007700]) !=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) ){[/COLOR] 
    [COLOR= #FF8000]// doe eens wat...[/COLOR]
   [COLOR= #007700]}
}[/COLOR]
 
?>

Parse error: syntax error, unexpected else (T_ELSE) in /home/mounssif/domains/habbotoolz.eu/public_html/index.php on line 624

Plaats eens een stukje script smile
erzit een onverwachte else in
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
ik vermeoeod dat je in je statement twee keer een ELSE na elkaar hebt, en dat kan niet.
Ik durf erop te wedden dat er ergens een accolade ontbreekt.

Als je met TAB netjes je statements in gaat springen moet je de fout wel makkelijk vinden.
0
Mounssif

Lid · Topicstarter

Berichten
1.284
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Heb het al gevonden aarclay hartelijk bedankt! Had even een else daar verwijderd idk naar waar hij linkte .. Maar Probleem 2 :

Captcha:
Input error: Invalid referer

(zie http://habbotoolz.eu/?p=registreren)
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
blijkbaar een configuratie issue.
Het is geen standaard PHP melding
0
Mounssif

Lid · Topicstarter

Berichten
1.284
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Aarclay schreef:
blijkbaar een configuratie issue.
Het is geen standaard PHP melding
Is het mogelijk om de captcha te verwijderen?
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
alles kan....
0
Mounssif

Lid · Topicstarter

Berichten
1.284
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Aarclay schreef:
alles kan....
Kan je kort zeggen hoe?
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren