Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/17/2017 in all areas

  1. There is no Php.ini file, where would be if not in the file manager? Nothing occurs. Blank screen once I tested the email form. The code doesn't go back to the form page, I removed that, but the Mysql db should contain the record, but nothing.
    1 point
  2. That custom 404 page doesn't give a lot of information, it doesn't help that it redirects to 404.html. Maybe the redirection isn't working. The normal way to redirect though is to send a Location header with the new URL. But, for testing, I would suggest not redirecting and making sure the PHP code works. Your PHP code has some errors in it, so maybe the server sees the PHP errors and redirects to 404 for some reason. Here are some of the issues with your PHP code: You're trying to call a function called $POST, but $POST isn't defined. If you want to get submitted values you get them from $_POST, which is an array, not a function. So, for example, you would use $_POST['name']. If your database connection fails you don't stop the script, the rest of the code still runs without a database connection. When you call mysqli_query, you used !$con which is going to send a boolean value instead of the actual connection. You need to use prepared statements when you're sending data to the database. The mysqli extension supports prepared statements, you need to use them to make sure your queries run and protect against SQL injection attacks. You send the same text ('Not inserted') regardless of whether or not the record was inserted in the database. If you use echo to send any output, sending a header after that will not work.
    1 point
  3. These Email = $Post('email'}; $Password = $Post('Password'}; are supposed to be $_POST['email']; AND $_POST['Password']; and the coloured names are suppose to match the values of name attributes of inputs you are trying to read <input type="text" value="username"><br> Password:<br> <input type="text" name="lastname" value="password"><br><br> AS you can see, they match neither, and one does not even have a name attribute which is required for ALL inputs, AND name values must match exactly as 'password' is treated differently to 'Password'.
    1 point
×
×
  • Create New...