Parse error: parse error in ..../confirm.php on li
toostje_85
1970-01-01 01:00:00
Deze vraag gaat waarschijnlijk over PHP
dit is de hele code, het is voor een inschrijfformulier en er zijn meerdere php-files.
Dit is de confirm.php(http://vvrsv.nl/php voor het hele formulier!
--------------
<?php
/*
This file is a part of Basic PHP Form. Copyright (c) 2005 Mark MacCollin, Mevin Productions, [Login om links te zien]
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
include('header.php');
require('config.php');
///////////// receives the form values //////////////////////
$first_name = $_REQUEST['first_name'] ;
$home_address = $_REQUEST['home_address'] ;
$city = $_REQUEST['city'] ;
$home_phone = $_REQUEST['phone'] ;
$email = $_REQUEST['email'] ;
$team = $_REQUEST['team'] ;
/////////////Allows the use of Apostrophes or single quotes /////////////////
$comments=stripslashes($comments);
////// This variable checks to see if any of the required fields are in error and if so, prints a back button below ///
////////// makes sure the form is submitted from your server and not someone elses /////////////////////////
if (strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'])>7 || !strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST']))
die("<font color=red>Error! Bad Referer</span> ");
/////////////// Error messages. ///////////////
///////// The first name through the state fields are only checked to ensure they aren't blank /////
if ($back_button)
{
print "<table width=500 border=0><tr><td>";
}
if ( $first_name == "")
{ echo "<font color=red>Naam is verplicht. Ga terug en verbeter.</span><br><br>";
}
if ( $city == "")
{ echo "<font color=red>Plaats is verplicht. Ga terug en verbeter.</span><br><br>";
}
if ( $team == "")
{ echo "<font color=red>Teamnaam is verplicht. Ga terug en verbeter.</span><br><br>";
}
//////////////////// this error message verifies that the email field is typed in a valid email format. ////////////////
if (!preg_match('/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/',$email))
{ echo "<font color=red>Een geldig email-adres is verplicht. Ga terug en verbeter.</span><br><br>";
}
/////////// prints a back buttom to correct any errors /////////////////////
//////// encapsulates all these variables in one to make it easier to pass on to the mail script /////////
$msgbody =
"
Naam:$first_name
Adres:$home_address
Plaats:$city
Telefoon:$home_phone
Email:$email
Teamnaam:$team
/* Here we still include the first_name and last_name variables because they are used independantly in the mail script to show who sent the form
*/
print "
//--------> Regel 153 <table width=$table_width border=0>
<tr><td>