Need Urgent help...

Thread Solved

Join Date: Jul 2008
Posts: 1,073
Reputation: Shanti Chepuru is on a distinguished road 
Solved Threads: 98
Shanti Chepuru's Avatar
Shanti Chepuru Shanti Chepuru is offline Offline
Veteran Poster

Need Urgent help...

 
0
  #1
Jul 10th, 2008
I have printed questions on faq.php...
when click on that question it will go to faqview.php
In that faqview.php , i want to print my previous viewd question...

Can any one help me out...
Help is urgent...
Thanks..
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,073
Reputation: Shanti Chepuru is on a distinguished road 
Solved Threads: 98
Shanti Chepuru's Avatar
Shanti Chepuru Shanti Chepuru is offline Offline
Veteran Poster

Re: Need Urgent help...

 
0
  #2
Jul 10th, 2008
Hey i tried this :
  1. if(!empty($_GET['nid']))
  2. {
  3. session_unregister();
  4. session_register();
  5. $_SESSION['prev'].=$_GET['nid'];
  6. $_SESSION['prev'].=",";
  7. print_r($_SESSION['prev']);
  8. }

I got the answer correctly..
But any other thougts with out sessions...will be appreciated..
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 849
Reputation: R0bb0b is on a distinguished road 
Solved Threads: 67
R0bb0b's Avatar
R0bb0b R0bb0b is offline Offline
Practically a Posting Shark

Re: Need Urgent help...

 
0
  #3
Jul 10th, 2008
faq.php
  1. <a href="faqview.php?faqpk=12">FAQ Title</a>

faqview.php
  1. <?
  2. if(!is_numeric($_GET['faqpk']))
  3. {
  4. header("location: faq.php");
  5. exit();
  6. }
  7.  
  8. $faqpk = $_GET['faqpk'];
  9. $query = "select title, description from faq where faqpk = " . $faqpk;
  10. $result = mysql_query($query);
  11.  
  12. while ($row = mysql_fetch_assoc($result)) {
  13. echo "<p>".$row["title"]."</p>";
  14. echo "<p>".$row["description"]."</p>";
  15. }
  16. ?>
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss

-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,073
Reputation: Shanti Chepuru is on a distinguished road 
Solved Threads: 98
Shanti Chepuru's Avatar
Shanti Chepuru Shanti Chepuru is offline Offline
Veteran Poster

Re: Need Urgent help...

 
0
  #4
Jul 10th, 2008
Thanks...
And i want to print four previously viewed questions ...
Than what should i do..
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 849
Reputation: R0bb0b is on a distinguished road 
Solved Threads: 67
R0bb0b's Avatar
R0bb0b R0bb0b is offline Offline
Practically a Posting Shark

Re: Need Urgent help...

 
0
  #5
Jul 10th, 2008
Originally Posted by Shanti Chepuru View Post
previous viewd question
I don't understand. Can you explain further?
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss

-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,073
Reputation: Shanti Chepuru is on a distinguished road 
Solved Threads: 98
Shanti Chepuru's Avatar
Shanti Chepuru Shanti Chepuru is offline Offline
Veteran Poster

Re: Need Urgent help...

 
0
  #6
Jul 10th, 2008
sorry for my grammitical mistakes...
I want to print four or more previously viewed questions on my faqview.php

Thanks...
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,073
Reputation: Shanti Chepuru is on a distinguished road 
Solved Threads: 98
Shanti Chepuru's Avatar
Shanti Chepuru Shanti Chepuru is offline Offline
Veteran Poster

Re: Need Urgent help...

 
0
  #7
Jul 10th, 2008
ya,exactly....
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 849
Reputation: R0bb0b is on a distinguished road 
Solved Threads: 67
R0bb0b's Avatar
R0bb0b R0bb0b is offline Offline
Practically a Posting Shark

Re: Need Urgent help...

 
0
  #8
Jul 10th, 2008
All the questions that you've viewed up to this point?
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss

-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,760
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 332
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: Need Urgent help...

 
0
  #9
Jul 10th, 2008
Have an array, put the question numbers (or ids) you have viewed in the array. Keep the array in the session. Display last 4 questions using the last 4 indexes of the array.
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,073
Reputation: Shanti Chepuru is on a distinguished road 
Solved Threads: 98
Shanti Chepuru's Avatar
Shanti Chepuru Shanti Chepuru is offline Offline
Veteran Poster

Re: Need Urgent help...

 
0
  #10
Jul 10th, 2008
Yes Nav...
I also did like that ,i got..
But i want it with out sessions...
If any thought ,Please Tel me...
Thank you...
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC