Jump to content

jai uriyal

Members
  • Posts

    3
  • Joined

  • Last visited

jai uriyal's Achievements

Newbie

Newbie (1/7)

1

Reputation

  1. jai uriyal

    Contact Form

    I want all the information in my email id which I put on php file but I am not getting any info in my email id even data (information of input box) is not submitting.
  2. jai uriyal

    Contact Form

    Hi I am trying to making a contact form with php and html but it is not working plz help me...... My php and html code are following..... HTML Code..... <form id="main-contact-form" class="contact-form" name="contact-form" method="post" action="send_email.php"> <div class="col-sm-5 col-sm-offset-1"> <div class="form-group"> <label>Name *</label> <input type="text" name="name" class="form-control" required="required"> </div> <div class="form-group"> <label>Email *</label> <input type="email" name="email" class="form-control" required="required"> </div> <div class="form-group"> <label>Phone</label> <input type="number" class="form-control"> </div> <div class="form-group"> <label>Company Name</label> <input type="text" class="form-control"> </div> </div> <div class="col-sm-5"> <div class="form-group"> <label>Message *</label> <textarea name="message" id="message" required="required" class="form-control" rows="8"></textarea> </div> <div class="form-group"> <button type="submit" name="submit" class="btn btn-primary btn-lg" required="required">Submit Message</button> </div> </div> </form> PHP Code..... <?php header('Content-type: application/json'); $status = array( 'type'=>'success', 'message'=>'Thank you for contact us. As early as possible we will contact you ' ); $name = @trim(stripslashes($_POST['name'])); $email = @trim(stripslashes($_POST['email'])); $subject = @trim(stripslashes($_POST['subject'])); $message = @trim(stripslashes($_POST['message'])); $email_from = $email; $email_to = 'jai.5025@gmail.com';//replace with your email $body = 'Name: ' . $name . "nn" . 'Email: ' . $email . "nn" . 'Subject: ' . $subject . "nn" . 'Message: ' . $message; $success = @mail($email_to, $subject, $body, 'From: <'.$email_from.'>'); echo json_encode($status); die; Note- I am using bootstrap based template. thanks in advance
  3. jai uriyal

    Contact Form

    Hi, Guys my name is jai and I am new in this forum. I want to make a contact form in php which contains some fields like name, email, contact no, message, etc. and I also want to validate each field with php therefore the all information should come in my email. please help me how to code it. I know only html part. thanks in advance.
×
×
  • Create New...