How can i execute a link in a php page

speechreagi1994

New Member
I have a test.php pagein this page , there is a url . i need to execute that url (here database updation is doing).This is my code\[code\]<?php$username ='testUsername';if($_GET['age']!=''){header('location:www.test.com/update.php?age='.$_GET['age'].'&username='.$username); //need to updatethe age of this username $show ='hello';}?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title></head><body><?php echo $show ?></body></html>\[/code\]i know this code is not going to work properly.How can i write in a good way.I donot want to redirect the page.I just need to execute that link
 
Back
Top