LEARN TO MAKE A SINGLE PHP FORMsteemCreated with Sketch.

in form •  6 years ago 

CREATE FIRTS FILE steemitcontact.html or steemitcontact.php and paste this

!doctype html>
html>
head>
title>Tloconsigo.com
meta name="viewport" content="width=device-width, initial-scale=1">
meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
meta name="keywords" content="One Movies Responsive web template, Bootstrap Web Templates, Flat Web Templates, Android Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design" />
link rel="shortcut icon" type="image/x-icon" href="">
link href="https://file.myfontastic.com/NNzmukmFpcX2EusA9zjCif/icons.css" rel="stylesheet">

link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js">
script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js">
/head>

body>
div class="container">
div class="row">
div class="col-md-7">
a href="#">
img class="img-rounded; img-responsive" src="https://tloconsigo.com/steemitcontacto#" style="width: 100%" alt="">
/a>
/div>

    style>

.header {
color: #36A0FF;
font-size: 27px;
padding: 10px;

}

.bigicon {
font-size: 35px;
color: #36A0FF;
}
/style>
div class="col-md-5">

 div class="container">
div class="row">
    div class="col-md-5">
        div class="well well-sm">
            form class="form-horizontal" action="steemitform.php"  method="post" autocomplete="off">
                fieldset>
                    legend class="text-center header">Contact us</legend>

                    div class="form-group">
                        span class="col-md-1 col-md-offset-2 text-center"><i class="fa fa-user bigicon"></i></span>
                        div class="col-md-8">
                            input id="name" name="name" type="text" placeholder="First Name" class="form-control" required>
                        /div>
                    /div>
                    
                    div class="form-group">
                        span class="col-md-1 col-md-offset-2 text-center"><i class="fa fa-user bigicon"></i></span>
                        div class="col-md-8">
                            input id="lastname" name="lastname" type="text" placeholder="Last Name" class="form-control" required>
                        /div>
                    /div>

                    div class="form-group">
                        span class="col-md-1 col-md-offset-2 text-center"><i class="fa fa-envelope-o bigicon"></i></span>
                        div class="col-md-8">
                            input id="email" name="email" type="email" placeholder="Email Address" class="form-control" required>
                        /div>
                    /div>
                    
     div class="form-group"> (html comment removed:  State Button )
     span class="col-md-1 col-md-offset-2 text-center"><i class="fa fa-map-marker bigicon"></i></span>
   div class="col-md-8">

    select class="form-control" id="pais_id" name="country" required>
      option value="" selected>Country</option>
       option value="AF">Afganistán</option>

option value="AL">Albania
option value="DE">Alemania

    /select>                    
                        /div></div>

                    div class="form-group">
                        span class="col-md-1 col-md-offset-2 text-center"><i class="fa fa-phone-square bigicon"></i></span>
                        div class="col-md-8">
                            <input id="phone" name="phone" type="number" placeholder="Phone" class="form-control" required>
                        /div>
                    /div>

                    div class="form-group">
                        span class="col-md-1 col-md-offset-2 text-center"><i class="fa fa-pencil-square-o bigicon"></i></span>
                        div class="col-md-8">
                            textarea class="form-control" id="message" name="message" placeholder="Enter your massage for us here. We will get back to you within 2 business days." rows="7" required></textarea>
                        /div>
                    /div>

                    div class="form-group">
                        div class="col-md-12 text-center">
                            button type="submit" class="btn btn-primary btn-lg">Submit</button>
                       </div>
                    /div>
                /fieldset>
            /form>
        /div>
    /div>
/div>

/div>

    /div>
  /div>

/body>
/html>

THEN CREATE ANOTHER FILE BUT PHP CALL: steemitform.php and paste this:

<?php $destino = "your email hosting only change this"; $name = $_POST["name"]; $lastname = $_POST["lastname"]; $email = $_POST["email"]; $country = $_POST["country"]; $phone = $_POST["phone"]; $message = $_POST["message"]; $content = "\Name: " . $name . "\nLastname: " . $lastname . "\nEmail: " . $email . "\nCountry: " . $country . "\nPhone: " . $phone . "\nMessage: " . $message;

mail ("yout email hosting here", "Contact", $content);
header("Location:change this for what html page you want see it or redirect");

?>

PD:

remember to place the symbol <in each line of the code since steemit generates an error if I put it in and ready you already have a form response
if you need more help please reply the form its response

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!