I am doing search results page with PHP & MySql.When you go to the state page, it should call up DISTINCTly every city in which I have a record. It won't list any city for the cities column if they have a leading whitespace.
I trim the variable before INSERTing into the database.
$prcity = trim($_SESSION['prcity']);
Yet I still have ...
Is there such a function in PHP or MySQL?
function check($lower,$val, $upper)
{
if ($val>$lower && $val<$upper)
{
return $val;
}
if ($val<=$lower)
{
return $lower;
}
if ($val>=$upper)
{
return $upper;
}
}
...
Hello Guys
In my site i would like to add a archive page or a custom page where i want to show posts from a particular category and that with a date wise format
like for example: i am in category : Technology
All post of a day will be shown at this page like i have written 3 posts only on that day.
The next page from navigation wou...
hi
i have a textarea on the page. user will type items by lines and comma.
for example,
data1, data1info
data2, data2info
data3, data3info
there are 2 item per line.
how can i parse them per line and get items per line individually.
thnx
...
Hello All,
How can I disable the dangerous eval function? Can that be done using ini_set function?
Also how to disable following functions? Can we disable them using ini_set function?
allow_url_fopen
allow_url_include
exec
shell_exec
system
passthru
popen
stream_select
eval is one of the most dangerous function that bad guys can u...
Trying to stop the words has been entered from repeating when the array displays its contents when echoed.
Here is the code.
echo "$array[$x] has been entered";
...
Hi all,
Is there any possible way to cover a area using BING MAP.
Go to this link.
https://www.movinghelp.com/coverage.aspx?id=5924
I need exactly what it looks like.
Any help will be appreciated. Thanks n advance.
...
Hello All,
I am currently working on my own implementation of MVC php framework. I would like to know what opensource extentions/libraties are good enough to be added to a common php MVC framework.
Thanks
...
I would like iterate on each Object in my session variable. 'items' is of type item which is a class I've created to store book information. I have done a count($_SESSION['items']) which returns a 1 so i thought it should iterate at least once. But no luck. Thanks
foreach ($_SESSION['items'] as $item) {
echo TEST;
$sql = 'SEL...
I am working on the following code in file1
$_SESSION['manu']="hello";
$_SESSION[0]=$msg;
$_SESSION[1]=$msg1;
for($arr=0;$arr<sizeof($msg2);$arr++)
$_SESSION[$arr+2]=$msg2[$arr];
$_SESSION[++$arr]=$msg3;
$_SESSION[++$arr]=$file_name;
In file 2
echo sizeof($_SESSION);
for($arr=0;$arr<sizeof($_SESSION);$arr++)
echo $_SESSION[$a...
Radio box code:
<input
type = "radio"
name = "choice"
value = "A" />Apples />
<input
type = "radio"
name = "choice"
value = "B" />Oranges<br />
$choice=array("A"=>1.00, "B"=>0.80);
echo $choice["A"]; // will give me the value of 1.00
echo $choice["B"]; // will give me the value of 0.80
Given the code snippet above, i...
I'm trying to count all the values in the array and check if one value was entered and if so display a certain message for it and if there was more then one value entered display a different message for it.
How will I be able to this and where should I add it to my code?
Here is the code below.
if ($array == 1){
echo $array . " has b...
My boss give me some assignment to find information "How to add a controller by using wildflower admin (dashboard)? and how can we manipulate it (wf admin)?". I've searches every each google but it's too difficult to find it. Maybe i not so great to do researches job. So, please help me you guys.
...
This is another question in the line of getting C# and PHP to exchange signed pieces of data. In my scenario, I have a signed C# assembly on the client side with a public key. I also have a PHP page on the server with a private key. I want to be able to sign some data in PHP with the private key and check the signature against the public...
I have 2 apps in my Symfony framework: backend and frontend.
is it possible to have templates that are being used by both apps?
And if so, what is the best place to put those template?
...
For some reason when an array has for example, four values it will display all four values four times I just want the values to be displayed one time.
How can I fix this problem? Note the first echo works perfectly.
Here is the code.
if (count($array) == 1){
echo $array[$x] . " one value has been entered";
} else {
echo implode(", ...
I have a list generated by MySQL. When I click one item of the list, it shows a new list related to the item in the same page.
Edit:
Here is the code how I get the list.
<?php
include("./conn/connect.php");
$query = "SELECT * FROM entreprise ORDER BY id";
$result = mysql_query($query) or die("result failed: ".mysql_error...
foreach(self::getGroups() as $group) $group_ids[] = $group->getId();
Is there a better, cleaner and more efficient way to do that?
Thanks! :-)
...
Hi Guys i plan to create visitor unique ID and named as log file, as existing now i use the ip visitor as log file name i.e. logs/127.0.0.1.php but i think is not enough because some visitor using share an ip address for PC's.
the visitor log file itself as setting place of configuration of visitors itself, so i plan to add the another u...
find all the <1></1> and <2></2> and <3></3>... in a string.
...