Questions tagged [urlvariables]
64 questions
77
votes
7 answers
How to verify if $_GET exists?
So, I have some PHP code that looks a bit like this:
The ID is
Now, when I pass an ID like http://localhost/myphp.php?id=26 it works alright, but if there is no ID like just…

tckmn
- 57,719
- 27
- 114
- 156
40
votes
5 answers
Django return HttpResponseRedirect to an url with a parameter
I have a situation in my project where i need to make a redirection of the user to an url containing a parameter, it is declared in the urls.py like:
url(r'^notamember/(?P\w+)/$',
notamember,
…

dana
- 5,168
- 20
- 75
- 116
9
votes
2 answers
Load CSS based on URL variable in HTML page
I'd like to load a stylesheet when my URL variable contains "?view=full".
Is it possible to do this in HTML (i.e. not PHP)? If so, how?

Ryan
- 6,027
- 16
- 52
- 89
8
votes
4 answers
PHP MySQL $_GET Hack prevention
Possible Duplicate:
Best way to stop SQL Injection in PHP
If I were to use the $_GET function to retrieve a variable from the URL how can I make it hack proof? Right now I just have addSlashes, what else should I add?
$variable1 =…

Albert Renshaw
- 17,282
- 18
- 107
- 195
8
votes
6 answers
How to pass multiple values of a variable through a URL
I've an application that I'm building, and I'm stuck at a certain point.
I'm trying to pass a variable that has multiple values. So my URL will look like:
localhost/report.php?variable=value1, value2, value3
Problem is I'm not sure how I can do…

mickburkejnr
- 3,652
- 12
- 76
- 109
6
votes
3 answers
Php: How to link a URL with ID targeting a html section?
New to php :)
Working on a blog project, I want to navigate (send) the users to another page with specific (complete) post and its comments by clicking "Comments" link on index page.
I wish to send the user directly to the comments div. but I also…

Muhammad Ahmed
- 428
- 2
- 6
- 17
6
votes
2 answers
Paypal: trying to pass an amount with a Donation button
I have a Donate button set up for the user to enter the donation amount. I am trying to send an amount with the button. I can enter amount=1.00 in the Add Advanced Variables in the button setup - that works fine. However, I have had no success…

user2647353
- 61
- 1
- 2
5
votes
6 answers
PHP variable in header function
I am attempting to pass variables through the URL using the header function as a way to redirect the page. But when the page is redirected it passes the actual variable names rather than the values associated with the variables. I am new to PHP and…

Joe
- 51
- 1
- 1
- 2
4
votes
2 answers
Getting a variable from URL and passing it into SqlDataSource SelectCommand
"I am working in asp.net vb and I am trying to get a variable from the URL and pass it into the select statement of my sql data source. So far I have this and it doesn't work with asp.net.
<%Dim PersonNumId as String
PersonNumID =…

Greesemonkey3
- 207
- 3
- 15
3
votes
2 answers
Flex 3: Getting variables from URL
If I have an application located at http://sitename.com/myapp/ and i want to pass in a variable via the url (i.e. - http://sitename.com/myapp/?name=Joe), how can I get that name variable into a string var?

Brds
- 1,035
- 3
- 17
- 37
2
votes
4 answers
2 Facebook like buttons for same URL, with different get variables, seeing the same like count?
I generate a unique variable for each user on my site that is built into their referral link. When I put that link into a facebook like button the like count is separate for each link.
Here is my example:
UserA:

coudron
- 317
- 2
- 10
2
votes
6 answers
How to send URL (with vars in it) as a single var?
I have a url string like this:
http://www.google.com/cse?cx=017840637368510444960:ny1lmky7r-0&client=google-csbe&output=xml_no_dtd&q=simon+g
I need to send this url from ajax to a php script as a single string variable.
I am having trouble though…

JD Isaacks
- 56,088
- 93
- 276
- 422
2
votes
1 answer
Wordpress custorm URL variables causes strange redirect
I'm trying to have custom variables in my URL for Wordpress site. I have read up as much as I could find on the subject and so far have the following in my functions page:
function add_query_vars($aVars) {
$aVars[] = "mrdrct";
return $aVars;
}
//…

Chris
- 43
- 1
- 5
2
votes
1 answer
How to append order number to a URL on the "Thank You"-page in WooCommerce
I'm looking to do something quite simple which I can't get figured out. I want to append (add) the order number to a URL when a customer reaches the Thank You page after paying in WooCommerce.
It needs to look a bit like:…

TDV
- 23
- 3
2
votes
1 answer
Enable or disable WooCommerce products sale price based on URL variable
I am trying to display sale prices to users that enter the website with the following link www.example.com?sale and show regular prices to the rest of users. The code below does the job for single products, sale price is shown only to users with…

miguelbp87
- 67
- 6