Mohsin Posted August 10, 2012 Report Share Posted August 10, 2012 hi to all!!! i have the code in the following: i have index.php <html> <head> </head> <body> <form action="form.php" method="post" name="form"> enter your name<input type="text" name="txt" /> <input type="submit" value="1" name="submit" /> </form> </body> </html> i have form.php <?php class myclass { public function abc(){ $name = $_POST['txt']; echo 'you have enter name:'.$name; echo 'do you want to edit it <a href="edit.php">click here</a>'; } } $obj = new myclass(); $obj1 = $_POST['submit']; if($obj1){ $obj->abc();} ?> and in the end i have edit.php <html> <head> </head> <body> <form action="form.php" method="post" name="form"> enter your name<input type="text" name="txt" value="<?php echo $name;?>" /> <input type="submit" value="1" name="submit" /> </form> </body> </html> the problem is i want to create the edit option if the user have enter the wrong information is there anyone to help me !!!! thnx in advance Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.