...

View Full Version : PHP email form



Ashleyxsparly
09-02-2011, 09:44 AM
Hey guys.

I'm writing an iPhone webapp, and because of the structure of the content i cant use a standard html form. :(

So far my code looks like this:


<form action="Send.php" method="post">
<fieldset>
<span class="graytitle">Bestillingsformular</span>
<ul class="pageitem">
<li class="textbox"></li> <span class="header">Bestiller information</span>
<li class="bigfield"><input placeholder="Navn" type="text" /></li>
<li class="bigfield"><input placeholder="Email" type="text" /></li>
<li class="bigfield"><input placeholder="Tlf. Nr." type="text" /></li>
</ul>
<ul class="pageitem">
<li class="textbox"></li> <span class="header">Selskabsoplysninger</span>
<li class="bigfield"><input placeholder="Navn og evt. binavn" type="text" /></li>
<li class="bigfield"><input placeholder="Adresse" type="text" /></li>
<li class="bigfield"><input placeholder="Formål" type="text" /></li>
<li class="bigfield"><input placeholder="Bemærkninger" type="text" /></li>
</ul>
<ul class="pageitem">
<li><span class="header">Selskabets personkreds</span></li>
<br/>
</ul>

<fieldset><span class="graytitle">Person 1</span>
<ul class="pageitem">
<li class="bigfield"><input placeholder="Navn" type="text" /></li>
<li class="bigfield"><input placeholder="CPR/CVR nr." type="text" /></li>
<li class="bigfield"><input placeholder="Ejer (angiv %)" type="text" /></li>
<li class="checkbox"><span class="name">Direktør</span><input name="checkbox" type="checkbox" /> </li>
<li class="checkbox"><span class="name">Bestyrelse</span><input name="checkbox" type="checkbox" /> </li>
</ul>

<fieldset><span class="graytitle">Person 2</span>
<ul class="pageitem">
<li class="bigfield"><input placeholder="Navn" type="text" /></li>
<li class="bigfield"><input placeholder="CPR/CVR nr." type="text" /></li>
<li class="bigfield"><input placeholder="Ejer (angiv %)" type="text" /></li>
<li class="checkbox"><span class="name">Direktør</span><input name="checkbox" type="checkbox" /> </li>
<li class="checkbox"><span class="name">Bestyrelse</span><input name="checkbox" type="checkbox" /> </li>
</ul>
<fieldset><span class="graytitle">Person 3</span>
<ul class="pageitem">
<li class="bigfield"><input placeholder="Navn" type="text" /></li>
<li class="bigfield"><input placeholder="CPR/CVR nr." type="text" /></li>
<li class="bigfield"><input placeholder="Ejer (angiv %)" type="text" /></li>
<li class="checkbox"><span class="name">Direktør</span><input name="checkbox" type="checkbox" /> </li>
<li class="checkbox"><span class="name">Bestyrelse</span><input name="checkbox" type="checkbox" /> </li>
</ul>
<fieldset><span class="graytitle">Person 4</span>
<ul class="pageitem">
<li class="bigfield"><input placeholder="Navn" type="text" /></li>
<li class="bigfield"><input placeholder="CPR/CVR nr." type="text" /></li>
<li class="bigfield"><input placeholder="Ejer (angiv %)" type="text" /></li>
<li class="checkbox"><span class="name">Direktør</span><input name="checkbox" type="checkbox" /> </li>
<li class="checkbox"><span class="name">Bestyrelse</span><input name="checkbox" type="checkbox" /> </li>

</ul>
</select>

</ul>

</fieldset>

<li class="button"><input name="Send" type="submit" value="Send"></li>
</form>

and the php:


<?php

//Estoy recibiendo el formulario, compongo el content
$content = "App bestilling\n";
$content .= "Navn: " . $_POST["Navn"] . "\n";
$content .= "Email: " . $_POST["Email"] . "\n";
$content .= "Tlf. Nr.: " . $_POST["Tlf. Nr."] . "\n";
$content .= "Navn og evt. binavn: " . $_POST["Navn og evt. binavn"] . "\n";
$content .= "Adresse: " . $_POST["Adresse"] . "\n";
$content .= "Formål: " . $_POST["Formål"] . "\n";
$content .= "Bemærkninger: " . $_POST["Bemærkninger"] . "\n";

//mando el correo...
mail("mail@mail.com","Appbestilling",$content);
?>


Ps. i know that all of the form fields aren't in the function, but i just want it to work... fore now. :o

xoxo Ashley



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum