|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
php wml postgresql
Hi.
I am trying to send two variables from login.wml to auth.php. But auth.php gets empty variables. here is the code for login.wml: <?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card newcontext="true" title="Fuhrpark Login" id="login"> <p> <fieldset title="name & PIN"> Name: <input name="name" type="text"/><br/> Password: <input name="pin" type="password"/> </fieldset> <anchor> Login <go method="post" href="auth.php" > <postfield name="name" value="$nameeingeben"/> <postfield name="pin" value="$pineingeben"/> </go> </anchor> <do type="accept" label="Login"> <go method="post" href="auth.php" > <postfield name="name" value="$nameeingeben"/> <postfield name="pin" value="$pineingeben"/> </go> </do> </p> </card> </wml> and here is the code for auth.php: <?php echo ("Name $name"); echo ("Pin $pin"); ?> What do i wrong? Please can you help me? Last edited by asvur : July 22nd, 2003 at 02:17 AM. |
|
#2
|
|||
|
|||
|
try
PHP Code:
To retreive data as variable |
|
#3
|
|||
|
|||
|
i tried it but did not work.
any idea Last edited by asvur : July 22nd, 2003 at 03:45 AM. |
|
#4
|
|||
|
|||
|
You write that
<anchor> Login <go method="post" href="auth.php" > <postfield name="name" value="$nameeingeben"/> <postfield name="pin" value="$pineingeben"/> </go> </anchor> <do type="accept" label="Login"> <go method="post" href="auth.php" > <postfield name="name" value="$nameeingeben"/> <postfield name="pin" value="$pineingeben"/> </go> </do> Change the do and the anchor to use variable |
|
#5
|
|||
|
|||
|
i have tried it now but it does not work.
Last edited by asvur : July 22nd, 2003 at 08:53 AM. |
|
#6
|
|||
|
|||
|
This is working for me:
<?php header("Content-type: text/vnd.wap.wml"); 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\">"; ?> <wml> <card id="main" title="Log ind"> <p> Username: <br /> <input title="user" name="username" /> Password: <br /><input title="pass" name="password" type="password" /> <anchor> Login <go href="check.wml" method="post"> <postfield name="username" value="$(username)"/> <postfield name="password" value="$(password)"/> </go> </anchor> </p> </card> </wml> Then, check.wml: <?php header("Content-type: text/vnd.wap.wml"); 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\">"; ?> <wml> <card id="varcheck" title="VARS"> <p> <?php if(isset($_POST["username"])) { echo $_POST["username"]; } echo"<br/>"; if(isset($_POST["password"])) { echo $_POST["password"]; } ?> </p> </card> </wml> But I'm new in the "wap-world", and I find it a bit complicated, making it all working together! :O) |
|
#7
|
|||
|
|||
|
Re: php wml postgresql
Quote:
try to access your POSTed variables with $_POST["your_variables_name"], for example $_POST["name"] and $_POST["pin"], maybe that'll do it. If it does, read the configuration chapter of the php documentation to know why, and maybe how to remove the feature. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > WAP Programming > php wml |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|