Skip to content
Advertisement

How to send data from a dynamic php table inside an anchor tag to another page

How to send data from a dynamic php table inside an anchor tag to another page(description_of_gpu.php) and also how to retrieve that data on the new page.

I am trying to send the variable generated inside the table-data tag to another page, which is in itself retrieved from “MySQL” database. Once I get that data, I will search through my database with the same “NameOfVcard” and display it’s discription.

Code inside “gpu_table_page.php”

JavaScript

Code inside “description_of_gpu.php”

JavaScript

Advertisement

Answer

As the PHP is using double-quotes around the strings you can embed the variable within this string without needing to escape it so you can modify

JavaScript

to be more like this

JavaScript

Then, within description_of_gpu.php you should be able to access the GET variable NameOfVcard, like so:

JavaScript

leading on to

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement