Jump to content


Photo

Encoding web links


  • Please log in to reply
4 replies to this topic

#1 mostwantedunm

mostwantedunm
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 09 September 2006 - 04:14 PM

Hello i need help to encoding links .... like i saw many websites having links in their website like this www.website.com/?=hello.php or www.website.com/?area=contactus&ext=php and like this too www.website.com/index.php?=contact.php ... I need this module or something in my HTML based website please help thanks and let thee answer know @unm90@hotmail.com or on this forum thanks!

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 09 September 2006 - 04:20 PM

I'm not sure what the good news is, but the bad news is that a 'module' doesn't exist and that if you have an html-based web site, then php isn't going to be much use to you.

Perhaps you could explain why you think you need to do this as well.
Legend has it that reading the manual never killed anyone.
My site

#3 coldkill

coldkill
  • Members
  • PipPipPip
  • Advanced Member
  • 159 posts
  • LocationUnited Kingdom

Posted 09 September 2006 - 05:18 PM

With encoding links you just need to have a normal hyperlink point to www.domain.com/index.php?whatever=blah. Within the PHP have something like:
$link = $_REQUEST['whatever'];

include $link.'.php';

That's the simplest way of doing it. There are more complicated ways which include using a database to check that the page exists etc.

You will however need to use a .php page and not just a standard .htm or .html.

Hope that helps,
Cold


You can learn alot from reading the manual

#4 mostwantedunm

mostwantedunm
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 11 September 2006 - 04:39 PM

With encoding links you just need to have a normal hyperlink point to www.domain.com/index.php?whatever=blah. Within the PHP have something like:

$link = $_REQUEST['whatever'];

include $link.'.php';

That's the simplest way of doing it. There are more complicated ways which include using a database to check that the page exists etc.

You will however need to use a .php page and not just a standard .htm or .html.

Hope that helps,
Cold



Thanks for your reply.... Please explain me by giving an example page thankyou very much... please mail me REMOVED BY OBER THANKS!

#5 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 11 September 2006 - 04:43 PM

Please note: your thread title has been changed.  Please do not use ALL CAPS to make your thread stand out.  Also, it is unnecessary to bold all of your responses.

Also, please do not request emails to yourself from these forums.  The help should remain in this thread or on these boards.  Your email address has been removed.

Info: PHP Manual





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users