Form Submittions without refresh?

Discussion in 'Programming' started by encom, Jul 10, 2009.

  1. #1
    Hi, I want to create a comment system. I would like the comment system to not refresh the page like what I have seen on sites like facebook etc...

    Could you point me in the right direction...
    Are there any tutorials on the web for this sort of thing?

    I am already using PHP and HTML/CSS.

    Thanks in advance,
    Grant
     
    encom, Jul 10, 2009 IP
  2. Dirty-Rockstar

    Dirty-Rockstar Guest

    Messages:
    252
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    not to refresh the same page? simply point the forum to another page or use cases to give a "request submitted" sentence. I'm not quite sure on your question. you do not want the form posts public?
     
    Dirty-Rockstar, Jul 10, 2009 IP
  3. ThePHPMaster

    ThePHPMaster Well-Known Member

    Messages:
    737
    Likes Received:
    52
    Best Answers:
    33
    Trophy Points:
    150
    #3
    You can use PHP header function to redirect to another page after the POST.
     
    ThePHPMaster, Jul 11, 2009 IP
  4. techbongo

    techbongo Active Member

    Messages:
    309
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    80
    #4
    I understand what you mean. Infact this is one of the latest demands of clients for their websites.
    You need AJAX. Start learning AJAX (Ashynchronous Javascript And XML) from W3Schools. You need to use Ajax for creating forms, which is processed without a page reload (you made a mistake in the post, the exact term here is 'reload', not 'refresh').
    These links contain specific reference for form processing with AJAX, but you can get more AJAX tutorials elsewhere.
    http://www.developertutorials.com/tutorials/ajax/ajax-and-php-form-processing-8-01-09/page1.html
    http://enhance.qd-creative.co.uk/2008/06/20/ajax-contact-form/
    http://www.captain.at/howto-ajax-form-post-request.php
    http://www.dustindiaz.com/ajax-contact-form/
     
    techbongo, Jul 12, 2009 IP
  5. encom

    encom Member

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #5
    Thank you soo much. that is perfect. Sorry about my unclear question. Its pretty hard to explain.

    Once again, thanks.
     
    encom, Jul 14, 2009 IP