Jump to content

Shortening URL


leeh14

Recommended Posts

Hi,

 

Right I have a button which links to a dynamic page and I want to clean up the URL, at the moment the button looks like this:

 

echo "<a href='$page?\"?goto=true&id=".$custID."'>Edit</a>";

 

and I basically want to remove ** \"?goto=true&id=".$custID ** from the URL bar in the browser!

 

How can this be done.

 

Regards

 

Lee

Link to comment
https://forums.phpfreaks.com/topic/216708-shortening-url/
Share on other sites

Assuming your still wanting to pass that info (in some form or other)...

 

The hard way, look into mod_rewrite, then the page name could be an id that could be interpreted somehow...

 

The other way, instead of passing as GET variables, pass as POST variables (sort of the same, but a bit more hidden), you'd just have to use custom buttons instead of links...

Link to comment
https://forums.phpfreaks.com/topic/216708-shortening-url/#findComment-1125950
Share on other sites

First off, why do you want to remove that "clutter" from the url?

 

It appears your underlying code template was based on a model that supports that url structure. You might want to find that source code which generates the url like that, and post it up here.

Link to comment
https://forums.phpfreaks.com/topic/216708-shortening-url/#findComment-1126061
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.