Forums
This topic is locked
Help with setting variables in recordset
Posted 03 Jan 2002 05:32:24
1
has voted
03 Jan 2002 05:32:24 Paul Gowder posted:
I'm working on an event script. I am developing it with UD4 and the Phakt extension--php files.
I have the search form built. That shows a list of results. The results are linked to a detailed page.
This is where I'm having problems. I'm trying to build the detailed page. In my recordset how do I need to state it?
I'm linking from the search page using eventid.
I have this as my sql statement:
SELECT *
FROM pw_event
WHERE eventid = 'vareventid'
What do I need to set the vareventid variable to??
What should the default value be??
Thanks
Replies
Replied 03 Jan 2002 08:07:13
03 Jan 2002 08:07:13 Leon Radley replied:
The default value doesen't really matter because you will be sending the url string to the recordset everytime, only if someone tries to access the page without the urlstring the default value is used
the value for the parameter "variable" (vareventid) should be Request.Querystring("eventid"
that scans the urlstring that you sent for the page for the eventid parameter and sets the recordset to filter out...
just make sure you sent the right url string when you click on the link on the results page
something like this it would be
www.somewhere.com/results.php?eventid=5
i dont know if the same url string applies to php but thats the way it would have been done in asp.
Cheers and a happy new year
the value for the parameter "variable" (vareventid) should be Request.Querystring("eventid"
that scans the urlstring that you sent for the page for the eventid parameter and sets the recordset to filter out...
just make sure you sent the right url string when you click on the link on the results page
something like this it would be
www.somewhere.com/results.php?eventid=5
i dont know if the same url string applies to php but thats the way it would have been done in asp.
Cheers and a happy new year
Replied 03 Jan 2002 15:00:47
03 Jan 2002 15:00:47 Paul Gowder replied:
Hmm, that what is it sending, but it shows the same set of results no matter which eventid it sends????
thanks
thanks