Jump to content

Recommended Posts

Ok, there may well be a very simple solution to this problem but I can't think of it so here it is..

 

I've got several pages on a web site, the first is the index.php the others are index.php?type=1, index.php?type=2 etc... each page lists items and when you click on an item it displays the item's info, the link(s) to display the item's info should be:

 

<a href='{$PHP_SELF}&pid={$row[pid]}'>Item Link</a>

 

this works fine on all the pages apart from index.php, as the link comes out as:

 

index.php&pid=1

 

whereas it should be

 

index.php?pid=1

 

What is the simplist way for the script to use ? instead of & if there is no variable already being send through the URL??

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/117820-adding-variables-to-url/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.