POST reference parameters



  • The violin a.php accepts two parameters, as if it simply reverts to the request to write the meaning of the parameters in question? I want to test requests.

    https://domen//100/a.php

    $k=$_POST['num']; 
    $k2=$_POST['num2']; 
    

  • QA Engineer

    You can do that for what?

    a.php

    if (isset($_POST['sumbit'])) { // если была нажата кнопка
        $k = $_POST['num'];
        $k2 = $_POST['num2'];
    } elseif (isset($_GET['num']) and isset($_GET['num2'])) { /если GET запрос
        $k = $_GET['num'];
        $k2 = $_GET['num2'];
    } else {
        $k = null;
        $k2 = null;
    }
    

    echo 'num = '.$k.' num2 = '.$k2;

    The line will look like https://domen// 100/a.php?num=1ônum2=2


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2