Kleine Vragen Topic #2

Gestart doorKingunit3.067 reacties11.764 weergaven

3.068 berichten · pagina 79 van 205

Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Desire schreef:
Waarom word ik niet doorgestuurd als ik de juiste code invul.
[COLOR= #0000BB]<?php[/COLOR]
    [URL="http://www.php.net/include_once"]include_once[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"config.php"[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]POST[/COLOR][COLOR= #007700]){[/COLOR]
            [COLOR= #0000BB]$id[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]code[/COLOR][COLOR= #007700]];[/COLOR]
            [COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM codes WHERE code = "[/COLOR][COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$id[/COLOR][COLOR= #007700]) .[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
            [COLOR= #0000BB]$ip[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]];[/COLOR]
            [COLOR= #0000BB]$queryip[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"UPDATE codes SET ip = "[/COLOR][COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ip[/COLOR][COLOR= #007700]) .[/COLOR][COLOR= #DD0000]", status = (1)"[/COLOR][COLOR= #007700];[/COLOR]
            [COLOR= #0000BB]$resultip[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$queryip[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"Fout!: "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
            
            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/trim"]trim[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]code[/COLOR][COLOR= #007700]]) ==[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700]) {[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je hebt geen code ingevoerd, je mag alleen code`s invoeren![/COLOR][COLOR= #007700];
            }[/COLOR]
            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #DD0000]1[/COLOR][COLOR= #007700]) {[/COLOR]
                [COLOR= #0000BB]$url[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]];[/COLOR]
                [COLOR= #0000BB]$urldoorsturen[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT (url) FROM codes WHERE url = "[/COLOR][COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$url[/COLOR][COLOR= #007700]) .[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Code is juist, u word zo doorgestuurt.[/COLOR][COLOR= #007700];[/COLOR]
               [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<script>window.location = " [/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$urldoorsturen[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000] "</script>[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$resultip[/COLOR][COLOR= #007700]);
            }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]code is onjuist[/COLOR][COLOR= #007700];
            }
    }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]();
    }[/COLOR]
    
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]
        <form method="post">
            <input type="tekst" name="code" />
            <input type="submit" name="Submit" value="submit!" />
        </form>
    [/COLOR][COLOR= #007700];[/COLOR]
?>


Omdat appel.

Dit antwoord heeft evenveel details als jou vraag.
0
Berichten
4.367
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hoezo, ik krijg geen error, als ik op verzend druk dan gebeurt er niks.
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
action="" aan je form toevoegen
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Vreemde veldnaam: (url)
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Oghja, die wordt niet meegestuurd...

Debuggen zit er ook niet in he.
0
Berichten
4.367
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Antonn schreef:
action="" aan je form toevoegen
Hij doet nog steeds niks.
Aarclay schreef:
Vreemde veldnaam: (url)
Ik heb nu dit:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #DD0000]1[/COLOR][COLOR= #007700]) {[/COLOR]
                [COLOR= #0000BB]$url[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM codes WHERE url = "[/COLOR][COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]]) .[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Code is juist, u word zo doorgestuurt.[/COLOR][COLOR= #007700];[/COLOR]
               [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<script>window.location = " [/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$url[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000] "</script>[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$resultip[/COLOR][COLOR= #007700]);
            }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]code is onjuist[/COLOR][COLOR= #007700];
            }[/COLOR]
?>


Maar hij doet nog niks, en ik weet 100% zeker dat url bestaat.
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Desire schreef:
Eerdere citaten tonen
Antonn schreef:
action="" aan je form toevoegen
Hij doet nog steeds niks.
Eerdere citaten tonen
Aarclay schreef:
Vreemde veldnaam: (url)
Ik heb nu dit:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #DD0000]1[/COLOR][COLOR= #007700]) {[/COLOR]
                [COLOR= #0000BB]$url[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM codes WHERE url = "[/COLOR][COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]]) .[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Code is juist, u word zo doorgestuurt.[/COLOR][COLOR= #007700];[/COLOR]
               [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<script>window.location = " [/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$url[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000] "</script>[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$resultip[/COLOR][COLOR= #007700]);
            }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]code is onjuist[/COLOR][COLOR= #007700];
            }[/COLOR]
?>


Maar hij doet nog niks, en ik weet 100% zeker dat url bestaat.
Ik wil nu niet meer geloven dat hij helemaal niets doet. In je browser misschien niet maar de source van de site moet er toch anders uit zien? Of staan je PHP errors uit ofzo?
0
Berichten
4.367
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Antonn schreef:
Eerdere citaten tonen
Desire schreef:
Eerdere citaten tonen
Antonn schreef:
action="" aan je form toevoegen
Hij doet nog steeds niks.
Eerdere citaten tonen
Aarclay schreef:
Vreemde veldnaam: (url)
Ik heb nu dit:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #DD0000]1[/COLOR][COLOR= #007700]) {[/COLOR]
                [COLOR= #0000BB]$url[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM codes WHERE url = "[/COLOR][COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]]) .[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Code is juist, u word zo doorgestuurt.[/COLOR][COLOR= #007700];[/COLOR]
               [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<script>window.location = " [/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$url[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000] "</script>[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$resultip[/COLOR][COLOR= #007700]);
            }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]code is onjuist[/COLOR][COLOR= #007700];
            }[/COLOR]
?>


Maar hij doet nog niks, en ik weet 100% zeker dat url bestaat.
Ik wil nu niet meer geloven dat hij helemaal niets doet. In je browser misschien niet maar de source van de site moet er toch anders uit zien? Of staan je PHP errors uit ofzo?
Hoe kun je zien of ze uit staan. Maar echt hij doet niks emo
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Desire schreef:
Eerdere citaten tonen
Antonn schreef:
Eerdere citaten tonen
Desire schreef:
Eerdere citaten tonen
Antonn schreef:
action="" aan je form toevoegen
Hij doet nog steeds niks.
Eerdere citaten tonen
Aarclay schreef:
Vreemde veldnaam: (url)
Ik heb nu dit:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #DD0000]1[/COLOR][COLOR= #007700]) {[/COLOR]
                [COLOR= #0000BB]$url[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM codes WHERE url = "[/COLOR][COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]]) .[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Code is juist, u word zo doorgestuurt.[/COLOR][COLOR= #007700];[/COLOR]
               [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<script>window.location = " [/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$url[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000] "</script>[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$resultip[/COLOR][COLOR= #007700]);
            }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]code is onjuist[/COLOR][COLOR= #007700];
            }[/COLOR]
?>


Maar hij doet nog niks, en ik weet 100% zeker dat url bestaat.
Ik wil nu niet meer geloven dat hij helemaal niets doet. In je browser misschien niet maar de source van de site moet er toch anders uit zien? Of staan je PHP errors uit ofzo?
Hoe kun je zien of ze uit staan. Maar echt hij doet niks emo
ergens op je pagina zetten. Als hij dan geen error geeft dan staan errors sws uit emo
0
Berichten
4.367
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nee de errors staan aan..

Ik doe het wel via een a href alleen hoe doe ik dit, ik heb het volgende al geprobeert maar daar komt deze error uit:

Quote:
Warning: mysql_query() expects parameter 1 to be string, resource given in xx on line 17

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #DD0000]1[/COLOR][COLOR= #007700]) {[/COLOR]
                [COLOR= #0000BB]$url[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]]);[/COLOR]
                [COLOR= #0000BB]$urldoorsturen[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM codes WHERE url = "[/COLOR][COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$url[/COLOR][COLOR= #007700]) .[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Code is juist, klik op de link om erheen te gaan.[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<a href=[/COLOR][COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$urldoorsturen[/COLOR][COLOR= #007700]) .[/COLOR][COLOR= #DD0000]>Klik hier</a>[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$resultip[/COLOR][COLOR= #007700]);
            }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]code is onjuist[/COLOR][COLOR= #007700];
            }[/COLOR]
?>
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Desire schreef:
Nee de errors staan aan..

Ik doe het wel via een a href alleen hoe doe ik dit, ik heb het volgende al geprobeert maar daar komt deze error uit:

Quote:
Warning: mysql_query() expects parameter 1 to be string, resource given in xx on line 17
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #DD0000]1[/COLOR][COLOR= #007700]) {[/COLOR]
                [COLOR= #0000BB]$url[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]]);[/COLOR]
                [COLOR= #0000BB]$urldoorsturen[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM codes WHERE url = "[/COLOR][COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$url[/COLOR][COLOR= #007700]) .[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Code is juist, klik op de link om erheen te gaan.[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<a href=[/COLOR][COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$urldoorsturen[/COLOR][COLOR= #007700]) .[/COLOR][COLOR= #DD0000]>Klik hier</a>[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$resultip[/COLOR][COLOR= #007700]);
            }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]code is onjuist[/COLOR][COLOR= #007700];
            }[/COLOR]
?>


Je zei dat er helemaal niks gebeurde maar je zag dus wel de tekst "Code is juist, klik op de link om erheen te gaan."?
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Desire schreef:
Nee de errors staan aan..

Ik doe het wel via een a href alleen hoe doe ik dit, ik heb het volgende al geprobeert maar daar komt deze error uit:

Quote:
Warning: mysql_query() expects parameter 1 to be string, resource given in xx on line 17
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #DD0000]1[/COLOR][COLOR= #007700]) {[/COLOR]
                [COLOR= #0000BB]$url[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]]);[/COLOR]
                [COLOR= #0000BB]$urldoorsturen[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM codes WHERE url = "[/COLOR][COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$url[/COLOR][COLOR= #007700]) .[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Code is juist, klik op de link om erheen te gaan.[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<a href=[/COLOR][COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$urldoorsturen[/COLOR][COLOR= #007700]) .[/COLOR][COLOR= #DD0000]>Klik hier</a>[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$resultip[/COLOR][COLOR= #007700]);
            }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]code is onjuist[/COLOR][COLOR= #007700];
            }[/COLOR]
?>


Die code klopt niet, je kan geen query echoen.
0
Berichten
4.367
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Antonn schreef:
Eerdere citaten tonen
Desire schreef:
Nee de errors staan aan..
Ik doe het wel via een a href alleen hoe doe ik dit, ik heb het volgende al geprobeert maar daar komt deze error uit:

Quote:
Warning: mysql_query() expects parameter 1 to be string, resource given in xx on line 17

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #DD0000]1[/COLOR][COLOR= #007700]) {[/COLOR]
                [COLOR= #0000BB]$url[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]]);[/COLOR]
                [COLOR= #0000BB]$urldoorsturen[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM codes WHERE url = "[/COLOR][COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$url[/COLOR][COLOR= #007700]) .[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Code is juist, klik op de link om erheen te gaan.[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<a href=[/COLOR][COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$urldoorsturen[/COLOR][COLOR= #007700]) .[/COLOR][COLOR= #DD0000]>Klik hier</a>[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$resultip[/COLOR][COLOR= #007700]);
            }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]code is onjuist[/COLOR][COLOR= #007700];
            }[/COLOR]
?>

Je zei dat er helemaal niks gebeurde maar je zag dus wel de tekst "Code is juist, klik op de link om erheen te gaan."?

Eerst niet.
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Desire schreef:
Eerdere citaten tonen
Antonn schreef:
Eerdere citaten tonen
Desire schreef:
Nee de errors staan aan..
Ik doe het wel via een a href alleen hoe doe ik dit, ik heb het volgende al geprobeert maar daar komt deze error uit:

Quote:
Warning: mysql_query() expects parameter 1 to be string, resource given in xx on line 17

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #DD0000]1[/COLOR][COLOR= #007700]) {[/COLOR]
                [COLOR= #0000BB]$url[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]]);[/COLOR]
                [COLOR= #0000BB]$urldoorsturen[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM codes WHERE url = "[/COLOR][COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$url[/COLOR][COLOR= #007700]) .[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Code is juist, klik op de link om erheen te gaan.[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<a href=[/COLOR][COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$urldoorsturen[/COLOR][COLOR= #007700]) .[/COLOR][COLOR= #DD0000]>Klik hier</a>[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$resultip[/COLOR][COLOR= #007700]);
            }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]code is onjuist[/COLOR][COLOR= #007700];
            }[/COLOR]
?>

Je zei dat er helemaal niks gebeurde maar je zag dus wel de tekst "Code is juist, klik op de link om erheen te gaan."?
Eerst niet.

In ieder geval:
- Je hebt 2x mysql_query over dezelfde string, de 2e keer moet mysql_result zijn
- $url zal een boolean weergeven, omdat isset altijd een boolean geeft wat je waarschijnlijk niet wilt nu.
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Gooi nou foutafhandeling in je script. En mysql_query() kan je NIET echoen.
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