RSprinkel Posted August 26, 2006 Share Posted August 26, 2006 Hi all,I am having a major issue with one of my application forms I have on my racing league site.Seems it is being hit by bots or something cause I get an email with the details and in all the fields where the member info is supposed to be is full of links to junk and trash sites. Is there any way to put a stop to this without having to go through passwording the directory?The odd thing about this is, is I actually have 2 join forms on my site and this is the ONLY one getting hit like this. The other one is in another directory.Thanks very much for your time in Advance.RSprinkel Quote Link to comment Share on other sites More sharing options...
shocker-z Posted August 26, 2006 Share Posted August 26, 2006 use thiswww.digitalmidget.com/php_noob2006/captcha.phpbeen recomended a fair bitbasicaly user has to type the word that is in the picture else they cant sign up :)regardsLiam Quote Link to comment Share on other sites More sharing options...
RSprinkel Posted August 26, 2006 Author Share Posted August 26, 2006 Liam,THanks for your prompt reply. I do like the utility but I have an issue using that.First I am in no way a PHP expert and my problem is this. I have a join.php form which is actually just an html form and when the user clicks the submit button it calls another php script that actually process's the information which does all the error checks and stuff then places the info into a database, so I am not totally sure as to what php script to place this in.Again thank you for your reply.Ron Quote Link to comment Share on other sites More sharing options...
shocker-z Posted August 26, 2006 Share Posted August 26, 2006 cant you just change the plain html page to .php? wouldnt be too hard.. or is the php on seperate server? if so then im really not sure except from possibly logging IP addresses and then u will see the common one straight away.. or seta cookie on the html page with java m,aby then check on the php page?Liam Quote Link to comment Share on other sites More sharing options...
RSprinkel Posted August 26, 2006 Author Share Posted August 26, 2006 well the form is actually labeled as .php but there is no <?php ?> brackets in the form. Actually the form was designed for me for another type of site and I just modified the contents to fit this site. Once the form is completed it posts in a form called process_app.php which does all the error checking and stuff.I wish I knew how to convert both forms into one which would simplify the matter, but unfortunately I don't have the knowledge to do so and I wouldn't even know where to start.Again Thanks for the reply. Quote Link to comment Share on other sites More sharing options...
shocker-z Posted August 26, 2006 Share Posted August 26, 2006 well paste the code from both pages and we will see what we can do for you mate? Quote Link to comment Share on other sites More sharing options...
RSprinkel Posted August 26, 2006 Author Share Posted August 26, 2006 Are you sure, LOL? Lot of code here Quote Link to comment Share on other sites More sharing options...
shocker-z Posted August 26, 2006 Share Posted August 26, 2006 depends how much u mean by alot? over 200 lines? shouldnt matter too much as most of the forms part will be kind of glanced over but the main code is the processing code for your php file that u submit to. Quote Link to comment Share on other sites More sharing options...
RSprinkel Posted August 26, 2006 Author Share Posted August 26, 2006 Join form is 296 lines. Process App is 166 lines Quote Link to comment Share on other sites More sharing options...
shocker-z Posted August 26, 2006 Share Posted August 26, 2006 yeah go for it then.. i've seen bigger posted :) else just make a copy on your server and save as .phps and then show us a link to them.. Quote Link to comment Share on other sites More sharing options...
RSprinkel Posted August 26, 2006 Author Share Posted August 26, 2006 Ok I will give the links to them.http://www.cfrlracing.com/php_forms/again THANKS Much in ADVANCE Quote Link to comment Share on other sites More sharing options...
shocker-z Posted August 26, 2006 Share Posted August 26, 2006 you have saved as php not .phps so we can't read the code.. .phps will show us all the code instead of executing it Quote Link to comment Share on other sites More sharing options...
RSprinkel Posted August 26, 2006 Author Share Posted August 26, 2006 ahh sorry, ok I have fixed that now.Sorry :-( Quote Link to comment Share on other sites More sharing options...
shocker-z Posted August 26, 2006 Share Posted August 26, 2006 1 way could be in first page join_form.php at the top add<?phpstart_session();$_SESSION['formjoin']='yes';?>and then in process_app.php you can change also add start_session(); to the top of process_app.php[code]if((!$fname) || (!$lname) || (!$address) || (!$city) || (!$state) || (!$zip) || (!$country) || (!$email) || (!$age) || (!$rules) || (!$answer) || (!$username) || (!$password)){[/code]to[code]if((!$fname) || (!$lname) || (!$address) || (!$city) || (!$state) || (!$zip) || (!$country) || (!$email) || (!$age) || (!$rules) || (!$answer) || (!$username) || (!$password) || ($_SESSION['formjoin'] !== 'yes')){ echo 'You did not submit the following required information! <br />'; if($_SESSION['formjoin'] !== 'yes'){ echo "Please sign up from our page.<br />"; }[/code]then right at the bottom of the page put $_SESSION['formjoin']='no';I think that should do the trick for you mate :) Quote Link to comment Share on other sites More sharing options...
RSprinkel Posted August 26, 2006 Author Share Posted August 26, 2006 Ok I did all of this and now I am getting this error on line 2:Fatal error: Call to undefined function: start_session() Quote Link to comment Share on other sites More sharing options...
shocker-z Posted August 26, 2006 Share Posted August 26, 2006 sorry it's session_start(); i always get it wrong way :S Quote Link to comment Share on other sites More sharing options...
RSprinkel Posted August 26, 2006 Author Share Posted August 26, 2006 ok that worked great, now will this stop all the other crazy entries I have been getting or do I still need to do the Captcha thing? Quote Link to comment Share on other sites More sharing options...
shocker-z Posted August 26, 2006 Share Posted August 26, 2006 yeah should work without that but i would recomend Captcha over my way as it's more secure.. Quote Link to comment Share on other sites More sharing options...
RSprinkel Posted August 26, 2006 Author Share Posted August 26, 2006 Ok Thanks for all your help. Very much appreciated. I will see if I can get that captcha thing going.Then on to another project that is probably over my head, LOL. 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.