Jump to content

Archived

This topic is now archived and is closed to further replies.

RSprinkel

PHP Application Form help

Recommended Posts

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

Share this post


Link to post
Share on other sites
use this

www.digitalmidget.com/php_noob2006/captcha.php

been recomended a fair bit

basicaly user has to type the word that is in the picture else they cant sign up :)

regards
Liam

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
well paste the code from both pages and we will see what we can do for you mate?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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..

Share this post


Link to post
Share on other sites
Ok I will give the links to them.

http://www.cfrlracing.com/php_forms/

again THANKS Much in ADVANCE

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
1 way could be in first page join_form.php at the top add

<?php
start_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 :)

Share this post


Link to post
Share on other sites
Ok I did all of this and now I am getting this error on line 2:

Fatal error: Call to undefined function: start_session()

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
yeah should work without that but i would recomend Captcha over my way as it's more secure..

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.