Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003

    how to hold form value using php

    I write small blog web application.

    when user submit new post, it validates the post, check everything on the server side, not client side.

    this cause the problem, for example, if user types wrong verification code, it sends the error message back and get back to form page. but all the values are gone.

    if user type long article, gonna get pissed to type it again. I want to hold the value for user,but dont really know how to do it.

    let me know where I can find example .

    i search on google, " how to hold form value using php", probably this is not correct way to ask, didn't get any useful info.

  2. #2
    you have the value, it's just that you're not displaying it :
    some form code
    <textarea><?php if ($article!=''){echo $article;}?></textarea>
    note that this is just an example, and it needs further improvement
    Cheap web hosting
    Any CMS pre-installed
    Joomla Hosting

  3. #3
    Join Date
    May 2002
    Kansas City, USA
    You could also load it into a Session variable.

    Code for Processing page.


    You just have to make sure that on your form page you have the following, so that the form page can access the Session Variable.

    // start the session
    header("Cache-control: private"); //IE 6 Fix
    Midwest Dedicated
    Content Management Solutions, Design, Managed Servers
    Providing the highest quality IT services since 1999.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts