Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8777087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:12:34+00:00 2026-06-13T19:12:34+00:00

I am using mRova template to build a contact form <!DOCTYPE html> <!– Design

  • 0

I am using mRova template to build a contact form

<!DOCTYPE html>
<!--
Design by mRova Solutions
http://www.mrova.com
Released for free under a Creative Commons Attribution 2.5 License
-->
<html>
    <head>
        <title>Free Mobile Template</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0;" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
        <link rel="stylesheet" href="css/style.css" />
        <link rel="stylesheet" href="css/photoswipe.css" />
        <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
        <script type="text/javascript" src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
        <script type="text/javascript" src="js/klass.min.js"></script>
        <script type="text/javascript" src="js/code.photoswipe.jquery-3.0.4.min.js"></script>
        <script type="text/javascript" src="js/custom.js"></script>
    </head>
    <body>
        <div data-role="page" data-add-back-btn="true">
            <div data-role="header" id="header">
                <h1>Mobile Template</h1>
            </div><!-- /header -->
            <div data-role="content">
                <div class="ui-body ui-body-b ui-corner-all">
                    <div class="contact-thankyou" style="display: none;">
                        Thank you.  Your message has been sent.  We will get back to you as soon as we can.
                    </div>
                    <div class="contact-form">
                        <p class="mandatory">
                            * indicates Mandatory Field
                        </p>
                        <div data-role="fieldcontain" class="text-field">
                            <label for="firstname">First Name*:</label>
                            <input type="text" name="firstname" value="" placeholder="" class="required" id="firstname" />
                        </div>
                        <div data-role="fieldcontain" class="text-field">
                            <label for="surname">Last Name:</label>
                            <input type="text" name="surname" value="" placeholder="" id="surname" />
                        </div>
                        <div data-role="fieldcontain" class="text-field">
                            <label for="email">Email Address*:</label>
                            <input type="email" name="email" value="" placeholder="" class="required" id="email"  />
                        </div>
                        <div data-role="fieldcontain" class="text-field">
                            <label for="mobilephone">Mobile Number:</label>
                            <input type="number" name="mobilephone" value="" placeholder="" id="mobilephone" />
                        </div>
                        <div data-role="fieldcontain">
                            <label for="message">Message*:</label>
                            <textarea name="message" id="message" placeholder="" class="required"></textarea>
                        </div>
                        <div class="send">
                            <a href="javascript:;" data-role="button" data-theme="a" data-iconpos="right" id="send">send</a>
                        </div>
                    </div><!-- //.contact-form -->
                </div>
                <p class="copyright">Copyright &copy; mobi. Designed by <a href="http://mrova.com" class="ui-link">mRova</a></p>
            </div><!-- /content -->
              <div data-role="footer" data-theme="a">
            <div class="ui-bar">
             <a href="share-dialog.html"  data-role="button" data-icon="star" data-theme="a" data-rel="dialog">Share</a> 
             <a href="contact.html" data-role="button" data-icon="plus" data-theme="a">Contact</a>
             <a href="" data-role="button" data-icon="arrow-u" data-theme="a" style="float:right;" class="returnTopAction">Return top</a>             
           </div>
          </div>
          <!-- /Footer --> 

        </div><!-- /page -->
    </body>
</html>

the custom.js is:

$('.returnTopAction').live('click', function() {
   $('html, body').animate({scrollTop: '0'}, 700);
});
$('#gallery-page').live('pageshow', function () { 
        $myPhotoSwipe = $(".gallery a").photoSwipe({ enableMouseWheel: false , enableKeyboard: false });});

$('#send').live("click", function() {
                var url = 'send.php';
                var error = 0;
                var $contactpage = $(this).closest('.ui-page');
                var $contactform = $(this).closest('.contact-form');
                $('.required', $contactform).each(function(i) {
                    if($(this).val() === '') {
                        error++;
                    }
                });
                // each
                if(error > 0) {
                    alert('Please fill in all the mandatory fields. Mandatory fields are marked with an asterisk *.');
                } else {
                    var firstname = $contactform.find('input[name="firstname"]').val();
                    var surname = $contactform.find('input[name="surname"]').val();
                    var state = $contactform.find('select[name="state"]').val();
                    var mobilephone = $contactform.find('input[name="mobilephone"]').val();
                    var email = $contactform.find('input[name="email"]').val();
                    var message = $contactform.find('textarea[name="message"]').val();

                    //submit the form
                    $.ajax({
                        type : "GET",
                        url : url,
                        data : {
                            firstname : firstname,
                            surname : surname,
                            state : state,
                            mobilephone : mobilephone,
                            email : email,
                            message : message
                        },
                        success : function(data) {
                            if(data == 'success') {
                                // show thank you
                                $contactpage.find('.contact-thankyou').show();
                                $contactpage.find('.contact-form').hide();
                            } else {
                                alert('Unable to send your message. Please try again.');
                            }
                        }
                    });
                    //$.ajax

                }
                return false;
            });

