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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:40:15+00:00 2026-06-09T15:40:15+00:00

I am new to HTML5. I would like to build a website using HTML5

  • 0

I am new to HTML5. I would like to build a website using HTML5 that I can use in both Android and iPhone. I spent a couple of days to get a solution, but failed. Below is my scenario:

  1. MySQLdatabase has a table (userinfo) which stores user information, e.g. name, age, sex, occupation, hobby, address, etc.
  2. I have an HTML5 design (category.html) where 3 options (age<5,age>5 and age<20,age>20) exist as list with anchor tag.
  3. If I touch age<5, then it will show a list of all users with name and sex whose age is less than 5 in list.html. Next I will touch a name from this list and it will show details of this user in details.html

The query is simple: select name,sex from userinfo where age<5/age>20 etc.

I am using PHP to connect to the database. When I use a button to assign an action (GET/POST method in PHP) in a form, it is easy for me, but here it is not a button. It is a list with an anchor link. How can I do it? The above scenario is for both Android and iPhone.

  • 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-09T15:40:16+00:00Added an answer on June 9, 2026 at 3:40 pm

    In order to submit POST data, the data must be sent to the server. A hyperlink alone cannot do this – however with a bit of JS magic, you can easily accomplish this.

    If you’re using something like jQuery, you can capture the click event – gather data from the link based on the click event, and submit to the server via $.post/$.ajax.

    HTML:

    <a href="javascript:void(0);" class="age-less-then-five">age<5</a>
    

    Javascript:

    $('a.classname').click(function(){
                var that = $(this), value = that.text().trim(); 
                //you can optionally store a value in the classname, or ID which is what I would do.. in this scenario.. I think XD
    
                $.post('yoururl.com/phpscript.php',{postName: value}, function(data){
                    //load whatever data you want, or redirect to list.html now that you've gathered desired data
                }
            });
    

    To clarify the above answer, var that = $(this); refers to the link that’s been clicked on. So you could grab the class name from the anchor by: that.attr(‘class’) // which would equal age-less-then-five or simply do as above, and grab the text inbetween the anchor tags by using .text(). We trim here, this really isn’t the best way to do this.. but it is one way to do it. When I’m using a link to perform any sort of post to the server, I’ll typically use an ID if it holds a unique value, or class name.

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

Sidebar

Related Questions

We are about to build a new company Android app and would like to
I am new here. I would like to know how can I display HTML
We would like to use the HTML5 sessionStorage (or something like it) in a
I am kind of new to javascript/html5. normally I would do that kind of
I build a website focussing on loading only data that has to be loaded.
I would like to get the property names from a JavaScript object to build
I am creating a collection of JBehave reports during my build that I would
I'm using Jersey to build a REST API to a service. I'd like to
I would like to pull artifacts from teamcity. I've been trying to use c#
I would like to build a mobile app, brewed from nothing more but html/css

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.