SirChick Posted August 17, 2007 Share Posted August 17, 2007 Is there a way to check if a script like this i working: <form name="" method="POST" action="" enctype="text/plain" id="Form1"> <input type="submit" id="Button1" name="DoCrime" value="Do Crime" style="position:absolute;left:36px;top:56px;width:75px;height:24px;z-index:0"> <? if (isset($_POST['DoCrime'])) { include('UnderBridgeCrimeScript.php'); } ?> because the script "underbridgecrimescript" works on its own.. but not when included so im thinking its related to this include. Im unsure where the fault lies in this ^ :S Quote Link to comment Share on other sites More sharing options...
Orio Posted August 17, 2007 Share Posted August 17, 2007 I really don't understand the question. Your script shows a form, and if submit was pressed it also includes another php file. Orio. Quote Link to comment Share on other sites More sharing options...
SirChick Posted August 17, 2007 Author Share Posted August 17, 2007 yeh the included file creates a variable ... lets say "$test" now back in the main script that has the form ^ i then have: <?= $test ?> but it wont echo it. short tags are turned on as i am using them else where and they show up. So its got to be either not including the file when the user presses submit or the $test isnt being stored across pages. <? if (isset($_POST['DoCrime'])) { include('UnderBridgeCrimeScript.php'); } else { echo " Error: docrime not set"; } ?> i put this and the Else occured so its deffinatly relating to my form... Quote Link to comment Share on other sites More sharing options...
SirChick Posted August 17, 2007 Author Share Posted August 17, 2007 topic solved ! i had to add : enctype="multipart/form-data" and onsubmit="return ValidateForm1(this)" to get it working! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.