Help I'm having trouble on passing value to another page, I'm using PHP. My goal is when i click a link it will move to another page and the value of that link will be received by the other page. make sense? can someone help me with this? thanks..

Eg.

<html>
<body>
<a href="test.php?id=1">Click here </a>
</body>
</html>
<?php
//test.php
$id = $_REQUEST['id'];
echo $id;
?>

easy ?

Thanks Man!.. I'll try this when I get home..

you can use this way.

<html>
<head>

</head>
<body>
<form action="verify.php" method="post"><input type="text" id="Pword"  name="Pword"/><input type="submit" /></form>
</body>
</html>
<?php
 
	$var_inputPassword = $_POST["Pword"];
	echo($var_inputPassword);
?>

Use nav33n's method if it's a simple link and you don't mind the end user seeing the variable (and possibly changing it) but use $_GET instead of $_REQUEST.

Use catherine sea's example if it's a form you're using to get input from the user.

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.