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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:04:42+00:00 2026-06-07T21:04:42+00:00

I want to send a number of parameters by the form to a php

  • 0

I want to send a number of parameters by the form to a php file to insert to the database,

<html>
<head>
    <title>Self</title>
</head>
<body>
<?php

    function selfcheck($DB, $TechID, $ClientID, $SiteID, $Type, $LogTime){
        $dbConnection = mysql_connect($DB['server'], $DB['loginName'], $DB['password']);
        if(!$dbConnection){
            die('Error! ' . mysql_error());
            }
        mysql_select_db($DB['database'], $dbConnection);
        $result = mysql_query("SELECT COUNT(*) FROM Log") or die('Error! ' . mysql_error());
        while($row = mysql_fetch_array($result)){
            $count = $row['COUNT(*)'];
            $count = $count+1;
            print $count.", ".$TechID.", ".$ClientID.", ".$SiteID.", ".$LogTime.", ".$Type."<br>";
            $query = "INSERT INTO Log (LogID, TechID, ClientID, SiteID, LogTime, Type)
                        VALUES (".$count.", ".$TechID.", ".$ClientID.", ".$SiteID.", ".$LogTime.", ".$Type.")";
            mysql_query($query);
        }
    }

    $LogTime = date('Y/m/d H:i', mktime($_GET['Hour'], $_GET['Minute'], 0, $_GET['Month'], $_GET['Day'], $_GET['Year']));
    selfcheck($DB, $_GET['TechID'], $_GET['ClientID'], $_GET['SiteID'], $_GET['Type'], $LogTime);
?>
</body>

As you can see, there are nine Get values, however, when I try to execute the codes, the server replys

"Undefined index: Minute in C:\wamp\www\NFC\self.php on line 29", and show in the URL, minute parameter has not been sent. Why does this happen? And how can I solve this problem?

Here is the code to send the request.

print "<form method='get' name='check' action='self.php'>";
    $result = mysql_query("SELECT * FROM Tech") or die('Error! '.mysql_error());
    print "Name<select id='tech' name='TechID'>";
    while($row = mysql_fetch_array($result)){
        print "<option value=".$row['TechID'].">".$row['TechName']."</option>";
    }
    print "</select>";
    $result = mysql_query("SELECT * FROM Client") or die('Error! '.mysql_error());
    print "Name<select id='client' name='ClientID'>";
    while($row = mysql_fetch_array($result)){
        print "<option value=".$row['ClientID'].">".$row['ClientName']."</option>";
    }
    print "</select>";
    $result = mysql_query("SELECT * FROM Site") or die('Error! '.mysql_error());
    print "Name<select id='site'name='SiteID'>";
    while($row = mysql_fetch_array($result)){
        print "<option value=".$row['SiteID'].">".$row['SiteName']."</option>";
    }
    print "</select>";
    print "Type<select id='type' name='Type'>";
    print "<option value='Checkin'>Check In</option>";
    print "<option value='Checkout'>Check Out</option>";
    print "</select><br>";
    print "Year<input type='text' id='year' size='4' name='Year'/>";
    print "Month<input type='text' id='month' size='2' name='Month'/>";
    print "Day<input type='text' id='day' size'2' name='Day'/>";
    print "Hour in 24<input type='text' id='hour' size='2' name='Hour'/>";
    print "Minute<input type='text' id='minute' size'2'name='Minute'/>";
    print "<input type='submit' value='Manual check' onclick='self.php'/>";
    print "</form>";

it is in a PHP file as for some choices, I want to get the options from the database instead of hard code them. I have tried to send the parameters through a javascript file, but the situation cannot be solved.

  • 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-07T21:04:44+00:00Added an answer on June 7, 2026 at 9:04 pm

    You really aren’t helping yourself by constructing your markup in this way.

    I suspect your answer is here:-

    print "Minute<input type='text' id='minute' size'2'name='Minute'/>";
    

    No space between the end of the size attribute and the beginning of the name attribute. As far as the page that picks this value up is concerned, the value ‘Minute’ does not exist.

    Change it to:-

    print "Minute<input type='text' id='minute' size='2' name='Minute'/>";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use a form to send some data to my welcome.php file: <form action=welcome.php
I want to send emails in a number of languages (en/es/fr/de/ru/pl). I notice that
Is it ok to send as many number of primitive data as you want
I want to select a number of email addresses and then send an email
I want to send SMS messages to multiple numbers in my database based on
Hello Sir i want send list of data to php server i use following
I want to send a opened file descriptor between two different programs. So I
I want to send a variable from my php page to my jquery code.
I want to pass a varying number of parameters between two objects. I have
I want to send array into eq function as parameter. Like that: $(this).find('tr').not(':eq(array)').each(function(){ });

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.