0

Hello,

I'm new to php mysql and would like to ask if someone can point me in the right direction for a script or tutorial that could explain to me how to achieve the following.

I have a page that is called "page.php" now when i click a link it must show the url as follows http://www.yoursite.com/page.php?id=data <-- the data is whatever is being clicked on.... can someone please explain it to me step-by-step and how would i change all my current pages to that format?

Thank you.

3
Contributors
2
Replies
21
Views
3 Years
Discussion Span
Last Post by tapananand
1

Where you are looking for is called "dynamic pages". I found a tutorial here. If you need any further help, just let me know.

Votes + Comments
Thanks Remy_1 that was what i was looking for
1

As I understand you want to submit to the page.
Please Clarify a bit more.
"must show the url as follows" - What do you really want to achieve?? Be specific.

I'll try to answer though:
What you can do is have an onclick in the link.
The onclick handler can either use ajax or you can have a line like this in that function: window.location.href='http://www.yoursite.com/page.php?id=data', the data can be passed as argument to the function. Plus page.php must have code to handle the received data using $_GET.

Edited by tapananand

Votes + Comments
Thanks tapananand
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.