Questions tagged [urlvariables]
61 questions
66
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…
![](../../users/profiles/1223693.webp)
tckmn
- 52,184
- 22
- 101
- 145
37
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,
…
![](../../users/profiles/342279.webp)
dana
- 4,390
- 19
- 70
- 115
8
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?
![](../../users/profiles/591130.webp)
Ryan
- 5,523
- 16
- 48
- 84
7
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…
![](../../users/profiles/395729.webp)
mickburkejnr
- 3,463
- 11
- 69
- 107
6
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 =…
![](../../users/profiles/2057171.webp)
Albert Renshaw
- 15,644
- 17
- 92
- 173
5
votes
7 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…
![](../../users/profiles/724641.webp)
Joe
- 51
- 1
- 1
- 2
5
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…
![](../../users/profiles/2647353.webp)
user2647353
- 51
- 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 =…
![](../../users/profiles/1322195.webp)
Greesemonkey3
- 197
- 2
- 13
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?
![](../../users/profiles/725523.webp)
Brds
- 967
- 3
- 15
- 34
3
votes
3 answers
How can I efficiently add a GET parameter with either a ? or & in PHP?
I have to add a GET variable to a url. But the URL might already have GET variables. What's the most efficient way to add this new variable?
Example URLs:
http://domain.com/
http://domain.com/index.html?name=jones
I need to add:…
![](../../users/profiles/834525.webp)
Ryan
- 14,115
- 29
- 92
- 163
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:
![](../../users/profiles/851137.webp)
coudron
- 217
- 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…
![](../../users/profiles/46011.webp)
JD Isaacks
- 51,154
- 89
- 267
- 413
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:…
![](../../users/profiles/15402003.webp)
TDV
- 23
- 3
2
votes
2 answers
Using custom class to handle database inquiries in AS3
I recently started delving into custom classes in AS3 (to hone my best-practices coding habits), and wanted to create a database class that allows a user to first instantiate a class that contains all the information necessary for methods within the…
![](../../users/profiles/4569874.webp)
Edward Ray
- 21
- 2
2
votes
2 answers
using session variable with url variable in SQL
I have a PHP page that shows a table of data from a Database Table ( enquiries ). I am wanting to use a Session variable to show all the data for the person who is logged in ( The Member ). This session variable uses the users primary key (…
![](../../users/profiles/2369713.webp)
Steve Joiner
- 393
- 2
- 5
- 15