We have url:
http://site.com/index.php?action=show
$_GET['action'] is used in templates to check value of ?action=:
switch ($_GET['action']) {
case = "show" {
$match_show = true;
}
}
and in other place:
echo $_GET['action'];
Is it absolutely safe to use this constructions?
How to make them safe?
Thanks.
...
Hi
I'm sure this is possible in php. I have several css files located in a folder on my server. I wish to list these files in a drop down menu located on a php page.
When the user selects one of these files in the dropdown, a textarea on the same page is populated with the source code of that css file.
Struggling with this one, any he...
I need to explore for my project use of web services on Android. I know that there is no official library for XML - RPC web service.
But there is for REST XML and i need to test it.
I would like to read XML on my web page (Where i have to pass username and Password) from Android with HTTP GET.
OR
Suppose, i follow This link, then...
I want a javascript code which will go through all the html file in my root folder and sub-folders and gets the content which are within a particular tag,
eg:
<div id="content">
!!this content!!
</div>
It should check for a comment at the top of html and only get the content if it exist.
<!--Allowed-->
It should only get if thi...
I have an html (sample.html) like this:
<html>
<head>
</head>
<body>
<div id="content">
<!--content-->
<p>some content</p>
<!--content-->
</div>
</body>
</html>
How do i get the content part that is between the 2 html comment '<!--content-->' using php? I want to get that, do some processing and place it back, so i have to get and p...
Hello,
Can someone advise me if I am performing the below steps correctly:
When a user wants to register on the website, register.php handles his/her request. Below is some of the code from register.php:
$sql="INSERT INTO Members (fldFullName, fldEmail, Password, Gender, DOB)
VALUES
('$fname','$email','$pass', '$gender', '$date')";
...
Hi ,
how check if $_GET is empty ?
...
The following PHP code does exactly what I want to do. The problem is I need to re-create it in Perl and I've been playing around with the open() and sysopen() Perl functions but can't do it. Does anyone have any help or know of any links that might help? Thanks.
$URL = "http://example.com/api.php?arguments=values";
echo file_get_conten...
Ok so what I am trying to do is get an image from the camera roll, displaying it through the image view, and then getting some pixel data and modifying it (change brightness levels through the RGB values of the pixels). I'm a beginning dev and I can't seem to really get the hang of CGImage to actually get the pixel data. Could anyone hel...
I have this for navigation, and when I switch to page 2, it will lose the &type=
Let's say I select "checked", the first page it shows fine, as it het the whole string,
but when I switch pages it loses... here's the code:
// navigation
if($_GET['start'] && is_numeric($_GET['start']))
{
$start=$_GET['start'];
$start=((int)($s...
In my database connection include I use the code
foreach ($_POST as $key => $value) {
$_POST[$key] = mysql_real_escape_string($value);
}
foreach ($_GET as $key => $value) {
$_GET[$key] = mysql_real_escape_string($value);
}
This runs fine on my linux testing server (Cent OS 5.5) however, when it is transferred to the productio...
Just like you would with a regular form using XHTML... can someone give me an example of sending a POST or GET request using PHP?
Like game.php?user=Dan&lvl=43&coins=54
and then the game.php page would do it's magic with the $_GET tag and do Mysql stuff. :P
Thanks,
...
I have a drop box which is populated by information from a database. Some of the items have ampersands in them. When the drop box is changed, there is some ajax done, and this includes sending the info from the drop box in a GET. An ampersand in the name of the item from the drop box messes up the URL for the GET.
For example, here is a...
Hello,
after several months having the site disappear from search results in every major search engine, I finally found out a possible reason.
I used WebBug to investigate server header. See the difference if the request is HEAD or GET.
HEAD Sent data:
HEAD / HTTP/1.1
Host: www.attu.it
Connection: close
Accept: */*
User-Agent: WebBug/...
Hi. I have a url that look like this reg.php?lang=no_NO&passkey=testand im trying to get the passkey variable, but it keeps showing up blank.
When I try print_r($_GET); it prints Array ( ) ?! How can this happen?
The site look something like this
<?php
print_r($_GET);
include('..\libs\Smarty.class.php');
?...
I'm expanding from perl to C and I'm trying to use curl's library to simply save a file from a remote url but I'm having a hard time finding a good example to work from.
Also, I'm not sure if I should be using curl_easy_recv or curl_easy_perform
...
Hi. I have a a login in script that is a little to complicated for my own good. I have a php file that calls a javascript based on the $_GET variable. The javascript/jquery makes html that uses iframe to call another php file, but I need the $_GET variable in that php code or I need to pass the $_GET variables to the other php file withi...
What is the right format for a git merge with a strategy of recursive ours? (not to be confused with the git merge ours strategy)
http://www.kernel.org/pub/software/scm/git/docs/git-merge.html
I tried a bunch of ways and it doesn't seem to work.
git merge foo -s recursive-ours // doesn't work
git merge foo -s recursive ours // doesn...
Hello,
I used this tutorial to write my app. I use the DDMS Location Manager to change my location virtually.
Unfortunally I always get a location of 0.0 for long and lat. Even if I switch them later in the prog with locationchanged-method I get 0.0.
Code is this:
@Override
public void onCreate(Bundle savedInstanceState)
{
supe...
I've only recently been getting involved with PHP/AJAX/jQuery and it seems to me that an important part of these technologies is that of POST & GET.
First, what is the difference between POST and GET? Through experimenting, I know that GET appends the returning variables and their values to the URL string but POST doesn't:
website.com/...