Vraag over forumulier

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Andre Pennings

Andre Pennings

17/10/2011 11:41:16
Quote Anchor link
Beste clubleden,
Ik werk met web builder en kan daarmee zelf een mailformulier maken omdat dit programma dat omzet naar PHP. Nu is mij stiefzoon voor zich zelf begonnen en hij heeft een wat uitgebreider forumier nodig en dat heb ik ook gemaakt.
Echter ik krijg de volgende foutmelding:
-------------------------------------------------------------------------------
Warning: file_get_contents() [function.file-get-contents]: Filename cannot be empty in /mnt/webb/61/23/52629623/htdocs/test/offerte.php on line 33
-------------------------------------------------------------------------------

Ikzelf zie op lijn 33 niet iets waar ik wat mee kan.
Wie kan mij op weg helpen?

Op onderstaande link staat het volledige script.

http://andrep.nl/offerte.txt

Alvast mijn hartelijk dank!!

Met vriendelijke groeten,
André
Gewijzigd op 17/10/2011 11:56:09 door Andre Pennings
 
PHP hulp

PHP hulp

21/11/2024 16:53:42
 
- Ariën  -
Beheerder

- Ariën -

17/10/2011 12:25:21
Quote Anchor link
Kan je de relevante code van het script hier plaatsen? Straks werkt de URL niet meer, en is dit topic meteen zinloos.
 
Andre Pennings

Andre Pennings

