I\'m puzzled why the following code successfully adds a new row to my database table while mysqli_affected_rows($dbc)
returns \"-1\", thus an error, in signup.p
I have tested your code and it echos Success when new record inserted to database, please recheck your database to ensure data insertion
mysqli_affected_rows: return value
- An integer > 0 indicates the number of rows affected.
- 0 indicates that no records where affected &
-1 indicates that the query returned an error(that may be you case)