Ask a Question related to PHP Development, Design and Development.
-
Ricki Susic #1
Call function from <form>
Hi,
Can anyone tell me if it is possible to call a function from a html form,
where the function is included in the same file as the form.
<html>
<body>
<form method="post" action="what do I write here to acces function test()">
<input type="text" name="tekst">
<input type="submit" value="send">
</form>
<?php
function test(){
echo $tekst;
}
?>
</body>
</html>
Regards Ricki
Ricki Susic Guest
-
Function call
Hi, I need to call a function in my asp.net application from a vb.net windows application running on the same machine. Is this generally... -
How do I call a function?
created a function: how do I call it? thx -
Flash MX 2004 Prof - Form application function call question
I have a flashmx 2004 professional application using forms. I am able to call methods on my application form from child forms with no problem. ... -
How do I call an outer function from a class method function?
I'm sorry guys but this is a bad day for me. I tried researching this one and was totally stonewalled (see... -
How to call perl function from PHP
I have a function writen in Perl that takes a name-value list (array) as argument and returns a name-value list (array). My question is: How to... -
Eto Demerzel #2
Re: Call function from <form>
In article <3f73e270$0$97259$edfadb0f@dread12.news.tele.dk> , Ricki
Susic's output was...The HTML form needs to be a part of a .php file - and so action should => Hi,
> Can anyone tell me if it is possible to call a function from a html form,
> where the function is included in the same file as the form.
>
"filename.php" or do something like
<?PHP
printf("<FORM action=\"$PHP_SELF\" method=\"post\">");
?>
You can do something along the lines of
if ($tekst) {
Function_WhateverGoesHere();
}
to determine if something has been sent to the script already, or if you
should just be displaying the form.
**_ IF you have register_globals turned OFF (Like I should have by now)-
$tekst will be $HTTP_POST_VARS['tekst']
instead.
--
CurrentlyRavingAbout:
[url]www.badgerbadgerbadger.com[/url]
Eto Demerzel Guest
-
Yves Brault #3
Re: Call function from <form>
Or maybe you should use JavaScript at that point...
"Eto Demerzel" <eto.demerzel@fijivillage.com> wrote in message
news:MPG.19ddf8c38cee648898971a@news-text.blueyonder.co.uk...form,> In article <3f73e270$0$97259$edfadb0f@dread12.news.tele.dk> , Ricki
> Susic's output was...> > Hi,
> > Can anyone tell me if it is possible to call a function from a html> The HTML form needs to be a part of a .php file - and so action should => > where the function is included in the same file as the form.
> >
> "filename.php" or do something like
>
> <?PHP
> printf("<FORM action=\"$PHP_SELF\" method=\"post\">");
> ?>
>
> You can do something along the lines of
>
> if ($tekst) {
> Function_WhateverGoesHere();
> }
> to determine if something has been sent to the script already, or if you
> should just be displaying the form.
>
>
> **_ IF you have register_globals turned OFF (Like I should have by now)-
> $tekst will be $HTTP_POST_VARS['tekst']
> instead.
>
>
> --
> CurrentlyRavingAbout:
> [url]www.badgerbadgerbadger.com[/url]
Yves Brault Guest



Reply With Quote

