zanzibar Posted January 12, 2009 Share Posted January 12, 2009 I'm a not a php programmer, and I have run into a problem. I want a form to retain the data so that the same users don't have to fill it out every single time they to back. I found a great .js for that worked with my html form <input name="first_name" type="text" id="first_name" class="memorize" size="50" maxlength="50" >, but we now have a new php form where we do not uses <input name= ..... etc. We now have two .php doc that looks like this (one is sent to email and the other to a database): <script language="php"> Include ("../shared/contact_data.inc"); CreateTextRow("First Name", "first_name", 3, 56, true); CreateTextRow("Last Name", "last_name", 3, 56, true); and so forth in one doc. and this in another: <script language="php"> Include ("../shared/contact_data.inc"); $information=""; $error=""; $salutation = CheckAndSet ("salutation", "salutation", "Salutation: ", "", FALSE ); $first_name = CheckAndSet ("first_name","first_name", "First Name: ", "You must provide your first name.", TRUE ); Can I use that same .js script by adding some code to either one of those forms? or is there a simple php script that I can use to do the same (recall users form input)? Unfortunately I don't know hardly any php so I would appreciate your help !!! THANKS Quote Link to comment Share on other sites More sharing options...
Psycho Posted January 12, 2009 Share Posted January 12, 2009 There is no way for us to answer your question. This: CreateTextRow("First Name", "first_name", 3, 56, true); appears to be a function that takes 5 parameters and creates a text field. I assume the first parameter is the label, the second is the field name. For the other three I have no idea. It would be best to handle the "persistent" data in PHP. But, you could probably take a look at that function and find a way to add a 6th parameter that would add class="memorize" within the function. 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.