Posted by: Sourav | February 24, 2011

Sending data between two php pages


First page

<html>
<head>
<title>
Data transfer between two pages
</title>
</head>
<body>
<a href=”web2.php?name=sourav&id=42″>Second Page</a>

</body>
</html>

Second Page

<html>
<head>
<title>
Data transfer between two pages
</title>
</head>
<body>
<?php
print_r ($_GET);
$id=$_GET[‘id’];
$name=$_GET[‘name’];
echo “<br /><strong>”. $id . “:{$name}</strong>”;
?>
</body>
</html>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: