Need Help With a Script

Discussion in 'PHP' started by tfusion, Apr 12, 2007.

  1. #1
    I am developing this site: http://www.goldwriters.info and i need a script for the ordering page (http://www.goldwriters.info/order.php), I planned on making a mailing form to receive the customer application. I have the script file, made by me... but unfortunately its not showing, you may think i didnt include it in order.php but i did with this:
    <?php
    include "mailform.php";
    ?>
    PHP:
    Any help is appreciated, if you have any other idea on the ordering system, tell me please :)
    I uploaded the two files so you can check them with time.
    Thanks
     

    Attached Files:

    tfusion, Apr 12, 2007 IP
  2. minute

    minute Peon

    Messages:
    443
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #2
    i dunno, should you have headers on the mailform. If you include that in the page you now have two sets of headers, you don't need the headers I don't think twice, the include should just be the html and php required to display the form.
     
    minute, Apr 13, 2007 IP
  3. tfusion

    tfusion Peon

    Messages:
    566
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    0
    #3
    No it isnt... I just dont know whats wrong with it because its not showing the form...
     
    tfusion, Apr 14, 2007 IP
  4. SilkySmooth

    SilkySmooth Well-Known Member

    Messages:
    1,583
    Likes Received:
    269
    Best Answers:
    0
    Trophy Points:
    180
    #4
    Hi,

    It is not showing the form because the script is running in a never ending loop, did you not notice that the order page never stops loading???

    At the moment your order form loads and requests mailform.php, this then runs through the error check on line 18, the error check fails which re-includes the mailform.php and so on and so on and so on.

    You need to perform error checking AFTER you have validated that the form has been submitted. If the form wasn't submitted why error check?
     
    SilkySmooth, Apr 14, 2007 IP
  5. tfusion

    tfusion Peon

    Messages:
    566
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    0
    #5
    :O ... True... Thanks bro!!! That was why... ill try and give notices of it. Thanks
     
    tfusion, Apr 14, 2007 IP
  6. tfusion

    tfusion Peon

    Messages:
    566
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Yay!! Its showing now... the only problem is that it doesnt stop... i mean, it wont stop loading the mailform.php... means that there will load infinite times...
     
    tfusion, Apr 14, 2007 IP