PDA

View Full Version : [Help Pls] PHP Help



Decode
24-09-2007, 02:45 PM
Im a noob at php, and i need to know how to make some data from 1 page link to the next without a submit button; This is what ive got so far;

Page1.html


<form methord="post" action="page2.html">
Name: <input type="name" value="" name="name">
<input type="submit" value="go!">
</form>


Page2.html


<head>
<meta http-equiv="refresh" content="5;page3.html">
</head>
<body>
<form methord="post" action="page3.html">
<input type="hidden" value="<?=$name?>">
</form>
</body>


Page3.html


<Body>
Hi <?=$name?>!
</body>


+Rep for help,

Tom

Moved by Mattps22004 (Forum Moderator) from Website Designing & Development: Please post in the correct forum next time, thanks :).

Tomm
24-09-2007, 03:01 PM
I don't recommend you use the <?=$name?> its very outdated.

However if you want to past infomation between pages then I recommend you use sessions.

redtom
24-09-2007, 03:11 PM
Wouldn't this do the same thing?

First page;



<form methord="post" action="page2.php">
Name: <input type="name" value="" name="name">
<input type="submit" value="go!">
</form>


Second page;



<?php
echo ("welcome $_POST[name]");
?>

Eccentric
24-09-2007, 03:53 PM
Just store it in cookies then when they sent the form delete the cookie :S

Want to hide these adverts? Register an account for free!