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

StackOverflow

StackOverflow Logo StackOverflow Logo

StackOverflow Navigation

Search
Ask A Question

Mobile menu

Close
Ask A Question
  • Home
  • Add group
  • Feed
  • User Profile
  • Communities
  • Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
Home/ Questions/Q 595
Next

StackOverflow Latest Questions

Saralyn
  • 0
  • 0
SaralynBegginer
Asked: March 7, 20252025-03-07T16:43:42+00:00 2025-03-07T16:43:42+00:00In: PHP

html – What would be the best way to display database data into a select form type and then display it after input using php

  • 0
  • 0
html – What would be the best way to display database data into a select form type and then display it after input using php

I am trying to add a html form to my website that allows for users to select an option from data in my database multiple times, save it as a variable then display the options selected onto the screen.

In my case I am aiming to have the user select 11 players from my database where the position = ST through to where position = GK. And once selected, the form being submitted and then the selected players displayed onto the screen in the same position. I currently have a grid layout setup for the positioning of the player selection and display after. I have multiple players in each position in my database so when selecting a player it would need to allow for all players of that position to be an option. Im sure this is pretty basic but i am new to php and am unsure what the best way to do this would be and could do with some help

I have attempted to do this but recieved errors my code is as follows:

prepare($query);
    $stmt->bindParam(':lastname', $lastname);
    $stmt->bindParam(':firstname', $firstname);
    $stmt->execute();

    while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { ?>
        

        

        

On the main page:

        

The error was:

Fatal error
: Uncaught ArgumentCountError: Too few arguments to function displayST(), 0 passed in /Applications/MAMP/htdocs/assignment/mainPages/dreamTeam.php on line 97 and at least 1 expected in /Applications/MAMP/htdocs/assignment/mainPages/phpFunctions.inc.php:5 
Stack trace:
 #0 /Applications/MAMP/htdocs/assignment/mainPages/dreamTeam.php(97): displayST()
 #1 {main} thrown in

I have attached mock wireframes to explain better what i am trying to achieve, any guidance is appreciated

Before Submitting form (select players)

Upon submitting form (players displayed to screen)

0
  • 0 0 Answers
  • 56 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question
  • Popular
  • Answers
  • W3spoint99

    What is Physics? Definition, History, Importance, Scope (Class 11)

    • 1 Answer
  • W3spoint99

    The Living World – Introduction, Classification, Characteristics, FAQs (Class 11 ...

    • 1 Answer
  • W3spoint99

    Explain - Biological Classification (Class 11 - Biology)

    • 1 Answer
  • Saralyn
    Saralyn added an answer When Humans look at their childhood pictures, the first thing… January 17, 2025 at 3:25 pm
  • Saralyn
    Saralyn added an answer Previously, length was measured using units such as the length… January 17, 2025 at 3:25 pm
  • Saralyn
    Saralyn added an answer Measurement forms the fundamental principle to various other branches of… January 17, 2025 at 3:25 pm

Related Questions

  • Reading fancy apostrophe PHP [duplicate]

    • 0 Answers
  • Unable to send mail via PHPMailer [SMTP->Error: Password not accepted ...

    • 0 Answers
  • Concerns when migrating from PHP 5.6 to 8.4 [closed]

    • 0 Answers
  • Laravel Auth::attempt() error: "Unknown column 'password'" when using a custom ...

    • 0 Answers
  • Core PHP cURL - header origin pass null value

    • 0 Answers

Trending Tags

biology class 11 forces how physics relates to other sciences interdisciplinary science learn mathematics math sets tutorial null sets physics physics and astronomy physics and biology physics and chemistry physics applications science science connections science education sets in mathematics set theory basics types of sets types of sets explained

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help

Footer

  • About US
  • Privacy Policy
  • Questions
  • Recent Questions
  • Web Stories

© 2025 WikiQuora.Com. All Rights Reserved

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.