how to load data from a page according to the clicked ID?

Asked

Viewed 392 times

1

What I want is very simple, I want to click on the name of the person, load another page with the complete data of the person according to the data previously clicked and there I can edit the data of that person and save in that person in the MYSQL Database.

  • 1

    what you’ve already done?

  • only the login so far, and the page that will receive the data

  • But your question is how to pass this id, or how to query. Enter code if possible, to better illustrate

  • How to put it in Href to go to another page and on this page load the id data I clicked before and there start working with the registration of that person

  • @williamDePaula is the way you want it? How I answered there?

  • That’s right, thank you very much

  • @Williamdepaula mark as answer then :)

Show 3 more comments

1 answer

2

A simple and untreated method is to use the method $_GET. You can go through the link as follows:

<a href="pagina.php?id=5"><a/>

That one 5in case, it is your id, which you will recover on the other page as follows. In the pagina.php , you would do:

$id=$_GET['id'];

I hope I’ve helped!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.