Results 1 to 2 of 2

Thread: executing php on same page on form submit

  1. #1
    Join Date
    Jun 2010
    Posts
    243

    executing php on same page on form submit

    i want to combine the submit page with the form page, but it gives an error, which i don't want the script to run until it is called upon... how would i do this?

    thanks!

    code.txt

  2. #2
    Join Date
    Nov 2009
    Posts
    27
    If I understand you correctly then you should be able to put something like this at the top of the PHP script:

    if (isset($_POST['doLogin'])){
    }

    include all the code you only want run after form submission within the if clause. This should check whether the login button has been pressed

Similar Threads

  1. PHP form submit problem
    By simononestop in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 15 Jun 2009, 10:42 PM
  2. executing php code in a string
    By Littlened in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 13 Jul 2006, 10:48 AM

Posting Permissions

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