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

  • Home
  • SEARCH
  • 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 8546837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:07:39+00:00 2026-06-11T13:07:39+00:00

I’m building a small app, which is basicly a form built in HTML and

  • 0

I’m building a small app, which is basicly a form built in HTML and jQuery mobile, I’ve deployed it to the web, and to my iOS-version of the app, and it works like a charm. But now when trying to deploy on the android-version of the app, I just get “undefined” on the screen when submiting, no “undefined variable” or anything else, just “undefined”.

Do anyone have some form of solution to this problem? I’m using PhoneGap to deploy HTML/CSS/JQuery

I’m very grateful for any help given.

I’m posting the code here:

<?php


$con = mysql_connect("db-ip","username","password");
if (!$con)
  {
  die('errormessage: ' . mysql_error());
  }

mysql_select_db("dbname", $con);

$myusername=$_POST['username'];
$myusername = stripslashes($myusername);
$myusername = mysql_real_escape_string($myusername);
$sql2="SELECT * FROM users WHERE username='$myusername'";
$result=mysql_query($sql2);
$count=mysql_num_rows($result);

if (empty($myusername))
    {
        header('Location:error2.html');
        exit;   
    }

if($count==1)
    {
        $sql="INSERT INTO testresult(slider1, slider2, slider3, slider4, time, user) VALUES('$_POST[slider1]', '$_POST[slider2]', '$_POST[slider3]', '$_POST[slider4]', NOW(),'$myusername')";
    }
else    
    {
        header('Location:error.html');
        exit;
    }

if (!mysql_query($sql,$con))
  {
  die('errormessage:' . mysql_error());
  }

header('Location:done.html');
exit;

mysql_close($con);


?>
  • 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-11T13:07:40+00:00Added an answer on June 11, 2026 at 1:07 pm

    If the error is just undefined, it can’t be caused by PHP. In JavaScript, undefined means that the variable which you are trying to use isn’t defined.

    Another observation was mysql_ functions. You should consider using PDO instead.

    From php.net:

    Use of this extension is discouraged. Instead, the MySQLi or PDO_MySQL extension should be used. See also MySQL: choosing an API guide and related FAQ for more information. Alternatives to this function include:

    And this was about functions starting with mysql_.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I used javascript for loading a picture on my website depending on which small
We're building an app, our first using Rails 3, and we're having to build
I have an array which has BIG numbers and small numbers in it. I
I have a text area in my form which accepts all possible characters from
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the

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.