|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
WML, PHP & MySQL - passing a variable?
Hi everyone,
This forum has really helped me get my WAP site up and running, but I'm stuck on one thing... I have a .wml file with a card which displays the last 10 entries in my weblog. I have the titles set as links, and when someone 'clicks' on them I'd like them to see the whole entry on its own. However, when the URL has something like ViewEntry?id=10 on the end, it doesn't display any entries. If I remove the '$id' from the MySQL query and put in an ID of an entry, ie 12, it will display the entry with ID 12 just fine. I've tried and tried to get this working, to no avail. Just wondered if anyone had any pointers as to what I might need to do? The code is below... PHP Code:
The same query works fine in PHP, just not on the WAP version. Many thanks everyone, any ideas are much appreciated! ![]() Jim |
|
#2
|
||||
|
||||
|
Welcome to the WAP forums on Dev Shed - enjoy your stay.....
Will hazard a guess at this, but I reckon it is because you are loading the additional card at the same time as the main card. That way, when you are linking to the specific ID card, then there is actually no data as the page doesn't reload. Have you tried making a seperate page for the individual IDs and using a full link, not anchor, to that page info?
__________________
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. __________________ |
|
#3
|
|||
|
|||
|
Quote:
Hi jabba_29, Thanks for the reply. ![]() I made a mistake when I copied the code in for my first post, but I did what you said and it worked perfectly! The weblogs.wml page points the links to a full URL with the page weblogs-ve.wml. Putting ?id=8 on the end of weblogs-ve.wml shows entry 8. ![]() I've just had a play around with the code and now the new paragraph function works too on the entry (there's no <p> in the database record, the nl2p function puts them in). Thanks very much again - this site is great! Jim |
|
#4
|
||||
|
||||
|
Glad you got it working. Actually, I think that I have wap pages that used the method that you tried first. But nevermind, I think the seperate page per ID is easier to manage.
|
|
#5
|
|||
|
|||
|
trying to pass more than one variable in WAP
Trying to pass more than one variable in WAP
Hello, Please I need your help, I am trying to pass more than one variable using php, to be interpreted as wml, but I have an error, so I don't know if the syntax is right the line of code is the following: <go href="notas1.php?cedula=$(cedula)&codigo=$(codigo)"/> then I get "invalid entity reference in attribute value". So please if someone please help me, I really appreciate your support. |
|
#6
|
||||
|
||||
|
Hi and welcome to Dev Shed.
I am not sure whether this is the board that has changed your code but: The & should be & depending on your character set. HTH. |
|
#7
|
|||
|
|||
|
Question
Hi guys,
I want to basically take in a username and password and then check to see if its in the mySQL database. The problem is though that I can print the variables yet when I use then in the php query the resultSet is null. If I force the values though the resultSet is not null. If anyone has any ideas on how I can fix this can you let me know ASAP. Any help would be greatly appreciated. Heres my code: PHP Code:
Thanks a million in advance, Shauna |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > WAP Programming > WML, PHP & MySQL - passing a variable? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|