skip to Main Content
if(isset(filter_input_array(input_post) 

Also the reason why im using Filter input array is because $_POST doesn’t even work anymore not on netbeans anyway.

My localHost hits me back with a :

Warning: Use of undefined constant input_post – assumed ‘input_post’ (this will throw an Error in a future version of PHP) in C:xampphtdocsTest1Includessignup2.inc.php on line 3

I’m pretty new to Coding and especially PHP. Im in 1st year of Uni doing course work, so dont get upset if its a silly question. But I have no idea how to fix this.

This is all I have so far

<?php

if(isset(filter_input_array(input_post)['signup-submit'])) {

require 'dbh.inc.php';

    $username = filter_input_array(input_post)['uid'];
    $email = filter_input_array(input_post)['mail'];
    $password = filter_input_array(input_post)['pwd'];
    $passwordRepeat = filter_input_array(input_post)['pwd-repeat'];

2

Answers


  1. Try using $_REQUEST as global var.

    Login or Signup to reply.
  2. Filtering input is fundamentally wrong (really the issue here is about PHP naming conventions).

    because $_POST doesn’t even work anymore

    So your workaround for a problem is no longer working. Stop trying to fix your workaround and fix the problem. PHP is primarily a scripting language for the web – if it is not handling request data something is very wrong.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search