473,395 Members | 1,474 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

can a php function be called on submit

Hi

Is it possible to call a PHP function when a forms Submit button is pressed.

Thanks

AL
Jul 17 '05 #1
2 11416
Andy Levy wrote:
Hi

Is it possible to call a PHP function when a forms Submit button is
pressed.

Thanks

AL


If you mean on the same page, no. PHP is server side. It is parsed into HTML
/ whatever before it is sent to the client. The client never sees any PHP.
Now of course, you can pass the form data to another page on the server,
which can call whatever functions it wants to process the data...

// Ian Fette
Jul 17 '05 #2
"Andy Levy" <an*******@hotmail.com> wrote in message
news:<HF*****************@news-binary.blueyonder.co.uk>...

Is it possible to call a PHP function when a forms Submit
button is pressed.


Yes, if this function is in the script referred to in the form's
action attribute. No, if you want to call it when handling
onSubmit or onClick events -- those are handled on the client
side using JavaScript.

Cheers,
NC
Jul 17 '05 #3

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

Similar topics

3
by: Varun | last post by:
Hi There, I have a form("myRequest.asp") and the values from it are retrieved into the page ("output_Print.asp") on which I have two buttons('Save As Complete' and 'Save As Incomplete'). When the...
3
by: JoeK | last post by:
Hey all, I am automating a web page from Visual Foxpro. I can control all the textboxes, radio buttons, and command buttons using syntax such as: ...
2
by: Justin Koivisto | last post by:
This is probabally a basic question, but I don't quite understand what is going on with this... Say I have a variable called "myObject" which is an object created from a class I wrote. The class...
5
by: siaj | last post by:
Hello, I have a javascript function for a validation in the HTML page of the asp.Net page.. I call this function in a Savebutton click When the validation fails No postback should happen ( ie...
1
by: Sky Kim | last post by:
Hi, all. I got stuck...here.. Let me simplify my problem.. I added One TextBox, and Required Validator associated with the textbox. And, Submit button. When submit is clicked it should do...
10
by: ljlolel | last post by:
So.. I have a form that submits to an ASP.net site made in C-sharp. The ASP site is not mine, i do not have the server side code. When I submit from my form by pressing the Submit button, I get...
3
by: Tanmaya Kulkarni | last post by:
Hi, I have a web application where I need to call backend C#/VB.Net functions from javascript. Is it possible..and how? Thanks, Tanmaya
11
by: yangsuli | last post by:
i want to creat a link when somebody click the link the php script calls a function,then display itself :) i have tried <a href=<? funtion(); echo=$_server ?>text</a> but it will call the...
6
by: yawnmoth | last post by:
I'm trying to write a so-called bookmarklet for a specific web app and am having some difficulty. One of the names of a specific forms inputs is submit. As such, doing...
13
by: Andrew Falanga | last post by:
HI, Just a warning, I'm a javascript neophyte. I'm writing a function to validate the contents of a form on a web page I'm developing. Since I'm a neophyte, this function is quite simple at...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...

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.