-----Oorspronkelijk bericht-----
Verzonden: Friday, March 29, 2002 11:59 AM
Onderwerp: failure notice

Hi. This is the qmail-send program at pb1.pair.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

timed out waiting for confirmation that sender is real
I'm not going to try again; this message has been in the queue too long.

--- Below this line is a copy of the message.

Return-Path: <[EMAIL PROTECTED]>
Received: (qmail 92721 invoked by uid 1007); 22 Mar 2002 09:58:45 -0000
Reply-To: "Marij B." <[EMAIL PROTECTED]>
From: "Marij B." <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
Subject: Re: date problem
Date: Fri, 22 Mar 2002 10:58:48 +0100
Lines: 88
Organization: Centric
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400

Make a validation on the data field.
I have one that checks dates, hope its good for you too:

    #functie valid_date
    function valid_date($string)
     #Connectie database: vanuit moederscript!!
     #Connection met database openen: vanuit moederscript!!
     global $database;
     global $connection;

     if (strlen($string) < 8)
     { #die ("String te kort")
      return FALSE;

     $query_checktime = "SELECT UNIX_TIMESTAMP($string)";
     $result = mysql_db_query($database, $query_checktime, $connection)
         or die ("Could not execute query: $query_checktime. " .

  $row = mysql_fetch_row($result);
  if ($row[0] == "0")
   #die ("Ongeldige string")
   return FALSE;
   return TRUE;

check before to function

  #controle datum
  $datum = $year.$month.$day;
  if ( !valid_date($datum) )
   $foutmessage .= "U heeft geen geldig formaat als datum ingevoerd !<br>";
     $check = 0;

  if (empty($year))
     $foutmessage .= "U heeft geen jaartal ingevoerd !<br>";
     $check = 0;
    if (empty($month))
     $foutmessage .= "U heeft geen maand ingevoerd !<br>";
     $check = 0;
    if (empty($day))
     $foutmessage .= "U heeft geen dag ingevoerd !<br>";
     $check = 0;
  #email check

form field data:
     <td class="text" valign="top"><br>Datum:<span
class="verplicht">*</span><br><p class="verplicht">Formaat:</p></td>
     <td class="text">
      <br>Dag:<font color="white">.............</font>Maand:<font
      <input type="text" name="day" size="2" maxlength="2" value="<? echo
$day ?>"><font color="white">..........</font>
      <input type="text" name="month" size="2" maxlength="2" value="<? echo
$month ?>"><font color="white">..........</font>
      <input type="text" name="year" size="4" maxlength="4" value="<? echo
$year ?>"><br>
      <font class="verplicht">DD<font

Hope it helps.
MVG Marij

The information included in this message is personal and/or confidential and
intended exclusively for the addressees as stated. This message and/or the
accompanying documents may contain confidential information and should be
handled accordingly. If you are not the intended reader of this message, we
urgently request that you notify Centric immediately and that you delete
this e-mail and any copies of it from your system and destroy any printouts
It is forbidden to distribute, reproduce, use or disclose the information in
this e-mail to third parties without obtaining prior permission from
Centric. We expressly point out that there are risks associated with the use
of e-mail. Centric and the companies within the group shall not accept any
liability whatsoever for damage resulting from the use of e-mail. Legally
binding obligations can only arise for Centric by means of a written
instrument, signed by an authorized representative of Centric. 

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to