Skip to:
Content
Pages
Categories
Search
Top
Bottom

form action or link in a plugin

  • @tcesco

    Participant

    Hello all,

    I looked days and days to the Skeleton component to understand how to make a own plugin. Most of the things I wanted to do works allready. But one thing I can’t understand: what do I have to use in the <form action=”?”> to return to the same script.

    For example:

    I wrote a plugin wp-content/plugins/bp-example/dir/index.php with a form in it. After submitting I want to return to this script for processing the data. With $_SERVER[‘PHP_SELF’] I return to the index.php in root. When I give in http://www.site.com/wp-content/plugins/bp-example/dir/index.php it works but I don’t have the buddypress layout :-(

    Same problem when I use a link instead with get variables

    http://www.site.com/wp-content/plugins/bp-example/dir/index.php?var=1

    if($_GET[‘var’] ==1){

    print ‘ok’;

    }

    It prints ok, but without Buddypress layout…

    Sorry for my ignorance, I hope someone can help me!

    Thanks in advance!!

Viewing 1 replies (of 1 total)
  • @tcesco

    Participant

    Sorry I disturbed you, I found a solution myself. <form method=”post”> works perfect. No action needed…

Viewing 1 replies (of 1 total)
  • The topic ‘form action or link in a plugin’ is closed to new replies.
Skip to toolbar