Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am having issues getting my Join page working. I am hoping someone can look ov

ID: 3849077 • Letter: I

Question

I am having issues getting my Join page working. I am hoping someone can look over everything and see why I am getting an HTP ERROR 500 page whenever somebody tries joining.

Heres a link to the site. Its for a class, so I think you should be able to see it if needed: http://cisweb.chemeketa.edu/student/cluth/Cookie%20Cutter%20Site/pages/Join.php

Main Join Page:

Join form above, when submitted, calls dubs.php page:

Then we use confirmed.php to add to the database:

Then, just to make sure, heres a picture of the database showing the variables in it, and then my file paths to make sure they are correct as well.

Join PhP 1 DOCTYPE htnu 2

Explanation / Answer


I think, there is a problem in your insert query. I'm not sure about the Login table fields and it's data types. I guess auth may be an integer. Kindly echo/print the query before execution and execute it directly in to the DB/ Login Table, you may get the error. If so then remove the quotation from auth
like,
$sql = "INSERT INTO Login (UserName, Password, EMail, Auth, News) VALUES ('$_SESSION[username]', '$_SESSION[password]', '$_SESSION[EMail]', $auth, '$_SESSION[News]')";

or try to change values based on it's data types.

And use header('Location: ../Main.php'); instead of header('../Main.php');