I used the function htmlentities() in my php script, but the server says: "undefined function"
After some searching, I understand that the php installation on my webhost does not include that function, and that I can add the function by changing the php.ini file, but I have spent many hours searching, and have not found any information ...
Is there anything returned from MySQL/PHP on a INSERT query being executed? Here is my function which I have in a CLASS.
function mysqlQuery($query) {
// Gets the results from the query
$results = mysql_query($query, $this->connection);
// Loops through the queried results as an multi-dimensional array
while($rows = mysql_f...
I'm having difficulty with paths in a cms system I'm attempting to build, I've basically got a folder with my header.php and footer.php files inside.
These are included in index.php and work fine. But then when I attempt to use the same includes in a file within my admin sub directory, the images and CSS are broken, obviously because th...
I have a webpage that I only want a specific group to log into.
I work at a college and we use Active Directory accounts and only a certain group can access this php page (on apache server).
I know I can restrict access with some PHP code, but I want to accomplish seamless login.
Everyone uses IE7 at work (which are configured to pass...
HI
Whats the best way to create a random name for a folder?
Its going to be used for a folder name to store documents. But lots of folders are going to be created and so need it to be unique each time if possible.
Length should probably be around 7 characters.
...
Hey guys, here's what I'm attempting:
PHP sessions work by default with my configuration, if I just go session_start() and try the standard session increment test it works.
if (!isset($_SESSION['count'])) {
$_SESSION['count'] = 0;
} else {
$_SESSION['count']++;
}
However I want to use a MySQL table for session storage. I've ...
My configuration:
Apache 2.2.4
PHP 5.2.4 (fastCGI)
Windows XP pro
I have a script that takes more than a minute to run but after exactly 60 seconds (proven by Fiddler) the server always delivers a 408 timeout. My PHP max execution time is set to 120 seconds. After doing some reading I've tried putting a "Timeout 120" directive in my A...
I have a simple login form, username and password. Basically, When a user is anywhere on the website, he can click a link that will take him to the login page. After login, he is redirected to the page he came from initially.
The problem:
let's say I was in the "/posts" page, and I clicked to login, so now I am on "/users/login".
- if...
I have the most basic script:
$pid = pcntl_fork();
if ($pid == -1) {
die('could not fork');
} else if ($pid) {
// we are the parent
echo "parent done";
pcntl_wait($status); //Protect against Zombie children
echo "all done";
} else {
// we are the child
echo "Child finished";
}
When I run this, the ou...
I need to get fullscreen shot of website by URL, is there any PHP programs for that or services, if not, is there any Java programs for that purpose?
...
I'm relatively new to CF / Flex3 and I've been tasked with making mock applications in order to get my knowledge of the 2 languages up.
I'm creating an application where I require data back 1 week (strtotime equiv '-1 week').
So that the result is always 1 weeks worth.
Whats the comparable equivalent if any for coldfusion? If none, h...
How do you redirect a page back to the home page using PHP when a person signs out. I know there is multiple ways to redirect a page with PHP, but what is the best way?
If you can please leave a code sample. Thanks.
...
I want to get the logout hash for vBulletin so that I can link to the logout bit directly from my main site.
How can I do this? (in PHP)
...
How can I compare exploded word with mysql varchar in PHP?
This code produce what i want but it also give this error
veranderenwachtwoordjij
Fatal error: Call to a member function fetch_assoc() on a non-object......
$word = "Also, to be safe, change your password regularly... you don't have to be obsessive about it: every three hours o...
Hello,
I would like to know which is the best way to sort table columns with PHP and MySQL. Is there a way to do this without having to set a variables like the following?
$strASC = $_GET["order"];
if ($strASC == "ASC")
{
$strASC = "DESC";
}
or does exist an SQL query that reverses the ASC or DESC depending on current status? ...
(Make this CW if needed)
We are two developers working on a web application based (PHP5, ZF, Doctrine, MySQL5). We are working each with a local webserver and a local database. The database schema is defined in a YAML file.
What's the best way to keep our database schemas in sync?
Here's how we do it: Whenever developer "A" makes a ch...
Greetings!
I'm trying to add simple mail functionality to a little web app and I'm stuck. I'm able to send email from the terminal to myself on local machine just fine, but when I try to run the app I get "Connection refused: 61"
At first I thought my setting are messed up, I kept playing with them for a while and for now decided to giv...
Is there a way that you can use PHP to automatically fit a web page into the size of the browsers window?
...
hello everyone. I recently ran in a problem and I've been trying to resolve it with out any luck. I'm, trying to share the php session across several servers php/apache level on all server using GlusterFS,however, although the session is accessible on all servers the session does not get transfer once I hit a different sever. I get logg...
I have been toying with PHP filter library. I liked it but I am unable to perform a simple filter function. I essentially want to invalidate those values in my input array that are strings and which are longer than certain value.
Is there a way to do this like,
$data = array('input_string_array' => array('aaa', 'abaa', 'abaca'));
$args...