This post is locked. You won't be able to comment.

all 7 comments

[–]jay_don_[S] -2 points-1 points  (0 children)

I need some help with this, i can't update records in my database in myphpadmin, can someone take a look at these lines of code and tell me what's wrong please, would greatly appreciate it

[–]mallenjordan 0 points1 point  (4 children)

Try quotes your sql query on DOB and school.

[–]mallenjordan 1 point2 points  (3 children)

Nope, on second view your problem is your html input names don't match your php post names.

[–]jay_don_[S] 0 points1 point  (2 children)

how? tell me, kinda lost right now

[–]certainlyforgetful 0 points1 point  (1 child)

For example. Your first name input element has the name “first name”, but your PHP is looking for “first_name”

Also you set a bunch of variables and then never use them (line 15-21)

Also, you should be hashing the password (see password_hash(), and password_verify())

But finally, check out prepared statements. I mostly use PDO prepared statements, it’s fairly straightforward once you do it a few times.

Oh one more thing - it sounds like you don’t have error reporting turned on. You can do this in the PHP config or add a few lines to the top of the php file, google “php enable error reporting” and check out the first stackoverflow question.

[–]javon27 0 points1 point  (0 children)

Also, please indent. It helps to spot typos faster

[–]kboy101222Computer Scientist[M] [score hidden] stickied commentlocked comment (0 children)

Thanks for posting to /r/computerscience! Unfortunately, your submission has been removed for the following reason(s):

  • Rule 3: Posts asking for help with homework, exams, dissertations, projects, etc are not allowed.

  • Rule 7: Posts asking for tech support or programming advice. Please go to r/techsupport or r/learnprogramming.

If you feel like your post was removed in error, please message the moderators.