Jump to content

Pass parameter in form


alicefreak

Recommended Posts

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?

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.