Maxlengte weghalen -> fixed: vraag 2!

Gestart doorRemcoboy34 reacties40 weergaven

35 berichten · pagina 2 van 3

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
if(preg_match("/[a-zA-Z0-9_-.+]+@[a-zA-Z0-9-]+.[a-zA-Z]+/", $_POST[email]) < 0){

if(preg_match("/[a-zA-Z0-9_-.+]+@[a-zA-Z0-9-]+.[a-zA-Z]+/", $_POST[email]) > 0){
0
Remcoboy

Lid · Topicstarter

Berichten
4.749
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nielsie:
if(preg_match("/[a-zA-Z0-9_-.+]+@[a-zA-Z0-9-]+.[a-zA-Z]+/", $_POST[email]) < 0){

if(preg_match("/[a-zA-Z0-9_-.+]+@[a-zA-Z0-9-]+.[a-zA-Z]+/", $_POST[email]) > 0){

waar moet die?
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
vervangen...
0
Remcoboy

Lid · Topicstarter

Berichten
4.749
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Heb vorige nietmeer, kan je miss in hele doen :

[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]header.php[/COLOR][COLOR= #007700]);[/COLOR] ?>
<h2>Contacteer [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] SITENAME[COLOR= #007700];[/COLOR] ?></h2>
[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]name[/COLOR][COLOR= #007700]])) {[/COLOR]
    [COLOR= #0000BB]$username[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR] [URL="http://www.php.net/strtolower"]strtolower[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]code[/COLOR][COLOR= #007700]])!=[/COLOR] [URL="http://www.php.net/strtolower"]strtolower[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]texto[/COLOR][COLOR= #007700]])){[/COLOR] 
        [COLOR= #0000BB]$display_error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"* Security Code Error"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// error language[/COLOR]
        [URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]error.php[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700]();
    }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
        [COLOR= #0000BB]$name[/COLOR][COLOR= #007700]=[/COLOR]limpiar[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"name"[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$email[/COLOR][COLOR= #007700]=[/COLOR]limpiar[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$topic[/COLOR][COLOR= #007700]=[/COLOR]limpiar[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"topic"[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$subject[/COLOR][COLOR= #007700]=[/COLOR]limpiar[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"subject"[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$comments[/COLOR][COLOR= #007700]=[/COLOR]limpiar[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"comments"[/COLOR][COLOR= #007700]]);[/COLOR]

        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$name[/COLOR][COLOR= #007700]==[/COLOR]NULL[COLOR= #007700]|[/COLOR][COLOR= #0000BB]$email[/COLOR][COLOR= #007700]==[/COLOR]NULL[COLOR= #007700]|[/COLOR][COLOR= #0000BB]$topic[/COLOR][COLOR= #007700]==[/COLOR]NULL[COLOR= #007700]|[/COLOR][COLOR= #0000BB]$subject[/COLOR][COLOR= #007700]==[/COLOR]NULL[COLOR= #007700]|[/COLOR][COLOR= #0000BB]$comments[/COLOR][COLOR= #007700]==[/COLOR]NULL[COLOR= #007700]){[/COLOR]
            [COLOR= #0000BB]$display_error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"* All fields are required"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// error language[/COLOR]
            [URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]error.php[/COLOR][COLOR= #007700]);[/COLOR]
            [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700]();
        }[/COLOR]

        [COLOR= #0000BB]$laip[/COLOR] [COLOR= #007700]=[/COLOR] getRealIP[COLOR= #007700]();[/COLOR]
        [COLOR= #0000BB]$myDb[/COLOR][COLOR= #007700]->[/COLOR]connect[COLOR= #007700]();[/COLOR]
            [COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"INSERT INTO yob_contact (name, email, topic, subject, comments, ip) VALUES($name,$email,$topic,$subject,$comments,$laip)"[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
        [COLOR= #0000BB]$myDb[/COLOR][COLOR= #007700]->[/COLOR]close[COLOR= #007700]();[/COLOR]

        [COLOR= #0000BB]$display_error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"* Your Message has been sent correctly."[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// error language[/COLOR]
        [URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]error.php[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700]();
    }
}[/COLOR]


[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"<p>Gebruik het onderstaande formulier om <?php echo SITENAME; ?> te contacteren.</p>"[/COLOR][COLOR= #007700];[/COLOR]
?>
<form action="contactus.php" method="post" class="f-wrap-1">
    <div class="req">Alle velden verplicht</div>
    <fieldset>
    <h3>Contact Formulier</h3>

    <label><b>Uw naam:</b>
    <input type="text" name="name" autocomplete="off" class="f-name" value="" tabindex="1" /><br />
    </label>
    <label><b>Uw E-Mail:</b>
    <input type="text" name="email" autocomplete="off" class="f-name" value="" tabindex="2" /><br />
    </label>
    <label><b>Onderwerp:</b>
    <input type="text" name="topic" autocomplete="off" class="f-name" value="" tabindex="3" /><br />
    </label>
    <label><b>Vraag:</b>
    <input type="text" name="subject" autocomplete="off" class="f-name" value="" tabindex="4" /><br />
    </label>
    <label><b>Commentaar:</b>
    <textarea name="comments" rows="7" class="f-comments" value="" tabindex="5"></textarea><br />
    </label>
    <label><b>Beveiligingscode:</b>
    <input type=text name=code autocomplete="off" class="f-name" value="" tabindex="6" /><br />
    </label>
    <label for="code2"><b>&nbsp;</b>
    <img src="image.php?[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$res[/COLOR][COLOR= #007700];[/COLOR] ?>" /><br />
    </label>
    <div class="f-submit-wrap">
        <input type="submit" value="Verstuur" class="f-submit" tabindex="18" /><br />
    </div>
</fieldset>
</form>


[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]footer.php[/COLOR][COLOR= #007700]);[/COLOR] ?>
0
Remcoboy

Lid · Topicstarter

Berichten
4.749
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
@Niels nogsteeds gewoon verzonden..
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
zoek dan @ google
Had deze ook maar van internet voor je gepluktxd
0
Remcoboy

Lid · Topicstarter

Berichten
4.749
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Iemand anders die het weet?
0
Berichten
2.517
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]header.php[/COLOR][COLOR= #007700]);[/COLOR] ?>
echo"<h2>Contacteer [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] SITENAME[COLOR= #007700];[/COLOR] ?></h2>";
[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]name[/COLOR][COLOR= #007700]])) {[/COLOR]
    [COLOR= #0000BB]$username[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR] [URL="http://www.php.net/strtolower"]strtolower[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]code[/COLOR][COLOR= #007700]])!=[/COLOR] [URL="http://www.php.net/strtolower"]strtolower[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]texto[/COLOR][COLOR= #007700]])){[/COLOR] 
        [COLOR= #0000BB]$display_error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"* Security Code Error"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// error language[/COLOR]
        [URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]error.php[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700]();
    }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
        [COLOR= #0000BB]$name[/COLOR][COLOR= #007700]=[/COLOR]limpiar[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"name"[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$email[/COLOR][COLOR= #007700]=[/COLOR]limpiar[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$topic[/COLOR][COLOR= #007700]=[/COLOR]limpiar[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"topic"[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$subject[/COLOR][COLOR= #007700]=[/COLOR]limpiar[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"subject"[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$comments[/COLOR][COLOR= #007700]=[/COLOR]limpiar[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"comments"[/COLOR][COLOR= #007700]]);[/COLOR]

        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$name[/COLOR][COLOR= #007700]==[/COLOR]NULL[COLOR= #007700]|[/COLOR][COLOR= #0000BB]$email[/COLOR][COLOR= #007700]==[/COLOR]NULL[COLOR= #007700]|[/COLOR][COLOR= #0000BB]$topic[/COLOR][COLOR= #007700]==[/COLOR]NULL[COLOR= #007700]|[/COLOR][COLOR= #0000BB]$subject[/COLOR][COLOR= #007700]==[/COLOR]NULL[COLOR= #007700]|[/COLOR][COLOR= #0000BB]$comments[/COLOR][COLOR= #007700]==[/COLOR]NULL[COLOR= #007700]){[/COLOR]
            [COLOR= #0000BB]$display_error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"* All fields are required"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// error language[/COLOR]
            [URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]error.php[/COLOR][COLOR= #007700]);[/COLOR]
            [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700]();
        }[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/ereg"]ereg[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"^[a_zA-ZO-9-]+(.[a-zA-ZO-9-]+)@([a-zA-ZO-9-]+.)+([a-zA-Z]{2,4})$"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$email[/COLOR][COLOR= #007700])){
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
        [COLOR= #0000BB]$laip[/COLOR] [COLOR= #007700]=[/COLOR] getRealIP[COLOR= #007700]();[/COLOR]
        [COLOR= #0000BB]$myDb[/COLOR][COLOR= #007700]->[/COLOR]connect[COLOR= #007700]();[/COLOR]
            [COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"INSERT INTO yob_contact (name, email, topic, subject, comments, ip) VALUES($name,$email,$topic,$subject,$comments,$laip)"[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
        [COLOR= #0000BB]$myDb[/COLOR][COLOR= #007700]->[/COLOR]close[COLOR= #007700]();[/COLOR]

        [COLOR= #0000BB]$display_error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"* Your Message has been sent correctly."[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// error language[/COLOR]
        [URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]error.php[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700]();
    }
}
}[/COLOR]


[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"<p>Gebruik het onderstaande formulier om <?php echo SITENAME; ?> te contacteren.</p>"[/COLOR][COLOR= #007700];[/COLOR]
?>

<form action="contactus.php" method="post" class="f-wrap-1">
    <div class="req">Alle velden verplicht</div>
    <fieldset>
    <h3>Contact Formulier</h3>

    <label><b>Uw naam:</b>
    <input type="text" name="name" autocomplete="off" class="f-name" value="" tabindex="1" /><br />
    </label>
    <label><b>Uw E-Mail:</b>
    <input type="text" name="email" autocomplete="off" class="f-name" value="" tabindex="2" /><br />
    </label>
    <label><b>Onderwerp:</b>
    <input type="text" name="topic" autocomplete="off" class="f-name" value="" tabindex="3" /><br />
    </label>
    <label><b>Vraag:</b>
    <input type="text" name="subject" autocomplete="off" class="f-name" value="" tabindex="4" /><br />
    </label>
    <label><b>Commentaar:</b>
    <textarea name="comments" rows="7" class="f-comments" value="" tabindex="5"></textarea><br />
    </label>
    <label><b>Beveiligingscode:</b>
    <input type=text name=code autocomplete="off" class="f-name" value="" tabindex="6" /><br />
    </label>
    <label for="code2"><b>&nbsp;</b>
    <img src="image.php?[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$res[/COLOR][COLOR= #007700];[/COLOR] ?>" /><br />
    </label>
    <div class="f-submit-wrap">
        <input type="submit" value="Verstuur" class="f-submit" tabindex="18" /><br />
    </div>
</fieldset>
</form>


[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]footer.php[/COLOR][COLOR= #007700]);[/COLOR] ?>


probeer dat eens
0
Remcoboy

Lid · Topicstarter

Berichten
4.749
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
@Propje, ja alleen geen error..
0
Berichten
2.517
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]header.php[/COLOR][COLOR= #007700]);[/COLOR] ?>
echo"<h2>Contacteer [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] SITENAME[COLOR= #007700];[/COLOR] ?></h2>";
[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]name[/COLOR][COLOR= #007700]])) {[/COLOR]
    [COLOR= #0000BB]$username[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR] [URL="http://www.php.net/strtolower"]strtolower[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]code[/COLOR][COLOR= #007700]])!=[/COLOR] [URL="http://www.php.net/strtolower"]strtolower[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]texto[/COLOR][COLOR= #007700]])){[/COLOR] 
        [COLOR= #0000BB]$display_error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"* Security Code Error"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// error language[/COLOR]
        [URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]error.php[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700]();
    }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
        [COLOR= #0000BB]$name[/COLOR][COLOR= #007700]=[/COLOR]limpiar[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"name"[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$email[/COLOR][COLOR= #007700]=[/COLOR]limpiar[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$topic[/COLOR][COLOR= #007700]=[/COLOR]limpiar[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"topic"[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$subject[/COLOR][COLOR= #007700]=[/COLOR]limpiar[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"subject"[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$comments[/COLOR][COLOR= #007700]=[/COLOR]limpiar[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"comments"[/COLOR][COLOR= #007700]]);[/COLOR]

        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$name[/COLOR][COLOR= #007700]==[/COLOR]NULL[COLOR= #007700]|[/COLOR][COLOR= #0000BB]$email[/COLOR][COLOR= #007700]==[/COLOR]NULL[COLOR= #007700]|[/COLOR][COLOR= #0000BB]$topic[/COLOR][COLOR= #007700]==[/COLOR]NULL[COLOR= #007700]|[/COLOR][COLOR= #0000BB]$subject[/COLOR][COLOR= #007700]==[/COLOR]NULL[COLOR= #007700]|[/COLOR][COLOR= #0000BB]$comments[/COLOR][COLOR= #007700]==[/COLOR]NULL[COLOR= #007700]){[/COLOR]
            [COLOR= #0000BB]$display_error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"* All fields are required"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// error language[/COLOR]
            [URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]error.php[/COLOR][COLOR= #007700]);[/COLOR]
            [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700]();
        }[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/ereg"]ereg[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"^[a_zA-ZO-9-]+(.[a-zA-ZO-9-]+)@([a-zA-ZO-9-]+.)+([a-zA-Z]{2,4})$"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$email[/COLOR][COLOR= #007700])){[/COLOR]
[COLOR= #0000BB]$error_msg[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"geef een geldige emailadres op."[/COLOR][COLOR= #007700];
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
        [COLOR= #0000BB]$laip[/COLOR] [COLOR= #007700]=[/COLOR] getRealIP[COLOR= #007700]();[/COLOR]
        [COLOR= #0000BB]$myDb[/COLOR][COLOR= #007700]->[/COLOR]connect[COLOR= #007700]();[/COLOR]
            [COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"INSERT INTO yob_contact (name, email, topic, subject, comments, ip) VALUES($name,$email,$topic,$subject,$comments,$laip)"[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
        [COLOR= #0000BB]$myDb[/COLOR][COLOR= #007700]->[/COLOR]close[COLOR= #007700]();[/COLOR]

        [COLOR= #0000BB]$display_error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"* Your Message has been sent correctly."[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// error language[/COLOR]
        [URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]error.php[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700]();
    }
}
}[/COLOR]


[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"<p>Gebruik het onderstaande formulier om <?php echo SITENAME; ?> te contacteren.</p>"[/COLOR][COLOR= #007700];[/COLOR]
?>

<form action="contactus.php" method="post" class="f-wrap-1">
    <div class="req">Alle velden verplicht</div>
    <fieldset>
    <h3>Contact Formulier</h3>

    <label><b>Uw naam:</b>
    <input type="text" name="name" autocomplete="off" class="f-name" value="" tabindex="1" /><br />
    </label>
    <label><b>Uw E-Mail:</b>
    <input type="text" name="email" autocomplete="off" class="f-name" value="" tabindex="2" /><br />
    </label>
    <label><b>Onderwerp:</b>
    <input type="text" name="topic" autocomplete="off" class="f-name" value="" tabindex="3" /><br />
    </label>
    <label><b>Vraag:</b>
    <input type="text" name="subject" autocomplete="off" class="f-name" value="" tabindex="4" /><br />
    </label>
    <label><b>Commentaar:</b>
    <textarea name="comments" rows="7" class="f-comments" value="" tabindex="5"></textarea><br />
    </label>
    <label><b>Beveiligingscode:</b>
    <input type=text name=code autocomplete="off" class="f-name" value="" tabindex="6" /><br />
    </label>
    <label for="code2"><b>&nbsp;</b>
    <img src="image.php?[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$res[/COLOR][COLOR= #007700];[/COLOR] ?>" /><br />
    </label>
    <div class="f-submit-wrap">
        <input type="submit" value="Verstuur" class="f-submit" tabindex="18" /><br />
    </div>
</fieldset>
</form>


[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]footer.php[/COLOR][COLOR= #007700]);[/COLOR] ?>


probeer dat eens
0
Remcoboy

Lid · Topicstarter

Berichten
4.749
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
@propje nog niet
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
http://nl.php.net/filter_var

if(filter_var(bob@example.com, FILTER_VALIDATE_EMAIL) == FALSE)
{
// onjuiste email
}
0
Remcoboy

Lid · Topicstarter

Berichten
4.749
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
@Rik en in me script ?

[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]header.php[/COLOR][COLOR= #007700]);[/COLOR] ?>
<h2>Contacteer [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] SITENAME[COLOR= #007700];[/COLOR] ?></h2>
[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]name[/COLOR][COLOR= #007700]])) {[/COLOR]
    [COLOR= #0000BB]$username[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR] [URL="http://www.php.net/strtolower"]strtolower[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]code[/COLOR][COLOR= #007700]])!=[/COLOR] [URL="http://www.php.net/strtolower"]strtolower[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]texto[/COLOR][COLOR= #007700]])){[/COLOR] 
        [COLOR= #0000BB]$display_error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"* Foute beveiligingscode"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// beveiligings error [/COLOR]
        [URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]error.php[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700]();
    }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
        [COLOR= #0000BB]$name[/COLOR][COLOR= #007700]=[/COLOR]limpiar[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"name"[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$email[/COLOR][COLOR= #007700]=[/COLOR]limpiar[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$topic[/COLOR][COLOR= #007700]=[/COLOR]limpiar[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"topic"[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$subject[/COLOR][COLOR= #007700]=[/COLOR]limpiar[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"subject"[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$comments[/COLOR][COLOR= #007700]=[/COLOR]limpiar[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"comments"[/COLOR][COLOR= #007700]]);[/COLOR]

        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$name[/COLOR][COLOR= #007700]==[/COLOR]NULL[COLOR= #007700]|[/COLOR][COLOR= #0000BB]$email[/COLOR][COLOR= #007700]==[/COLOR]NULL[COLOR= #007700]|[/COLOR][COLOR= #0000BB]$topic[/COLOR][COLOR= #007700]==[/COLOR]NULL[COLOR= #007700]|[/COLOR][COLOR= #0000BB]$subject[/COLOR][COLOR= #007700]==[/COLOR]NULL[COLOR= #007700]|[/COLOR][COLOR= #0000BB]$comments[/COLOR][COLOR= #007700]==[/COLOR]NULL[COLOR= #007700]){[/COLOR]
            [COLOR= #0000BB]$display_error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"* Vul alle velden in!"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// alle velden [/COLOR]
            [URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]error.php[/COLOR][COLOR= #007700]);[/COLOR]
            [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700]();
        }[/COLOR]

        [COLOR= #0000BB]$laip[/COLOR] [COLOR= #007700]=[/COLOR] getRealIP[COLOR= #007700]();[/COLOR]
        [COLOR= #0000BB]$myDb[/COLOR][COLOR= #007700]->[/COLOR]connect[COLOR= #007700]();[/COLOR]
        
            [COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"INSERT INTO yob_contact (name, email, topic, subject, comments, ip) VALUES($name,$email,$topic,$subject,$comments,$laip)"[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
        [COLOR= #0000BB]$myDb[/COLOR][COLOR= #007700]->[/COLOR]close[COLOR= #007700]();[/COLOR]

        [COLOR= #0000BB]$display_error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"* Uw mail is succesvol verzonden."[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// verzonden[/COLOR]
        [URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]error.php[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700]();
    }
}[/COLOR]


[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"Gebruik het onderstaande formulier om "[/COLOR][COLOR= #007700];[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] SITENAME[COLOR= #007700];[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]" te contacteren."[/COLOR][COLOR= #007700];[/COLOR]
?>
<form action="contactus.php" method="post" class="f-wrap-1">
    <div class="req">Alle velden verplicht</div>
    <fieldset>
    <h3>Contact Formulier</h3>

    <label><b>Uw naam:</b>
    <input type="text" name="name" autocomplete="off" class="f-name" value="" tabindex="1" /><br />
    </label>
    <label><b>Uw E-Mail:</b>
    <input type="text" name="email" autocomplete="off" class="f-name" value="" tabindex="2" /><br />
    </label>
    <label><b>Onderwerp:</b>
    <input type="text" name="topic" autocomplete="off" class="f-name" value="" tabindex="3" /><br />
    </label>
    <label><b>Vraag:</b>
    <input type="text" name="subject" autocomplete="off" class="f-name" value="" tabindex="4" /><br />
    </label>
    <label><b>Commentaar:</b>
    <textarea name="comments" rows="7" class="f-comments" value="" tabindex="5"></textarea><br />
    </label>
    <label><b>Beveiligingscode:</b>
    <input type=text name=code autocomplete="off" class="f-name" value="" tabindex="6" /><br />
    </label>
    <label for="code2"><b>&nbsp;</b>
    <img src="image.php?[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$res[/COLOR][COLOR= #007700];[/COLOR] ?>" /><br />
    </label>
    <div class="f-submit-wrap">
        <input type="submit" value="Verstuur" class="f-submit" tabindex="18" /><br />
    </div>
</fieldset>
</form>


[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]footer.php[/COLOR][COLOR= #007700]);[/COLOR] ?>
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Ja hallo, probeer zelf ook eens dingen.. schater
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