Support » Plugin: PHP code snippets (Insert PHP) » pass a variable from one page to another

  • hi
    i want to pass a variable from one page to another. But i don’t find the right syntax!
    my snippet in the first page

    $toto = 25;
    header('Location:https://www.inscriptionsoccervg.ojjo.ca/inscription-un-poussin/?mavar='$toto); 

    but have he error message : syntax error, unexpected ‘$toto’ (T_VARIABLE)
    i try
    header('Location:https://www.inscriptionsoccervg.ojjo.ca/inscription-un-poussin/?mavar='.$toto);
    but it doesn’t work.

    and the snippet code in the second page

    $mavar = $_GET['toto'] ;
    echo "Loop start!", $mavar;

    could you help me please ?
    thank

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.