Codes From Wml To Xhtml (help)

Started on the old forum in September 2008 · view the original in the archive · old links redirect here

14 replies · 1,261 views · started 18 years ago · 1 min read

3 participants
honkytonkman Senior · 252 posts #1

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 ""; 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> ";

the italian/international COMMUNITY of friendship http://people2000.netne.net WAP/WEB peoplemailbox@katamail.com

Guest #2
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

honkytonkman Senior · 252 posts #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?

the italian/international COMMUNITY of friendship http://people2000.netne.net WAP/WEB peoplemailbox@katamail.com

Guest #4

what script u using bro

something else Fellow · 2,296 posts #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);

🙂

honkytonkman Senior · 252 posts #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't change when i try to update..

the italian/international COMMUNITY of friendship http://people2000.netne.net WAP/WEB peoplemailbox@katamail.com

honkytonkman Senior · 252 posts #8

post your updateprofile2.php :)

<? 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 "";

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 " "; echo "</body>"; echo "</html>";

the italian/international COMMUNITY of friendship http://people2000.netne.net WAP/WEB peoplemailbox@katamail.com

something else Fellow · 2,296 posts #9

Change your xhtml form to this

CODEecho "<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>";

and CODE<? 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 ""; 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 " "; echo "</body>"; echo "</html>";

You may need to alter the write order 🙂

honkytonkman Senior · 252 posts #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'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 " "; 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 " "; echo "</card>"; echo "</wml>";

the italian/international COMMUNITY of friendship http://people2000.netne.net WAP/WEB peoplemailbox@katamail.com

something else Fellow · 2,296 posts #13

change them to this for xhtml 🙂

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

honkytonkman Senior · 252 posts #14

change them to this for xhtml 🙂

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

do it..but nothin' to do..in wml change profile works ..in xhtml..not. inputs must work right,but i think the script don't find the user profile (nickname.uin) in folder USERS. 😢 thanks for help

the italian/international COMMUNITY of friendship http://people2000.netne.net WAP/WEB peoplemailbox@katamail.com

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close