Wordpress does not correctly map POST data

here's my problem : I have a .php file within my wordpress that do the following thing : with a form asks a NAME and to the user posts the data to this same page (action="") if NAME is not empty, then do something, else ask for the NAME again He

send an array on ajax

I have a xml file containing information i want to store or update in database. my server redirects me to previous page if in 30 seconds script doesn't finish executing (changed max execution time, didn't help) I want to split the file into multiple

Show table PHP

I wanted to show everything what is on the arrays but it doesn't seems to show all information, and each server might have more than 2 partition, below I written was just 2 partition, other server might have more than 2. Is it possible to detect how

PHP code does not work in PHP CLI

i made php code with database connection named test.php like below : <? $mysqli = new mysqli("localhost","root","","monster"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\

How we send mail in php (core php) from localhost using Wamp

I want to send mail from my local host in any live mail box (Google. yahoo etc). I am in windows environment and using wamp. Please help me. ThanksYou can't do without a library. Make use of PHPMailer How to configure PHPMailer on WAMP. See this

Load WordPress images of messages and view them on another page

I'm having some trouble with WordPress to show images that belong to a certain post on another page. What I'm looking for is a homepage that lists all posts within a certain category and show the title, the excerpt and a 'view examples' link. The vie

Need help getting & lt; td & gt; value

I have a table that shows the names of individual email templates. The email templates are being populated within a mysql_fetch_assoc() while-loop. The pseudo code looks something like this. <table> <?php $query = "......"; $example = m

How to configure Rets server in local wordpress

I am trying to connect to MLS Rets server in my local wordpress but can't connect. I also don't know how to use Rets Server and get data from there? Also need some real estate sample data for testing purpose. Does Anybody have any idea. How can I do

Improve my current database design to store employee schedules

I need to come up with a software able to store employees' schedules in a database. I currently have this design: CREATE TABLE IF NOT EXISTS `schedules` ( `id` int(11) NOT NULL AUTO_INCREMENT, `employee_id` varchar(32) NOT NULL, `day_of_week` int(2)

PHP guestbook error

<?php $sql = mysql_connect("localhost" , "root" , "usbw") or die(mysql_error); mysql_select_db("guestbook" , $sql); if($_SERVER['REQUEST_METHOD'] == 'POST') ( $user = mysql_real_escape_string($_POST['user']); $me

The Solaris 10 server does not automatically use php files

I have a server that runs on Solaris 10, whenever I go to the address, it displays as directory with all the files and folders instead of execute the index.php file. Is there any way to stop it from displaying directory and execute the php files auto

Find a maximum value in an associative array

I have a associative array: $users[0] = array('name' => 'Jim', 'depth' => '1', 'bk_id' => '9'); $users[1] = array('name' => 'Jill', 'depth' => '3', 'bk_id' => '10'); $users[2] = array('name' => 'Jack', 'depth' => '7', 'bk_id' =>

php popen and php current working directory

If I use PHP's popen command to execute a script, does is execute it in the context of PHP's current directory? Currently I am doing something along the lines of popen(' cd PATH; CMD'); but can I do it as chdir ('PATH'); popen('CMD'); It depends on t

Access to the private function of the outside class

I'm learning OO stuff, and came across this: class n{ private function f($v){ return $v*7; } function c(){ return $this->f(5); } } $o = new n; echo $o->c(); //returns 35 Doesn't that beat the purpose of declaring functions private if I can access it

Google Chrome renames the .xml file to .download

i have this very simple download page to get an xml file. the script works ok in firefox/IE. but chrome renames the extension of the file to ".download". and this happens only to .xml, when you use another extension like .txt it does it without

PHP: remote file size without download file

Is there a way to get the size of a remote file http://my_url/my_file.txt without downloading the file?Found something about this here: Here's the best way (that I've found) to get the size of a remote file. Note that HEAD requests don't get the actu

How to build a dynamic SQL query?

Right, so I have a set of dropdowns on my page. Depending on whether a value is selected, I want to add it to an SQL query string in PHP. Example: select1: options("*" "op1", "op2) select2: options("*" "op1", &

Templates in Yii Framework?

I build a website application using Yii Framework. I want to use model with query like this: SELECT u.id, u.username, u.score, (SELECT COUNT(ownerId) FROM post p WHERE p.ownerId = u.id) AS totalPost FROM users u ORDER BY u.score DESC, totalPost DESC