1

Hi im only new to php and im trying to simply post data from a link that i generated from the output of the php-mysql result. Ive been looking around for a result but most of them require using the form tag in html5. Is there a way that i could post data to the url from the hyperlink and then use this data , idealy the primary key to then display a generated page of that data ?

1 Answer 1

1

Sounds like you want to use get rather than post.

<a href="index.php?id=10">Link</a>

Then in your PHP script:

$primarykey = $_GET['id'];

(Be aware of SQL injection though).

http://php.net/manual/en/reserved.variables.get.php

Sign up to request clarification or add additional context in comments.

1 Comment

That's exactly what i was after. Thank you.

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.