This topic is locked
[SOLVED]

view as custom as link to edit page

1/12/2023 4:07:55 PM
PHPRunner General questions
francesco author

I have difficult to create an hyperlink to edit page when I click on a specific field and and include data from the current record as a parameter.
I used this:
$value = "<a href='http://localhost/output/commessa_edit.php...... i don't know how to pass field "commessa" as parameter

thanks for help

Sergey Kornilov admin 1/12/2023

There are many articles on the Web that explain how to pass parameters via URL.
Here is one of them:
https://www.botify.com/learn/basics/what-are-url-parameters

francesco author 1/14/2023

thanks Sergey, I was able to solve my problem in this way:
$value = "<a href='http://localhost/output/commessa_edit.php?editid1=".$data["commessa"]."'>Link</a>;";

The only problem I have now I get in the field not the actual value, see attached image. I want to display field value

img alt

Sergey Kornilov admin 1/14/2023

Do you mean the real field value instead of the word "Link"? Just use the real field value instead of the word Link. Not quite sure I understand the question.

francesco author 1/14/2023

exact I want the field value instead of "Link".
I don't know how to write correctly

francesco author 1/15/2023

I solved and this is the correct code

$comms=$data["commessa"];
$value = "<a href='http://localhost/output/commessa_edit.php?editid1=".$data["commessa"]."'>$comms</a>;";

Sergey Kornilov admin 1/15/2023

Yes, using the correct code usually helps.