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

Recommended Answers

All 3 Replies

plz send ur code..

<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.
commented: "Show your code" means show it all. This is just being awkward. -1
Member Avatar for James singizi

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

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.