Stupid question I'm sure but I can't figure it out.

    Date: 08/25/05 (PHP Community)    Keywords: php

    Hi all,

    I'm having a problem understand when PHP code involving forms is actually run. I have this:

    Text file because I can't figure out how to post code without it parsing sdfasdfasdf


    I realize there are probably a gross amount of mistakes and formatting issues in there anyway, and feel free to comment on those as well (otherwise I'll never learn this shit), but my main problem is that the if submitted part doesn't work. It just executes the script every time someone opens the god damn page, which is a problem because then it's just firing off blank emails. Can someone here help me understand how to get PHP code to be used ONLY when a form is submitted, or when a variable test is used like I've used it? Maybe I'm not clearing the POST variables or something, or I should use SESSIONs, but I just don't know here. >_<

    Thanks in advance!

    Source: http://www.livejournal.com/community/php/339229.html

« Upload File Code Problems... || Sorting an array »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home