[PHP-DB] tutorial
Hi everyone i'm a newbie in php, mysql and linux but i want to learn about it can you guys help me or give me referal to any tutorial links. thank you for your kindness. thanks >:P sorry for my english >:- [ _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Tutorial?
Right. I store mine in the same db, and it gets inserted with the other data from the form. Before inserting, the script does a quick query, selecting all rows where the unique_id is equal to the current ID. since a new one is generated for each submit click, the answer will be zero on a proper insert. On a reload, the answer (mysql_affected_rows) will be 1, so you exit the script at that point. I also check to make sure the required fields are not blank before inserting, so that handles the problem of inserting a blank record if the user clicks twice. anyway, it works... you can click and click and click all you want, reload until you're blue in the face, and you'll only get one proper insert. better yet, not a word of javascript was involved. :) "Jonathan Hilgeman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED].; > This is another good idea. When reloading the page, have the script generate > that unique ID, store it in a separate table AND put it in a hidden input. > When the user submits, the database checks to see if the unique ID is in the > database, and if so, the ID is deleted from the database, and the order is > processed. On subsequent clicks, the unique ID would not be found in that > database table so the query would fail with a message ("You have clicked > more than once") or something like that, and the person could check the > status of an order identified by that unique ID. > > - Jonathan > > -Original Message- > From: Aron Pilhofer [mailto:[EMAIL PROTECTED]] > Sent: Monday, March 04, 2002 9:51 AM > To: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] Tutorial? > > > The easiest and best solution is to redirect to a new page after the submit. > But I have had cases where it was necessary to have the submit code and the > form on the same page. > > I agree totally with jonathan that a server-side solution is the way to go. > To solve the problem (avoid clicking twice and/or reloading the page) I used > a hidden field that generated a unique ID based, and then placed that into a > field that only accepts unique values. If the user reloads, the query > fails - trap that error and you're golden. > > > "Jonathan Hilgeman" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED].; > > Hi Jennifer, > > I'm guessing the purpose of this would be to keep people from > > double-clicking and submitted information twice, possibly making an > > application deduct payment twice or something important similar in nature. > > > > The best way I've found of accomplishing the goal of keeping people from > > clicking twice has three parts: > > 1) Quickly switching the page. On the next page, have PHP write out about > > 300 spaces and a newline, then call the flush() function to make the > output > > get sent to the browser. In many cases, this will cause the browser to > > quickly switch to the next page and display a blank page while the data > gets > > processed. > > > > 2) It's still remotely possibly to click twice even if you have part 1 in > > place, so this is a more fool-proof method. Store your data in a database > > before processing it - along with a timestamp. When the person clicks the > > submit button twice, the program checks the database to see if there is > the > > same information with a very close timestamp. If so, update the timestamp > in > > the database. At this point you can choose 3 paths: > > > > - Store the data so you can batch-process the data at a later time, once > you > > are sure that the visitor has left and there will be no more clicks. For > > example, have a program that runs every 5 minutes (via cron), then have > that > > program check for data/orders that are at least 5 minutes old, and process > > them. That means that the timestamp hasn't been updated by extra clicks in > 5 > > minutes (and you could still have notified the visitor that their order or > > data request is now in line to be processed). > > > > - Process the data immediately. If you need to process an order > immediately > > and give back results, use the above method, but modify it a bit. Instead > of > > just displaying notification that their order is in line to be processed, > > you can submit to another PHP program which sleeps for about 3-4 seconds, > > then checks the database until there are no clicks for at least 4 seconds, > > and THEN processes the data, and returns a value to the screen in like 4-5 > > seconds. Both of these methods have similar goals, though - Receive data > and > > timestamp it, Wait $Time, Check for timestamp updates, Process when >
RE: [PHP-DB] Tutorial?
This is another good idea. When reloading the page, have the script generate that unique ID, store it in a separate table AND put it in a hidden input. When the user submits, the database checks to see if the unique ID is in the database, and if so, the ID is deleted from the database, and the order is processed. On subsequent clicks, the unique ID would not be found in that database table so the query would fail with a message ("You have clicked more than once") or something like that, and the person could check the status of an order identified by that unique ID. - Jonathan -Original Message- From: Aron Pilhofer [mailto:[EMAIL PROTECTED]] Sent: Monday, March 04, 2002 9:51 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Tutorial? The easiest and best solution is to redirect to a new page after the submit. But I have had cases where it was necessary to have the submit code and the form on the same page. I agree totally with jonathan that a server-side solution is the way to go. To solve the problem (avoid clicking twice and/or reloading the page) I used a hidden field that generated a unique ID based, and then placed that into a field that only accepts unique values. If the user reloads, the query fails - trap that error and you're golden. "Jonathan Hilgeman" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi Jennifer, > I'm guessing the purpose of this would be to keep people from > double-clicking and submitted information twice, possibly making an > application deduct payment twice or something important similar in nature. > > The best way I've found of accomplishing the goal of keeping people from > clicking twice has three parts: > 1) Quickly switching the page. On the next page, have PHP write out about > 300 spaces and a newline, then call the flush() function to make the output > get sent to the browser. In many cases, this will cause the browser to > quickly switch to the next page and display a blank page while the data gets > processed. > > 2) It's still remotely possibly to click twice even if you have part 1 in > place, so this is a more fool-proof method. Store your data in a database > before processing it - along with a timestamp. When the person clicks the > submit button twice, the program checks the database to see if there is the > same information with a very close timestamp. If so, update the timestamp in > the database. At this point you can choose 3 paths: > > - Store the data so you can batch-process the data at a later time, once you > are sure that the visitor has left and there will be no more clicks. For > example, have a program that runs every 5 minutes (via cron), then have that > program check for data/orders that are at least 5 minutes old, and process > them. That means that the timestamp hasn't been updated by extra clicks in 5 > minutes (and you could still have notified the visitor that their order or > data request is now in line to be processed). > > - Process the data immediately. If you need to process an order immediately > and give back results, use the above method, but modify it a bit. Instead of > just displaying notification that their order is in line to be processed, > you can submit to another PHP program which sleeps for about 3-4 seconds, > then checks the database until there are no clicks for at least 4 seconds, > and THEN processes the data, and returns a value to the screen in like 4-5 > seconds. Both of these methods have similar goals, though - Receive data and > timestamp it, Wait $Time, Check for timestamp updates, Process when > timestamp is $Time old. > > 3) Have a very visible notice that people should not click multiple times, > or else undesirable results may occur, and we want "your" request/order to > be perfect. Emphasize the request to click only once and to be patient, and > if something goes wrong, here's how to contact us. > > - Jonathan > > -Original Message- > From: Jennifer Downey [mailto:[EMAIL PROTECTED]] > Sent: Saturday, March 02, 2002 10:18 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Tutorial? > > > Hi all, > > Can anyone point me to a good tutorial on how to disable a submit button > once clicked? > preferably in php. > > Thanks > Jennifer Downey > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Tutorial?
The easiest and best solution is to redirect to a new page after the submit. But I have had cases where it was necessary to have the submit code and the form on the same page. I agree totally with jonathan that a server-side solution is the way to go. To solve the problem (avoid clicking twice and/or reloading the page) I used a hidden field that generated a unique ID based, and then placed that into a field that only accepts unique values. If the user reloads, the query fails - trap that error and you're golden. "Jonathan Hilgeman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED].; > Hi Jennifer, > I'm guessing the purpose of this would be to keep people from > double-clicking and submitted information twice, possibly making an > application deduct payment twice or something important similar in nature. > > The best way I've found of accomplishing the goal of keeping people from > clicking twice has three parts: > 1) Quickly switching the page. On the next page, have PHP write out about > 300 spaces and a newline, then call the flush() function to make the output > get sent to the browser. In many cases, this will cause the browser to > quickly switch to the next page and display a blank page while the data gets > processed. > > 2) It's still remotely possibly to click twice even if you have part 1 in > place, so this is a more fool-proof method. Store your data in a database > before processing it - along with a timestamp. When the person clicks the > submit button twice, the program checks the database to see if there is the > same information with a very close timestamp. If so, update the timestamp in > the database. At this point you can choose 3 paths: > > - Store the data so you can batch-process the data at a later time, once you > are sure that the visitor has left and there will be no more clicks. For > example, have a program that runs every 5 minutes (via cron), then have that > program check for data/orders that are at least 5 minutes old, and process > them. That means that the timestamp hasn't been updated by extra clicks in 5 > minutes (and you could still have notified the visitor that their order or > data request is now in line to be processed). > > - Process the data immediately. If you need to process an order immediately > and give back results, use the above method, but modify it a bit. Instead of > just displaying notification that their order is in line to be processed, > you can submit to another PHP program which sleeps for about 3-4 seconds, > then checks the database until there are no clicks for at least 4 seconds, > and THEN processes the data, and returns a value to the screen in like 4-5 > seconds. Both of these methods have similar goals, though - Receive data and > timestamp it, Wait $Time, Check for timestamp updates, Process when > timestamp is $Time old. > > 3) Have a very visible notice that people should not click multiple times, > or else undesirable results may occur, and we want "your" request/order to > be perfect. Emphasize the request to click only once and to be patient, and > if something goes wrong, here's how to contact us. > > - Jonathan > > -Original Message- > From: Jennifer Downey [mailto:[EMAIL PROTECTED]] > Sent: Saturday, March 02, 2002 10:18 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Tutorial? > > > Hi all, > > Can anyone point me to a good tutorial on how to disable a submit button > once clicked? > preferably in php. > > Thanks > Jennifer Downey > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Tutorial?
How about mixing the 2??? :-) Richy -Original Message- From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]] Sent: 04 March 2002 16:51 To: 'Richard Black'; 'Jennifer Downey'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Tutorial? Javascript will functionally solve the problem, but since Javascript is an optional piece of the browser that can be turned off/on, and functions differently in different browsers, it's definitely far from fool-proof. You could get it working 99.9% in IE and Navigator, but then have it fail in another browser, which is why I suggested my PHP, server-side method, which cannot be turned off based on a client's browser. - Jonathan -Original Message- From: Richard Black [mailto:[EMAIL PROTECTED]] Sent: Monday, March 04, 2002 8:47 AM To: Jonathan Hilgeman; 'Jennifer Downey'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Tutorial? I've also seen something similar implemented using javascript (i guess - never looked into it in any detail) The online bank I use does this. Basically, when I click a submit button, the button is replaced by an image (like a greyed out submit button) which has the caption Submitted. Clicking this does nothing. Like I say, I'm 99.9% positive this is implemented using javascript, but have never investigated how it works... Richy == Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: [EMAIL PROTECTED] -Original Message- From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]] Sent: 04 March 2002 16:40 To: 'Jennifer Downey'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Tutorial? Hi Jennifer, I'm guessing the purpose of this would be to keep people from double-clicking and submitted information twice, possibly making an application deduct payment twice or something important similar in nature. The best way I've found of accomplishing the goal of keeping people from clicking twice has three parts: 1) Quickly switching the page. On the next page, have PHP write out about 300 spaces and a newline, then call the flush() function to make the output get sent to the browser. In many cases, this will cause the browser to quickly switch to the next page and display a blank page while the data gets processed. 2) It's still remotely possibly to click twice even if you have part 1 in place, so this is a more fool-proof method. Store your data in a database before processing it - along with a timestamp. When the person clicks the submit button twice, the program checks the database to see if there is the same information with a very close timestamp. If so, update the timestamp in the database. At this point you can choose 3 paths: - Store the data so you can batch-process the data at a later time, once you are sure that the visitor has left and there will be no more clicks. For example, have a program that runs every 5 minutes (via cron), then have that program check for data/orders that are at least 5 minutes old, and process them. That means that the timestamp hasn't been updated by extra clicks in 5 minutes (and you could still have notified the visitor that their order or data request is now in line to be processed). - Process the data immediately. If you need to process an order immediately and give back results, use the above method, but modify it a bit. Instead of just displaying notification that their order is in line to be processed, you can submit to another PHP program which sleeps for about 3-4 seconds, then checks the database until there are no clicks for at least 4 seconds, and THEN processes the data, and returns a value to the screen in like 4-5 seconds. Both of these methods have similar goals, though - Receive data and timestamp it, Wait $Time, Check for timestamp updates, Process when timestamp is $Time old. 3) Have a very visible notice that people should not click multiple times, or else undesirable results may occur, and we want "your" request/order to be perfect. Emphasize the request to click only once and to be patient, and if something goes wrong, here's how to contact us. - Jonathan -Original Message- From: Jennifer Downey [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 02, 2002 10:18 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Tutorial? Hi all, Can anyone point me to a good tutorial on how to disable a submit button once clicked? preferably in php. Thanks Jennifer Downey -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Tutorial?
Javascript will functionally solve the problem, but since Javascript is an optional piece of the browser that can be turned off/on, and functions differently in different browsers, it's definitely far from fool-proof. You could get it working 99.9% in IE and Navigator, but then have it fail in another browser, which is why I suggested my PHP, server-side method, which cannot be turned off based on a client's browser. - Jonathan -Original Message- From: Richard Black [mailto:[EMAIL PROTECTED]] Sent: Monday, March 04, 2002 8:47 AM To: Jonathan Hilgeman; 'Jennifer Downey'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Tutorial? I've also seen something similar implemented using javascript (i guess - never looked into it in any detail) The online bank I use does this. Basically, when I click a submit button, the button is replaced by an image (like a greyed out submit button) which has the caption Submitted. Clicking this does nothing. Like I say, I'm 99.9% positive this is implemented using javascript, but have never investigated how it works... Richy == Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: [EMAIL PROTECTED] -Original Message- From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]] Sent: 04 March 2002 16:40 To: 'Jennifer Downey'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Tutorial? Hi Jennifer, I'm guessing the purpose of this would be to keep people from double-clicking and submitted information twice, possibly making an application deduct payment twice or something important similar in nature. The best way I've found of accomplishing the goal of keeping people from clicking twice has three parts: 1) Quickly switching the page. On the next page, have PHP write out about 300 spaces and a newline, then call the flush() function to make the output get sent to the browser. In many cases, this will cause the browser to quickly switch to the next page and display a blank page while the data gets processed. 2) It's still remotely possibly to click twice even if you have part 1 in place, so this is a more fool-proof method. Store your data in a database before processing it - along with a timestamp. When the person clicks the submit button twice, the program checks the database to see if there is the same information with a very close timestamp. If so, update the timestamp in the database. At this point you can choose 3 paths: - Store the data so you can batch-process the data at a later time, once you are sure that the visitor has left and there will be no more clicks. For example, have a program that runs every 5 minutes (via cron), then have that program check for data/orders that are at least 5 minutes old, and process them. That means that the timestamp hasn't been updated by extra clicks in 5 minutes (and you could still have notified the visitor that their order or data request is now in line to be processed). - Process the data immediately. If you need to process an order immediately and give back results, use the above method, but modify it a bit. Instead of just displaying notification that their order is in line to be processed, you can submit to another PHP program which sleeps for about 3-4 seconds, then checks the database until there are no clicks for at least 4 seconds, and THEN processes the data, and returns a value to the screen in like 4-5 seconds. Both of these methods have similar goals, though - Receive data and timestamp it, Wait $Time, Check for timestamp updates, Process when timestamp is $Time old. 3) Have a very visible notice that people should not click multiple times, or else undesirable results may occur, and we want "your" request/order to be perfect. Emphasize the request to click only once and to be patient, and if something goes wrong, here's how to contact us. - Jonathan -Original Message- From: Jennifer Downey [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 02, 2002 10:18 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Tutorial? Hi all, Can anyone point me to a good tutorial on how to disable a submit button once clicked? preferably in php. Thanks Jennifer Downey -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Tutorial?
I've also seen something similar implemented using javascript (i guess - never looked into it in any detail) The online bank I use does this. Basically, when I click a submit button, the button is replaced by an image (like a greyed out submit button) which has the caption Submitted. Clicking this does nothing. Like I say, I'm 99.9% positive this is implemented using javascript, but have never investigated how it works... Richy == Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: [EMAIL PROTECTED] -Original Message- From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]] Sent: 04 March 2002 16:40 To: 'Jennifer Downey'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Tutorial? Hi Jennifer, I'm guessing the purpose of this would be to keep people from double-clicking and submitted information twice, possibly making an application deduct payment twice or something important similar in nature. The best way I've found of accomplishing the goal of keeping people from clicking twice has three parts: 1) Quickly switching the page. On the next page, have PHP write out about 300 spaces and a newline, then call the flush() function to make the output get sent to the browser. In many cases, this will cause the browser to quickly switch to the next page and display a blank page while the data gets processed. 2) It's still remotely possibly to click twice even if you have part 1 in place, so this is a more fool-proof method. Store your data in a database before processing it - along with a timestamp. When the person clicks the submit button twice, the program checks the database to see if there is the same information with a very close timestamp. If so, update the timestamp in the database. At this point you can choose 3 paths: - Store the data so you can batch-process the data at a later time, once you are sure that the visitor has left and there will be no more clicks. For example, have a program that runs every 5 minutes (via cron), then have that program check for data/orders that are at least 5 minutes old, and process them. That means that the timestamp hasn't been updated by extra clicks in 5 minutes (and you could still have notified the visitor that their order or data request is now in line to be processed). - Process the data immediately. If you need to process an order immediately and give back results, use the above method, but modify it a bit. Instead of just displaying notification that their order is in line to be processed, you can submit to another PHP program which sleeps for about 3-4 seconds, then checks the database until there are no clicks for at least 4 seconds, and THEN processes the data, and returns a value to the screen in like 4-5 seconds. Both of these methods have similar goals, though - Receive data and timestamp it, Wait $Time, Check for timestamp updates, Process when timestamp is $Time old. 3) Have a very visible notice that people should not click multiple times, or else undesirable results may occur, and we want "your" request/order to be perfect. Emphasize the request to click only once and to be patient, and if something goes wrong, here's how to contact us. - Jonathan -Original Message- From: Jennifer Downey [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 02, 2002 10:18 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Tutorial? Hi all, Can anyone point me to a good tutorial on how to disable a submit button once clicked? preferably in php. Thanks Jennifer Downey -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Tutorial?
Hi Jennifer, I'm guessing the purpose of this would be to keep people from double-clicking and submitted information twice, possibly making an application deduct payment twice or something important similar in nature. The best way I've found of accomplishing the goal of keeping people from clicking twice has three parts: 1) Quickly switching the page. On the next page, have PHP write out about 300 spaces and a newline, then call the flush() function to make the output get sent to the browser. In many cases, this will cause the browser to quickly switch to the next page and display a blank page while the data gets processed. 2) It's still remotely possibly to click twice even if you have part 1 in place, so this is a more fool-proof method. Store your data in a database before processing it - along with a timestamp. When the person clicks the submit button twice, the program checks the database to see if there is the same information with a very close timestamp. If so, update the timestamp in the database. At this point you can choose 3 paths: - Store the data so you can batch-process the data at a later time, once you are sure that the visitor has left and there will be no more clicks. For example, have a program that runs every 5 minutes (via cron), then have that program check for data/orders that are at least 5 minutes old, and process them. That means that the timestamp hasn't been updated by extra clicks in 5 minutes (and you could still have notified the visitor that their order or data request is now in line to be processed). - Process the data immediately. If you need to process an order immediately and give back results, use the above method, but modify it a bit. Instead of just displaying notification that their order is in line to be processed, you can submit to another PHP program which sleeps for about 3-4 seconds, then checks the database until there are no clicks for at least 4 seconds, and THEN processes the data, and returns a value to the screen in like 4-5 seconds. Both of these methods have similar goals, though - Receive data and timestamp it, Wait $Time, Check for timestamp updates, Process when timestamp is $Time old. 3) Have a very visible notice that people should not click multiple times, or else undesirable results may occur, and we want "your" request/order to be perfect. Emphasize the request to click only once and to be patient, and if something goes wrong, here's how to contact us. - Jonathan -Original Message- From: Jennifer Downey [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 02, 2002 10:18 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Tutorial? Hi all, Can anyone point me to a good tutorial on how to disable a submit button once clicked? preferably in php. Thanks Jennifer Downey -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Tutorial?
On Sun, 2002-03-03 at 08:18, Jennifer Downey wrote: > Can anyone point me to a good tutorial on how to disable a submit button > once clicked? > preferably in php. If I understood the question; wouldn't this produce the desired result? VALUE="whatever"> If $disabled is set, the button is rendered "grayed out", but still visible. -- Markus Lervik Linux-administrator with a kungfoo grip Vaasa City Library - Regional Library [EMAIL PROTECTED] +358-6-325 3589 / +358-40-832 6709 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Tutorial?
Could you not put the form inside an if/else statement? If the button isset, or if the name equals submit, then show it disabled. Can't think of a lot of uses for this, unless, I suppose, you want to have a page with lots of forms on it, and you want to submit pieces of information. It wouldn't prevent users from reloading the page and creating duplicate records. "Greg Donald" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED].; > On Sat, 2 Mar 2002, Jennifer Downey wrote: > > >Can anyone point me to a good tutorial on how to disable a submit button > >once clicked? > >preferably in php. > > If you reload the page after the button is clicked then you can simply > pass a $disable variable in your form as a hidden field, then you can > check for the variable before drawing the button the second time. > > Sounds more like a javascript thing to me though. PHP is a server side > scripting language, it's not designed to manipulate forms and buttons, > where javascript is. > > -- > --- > Greg Donald - http://destiney.com/ > http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/ > --- > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Tutorial?
On Sat, 2 Mar 2002, Jennifer Downey wrote: >Can anyone point me to a good tutorial on how to disable a submit button >once clicked? >preferably in php. If you reload the page after the button is clicked then you can simply pass a $disable variable in your form as a hidden field, then you can check for the variable before drawing the button the second time. Sounds more like a javascript thing to me though. PHP is a server side scripting language, it's not designed to manipulate forms and buttons, where javascript is. -- --- Greg Donald - http://destiney.com/ http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/ --- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Tutorial?
Hi all, Can anyone point me to a good tutorial on how to disable a submit button once clicked? preferably in php. Thanks Jennifer Downey -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Tutorial?
You can check for PHP / MySQL books at : PHP: http://www.weberdev.com/index.php3?GoTo=ShowShoppingItems.php3%3FMasterCateg ory%3D156%26SubCategory%3D106%26SubCategoryName%3DPHP%26MainCategoryName%3DB ooks MySQL: == http://www.weberdev.com/index.php3?GoTo=ShowShoppingItems.php3%3FMasterCateg ory%3D156%26SubCategory%3D1%26SubCategoryName%3DMySQL%26MainCategoryName%3DB ooks Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, March 02, 2001 10:41 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Tutorial? Hi there, Iam new to the world of PHP, and after my boss told me to learn PHP and MySQL, I found my way here. I am gettign to frips with MySQL, and Basic PHP seems to be sticking in my brain, but I'd really appreciate it if you guys could point me in the direction of a good on-line tutorial that'd point out the basics of geting these two technologies to talk to one another. Ultimatly, I'd like to have a login screen, that checkes user name against password on my Database. You guys were recommended to me by a subscriber from another list, I hoep you can help. Thanks in advance, Tris... ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. ** -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Tutorial?
Welcome new person! Most people who ask this question generally get pointed in the direction of Julie C. Meloni's book "PHP Fast & Easy Web Development" It goes from the ABSOLUTE basics through to explaining [MySQL] database connectivity and sql statements. I used it and highly reccommend it. I also has a good Appendix of MySQL/PHP functionality + onlineplaces to visit for extra help. Julie's website is thickbook.com and look for the section for the book (above). ISBN: 0-7615-3055-X Price US$24.99 Can$ 37.95 GBP£18.99 Or just look for the above title on amazon.com HTH :) Russ #---# "Believe nothing - consider everything" Russ Michell Anglia Polytechnic University Webteam http://gertrude.sipu.anglia.ac.uk/webteam [EMAIL PROTECTED] +44 (0)1223 363271 ext 2331 www.theruss.com #---# -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Tutorial?
Hi there, Iam new to the world of PHP, and after my boss told me to learn PHP and MySQL, I found my way here. I am gettign to frips with MySQL, and Basic PHP seems to be sticking in my brain, but I'd really appreciate it if you guys could point me in the direction of a good on-line tutorial that'd point out the basics of geting these two technologies to talk to one another. Ultimatly, I'd like to have a login screen, that checkes user name against password on my Database. You guys were recommended to me by a subscriber from another list, I hoep you can help. Thanks in advance, Tris... ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. ** -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]