|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
Login Script in PHP for WAP Site Needed
Can anyone point me to a login script that will work with WAP site?
Thanks ahead. |
|
#2
|
||||
|
||||
|
yeah i can help here but would need to where where you're getting valid login data from and what it should be doing on fail and success?
__________________
Andy Moore << oh no it's got a blog..... Word Press WAP Plugin with Ad Mob Advertising revenue PHP developer deploying ringtones, mp3 downloads and realtones I'm a geek who's obsessed with stats and gadgets Last edited by andymoo : April 11th, 2005 at 01:41 PM. |
|
#3
|
|||
|
|||
|
Quote:
Thanks for the quick reply. The password data would be valided from MySQL database and when it's successful an user is directed to a WAP page and if it fails then a error message displays. Thanks. |
|
#4
|
||||
|
||||
|
Hi there,
The way I'd do this is like this: First have the WML form with username and password variables going to login.php Then in login.php have something like this: $count = mysql_query("SELECT COUNT(DISTINCT username) FROM MEMBERS where username='$username' and password='$password'"); $count = mysql_result($count,0); That will return 1 for a valid match and 0 for a fail. Then do something like: if($count>0){ echo "logged in"; }else{ echo "log in failed, please try again"; } Hope this helps. Cheers Andy |
|
#5
|
|||
|
|||
|
Please elabrate on why would I want to pass the variable to a filter page and then access the database rather than a direct access after submitting the info at the wml form page.
I am very new to WAP and PHP programming and would like to learn about it. Thanks. Jenn |
|
#6
|
||||
|
||||
|
That was just the quickest fix I could think of for it, if you check the validation on each page with the variables passed in the url you can make sure you are only serving content to authorised users.
|
|
#7
|
||||
|
||||
|
In an ideal world, you would log in, check against the db. if ok, you are logged in -> start session.
On subsequent pages, you would check that session credentials met the criteria met to log in , eg check always against the db. Accessing the session vairable directly is fine, but for extra security - check the session variable against something else too - session info can be manipulated.
__________________
Cheers, Jamie # skiFFie | Home of the 'accessibility module' for Drupal # Jamie Burns [me] Accessibility Module [drupal] # guidelines | search | wap resources | not getting help | fold to cure # Any form of employment is strictly prohibited ...... __________________ Let the might of your compassion arise to bring a quick end to the flowing stream of the blood and tears ..... Please hear my anguished words of truth. __________________ |
|
#8
|
|||
|
|||
|
hello,
i'm trying to do this same thing, except my username/password is actually embedded in the page itself instead of being pulled from mySQL. i'm having a problem with the sessions working in WAP on a blackberry device. The page works fine (in IE and mozilla), after successful login, the session is started and it checked on each subsequent page. On the blackberry units however, users are immediately returned to the login page and told that their session has timed out. I've tried contacting Blackberry about this issue, they say it's something with the code that is wrong. Here is that code, btw: PHP Code:
|
|
#9
|
||||
|
||||
|
I haven't gotten past your first line, but there is an error there:
PHP Code:
Does Blueberry support JavaScript? |
|
#10
|
||||
|
||||
|
PHP Code:
Does Blueberry support JavaScript?[/QUOTE] or PHP Code:
as for blueberry and js i'm not sure.............. i'd hazard a guess it did but am not certain... i'd like one to play with tho and pick up my email on the go but they are just ugly devices and not as sexy as my new samsung d500 mmm lol |
|
#11
|
|||
|
|||
|
The script works fine online thru PC, but from the Blackberry unit, it times out the session immediately.
And yes, Javascript is enabled in the Blackberry. Is there a more appropriate forum for this? I though the WAP forum was best. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > WAP Programming > Login Script in PHP for WAP Site Needed |
| Thread Tools | Search this Thread |