-1

I want to take the data of a row into a table displayed in a page and pass it into the url, so that then I can take those parameters and put them into a form.

<td><a value="edit" href="add.php?Field1=<?php echo $row['Field1'];?>"></a>Aggiungi</td>

I've managed to get the first parameter, but I can't find the method to add more of them into that line of code.

I've tried to add another field using '&' or ';' but I can't find a solution that actually puts the second field into the url.
5
  • Does this answer your question? PHP function to build query string from array Commented Apr 30, 2021 at 13:35
  • I really don't know how it could fit my case. Commented Apr 30, 2021 at 13:38
  • You have an array ($row) which you wish to put into the query string. How does it not fit your case? Commented Apr 30, 2021 at 13:40
  • and what are all the params you want to add (concatenate?) Commented Apr 30, 2021 at 13:41
  • Unrelated, that code would produce a link without text, </a> should be after "Aggiungi" Commented Apr 30, 2021 at 13:43

2 Answers 2

0

You mean like this?

<td><a value="edit" href="add.php?Field1=<?php echo $row['Field1'];?>&Field2=<?php echo $row['Field2'];?>"></a>Aggiungi</td>
Sign up to request clarification or add additional context in comments.

1 Comment

I still see on the url only the first field
-1

like this friend,

&Field2=
  • enter code here
  • <td><a value="edit" href="add.php?Field1=<?php echo $row['Field1'];?>&Field2=<?php echo

    1 Comment

    How does this answer adds any more value that the one already posted 10 minutes earlier ?

    Your Answer

    By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

    Start asking to get answers

    Find the answer to your question by asking.

    Ask question

    Explore related questions

    See similar questions with these tags.