Time out php

Gestart doorMarvinn1 reacties28 weergaven

2 berichten · pagina 1 van 1

Marvinn

Lid · Topicstarter

Berichten
2.609
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hooi!

Ik heb een vraagje.

Ik heb deze code:

[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]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]giveresp[/COLOR][COLOR= #007700]])) {[/COLOR]

[COLOR= #0000BB]$naamkevangiveresp[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT gebruikersnaam FROM leden WHERE member_id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$mid[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]));[/COLOR]

[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO respect_log (id,aan,door,datum) VALUES (,"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$naamkevangiveresp[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]","[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]","[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"d-m-Y H:i"[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]")"[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE leden SET respects = respects - 1 WHERE member_id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE leden SET respect = respect + 1 WHERE member_id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$mid[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]

        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]() ==[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]) {[/COLOR]
            [COLOR= #0000BB]$naam[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT gebruikersnaam FROM leden WHERE member_id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$mid[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]));[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<strong><font color="green">Je hebt [/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$naam[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000] succesvol 1 respect gegeven!</strong></font>[/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]<strong><font color="red">Oeps, er is iets fout gegaan.</strong></font>[/COLOR][COLOR= #007700];
        }
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

[COLOR= #0000BB]$sql_resp[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM leden WHERE member_id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$row_resp[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql_resp[/COLOR][COLOR= #007700]);[/COLOR]


    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row_resp[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]respects[/COLOR][COLOR= #007700]] ==[/COLOR]  [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<input type="submit" disabled="disabled" value="Geef Respect ([/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$row_resp[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]respects[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000])">[/COLOR][COLOR= #007700];
    }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$mid[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) {[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<input type="submit" disabled="disabled" value="Geef Respect ([/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$row_resp[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]respects[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000])">[/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]
                <form action="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]?p=profiel&mid=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$mid[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" method="POST">
                    <input type="submit" name="giveresp" value="Geef Respect ([/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$row_resp[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]respects[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000])">
                </form>
            [/COLOR][COLOR= #007700];
        }
    }
}[/COLOR]
?>


Alleen als je nu bijvoorbeeld 2 respects nog kan. En dan doe je bv 5x F5 dan kun je gewoon over je limiet van 2.

Dus ik wil vragen of jullie iets kunnen inbouwen zodat je elke 30 seconden respect kan geven.

tnx!
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Rij aanmaken in de tabel leden: laatst_respect_gegeven

En dan kijken of die laatst_respect_gegeven een interval van 30 sec heeft.
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