Current location: Hot Scripts Forums » General Web Coding » JavaScript » Bottom inserting into database? how can i do this??


Bottom inserting into database? how can i do this??

Reply
  #1 (permalink)  
Old 08-11-06, 10:36 PM
hossamhamdi1986 hossamhamdi1986 is offline
Newbie Coder
 
Join Date: Aug 2005
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
Bottom inserting into database? how can i do this??

how can i make a bottom insert something into the database
and after inserting the bottom become unvallible?
Reply With Quote
  #2 (permalink)  
Old 08-12-06, 02:14 AM
duesi's Avatar
duesi duesi is offline
Wannabe Coder
 
Join Date: Jun 2006
Posts: 225
Thanks: 0
Thanked 0 Times in 0 Posts
To do this, you need server side scripting like PHP, Perl, Ruby or whatever.
Javascript will not help.
__________________
Duesi

"One of the great skills in using any language is knowing what not to use, what not to say" (Ron Jeffries)

http://www.swissbytes.de
Reply With Quote
  #3 (permalink)  
Old 08-12-06, 02:25 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
Duesi is right.

As for the button, try this.
Code:
<input type="submit" onclick="this.disabled=true" value="Submit" />
Reply With Quote
  #4 (permalink)  
Old 08-12-06, 03:47 AM
hossamhamdi1986 hossamhamdi1986 is offline
Newbie Coder
 
Join Date: Aug 2005
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
thanks but this bottom will transfer me to another page can i make this without transfer
Reply With Quote
  #5 (permalink)  
Old 08-12-06, 03:54 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
If you want to insert data to a database, you will have to submit the form to another or the same page.
Reply With Quote
  #6 (permalink)  
Old 08-12-06, 03:59 AM
hossamhamdi1986 hossamhamdi1986 is offline
Newbie Coder
 
Join Date: Aug 2005
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
yeah ok thanks for fast reply & help
Reply With Quote
  #7 (permalink)  
Old 08-12-06, 09:01 AM
hossamhamdi1986 hossamhamdi1986 is offline
Newbie Coder
 
Join Date: Aug 2005
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
plz is there something wrong with this?
Code:
<form action="http://www.downloadwar.net/report.php" method="post">

<input type="submit" onclick="this.disabled=true" value="Report Bad Link!" style="font-size: 10pt; font-family: tahoma; font-weight: bold; color: #FFFFFF; border: 1px solid #C0C0C0; background-color: #000000" />

<input type="hidden" name="link" value="link here">

</form>

Last edited by nico_swd; 08-12-06 at 09:08 AM.
Reply With Quote
  #8 (permalink)  
Old 08-12-06, 09:11 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
Doesn't seem like. Having problems?

EDIT:

Quote:
and after inserting the bottom become unvallible?
I may misunderstood the main question. You want to diabled the button AFTER the data is submitted to the database? You would have to store the IP temporary or set a session or a cookie to know THIS user has submitted the form already and disable the button.

Last edited by nico_swd; 08-12-06 at 09:50 AM.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
apostrophes error while inserting variables containing them in database zitwep PHP 2 06-30-06 10:16 PM
restrict inserting data into database prince PHP 1 03-13-06 04:09 PM
inserting and retrieving date and time from mysql database stealth04 PHP 5 07-29-04 11:19 AM
inserting Filename + extension into the database mcrob PHP 5 07-21-04 03:22 AM
php/mysql inserting twice into database with IE 6 sky4est PHP 3 04-22-04 12:46 PM


All times are GMT -5. The time now is 11:15 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.