How to Fix this form register, Plis?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to Fix this form register, Plis?

    If every guest register is unsuccessfull, Help?
    <?

    /////////////////////////// разработка StarWap-Group ///////////////////////////////

    Error_Reporting(E_ALL & ~E_NOTICE);
    header("Content-type:text/vnd.wap.wml;charset=utf-8"); //////// тип и кодировка документа
    print "<?xml version=\"1.0\" encoding=\"utf-8\"?>
    <!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.2//EN\" \"http://www.wapforum.org/DTD/wml12.dtd\">
    <wml><card id=\"main\" title=\"Greens\"><p>";

    $kod="<a href=\"http://***/on/online.php?on="; /////////код счетчика
    $kod2="\"><img src=\"http://***/on/counter.php?nc=";
    $kod3="\" alt=\"online\" /></a>";
    $kod=htmlspecialchars(stripslashes($kod));
    $kod2=htmlspecialchars(stripslashes($kod2));
    $kod3=htmlspecialchars(stripslashes($kod3));

    $name=htmlspecialchars(stripslashes($name));
    $adres=htmlspecialchars(stripslashes($adres));
    $infa=htmlspecialchars(stripslashes($infa));
    $pas=htmlspecialchars(stripslashes($pas));

    if($name!="$_GET[name]"){
    if($adres!=""){
    if($infa!=""){
    if($pas!=""){
    $tr1=array(":","/");
    $tr2=array("d","s");
    $pglav=str_replace($tr1,$tr2,$adres);
    $taf = @implode("",@file("af/$pglav.af"));
    $taf=trim($taf);
    if($taf==""){
    $counterarray = file("vsego.vr");
    $id = $counterarray[0]+1;
    $fp = @fopen("vsego.vr","wb");
    @fputs($fp,$id);
    @fclose($fp);//////// увеличиваем счетчик регистрации
    $zap="$name:||:$adres:||:$infa:||:$pas";

    $fp=fopen("konf/$id.konf","w");
    fputs($fp,"$zap \r\n");
    fclose($fp);
    chmod ("konf/$id.konf", 0777);//////// создаем файл с параметрами
    $fp=fopen("af/$pglav.af","w");
    fputs($fp,"$id \r\n");
    fclose($fp);
    chmod ("af/$pglav.af", 0777);//////// создаем файл с параметрами
    print"Registration successfully! Your registration number id: $id<br/>Your online counter links:<br/>
    $kod$id$kod2$id$kod3";}
    else{print"The site url already registered: $adres,your registration number id: $taf <br/><anchor>Return<prev/></anchor>";}}

    else{print"Please,fill all the fields! <br/><anchor>Return<prev/></anchor>";}}
    else{print"Sorry,your registration unsuccessfully! <br/><anchor>Return<prev/></anchor>";}}
    else{print"Registration failed!";}}
    else{print"You did not introduce the name of your site! <br/><anchor>Return<prev/></anchor>";}


    print "
    <br/>* * * * *<br/><a href=\"/on\">Online Host</a><br/><br/>[<a href=\"/\">Home</a>]</p></card></wml>";
    ?>

    #2
    PHP Code:
    $name=htmlspecialchars(stripslashes($_GET['name']));
     
    $adres=htmlspecialchars(stripslashes($_GET['adres']));
     
    $infa=htmlspecialchars(stripslashes($_GET['infa']));
     
    $pas=htmlspecialchars(stripslashes($_GET['pas']));

    if(
    $name==$_GET['name']){ 
    may need $_POST['name'] etc depending on the form
    Last edited by something else; 25.04.12, 23:35.

    Comment


      #3
      Thank's i will try it... ;)

      Comment


        #4
        @something I still cannot fix it, i use ur told but still not working, this file inreg.php
        <?

        /////////////////////////// разработка StarWap-Group ///////////////////////////////

        Error_Reporting(E_ALL & ~E_NOTICE);
        header("Content-type:text/vnd.wap.wml;charset=utf-8"); //////// тип и кодировка документа
        print "<?xml version=\"1.0\" encoding=\"utf-8\"?>
        <!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.2//EN\" \"http://www.wapforum.org/DTD/wml12.dtd\">
        <wml><card id=\"main\" title=\"Greens\"><p>";

        $kod="<a href=\"http://greens.kjhost.org/on/online.php?on="; /////////код счетчика
        $kod2="\"><img src=\"http://greens.kjhost.org/on/counter.php?nc=";
        $kod3="\" alt=\"online\" /></a>";
        $kod=htmlspecialchars(stripslashes($kod));
        $kod2=htmlspecialchars(stripslashes($kod2));
        $kod3=htmlspecialchars(stripslashes($kod3));

        $name=htmlspecialchars(stripslashes($name));
        $adres=htmlspecialchars(stripslashes($adres));
        $infa=htmlspecialchars(stripslashes($infa));
        $pas=htmlspecialchars(stripslashes($pas));

        if($name!=""){
        if($adres!=""){
        if($infa!=""){
        if($pas!=""){
        $tr1=array(":","/");
        $tr2=array("d","s");
        $pglav=str_replace($tr1,$tr2,$adres);
        $taf = @implode("",@file("af/$pglav.af"));
        $taf=trim($taf);
        if($taf==""){
        $counterarray = file("vsego.vr");
        $id = $counterarray[0]+1;
        $fp = @fopen("vsego.vr","wb");
        @fputs($fp,$id);
        @fclose($fp);//////// увеличиваем счетчик регистрации
        $zap="$name:||:$adres:||:$infa:||:$pas";

        $fp=fopen("konf/$id.konf","w");
        fputs($fp,"$zap \r\n");
        fclose($fp);
        chmod ("konf/$id.konf", 0777);//////// создаем файл с параметрами
        $fp=fopen("af/$pglav.af","w");
        fputs($fp,"$id \r\n");
        fclose($fp);
        chmod ("af/$pglav.af", 0777);//////// создаем файл с параметрами
        print"Registration successfully! Your registration number id: $id<br/>Your online counter links:<br/>
        $kod$id$kod2$id$kod3";}
        else{print"The site url already registered: $adres,your registration number id: $taf <br/><anchor>Return<prev/></anchor>";}}

        else{print"Please,fill all the fields! <br/><anchor>Return<prev/></anchor>";}}

        else{print"Sorry,your registration unsuccessfully! <br/><anchor>Return<prev/></anchor>";}}
        else{print"Registration failed!";}}
        else{print"You did not introduce the name of your site! <br/><anchor>Return<prev/></anchor>";}
        print "
        <br/>* * * * *<br/><a href=\"http://greens.kjhost.org/on\">Online Host</a><br/><br/>[<a href=\"http://greens.kjhost.org\">Greens Home</a>]</p></card></wml>";
        ?>

        Added after 2 minutes:

        And this file form register vreg.php
        <?

        /////////////////////////// разработка StarWap-Group ///////////////////////////////

        Error_Reporting(E_ALL & ~E_NOTICE);
        header("Content-type:text/vnd.wap.wml;charset=utf-8");
        print "<?xml version=\"1.0\" encoding=\"utf-8\"?>
        <!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.2//EN\" \"http://www.wapforum.org/DTD/wml12.dtd\">
        <wml><card id=\"main\" title=\"Greens\"><p align=\"center\">";
        print"<b>Please fill all the fields below!</b>
        <br/>
        <br/>
        Site name: <br/><input name=\"name\" maxlength=\"25\" value=\"\"/><br/>
        Site URL: <br/><input name=\"adres\" maxlength=\"55\" value=\"http://\"/><br/>
        Counter name: <br/><input name=\"infa\" maxlength=\"80\" value=\"online\"/><br/>
        Password: <br/> <input name=\"pas\" maxlength=\"15\" type=\"password\" value=\"\"/><br/>
        <anchor title=\"ok\">OK
        <go href=\"inreg.php\" method=\"post\">
        <postfield name=\"name\" value=\"$(name)\"/>
        <postfield name=\"adres\" value=\"$(adres)\"/>
        <postfield name=\"infa\" value=\"$(infa)\"/>
        <postfield name=\"pas\" value=\"$(pas)\"/>

        </go>
        </anchor><br/>
        ";
        print "
        <br/><a href=\"http://greens.kjhost.org/on/index.php\">Online Host</a></p></card></wml>";
        ?>
        Pliss... i'm very confused???
        I use fucntions GET but still not working buddy... Plis Help

        That is Original code... friends
        Last edited by mufasya; 26.04.12, 10:18.

        Comment


          #5
          you could try

          you could try replacing

          PHP Code:
          $name=htmlspecialchars(stripslashes($name));
          $adres=htmlspecialchars(stripslashes($adres));
          $infa=htmlspecialchars(stripslashes($infa));
          $pas=htmlspecialchars(stripslashes($pas)); 
          with


          PHP Code:
          $name=htmlspecialchars(stripslashes($_REQUEST['name'])); 
           
          $adres=htmlspecialchars(stripslashes($_REQUEST['adres'])); 
           
          $infa=htmlspecialchars(stripslashes($_REQUEST['infa'])); 
           
          $pas=htmlspecialchars(stripslashes($_REQUEST['pas'])); 
          Creator of
          Epix.Mobi

          Keep an Eye on us Big things coming soon!!!!
          Need something for your site hit me up here

          http://coding-talk.com/forum/main-fo...r-your-wapsite

          Comment


            #6
            Thank's buddy, but any else more trick for more change this code to make this script working? friends ;)

            Comment

            Working...
            X