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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:31:20+00:00 2026-06-01T17:31:20+00:00

I am trying to make a simple html page that takes info from two

  • 0

I am trying to make a simple html page that takes info from two input fields and uses them to search a database. The two fields are just start and end datetime values.

I have this form which is automatically filled with today’s date and 00:00 for the start time and 23:59 for the end time.

<!--field for start-->
<p>Start Date Time:</p>
<form action="" method="get">
<input type="text" name="date1" id="datetime1" /> 
<!--field for end-->
<p>End Date and Time:</p>
<input type="text" name="date2" id="datetime2" />
<!--button to modify search criteria-->
<button type="submit" id="f_trigger_b">Search</button>
</form>
</body>

I want to take the values in the two fields and use them to search an sql database using php. I have this section of code to get the information from the database in the header:

//<![CDATA[
//need to work with this so that info is passed
function load(timestart, timeend) {

//code here edited out for simplicity

    GDownloadUrl("genxmlphp.php", function(data) {

//code here edited out for simplicity

//]]>

How do I take the values from the two input fields and when the submit button is pressed, the load(time1, time2) is triggered and uses genxmlphp.php to search the database using the time1 and time2 values?

  • 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-01T17:31:21+00:00Added an answer on June 1, 2026 at 5:31 pm

    Once the form is submitted, $_GET['date1'] and $_GET['date2'] will contain the form values. Although it might be better to switch the form method to post and use $_POST['date1'] and $_POST['date2'].

    If you’re not using prepared statements, when using these values in an SQL query escape them using mysql_real_escape_string() first (if you’re using MySQL).

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

Sidebar

Related Questions

I've been trying to make a simple search inside a static HTML page using
I'm trying to make a simple Python-based HTML parser using regular expressions. My problem
I'm trying to make a simple php script to find all src attributes from
Hoping this is possible with Simple Html Dom, I'm scraping a page that looks
I'm trying to make a simple link that will toggle my status attribute in
I am trying to write a simple console app that POSTs to a page
Trying to make simple minesweeper game in python, but have one problem. I have
I am trying to make simple notepad application for learning android development. So, to
I'm trying to make simple script using jquery $post function to pass data to
Trying to make a simple program to catalogue books. Something like this, for example:

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.