Ik heb nu meerdere contactformulieren aangemaakt in office sharepoint designer 2007
dus een contact formulier in HTML en deze zie ik ook in de browser als ik deze opstart. en een formulier contact PHP beide heb ik geupload naar mijn server (strato) als ik het contact formulier invoer en op versturen druk dan gaat hij naar de contact.php deze voert hij niet uit maar hij laat steeds de code die geprogrammeerd is zien maar voert deze niet uit. wat doe ik verkeerd.
Zie onderstaand bericht van de site van strato

Opmerking :
Vanaf STRATO PowerWeb staan PHP, Perl, Python en MySQL-databanken tot uw beschikking.

Het bestand contact heeft de extentie .php en de code ook tussen <.?php ?.>
WTF zeg en dat voor een hosting in deze tijd van het jaar.
En dat bij de tijd van het jaar waar bijna iedereen php wel gebruikt op de website.

Vind het beetje te vreemd voor woorden, dat je moet upgrade om php te kunnen gebruiken. Toch weer een leuke vorm van geld verdienen bij onwetende mensen.
Ik he onderstaand Html document als contact formulier


<form id="form_5" name="Contact" onsubmit="return validate_form_5(this)" action="contact.php" method="post" target="_self" enctype="multipart/form-data" accept-charset="UTF-8" style="margin:0px;">
<input type="hidden"  value="1"><div style="position:absolute; left:181px; top:254px; width:58px; height:22px; text-align:left;">
    <select id="combo_18" name="Titel" size="1">
    <option value="Dhr.">Dhr.</option>
    <option value="Mevr.">Mevr.</option>
    <option value="Juffr.">Juffr.</option>
    <option value="Mr.">Mr.</option>
    <option value="Dr.">Dr.</option>
    </select>
</div>
<div style="position:absolute; left:181px; top:233px; width:72px; height:16px;">
    <div class="Standaard-P">
        <span class="Standaard-C0">Aanhef:</span></div>
</div>
<div style="position:absolute; left:254px; top:233px; width:59px; height:16px;">
    <div class="Standaard-P">
        <span class="Standaard-C0">Voorl:</span></div>
</div>
<div style="position:absolute; left:327px; top:233px; width:62px; height:16px;">
    <div class="Standaard-P">
        <span class="Standaard-C0">Naam:</span></div>
</div>
<div style="position:absolute; left:523px; top:233px; width:63px; height:16px;">
    <div class="Standaard-P">
        <span class="Standaard-C0">Adres:</span></div>
</div>
<div style="position:absolute; left:724px; top:233px; width:153px; height:16px;">
    <div class="Standaard-P">
        <span class="Standaard-C0">Postcode en plaats:</span></div>
</div>
<div style="position:absolute; left:181px; top:289px; width:83px; height:16px;">
    <div class="Standaard-P">
        <span class="Standaard-C0">Telefoon:</span></div>
</div>
<div style="position:absolute; left:327px; top:289px; width:59px; height:16px;">
    <div class="Standaard-P">
        <span class="Standaard-C0">Email:</span></div>
</div>
<div style="position:absolute; left:254px; top:254px; width:57px; height:22px; text-align:left;">
    <input type="text" id="inv_2" name="Voorletters" size="5" style="width:57px;" value="">
</div>
<div style="position:absolute; left:327px; top:254px; width:181px; height:22px; text-align:left;">
    <input type="text" id="inv_3" name="Naam" size="26" style="width:181px;" value="">
</div>
<div style="position:absolute; left:523px; top:254px; width:185px; height:22px; text-align:left;">
    <input type="text" id="inv_4" name="Adres" size="26" style="width:185px;" value="">
</div>
<div style="position:absolute; left:724px; top:254px; width:221px; height:22px; text-align:left;">
    <input type="text" id="inv_5" name="Postcode_plaats" size="32" style="width:221px;" value="">
</div>
<div style="position:absolute; left:181px; top:310px; width:102px; height:22px; text-align:left;">
    <input type="text" id="inv_7" name="Telefoon" size="12" style="width:102px;" value="">
</div>
<div style="position:absolute; left:327px; top:310px; width:159px; height:22px; text-align:left;">
    <input type="text" id="inv_8" name="Email" size="22" style="width:159px;" value="">
