Gossamer Forum
Home : Products : Gossamer Links : PHP Front End :

Global for page.php?do=page&cat_id=123 ?

Quote Reply
Global for page.php?do=page&cat_id=123 ?
Evening,

Got a XML feed on the catagory pages (after its done the catagorys, as in the results)

on this XML Feed, theres a search, the search works 100% correct apart from its dropping the current cat_id when it does it search, tried everything from $_SERVER [PHP_SELF] etc to various other methods of trying to keep that url in the url.

Is there a global for page.php?do=page&cat_id=743 ? (cat_id=743 being the end result after the catagory selection)

atm when the search is performed , it kills the current do=page&cat_id=743 and replaces it with the query for the search, but i need to keep that do=page&cat_id=743

So it does : page.php?do=page&cat_id=743&newqueryfromsearchhere

<form name="xmlsearch" action="<?echo page.php?><?echo $cat_id?>" method="GET">
Doesnt seem to work too well, it just does /pagephp

Hope that makes sense :)

Cheers.
Quote Reply
Re: [ryanvtwod] Global for page.php?do=page&cat_id=123 ? In reply to
Not sure about the first bit, but with;

<?echo page.php?><?echo $cat_id?>

Thats cos you are not putting the words/variables in quotes :p Try;

<?echo "page.php?cat_id=" . $cat_id?>

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Global for page.php?do=page&cat_id=123 ? In reply to
just tried it, but doesnt seem to like it, no errors or anything, but it just drops the do=page&cat_id=756

http://www.tourismsw.co.uk/...=page&cat_id=743

If you try searching on the main page area, it puts the search query in the url, but drops the do=page stuff, but if you copy/paste the do=page&cat_id=743&<search query here> it works, and thats what i'm after, if that makes any sense. :)

Cheers
Quote Reply
Re: [ryanvtwod] Global for page.php?do=page&cat_id=123 ? In reply to
And this doesn't work?

<?echo "$PHP_SELF?cat_id=" . $cat_id?>

?

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Global for page.php?do=page&cat_id=123 ? In reply to
nope, just ignores it. and doesnt echo it.

heres the paste code if it helps:
http://kunder.greit.no/...teID=507&pw=ryan

Cheers.
Quote Reply
Re: [ryanvtwod] Global for page.php?do=page&cat_id=123 ? In reply to
oh, and its the default_php, catagories template :)
Quote Reply
Re: [ryanvtwod] Global for page.php?do=page&cat_id=123 ? In reply to
So if you remove that pasted code, it works?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Global for page.php?do=page&cat_id=123 ? In reply to
umm? Thats the code from the catagories template, the xml is parsed through the header area, and retrieved through the content area.

line 149 is the form for the search.

Basicly, i need to keep that do=page&cat_id=123456 in the url for it to work, and no matter what i've tried it dies out, so no idea whats going on with it. got tonight and tommorow to get it 100% done and ready to move to live server :(

Cheers
Quote Reply
Re: [ryanvtwod] Global for page.php?do=page&cat_id=123 ? In reply to
Sorry, you've lost me. Maybe I need some sleep :|

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Global for page.php?do=page&cat_id=123 ? In reply to
heh,

well i've modified the if statements to include the form for the search (that search) which connects to mirago, if user uses it, it retrieves the xml from mirago and displays it where the current results are.

But on there, i've made it so that theres results on there by default (which i want).

This is done by having the php and xml code before the <html> stuff in catagories template.
Then, under the if statement for where the data is (past catagories) i have the search bit and the results. so it only displays this on that part , not under any of the catagories or anything.

what i want is to have page.php?do=page&cat_id=IDNumberofthecatagorycurrentlyIn&<Search query from mirago here>

The search query is already there if you try and search, but it ditches the ?do=page&cat_id=IDNumber and displays just the search query, i need to echo the ?do=page&cat_id=IDNumber in the result (forms action).

The pastecode is the whole template of the catagories template.
Hope that clears it up a bit heh.

Cheers