Codes From Wml To Xhtml (help)

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

    Codes From Wml To Xhtml (help)

    someone can write this in php XHTML..thanks

    echo "Logo/Photo:
    ";
    echo "<input name=\"logo\" type=\"text\" value=\"http://\" maxlength=\"128\" emptyok=\"true\"/>
    ";

    echo "Real name:
    ";
    echo "<input name=\"name\" type=\"text\" value=\"\" maxlength=\"16\" emptyok=\"true\"/>
    ";

    echo "Age:
    ";
    echo "<input name=\"age\" type=\"text\" format=\"*N\" maxlength=\"2\" emptyok=\"true\"/>
    ";

    echo "Sex:
    ";
    echo "<select name=\"sex\" title=\"sex\"><option value=\"Male\">male</option><option value=\"Female\">female</option></select>
    \n";

    echo "Location:
    ";
    echo "<input name=\"location\" type=\"text\" value=\"\" maxlength=\"25\" emptyok=\"true\"/>
    ";

    echo "Signiture:
    ";
    echo "<input name=\"signiture\" type=\"text\" value=\"\" maxlength=\"60\" emptyok=\"true\"/>
    ";

    echo "Your site:
    ";
    echo "<input name=\"site\" type=\"text\" value=\"http://\" maxlength=\"128\" emptyok=\"true\"/>
    ";

    echo "Email:
    ";
    echo "<input name=\"email\" type=\"text\" value=\"@\" maxlength=\"50\" emptyok=\"true\"/>
    ";

    echo "<small>";
    echo "<anchor>Update";
    echo "<go method=\"post\" href=\"updateprofile2.php?time=".date(ymdHis)."\"> ";
    echo "<postfield name=\"nimi\" value=\"$(nimi)\"/>";
    echo "<postfield name=\"salasana\" value=\"$(salasana)\"/>";
    echo "<postfield name=\"logo\" value=\"$(logo)\"/>";
    echo "<postfield name=\"name\" value=\"$(name)\"/>";
    echo "<postfield name=\"age\" value=\"$(age)\"/>";
    echo "<postfield name=\"sex\" value=\"$(sex)\"/>";
    echo "<postfield name=\"location\" value=\"$(location)\"/>";
    echo "<postfield name=\"signiture\" value=\"$(signiture)\"/>";
    echo "<postfield name=\"site\" value=\"$(site)\"/>";
    echo "<postfield name=\"email\" value=\"$(email)\"/>";
    echo "</go>";
    echo "</anchor>
    ";
    sigpicthe italian/international COMMUNITY of friendship
    http://people2000.netne.net
    WAP/WEB
    peoplemailbox@katamail.com

    #2
    Code:
    echo "<form action=\"updateprofile2.php?time=".date(ymdHis)."\" method=\"post\">";
        echo "Avatar: <input name=\"savat\" maxlength=\"100\" value=\"$avat\"/>
    ";
        echo "E-Mail: <input name=\"semail\" maxlength=\"100\" value=\"$email[0]\"/>
    ";
        echo "Site: <input name=\"usite\" maxlength=\"100\" value=\"$site[0]\"/>
    ";
        echo "Birthday(YYYY-MM-DD): <input name=\"ubday\" maxlength=\"50\" value=\"$bdy[0]\"/>
    ";
        echo "Location: <input name=\"uloc\" maxlength=\"50\" value=\"$uloc[0]\"/>
    ";
        echo "Signature: <input name=\"usig\" maxlength=\"100\" value=\"$usig[0]\"/>
    ";
        echo "Sex: <select name=\"usex\" value=\"$sx[0]\">";
        echo "<option value=\"M\">Male</option>";
        echo "<option value=\"F\">Female</option>";
        echo "</select>
    ";
    echo "<input type=\"submit\" value=\"Update\"/>";
        echo "</form>";
    edit it ur code bro

    Comment


      #3
      thanks so much..
      i see one thing ..why in
      echo "E-Mail: <input name=\"semail\" maxlength=\"100\" value=\"$email[0]\"/>
      "; and other inputs there is [0]
      instead in
      echo "Avatar: <input name=\"savat\" maxlength=\"100\" value=\"$avat\"/>
      "; there is not?..

      may i use [0] or not without problems?
      sigpicthe italian/international COMMUNITY of friendship
      http://people2000.netne.net
      WAP/WEB
      peoplemailbox@katamail.com

      Comment


        #4
        what script u using bro

        Comment


          #5
          [0] is the number of the item that your fetching from the array of items selected from database

          where as $avat will be a function that will fetch it from the function list ..... in this case more than likely core.php

          eg.

          $avat = getavtatar($uid);

          Comment


            #6
            i have done a chat in php xhtml from old wappy and nochat..no database .

            i have done the registration page in xhtml and it works right..but i have troubles on update profiles..
            i changed wml codes to xhtml as i done for registration page..but for some reason the profile page txts don&#39;t change
            when i try to update..
            sigpicthe italian/international COMMUNITY of friendship
            http://people2000.netne.net
            WAP/WEB
            peoplemailbox@katamail.com

            Comment


              #7
              post your updateprofile2.php

              Comment


                #8
                post your updateprofile2.php [/b]




                <? include("ipban.php"); ?><? include("admin.php"); ?><? include("ban.php"); ?>
                <?php
                header("Content-type: text/html; charset=ISO-8859-1");
                echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n";
                echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"
                \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">\n";

                echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";
                $nimi = $_POST["nimi"];
                $salasana = $_POST["salasana"];
                $unm = $_POST["unm"];
                $uag = $_POST["uag"];
                $usx = $_POST["usx"];
                $ulc = $_POST["ulc"];
                $aaa = $_POST["aaa"];
                $bbb = $_POST["bbb"];
                $ccc = $_POST["ccc"];
                $ddd = $_POST["ddd"];


                echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";
                $time=date("H:i",time());
                echo "<head>\n";
                echo "<title>$time profilo</title>\n";
                echo "</head>\n";
                echo "<body bgcolor=\"#CCCC66\" link=\"#0000CC\" vlink=\"#0000CC\" alink=\"#0000CC\">\n";




                echo "<center>";

                echo "<img src=\"cartella/cpanel.gif\" alt=\"--\"/>
                ";







                $fl = "users/$nimi.uin";
                $fh = fopen($fl, "w+");
                fwrite($fh, $unm."\n");
                fwrite($fh, $uag."\n");
                fwrite($fh, $usx."\n");
                fwrite($fh, $ulc."\n");
                fwrite($fh, $aaa."\n");
                fwrite($fh, $bbb."\n");
                fwrite($fh, $ccc."\n");
                fwrite($fh, $ddd);
                fclose($fh);
                echo "grazie, il tuo PROFILO è stato AGGIORNATO con SUCCESSO..";
                echo "

                ";
                echo "ora x favore..";
                echo "<a href=\"sisaan.php\">RI-LOGGATI</a>
                ";
                echo "
                ";
                echo "</p>";
                echo "</body>";
                echo "</html>";
                sigpicthe italian/international COMMUNITY of friendship
                http://people2000.netne.net
                WAP/WEB
                peoplemailbox@katamail.com

                Comment


                  #9
                  Change your xhtml form to this

                  <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>echo "<form action=\"updateprofile2.php?time=".date(ymdHis)."\ " method=\"post\">";
                  echo "Logo/Photo: <input name=\"logo\" type=\"text\" value=\"http://\" maxlength=\"128\" emptyok=\"true\"/>
                  ";
                  echo "Real name: <input name=\"name\" type=\"text\" value=\"\" maxlength=\"16\" emptyok=\"true\"/>
                  ";
                  echo "Age: <input name=\"age\" type=\"text\" format=\"*N\" maxlength=\"2\" emptyok=\"true\"/>
                  ";
                  echo "Sex: <select name=\"sex\" title=\"sex\"><option value=\"Male\">male</option><option value=\"Female\">female</option></select>
                  \n";
                  echo "Location: <input name=\"location\" type=\"text\" value=\"\" maxlength=\"25\" emptyok=\"true\"/>
                  ";
                  echo "Signiture: <input name=\"signiture\" type=\"text\" value=\"\" maxlength=\"60\" emptyok=\"true\"/>
                  ";
                  echo "Your site: <input name=\"site\" type=\"text\" value=\"http://\" maxlength=\"128\" emptyok=\"true\"/>
                  ";
                  echo "Email: <input name=\"email\" type=\"text\" value=\"@\" maxlength=\"50\" emptyok=\"true\"/>
                  ";
                  echo "<input type=\"submit\" value=\"Update\"/>";
                  echo "</form>";</div>

                  and
                  <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><? include("ipban.php"); ?><? include("admin.php"); ?><? include("ban.php"); ?>
                  <?php
                  header("Content-type: text/html; charset=ISO-8859-1");
                  echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n";
                  echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"
                  \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">\n";

                  $logo = $_POST["logo"];
                  $name = $_POST["name"];
                  $age = $_POST["age"];
                  $sex = $_POST["sex"];
                  $location = $_POST["location"];
                  $signiture = $_POST["signiture"];
                  $site = $_POST["site"];
                  $email = $_POST["email"];

                  echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";
                  $time=date("H:i",time());
                  echo "<head>\n";
                  echo "<title>$time profilo</title>\n";
                  echo "</head>\n";
                  echo "<body bgcolor=\"#CCCC66\" link=\"#0000CC\" vlink=\"#0000CC\" alink=\"#0000CC\">\n";

                  echo "<center>";
                  echo "<img src=\"cartella/cpanel.gif\" alt=\"--\"/>
                  ";

                  $fl = "users/$nimi.uin";
                  $fh = fopen($fl, "w+");
                  fwrite($fh, $logo."\n");
                  fwrite($fh, $name."\n");
                  fwrite($fh, $age."\n");
                  fwrite($fh, $sex."\n");
                  fwrite($fh, $location."\n");
                  fwrite($fh, $signiture."\n");
                  fwrite($fh, $site."\n");
                  fwrite($fh, $email);
                  fclose($fh);

                  echo "grazie, il tuo PROFILO è stato AGGIORNATO con SUCCESSO..";
                  echo "

                  ";
                  echo "ora x favore..";
                  echo "<a href=\"sisaan.php\">RI-LOGGATI</a>
                  ";
                  echo "
                  ";
                  echo "</p>";
                  echo "</body>";
                  echo "</html>";</div>

                  You may need to alter the write order

                  Comment


                    #10
                    many thanks.. i &#39;ll try to do it and i&#39;ll tell you the result..thanks again.. sometimes i think i&#39;m good for nothin&#39;..
                    sigpicthe italian/international COMMUNITY of friendship
                    http://people2000.netne.net
                    WAP/WEB
                    peoplemailbox@katamail.com

                    Comment


                      #11

                      i think to have found the trouble..
                      in the wml version there is in the postfields:



                      echo "<postfield name=\"unm\" value=\"$(unm)\"/>";
                      echo "<postfield name=\"uag\" value=\"$(uag)\"/>";
                      echo "<postfield name=\"usx\" value=\"$(usx)\"/>";
                      echo "<postfield name=\"ulc\" value=\"$(ulc)\"/>";
                      echo "<postfield name=\"aaa\" value=\"$(aaa)\"/>";
                      echo "<postfield name=\"bbb\" value=\"$(bbb)\"/>";
                      echo "<postfield name=\"ccc\" value=\"$(ccc)\"/>";
                      echo "<postfield name=\"ddd\" value=\"$(ddd)\"/>";

                      BUT THERE IS ALSO :

                      echo "<postfield name=\"nimi\" value=\"$(nimi)\"/>";
                      echo "<postfield name=\"salasana\" value=\"$(salasana)\"/>";

                      i think without $(nimi) NICK and $(salasana) PASS, the update
                      don&#39;t find the right
                      place in
                      the folder USERS where to sign changes
                      to users/$nimi.uin





                      the original page in wml is this:

                      <?php
                      header("Content-type: text/vnd.wap.wml; charset=ISO-8859-1");
                      echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
                      echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"
                      \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n";
                      echo "\n";

                      $nimi = $_POST["nimi"];
                      $salasana = $_POST["salasana"];
                      echo "<wml>";
                      echo "<head>";
                      echo "<meta http-equiv=\"Cache-Control\" content=\"max-age=0\"/>";
                      echo "</head>";
                      echo "<card title=\"Profile\" id=\"main\">";
                      echo "<p align=\"center\">";
                      echo "Your Profile settings\n

                      ";
                      echo "Name:
                      <input name=\"unm\" type=\"text\" maxlength=\"15\" emptyok=\"true\"/>
                      ";
                      echo "Age:
                      <input name=\"uag\" type=\"text\" format=\"*n\" maxlength=\"15\" size=\"2\" emptyok=\"true\"/>
                      ";
                      echo "Sex:<select name=\"usx\" title=\"usx\">
                      <option value=\"Male\">male</option>
                      <option value=\"Female\">female</option>
                      </select>
                      \n";
                      echo "Location:
                      <input name=\"ulc\" type=\"text\" maxlength=\"15\" emptyok=\"true\"/>
                      ";
                      echo "E-mail:
                      <input name=\"aaa\" type=\"text\" maxlength=\"30\" emptyok=\"true\"/>
                      ";
                      echo "Site:
                      <input name=\"ccc\" type=\"text\" maxlength=\"30\" emptyok=\"true\" value=\"http://\"/>
                      ";
                      echo "Logo url:
                      <input name=\"ddd\" type=\"text\" maxlength=\"100\" emptyok=\"true\" value=\"http://\"/>
                      ";
                      echo "Signature:
                      <input name=\"bbb\" type=\"text\" maxlength=\"250\" emptyok=\"true\"/>
                      ";
                      echo "<anchor>Update";
                      echo "<go method=\"post\" href=\"uprof.php\">";
                      echo "<postfield name=\"nimi\" value=\"$(nimi)\"/>";
                      echo "<postfield name=\"salasana\" value=\"$(salasana)\"/>";
                      echo "<postfield name=\"unm\" value=\"$(unm)\"/>";
                      echo "<postfield name=\"uag\" value=\"$(uag)\"/>";
                      echo "<postfield name=\"usx\" value=\"$(usx)\"/>";
                      echo "<postfield name=\"ulc\" value=\"$(ulc)\"/>";
                      echo "<postfield name=\"aaa\" value=\"$(aaa)\"/>";
                      echo "<postfield name=\"bbb\" value=\"$(bbb)\"/>";
                      echo "<postfield name=\"ccc\" value=\"$(ccc)\"/>";
                      echo "<postfield name=\"ddd\" value=\"$(ddd)\"/>";
                      echo "</go>";
                      echo "</anchor>

                      ";
                      echo "";
                      echo "<anchor>Back";
                      echo "<go method=\"post\" href=\"chat.php\">";
                      echo "<postfield name=\"salasana\" value=\"$salasana\"/>";
                      echo "<postfield name=\"nimi\" value=\"$nimi\"/>";
                      echo "</go>";
                      echo "</anchor>
                      ";
                      echo "
                      ";
                      echo "</p>";
                      echo "</card>";
                      echo "</wml>";
                      sigpicthe italian/international COMMUNITY of friendship
                      http://people2000.netne.net
                      WAP/WEB
                      peoplemailbox@katamail.com

                      Comment


                        #12
                        Please use the [code] tags
                        Advertise your mobile site for FREE with AdTwirl

                        Comment


                          #13
                          change them to this for xhtml

                          echo "<input type=\"hidden\" name=\"nimi\" value=\"$nimi\"/>";
                          echo "<input type=\"hidden\" name=\"salasana\" value=\"$salasana\"/>";

                          Comment


                            #14
                            change them to this for xhtml

                            echo "<input type=\"hidden\" name=\"nimi\" value=\"$nimi\"/>";
                            echo "<input type=\"hidden\" name=\"salasana\" value=\"$salasana\"/>";[/b]
                            do it..but nothin&#39; to do..in wml change profile works ..in xhtml..not.
                            inputs must work right,but
                            i think the script don&#39;t find the user profile (nickname.uin) in folder USERS.

                            thanks for help
                            sigpicthe italian/international COMMUNITY of friendship
                            http://people2000.netne.net
                            WAP/WEB
                            peoplemailbox@katamail.com

                            Comment


                              #15
                              errata corrige: now UPDATE PROFILE in xhtml in my chat work right..thaks for help ;)
                              sigpicthe italian/international COMMUNITY of friendship
                              http://people2000.netne.net
                              WAP/WEB
                              peoplemailbox@katamail.com

                              Comment

                              Working...
                              X