This topic is locked

Grab & Save an URL

6/21/2010 8:57:55 AM
PHPRunner General questions
N
netmedia59 author

Hello,
Is there a way to grab an URL and save it straight in the DB

Ex

I have a DB (links) with the fields :

Num

Url

Date
I want to save an URL straight in the DB

Ex my url is

http://www.phpruner.com/index.htm'>http://www.gaga.com/links_add.php?Url=http://www.phpruner.com/index.htm
So, I want to save : http://www.phpruner.com/index.htm

in the Url field of my DB !
Thanks
Olivier

Lille (FRANCE)

Sergey Kornilov admin 6/21/2010

I guess you need to implement BeforeProcess event of the Add page.
Here is the sample code.

if ($_REQUEST["Url"])

{

$sql = "insert into links (URL) values ('" . $_REQUEST["Url"] "')";

CustomQuery($sql);

echo "Link added";

}