</div>
<div style="position:absolute; left:560px; top:313px; width:379px; height:16px;">
    <div class="Standaard-P">
        <span class="Standaard-C0">Ik wil een afspraak maken met uw persoonlijk adviseur</span></div>
</div>
<div style="position:absolute; left:181px; top:353px; width:250px; height:16px;">
    <div class="Standaard-P">
        <span class="Standaard-C0">Ik had graag meer informatie over:</span></div>
</div>
<div style="position:absolute; left:445px; top:353px; width:112px; height:16px;">
    <div class="Standaard-P">
        <span class="Standaard-C0">Zonnepanelen</span></div>
</div>
<div style="position:absolute; left:735px; top:353px; width:130px; height:16px;">
    <div class="Standaard-P">
        <span class="Standaard-C0">Straatverlichting</span></div>
</div>
<div style="position:absolute; left:588px; top:353px; width:116px; height:16px;">
    <div class="Standaard-P">
        <span class="Standaard-C0">Parkverlichting</span></div>
</div>
<div style="position:absolute; left:421px; top:350px; width:15px; height:22px; text-align:left;">
    <input type="checkbox" id="check_2" name="Zonnepanelen" VALUE="Graag meer informatie">
</div>
<div style="position:absolute; left:566px; top:349px; width:15px; height:22px; text-align:left;">
    <input type="checkbox" id="check_3" name="Parkverlichting" VALUE="Graag meer informatie">
</div>
<div style="position:absolute; left:711px; top:350px; width:15px; height:22px; text-align:left;">
    <input type="checkbox" id="check_4" name="Straatverlichting" VALUE="Graag meer informatie">
</div>
<div style="position:absolute; left:527px; top:310px; width:15px; height:22px; text-align:left;">
    <input type="radio" id="radio_50" name="Afspraak" VALUE="Ja">
</div>
<div style="position:absolute; left:181px; top:382px; width:98px; height:16px;">
    <div class="Standaard-P">
        <span class="Standaard-C0">Toelichting:</span></div>
</div>
<div style="position:absolute; left:181px; top:404px; width:483px; height:134px; text-align:left;">
    <textarea id="tekst_2" rows="8" cols="57" name="Toelichting" style="height:100%; width:483px;"></textarea>
</div>
<div style="position:absolute; left:681px; top:516px; width:105px; height:22px; text-align:left;">
    <input type="submit" id="butn_8" value="Verzenden">
</div>
<div style="position:absolute; left:797px; top:516px; width:85px; height:22px; text-align:left;">
    <input type="reset" id="butn_7" name="Wissen" value="Wissen">
</div>
</form>
gebruik de [.code] [./code] tags om je code heen (zonder punten)

deze heb je laten generen toch? het is namelijk niet zo een erg mooie code. maar hier hebben we niet zo gek veel aan, post de php code eens (target.php)
contact.php dus...
Nou dat is het probleem deze ben ik aan het maken want in het orginele contact formulier stond.


 <form id="form_5" name="Contact" onsubmit="return validate_form_5(this)" action="http://www.serifwebresources.com/form.php?uid=e40377aa49120aba4552d0879ecd59f3" method="post" target="_self" enctype="multipart/form-data" accept-charset="UTF-8" style="margin:0px;">
<input type="hidden" name="captcha_gateway" value="1"><div style="position:absolute; left:181px; top:619px; width:98px; height:16px;">
    <div class="Standaard-P">


En daar kan ik niks mee, ik heb de site overgenomen van mijn ex compagnon.

Klopt het bovenstaand adres is het adres waar het naar toe werd gestuurd, toen wij het bedrijf nog samen hadden.Wie dit toen gemaakt heeft weet ik niet.
Ik heb zelf een voorbeeld php genomen van waaruit ik weer een goed php bestand kan maken.

<?php
session_start();



$mail_ontv = '[email protected]';


