What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Php coding help

Pages: (2): « First [ 1 ] 2 » Last »
Php coding help
Author: Message:
king_of_cool_kids
Full Member
***

Avatar
Im a Cat fan.

Posts: 264
– / Male / –
Joined: Dec 2003
O.P. Huh?  Php coding help
Ok. I have a contact form on my site, and have a JavaScript code to stop multiple submitting in one go. However, recently I have been getting lots and I think it may be because people have JavaScript turned off in their browser. I was talking to a friend this morning, and he said that the same effect could be done using php, and that it is more secure and reliable.

So:

a) Is this true

b) If so, how can I go about implementing it on my site??

Thanks in advance.
See this thread please:
http://shoutbox.menthix.net/showthread.php?action=lastpost&tid=29609

I am running:
Windows XP Pro
MSN messenger: 6.2.0137
MsgPlus!: 3.01.94
08-07-2004 05:35 AM
Profile PM Web Find Quote Report
WDZ
Former Admin
*****

Avatar

Posts: 7106
Reputation: 107
– / Male / Flag
Joined: Mar 2002
RE: Php coding help
That javascript probably only works until the page is refreshed... someone could send one, refresh the form, paste the message back in, send another, and so on.

quote:
Originally posted by king_of_cool_kids
a) Is this true
PHP being more secure and reliable than javascript? Yes, definitely.

quote:
Originally posted by king_of_cool_kids
b) ... how can I go about implementing it on my site??
You want to stop the same person from submitting 2+ messages in a row? Does your contact script store anything on the server or just send an e-mail? If nothing is stored, the easiest method is probably setting a cookie, but that's not really secure, because the submitter could reject or delete it.

A more secure method of duplicate-checking would be storing the submitter's IP address on the server (in a text file or database) and then checking/updating it next time a submission is made.
08-07-2004 05:55 AM
Profile PM Web Find Quote Report
king_of_cool_kids
Full Member
***

Avatar
Im a Cat fan.

Posts: 264
– / Male / –
Joined: Dec 2003
O.P. RE: Php coding help
ok, well, basicly, I want something (php) that will disable the submit button once clicked, and have a time span of 3 mins between submitions.

Database available if needed.

See this thread please:
http://shoutbox.menthix.net/showthread.php?action=lastpost&tid=29609

I am running:
Windows XP Pro
MSN messenger: 6.2.0137
MsgPlus!: 3.01.94
08-07-2004 06:16 AM
Profile PM Web Find Quote Report
WDZ
Former Admin
*****

Avatar

Posts: 7106
Reputation: 107
– / Male / Flag
Joined: Mar 2002
RE: Php coding help
quote:
Originally posted by king_of_cool_kids
ok, well, basicly, I want something (php) that will disable the submit button once clicked
Hmm... well, because PHP is server-side, it can't disable the submit button right away like javascript can. The user would have to reload the form before the submit button could be disabled. :-/

quote:
Originally posted by king_of_cool_kids
and have a time span of 3 mins between submitions.
Are you sure that's enough? Someone could spam you with almost 20 messages per hour if they were determined... :p

If you use the cookie-based method, you could simply set a cookie with a 3-minute expiration time. With the other method, you'd have to store a time on the server along with the IP.
08-07-2004 06:30 AM
Profile PM Web Find Quote Report
king_of_cool_kids
Full Member
***

Avatar
Im a Cat fan.

Posts: 264
– / Male / –
Joined: Dec 2003
O.P. RE: Php coding help
a) Whats an fast, reliable option to stop people from submitting lots of times??

b) Cookies can be deleted easily. I want something that cant be. Any ideas??

c) PM me if you can, its easier to keep track of

This post was edited on 08-07-2004 at 06:37 AM by king_of_cool_kids.
See this thread please:
http://shoutbox.menthix.net/showthread.php?action=lastpost&tid=29609

I am running:
Windows XP Pro
MSN messenger: 6.2.0137
MsgPlus!: 3.01.94
08-07-2004 06:36 AM
Profile PM Web Find Quote Report
KeyStorm
Elite Member
*****

Avatar
Inn-sewer-ants-pollie-sea

Posts: 2156
Reputation: 45
38 / Male / –
Joined: Jan 2003
RE: Php coding help
Well, you can user sessions to do that, although people could keep restarting their browsers to override that.

If you're keeping track of the usernames and the date and time they last posted, it's not very difficult to stop them from submitting in 3 minutes.
08-07-2004 08:58 AM
Profile E-Mail PM Web Find Quote Report
king_of_cool_kids
Full Member
***

Avatar
Im a Cat fan.

Posts: 264
– / Male / –
Joined: Dec 2003
O.P. RE: Php coding help
ok, so how do I go about (in php or another reliable coding) setting up anything to stop people from submitting things lots of times in one go by either disabling the button, or whatever?? So long as they cant click, click, click heaps of times, then im happy.

Edit: Ok, I talked to my friend again this morning. He said that session would be good and easy, but if I wanted an easier way, make a script that will prevent a user from clicking the button, as it would be greyed out with the words "Need Javascipt on to use form" if they didn't have javascript on.

Does anyone know any way of coding this type of thing??

This post was edited on 08-09-2004 at 05:16 AM by king_of_cool_kids.
See this thread please:
http://shoutbox.menthix.net/showthread.php?action=lastpost&tid=29609

I am running:
Windows XP Pro
MSN messenger: 6.2.0137
MsgPlus!: 3.01.94
08-09-2004 05:13 AM
Profile PM Web Find Quote Report
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
36 / Male / Flag
Joined: Mar 2004
RE: Php coding help
if i remember right the noscript tag will display whats inside it insted of  the javascript if scripts are off 
code:
<noscript> test </noscript>

This post was edited on 08-09-2004 at 06:45 AM by -dt-.
[Image: dt2.0v2.png]      Happy Birthday, WDZ
08-09-2004 06:43 AM
Profile PM Web Find Quote Report
king_of_cool_kids
Full Member
***

Avatar
Im a Cat fan.

Posts: 264
– / Male / –
Joined: Dec 2003
O.P. RE: Php coding help
??? Im talking about a script that tests if Javasciprt is enabled. If so, lets the form be processed, if not, on loading the page, make the submit button grey with the words "Need Javascipt on to use form"

This post was edited on 08-09-2004 at 06:58 AM by king_of_cool_kids.
See this thread please:
http://shoutbox.menthix.net/showthread.php?action=lastpost&tid=29609

I am running:
Windows XP Pro
MSN messenger: 6.2.0137
MsgPlus!: 3.01.94
08-09-2004 06:56 AM
Profile PM Web Find Quote Report
ddunk
Veteran Member
*****

Avatar

Posts: 1228
Reputation: 51
35 / Male / Flag
Joined: Mar 2004
RE: Php coding help
http://www.webaim.org/techniques/javascript/alternatives - Read 4.2 Using the <noscript> Element, including the Example

This post was edited on 08-09-2004 at 07:11 AM by ddunk.
08-09-2004 07:10 AM
Profile E-Mail PM Web Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On