alicefreak Posted August 21, 2010 Share Posted August 21, 2010 Hello, I want to use this function in form. How can I pass parameter in form ? please help me. Thanks <?php function displayName($fetch) { echo "your Name is ".$fetch; } ?> Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted August 21, 2010 Share Posted August 21, 2010 Please explain what you are trying to do better. Ken Quote Link to comment Share on other sites More sharing options...
alicefreak Posted August 22, 2010 Author Share Posted August 22, 2010 I am trying to run a function from a PHP script in the form action. <?php function displayName($fetch) { echo "your Name is ".$fetch; } ?> echo ' <form name="form1" method="post" action="displayName(search)"> <input type="text" name="search" id="search"> <p> <label> <input type="submit" name="button" id="button" value="Submit"> </label> </p> </form>'; </php] I want the function "displayName" which is called from namelist.php to be executed. how can I do that? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.