Put several variables in a text string

0

Very good, I have a variable called origin, where I want to save a text string with two variables. That variable happened to get to a page (2) using the load function.

The problem is that when I make an alert of origin from the page (2), it shows me only the first variable but not the second one.

This way I capture the value of origin from page (2).

<?php if (isset($_GET['origen'])){  ?>
        origen=<?php echo "'".$_GET['origen']."'";}?>;

Source variable

  origen='php/formTarea.php?idMisTareas='+idTarea+'&idHis='+historia;

Here I go to page (2) happening origin by get

 load('php/formHistoria.php?idHis='+historia+'&idTarea='+idTarea+'&origen='+origen);
    
asked by Lorenzo Martín 30.10.2017 в 17:35
source

1 answer

1

pass variables by js

url:   'index.php?accion=modificar&idRepresentante='+idRepresentante+'&cp='+cp,

pass variables by php

<form id="formEditar" method="POST" role="form" action="index.php?accion=actualizar&idRepresentante=<?php echo $_GET['idRepresentante'];?>">

receive in variables by GET

$recibir = $_GET["idRepresentante"];

receive variables by POST

$recibir = $_POST["idRepresentante"];

$origen .= $_GET["idRepresentante"];

validates in the network that you are sending the varibles and that they are arriving at the destination.

greetings

    
answered by 31.10.2017 / 17:52
source