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 8587453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:34:22+00:00 2026-06-11T22:34:22+00:00

I´m having a very odd problem I´m building a mobile app in HTML5 using

  • 0

I´m having a very odd problem

I´m building a mobile app in HTML5 using phonegap to compile it to a native app.

Inside that app is a contact form and I can´t get it to work. I tried everything i could think of. But every-time i submit the form i receive the code of the php part on my screen.
Obviously the app works just fine on the browser, but not on my iphone.

I even tried using an iframe and added the form there, with the same results.

So my question is. How do i add a contact form (needs to send user info to the client email) inside my app

Any help will be highly appreciated

Thanks

  • 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-11T22:34:24+00:00Added an answer on June 11, 2026 at 10:34 pm

    Your structure should be like this if doing holistic approach (html5 to native via Titanium/Phonegap)

    /projects/apps/html5app/index.html
    /projects/apps/html5app/contact.html
    
    /projects/apps/html5app/assets/js/phonegap.js
    /projects/apps/html5app/assets/js/jquery.js
    
    /projects/apps/html5app/assets/css/css.css
    
    /projects/apps/html5app/assets/images/logo.jpg
    /projects/apps/html5app/assets/images/button.jpg
    

    in contact.html you need to point to a live server with the PHP file

    <form action="https://service.cdn-app.com/contact-form.php" method="get">
    

    And then use a postback to submit a thanks page in AJAX or JSON so the user is not prompted to leave the app.

    Alternatively UPDATE – Easier approach is just do button like this

    <input type="button" onclick="submit()" value="submit contact"/>
    

    Then on your jQuery you can do the action their (they won’t leave your app and you can trigger a replace div with thanks etc)

    // Start the jQuery form process engine

    jQUERY Sample

    $.post('https://service.cdn-app.com/contact-form.php', {
    
        // These are the names of the form values
    
        FirstName: $('#FirstName_input').val(),
        LastName: $('#LastName_input').val(),
        Email: $('#Email_input').val(),
        MessageText: $('#MessageText_input').val()
    
        // HTML function
    
        }, function (html) {
            // Place the HTML in a astring
            var response=html;
    
            // PHP was done and email sent
            if (response=="success") {
                alert("Message sent!"); 
            } else {
    
                // Error postback
                alert("Sorry please fill all fields!"); 
            return false;
        }
    });
    

    PHP SAMPLE

    <?php
    
        // VARS
        $FirstName=$_GET["FirstName"];
        $LastName=$_GET["LastName"];
        $Email=$_GET["Email"];
        $MessageText=$_GET["MessageText"];
        $Headers = "From:" . $Email;
    
        //VALIDATION
        if(
        $FirstName=="" ||
        $LastName=="" ||
        $Email=="" ||
        $MessageText==""
        ) {
            echo "Error";
        } else {
            mail("youradmin@cdn.com","mobile app message",$MessageText, $Headers);
            echo "Success";
        }
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having a very odd problem with Visual Studio 2010. After using it
I'm having a really odd problem that seems very unrelated. I'm trying to use
I'm having a very odd problem that I can't seem to track down. Any
I'm having a very odd problem that I can't understand. I have created an
I am having a very odd problem that for the life of me I
Im having a very odd problem. Im trying to install a Python program. Im
I'm having a very odd problem with my program and am hoping you can
Im having a very strange problem, i have a complicated view that returns incorrect
Having a very odd problem. After processing of a file I read a txt
I'm having a very odd problem in C# and I'm not sure what is

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.