Jump to content

use results from db search in new file


Bazzaah

Recommended Posts

Hi

 

I have a small problem and would be grateful for some help please.

 

I've been working on an audio dictionary.

 

The dictionary contains a search function;

 

$result = mysql_query("SELECT word,sentence1 FROM pro_words WHERE word LIKE '%$search%'");

 

The results from the search are displayed as links to a new file.

 

echo '<tr><td align="left"><a href="word.php?w=' . $r['word'] . '">' . $r['word'] . '</a></td></tr>';

 

Is there a way I can get the file word.php to include other information from the database entry, for example sentence1?

 

I've been puzzling over this and haven't found a way to make it work, even though it seems like it should be straightforward.

 

Hope the question is clear and thanks in advance for any help.

Link to comment
https://forums.phpfreaks.com/topic/199962-use-results-from-db-search-in-new-file/
Share on other sites

psuedo code

 

start sessions

do the search (presuming only one record returned)

put the results (the field contents) into session variables

link to the new page

---

(new page)

start sessions

get the session variables

display as you choose

 

 

make sense?

 

Archived

This topic is now archived and is closed to further replies.

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