Jump to content

[SOLVED] Put block of html page lookup numbers into search script input


HowdeeDoodee

Recommended Posts

My web pages have alpha numeric lookup codes. Currently, the user has to copy the numbers and paste the numbers into a search box and click on the query button. Is there any way, other than turning the block into html hyperlinks, of getting the lookup codes into a php form input box or text box and initiating the search without copying and pasting?

 

Example:

pen 124:22 ; joyce 3:1 ; twice 888888:1233 ; rip 999:777

Link to comment
Share on other sites

im not sure what you want to do, but i will try.

 

if you are looking for a dropdown box method (which i wouldnt suggest considering how large it could get), then you would have to dynamically fill the options list and make an on select trigger that would redirect you to the next page.

 

however, if you just want to paste the code in and go without clicking a button, you could use the "onchange" event to trigger a peice of script that would redirect you to the entered page.

 

 

i still dont get why you would want to do this though... the query button is fine.

Link to comment
Share on other sites

I did not explain well, it must be the heat. OK, let's try this another way. Let's say the lookup codes are Bible references, like Gen. 4:22; Exodus 1:12; Lev. 3:11

 

On any given record there are hundreds of these references. I want the user to be able to click on a link or a button next to each group of references. Currently, there is no button and no link in the record. What I want is for the user to be able to click on the link or the button so another program will grab the referenes and paste the references into a lookup script. The lookup script will then display the actual text of the verses instead of just the references. The lookup script calls another program to display the text.

 

 

Link to comment
Share on other sites

try

<?php

//draw a table this is an example of a link
$ref[0] = "gen 1:12";
$ref[1] = "exd 2:31";
foreach($ref as $value){
<a href=\"www.serch.php?critera=".$value."\">".$value."</a>
}
//on search page
$critera = $_GET['critera'];
$q = "SELECT FROM Table Where Ref = '$critera'";
?>

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.