473,761 Members | 10,280 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

posting from a form without a submit button - how?

Given something like:

if ( $_POST['type_save'] == 'Save record to HTGI public DB') {
echo '<form method="post" action="populat e08.php">';
echo '<input type=hidden name="kw_tarea" value='.$tk.'>' ;
echo '</form>';
echo '<p>permanent DB updated';
}

But there's no button to press for a submit. So how do I get this code
posted to the action=populate 08 ? Without pressing a buttom but just
from the code?

Thanks
Jul 17 '05 #1
2 4066
Hal Halloway wrote:
Given something like:

if ( $_POST['type_save'] == 'Save record to HTGI public DB') {
echo '<form method="post" action="populat e08.php">';
echo '<input type=hidden name="kw_tarea" value='.$tk.'>' ;
echo '</form>';
echo '<p>permanent DB updated';
}

But there's no button to press for a submit. So how do I get this code
posted to the action=populate 08 ? Without pressing a buttom but just
from the code?

Thanks


Updating your database without having the user expressly desire
to do so is not a good idea.

Unless you give the user a chance to look over what they have
done before doing a database update or insert and then expressly
approve by pressing a button you significantly increase the
probability of having corrupt data.

Jerry
Jul 17 '05 #2
Jerry Gitomer wrote:
Hal Halloway wrote:
Given something like:

if ( $_POST['type_save'] == 'Save record to HTGI public DB') {
echo '<form method="post" action="populat e08.php">';
echo '<input type=hidden name="kw_tarea" value='.$tk.'>' ;
echo '</form>';
echo '<p>permanent DB updated';
}

But there's no button to press for a submit. So how do I get this code
posted to the action=populate 08 ? Without pressing a buttom but just
from the code?

Thanks

Updating your database without having the user expressly desire to do so
is not a good idea.


Good advice and I'm changing my layout and code to reflect it. Thanks!

Unless you give the user a chance to look over what they have done
before doing a database update or insert and then expressly approve by
pressing a button you significantly increase the probability of having
corrupt data.

Jerry

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
4326
by: wk6pack | last post by:
Hi, I have a problem and not quite how to go about solving it. I have a form written in asp. I wish to submit the form and have the server return back to the same page without actually refreshing the page. I know I could write a form, submit it and go to another page. I've searched the web and I see something about HTTP Status code of 204
3
2576
by: Itai | last post by:
I have an aspx file named index.aspx which contains two ‘form' sections, one that has the runat=server attribute (e.g From1) and one which is a regular HTML form (e.g SignInForm). I am trying to copy values from two INPUT controls that are located within the Form1 section to hidden INPUT controls located in the SignInForm and post the SignInForm form hidden controls values to a different page (e.g login.aspx) Problem is that after...
8
6191
by: bettina | last post by:
I want to submit a form but without a submit button. That's to say, I want that by giving a definite code in a field and then press <ENTER> the form will be submitted. For Example <form name="search_form" method="post" action="search.php"> ..... .... Code: <input type="text" name="code" onKeyPress="if (event.keyCode == 13) {document.search_form.submit()};">
10
4189
by: DaveFash | last post by:
Posting variables from an HTML FORM, via the Request.Form function on the receiving ASP page is great. But how can you POST a Form variable to an ASP page -- without a human pushing a Submit button? An ASP page that can decide when to POST and send the Form vaiables, but out without a
6
1718
by: varkey.mathew | last post by:
Hi there, I have a basic form with a postback. The following is a line of dynamic code written so that when the user clicks on the Button control, he will receive a confirm messagebox. btnSubmit.Attributes.Add("onclick","return confirm('Are you sure you want to leave without saving your change(s)?');");
16
1761
by: Art | last post by:
Can anyone help. I've tried scaling down a script to the bare minimum and it still is not working correctly. What I think should happen is that when the field app_fname is blank, that $hold_chk will get set to 1 and the 1st if statement will be executed. What actually happens is that when I hit submit, the form stays where it is, for example if the form where the submit button is located is on the form other.php, then when I hit submit...
17
2119
by: Johnny BeGood | last post by:
Hi All, Is there a way to post the contents of a form without having to click on the Submit button, i.e <form method="post" action="http://www.whereever.com/ProcessTheData.php"> <INPUT name="Field1" type="text"> <INPUT name="Field2" type="text"> <INPUT name="Field3" type="text"> <INPUT name="EsendexRecipient" type="text">
18
1682
by: Fester Bestertester | last post by:
Greetings, I'm an occasional php/mysql dabbler. I have a basic data form with a submit button. Unfortunately, it's still possible for the user to enter data changes and close the window, without clicking the submit button, thus losing the data. Can someone point me to a generic example of some code that will trap and handle this error?
1
7294
by: gnawz | last post by:
Hi guys, I have a couple of php files that perform various tasks. I will use fields in my system and provide code as well I need help as follows: My database contains the fields Category and Brand I need to make some changes on a a number of brands in a Category
0
9345
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10115
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9775
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7332
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5229
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3881
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2752
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.