17/10/2011 12:45:40
Quote Anchor link
Hallo,
jazeker ik was bang dat dit vanwege de vele ruimte niet mag.
-------------------------------------------------------------------------------------
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
   function ValidateEmail($email)
   {

      $pattern = '/^([0-9a-z]([-.\w]*[0-9a-z])*@(([0-9a-z])+([-\w]*[0-9a-z])*\.)+[a-z]{2,6})$/i';
      return preg_match($pattern, $email);
   }


   if($_SERVER['REQUEST_METHOD'] == 'POST')
   {

      $mailto = 'info@exacttrans';
      $mailfrom = isset($_POST['email']) ? $_POST['email'] : $mailto;
      $subject = '';
      $message = 'Values submitted from web site form:';
      $success_url = './bedankt_offerte.html';
      $error_url = '';
      $error = '';
      $eol = "\n";
      $max_filesize = isset($_POST['filesize']) ? $_POST['filesize'] * 1024 : 1024000;
      $boundary = md5(uniqid(time()));

      $header  = 'From: '.$mailfrom.$eol;
      $header .= 'Reply-To: '.$mailfrom.$eol;
      $header .= 'MIME-Version: 1.0'.$eol;
      $header .= 'Content-Type: multipart/mixed; boundary="'.$boundary.'"'.$eol;
      $header .= 'X-Mailer: PHP v'.phpversion().$eol;
      if (!ValidateEmail($mailfrom))
      {

         $error .= "The specified email address is invalid!\n<br>";
      }


      if (!empty($error))
      {

         $errorcode = file_get_contents($error_url);
         $replace = "##error##";
         $errorcode = str_replace($replace, $error, $errorcode);
         echo $errorcode;
         exit;
      }


      $internalfields = array ("submit", "reset", "send", "captcha_code");
      $message .= $eol;
      foreach ($_POST as $key => $value)
      {

         if (!in_array(strtolower($key), $internalfields))
         {

            if (!is_array($value))
            {

               $message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol;
            }

            else
            {
               $message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol;
            }
         }
      }


      $body  = 'This is a multi-part message in MIME format.'.$eol.$eol;
      $body .= '--'.$boundary.$eol;
      $body .= 'Content-Type: text/plain; charset=iso-8859-1'.$eol;
      $body .= 'Content-Transfer-Encoding: 8bit'.$eol;
      $body .= $eol.stripslashes($message).$eol;
      if (!empty($_FILES))
      {

          foreach ($_FILES as $key => $value)
          {

             if ($_FILES[$key]['error'] == 0 && $_FILES[$key]['size'] <= $max_filesize)
             {

                $body .= '--'.$boundary.$eol;
                $body .= 'Content-Type: '.$_FILES[$key]['type'].'; name='.$_FILES[$key]['name'].$eol;
                $body .= 'Content-Transfer-Encoding: base64'.$eol;
                $body .= 'Content-Disposition: attachment; filename='.$_FILES[$key]['name'].$eol;
                $body .= $eol.chunk_split(base64_encode(file_get_contents($_FILES[$key]['tmp_name']))).$eol;
             }
         }
      }

      $body .= '--'.$boundary.'--'.$eol;
      mail($mailto, $subject, $body, $header);
      header('Location: '.$success_url);
      exit;
   }

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Exactrans</title>
<meta name="generator" content="WYSIWYG Web Builder - http://www.wysiwygwebbuilder.com";>
<style type="text/css">
div#container
{
width: 995px;
position: relative;
margin-top: 0px;
margin-left: auto;
margin-right: auto;
text-align: left;
}
body
{
text-align: center;
margin: 0;
}
</style>
<script type="text/javascript" src="jscookmenu.js"></script>
<style type="text/css">
.ThemeMenuBar1Menu,
.ThemeMenuBar1SubMenuTable
{
font-family: Arial Black;
font-size: 15px;
font-weight: normal;
color: #006BF5;
text-align: left;
padding: 0;
cursor: pointer;
}
.ThemeMenuBar1MenuOuter
{
background-color: #BFDBFF;
border: 0;
}
.ThemeMenuBar1SubMenu
{
position: absolute;
visibility: hidden;
border: 0;
padding: 0;
border: 0;
}
.ThemeMenuBar1Menu td
{
padding: 3px 0px 3px 0px;
}
.ThemeMenuBar1SubMenuTable
{
color: #006BF5;
text-align: left;
background-color: #BFDBFF;
font-weight: normal;
font-style: normal;
text-decoration: none;
}
.ThemeMenuBar1SubMenuTable td
{
white-space: nowrap;
}
.ThemeMenuBar1MainItem,
.ThemeMenuBar1MainItemHover,
.ThemeMenuBar1MainItemActive,
.ThemeMenuBar1MenuItem,
.ThemeMenuBar1MenuItemHover,
.ThemeMenuBar1MenuItemActive
{
white-space: nowrap;
}
.ThemeMenuBar1MainItemHover,
.ThemeMenuBar1MainItemActive
{
color: #006BF5;
background-color: #EFF6FF;
font-weight: normal;
font-style: normal;
text-decoration: none;
}
.ThemeMenuBar1MenuItemHover,
.ThemeMenuBar1MenuItemActive
{
color: #006BF5;
background-color: #EFF6FF;
font-weight: normal;
font-style: normal;
text-decoration: none;
}
.ThemeMenuBar1MenuFolderLeft,
.ThemeMenuBar1MenuFolderRight,
.ThemeMenuBar1MenuItemLeft,
.ThemeMenuBar1MenuItemRight
{
padding: 3px 0px 3px 0px;
}
td.ThemeMenuBar1MainFolderText,
td.ThemeMenuBar1MainItemText
{
padding: 3px 28px 3px 25px;
}
.ThemeMenuBar1MenuFolderText,
.ThemeMenuBar1MenuItemText
{
padding: 3px 45px 3px 45px;
}
td.ThemeMenuBar1MenuSplit
{
overflow: hidden;
background-color: inherit;
}
div.ThemeMenuBar1MenuSplit
{
height: 1px;
margin: 0px 0px 0px 0px;
overflow: hidden;
background-color: inherit;
border-top: 1px solid #006BF5;
}
.ThemeMenuBar1MenuVSplit
{
display: block;
width: 1px;
margin: 0px 27px 0px 30px;
overflow: hidden;
background-color: inherit;
border-right: 1px solid #006BF5;
}
</style>
<style type="text/css">
.ThemeMenuBar2Menu,
.ThemeMenuBar2SubMenuTable
{
font-family: Arial Black;
font-size: 15px;
font-weight: normal;
color: #006BF5;
text-align: left;
padding: 0;
cursor: pointer;
}
.ThemeMenuBar2MenuOuter
{
background-color: #BFDBFF;
border: 0;
}
.ThemeMenuBar2SubMenu
{
position: absolute;
visibility: hidden;
border: 0;
padding: 0;
border: 0;
}
.ThemeMenuBar2Menu td
{
padding: 3px 0px 3px 0px;
}
.ThemeMenuBar2SubMenuTable
{
color: #006BF5;
text-align: left;
background-color: #BFDBFF;
font-weight: normal;
font-style: normal;
text-decoration: none;
}
.ThemeMenuBar2SubMenuTable td
{
white-space: nowrap;
}
.ThemeMenuBar2MainItem,
.ThemeMenuBar2MainItemHover,
.ThemeMenuBar2MainItemActive,
.ThemeMenuBar2MenuItem,
.ThemeMenuBar2MenuItemHover,
.ThemeMenuBar2MenuItemActive
{
white-space: nowrap;
}
.ThemeMenuBar2MainItemHover,
.ThemeMenuBar2MainItemActive
{
color: #006BF5;
background-color: #EFF6FF;
font-weight: normal;
font-style: normal;
text-decoration: none;
}
.ThemeMenuBar2MenuItemHover,
.ThemeMenuBar2MenuItemActive
{
color: #006BF5;
background-color: #EFF6FF;
font-weight: normal;
font-style: normal;
text-decoration: none;
}
.ThemeMenuBar2MenuFolderLeft,
.ThemeMenuBar2MenuFolderRight,
.ThemeMenuBar2MenuItemLeft,
.ThemeMenuBar2MenuItemRight
{
padding: 3px 0px 3px 0px;
}
td.ThemeMenuBar2MainFolderText,
td.ThemeMenuBar2MainItemText
{
padding: 3px 17px 3px 13px;
}
.ThemeMenuBar2MenuFolderText,
.ThemeMenuBar2MenuItemText
{
padding: 3px 45px 3px 45px;
}
td.ThemeMenuBar2MenuSplit
{
overflow: hidden;
background-color: inherit;
}
div.ThemeMenuBar2MenuSplit
{
height: 1px;
margin: 0px 0px 0px 0px;
overflow: hidden;
background-color: inherit;
border-top: 1px solid #006BF5;
}
.ThemeMenuBar2MenuVSplit
{
display: block;
width: 1px;
margin: 0px 15px 0px 19px;
overflow: hidden;
background-color: inherit;
border-right: 1px solid #006BF5;
}
</style>
<style type="text/css">
.ThemeMenuBar3Menu,
.ThemeMenuBar3SubMenuTable
{
font-family: Arial Black;
font-size: 15px;
font-weight: normal;
color: #006BF5;
text-align: left;
padding: 0;
cursor: pointer;
}
.ThemeMenuBar3MenuOuter
{
background-color: #BFDBFF;
border: 0;
}
.ThemeMenuBar3SubMenu
{
position: absolute;
visibility: hidden;
border: 0;
padding: 0;
border: 0;
}
.ThemeMenuBar3Menu td
{
padding: 3px 0px 3px 0px;
}
.ThemeMenuBar3SubMenuTable
{
color: #006BF5;
text-align: left;
background-color: #BFDBFF;
font-weight: normal;
font-style: normal;
text-decoration: none;
}
.ThemeMenuBar3SubMenuTable td
{
white-space: nowrap;
}
.ThemeMenuBar3MainItem,
.ThemeMenuBar3MainItemHover,
.ThemeMenuBar3MainItemActive,
.ThemeMenuBar3MenuItem,
.ThemeMenuBar3MenuItemHover,
.ThemeMenuBar3MenuItemActive
{
white-space: nowrap;
}
.ThemeMenuBar3MainItemHover,
.ThemeMenuBar3MainItemActive
{
color: #006BF5;
background-color: #EFF6FF;
font-weight: normal;
font-style: normal;
text-decoration: none;
}
.ThemeMenuBar3MenuItemHover,
.ThemeMenuBar3MenuItemActive
{
color: #006BF5;
background-color: #EFF6FF;
font-weight: normal;
font-style: normal;
text-decoration: none;
}
.ThemeMenuBar3MenuFolderLeft,
.ThemeMenuBar3MenuFolderRight,
.ThemeMenuBar3MenuItemLeft,
.ThemeMenuBar3MenuItemRight
{
padding: 3px 0px 3px 0px;
}
td.ThemeMenuBar3MainFolderText,
td.ThemeMenuBar3MainItemText
{
padding: 3px 15px 3px 14px;
}
.ThemeMenuBar3MenuFolderText,
.ThemeMenuBar3MenuItemText
{
padding: 3px 45px 3px 45px;
}
td.ThemeMenuBar3MenuSplit
{
overflow: hidden;
background-color: inherit;
}
div.ThemeMenuBar3MenuSplit
{
height: 1px;
margin: 0px 0px 0px 0px;
overflow: hidden;
background-color: inherit;
border-top: 1px solid #006BF5;
}
.ThemeMenuBar3MenuVSplit
{
display: block;
width: 1px;
margin: 0px 16px 0px 17px;
overflow: hidden;
background-color: inherit;
border-right: 1px solid #006BF5;
}
</style>
<style type="text/css">
.ThemeMenuBar4Menu,
.ThemeMenuBar4SubMenuTable
{
font-family: Arial Black;
font-size: 15px;
font-weight: normal;
color: #006BF5;
text-align: left;
padding: 0;
cursor: pointer;
}
.ThemeMenuBar4MenuOuter
{
background-color: #BFDBFF;
border: 0;
}
.ThemeMenuBar4SubMenu
{
position: absolute;
visibility: hidden;
border: 0;
padding: 0;
border: 0;
}
.ThemeMenuBar4Menu td
{
padding: 3px 0px 3px 0px;
}
.ThemeMenuBar4SubMenuTable
{
color: #006BF5;
text-align: left;
background-color: #BFDBFF;
font-weight: normal;
font-style: normal;
text-decoration: none;
}
.ThemeMenuBar4SubMenuTable td
{
white-space: nowrap;
}
.ThemeMenuBar4MainItem,
.ThemeMenuBar4MainItemHover,
.ThemeMenuBar4MainItemActive,
.ThemeMenuBar4MenuItem,
.ThemeMenuBar4MenuItemHover,
.ThemeMenuBar4MenuItemActive
{
white-space: nowrap;
}
.ThemeMenuBar4MainItemHover,
.ThemeMenuBar4MainItemActive
{
color: #006BF5;
background-color: #EFF6FF;
font-weight: normal;
font-style: normal;
text-decoration: none;
}
.ThemeMenuBar4MenuItemHover,
.ThemeMenuBar4MenuItemActive
{
color: #006BF5;
background-color: #EFF6FF;
font-weight: normal;
font-style: normal;
text-decoration: none;
}
.ThemeMenuBar4MenuFolderLeft,
.ThemeMenuBar4MenuFolderRight,
.ThemeMenuBar4MenuItemLeft,
.ThemeMenuBar4MenuItemRight
{
padding: 3px 0px 3px 0px;
}
td.ThemeMenuBar4MainFolderText,
td.ThemeMenuBar4MainItemText
{
padding: 3px 20px 3px 21px;
}
.ThemeMenuBar4MenuFolderText,
.ThemeMenuBar4MenuItemText
{
padding: 3px 45px 3px 45px;
}
td.ThemeMenuBar4MenuSplit
{
overflow: hidden;
background-color: inherit;
}
div.ThemeMenuBar4MenuSplit
{
height: 1px;
margin: 0px 0px 0px 0px;
overflow: hidden;
background-color: inherit;
border-top: 1px solid #006BF5;
}
.ThemeMenuBar4MenuVSplit
{
display: block;
width: 1px;
margin: 0px 23px 0px 22px;
overflow: hidden;
background-color: inherit;
border-right: 1px solid #006BF5;
}
</style>
<style type="text/css">
.ThemeMenuBar5Menu,
.ThemeMenuBar5SubMenuTable
{
font-family: Arial Black;
font-size: 15px;
font-weight: normal;
color: #006BF5;
text-align: left;
padding: 0;
cursor: pointer;
}
.ThemeMenuBar5MenuOuter
{
background-color: #BFDBFF;
border: 0;
}
.ThemeMenuBar5SubMenu
{
position: absolute;
visibility: hidden;
border: 0;
padding: 0;
border: 0;
}
.ThemeMenuBar5Menu td
{
padding: 3px 0px 3px 0px;
}
.ThemeMenuBar5SubMenuTable
{
color: #006BF5;
text-align: left;
background-color: #BFDBFF;
font-weight: normal;
font-style: normal;
text-decoration: none;
}
.ThemeMenuBar5SubMenuTable td
{
white-space: nowrap;
}
.ThemeMenuBar5MainItem,
.ThemeMenuBar5MainItemHover,
.ThemeMenuBar5MainItemActive,
.ThemeMenuBar5MenuItem,
.ThemeMenuBar5MenuItemHover,
.ThemeMenuBar5MenuItemActive
{
white-space: nowrap;
}
.ThemeMenuBar5MainItemHover,
.ThemeMenuBar5MainItemActive
{
color: #006BF5;
background-color: #EFF6FF;
font-weight: normal;
font-style: normal;
text-decoration: none;
}
.ThemeMenuBar5MenuItemHover,
.ThemeMenuBar5MenuItemActive
{
color: #006BF5;
background-color: #EFF6FF;
font-weight: normal;
font-style: normal;
text-decoration: none;
}
.ThemeMenuBar5MenuFolderLeft,
.ThemeMenuBar5MenuFolderRight,
.ThemeMenuBar5MenuItemLeft,
.ThemeMenuBar5MenuItemRight
{
padding: 3px 0px 3px 0px;
}
td.ThemeMenuBar5MainFolderText,
td.ThemeMenuBar5MainItemText
{
padding: 3px 19px 3px 17px;
}
.ThemeMenuBar5MenuFolderText,
.ThemeMenuBar5MenuItemText
{
padding: 3px 45px 3px 45px;
}
td.ThemeMenuBar5MenuSplit
{
overflow: hidden;
background-color: inherit;
}
div.ThemeMenuBar5MenuSplit
{
height: 1px;
margin: 0px 0px 0px 0px;
overflow: hidden;
background-color: inherit;
border-top: 1px solid #006BF5;
}
.ThemeMenuBar5MenuVSplit
{
display: block;
width: 1px;
margin: 0px 19px 0px 21px;
overflow: hidden;
background-color: inherit;
border-right: 1px solid #006BF5;
}
</style>
<style type="text/css">
.ThemeMenuBar6Menu,
.ThemeMenuBar6SubMenuTable
{
font-family: Arial Black;
font-size: 15px;
font-weight: normal;
color: #006BF5;
text-align: left;
padding: 0;
cursor: pointer;
}
.ThemeMenuBar6MenuOuter
{
background-color: #BFDBFF;
border: 0;
}
.ThemeMenuBar6SubMenu
{
position: absolute;
visibility: hidden;
border: 0;
padding: 0;
border: 0;
}
.ThemeMenuBar6Menu td
{
padding: 3px 0px 3px 0px;
}
.ThemeMenuBar6SubMenuTable
{
color: #006BF5;
text-align: left;
background-color: #BFDBFF;
font-weight: normal;
font-style: normal;
text-decoration: none;
}
.ThemeMenuBar6SubMenuTable td
{
white-space: nowrap;
}
.ThemeMenuBar6MainItem,
.ThemeMenuBar6MainItemHover,
.ThemeMenuBar6MainItemActive,
.ThemeMenuBar6MenuItem,
.ThemeMenuBar6MenuItemHover,
.ThemeMenuBar6MenuItemActive
{
white-space: nowrap;
}
.ThemeMenuBar6MainItemHover,
.ThemeMenuBar6MainItemActive
{
color: #006BF5;
background-color: #EFF6FF;
font-weight: normal;
font-style: normal;
text-decoration: none;
}
.ThemeMenuBar6MenuItemHover,
.ThemeMenuBar6MenuItemActive
{
color: #006BF5;
background-color: #EFF6FF;
font-weight: normal;
font-style: normal;
text-decoration: none;
}
.ThemeMenuBar6MenuFolderLeft,
.ThemeMenuBar6MenuFolderRight,
.ThemeMenuBar6MenuItemLeft,
.ThemeMenuBar6MenuItemRight
{
padding: 3px 0px 3px 0px;
}
td.ThemeMenuBar6MainFolderText,
td.ThemeMenuBar6MainItemText
{
padding: 3px 8px 3px 7px;
}
.ThemeMenuBar6MenuFolderText,
.ThemeMenuBar6MenuItemText
{
padding: 3px 45px 3px 45px;
}
td.ThemeMenuBar6MenuSplit
{
overflow: hidden;
background-color: inherit;
}
div.ThemeMenuBar6MenuSplit
{
height: 1px;
margin: 0px 0px 0px 0px;
overflow: hidden;
background-color: inherit;
border-top: 1px solid #006BF5;
}
.ThemeMenuBar6MenuVSplit
{
display: block;
width: 1px;
margin: 0px 9px 0px 10px;
overflow: hidden;
background-color: inherit;
border-right: 1px solid #006BF5;
}
</style>
<script language="JavaScript" type="text/javascript">
<!--
function ValidateOfferte(theForm)
{
if (theForm.TextArea1.value == "")
{
alert("Please enter a value for the \"TextArea1\" field.");
theForm.TextArea1.focus();
return false;
}
if (theForm.TextArea1.value.length < 1)
{
alert("Please enter at least 1 characters in the \"TextArea1\" field.");
theForm.TextArea1.focus();
return false;
}
if (theForm.TextArea1.value.length > 30)
{
alert("Please enter at most 30 characters in the \"TextArea1\" field.");
theForm.TextArea1.focus();
return false;
}
if (theForm.TextArea2.value == "")
{
alert("Please enter a value for the \"TextArea2\" field.");
theForm.TextArea2.focus();
return false;
}
if (theForm.TextArea2.value.length < 1)
{
alert("Please enter at least 1 characters in the \"TextArea2\" field.");
theForm.TextArea2.focus();
return false;
}
if (theForm.TextArea2.value.length > 15)
{
alert("Please enter at most 15 characters in the \"TextArea2\" field.");
theForm.TextArea2.focus();
return false;
}
var strValue = theForm.TextArea3.value;
var strFilter = /^([0-9a-z]([-.\w]*[0-9a-z])*@(([0-9a-z])+([-\w]*[0-9a-z])*\.)+[a-z]{2,6})$/i;
if (!strFilter.test(strValue))
{
alert("Please enter a valid email address.");
theForm.TextArea3.focus();
return false;
}
if (theForm.TextArea3.value == "")
{
alert("Please enter a value for the \"TextArea3\" field.");
theForm.TextArea3.focus();
return false;
}
if (theForm.TextArea4.value == "")
{
alert("Please enter a value for the \"TextArea4\" field.");
theForm.TextArea4.focus();
return false;
}
if (theForm.TextArea4.value.length < 1)
{
alert("Please enter at least 1 characters in the \"TextArea4\" field.");
theForm.TextArea4.focus();
return false;
}
if (theForm.TextArea4.value.length > 30)
{
alert("Please enter at most 30 characters in the \"TextArea4\" field.");
theForm.TextArea4.focus();
return false;
}
if (theForm.TextArea5.value == "")
{
alert("Please enter a value for the \"TextArea5\" field.");
theForm.TextArea5.focus();
return false;
}
if (theForm.TextArea5.value.length < 1)
{
alert("Please enter at least 1 characters in the \"TextArea5\" field.");
theForm.TextArea5.focus();
return false;
}
if (theForm.TextArea5.value.length > 30)
{
alert("Please enter at most 30 characters in the \"TextArea5\" field.");
theForm.TextArea5.focus();
return false;
}
if (theForm.TextArea6.value == "")
{
alert("Please enter a value for the \"TextArea6\" field.");
theForm.TextArea6.focus();
return false;
}
if (theForm.TextArea6.value.length < 1)
{
alert("Please enter at least 1 characters in the \"TextArea6\" field.");
theForm.TextArea6.focus();
return false;
}
if (theForm.TextArea6.value.length > 30)
{
alert("Please enter at most 30 characters in the \"TextArea6\" field.");
theForm.TextArea6.focus();
return false;
}
if (theForm.TextArea8.value == "")
{
alert("Please enter a value for the \"TextArea8\" field.");
theForm.TextArea8.focus();
return false;
}
if (theForm.TextArea8.value.length < 1)
{
alert("Please enter at least 1 characters in the \"TextArea8\" field.");
theForm.TextArea8.focus();
return false;
}
if (theForm.TextArea8.value.length > 10)
{
alert("Please enter at most 10 characters in the \"TextArea8\" field.");
theForm.TextArea8.focus();
return false;
}
if (theForm.TextArea10.value == "")
{
alert("Please enter a value for the \"TextArea10\" field.");
theForm.TextArea10.focus();
return false;
}
if (theForm.TextArea10.value.length < 1)
{
alert("Please enter at least 1 characters in the \"TextArea10\" field.");
theForm.TextArea10.focus();
return false;
}
if (theForm.TextArea10.value.length > 500)
{
alert("Please enter at most 500 characters in the \"TextArea10\" field.");
theForm.TextArea10.focus();
return false;
}
return true;
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div id="container">
<div id="wb_MasterPage1" style="position:absolute;left:4px;top:4px;width:1103px;height:484px;z-index:48;" align="left">
<div id="wb_Table1" style="position:absolute;left:144px;top:128px;width:102px;height:118px;background-color:#D50000;z-index:0;" align="left">
<table width="100%" cellpadding="0" cellspacing="1" border="0" bordercolor="#FF0000" id="Table1">
<tr>
<td align="left" valign="top" width="100" height="116">&nbsp;</td>
</tr>
</table></div>
<div id="wb_Table2" style="position:absolute;left:471px;top:129px;width:102px;height:118px;background-color:#D50000;z-index:1;" align="left">
<table width="100%" cellpadding="0" cellspacing="1" border="0" bordercolor="#FF0000" id="Table2">
<tr>
<td align="left" valign="top" width="100" height="116">&nbsp;</td>
</tr>
</table></div>
<div id="wb_Table6" style="position:absolute;left:309px;top:130px;width:102px;height:118px;background-color:#D50000;z-index:2;" align="left">
<table width="100%" cellpadding="0" cellspacing="1" border="0" bordercolor="#FF0000" id="Table6">
<tr>
<td align="left" valign="top" width="100" height="116">&nbsp;</td>
</tr>
</table></div>
<div id="wb_Table7" style="position:absolute;left:640px;top:129px;width:102px;height:118px;background-color:#D50000;z-index:3;" align="left">
<table width="100%" cellpadding="0" cellspacing="1" border="0" bordercolor="#FF0000" id="Table7">
<tr>
<td align="left" valign="top" width="100" height="116">&nbsp;</td>
</tr>
</table></div>
<div id="wb_Table8" style="position:absolute;left:797px;top:129px;width:102px;height:118px;background-color:#D50000;z-index:4;" align="left">
<table width="100%" cellpadding="0" cellspacing="1" border="0" bordercolor="#FF0000" id="Table8">
<tr>
<td align="left" valign="top" width="100" height="116">&nbsp;</td>
</tr>
</table></div>
<div id="wb_Table9" style="position:absolute;left:962px;top:128px;width:102px;height:118px;background-color:#D50000;z-index:5;" align="left">
<table width="100%" cellpadding="0" cellspacing="1" border="0" bordercolor="#FF0000" id="Table9">
<tr>
<td align="left" valign="top" width="100" height="116">&nbsp;</td>
</tr>
</table></div>
<div id="wb_Image1" style="position:absolute;left:403px;top:8px;width:412px;height:64px;z-index:6;" align="left">
<img src="images/Naamloos.jpg" id="Image1" alt="" align="top" border="0" style="width:412px;height:64px;"></div>
<div id="wb_MenuBar1" style="position:absolute;left:144px;top:180px;width:131px;height:61px;z-index:2007;" align="left">
<script type="text/javascript">
<!--
var wbMenuMenuBar1 =
[
[null, 'Home', './index.html', '_self', 'Home']
];
-->
</script>
<div id="MenuIDMenuBar1"></div>
<script type="text/javascript">
<!--
var cmMenuBar1 =
{
mainFolderLeft: '',
mainFolderRight: '',
mainItemLeft: '',
mainItemRight: '',
folderLeft: '',
folderRight: '',
itemLeft: '',
itemRight: '',
mainSpacing: 0,
subSpacing: 0,
delay: 100,
offsetHMainAdjust: [0, 0],
offsetSubAdjust: [0, 0]
};
var cmThemeMenuBar1HSplit = [_cmNoClick, '<td colspan="3" class="ThemeMenuBar1MenuSplit"><div class="ThemeMenuBar1MenuSplit"><\/div><\/td>'];
var cmThemeMenuBar1MainHSplit = [_cmNoClick, '<td colspan="3" class="ThemeMenuBar1MenuSplit"><div class="ThemeMenuBar1MenuSplit"><\/div><\/td>'];
var cmThemeMenuBar1MainVSplit = [_cmNoClick, '<div class="ThemeMenuBar1MenuVSplit">|<\/div>'];

cmDraw('MenuIDMenuBar1', wbMenuMenuBar1, 'hbr', cmMenuBar1, 'ThemeMenuBar1');
-->
</script>
</div>
<div id="wb_MenuBar2" style="position:absolute;left:309px;top:180px;width:131px;height:61px;z-index:2008;" align="left">
<script type="text/javascript">
<!--
var wbMenuMenuBar2 =
[
[null, 'Over&nbsp;ons', null, '_self', 'Over ons',
[null, 'Historie', './Historie.html', '_self', 'Historie'],
[null, 'Visie/missie', './visie_missie.html', '_self', 'Visie/missie']
]
];
-->
</script>
<div id="MenuIDMenuBar2"></div>
<script type="text/javascript">
<!--
var cmMenuBar2 =
{
mainFolderLeft: '',
mainFolderRight: '',
mainItemLeft: '',
mainItemRight: '',
folderLeft: '',
folderRight: '',
itemLeft: '',
itemRight: '',
mainSpacing: 0,
subSpacing: 0,
delay: 100,
offsetHMainAdjust: [0, 0],
offsetSubAdjust: [0, 0]
};
var cmThemeMenuBar2HSplit = [_cmNoClick, '<td colspan="3" class="ThemeMenuBar2MenuSplit"><div class="ThemeMenuBar2MenuSplit"><\/div><\/td>'];
var cmThemeMenuBar2MainHSplit = [_cmNoClick, '<td colspan="3" class="ThemeMenuBar2MenuSplit"><div class="ThemeMenuBar2MenuSplit"><\/div><\/td>'];
var cmThemeMenuBar2MainVSplit = [_cmNoClick, '<div class="ThemeMenuBar2MenuVSplit">|<\/div>'];

cmDraw('MenuIDMenuBar2', wbMenuMenuBar2, 'hbr', cmMenuBar2, 'ThemeMenuBar2');
-->
</script>
</div>
<div id="wb_MenuBar3" style="position:absolute;left:471px;top:182px;width:131px;height:61px;z-index:2009;" align="left">
<script type="text/javascript">
<!--
var wbMenuMenuBar3 =
[
[null, 'Diensten', null, '_self', 'Diensten',
[null, 'Pakket', './Pakket.html', '_self', 'Pakket'],
[null, 'Pallet', './pallet.html', '_self', 'Pallet'],
[null, 'Spoed', './Spoed.html', '_self', 'Spoed'],
[null, 'Voorwaarden', './condities.html', '_self', 'Voorwaarden']
]
];
-->
</script>
<div id="MenuIDMenuBar3"></div>
<script type="text/javascript">
<!--
var cmMenuBar3 =
{
mainFolderLeft: '',
mainFolderRight: '',
mainItemLeft: '',
mainItemRight: '',
folderLeft: '',
folderRight: '',
itemLeft: '',
itemRight: '',
mainSpacing: 0,
subSpacing: 0,
delay: 100,
offsetHMainAdjust: [0, 0],
offsetSubAdjust: [0, 0]
};
var cmThemeMenuBar3HSplit = [_cmNoClick, '<td colspan="3" class="ThemeMenuBar3MenuSplit"><div class="ThemeMenuBar3MenuSplit"><\/div><\/td>'];
var cmThemeMenuBar3MainHSplit = [_cmNoClick, '<td colspan="3" class="ThemeMenuBar3MenuSplit"><div class="ThemeMenuBar3MenuSplit"><\/div><\/td>'];
var cmThemeMenuBar3MainVSplit = [_cmNoClick, '<div class="ThemeMenuBar3MenuVSplit">|<\/div>'];

cmDraw('MenuIDMenuBar3', wbMenuMenuBar3, 'hbr', cmMenuBar3, 'ThemeMenuBar3');
-->
</script>
</div>
<div id="wb_MenuBar4" style="position:absolute;left:641px;top:180px;width:131px;height:61px;z-index:2010;" align="left">
<script type="text/javascript">
<!--
var wbMenuMenuBar4 =
[
[null, 'Nieuws', null, '_self', 'Nieuws',
[null, 'Archief', './archief.html', '_self', 'Archief']
]
];
-->
</script>
<div id="MenuIDMenuBar4"></div>
<script type="text/javascript">
<!--
var cmMenuBar4 =
{
mainFolderLeft: '',
mainFolderRight: '',
mainItemLeft: '',
mainItemRight: '',
folderLeft: '',
folderRight: '',
itemLeft: '',
itemRight: '',
mainSpacing: 0,
subSpacing: 0,
delay: 100,
offsetHMainAdjust: [0, 0],
offsetSubAdjust: [0, 0]
};
var cmThemeMenuBar4HSplit = [_cmNoClick, '<td colspan="3" class="ThemeMenuBar4MenuSplit"><div class="ThemeMenuBar4MenuSplit"><\/div><\/td>'];
var cmThemeMenuBar4MainHSplit = [_cmNoClick, '<td colspan="3" class="ThemeMenuBar4MenuSplit"><div class="ThemeMenuBar4MenuSplit"><\/div><\/td>'];
var cmThemeMenuBar4MainVSplit = [_cmNoClick, '<div class="ThemeMenuBar4MenuVSplit">|<\/div>'];

cmDraw('MenuIDMenuBar4', wbMenuMenuBar4, 'hbr', cmMenuBar4, 'ThemeMenuBar4');
-->
</script>
</div>
<div id="wb_MenuBar5" style="position:absolute;left:796px;top:180px;width:131px;height:61px;z-index:2011;" align="left">
<script type="text/javascript">
<!--
var wbMenuMenuBar5 =
[
[null, 'Contact', null, '_self', 'Contact',
[null, 'Contact&nbsp;gegevens', './contact.php', '_self', 'Contact gegevens'],
[null, 'Offerte', './offerte.php', '_self', 'Offerte']
]
];
-->
</script>
<div id="MenuIDMenuBar5"></div>
<script type="text/javascript">
<!--
var cmMenuBar5 =
{
mainFolderLeft: '',
mainFolderRight: '',
mainItemLeft: '',
mainItemRight: '',
folderLeft: '',
folderRight: '',
itemLeft: '',
itemRight: '',
mainSpacing: 0,
subSpacing: 0,
delay: 100,
offsetHMainAdjust: [0, 0],
offsetSubAdjust: [0, 0]
};
var cmThemeMenuBar5HSplit = [_cmNoClick, '<td colspan="3" class="ThemeMenuBar5MenuSplit"><div class="ThemeMenuBar5MenuSplit"><\/div><\/td>'];
var cmThemeMenuBar5MainHSplit = [_cmNoClick, '<td colspan="3" class="ThemeMenuBar5MenuSplit"><div class="ThemeMenuBar5MenuSplit"><\/div><\/td>'];
var cmThemeMenuBar5MainVSplit = [_cmNoClick, '<div class="ThemeMenuBar5MenuVSplit">|<\/div>'];

cmDraw('MenuIDMenuBar5', wbMenuMenuBar5, 'hbr', cmMenuBar5, 'ThemeMenuBar5');
-->
</script>
</div>
<div id="wb_MenuBar6" style="position:absolute;left:962px;top:180px;width:141px;height:61px;z-index:2012;" align="left">
<script type="text/javascript">
<!--
var wbMenuMenuBar6 =
[
[null, 'Disclaimer', './Disclaimer.html', '_self', 'Disclaimer']
];
-->
</script>
<div id="MenuIDMenuBar6"></div>
<script type="text/javascript">
<!--
var cmMenuBar6 =
{
mainFolderLeft: '',
mainFolderRight: '',
mainItemLeft: '',
mainItemRight: '',
folderLeft: '',
folderRight: '',
itemLeft: '',
itemRight: '',
mainSpacing: 0,
subSpacing: 0,
delay: 100,
offsetHMainAdjust: [0, 0],
offsetSubAdjust: [0, 0]
};
var cmThemeMenuBar6HSplit = [_cmNoClick, '<td colspan="3" class="ThemeMenuBar6MenuSplit"><div class="ThemeMenuBar6MenuSplit"><\/div><\/td>'];
var cmThemeMenuBar6MainHSplit = [_cmNoClick, '<td colspan="3" class="ThemeMenuBar6MenuSplit"><div class="ThemeMenuBar6MenuSplit"><\/div><\/td>'];
var cmThemeMenuBar6MainVSplit = [_cmNoClick, '<div class="ThemeMenuBar6MenuVSplit">|<\/div>'];

cmDraw('MenuIDMenuBar6', wbMenuMenuBar6, 'hbr', cmMenuBar6, 'ThemeMenuBar6');
-->
</script>
</div>
<div id="wb_Image4" style="position:absolute;left:233px;top:274px;width:780px;height:210px;z-index:13;" align="left">
<img src="images/pakjes met logo.jpg" id="Image4" alt="" align="top" border="0" style="width:780px;height:210px;"></div>
</div>
<div id="wb_Form1" style="position:absolute;left:34px;top:504px;width:1200px;height:826px;z-index:49;" align="left">
<form name="Offerte" method="post" action="
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<?php echo basename(__FILE__); ?>
" enctype="multipart/form-data" id="Form1" onsubmit="return ValidateOfferte(this)">
<div id="wb_Text1" style="position:absolute;left:5px;top:15px;width:85px;height:15px;z-index:14;" align="left">
<font style="font-size:12px" color="#000000" face="Arial">Naam</font></div>
<textarea name="TextArea1" id="TextArea1" style="position:absolute;left:104px;top:10px;width:331px;height:26px;font-family:Arial;font-size:15px;z-index:15" rows="0" cols="42"></textarea>
<div id="wb_Text2" style="position:absolute;left:3px;top:50px;width:98px;height:30px;z-index:16;" align="left">
<font style="font-size:12px" color="#000000" face="Arial">Telefoonnummer</font></div>
<textarea name="TextArea2" id="TextArea2" style="position:absolute;left:103px;top:45px;width:334px;height:29px;font-family:Arial;font-size:16px;z-index:17" rows="0" cols="42"></textarea>
<div id="wb_Text3" style="position:absolute;left:5px;top:93px;width:85px;height:15px;z-index:18;" align="left">
<font style="font-size:12px" color="#000000" face="Arial">E-mailadre</font><font style="font-size:11px" color="#000000" face="Arial">s</font></div>
<textarea name="TextArea3" id="TextArea3" style="position:absolute;left:104px;top:85px;width:332px;height:29px;font-family:Arial;font-size:16px;z-index:19" rows="0" cols="42"></textarea>
<div id="wb_Text4" style="position:absolute;left:8px;top:158px;width:85px;height:15px;z-index:20;" align="left">
<font style="font-size:12px" color="#000000" face="Arial">Adres</font></div>
<textarea name="TextArea4" id="TextArea4" style="position:absolute;left:105px;top:148px;width:331px;height:29px;font-family:Arial;font-size:15px;z-index:21" rows="0" cols="42"></textarea>
<div id="wb_Text5" style="position:absolute;left:7px;top:190px;width:85px;height:15px;z-index:22;" align="left">
<font style="font-size:12px" color="#000000" face="Arial">Plaats</font></div>
<textarea name="TextArea5" id="TextArea5" style="position:absolute;left:106px;top:188px;width:332px;height:29px;font-family:Arial;font-size:15px;z-index:23" rows="0" cols="42"></textarea>
<div id="wb_Text6" style="position:absolute;left:6px;top:233px;width:85px;height:15px;z-index:24;" align="left">
<font style="font-size:12px" color="#000000" face="Arial">Land</font></div>
<select name="Combobox1" size="1" id="Combobox1" style="position:absolute;left:107px;top:232px;width:331px;font-family:Arial;font-size:15px;z-index:25">
<option>Nederland</option>
<option>België</option>
<option>Duitsland</option>
<option>Luxemburg</option>
<option>Engeland</option>
</select>
<div id="wb_Text7" style="position:absolute;left:8px;top:299px;width:85px;height:15px;z-index:26;" align="left">
<font style="font-size:12px" color="#000000" face="Arial">Adres</font></div>
<textarea name="TextArea6" id="TextArea6" style="position:absolute;left:107px;top:294px;width:333px;height:30px;font-family:Arial;font-size:15px;z-index:27" rows="0" cols="42"></textarea>
<div id="wb_Text8" style="position:absolute;left:6px;top:339px;width:85px;height:15px;z-index:28;" align="left">
<font style="font-size:12px" color="#000000" face="Arial">Plaats</font></div>
<textarea name="TextArea7" id="TextArea7" style="position:absolute;left:108px;top:339px;width:330px;height:26px;font-family:Arial;font-size:15px;z-index:29" rows="0" cols="42"></textarea>
<div id="wb_Text9" style="position:absolute;left:6px;top:381px;width:85px;height:15px;z-index:30;" align="left">
<font style="font-size:12px" color="#000000" face="Arial">Land</font></div>
<select name="Land" size="1" id="Combobox2" style="position:absolute;left:109px;top:380px;width:328px;font-family:Arial;font-size:15px;z-index:31">
<option>Nederland</option>
<option>België</option>
<option>Duitsland</option>
<option>Luxemburg</option>
<option>Engeland</option>
</select>
<div id="wb_Text10" style="position:absolute;left:6px;top:447px;width:85px;height:15px;z-index:32;" align="left">
<font style="font-size:12px" color="#000000" face="Arial">Soort</font></div>
<select name="Combobox3" size="1" id="Combobox3" style="position:absolute;left:107px;top:445px;width:333px;font-family:Arial;font-size:15px;z-index:33">
<option>Pallet</option>
<option>Pakket</option>
<option>Speciaal</option>
</select>
<div id="wb_Text11" style="position:absolute;left:7px;top:486px;width:85px;height:15px;z-index:34;" align="left">
<font style="font-size:12px" color="#000000" face="Arial">Gewicht</font></div>
<textarea name="TextArea8" id="TextArea8" style="position:absolute;left:106px;top:480px;width:333px;height:28px;font-family:Arial;font-size:15px;z-index:35" rows="0" cols="42"></textarea>
<div id="wb_Text12" style="position:absolute;left:8px;top:523px;width:85px;height:15px;z-index:36;" align="left">
<font style="font-size:12px" color="#000000" face="Arial">Coll:</font></div>
<textarea name="TextArea9" id="TextArea9" style="position:absolute;left:107px;top:522px;width:338px;height:28px;font-family:Arial;font-size:15px;z-index:37" rows="0" cols="43"></textarea>
<div id="wb_Text13" style="position:absolute;left:6px;top:581px;width:88px;height:30px;z-index:38;" align="left">
<font style="font-size:12px" color="#000000" face="Arial">Bijzonderheden</font></div>
<textarea name="TextArea10" id="TextArea10" style="position:absolute;left:106px;top:566px;width:339px;height:100px;font-family:Arial;font-size:15px;z-index:39" rows="4" cols="43"></textarea>
<input type="submit" id="Button1" name="Verstuur" value="Verstuur" style="position:absolute;left:23px;top:784px;width:96px;height:25px;font-family:Arial;font-size:15px;z-index:40">
<input type="reset" id="Button2" name="Reset" value="Reset" style="position:absolute;left:353px;top:771px;width:96px;height:25px;font-family:Arial;font-size:15px;z-index:41">
<div id="wb_Text14" style="position:absolute;left:6px;top:125px;width:159px;height:18px;z-index:42;" align="left">
<font style="font-size:15px" color="#000000" face="Arial"><b>Afhaaladres</b></font></div>
<div id="wb_Text15" style="position:absolute;left:3px;top:271px;width:159px;height:18px;z-index:43;" align="left">
<font style="font-size:15px" color="#000000" face="Arial"><b>Bezorgadres</b></font></div>
<div id="wb_Text16" style="position:absolute;left:7px;top:401px;width:159px;height:36px;z-index:44;" align="left">
<font style="font-size:15px" color="#000000" face="Arial"><b><br>
Goederen</b></font></div>
<div id="wb_Text18" style="position:absolute;left:2px;top:671px;width:912px;height:63px;z-index:45;" align="left">
<font style="font-size:13px" color="#00008B" face="Arial">Het formulier moet volledig en naar waarheid worden ingevuld?<br>
Onvolledig ingevulde formulieren worden niet in behandeling genomen.. <br>
Wannneer blijkt dat de formulieren niet naar waarheid zijn ingevuld, wordt de aanvraag afgewezen.. <br>
</font></div>
<input type="checkbox" id="Checkbox1" name="Checkbox1" value="on" style="position:absolute;left:8px;top:735px;font-family:Arial;font-size:13px;z-index:46">
<div id="wb_Text17" style="position:absolute;left:39px;top:736px;width:591px;height:31px;z-index:47;" align="left">
<font style="font-size:13px" color="#00008B" face="Arial"><b>Ik heb bovenstaande gegevens naar waarheid ingevuld.</b></font><font style="font-size:16px" color="#000000" face="Times New Roman"><br>
</font></div>
</form>
</div>
</div>
</body>
</html>
-----------------------------------------------------------------------------------

Bij deze.
Alvast bankt.

Met vriendelijke groet,
André
 
Maikel  B

Maikel B

17/10/2011 13:20:13
Quote Anchor link
Zou je dit kunnen verkleinen naar alleen relevante stukken code
 
Andre Pennings

Andre Pennings

17/10/2011 13:29:52
Quote Anchor link
Dag Maikel,

Ja dat spijt me ik weet niet wat wel en niet relevant is?
Zoals gezegd ik werk met web builder (programma om een site te maken) deze heeft de
optie om een formulier aan te maken en vervolgens zet dat programma het om naar PHP formaart.
Sorry!
MBG
André
 
- SanThe -

- SanThe -

17/10/2011 13:52:54
Quote Anchor link
Je zal deze variabele een waarde moeten geven:
$error_url = '';

Want nu geeft deze regel een error:
$errorcode = file_get_contents($error_url);
 
Andre Pennings

Andre Pennings

18/10/2011 15:23:00
Quote Anchor link
Beste clubleden,
Bedankt voor het mee denken.
Er moest een verwijzing naar een foutpagina in het script opgenomen worden.
Hij werkt nu perfect, bedankt voor het mee denken.

MVG
André
 
Jimmy Godin

Jimmy Godin

18/10/2011 20:09:57
Quote Anchor link
$errorcode = file_get_contents($error_url);

je hebt $errorcode op regel 15 gelijkgesteld aan ....$error_url = '';

zal het daarmee te maken hebben?
 



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.