![]() |
# 1 |
חבר מתקדם
|
![]() שלום!
אני רוצה שברשמה באתר שלי (לא משנה מהוא ) היה קוד אבטחה שאנשים לא ירשמו מלא פעמים. עשיתי לפי המדריך הזה http://www.white-hat-web-design.co.u...hp-captcha.php הצלחת להציב את הקוד שמה ונגיד שאני סתם רושם קוד לא נכון ועושה "שלח" זה לא עוצר אותי! זה ממשיך כאילו הקוד נכון. זאת אומרת אין אימות תמונה. אני רוצה לדעת איך אני מסדר את זה. אני יודע שהבעיה היא בקוד הזה קוד:
<?php session_start(); if(($_SESSION['security_code'] == $_POST['security_code']) && (!empty($_SESSION['security_code'])) ) { // Insert you code for processing the form here, e.g emailing the submission, entering it into a database. unset($_SESSION['security_code']); } else { // Insert your code for showing an error message here } ?> שמתי תקוד הזה בלי ה-Php בהתחלה ואת התגיד ?> בגלל שיש אותם כבר. קוד:
session_start(); if(($_SESSION['security_code'] == $_POST['security_code']) && (!empty($_SESSION['security_code'])) ) { // Insert you code for processing the form here, e.g emailing the submission, entering it into a database. unset($_SESSION['security_code']); } else { // Insert your code for showing an error message here Last edited by ProNati; 13-04-11 at 18:44.. |
![]() |
![]() |
# 2 |
חבר על
|
1. לא שמת כלום בתנאי. בין אם הקוד נכון או לא, זה ימשיך. אתה צריך לשים הודעת שגיאה עם exit ב-else.
2. אתה אמור לשים את הקוד הזה בראש הדף שמקבל את הנתונים ובודק אותם, לא בתחתית. |
![]() |
![]() |
# 3 |
חבר בקהילה
|
איפה שכתוב
קוד:
// Insert you code for processing the form here, e.g emailing the submission, entering it into a database. ואיפה שכתוב קוד:
// Insert your code for showing an error message here |
![]() |
![]() |
חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים) | |
|
|