Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    New Coder
    Join Date
    Feb 2014
    Posts
    23
    Thanks
    3
    Thanked 0 Times in 0 Posts
    I created a http.conf.local file,
    AddDefaultCharset utf -8
    AddType image/jpeg .jpeg .jpg
    Accept-Language: cn
    and add this file in
    /etc/sysconfig/apache2
    .
    APACHE_CONF_INCLUDE_FILES="/etc/apache2/http.conf.local
    . But after the configuration, the error message(The character encoding was not declared...) still appears.

  2. #17
    New Coder
    Join Date
    Feb 2014
    Posts
    23
    Thanks
    3
    Thanked 0 Times in 0 Posts
    I changed the <form> from
    <form onsubmit='postdata()'>
    to
    <form onsubmit='postdata(); return false;'
    . After the modification, the error message disappears but the data can not insert into the database.
    Last edited by jianmarf; 05-14-2014 at 10:13 PM.

  3. #18
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,302
    Thanks
    13
    Thanked 345 Times in 341 Posts
    the return false prevents form submission and hence calling your PHP script (that produces the error).
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer

  4. #19
    New Coder
    Join Date
    Feb 2014
    Posts
    23
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thanks for your reply.


 
Page 2 of 2 FirstFirst 12

Posting Permissions

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