if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
// naam controle
if (empty($_POST['naam']))
$naam_fout = 1;
// e-mail controle
if (function_exists('filter_var') && !filter_var($_POST['mail'], FILTER_VALIDATE_EMAIL))
$email_fout = 1;
// antiflood controle
if (!empty($_SESSION['antiflood']))
{
$seconde = 20;
$tijd = time() - $_SESSION['antiflood'];
if($tijd < $seconde)
$antiflood = 1;



if (($_SERVER['REQUEST_METHOD'] == 'POST' && (!empty($antiflood) || empty($_POST['naam']) || !empty($naam_fout) || empty($_POST['mail']) || !empty($email_fout) || empty($_POST['bericht']) || empty($_POST['onderwerp']))) || $_SERVER['REQUEST_METHOD'] == 'GET')
{
if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
if (!empty($naam_fout))
echo '<p>Uw naam is niet ingevuld.</p>';
elseif (!empty($email_fout))
echo '<p>Uw e-mailadres is niet juist.</p>';
elseif (!empty($antiflood))
echo '<p>U mag slechts &eacute;&eacute;n bericht per ' . $seconde . ' seconde versturen.</p>';
else
echo '<p>U bent uw naam, e-mailadres, onderwerp of bericht vergeten in te vullen.</p>';
}

// HTML e-mail formlier
echo '<form method="post" action="' . $_SERVER['REQUEST_URI'] . '" />
<p>

<label for="naam">Naam:</label><br />
<input type="text" id="naam" name="naam" value="' . (isset($_POST['naam']) ? htmlspecialchars($_POST['naam']) : '') . '" /><br />

<label for="mail">E-mailadres:</label><br />
<input type="text" id="mail" name="mail" value="' . (isset($_POST['mail']) ? htmlspecialchars($_POST['mail']) : '') . '" /><br />

<label for="onderwerp">Onderwerp:</label><br />
<input type="text" id="onderwerp" name="onderwerp" value="' . (isset($_POST['onderwerp']) ? htmlspecialchars($_POST['onderwerp']) : '') . '" /><br />

<label for="bericht">Bericht:</label><br />
<textarea id="bericht" name="bericht" rows="8" style="width: 400px;">' . (isset($_POST['bericht']) ? htmlspecialchars($_POST['bericht']) : '') . '</textarea><br />

<input type="submit" name="submit" value=" Versturen " />
</p>
</form>';
}
// versturen naar
else
{
// set datum
$datum = date('d/m/Y H:i:s');

$inhoud_mail = "===================================================\n";
$inhoud_mail .= "Ingevulde contact formulier " . $_SERVER['HTTP_HOST'] . "\n";
$inhoud_mail .= "===================================================\n\n";

$inhoud_mail .= "Naam: " . htmlspecialchars($_POST['naam']) . "\n";
$inhoud_mail .= "E-mail adres: " . htmlspecialchars($_POST['mail']) . "\n";
$inhoud_mail .= "Bericht:\n";
$inhoud_mail .= htmlspecialchars($_POST['bericht']) . "\n\n";

$inhoud_mail .= "Verstuurd op " . $datum . " via het IP adres " . $_SERVER['REMOTE_ADDR'] . "\n\n";

$inhoud_mail .= "===================================================\n\n";


$headers = 'From: ' . htmlspecialchars($_POST['naam']) . ' <' . $_POST['mail'] . '>';

$headers = stripslashes($headers);
$headers = str_replace('\n', '', $headers); // Verwijder \n
$headers = str_replace('\r', '', $headers); // Verwijder \r
$headers = str_replace("\"", "\\\"", str_replace("\\", "\\\\", $headers));

$_POST['onderwerp'] = str_replace('\n', '', $_POST['onderwerp']); // Verwijder \n
$_POST['onderwerp'] = str_replace('\r', '', $_POST['onderwerp']); // Verwijder \r
$_POST['onderwerp'] = str_replace("\"", "\\\"", str_replace("\\", "\\\\", $_POST['onderwerp']));

if (mail($mail_ontv, $_POST['onderwerp'], $inhoud_mail, $headers))
{

$_SESSION['antiflood'] = time();

echo '<h1>Het contactformulier is verzonden</h1>

<p>Bedankt voor het invullen van het contactformulier. We zullen zo spoedig mogelijk contact met u opnemen.</p>';
}
else
{
echo '<h1>Het contactformulier is niet verzonden</h1>

<p><b>Onze excuses.</b> Het contactformulier kon niet verzonden worden.</p>';
}
}
?>
Als ik zo zie zou dit moeten werken. Als het nog steeds als PHP-code weergeven wordt zou ik nog eens je hosting bellen.
Ik krijg de volgende fout bij het verzenden.
Parse error: syntax error, unexpected $end in /contact.php on line 108

Reageren