Forum Moderators: coopster

Message Too Old, No Replies

Call a PHP function from a form

Do not know if this is possible or not,

         

MrWhippy

8:38 pm on Mar 23, 2008 (gmt 0)

10+ Year Member



Hi all,

I have been using php for a short time now and have progressed my skills when the chance comes around.

I have just got the grasp of using libraries, i was actually being quite simple in what i was missing, however i have now come up with a new problem,

that is i want a form to call a funciton from a library, on submit,

is this possible,

<form id="form1" name="add" method="post" action= "AddArticle()">

the relevant form line is above, any pointers in the right direction would be appreciated.

thanks in advance.

steve

eelixduppy

12:55 am on Mar 24, 2008 (gmt 0)



>> that is i want a form to call a funciton from a library, on submit,

If you have the php function located on the action page then this will be possible without the use of an AJAX technology, but if my assumptions are correct, then you are looking for an AJAX solution. For starters, I would recommend the following tutorial: [news.php.net...]

MrWhippy

11:03 am on Mar 24, 2008 (gmt 0)

10+ Year Member



Many thanks eelixduppy,

i do want to store the functions in a library file if at all possible, i am on my way to the link you gave now.