Skip to content
Advertisement

Tag: mysqli

Data from 2 tables is not displaying on the same page

I’m a newbie in PHP and mySQL, I’m currently working on a profile page where I will display the logged in user’s personal information from one table called users and also display the tours that they will book in the future from my website from this table: booking I’m fetching the data from users table with prepared statement which will

How to retrieve all rows from an SQL table into an array?

I am trying to retrieve 4 rows and I expected that It should display all 4 rows but it’s only displaying the first row. This is the code I am using Answer If you want to get all rows from the result set then you need to fetch all. Right now you are fetching only one. To fetch all rows

Why does the user input not append to my SQL database?

I’m developing a login/register form for my client. Right now I am working on the registration part of the form however I seem to have encountered an issue. I am trying to append the user’s input to a database if it does not currently exist. I’m developing this functionality using PHP version 7. However, the code does not seem to

Showing two different values depending on SESSION value in INNER JOIN

I have two different tables, one named users, and another named transactions. Transactions contains wallet1, wallet2, amount. Users contains user details such as firstname, lastname, and wallet. I am trying to display the corresponding first name and last name, depending on whether or not the SESSION_wallet is equal to wallet1 or wallet2 within transactions. I tried searching for a while,

Advertisement