0

Hello,

I am new to php and here i have index.php with two portions.
1.portion: with two textbox with search button
2.portion: with three textbox with search buttons again.
when i click one search button it's filling the data.
but when i click the second button,1.portion textbox's values are not getting.
i have mysql db with the process.php

Edited by balu_veer

3
Contributors
3
Replies
21
Views
2 Years
Discussion Span
Last Post by James singizi
-1
<html>
<head>
</head>
<body>
firstname:<input type="text" name="txtfirstname"/>
<input type="submit" name="btnGetfirstname"/><br>
loginname:<input type="text" name="txtloginname"/>
<input type="submit" name="btnGetloginname"/>
<br><input type="submit" name="save" value="saveall"/>
</body>
</html>


this is my html code when i click firstbuton,i need to go to other page(registration.php)get it firstname from registration process
when i click secondbutton,i need to go other page(login.php) get it loginname  from login process.
and finally save into otherpage.
Votes + Comments
"Show your code" means show it all. This is just being awkward.
0

one way you can do this is by seperating the two portions in to two different forms and give the forms an action attribute. for the first form it would be registration.php and for the other it would be login.php. on the pages registration.php and login.php you can put code to manipulate the details for example you would say:
$username =$_POST['txtusername'];
echo $username;

this would print the entered username. make sure the form's method is post

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.