Kleine Vragen Topic #1

Gestart doorLennard4.284 reacties15.585 weergaven

4.285 berichten · pagina 188 van 286

Berichten
1.871
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Aarclay schreef:
simple_xml -> simple_xml_load_file()
json_decode()
Ja, bedankt!
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Nielsjojo schreef:
Eerdere citaten tonen
Aarclay schreef:
simple_xml -> simple_xml_load_file()
json_decode()

Ja, bedankt!
Ja, graag gedaan hé smile?
0
Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
$pwwRoosterVakken is een array met de vakken.

Heb nu dit:

[COLOR= #0000BB]<?php[/COLOR]
    [URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$pwwRoosterVakken[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$pwwVergelijk[/COLOR][COLOR= #007700])
    {[/COLOR]
    
        [URL="http://www.php.net/preg_match_all"]preg_match_all[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]%<tdalign="left"width="71"class="tableCell">[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/preg_quote"]preg_quote[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$pwwVergelijk[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000]</td><tdalign="left"width="9"class="tableCell">[1-9]</td></tr>%[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$anderDing[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$vakken[/COLOR][COLOR= #007700]);
        
    }[/COLOR]


En de broncode is bijvoorbeeld:

<tdalign="left"width="71"class="tableCell">wisB</td><tdalign="left"width="9"class="tableCell">2</td>


Die 2 moet ik hebben..
0
Berichten
3.112
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Eerst exploden op class en daarna alles weghalen met str_replace ofzo?
0
Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dat ik ga maar proberen ja..
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Die width, is die wel steeds hetzelfde?
0
Berichten
252
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
> W E R K T N I E T <
0
Berichten
1.644
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hoe zet ik me achtergrond vast dat als ik ga scrollen de achtergrond niet mee scrolt?
0
Berichten
1.871
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Zo?

body {
    background: url(img/bg.png) fixed center;
}
0
Berichten
1.644
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Bedankt!
0
Berichten
2.609
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik heb een loterij systeem, alleen ik wil dat ze maximaal 10 loten kunnen kopen.

Hoe bouw ik dat in?

[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]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]])) {[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]a[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]home[/COLOR][COLOR= #007700]) {[/COLOR]
?><div id="content_mid_header">Koop een lot</div>
    <div id="content_mid_mid">[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]submit[/COLOR][COLOR= #007700]])) {[/COLOR]
[COLOR= #0000BB]$sql_lleden[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT muntjes 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]$lleden[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql_lleden[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$lleden[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]muntjes[/COLOR][COLOR= #007700]] >[/COLOR] [COLOR= #0000BB]19[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE leden SET muntjes = muntjes-20 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 pot SET pot = pot+20"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO tickets (member_id, datum, ip) VALUES ("[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]", NOW(), "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]")"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<br /><div id="goed">Je hebt succesvol een ticket gekocht!</div><meta http-equiv="refresh" content="0;URL=?p=loterij&a=home">"[/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]"<br /><div id="fout">Je hebt niet genoeg muntjes om (nog) een ticket te kopen!</div><meta http-equiv="refresh" content="0;URL=?p=loterij&a=home">"[/COLOR][COLOR= #007700];
}
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
?>
0
Berichten
4.451
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nickjexx schreef:
Ik heb een loterij systeem, alleen ik wil dat ze maximaal 10 loten kunnen kopen.

Hoe bouw ik dat in?

[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]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]])) {[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]a[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]home[/COLOR][COLOR= #007700]) {[/COLOR]
?><div id="content_mid_header">Koop een lot</div>
    <div id="content_mid_mid">[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]submit[/COLOR][COLOR= #007700]])) {[/COLOR]
[COLOR= #0000BB]$sql_lleden[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT muntjes 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]$lleden[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql_lleden[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$lleden[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]muntjes[/COLOR][COLOR= #007700]] >[/COLOR] [COLOR= #0000BB]19[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE leden SET muntjes = muntjes-20 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 pot SET pot = pot+20"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO tickets (member_id, datum, ip) VALUES ("[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]", NOW(), "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]")"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<br /><div id="goed">Je hebt succesvol een ticket gekocht!</div><meta http-equiv="refresh" content="0;URL=?p=loterij&a=home">"[/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]"<br /><div id="fout">Je hebt niet genoeg muntjes om (nog) een ticket te kopen!</div><meta http-equiv="refresh" content="0;URL=?p=loterij&a=home">"[/COLOR][COLOR= #007700];
}
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
?>
Ik ga t even inbouwen voor je, wacht even yummie
toevoeging op 1 december 2012, 11:27:10:
Zo zou ik t doen:

[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]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]])) {[/COLOR]
    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]a[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]home[/COLOR][COLOR= #007700]) {[/COLOR]
?>
<div id="content_mid_header">Koop een lot</div>
    <div id="content_mid_mid">
[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]submit[/COLOR][COLOR= #007700]])) {[/COLOR]
    [COLOR= #0000BB]$sql_lleden[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT muntjes 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]$checkA[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM tickets 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]$lleden[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql_lleden[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$lleden[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]muntjes[/COLOR][COLOR= #007700]] >[/COLOR] [COLOR= #0000BB]19[/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]$checkA[/COLOR][COLOR= #007700]) >=[/COLOR] [COLOR= #0000BB]10[/COLOR][COLOR= #007700])
        {[/COLOR]
            [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE leden SET muntjes = muntjes-20 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 pot SET pot = pot+20"[/COLOR][COLOR= #007700]);[/COLOR]
            [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO tickets (member_id, datum, ip) VALUES ("[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]", NOW(), "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]")"[/COLOR][COLOR= #007700]);[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<br /><div id="goed">Je hebt succesvol een ticket gekocht!</div><meta http-equiv="refresh" content="0;URL=?p=loterij&a=home">"[/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]<br /><div id="fout">Je hebt al 10 tickets</div><meta http-equiv="refresh" content="0;URL=?p=loterij&a=home">[/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]"<br /><div id="fout">Je hebt niet genoeg muntjes om (nog) een ticket te kopen!</div><meta http-equiv="refresh" content="0;URL=?p=loterij&a=home">"[/COLOR][COLOR= #007700];
    }
}[/COLOR]
?>
0
Berichten
2.609
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hmm het werkt niet.

toevoeging op 1 december 2012, 11:34:48:
Mijn loten: 17, en ik kan gewoon doorkopen.

Nu ik mijn loten via de db hebt delete heb ik 0 loten en krijg ik:
Je hebt al 10 tickets
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Slimmerd, nu kan je enkel kopen als je meer als 10 hebt emo>= moet < zijn
0
Berichten
4.451
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Antonn schreef:
Slimmerd, nu kan je enkel kopen als je meer als 10 hebt emo>= moet < zijn
omg faal....
sorry hahahaha

toevoeging op 1 december 2012, 121738:

[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]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]])) {[/COLOR]
    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]a[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]home[/COLOR][COLOR= #007700]) {[/COLOR]
?>
<div id="content_mid_header">Koop een lot</div>
    <div id="content_mid_mid">
[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]submit[/COLOR][COLOR= #007700]])) {[/COLOR]
    [COLOR= #0000BB]$sql_lleden[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT muntjes 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]$checkA[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM tickets 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]$lleden[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql_lleden[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$lleden[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]muntjes[/COLOR][COLOR= #007700]] >[/COLOR] [COLOR= #0000BB]19[/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]$checkA[/COLOR][COLOR= #007700]) <[/COLOR] [COLOR= #0000BB]10[/COLOR][COLOR= #007700])
        {[/COLOR]
            [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE leden SET muntjes = muntjes-20 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 pot SET pot = pot+20"[/COLOR][COLOR= #007700]);[/COLOR]
            [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO tickets (member_id, datum, ip) VALUES ("[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]", NOW(), "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]")"[/COLOR][COLOR= #007700]);[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<br /><div id="goed">Je hebt succesvol een ticket gekocht!</div><meta http-equiv="refresh" content="0;URL=?p=loterij&a=home">"[/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]<br /><div id="fout">Je hebt al 10 tickets</div><meta http-equiv="refresh" content="0;URL=?p=loterij&a=home">[/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]"<br /><div id="fout">Je hebt niet genoeg muntjes om (nog) een ticket te kopen!</div><meta http-equiv="refresh" content="0;URL=?p=loterij&a=home">"[/COLOR][COLOR= #007700];
    }
}[/COLOR]
?>


zo is ie goed wink
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