Hello Guyz i m totaly new in php
i m trying to do it any one help me out
i m not using any SQL... i juz want to put my user name in 3rd page...
like i have 3 pages... in ist page i juz enter any dummy user name in LOGIN.PHP... and i sumbit the page then next page comes.. Form.php here i will find the registration page.... when i sumbit the registration page then next page come where i have to print that user name which i have enter in LOGIN.PHP
so plz any one help me out... how it can b.... and how can i use $_REQUEST variable in this prgoram.... plz plz help me out....
waiting for hopefull response
SaQib
Please Any One Help Me ?
Moderator: General Moderators
well you could always set a cookie or a session. Which is pretty basic.
If you want to stick with the form $_POST (is that the same as $_REQUEST) sort of thing you could jsut take the values and stick them into a hidden form element on your validation page, then submit that again with some javascript.
Personally I think your way better off with setting a cookie. Then all you'd have to do is go
print $_COOKIE['username']; on any page you want and it would hold yur username.
You should consider reading up on stateless protocals its pretty fascinating what some people have created with the way the web works.
If you want to stick with the form $_POST (is that the same as $_REQUEST) sort of thing you could jsut take the values and stick them into a hidden form element on your validation page, then submit that again with some javascript.
Personally I think your way better off with setting a cookie. Then all you'd have to do is go
print $_COOKIE['username']; on any page you want and it would hold yur username.
You should consider reading up on stateless protocals its pretty fascinating what some people have created with the way the web works.
- Maugrim_The_Reaper
- DevNet Master
- Posts: 2704
- Joined: Tue Nov 02, 2004 5:43 am
- Location: Ireland
Guyz thnx for reply...
let me tell u my code. than u can better understand my question
my question was differentttttt i want to work only with $_REQUEST
let me tell u my code
here is the code of LOGIN.PHP
<html>
<body>
<form action = values.php method="post">
User Name:<Br><input name="username" type="text" /><Br>
<input type="submit" name="submit" value="Submit me!" />
</form>
</body>
</html>
NOW Hher is the code of VALUES.PHP
<html>
<body>
<form action = request.php method="post">
Name:<Br><input name="name" type="text" /><Br>
Age:<Br><input name="age" type="text" /><Br>
Location:<Br><input name="loc" type="text" /><Br>
Address:<Br><input name="add" type="text" /><Br>
<input type="submit" name="submit" value="Submit me!" />
</form>
</body>
</html>
NOW I Want when i sumbit values.php page then on request.php where i
find that value which i have enter in LOGIN.PHP
got it ?
so plz help me out
i wanaa display there plz plz
WAITINg for hopefull repsone
SaQib
let me tell u my code. than u can better understand my question
my question was differentttttt i want to work only with $_REQUEST
let me tell u my code
here is the code of LOGIN.PHP
<html>
<body>
<form action = values.php method="post">
User Name:<Br><input name="username" type="text" /><Br>
<input type="submit" name="submit" value="Submit me!" />
</form>
</body>
</html>
NOW Hher is the code of VALUES.PHP
<html>
<body>
<form action = request.php method="post">
Name:<Br><input name="name" type="text" /><Br>
Age:<Br><input name="age" type="text" /><Br>
Location:<Br><input name="loc" type="text" /><Br>
Address:<Br><input name="add" type="text" /><Br>
<input type="submit" name="submit" value="Submit me!" />
</form>
</body>
</html>
NOW I Want when i sumbit values.php page then on request.php where i
find that value which i have enter in LOGIN.PHP
got it ?
so plz help me out
i wanaa display there plz plz
WAITINg for hopefull repsone
SaQib
- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
values.php
then request.php will have $_POST['username'] as the username that was entered at first. but you are not dealing with just request here, this is all POST and you should just use POST if you are only dealing with it, will make your life a heck of a lot easier later on.
ps. please use CODE tags when nessicary. Also, please use complete words and try to spell things at least somewhat correct.
Code: Select all
<html>
<body>
<form action = request.php method="post">
<input type="hiden" name="username" value="<?= $_POST['username'] ?>">
Name:<Br><input name="name" type="text" /><Br>
Age:<Br><input name="age" type="text" /><Br>
Location:<Br><input name="loc" type="text" /><Br>
Address:<Br><input name="add" type="text" /><Br>
<input type="submit" name="submit" value="Submit me!" />
</form>
</body>
</html>ps. please use CODE tags when nessicary. Also, please use complete words and try to spell things at least somewhat correct.