Please help with register form set up!

Discussion in 'Programming' started by VestnikRA, Sep 26, 2008.

  1. #1
    Hi Everyone!
    I need your help, please!
    Trying to set up a register form (with members database) on my site and have got a problem.
    Every time I press register button I am redirected to cgi file (the script appears in my browser) instead of any other messages.

    What am I doing wrong???

    I checked the perl interpreter line - #!/usr/bin/perl
    And I changed permissions according to the instructions:
    4) Change permissions for these:
    chmod a+rw(766) data (make data folder readable and writable)
    chmod a+rx(755) pm.cgi (make the script readable and executable)
    Here is my register page - http://www.spaceoflovemagazine.com/pm/register.html
    And here is my pm.cgi file:

    #!/usr/bin/perl

    ##############################################
    ## ##
    ## PROFILE MANAGER 1.13 ##
    ## ##
    ## Aytekin Tank ##
    ## email: aytekin@interlogy.com ##
    ## http://www.interlogy.com/scripts/pmpre ##
    ## ##
    ## Copyright 1999-2001, Aytekin Tank. ##
    ## ##
    ##############################################


    ###############################
    # Let the browser know..
    ###############################
    print "Content-type: text/html\n\n";

    ###############################
    # Security block:
    ###############################
    @blocked_features = qw( delete modify deleted modify_success delete_success panel );

    if($input{'action'} eq "show"){
    foreach(@blocked_features){
    if($input{'temp'} eq $_){
    err("This feature is blocked for \"show\" action!");
    exit;
    }
    }
    }

    ###############################
    # Make it easy to find the errors
    ###############################
    eval("main");
    if ($@) {
    print "Content-type: text/plain\n\n",
    &err("<p>\n$@\n");
    }

    sub main
    {
    ###############################
    # functions library:
    ###############################
    require "${root}pm.lib";

    ###############################
    # Read the data coming from the form..
    ###############################
    if(!$dontparse){ &readit; }

    ###############################
    # main comfiguration file:
    ###############################
    require "${root}pm.cfg";

    ###############################
    # some definations:
    ###############################
    $info = "login=$input{'login'}";
    if($input{'ID'} ne "")
    { $info .= "&ID=$input{'ID'}"; $gotid=1;}
    elsif((&pm_check) eq "yes")
    { $info .= "&ID=$values{'ID'}";}
    &init_errors;


    ###############################
    # create the links
    ###############################
    &link_em;

    ########
    # MENU #
    ########
    if ($input{'action'} eq "display")
    { &display_cgi;}
    elsif ($input{'action'} eq "delete")
    { if(!(&pm_check =~ /^n/)){&pm_delete_form;} }
    elsif ($input{'action'} eq "deleted")
    { &pm_delete; }
    elsif ($input{'action'} eq "register")
    {&pm_register; }
    elsif ($input{'action'} eq "search")
    {&search_cgi; }
    elsif ($input{'action'} eq "error")
    { &err($error_message{$input{'why'}}); }
    elsif ($input{'action'} eq "modify")
    { if(!(&pm_check =~ /^n/)){&pm_modify_form;} }
    elsif ($input{'action'} eq "show")
    { $input{'action'}=$input{'temp'}; &tempwiz; }
    elsif ($input{'action'} eq "modified")
    { &pm_modify; }
    elsif ($input{'action'} eq "login")
    { if($save_stats eq "yes") {&log_event;} &panel_check; }
    elsif ($input{'action'} eq "send_password")
    { &pm_send_password; }

    else
    { &panel_check; }

    exit;
    }
    #######
    # END #
    #######
     
    VestnikRA, Sep 26, 2008 IP
  2. cool_goan

    cool_goan Banned

    Messages:
    250
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I would suggest you to use php to achieve the task.
     
    cool_goan, Sep 26, 2008 IP