Generate URL with php

0

I really do not know how to detail in the title what I need to do,

I require the following:

I have an image that says "SEE YOUR DOCUMENTS HERE" Clicking on it I need a window to appear requesting the RUC number (Peru commercial identity document), the person must enter their code and give a button that says SEE, that button must redirect it to a predetermined address: link to which its code will be added staying as follows:

link where xxxx represents the code that the person entered ..

Does someone guide me how could I do this? it's in Wordpress that I need to put the button.

    
asked by Rafael Garcia 12.06.2018 в 00:36
source

1 answer

1

Assuming that you understand wordpress and know how to use php code on your website, a solution would be to create an html form in this way.

<form action="https://mipagina.com/fe" method="get">
    <input type="text" name="empr" placeholder="Introduce tu número RUC"/>
    <input type="submit" value="VER"/>
</form>

By clicking on SEE you should send it to link

To collect the value you must use this code

<?php
    $empr = "";

    if(isset($_GET['empr']){
        $empr = $_GET['empr'];
    }
?>

With that you would already have your code in a variable, and it would only work with it or show it on the screen. echo $empr;

    
answered by 12.06.2018 в 13:43