Mobile Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsMobile ProgrammingMobile Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 22nd, 2003, 01:22 AM
asvur asvur is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 10 asvur User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old July 22nd, 2003, 02:30 AM
omiossec omiossec is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Paris, France
Posts: 375 omiossec User rank is Lance Corporal (50 - 100 Reputation Level)omiossec User rank is Lance Corporal (50 - 100 Reputation Level)omiossec User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 16 h 4 m 46 sec
Reputation Power: 10
Send a message via ICQ to omiossec Send a message via AIM to omiossec
try

PHP Code:
<go method="post" href="auth.php" 
<
postfield name="name" value="$name"/> 
<
postfield name="pin" value="$pin"/> 
</
go


To retreive data as variable
__________________
Olivier Miossec
http://www.lasso-developpeur.net

Reply With Quote
  #3  
Old July 22nd, 2003, 03:29 AM
asvur asvur is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 10 asvur User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i tried it but did not work.
any idea

Last edited by asvur : July 22nd, 2003 at 03:45 AM.

Reply With Quote
  #4  
Old July 22nd, 2003, 04:04 AM
omiossec omiossec is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Paris, France
Posts: 375 omiossec User rank is Lance Corporal (50 - 100 Reputation Level)omiossec User rank is Lance Corporal (50 - 100 Reputation Level)omiossec User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 16 h 4 m 46 sec
Reputation Power: 10
Send a message via ICQ to omiossec Send a message via AIM to omiossec
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

Reply With Quote
  #5  
Old July 22nd, 2003, 04:29 AM
asvur asvur is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 10 asvur User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i have tried it now but it does not work.

Last edited by asvur : July 22nd, 2003 at 08:53 AM.

Reply With Quote
  #6  
Old July 22nd, 2003, 10:40 PM
oskar oskar is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Location: Copenhagen, DK
Posts: 231 oskar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 39 m 35 sec
Reputation Power: 13
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)

Reply With Quote
  #7  
Old August 7th, 2003, 09:43 AM
SmashWay SmashWay is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Switzerland
Posts: 13 SmashWay User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Re: php wml postgresql

Quote:
Originally posted by asvur

and here is the code for auth.php:

<?php
echo ("Name $name");
echo ("Pin $pin");
?>

What do i wrong?
Please can you help me?


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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsMobile ProgrammingMobile Programming > php wml

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap