Jump to content

Recommended Posts

Hello all,


Please bare with me as I try to explain my issue with very weak terminology. Well, I'm using Dreamweaver to create a database that uses PHP & MySQL. Currently, I'm working on a page that inserts user entered data from a form into my database. Upon clicking insert, MySQL will reject the data if a field is null, not in correct format, etc. So, when the user returns to the previous page to correct the error all the information previously entered is now gone.


I'm not quite sure what to use so that the user entered information will be "remembered". I was thinking Javascript, but really couldn't find anything. Does Dreamweaver have something I can use? Possibly a cookie? I really have no idea and that is why I'm asking for help. If someone could even provide me with the correct terminology so I could do further research that would be very helpful. Thanks!



Link to post
Share on other sites

What version of Dreamweaver are you using, CS3?

If so you can use the Spry widgets for form validation. This will prevent the form from processing until all field requirements are met, eliminating any need to go back.

Link to post
Share on other sites
  • 1 month later...

if you are posting to the same page then why not use the $_POST array to repopulate the fields





><form action="thispage.php" method="post">

<input type="text" name="whatever" value="<?php echo (isset($_POST['whatever']) ? $_POST['whatever'] : ''); ?>" />

<input type="submit" name="insert" value="Insert" />



This will repopulate the 'whatever' field with the value that was entered before the user clicked 'Insert' and it will leave the fields blank when the form is loaded for the first time (i.e. when the post array is empty)



edit: sorry if this is an old thread i replied then saw the date.

Edited by OJB
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...