hi,

print "<tr><td><b>click</b></td><td><a href=test.php?id=$id&code=$pcode&name=$pname&section=$psection target=\"_blank\">Click</a></td></tr>";

I am passing all the values to test.php through hyperlink.

Problem is:
I can able to get only id and code.

$pid=$_REQUEST; // values getting
$pcode=$_REQUEST; //values getting
$pname=$_REQUEST; // values not getting
$psection=$_REQUEST; // values not getting

I don't know to find what mistake am doing ? Am getting all the values from the

home page

correctly and am not able to send all the values to the

test.php page

. Thanks.

It may seem obvious but have you verified that you actually have data for those other fields. I suggest that you dump all of the values before the print just to be sure.

After trying your code, the only issue I found was here:

$psection=$_REQUEST['section];

Should be:

$psection=$_REQUEST['section'];

;

My test files:
'links_to_pass.php'

<?php
$id = '1';
$pcode = 'pcode';
$pname = 'pname';
$psection = 'psection';
echo "<tr><td><b>click</b></td><td>
<a href=test.php?id=$id&code=$pcode&name=$pname&section=$psection target=\"_blank\">Click</a></td></tr>";
?>

'test.php'

<?php
$pid=$_REQUEST['id']; // values getting
$pcode=$_REQUEST['code']; //values getting
$pname=$_REQUEST['name']; // values not getting
$psection=$_REQUEST['section']; // values not getting

echo "$pid \n";
echo "$pcode \n";
echo "$pname \n";
echo "$psection \n";
?>

No problems for me. Good luck.

hi,

print "<tr><td><b>click</b></td><td><a href=test.php?id=$id&code=$pcode&name=$pname&section=$psection target=\"_blank\">Click</a></td></tr>";

I am passing all the values to test.php through hyperlink.

Problem is:
I can able to get only id and code.

$pid=$_REQUEST; // values getting
$pcode=$_REQUEST; //values getting
$pname=$_REQUEST; // values not getting
$psection=$_REQUEST; // values not getting

I don't know to find what mistake am doing ? Am getting all the values from the

home page

correctly and am not able to send all the values to the

test.php page

. Thanks.

Hii,Jack ,check this code :

echo "<tr><td><b>click</b></td><td><a href=test.php?id=".$id."&code=".$pcode."&name=".$pname."&section=".$psection." target=\"_blank\">Click</a></td></tr>";

and recive this vaiables in test.php by default array $_GET:

<?php
$pid=$_GET['id']; // values getting
$pcode=$__GET['code']; //values getting
$pname=$_GET['name']; // values not getting
$psection=$_GET['section']; // values not getting

echo "$pid \n";
echo "$pcode \n";
echo "$pname \n";
echo "$psection \n";
?>
Member Avatar for diafol

if using method="post" in the form tag:

print_r($_POST);

otherwise

print_r($_GET);

You probably want to avoid using $_REQUEST.

Hiiiii,the hyperlink using GET method by default.For that ,you have to use $_GET ...
it's tested ...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.