Using a function from process.inc.php in a form on another page -


i trying create form has (using table formatting now.

<form action="addcontent()" method="post" class="formleft">      <table>         <tr>             <td></td>             <td><input type="hidden" id="id"/></td>         </tr>         <tr>             <td>page:</td>             <td><input type="text" id="page"/></td>         </tr>         <tr>             <td>information:</td>             <td><textarea id="info"></textarea></td>         </tr>         <tr>             <td></td>             <td><input type="submit" id="submit" value="add content">         </tr>      </table> </form> 

how can use function called addcontent() within process.inc.php ? ideas?

  • the action should filename not function name

    action="process.inc.php"

  • and if want call function have use onsubmit in form tag calling function when submitting form

    onsubmit="addcontent()"

  • for including content of process.inc.php in other file use below code

    include_once("path-to-file/process.inc.php");


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -