Kleine Vragen Topic #1

Gestart doorLennard4.284 reacties15.585 weergaven

4.285 berichten · pagina 277 van 286

Berichten
1.684
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Perryz schreef:
Eerdere citaten tonen
Maartenf schreef:
Het blijven staan ervan komt door die position: absolute ?
Als ik position:relative; gebruik dan wordt hij helemaal vervormd, maar er veranderd nog helemaal niks verder.

----
Opgelost:
Chrome had een position: fixed nodig en alle andere browsers een position:absolute
Indien je position fixed gebruikt, blijft het gewoon staan als het scrolt. Waarom toch altijd die positions? Is niet verplicht he.

Ga morgen nog eens proberen een wysiwyg in elkaar te steken...
0
Berichten
1.533
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Raaoul schreef:
Eerdere citaten tonen
Poedeltje schreef:
Ik heb nu deze code, hij pakt nu alleen de dingen op deze manier:
Quote:
ding1: Dit, ding2: dat, ding3: dus;
ding1: Dit, ding2: dat, ding3: dus;

En het moet dus op alle manieren kunnen:

Quote:
ding1: Dit, ding2: dat, ding3: dus;ding1: Dit, ding2: dat, ding3: dus; ding1: Dit, ding2: dat, ding3: dus;
ding1: Dit, ding2: dat, ding3: dus;

Dit is de code:

