Jump to content

Clicking a PHP/Access link


contraboybish

Recommended Posts

OK l have a page called 'SEARCH', someone enters a word and a list of news items appear as below.

 

What l would like to do is click on one of the links and have it open in a new page called 'NEWS'

 

Somehow i need to build a simple form in the code below and have the 'sId' as the link name and on the 'NEWS' page use

the '$_POST' again to 'SELECT' the correct record.

 

Here is my code........

<?php
            require_once('../App_Data/odbc_open.php');                   
            $result = odbc_exec($odbc, "SELECT * FROM Search WHERE (sKeyword1 LIKE '%$_POST[item_search]%')");
                echo "Results For <b>$_POST[item_search]</b>";
            	echo "<table  width='910' border='0' align='center'>";
            while($row = odbc_fetch_array($result))
                {	
				echo '<tr style="text-align:justify">';
				echo '<td valign="top">';
				echo '<img src="../'.$row['sImages'].' "  width="'.$row['sImageWidth'].'" height="'.$row['sImageHeight'].'" alt="'.$row['sAlt'].'"hspace="8" vspace="8" align="right"/>';
				echo '<div><a href="'.$row['sId'].'" class="smallLinks" >   '.$row['sHeading'].'</a><br /></div>';
				echo '<div class="style2" style="text-align:justify">'.$row['sDescription'].'<br /></div>';
				echo '<div class="smalldate">Date: '.$row['sDate'].'</div>';
				echo '<br />';
				echo '</td>';
				echo '</tr>';
                }
			echo "</table>";				
            ?>

 

Any thoughts anyone....

 

Many Thanks

Link to comment
Share on other sites

On the site you search for a word and that brings up a list of different news reviews, at the moment, when you click on a link it brings up that news page.

 

http://www.logisticsbusiness.com/Magazine/search.aspx

 

I currently have thousands of News pages and all l want now is to open one e.g. 'NEWS.PHP' and have the data in the MS Access instead......

 

Hope this makes 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.