1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

delete thread

Discussion in 'PHP' started by primster7, May 28, 2018.

Thread Status:
Not open for further replies.
  1. #1
    I already have an HTML form, but need the PHP code to send me the name, email and message.

    Any help could be appreciated.


    <form name="contact" method="post" action="">
    
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Contact Us</title>
    
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" >
    <!-- Optional theme -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" >
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
    
    <link rel="stylesheet" href="form.css" >
    </head>
    <body >
    <div class="container">
    <div class="container form-top">
    <div class="row">
    <div class="col-md-6 col-md-offset-3 col-sm-12 col-xs-12">
    <div class="panel panel-danger">
    <div class="panel-body">
    <form id="reused_form">
    <div class="form-group">
    <label >Name</label>
    <input type="text" name="name" required class="form-control" placeholder="Enter Name">
    </div>
    
    <div class="form-group">
    <label >Email</label>
    <input type="email" name="email" required class="form-control" placeholder="Enter Email">  </div>
    <div class="form-group">
    <label >Message</label>
    <textarea rows="3" name="message" class="form-control" placeholder="Type Your Message"></textarea>
    </div>
    
    <div class="form-group">
    <button class="btn btn-raised btn-lg btn-warning" type="submit">Send</button>
    </div>
    </form>
    <div id="error_message" style="width:100%; height:100%; display:none; ">
    <h4>Error</h4>Sorry there was an error sending your form.  </div>
    <div id="success_message" style="width:100%; height:100%; display:none; ">
    <h2>Success! Your Message was Sent Successfully.</h2>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </body>
    </html>
    PHP:

    SEMrush
     
    Last edited by a moderator: May 28, 2018
    primster7, May 28, 2018 IP
    SEMrush
  2. sarahk

    sarahk iTamer Staff

    Messages:
    25,479
    Likes Received:
    3,538
    Best Answers:
    103
    Trophy Points:
    665
    #2
    Where's your existing php script?

    There are lots of tutorials online to work through
     
    sarahk, May 28, 2018 IP
  3. primster7

    primster7 Well-Known Member

    Messages:
    801
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    110
    #3
    There isn't a PHP script. I just need something simple to capture the name, email and message.
     
    primster7, May 28, 2018 IP
  4. sarahk

    sarahk iTamer Staff

    Messages:
    25,479
    Likes Received:
    3,538
    Best Answers:
    103
    Trophy Points:
    665
    #4
    sarahk, May 28, 2018 IP
    ThePHPMaster likes this.
Thread Status:
Not open for further replies.