I have installed XAMPP in winXP, its works perfectly.......but the value of any veriable cann't be tranferred from one page to another page...e.g.

1.file1.php

<?php
print"<body><form action=file2php method=post>";
$p=42;
print"p=$p";
print"<input type=submit value=submit>";
print"</body>";
?>

2.file2.php

<?php
print"p=$p";
?>

when i run file1.php it prints the value of the veriable and the submit button on the browser.....but clicking the submit button it redirect to file2.php but no value is printed against p=

no error msg also not printed......

plz help me to solve this problem, without solving this I am not able to insert values in mysql.....

I want to print the value of the veriable of file1.php on file2.php...by clicking tjhe submit button...

file1.php

echo "<input type=\"hidden\" value=\"".$p."\"  name=\"p\">";

file2.php

echo $_POST['p'];

- Mitko Kostov

Thanx for reply.......but if u do a little more favour on me ......if u write the code as I've written i.e in my manner it will be more helpfull to me.........I'm new in PHP...

Thanx BOSS your code is running.....thank u so much.......

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.