Page 1 of 1

Creating Link

Posted: Mon Jan 29, 2007 6:11 am
by pkvasan
Hi

I am taking out data from MySql like Id , Name, Address, Age, City, Remark and displaying on an HTML table, now i want one of the field that is remark field to have hyperlink and on clicking the hyperlink remarks stored in another DB should be displayed.

Please help me in giving some idea on how to do this.

-/Kirthi

Posted: Mon Jan 29, 2007 6:38 am
by louie35
is there a relation between the tables like ID?
if yes pass it over by query string.

Posted: Mon Jan 29, 2007 7:21 am
by dude81
I came across the same situation once when I was beginning of PHP.

On user clicking the link, your link should be of this form

Code: Select all

http://yourlink.com/purephpfile.php?variable1=value1&variable2=value2.. and so on.
Build a pure php file with no spaces or echo messages in which on receiving this values collect the values and store it in db and use another header function for going back to your original php page.

Code: Select all

<?php
//purephpfile.php
if((isset($_REQUEST['variable1']))&& (isset($_REQUEST['variable2']))){
//collect the variables here
//store it in db
header('Location:youroriginalviewpage.php');
}
?>
.
I hope this could be useful.

Well Im not talking about any security conditions here.