Hello!
Below is example where I try to post data from first page. It prints OK in second page, but in SQL query there is no data in variable. It seems that instead of data it uses variable name ($PersonID). How can I prevent this and get the data inside WML variable? I works ok in HTML, but seems is't different in WML.
There may be several other mistakes in code, because I just edited it a little shorter.
Thanks for any suggestions!
(edit)
I have found that many others has also got this problem, but haven't seen nothing what could help to solve this.
(edit2)
After all I managed to get it working, and this time the magic tag was <ANCHOR>
-----start.wml-----------------------
<?php
Header("Content-type: text/vnd.wap.wml");
echo '<?xml version="1.0"?>';
?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml" >
<wml>
<card id="start" title="Login">
<p>
<do type="accept">
<go href="login.wml#login" method="POST">
<postfield name="PersonID" value="$(inputPersonID)"/>
</go>
</do>
Person ID: <input type="text" name="inputPersonID"/><br/>
</p>
</card>
</wml>
-----login.wml----------------------
<?php
Header("Content-type: text/vnd.wap.wml");
echo '<?xml version="1.0"?>';
?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml" >
<wml>
<card id="login" title="Login">
<p>
<?php
echo '$PersonID'; //this prints OK posted "PersonID" to screen.
$PersonIDvar=$_POST['PersonID']; //here I try to put posted data inside new variable
//using: $PersonIDvar='$PersonID'; ,won't work either
$mysql_connection = mysql_connect("127.0.0.1:3306", "user", "password")
mysql_select_db("oma", $mysql_yhteys)
//Create SQL statement
$SQLStatement = "SELECT * FROM person WHERE PersonID = \"". "$PersonIDvar" ."\" ";
echo $SQLStatement; //in sceen SQLStatement is ok. but in query
// "$PersonID" hold in '$PersonID' , not posted data!
$mysql_result=mysql_query($SQLStatement, $mysql_connection);
//prints 1 when gets something or 0 when dont
$num_rows = mysql_num_rows($mysql_result);
echo $num_rows;
?>
</p>
</card>
</wml>