how to get the last dynamic searches in index page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sathya
Forum Commoner
Posts: 72
Joined: Sat Dec 12, 2015 7:26 am
Contact:

how to get the last dynamic searches in index page

Post by sathya »

Hi All,

I want the logic only for my below doubts.

1.I have two pages in my website one is index.php having one text box inside the page. and the next one is livetrainstatus.php

2.when people come to my site they will land in index page like www.example.com/index.php and if they search a train the query will form like www.example.com/livetrainstatus.php?=trainnumber then the dynamic page will be displayed and produced the result as trainnumber currently started

3.in my home page I want to display the last searched queries like trainnumber started.

4.how to get the last searched queries and pass it to index page except the 404 page.

If u have any doubts post me

Thanks
Sathya
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: how to get the last dynamic searches in index page

Post by Celauran »

Store them in a database as they come in, query the database to display them on your home page.
sathya
Forum Commoner
Posts: 72
Joined: Sat Dec 12, 2015 7:26 am
Contact:

Re: how to get the last dynamic searches in index page

Post by sathya »

But the results I am getting is live results from indian railways.I can't save for each query.is there any other alternative way to get that?
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: how to get the last dynamic searches in index page

Post by Celauran »

You want to display the last queries on your website? Easy peasy. You want to display the last queries on some other website? Unless they expose that information via API, that's not going to work.
sathya
Forum Commoner
Posts: 72
Joined: Sat Dec 12, 2015 7:26 am
Contact:

Re: how to get the last dynamic searches in index page

Post by sathya »

I want the last queries in my website.I can get all the information train current status via api only in the second page
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: how to get the last dynamic searches in index page

Post by Celauran »

Then do as I said above. Shouldn't be difficult at all.
sathya
Forum Commoner
Posts: 72
Joined: Sat Dec 12, 2015 7:26 am
Contact:

Re: how to get the last dynamic searches in index page

Post by sathya »

Ok thanks
Post Reply