aguyformerlyknownas Posted December 9, 2022 Share Posted December 9, 2022 First off, thanks for your assistance in advance. I attempted to use an array, userFullName, which is equal to userFName and userLName, to search the database for existing users. I tried the setup that you see in the screenshots with a whole slew of other variations from concatenation of the userFName.userLName variables in the signup-inc PHP file to what you see in the bottom screenshot. The fatal errors went from expects exactly 1 argument, given 2 to low count, given 3 arguments expecting 4. I can use an assist here. I am relatively new to PHP, so laid back laymen terms would be well appreciated. I have a column in the database for all three variables and need the userFullNAME for other features that will come later on. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/315626-can-anyone-solve-this/ Share on other sites More sharing options...
ginerjm Posted December 9, 2022 Share Posted December 9, 2022 What screenshots? 1 Quote Link to comment https://forums.phpfreaks.com/topic/315626-can-anyone-solve-this/#findComment-1603371 Share on other sites More sharing options...
aguyformerlyknownas Posted December 9, 2022 Author Share Posted December 9, 2022 The screenshots were there when I joined. I'm lost with what you said on the p.s. Quote Link to comment https://forums.phpfreaks.com/topic/315626-can-anyone-solve-this/#findComment-1603374 Share on other sites More sharing options...
aguyformerlyknownas Posted December 9, 2022 Author Share Posted December 9, 2022 Quote Link to comment https://forums.phpfreaks.com/topic/315626-can-anyone-solve-this/#findComment-1603375 Share on other sites More sharing options...
aguyformerlyknownas Posted December 9, 2022 Author Share Posted December 9, 2022 2 hours ago, ginerjm said: What screenshots? I got the p.s. Quote Link to comment https://forums.phpfreaks.com/topic/315626-can-anyone-solve-this/#findComment-1603376 Share on other sites More sharing options...
Solution kicken Posted December 9, 2022 Solution Share Posted December 9, 2022 Look at the documentation for mysqli_stmt_prepare. Notice it says the function only accepts one parameter which is the connection. Now look at your code and notice that you are passing two parameters, the connection and the SQL string. You need to remove the extra parameter. 1 Quote Link to comment https://forums.phpfreaks.com/topic/315626-can-anyone-solve-this/#findComment-1603378 Share on other sites More sharing options...
aguyformerlyknownas Posted December 9, 2022 Author Share Posted December 9, 2022 Thank you Guru for that. I kept missing that even though i kept looking at it. And also, thank you @gingerjm. I'm going to get some sleep and then clean up my mistakes. Quote Link to comment https://forums.phpfreaks.com/topic/315626-can-anyone-solve-this/#findComment-1603380 Share on other sites More sharing options...
Barand Posted December 9, 2022 Share Posted December 9, 2022 Also your WHERE clause syntax looks incorrect. And why are you storing the userFullName when it is easily derived from the first and last names when required? Unnecessary duplication. EG SELECT concat(userFName, ' ', userLName) as fullname FROM guests; Quote Link to comment https://forums.phpfreaks.com/topic/315626-can-anyone-solve-this/#findComment-1603385 Share on other sites More sharing options...
ginerjm Posted December 9, 2022 Share Posted December 9, 2022 And if you are showing us code or error messages it is better to cut and paste it into a code window in this forum and not do "screenshots". That way if we want to help you we can edit the code and re-post it for you to then use. Quote Link to comment https://forums.phpfreaks.com/topic/315626-can-anyone-solve-this/#findComment-1603389 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.