-2

I apologize for my English. I need to pass more than one variable through a button, I have only passed 1 variable but I want to pass 3.

< td> < a href="exportar_pdf.php?id= < ?php echo $fila['id'];?>">PDF< /td>
Gowtham Shiva
  • 3,802
  • 2
  • 11
  • 27
  • 1
    possible duplicate of https://stackoverflow.com/questions/13102489/passing-multiple-variables-to-another-page-in-url – ggbranch Nov 10 '17 at 06:57
  • Possible duplicate of [Passing multiple variables to another page in url](https://stackoverflow.com/questions/13102489/passing-multiple-variables-to-another-page-in-url) – Rand Random Nov 10 '17 at 07:06

3 Answers3

1

URLS with multiple get variables look like this:

exportar_pdf.php?id=id&var2=var2&var3=var3

Hence, you can write something like this

<a href="exportar_pdf.php?id=<?php echo $fila['id'];?>&var2=<?php ..?>>
ggbranch
  • 559
  • 6
  • 21
1

You can pass multple parameters by adding them with &(Ampersand) like

<a href="exportar_pdf.php?id=1&b=2&c=3">Text</a>

Try this

<td> <a href="exportar_pdf.php?id=<?php echo $fila['id'];?>&uid=<?php echo $fila['yourSecondArgument'];?>">PDF</td>
shubham715
  • 3,324
  • 1
  • 17
  • 27
1

You can separate parameters by &

<td><a href="exportar_pdf.php?id=<?php echo $fila['id'];?>&name=<?php echo $fila['name'];?>">PDF</a>< /td>

Now you can $_GET['id'] and $_GET['name']

Mark
  • 780
  • 1
  • 6
  • 17