Is there any way to submit a form to a PHP function rather than a page?
IE -
<FORM METHOD="POST" NAME="TESTFORM" ACTION="<? submitdata; ?>">
Thanks.
Submit Form to PHP Function
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Galahad is right, PHP is server-side therefore you cannot access PHP functions (user defined or built in) without posting data to the server, refreshing the page or going to a new page. What you can do is submit the page to itself (look into $_SERVER['PHP_SELF']) and then have an if loop to check if the page has been submitted in order to run the code to validate the info or whatever. If you want pop-up boxes and such with warnings you need to use javascript which is client side.
So the answer to your question is no. Oh and please read this... (note point 2)
Mac
So the answer to your question is no. Oh and please read this... (note point 2)
Mac