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; } ?> Link to comment https://forums.phpfreaks.com/topic/211379-pass-parameter-in-form/ 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 Link to comment https://forums.phpfreaks.com/topic/211379-pass-parameter-in-form/#findComment-1102153 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? Link to comment https://forums.phpfreaks.com/topic/211379-pass-parameter-in-form/#findComment-1102310 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.