Correct WML

Started on the old forum in January 2010 · view the original in the archive · old links redirect here

33 replies · 1,337 views · started 16 years ago · 1 min read

6 participants
bOrN2pwn Developer · 230 posts #1

Why dos this keep showing as html I thoufgt I converted it perfectly but it keeps showing error pars failed please help

//////////////////////////PM 2 ALL
else if($action=="toall")
{
addonline(getuid_sid($sid),"Owner Tools","");
  echo "<card id=\"main\" title=\"Owner Tools\">";
  echo "<p align=\"center\">";
  echo "<b>Owner Tools</b>";
  echo "</p>";
  echo "<p>";

echo "<form action=\"ownrproc.php?action=prvtall2&sid=$sid\" method=\"post\">";
echo "Message:<input name=\"pmtou1\" maxlength=\"250\"/><br/>";
echo "Recipient:<select name=\"who\">";
echo "<option value=\"online\">Online Members Only</option>";

echo "</select><br/>";
echo "<input type=\"submit\" value=\"Update\"/>";
echo "</p></form>";

echo "<p>";
echo "<a href=\"index.php?action=main&sid=$sid\">»Main Menu</a>";
echo "</p></card>";
  

}  

And this 1 aswel

////////////////////////////pm2all///////////////////////
else if($action=="prvtall2")

{
$who = mysql_real_escape_string( $_REQUEST["who"] );
$pmtou1 = mysql_real_escape_string( $_REQUEST["pmtou1"] );
$byuid = getuid_sid($sid);

  echo "<card id=\"main\" title=\"Owner Tools\">";
  echo "<p align=\"center\">";
echo "Owner Control Panel";

$tm = microtime(get_as_float);

if($who=="online")
{
$lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'"));
echo "<p>";
echo "<img src=\"../phpThumb/phpThumb.php?src=../images/check.png\" alt=\"x\"/>";
echo "The Online Members have been sent This Message<br/>";
echo "<a href=\"ownercp.php?action=ownercp&sid=$sid\">»Owner Ttools</a>";
echo "</p>";
$pms = mysql_query("SELECT userid FROM ibwf_online ");
$tm = microtime(get_as_float);
while($pm=mysql_fetch_array($pms))
{
mysql_query("INSERT INTO ibwf_private SET text='Public Anouncment:[br/]".$pmtou1."[br/]<i>This message was sent to all online members</i>', byuid='".$byuid."', touid='".$pm[0]."', timesent='".$tm."'");
}
}
 echo "</p>";
  echo "</card>";
exit();
} 

BakGat

class Counter {
public:
  void Count();
  int  ReadDisplay();
private:
  int  CurrentCount;
};

External image (may be gone) External image (may be gone) External image (may be gone)

Back up my hard drive? How do I put it in reverse? http://www.hackthissite.org Profile…

thanatos Senior · 261 posts #2

The first one, u also need to convert FORMS into wml. second one, u did not close the tag of paragraph 🙂

Ex.

<p></p>

Not

<p><p></p></p>

got it? .cheers.

bOrN2pwn Developer · 230 posts #3

Ok so if I cant use forms what kind do I use.... Im doing this in wml as it's faster and works with all phones.... HTML is easy... I really wana make this script brilliant..... So please advice me on were to begin and end.... What is the tag of paragraph...... And what is a form in WML

I came up with this still get error

//////////////////////////PM 2 ALL
else if($action=="toall")
{
addonline(getuid_sid($sid),"Owner Tools","");
  echo "<card id=\"main\" title=\"Owner Tools\">";
  echo "<p align=\"center\">";
  echo "<b>Owner Tools</b>";
  echo "</p>";
  echo "<p>";

echo "<anchor><go href=\"ownrproc.php?action=prvtall2&sid=$sid\" method=\"post\"></anchor>";

echo "Message:<input type=\"pmtou1\" maxlength=\"250\"/><br/>";
echo "Recipient:<select name=\"who\">";
echo "<option value=\"online\">Online Members Only</option>";

echo "</select><br/>";
echo "<input type=\"submit\" value=\"Update\"/>";
echo "</p></form>";

echo "<p>";
echo "<a href=\"index.php?action=main&sid=$sid\">»Main Menu</a>";
echo "</p></card>";
  

}  

BakGat

class Counter {
public:
  void Count();
  int  ReadDisplay();
private:
  int  CurrentCount;
};

External image (may be gone) External image (may be gone) External image (may be gone)

Back up my hard drive? How do I put it in reverse? http://www.hackthissite.org Profile…

thanatos Senior · 261 posts #4

im jst using a mobile phone and i dnt knw the terms of forms in wml but for u to learn, compare and observe very careful the script of forms and go href etc. etc. then u'l have ur answer 🙂

thanatos Senior · 261 posts #6

u still use

</form>

change it to anchor.. and NOTE: be very careful how u close ur TAG. wml is very sensitive. do not use this

</p></anchor>

