0

values not posted

i am not able to get the values entered by user on my login form...the code is as follows
CODE
  <models>  
<model>
<instance>
<data xmlns="">
<username></username>
<password>
</password>
</data>
</instance>
<submission method="urlencoded-post" resource="login.php" />
</model>
</models>
<content>
<module>
<input ref="username">
<label>UserName</label>
</input>
<secret ref="password">
<label>Password</label>
</secret>
<submit>
<label>Sign In</label>
</submit>



and in my php file m using

CODE
isset($_REQUEST['username']) ? $userid = $_REQUEST['username'] : $userid = "";
isset($_POST['password']) ? $passwd = $_POST['password'] : $passwd = "";


bt my $_REQUEST['username'] and $_POST['password'] are always initialized as " "


is thr any prob with my code or sumthing else

plz do help asap


Thanks,
Ashish

by
9 Replies
  • My $_REQUEST AND $_POST array are always empty...y r they not being initialised
    plz do help me asap :hAshish
    0
  • Try to use model id and bind controls to that model id. You can refer following code which I modified to use model id:

    <models>
    <model id="info"> <!-- model Id is "info" -->
    <instance>
    <data xmlns="">
    <username></username>
    <password></password>
    </data>
    </instance>
    <submission method="urlencoded-post" resource="login.php" />
    </model>
    </models>
    <content>
    <module>
    <input model="info" ref="username">
    <label>UserName</label>
    </input>
    <secret model="info" ref="password">
    <label>Password</label>
    </secret>
    <submit ref="info">
    <label>Sign In</label>
    </submit>


    Hope this helps.
    0
  • QUOTE
    <models>
    <model id="info"> <!-- model Id is "info" -->
    <instance>
    <data xmlns="">
    <username></username>
    <password></password>
    </data>
    </instance>
    <submission method="urlencoded-post" resource="login.php" />
    </model>
    </models>
    <content>
    <module>
    <input model="info" ref="username">
    <label>UserName</label>
    </input>
    <secret model="info" ref="password">
    <label>Password</label>
    </secret>
    <submit ref="info">
    <label>Sign In</label>
    </submit>


    thanks for replying...bt i hav tried this n also this one with little change in ur code bt nuthin seems to b working
    CODE
    <submit model="info">
    <label>Sign In</label>
    </submit>



    cud u find any other problem...??


    Thanks,
    Ashish
    0
  • Try to initialize username to something and see if you are getting that value in next page when you click button . As per your code, I can see all is fine. But you can also try and see this example in Developer Forum to get more idea:
    http://developer.yahoo.com/mobile/blueprin...ts_Actions.html


    Thanks!
    Kush
    0
  • thanks...i hav tried everything dont know where the problem lies as all of my syntax is right....wonder if anyone else cud suggest...waiting for others to reply ?


    Ashish
    0
  • QUOTE (akash s @ Apr 28 2009, 01:15 AM) <{POST_SNAPBACK}>
    thanks...i hav tried everything dont know where the problem lies as all of my syntax is right....wonder if anyone else cud suggest...waiting for others to reply ?


    Ashish


    Did you tried the code from document and try to compare with your syntax. That will surely help you.
    0
  • QUOTE (Kush B @ Apr 28 2009, 03:24 AM) <{POST_SNAPBACK}>
    Did you tried the code from document and try to compare with your syntax. That will surely help you.


    yeah my syntax is correct coz its working fine when i use GET bt it doenst work when i use POST method...so thr might b sum another prob!?!?
    may b sumone cud suggest some other modification!?!?
    0
  • QUOTE (akash s @ Apr 30 2009, 05:06 AM) <{POST_SNAPBACK}>
    yeah my syntax is correct coz its working fine when i use GET bt it doenst work when i use POST method...so thr might b sum another prob!?!?
    may b sumone cud suggest some other modification!?!?


    <input model="info" ref="username">
    <label>UserName</label>
    </input>
    <secret model="info" ref="password">
    <label>Password</label>
    </secret>

    i think try not use model on input, i've got the same problem until i delete it..

    enjoy!
    0
  • QUOTE (-=[C]hayank[Z]=- @ May 5 2009, 10:43 AM) <{POST_SNAPBACK}>
    <input model="info" ref="username">
    <label>UserName</label>
    </input>
    <secret model="info" ref="password">
    <label>Password</label>
    </secret>

    i think try not use model on input, i've got the same problem until i delete it..

    enjoy!

    thanx everybody for your support..its working fine now.

    Cheers!
    Ashish
    0
This forum is locked.

Recent Posts

in Blueprint General Discussion