PHP hulp

Gestart doorShahiem0 reacties37 weergaven

1 berichten · pagina 1 van 1

Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hi,

Ik heb een melding script dat als je niet alle benodigheden hebt gekocht dat je een melding krijgt en als je alles hebt gekocht dat er niet meer komt te staan.

Maar nu moet je een bepaalde item 3 keer kopen. Maar hoe check ik het over je het 3 keer hebt gekocht?

Code:

<h1>Winkelstraten</h1>
          <div id="contentgedeelte">      
          
          [COLOR= #0000BB]<?php
          $benodigdhedenQuery[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]mysql[COLOR= #007700]->[/COLOR]query[COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT
                                                        g.artikel_id,
                                                        b.aantal,
                                                        b.artikel_id
                                                        AS
                                                        benodigheden
                                                    
                                                    FROM
                                                        gekochte_spullen g,
                                                        benodigheden b
                                                    WHERE
                                                        g.artikel_id = b.artikel_id
                                                    AND
                                                        g.lid_id = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]leden[COLOR= #007700]->[/COLOR]ledeninfo[COLOR= #007700][[/COLOR][COLOR= #DD0000]eigen[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"
                                                    "[/COLOR][COLOR= #007700]);[/COLOR]
            [COLOR= #0000BB]$benodigdhedenFetch[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]mysql[COLOR= #007700]->[/COLOR]fetch[COLOR= #007700]([/COLOR][COLOR= #0000BB]$benodigdhedenQuery[/COLOR][COLOR= #007700]);[/COLOR]
            
             [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$benodigdhedenFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]benodigheden[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]38[/COLOR] [COLOR= #007700]||[/COLOR] [COLOR= #0000BB]40[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]41[/COLOR] [COLOR= #007700]||[/COLOR] [COLOR= #0000BB]43[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]44[/COLOR] [COLOR= #007700]||[/COLOR] [COLOR= #0000BB]46[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]57[/COLOR][COLOR= #007700])
             {[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]ALLES[/COLOR][COLOR= #007700];
            }[/COLOR]
            [URL="http://www.php.net/else"]else[/URL]
            [COLOR= #007700]{[/COLOR]
            ?>
              <div class="error">
                Hey,<br />
                Je gaat nu je spullen kopen aan de WegisWeg.
                Klik <a href="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] ROOT[COLOR= #007700];[/COLOR] ?>benodigheden">hier</a> voor de benodighedenlijst.<br /><br />
                
                Als je je spullen hebt gekocht dan ga kan je beginnen met je lessen.
            </div><br />
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