WordPress.org

Ready to get started?Download WordPress

Forums

Function not found (2 posts)

  1. hllawrence
    Member
    Posted 2 years ago #

    Hi all,
    This is my first post here, so please forgive me if I'm missing any common post etiquette. Please feel free to point me towards any post recommendation documents that I might have missed.

    I am creating a new wordpress plugin, and this is the first time I've done this.

    The file I'm working on is just meant to allow the user to manage a list of resources (add, delete, create, and change between Active and Inactive). I had this all working with multiple files (resources.php, resources_delete.php, resources_add.php, etc) but thought it was probably not good programming to have a different file for every action. I am working now on having all of the resources code within one file (resources.php).

    I have created a drop-down box so the user can choose if they want to see active resources or inactive ones. Based on the drop-down box, I want to change the output of the page. When the dropdown is updated, a function called "process()" would be called to display the page based on the input. However, when I click the View button, it says the function is not found.

    Can anyone help? Is there some way that I'm supposed to register the function or am I just out to lunch on my method here?

    <?php 
    
    global $wpdb; 
    
    $ddoutput = $pre_HTML; 
    
    $ddoutput .= "<form action=process($dropdown) method=\"post\" name=\"actorinact\">
    Record Type:
    <select name=\"dropdown\" value=\"options\">
    <option value>Choose an option</option>
    <option value=\"active\">Active</option>
    <option value=\"inactive\">Inactive</option>
    </SELECT>
    
    <INPUT type=\"submit\" value=\"View\">
    
    </form> ";
    
    $ddoutput .= $post_HTML; 
    
    echo $ddoutput;
    
    function process($dropdown)
    {.....

    Thanks very much,
    Heather

  2. hllawrence
    Member
    Posted 2 years ago #

    Sorry, this is in the wrong forum, so I'm recreating it under Hacks.

Topic Closed

This topic has been closed to new replies.

About this Topic