View Full Version : Newbie help needed

10-16-2011, 11:00 AM
Hello every1 i need some help in developing a script,please pardon me if i commit any mistake.
I am trying to make a script and help me load a webpage in am iframe (html5 attributes ), i can make page manually too but if i ever want to change the link i will have to re-write the coding part.

So i basically want is like this, i make a database table with columns ->s.no; linkcode; link;
and i want a script, example point.php.
such that when i enter a link like below

It reads the xxxxxx part and searches the database under linkcode column and then take the link of the same row and load it into the ifame.

Old Pedant
10-16-2011, 11:30 PM
I don't use PHP, but it will be something along these lines:

$link = $_GET["hash"];
$sql = "SELECT linkcode FROM tablename WHERE link = '$link'";
$result = mysql_query($sql) or die();
$row = mysql_fetch_array($result)
echo '<iframe id="whatever" src="' . $row[0] . '"></iframe>';

10-17-2011, 05:27 AM
Thanks a lot bro,i only needed a skeleton to manipulate and this code is the best i can think of, i have not tested it yet but i am sure it will work.

Thanks a very lot.