Jump to content



  • Please log in to reply
2 replies to this topic

#1 timmiejboi



  • New Members
  • Pip
  • 2 posts

Posted 16 August 2014 - 07:10 PM

the sript tells me he send it, without i fill in anything.

and i dont get any mail

testversion : remcogaasenbeek.nl/nieuw

<form name="form1" method="post" action="verzenden.php">
  <table width="400" border="0">
      <td colspan="2">
      <td width="30%"><font face="Arial" size="2"><font color="#f19028">*</font> Naam</font></td>
      <td width="70%">
        <input type="text" name="naam" size="20">
      <td width="30%"><font face="Arial" size="2"><font color="#f19028">*</font> Email</font></td>
      <td width="70%">
        <input type="text" name="email" size="20">
      <td width="30%"><font face="Arial" size="2"><font color="#f19028">*</font> Telefoonnummer</font></td>
      <td width="70%">
        <input type="text" name="telefoonnummer" size="20">
      <td width="30%"><font face="Arial" size="2"><font color="#f19028">*</font> Woonplaats</font></td>
      <td width="70%">
        <input type="text" name="woonplaats" size="20">
      <td colspan="2">
        <font face="Arial" size="2"><br>
        <input type="submit" name="submit" value="Verstuur">
<font color="#f19028">*</font> <font size="1"> De proefles is gratis indien men besluit om een rijopleiding <BR>bij rijschool Remco Gaaseneek te nemen. anders blijft het een vrijblijvende les van €25,-.</font>

if (!isset($_POST['naam']) || !isset($_POST['email']) || !isset($_POST['telefoonnummer'])) {
    echo 'U heeft niet alle velden ingevuld!';
$naam = htmlspecialchars($_POST['naam']);
$email = htmlspecialchars($_POST['email']);
$telefoonnummer = htmlspecialchars($_POST['telefoonnummer']);
$woonplaats= htmlspecialchars($_POST['woonplaats']);
$tijd = time();
$datum = strftime('%d/%m/%y %H:%M', $tijd);
$ip = getenv('REMOTE_ADDR');
$message = $naam.' met het e-mailadres '.$email.' en het IP '.$ip.' stuurde op '.$datum.' het volgende nummer en woonplaats:
mail('timiejboi@gmail.com', 'proefles', $message, 'From: '.$email);                                 
echo 'Uw bericht is verzonden. U krijgt zo snel mogelijk antwoord.';

i hope u guys can help me out.





#2 mac_gyver


    Staff Alumni

  • Staff Alumni
  • 3,496 posts

Posted 17 August 2014 - 04:17 PM

text textarea, and password form fields will be set, even if they are empty.


your form processing logic should first test if your form was submitted, then specifically test the content from each form field. for fields that are required, at a minimum, you would want to test if their character length is greater than an acceptable minimum.

multi-purpose programming fool. well written source-code should be self-documenting. well written code should be self-troubleshooting.

#3 BuildMyWeb


    Advanced Member

  • Members
  • PipPipPip
  • 180 posts
  • LocationNY

Posted 20 August 2014 - 08:33 PM


instead of

Freelance Web Developer | Web Hosting | PHP Applications
Web Development, Hosting, Graphic Design, SEO

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users