Web Analytics Made Easy -
StatCounter PHP email form - CodingForum

Announcement

Collapse
No announcement yet.

PHP email form

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PHP email form

    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:
    Code:
    <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 Code:
    <?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("[email protected]","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.

    xoxo Ashley
Working...
X