but this

</anchor></p>
bOrN2pwn Developer · 230 posts #7

Ok so I did what you say and shows as wml but know im stuck weres the submit button gonae to

//////////////////////////PM 2 ALL
else if($action=="toall")
{
addonline(getuid_sid($sid),"Owner Tools","");
  echo "<card id=\"main\" title=\"Owner Tools\">";
  echo "<p align=\"center\">";
  echo "<b>Owner Tools</b>";
  echo "</p>";
  echo "<p>";

echo "Message:<input type=\"pmtou1\" maxlength=\"250\"/><br/>";
echo "Recipient:<select name=\"who\">";
echo "<option value=\"online\">Online Members Only</option>";
echo "<anchor><go href=\"ownrproc.php?action=prvtall2&sid=$sid\" method=\"post\">";
echo "<postfield name=\"submit\" value=\"Update\"/>";
echo "</go></anchor>";

echo "<p>";
echo "<a href=\"index.php?action=main&sid=$sid\">»Main Menu</a>";
echo "</p></card>";
  

}  

BakGat

class Counter {
public:
  void Count();
  int  ReadDisplay();
private:
  int  CurrentCount;
};

External image (may be gone) External image (may be gone) External image (may be gone)

Back up my hard drive? How do I put it in reverse? http://www.hackthissite.org Profile…

thanatos Senior · 261 posts #9

<input blah blah> <select blah blah><anchor> <go href blah blah> <postfield blah blah></anchor> this the proper way to do it. Pls observe and analyze.

thanatos Senior · 261 posts #10

yeah ur driving me nuts too LOL..

bOrN2pwn Developer · 230 posts #13
////////////////////////////pm2all///////////////////////
else if($action=="prvtall2")

{
  echo "<card id=\"main\" title=\"Owner Tools\">";
  echo "<p align=\"center\">";
echo "Owner Control Panel";

$who = mysql_real_escape_string( $_REQUEST["who"] );
$pmtou1 = mysql_real_escape_string( $_REQUEST["pmtou1"] );
$byuid = getuid_sid($sid);

$tm = microtime(get_as_float);

if($who=="online")
{
$lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'"));
echo "<p>";
echo "<img src=\"../images/check.png\" alt=\"x\"/>";
echo "The Online Members have been sent This Message<br/>";
echo "<a href=\"ownercp.php?action=ownercp&sid=$sid\">»Owner Ttools</a>";
echo "</p>";
$pms = mysql_query("SELECT userid FROM ibwf_online ");
$tm = microtime(get_as_float);
while($pm=mysql_fetch_array($pms))
{
mysql_query("INSERT INTO ibwf_private SET text='Public Anouncment:[br/]".$pmtou1."[br/][i]This message was sent to all online members[/i]', byuid='".$byuid."', touid='".$pm[0]."', timesent='".$tm."'");
}
}
 echo "</p>";
  echo "</card>";

} 

It dosnt show nothing just the headers why... why .... why

BakGat

class Counter {
public:
  void Count();
  int  ReadDisplay();
private:
  int  CurrentCount;
};

External image (may be gone) External image (may be gone) External image (may be gone)

Back up my hard drive? How do I put it in reverse? http://www.hackthissite.org Profile…

thanatos Senior · 261 posts #14

try to use

$res = Insert query blah blah.. if($res){ PM was sent }else{ DB err }

and u use $pms[0] to get userid of online member

thanatos Senior · 261 posts #15

btw w3schools has a very good tut on WML u should read it to gain further knwledge

bOrN2pwn Developer · 230 posts #16

This is the error im getting

1: <?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"><wml> 2: <card id="main" title="Owner Tools"> </wml>

BakGat

class Counter {
public:
  void Count();
  int  ReadDisplay();
private:
  int  CurrentCount;
};

External image (may be gone) External image (may be gone) External image (may be gone)

Back up my hard drive? How do I put it in reverse? http://www.hackthissite.org Profile…

thanatos Senior · 261 posts #17

U stil not did what i have told u. be very careful wid ur TAGs. do not use

<p><p></p></p>

but ths

<p></p><p></p>

look closely on da script u'l see it

bOrN2pwn Developer · 230 posts #18

Ok so I know what you meant by If you open 1 you have to close it.... Did that now I got this

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/bakgatm/public_html/wap/ownrproc.php on line 164

and on line 164 there is this

if($who=="online")

BakGat

class Counter {
public:
  void Count();
  int  ReadDisplay();
private:
  int  CurrentCount;
};

External image (may be gone) External image (may be gone) External image (may be gone)

Back up my hard drive? How do I put it in reverse? http://www.hackthissite.org Profile…

thanatos Senior · 261 posts #19

Ehh! u did not use

echo "</p>";

remember ur coding PHP LoL..

thanatos Senior · 261 posts #20

Here's my advice.. read on tutorials about basic WML and basic PHP & MySQL so u cn go further in coding.. 🙂

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