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
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?

 

Link to comment
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.