jj20051 Posted September 24, 2008 Share Posted September 24, 2008 Hello, I Made The Script Bellow To Make Sure Only One Person Could Signup Per IP. ( It's Very Basic, I Know )... Anyway no matter what i try it gives me a error that says: Parse error: syntax error, unexpected T_IS_EQUAL in /home/jobfinda/public_html/employers/employer_registration2.php on line 8 if ($Db1->querySingle("SELECT ip FROM ips WHERE ips='$ips' ")>0?true:false) == true){ $error="Your IP address is already in use! We only allow 1 account per IP address."; } Quote Link to comment https://forums.phpfreaks.com/topic/125619-one-ip/ Share on other sites More sharing options...
jonsjava Posted September 24, 2008 Share Posted September 24, 2008 try this: <?php if ($Db1->querySingle("SELECT ip FROM ips WHERE ips='$ips' ")>0?true:false == true){ $error="Your IP address is already in use! We only allow 1 account per IP address."; } Quote Link to comment https://forums.phpfreaks.com/topic/125619-one-ip/#findComment-649468 Share on other sites More sharing options...
CroNiX Posted September 24, 2008 Share Posted September 24, 2008 It will be impossible to implement 1 signup per ip. You are assuming everybody has a static IP and that is not the case. Many IPs change frequently, sometimes even during the same session. Quote Link to comment https://forums.phpfreaks.com/topic/125619-one-ip/#findComment-649475 Share on other sites More sharing options...
jj20051 Posted September 24, 2008 Author Share Posted September 24, 2008 Well That Helped Alot Believe It or Not... I'm Still Getting One More Error, but At Least The Page Is Visible... So If I Could Get Some Help Yet Again That Would Be Gr8... Fatal error: Call to a member function querySingle() on a non-object in /home/jobfinda/public_html/employers/employer_registration2.php on line 8 Quote Link to comment https://forums.phpfreaks.com/topic/125619-one-ip/#findComment-649476 Share on other sites More sharing options...
CroNiX Posted September 24, 2008 Share Posted September 24, 2008 wouldn't it be "WHERE ip = '$ips'"? Quote Link to comment https://forums.phpfreaks.com/topic/125619-one-ip/#findComment-649483 Share on other sites More sharing options...
jj20051 Posted September 24, 2008 Author Share Posted September 24, 2008 Still The Same Problem... Fatal error: Call to a member function querySingle() on a non-object in /home/jobfinda/public_html/employers/employer_registration2.php on line 8 Quote Link to comment https://forums.phpfreaks.com/topic/125619-one-ip/#findComment-649489 Share on other sites More sharing options...
trq Posted September 24, 2008 Share Posted September 24, 2008 Where is $Db1 defined? Quote Link to comment https://forums.phpfreaks.com/topic/125619-one-ip/#findComment-649496 Share on other sites More sharing options...
jj20051 Posted September 24, 2008 Author Share Posted September 24, 2008 Actually I Don't Think It Is,,,, Quote Link to comment https://forums.phpfreaks.com/topic/125619-one-ip/#findComment-649500 Share on other sites More sharing options...
trq Posted September 24, 2008 Share Posted September 24, 2008 Theres your problem then. Quote Link to comment https://forums.phpfreaks.com/topic/125619-one-ip/#findComment-649501 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.