How can I use snitz variables to build url - Posted (965 Views)
Starting Member
lovduv
Posts: 40
40
Basically i am reworking my nav menu in inc_header.asp, and I am building a url for another page on my site and I want to use the M_OCCUPATION in the url like so:

<a href="pagelisting.aspx?<%=M_OCCUPATION%>" title="Listing">My listing</a>

Obviously the above doesn't work or I wouldn't be posting...tongue
<moved from="Help: General / Current Version (v3.4.xx)" by="Shaggy" /><
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Support Moderator
Shaggy
Posts: 6780
6780
Do you have a variable called M_OCCUPATION? I assume you're wanting to use the value of the M_OCCUPATION field in the members table? My recommendation would be to assign it to a variable in the chkUser function, in the same way the value is assigned to the MemberID variable. You might also want to add a conditional so that that link isn't displayed if a member hasn't entered their occupation in their profile or if they're not logged in.
<
Search is your friend “I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Posted
Starting Member
lovduv
Posts: 40
40
If I wanted to use the value of Occupation from the profile to build a url in a non-forum page, including an if statement to redirect if they are not logged in where do I start.... I am hoping to get the URL to look like this www.mysite.com/listing.asp?listingID=M_Occupation (M_Occupation being the value of Occupation that a user entered in their profile)
I know I need to add includes...which ones?
With inc_header do I use the short one, so it won't mess up my current non-forum header?
What code do I use to call the variable in the page? (I know how to do a basic asp call, but do I need to do something diffrent using snitz code)<
 
You Must enter a message