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.

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

commented: Thanks Remy_1 that was what i was looking for +0

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.

commented: Thanks tapananand +0
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.