DrTrans Posted November 4, 2011 Share Posted November 4, 2011 What i wan to do, and what i can't figure out is something simple. I want to take a button, <a href="" class="button">Add Prop </a> and then i want it to go to a sub class i have that does something like Example:. print "<html><input type="text" name="text"> </html> " Can someone provide an example on how to make this work? or should i create a separate php file with the form inside of it and just link it.. Quote Link to comment https://forums.phpfreaks.com/topic/250452-button-to-class/ Share on other sites More sharing options...
ddubs Posted November 4, 2011 Share Posted November 4, 2011 To clarify, are you trying to dynamically add input fields to a form? If so, this is better left to client side scripting (Javascript) that can manipulate the browser session with out having to call back to the server. Remember that php is server side so while you can make it work, it will probably be quite the kludge, especially if you want to remember something the user already typed in the form. Quote Link to comment https://forums.phpfreaks.com/topic/250452-button-to-class/#findComment-1285021 Share on other sites More sharing options...
DrTrans Posted November 4, 2011 Author Share Posted November 4, 2011 Nope, i just want to basically have a button that when u click it, It pops up a form they fill out when it hits submits it writes to mysql database and closes the form. Im using JQuery on the main page to reload the query so the record shows in the table. Quote Link to comment https://forums.phpfreaks.com/topic/250452-button-to-class/#findComment-1285057 Share on other sites More sharing options...
DrTrans Posted November 4, 2011 Author Share Posted November 4, 2011 I think the clearer response should be, When you click a button, the browser fades and pulls up a form like an applet. fill the form out, hit submit, and then u see the record on the original page ( using jQuery). This might be more for the javascript forums. Quote Link to comment https://forums.phpfreaks.com/topic/250452-button-to-class/#findComment-1285059 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.