Ask Your Question
4

Whenever I add a record in PHP/MYSQL, why does the student id always display as 0 and the Full name remain empty?

asked 2021-07-18 11:00:00 +0000

lakamha gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-02-18 08:00:00 +0000

lalupa gravatar image

There could be several reasons why the student id is displaying as 0 and the full name is remaining empty. Here are a few possible explanations:

  1. The code that retrieves the student id and full name from the form data is incorrect.
  2. The database table may not have been set up correctly and does not have the correct columns for student id and full name.
  3. There could be an issue with the SQL query used to insert the data into the database. This could be due to a syntax error or incorrect formatting of the query.
  4. The variables used to store the student id and full name may not be properly initialized before their values are set.

To resolve this issue, you should carefully review your code and database setup to identify and fix any errors. Additionally, you may want to use debugging tools and print statements to help you identify the root cause of the problem.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-07-18 11:00:00 +0000

Seen: 13 times

Last updated: Feb 18 '22