[COLOR= #0000BB]<?php
$test[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]ding1: Dit, ding2: dat, ding3: dus; ding1: Dit, ding2: dat, ding3: dus;[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #0000BB]$data[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"n"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$test[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$data[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700]){[/COLOR]
    [URL="http://www.php.net/preg_match"]preg_match[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]~ding1: (.*?),~[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$ding1[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/preg_match"]preg_match[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]~ding2: (.*?),~[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$ding2[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/preg_match"]preg_match[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]~ding3: (.*?);~[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$ding3[/COLOR][COLOR= #007700]);[/COLOR]
    
    [COLOR= #0000BB]$dng1[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$ding1[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR]
    [COLOR= #0000BB]$dng2[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$ding2[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR]
    [COLOR= #0000BB]$dng3[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$ding3[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR]
    
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Blablabla = [/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$dng1[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br />hoohhoi = [/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$dng2[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br />hoodfgdfg = [/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$dng3[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br /><br />[/COLOR][COLOR= #007700];
}[/COLOR]
?>

[COLOR= #0000BB]<?php

$test[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]ding1: Dit, ding2: dat, ding3: dus; ding1: Dit, ding2: dat, ding3: dus;[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #0000BB]$dingen[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000],[/COLOR] [COLOR= #0000BB]$test[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$dingen[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$ding[/COLOR][COLOR= #007700]) {[/COLOR]
   [COLOR= #FF8000]// $ding = ding1: Dit[/COLOR]

   [COLOR= #0000BB]$ander[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]: [/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$ding[/COLOR][COLOR= #007700]);[/COLOR]

   [COLOR= #0000BB]$titel[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$ander[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]];[/COLOR] [COLOR= #FF8000]// ding1[/COLOR]
   [COLOR= #0000BB]$val[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$ander[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR] [COLOR= #FF8000]// Dit[/COLOR]
[COLOR= #007700]}[/COLOR]

?>


Nee dat werkt niet, want ik wil het in database inserten.
0
Marv

Lid

Berichten
3.092
Reputatie
1
Punten
0,21
Lid sinds
Laatst gezien
if($ext != jpg) //als de extensie niet jpg is
                    {
                        $error = Bestand is geen jpg; //echo dat
                    }


Hier controleert hij dat een foto alleen maar jpg mag zijn, maar ik wil ook dat ze PNG, JPEG, kunnen uploaden.

Hoe doe ik dat?
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Maak een array met alle extenties die wel mogen, gebruik [func]in_array()[/func]

Maar ik zou niet checken op extenties, maar op mime-types wink
0
Marv

Lid

Berichten
3.092
Reputatie
1
Punten
0,21
Lid sinds
Laatst gezien
Rik schreef:
Maak een array met alle extenties die wel mogen, gebruik [func]in_array()[/func]

Maar ik zou niet checken op extenties, maar op mime-types wink
En waarom?
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Marvinguich schreef:
Eerdere citaten tonen
Rik schreef:
Maak een array met alle extenties die wel mogen, gebruik [func]in_array()[/func]
Maar ik zou niet checken op extenties, maar op mime-types wink
En waarom?
Bestands extensies zijn makkelijk te faken
0
Marv

Lid

Berichten
3.092
Reputatie
1
Punten
0,21
Lid sinds
Laatst gezien
Sevvlor schreef:
Eerdere citaten tonen
Marvinguich schreef:
Eerdere citaten tonen
Rik schreef:
Maak een array met alle extenties die wel mogen, gebruik [func]in_array()[/func]
Maar ik zou niet checken op extenties, maar op mime-types wink
En waarom?
Bestands extensies zijn makkelijk te faken
heb al een topic in aanvragen gemaakt. kom er niet meer uit.
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
if(in_array($ext,$array)) {

Dan mag je zelf de array aanmaken met alle extenties. Klein karweitje wat je wel moet lukken.
Check ook op mime-types verder.
0
Berichten
7.806
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hoe doe ik dat als je niks invult hij een error geeft?
Spoiler tonen
[COLOR= #0000BB]<?php[/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]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]signup[/COLOR][COLOR= #007700]])) {[/COLOR]
[COLOR= #0000BB]$signup_sql[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO leden VALUES(,"[/COLOR][COLOR= #007700].[/COLOR]sqlsafe[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]","[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]")"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$signup_sql[/COLOR] [COLOR= #007700]==[/COLOR] TRUE[COLOR= #007700]) {[/COLOR]
                          [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Dit lid is succesvol aangemeld"[/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]"Error: Dit lid is niet succesvol aangemeld wegens: "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]();
                          }
                          }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
                          ?>
        <!-- Main page container -->
        <section class="container login" role="main">
            
            <h1><a href="/" class="brand" style="width:249px;height:29px;">MCServerlijsten</a></h1>
            <div class="data-block">
                <form method="POST" action="">
                    <fieldset>
                        <div class="control-group">
                            <label class="control-label" style="font-size:24px">Aanmelden</label>
                            <label class="control-label" for="login">Gebruikersnaam</label>
                            <div class="controls">
                                <input id="icon" type="text" placeholder="Je gebruikersnaam" name="username">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="password">Wachtwoord</label>
                            <div class="controls">
                                <input id="password" type="password" placeholder="Wachtwoord" name="password">
                                <label class="checkbox"><select size="1" name="sessiontime" style="visibility:hidden;">
        <option value="604800">1 week</option>
      </select>
  </tr>                                </label>
                            </div>
                        </div>
                        <div class="form-actions">
                            <input type="submit" value="Aanmelden" class="btn btn-large btn-inverse btn-alt" name="login">
                        </div>
                    </fieldset>
                </form>
            </div>
            <p><a href="wachtwoordreset" class="pull-right"><small>Wachtwoord Vergeten</small></a></p>
            
        </section>
        <!-- /Main page container -->
        
        <!-- Scripts -->
        <script src="js/bootstrap/bootstrap-tooltip.js"></script>
        
    </body>
</html>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]} }[/COLOR]
?>
0
Berichten
10.409
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL]    [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]field[/COLOR][COLOR= #007700]]) {[/COLOR]
    
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Veld is leeg[/COLOR][COLOR= #007700];
}[/COLOR]
?>


Geen idee of dat nog steeds de juiste methode is hoor.
0
Berichten
7.806
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Kingunit schreef:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL]    [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]field[/COLOR][COLOR= #007700]]) {[/COLOR]
    
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Veld is leeg[/COLOR][COLOR= #007700];
}[/COLOR]
?>
Geen idee of dat nog steeds de juiste methode is hoor.

Ik ga kijken smile Bedankt smile
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Je kan beter geen empty gebruiken voor validatie. Kijk maar op php.net/empty waarom niet...
Hij laat meer toe dan je denkt.

De beste manier is:

if(trim($var)=="") {
0
Berichten
7.806
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/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]username[/COLOR][COLOR= #007700]])==[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]) {[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]Leeg[/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]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"POST"[/COLOR][COLOR= #007700]) && ([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]signup[/COLOR][COLOR= #007700]])) {[/COLOR]
[COLOR= #0000BB]$signup_sql[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO leden VALUES(,"[/COLOR][COLOR= #007700].[/COLOR]sqlsafe[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]","[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]")"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$signup_sql[/COLOR] [COLOR= #007700]==[/COLOR] TRUE[COLOR= #007700]) {[/COLOR]
                          [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Dit lid is succesvol aangemeld"[/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]"Error: Dit lid is niet succesvol aangemeld wegens: "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]();
                          }
                          }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
                          ?>


Moet het dan zo?
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Bjarnootjuh schreef:
[COLOR= #0000BB]<?php[/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]username[/COLOR][COLOR= #007700]])==[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]) {[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]Leeg[/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]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"POST"[/COLOR][COLOR= #007700]) && ([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]signup[/COLOR][COLOR= #007700]])) {[/COLOR]
[COLOR= #0000BB]$signup_sql[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO leden VALUES(,"[/COLOR][COLOR= #007700].[/COLOR]sqlsafe[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]","[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]")"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$signup_sql[/COLOR] [COLOR= #007700]==[/COLOR] TRUE[COLOR= #007700]) {[/COLOR]
                          [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Dit lid is succesvol aangemeld"[/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]"Error: Dit lid is niet succesvol aangemeld wegens: "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]();
                          }
                          }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
                          ?>
Moet het dan zo?

Probeer het!
Ja
0
Berichten
10.409
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Bjarnootjuh schreef:
[COLOR= #0000BB]<?php[/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]username[/COLOR][COLOR= #007700]])==[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]) {[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]Leeg[/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]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"POST"[/COLOR][COLOR= #007700]) && ([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]signup[/COLOR][COLOR= #007700]])) {[/COLOR]
[COLOR= #0000BB]$signup_sql[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO leden VALUES(,"[/COLOR][COLOR= #007700].[/COLOR]sqlsafe[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]","[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]")"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$signup_sql[/COLOR] [COLOR= #007700]==[/COLOR] TRUE[COLOR= #007700]) {[/COLOR]
                          [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Dit lid is succesvol aangemeld"[/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]"Error: Dit lid is niet succesvol aangemeld wegens: "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]();
                          }
                          }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
                          ?>
Moet het dan zo?

Plaats het wel in de juiste if statement.
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