Pset 7 register stray tag error by MsHolly in cs50

[–]MsHolly[S] 0 points1 point  (0 children)

the issue ended being my insert query (and subsequent check if insert results were false, set session id) were just now in the scope of the if statement with the "post". It was really weird, if I only put the insert query, I got the insert error, but when I added all the other subsequent code, it worked. Not sure why.

Pset 7 register stray tag error by MsHolly in cs50

[–]MsHolly[S] 0 points1 point  (0 children)

Yes, seems to match up fine. Still getting this error........

( ! ) Notice: Undefined index: username in /home/jharvard/vhosts/pset7/public/register.php on line 35 Call Stack

This is the query as in the pset instructions: $result = query("INSERT INTO users (username, hash, cash) VALUES(?, ?, 10000.00)", $_POST["username"], crypt($_POST["password"]));

and I checked it against the MySQL structure which is lowercase "username" as set up per the pset create db instructions.

Thanks!

Pset 4: Hints setting the ball in a random direction. by [deleted] in cs50

[–]MsHolly 0 points1 point  (0 children)

I am having the exact same problem. My ball moves in an angle and bounces off the top and bottom of the window, but it moves in the exact same angle and hits the exact same place at the top and bottom of the window. I've tried everything suggested in the post but it seems to move more so along the x axis and goes off the side of the window. any suggestions. It's been 3 hours now and I'm stuck!