954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Plz Verify this CODE........

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...

nil_gh_80
Junior Poster in Training
64 posts since Aug 2007
Reputation Points: 8
Solved Threads: 2
 

file1.php

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


file2.php

echo $_POST['p'];

-Mitko Kostov

MitkOK
Junior Poster
142 posts since Jul 2007
Reputation Points: 59
Solved Threads: 12
 

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...

nil_gh_80
Junior Poster in Training
64 posts since Aug 2007
Reputation Points: 8
Solved Threads: 2
 

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

nil_gh_80
Junior Poster in Training
64 posts since Aug 2007
Reputation Points: 8
Solved Threads: 2
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You