I am using a php script to submit my form and send it to a specific email adress this all works fine.
But for my mobile version and my desktop version I use a different script because the Header Location redirect has a different output.
However when I click on my send button on my mobile version it still redirects me to the output of my dekstop version.
Desktop output = homepage.html
Mobile output = index.html
Any ideas?
Code in snippets
/* Desktop PHP */
<?php $Naam=$_POST['Naam'];
$Email=$_POST['Email'];
$Telefoon=$_POST['Telefoon'];
$Bericht=$_POST['Bericht'];
$to="info@pieterswebdesign.com";
$subject="pieterswebdesign";
$body="this is an automated message don't reply to this email
$Naam,$Email,$Telefoon,$Bericht";
mail($to,
$subject,
$body);
header('Location: homepage.html');
?>
/*Mobile PHP */
<?php $Naam=$_POST['Naam'];
$Email=$_POST['Email'];
$Telefoon=$_POST['Telefoon'];
$Particulier=$_POST['Particulier'];
$Contacteermij=$_POST['Contacteermij'];
$Bericht=$_POST['Bericht'];
$to="info@pieterswebdesign.com";
$subject="pieterswebdesign";
$body="this is an automated message don't reply to this email
$Naam,$Email,$Telefoon,$Particulier,$Contacteermij,$Bericht";
mail($to,
$subject,
$body);
header('Location: index.html');
?>
/* Desktop Form */
<div id="wrappercontactform">
<div id="emptydivform"></div>
<p id="formcontacthead">CONTACT FORM</p>
<form id="contactform" class="form" action="send.php" method="POST">
<p class="name">
Naam
<input type="text" name="Naam" id="name" placeholder="Typ hier..." />
</p>
<p class="email">
E-mail adres
<input type="text" name="Email" id="email" placeholder="Typ hier..." />
</p>
<p class="telefoonnummer">
Telefoonnummer
<input type="text" name="Telefoon" id="telefoonnummer" placeholder="Typ hier..." />
</p>
<p class="bericht">
Bericht
<textarea type="text" name="Bericht" id="bericht" placeholder="Typ hier..." /></textarea>
</p>
<button class="submit" input type="submit" form="contactform">Verstuur</button>
</form>
/* Mobile form */
<form id="contactform" class="form" action="sendmobile.php" method="POST">
<p class="name">
Naam
<input type="text" name="Naam" id="name" placeholder="Typ hier..." />
</p>
<p class="email">
E-mail adres
<input type="text" name="Email" id="email" placeholder="Typ hier..." />
</p>
<p class="telefoonnummer">
Telefoonnummer
<input type="text" name="Telefoon" id="telefoonnummer" placeholder="Typ hier..." />
</p>
<p class="particulier">
Particulier, zakelijk, vereniging...
<input type="text" name="Particulier" id="particulier" placeholder="Typ hier..." />
</p>
<p class="contacteermij">
Contacteer mij op (bv: datum & uur)
<input type="text" name="contacteermij" id="contacteermij" placeholder="Typ hier..." />
</p>
<p class="bericht">
Uw vraag / bericht
<textarea type="text" name="Bericht" id="bericht" placeholder="Typ hier..." /></textarea>
</p>
<button class="submit" input type="submit" form="contactform">Verstuur</button>
</form>