*

Recent

Author Topic: Repeat Password and Captcha  (Read 12429 times)

AlvinLee

  • Newbie
  • *
  • Posts: 9
  • Force: +0/-0
    • Free Online Flash Games
Repeat Password and Captcha
« on: June 20, 2010, 06:47:41 AM »
Hi to All
Sorry for my english...
When a new user signup, hi must to write "Password" and "Repeat Password". This function not work properly because "Password" is writen to database, but when user write in "Repeat..." other password - it`s no communication about wrong, or not some password.
I found in "signup_emailcheck.php" this:
Quote
if(!valid_email($email)){
      echo '<div class=\'error\'>Email is not valid.</div>';
      include ('templates/'.$template.'/footer.php');
      exit;
      }
and add after this:
Quote
if($_POST['pass_word'].value != $_POST['pass_word2'].value) {
   echo '<div class=\'error\'>Your Password does not match.</div>';
      include ('templates/'.$template.'/footer.php');
      exit;
   }
Now it work properly.
« Last Edit: June 20, 2010, 05:16:52 PM by AlvinLee »

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: Repeat Password
« Reply #1 on: June 20, 2010, 10:15:08 AM »
Hello,
Could you write this out in your language so I can better understand, I can put it through a translator.
Thanks!

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: Repeat Password
« Reply #2 on: June 20, 2010, 12:57:54 PM »
ooh ok. I understand now.
I didn't realize that code wasn't in there  :D
Thanks for letting me know. I will go change that right now and re-upload the zip

AlvinLee

  • Newbie
  • *
  • Posts: 9
  • Force: +0/-0
    • Free Online Flash Games
Re: Repeat Password
« Reply #3 on: June 20, 2010, 04:17:28 PM »
You welcome :-)
I`ve found other some little bugs, but I must to test it.
I have added captcha to contact and register forms also

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: Repeat Password
« Reply #4 on: June 20, 2010, 04:31:57 PM »
What are the other bugs that you have found?

The captcha is a good idea, would you mind sharing the code with others? or if I used it for the final V2.1?

AlvinLee

  • Newbie
  • *
  • Posts: 9
  • Force: +0/-0
    • Free Online Flash Games
Re: Repeat Password
« Reply #5 on: June 20, 2010, 05:15:25 PM »
OK.
First about "Contact"
Download file captcha unrar it, and put two files to Your main folder.
Open "contact.php", find :
Code: [Select]
function writebody() {
global $db, ....... etc;
after it add:
Code: [Select]
if( $_SESSION['security_code'] == $_POST['security_code'] && !empty($_SESSION['security_code'] ) ) {
unset($_SESSION['security_code']);
   } else {
echo '<div class=\'error\'>Sorry, you have provided an invalid security code.</div>';
exit;
   }
find:
Code: [Select]
$message = clean($_POST['message']);and add after:
Code: [Select]
$security_code = clean($_POST['security_code']);find:
Code: [Select]
if(!$sender || !$message){and change to:
Code: [Select]
if(!$sender || !$security_code || !$message){Next step.
Open "fineprint.php" and find:
Code: [Select]
Your Message:<br><textarea name=\'message\' rows=\'10\' cols=\'50\' ></textarea>
<p>
and add after:
Code: [Select]
Security Code: <img align="absmiddle" src="../CaptchaSecurityImages.php?width=100&height=40&characters=5" />
<input id=\'security_code\' type=\'text\' name=\'security_code\' size=\'25\'>
<p>
And smile, because Your FAS have captcha :-)
« Last Edit: June 20, 2010, 05:41:36 PM by AlvinLee »

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: Repeat Password and Captcha
« Reply #6 on: June 20, 2010, 05:25:57 PM »
Ok, cool. Thanks :)

One thing though.. I'm pretty sure you will have to remove session_start(); because there is already a session_start(); in the index file. It will just keep spitting out errors in your log.

AlvinLee

  • Newbie
  • *
  • Posts: 9
  • Force: +0/-0
    • Free Online Flash Games
Re: Repeat Password and Captcha
« Reply #7 on: June 20, 2010, 05:32:25 PM »
Now about Join (or Register) Form.
Open "signup_emailcheck.php", and find:
Code: [Select]
$answer = clean($_POST['answer']);after it add:
Code: [Select]
$security_code = clean($_POST['security_code']);find
Code: [Select]
if(!valid_email($email)){
echo '<div class=\'error\'>Email is not valid.</div>';
include ('templates/'.$template.'/footer.php');
exit;
}
after it add
Code: [Select]
if( $_SESSION['security_code'] == $_POST['security_code'] && !empty($_SESSION['security_code'] ) ) {
unset($_SESSION['security_code']);
   } else {
echo '<div class=\'error\'>Sorry, you have provided an invalid security code.</div>';
include ('templates/'.$template.'/footer.php');
exit;
}
find
Code: [Select]
<tr>
<td class=\'content\'>Answer:*<br><small>If you forgot your password!</small></td>
<td class=\'content\'><input type=\'text\' name=\'answer\' size=\'40\'></td>
</tr>
after it add
Code: [Select]
<tr>
<td class=\'content\'><small>&nbsp;&nbsp;AntiSpam Code*</small><br />
<img src="../CaptchaSecurityImages.php?width=100&height=40&characters=5" />
</td>
<td class=\'content\'><input id=\'security_code\' name=\'security_code\' type=\'text\' size=\'30\'></td>
</tr>
Of course You must upload this two files from my post above...
It`s all... I think.
« Last Edit: June 20, 2010, 05:40:29 PM by AlvinLee »

AlvinLee

  • Newbie
  • *
  • Posts: 9
  • Force: +0/-0
    • Free Online Flash Games
Re: Repeat Password and Captcha
« Reply #8 on: June 20, 2010, 05:38:30 PM »
You are right
session_start(); is not needed
Thank You

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: Repeat Password and Captcha
« Reply #9 on: June 20, 2010, 05:40:10 PM »
No problem.

So you said their were other bugs that you found? What were they?

AlvinLee

  • Newbie
  • *
  • Posts: 9
  • Force: +0/-0
    • Free Online Flash Games
Re: Repeat Password and Captcha
« Reply #10 on: June 20, 2010, 06:13:14 PM »
Hello again, I had a little problem with net provider...
I think if SEO is on, it not showing "rating_loading.gif", and not showing info about user rating... in js/rating_update.php i change one link and gif is showing, but I don`t know php so good and don`t know what needed to change...
I`m learning now...
Thank You for quick reply

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: Repeat Password and Captcha
« Reply #11 on: June 20, 2010, 06:19:02 PM »
hmmm ok I will take a look at it.
It might be a couple days until I get around to it though. I have to wait for my laptop to come in the mail. The computer I am using now has almost no room left on it so I can't download the script to look at it and I am not able to access ftp at the moment either.
Sorry.

AlvinLee

  • Newbie
  • *
  • Posts: 9
  • Force: +0/-0
    • Free Online Flash Games
Re: Repeat Password and Captcha
« Reply #12 on: June 21, 2010, 06:41:43 AM »
BTW
I`ve tested some arcade-game script, but I see FAS is the best.

Thank You FAS Team for this script  :)