Hi guys, this may seem trivial but I'm setting up, on a profile form page I'm building, a countries and states select box such that when you select the US or Canada then the states box would display states of the selected countries else it would display a None Applicable instead. My countries and states are in a database and I'm populati...
Hi guys, I'm working now on google maps, I'm trying to build something not even half as extensive but something on the lines of http://wikimapia.org/. Ok I'm not going to be building the whole app haven't got that much time on my hands. However the application I'm working on has users signing up and they would be able to pin point and cr...
Any one know how to convert string value into html format in php?
For Example:
$string = "Hello World!!
How are you?"
If I echo $string, it will display like this:
Hello World!!How are you?
Instead of:
Hello World!!
How are you?
Any way php can conver the $string into html format? If I input:
$string = "Hello World!!...
My site is rather extensive, and I just recently made the switch to PHP5 (call me a late bloomer).
All of my MySQL query's before were built as such:
"SELECT * FROM tablename WHERE field1 = 'value' && field2 = 'value2'";
This made it very easy, simple and friendly.
I am now trying to make the switch to mysqli for obvious security re...
I have some source code and I would like to auto generate class diagrams in PHP.
What software can I use to do this?
Duplicate
http://stackoverflow.com/questions/393603/php-uml-generator
http://stackoverflow.com/questions/704957/uml-tool-for-php
...
I'm trying to re-order a HTML table when the user clicks on the table header. Here is all I can do, but still doesn't work.
in the HTML:
// onClick on table header
var par='ASC';
sort(par);
from: ajax.js
function sort(orderByType)
{
$.ajax({
url: "sort.php",
type: "get",
data: "orderby="+orderByType,
success: func...
I've got a bunch of variables being pulled from form ID's before being sent in a query string to a PHP. However, as one input is a checkbox I'm trying to get AJAX to set the variables value according to whether it's checked or not. i.e..
if (document.getElementById('bold').checked) { var bold = "true";
}
else { var bold = "false"; }...
Hi there
I'm using the PHPExcel lib which it seems to do great jobs, but in my approach it doesn't seem to be so fast.
I need to generate a excel file with allot of sheets, data, formulas and styles(bold, color, border) and it takes me allot of computing resources and time.
I think that my approach is not so good. Which has to be the ri...
Hi
I'm making a web page in which I have a list of products, along with a field next to each product in which a customer is meant to enter the quantity they want to order. The list of products is generated from a database and therefore the number of products isn't known. Is there a way of POSTing the quantity of each product ordered alo...
I am working on a futur projects that will get information to a private website not from interface but from email. After some research, posterous.com is doing something interesting, posting on personal blog from email. flickr is doing the same thing with photo attached from email and post it n the server to show off
My question. Where o...
I often need to list items separated by comma, space or punctuation, addresses are a classic example (This is overkill for an address and is for the sake of an example!):
echo "L$level, $unit/$num $street, $suburb, $state $postcode, $country.";
//ouput: L2, 1/123 Cool St, Funky Town, ABC 2000, Australia.
As simple as it sounds, is the...
How do I setup Yii framework in Windows XP ??
Yii framework requires to be setup using command line, which I am not aware of, can you help ??
NTulip how kind of you to give such an awful answer.
Anyways I am getting this message
'php.exe' is not recognized as an internal or external command,
operable program or batch file.
...
I've got a trivial MySQL function:
DELIMITER $$
DROP FUNCTION IF EXISTS `mydb`.`CALC` $$
CREATE FUNCTION `mydb`.`CALC_IT`(Flag VARCHAR(1), One FLOAT, Other FLOAT)
RETURNS FLOAT
BEGIN
IF One IS NULL THEN RETURN 0; END IF;
IF Other IS NULL THEN RETURN 0; END IF;
IF Flag = 'Y' THEN
RETURN Other - One;
ELSE
...
Current situation:
I have the current version of my MVC Framework which uses classes as controllers.
I have some "vintage" modules from my old MVC Framework which uses simple, flat includes as controllers.
Much simplified that means:
New Version:
<?PHP
class blaController extends baseController {
private $intVar;
function ...
For the past time I have been working on a Zend Framework based webshop application that we are building from scratch. The application has been successfully been set up for several clients, but we are stumbling upon more and more problems regarding extensibility and modularity of the application.
A lot of clients require a lot of differ...
Problem: I want to implement several php-worker processes who are listening on a MQ-server queue for asynchronous jobs. The problem now is that simply running this processes as daemons on a server doesn't really give me any level of control over the instances (Load, Status, locked up)...except maybe for dumping ps -aux.
Because of that I...
<?php
if(isset($_POST['upload']) && $_FILES['userfile']['size'] > 0)
{
$dbhost = 'localhost';
$dbuser = 'zuk1_boo';
$dbpass = 'lols';
$dbname = 'zuk1_boo';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
$name = $_POST['name'];
$iq = $_POST['iq'];
$nuname = str_replace(" ", "-", $name);
$nuname =...
Help, if you can-
The situation:
http://foobar.com includes a remotely hosted javacript file (http://boobar.com/stuff.js).
The goal is to just get an alert from the remotely hosted php script on foobar.com
I have tried the following code in stuff.js:
$.ajax({
type: "GET",
url: "http://www.boobar.com/script.php?callback=?",
dat...
i m working on a website..... and wants to create user login and their session..... what is the safest way to check their session exist or not( like cookie or session variable check)..... or any better idea then using sessions in php
...
I have a scheduled task that runs a script on a regular basis (every hour). This script does some heavy interaction with the database and filesystem and regularly takes several minutes to run. The problem is, the server's cpu-usage spikes while the script is running and slows down normal operations. Is there a way to throttle this proces...