Click here to Skip to main content
15,793,846 members

Comments by Luc Pattyn (Top 200 by date)

Luc Pattyn 14-Jan-23 16:41pm View    
I have no experience with CodeIgniter, however the commas near your if statements seem very odd, probably causing the second if to emit the error you're getting.

I would remove the commas after the constants 6/5/2 and add one after the last }
Luc Pattyn 3-Oct-22 22:22pm View    
forgot to mention: you have an unreachable statement:
Luc Pattyn 3-Oct-22 22:03pm View    
I see nothing wrong in your brackets.

'}' expected
message does not imply an imbalance of brackets, it simply states it was expecting a '}' and got something else. Are you sure there aren't any unexpected characters in front of one of your brackets, even unprintable ones?

Furthermore, you can simplify your code a lot, e.g.:

function pswMatch($password, $repeat_Password) {
return $password !== $repeat_Password;

And finally, when such function returns false on a match, then its name is wrong; it should be called pswMismatch, so calling code could look like:

if (pswMismatch($a,$b)) echo "password mismatch";

PS: you have empty($surname) twice, and are lacking an empty($username).
Luc Pattyn 14-Aug-22 17:07pm View    
you're welcome.
"Inspect" is quite different from "View Source", it gives you the documents building blocks with their dimensions, styles, everything, as rendered by the browser. I use it all the time on Chrome, I can only hope Edge offers something similar, I don'tknow, I avoid MS browsers as much as possible.
Luc Pattyn 24-Jul-22 13:10pm View    
the way I understood it, the function should equal the inverse of a sine: periodically sample the given sine wave, and use that as the index into the lookup table.

And doing so, inaccuracies of the sampling time would automatically be compensated for.