the klass.min.js is:

/**
  * Klass.js - copyright @dedfat
  * version 1.0
  * https://github.com/ded/klass
  * Follow our software http://twitter.com/dedfat :)
  * MIT License
  */
!function(a,b){function j(a,b){function c(){}c[e]=this[e];var d=this,g=new c,h=f(a),j=h?a:this,k=h?{}:a,l=function(){this.initialize?this.initialize.apply(this,arguments):(b||h&&d.apply(this,arguments),j.apply(this,arguments))};l.methods=function(a){i(g,a,d),l[e]=g;return this},l.methods.call(l,k).prototype.constructor=l,l.extend=arguments.callee,l[e].implement=l.statics=function(a,b){a=typeof a=="string"?function(){var c={};c[a]=b;return c}():a,i(this,a,d);return this};return l}function i(a,b,d){for(var g in b)b.hasOwnProperty(g)&&(a[g]=f(b[g])&&f(d[e][g])&&c.test(b[g])?h(g,b[g],d):b[g])}function h(a,b,c){return function(){var d=this.supr;this.supr=c[e][a];var f=b.apply(this,arguments);this.supr=d;return f}}function g(a){return j.call(f(a)?a:d,a,1)}var c=/xyz/.test(function(){xyz})?/\bsupr\b/:/.*/,d=function(){},e="prototype",f=function(a){return typeof a===b};if(typeof module!="undefined"&&module.exports)module.exports=g;else{var k=a.klass;g.noConflict=function(){a.klass=k;return this},a.klass=g}}(this,"function")

the php is:

<?php
header('content-type: application/json; charset=utf-8');

if (isset($_GET["firstname"])) {
    $firstname = strip_tags($_GET['firstname']);
    $surname = strip_tags($_GET['surname']);
    $email = strip_tags($_GET['email']);
    $mobilephone = strip_tags($_GET['mobilephone']);
    $state = strip_tags($_GET['state']);
    $message = strip_tags($_GET['message']);
    $header = "From: ". $firstname . " <" . $email . ">rn"; 

    $ip = $_SERVER['REMOTE_ADDR'];
    $httpref = $_SERVER['HTTP_REFERER'];
    $httpagent = $_SERVER['HTTP_USER_AGENT'];
    $today = date("F j, Y, g:i a");    

    $recipient = 'mysite@myhost.com';
    $subject = 'Contact Form';
    $mailbody = "
First Name: $firstname
Last Name: $surname
Email: $email
Mobile Phone: $mobilephone
State: $state
Message: $message

IP: $ip
Browser info: $httpagent
Referral: $httpref
Sent: $today
";
    $result = 'success';

    if (mail($recipient, $subject, $mailbody, $header)) {
        echo json_encode($result);
    }
}
?>

When I test this in a pc it works perfect, however when using a blackberry or a cellphone it just does nothing when the send button is clicked…

I tested a single script to test mail function and it works…

<?php

$ADDR = "mysite@my.com";
if (mail($ADDR,"Testing","This is a test"))
    echo "Mail function succeeded<br />";
else
    echo "Mail function FAILED<br />";
?>

Where is the error, I do not understand why is not working on phones, but when tested on a pc it does?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T19:12:36+00:00Added an answer on June 13, 2026 at 7:12 pm

    You can try with $_POST instead of $_GET and try one by one. That would work

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using the http://www.ifans.com/forums/showthread.php?t=132024 post from another question i am allowing the user to enter
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
Using Tomcat, I build a new WAR via Maven. Then I copy the output
Using MVC2 I have an AJAX form which is posting to a bound model.
Using php/html, I want to retrieve email addresses (plus other information) from MySQL and
Using ASP.NET MVC there are situations (such as form submission) that may require a
Using preview 4 of ASP.NET MVC Code like: <%= Html.CheckBox( myCheckBox, Click Here, True,
Using HTML 5, I want to play multiple sounds simultaneously. how can I do
Using Rails 3, but I guess doesn't matter. I put this in the template
Using rubular.com as a guide, I am trying to get this expression to work

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.