synted Posted February 29, 2008 Share Posted February 29, 2008 I need to write some code so when pressing a button i will fill multiple textfields in a page automaticly based on some requests. For example i would like to file the first 5 textfields with the letter a the next two with the letter b and the next 5 with the letter c. Any ideas? Quote Link to comment Share on other sites More sharing options...
Lashiec Posted February 29, 2008 Share Posted February 29, 2008 something like... <form method="post" action=""> <input type="text" name="whatever" value="<?=var1?>" /> <input type="submit" name="submit" /> </form> At the top of the page do something like: if(isset($_POST['submit'])) { $var1 = 'a'; } In the form above the value for the input text field will be filled in with the 'a' from $var1. Quote Link to comment Share on other sites More sharing options...
synted Posted February 29, 2008 Author Share Posted February 29, 2008 Thank you for that. Now i want to make it more complex. I have some persons. Lets say 2. NameA and NameB. I have a monthly plan for them and which hours they can work. I have their requests for the shifts that they can not work. So i want to use the fill button for both of them on a monthly view so it can fill my database with the days and shifts they can work. Is it possible? I am stuck and can't think anything to help me move on. 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.