I am facing a problem when a remote web client with slow connection fails to send complete POST request with multipart/form-data content but PHP still uses partially received data to populate $_POST array. As a result one value in $_POST array can be incomplete and more values can be missing. I t...

I have a table with a list of every page name and columns for different user levels.
here is the code i use to check if the user has permission
$permission_sql="SELECT * from admin_permissions where page_name = '".$_SERVER["REQUEST_URI"]."' ";
$permission_rs=mysql_query($permission_sql,$conn);
...

I have a simple problem. I'm trying to execute a shortcode inside a php block. I'm using the Allow PHP plugin to let me type them into a page in wordpress. This is what I entered:
[php] if(!is_user_logged_in())
echo do_shortcode("[wplb]");
[/php]
When the condition becomes true (the user isn't...

I'm running an apache server in a micro instance from amazon aws, and i need to change the session duration and the max upload limit.
When i edit php.ini and restart apache, changes don't show in apache.
I wasn't able to find any info on this.
What can i do? is there any file overiding php.ini...

i'm trying to insert data to MySQL from a dynamic form with jQuery. For the record, I'm using Twitter Bootstrap. I actually achieved insert "rows" but with no data. The best help I found right now is this here for the insert to MySQL and here to jQuery script.
Thanks in advance for taking time...

I have a HTML form that retrieves a varying number product types that the user inputs stock figures. This data then needs to be INSERTED to a new table.
Here is the PHP query that populates the form.
require_once 'config.php';
$i = 1;
$sql = "SELECT * FROM dealer_product WHERE customer_co...

I'm using this to get all letters to create alphabetic list:
SELECT DISTINCT SUBSTRING(title, 1, 1) AS letter FROM games ORDER BY letter asc
Everything OK. But then I try to pass it to codeigniter, it fails (tryed) several variants:
$this->db->distinct();
$this->db->select("SUBSTRING(title,1,1) ...

I am using WordPress, I have created a custom post template and a plugin. The plugin extends the comments template, adding custom ratings. Now that I have these ratings, I am averaging them and want to display the average in the custom post template. In the plugin I make the calculations,
add_fi...

I am trying to scrape the quantity of items one of my distributors has in stock per product. They do not know how to export this data. So I am wondering if someone could help point me in the proper direction on how to scrape a site with PHP that you have to log into to get to the data?
I have tr...

2 days ago, SQL Admin made upgrade of MSSQL from 2008 to 2008 R2.
Before this upgrade,I worked with MSSQL by FreeTDS, but after upgrade I couldn't read any output parameter from stored procedures. So I installed official ODBC driver from Microsoft Site for Linux (I'm using CentoOS 64)
Now:
I can...

I'd like to know how I check whether one or more of the elements (numbers in this case) in a string, eg. '1,2,3,5' are in another ,eg. '3,4,5,6'
3 and 5 are common elements to each string in that example.
In this case it is to create a SQL query based on the string comparisons.
One column value...

I use this rule on HTACCESS wigh use GD function:
RewriteEngine on
RewriteRule ^(.*([0-9a-zA-Z]{2})\_.*\.(jpg))$ watermark.php?image=$1&watermark=$2.png [NC]
Basically this php script apply a watermark on jpeg images.
I have a trouble.
On Hostgator hosting (shared) , this rule working but on ...

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''stats' WHERE ip = '::1' && date = '28-11-2013'' at line 1.
<?php
require_once 'includes/config.php';
$getStats = mysql_query("SELECT * FROM 'stats' WHERE ...

I know that when I request example.com my browser actually deafults to example.com:80 . However my ISP block the 80 port from listening so HOW do I receive the responses from my requests if the port 80 is blocked? It should not work, isnt?

Im building my website on 000webhost and with Zyro Builder and now i need some php code to get data from mysql database.
Im having this error: "Parse error: syntax error, unexpected '?' in ....." every time i want to use something like this:
echo "<br/>";
I know that is possible, so why I can...

I am using the REST API in PHP to try and create a PayPal purchase, but I only get a generic 400 error whenever I run it. Apparently this means bad request, but there are barely any details given. Here is the main portion of my code:
define("PP_CONFIG_PATH", "../vendor/");
$apiContext = new Api...

I'm going to give a basic example of what I need to be able to do, in the hopes that somebody can point me in the right direction
I prepare the URL required for the HTTP GET request to get data (trains between destinations by simply typing the name of the stations) from oncf.ma
I used cURL for...

Ok i read many many many post on this subject and i try many solution and i can't convert this multi-arrays into a JSon string. This is what a see when print_r($result2) =
Array ( [profiles] =>
Array ( [0] =>
Array ( [ID] => 00000000-0000-0000-0000-000000000001
...

I have a cron which runs every minute but the thing is it queues every request from the past minute and executes some tasks one after another. I want to run a background process which will run infinite time. I'll check if there is any new request came in & will process that immediately.
do {
...

Hello I need help in creating a Simple contact Management System. I only have two fields Name and Address1 I have to use SQL to create a Table which I already have I just need help in creating the PHP code using the Post method I also don't know the statements for connecting the Database and Tabl...

I have no idea what it going wrong. Please help.
This is the error I'm getting through XAMPP:
Fatal error: Call to a member function prepare() on a non-object in G:\htdocs\class\db.php on line 24
This is the code that it is referring to (a part of classes/db.php):
public function query($sql,...

I finally managed to get an PaymentDetailResponse from PayPal, which looks like this:
<?xml version='1.0' encoding='UTF-8'?>
<ns2:PaymentDetailsResponse xmlns:ns2="http://svcs.paypal.com/types/ap">
<responseEnvelope>
<timestamp>2013-11-27T16:54:16.964-08:00</timestamp>
<ack>S...

big guys! now We have a solution have a Web Server(built with MongoDB database and PHP Web service),the original get-data type is that iOS/Android/MonoMac/Windows client call web service to get web service's data, now we need client can view and make some operation offline and need a powerful and...

I have a Mysql table with 100 rows, id is primary key. I have a column_A that has some cells that are not populated, only null values.
Now, I want an sql statement that will insert a value to the first empty cell. And if I ran the php script again, then it inserts into the next null cell etc.
Som...

In the Below codeigniter code without entering a data in the textbox and submit it .It Should throw form validation .In my case only form validation is not throwing it is required except email.Pls help me to Solve the issue.
Controller:
function create_member()
{
$this->load->librar...

My website is used yii framework and sphinx search engineer. But recently the search function seems very slow in webpage. When I use command in server
search -c etc/sphinx/sphinx.conf xxx
It can return results very fast. But search the same word in website interface it return result very slo...

I am trying to install the application 'storytlr' (https://github.com/storytlr) on a shared web host, but it requires that I have 'Zend Framework' installed. I have uploaded the required version of Zed Framework and edited my php.ini file to point to it as follows:
include_path = ".:/usr/lib/php...

I have an entity that has some validation rules that I want to run anytime anytime an instance of that class is persisted. If the validation fails, it will throw a "ValidationException" which my stack knows how to handle and feed back to my client UI.
I run my validation by using symfony's built...

I am using the Yii-user module in my project, and I wonder if there is some "afterLogin" callback I can use to run some code of my own (By now I just need to add a couple of variables to the session if the user is correctly authenticated).

I am trying to figure out the best way to use dot notation when passing in a key or set of keys into a function and getting that post value.
Example
shipping.first_name
What it looks like in actual $_POST array:
$_POST[shipping][first_name] = 'some value'
I would like to be able to pass in...

i am new to php and i was trying to create a simple multilanguage web site with php. am mentioned below my total code, and i am having the total four files, index.php, setlocal.php, and one folder locale within that en.php, fn.php files. am having the folder structure like this..
----
index....

Just need some advice about using the session in Codeigniter.
I have a question. My question is if I use this code:
$this->session->sess_destroy();
I understand that it will unset all the session data. But what if I am running 2 different computers and connected in 1 database. If I clear the s...

im having struggle with the pagination on the dashboard I currently developing.
View 1 the list of all our customers
View 2 the view when I click a specific customer
my problem is the next and prev on the View 2.
I also have filters in View 1 for the Location, Status and Date.
When I view t...

I am making use of php ssh2_scp_send to transfer files to the remote machine, but it is a bit weird, it works for the first time but fails my second call with the following error
//success for file transfer
if (!(ssh2_scp_send($this->conn, $lpath, $rpath, 0777))){
throw new Exception...

This is my online visitor table screenshot:
![Online user number is 1385602139][1]
https://fbcdn-sphotos-b-a.akamaihd.net/hphotos-ak-prn2/1412470_733414666686841_128887452_o.jpg
![But i want to see and show like second pic][2]
https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-ash4/1398309_733420...

I have this loop, where I'm trying to generate an array like this:
array( $file['file_type'] => $file['import_status] )
To do so, I build this foreach loop to access the $file variable, which has the data I wanted to store.
$filesStatusArray = array();
foreach ($filesToImport as $keys => $fil...

i have a data table which is the result of one form submission ,, the form has start_date and end_date where its type is DATETIME-LOCAL.
Im my database its DATATIME (not showing AM and PM)
i want to add search function to my data table based on the date not date and time,
other type of search b...

In Prestashop 1.5.6.1 (http://www.tocgiaonline.vn), I need to display these things:
Homepage with Featured Products, New Products and Special Product
Category page with its own products
Product page for details
But I cannot find how to resolve section (2) anywhere, although looked up over P...

I'm using php glob() to get a list of the songs in a folder
then use the shuffle() to shuffle the songs
then use the foreach loop to loop through the songs.
but I can only get on song to play. I'm trying to get it to play
one song then when one song is over start another song automatically
Iv d...

guys, I want to build a PHP web portal using MSSQL. My colleague hosted the MSSQL on Somee server(somee.com). And this server do support PHP. I have tried to add a PHP index file on the server, and type the URL on the browser. The output can be displayed.
My questions are: What do I need to do i...

Let me see if I can explain my query a bit better. I will tell you my objective.
I am creating a submission database where users will select a cpu from a drop down menu. I want that selected value to be put into the database under two fields, id and cpumodel. I need the id to be for example 4670...

I found a lot of tuts here of how to get node with specified id using XPath, and write down data using SimpleXMLElement::asXML.
But is it possible to write data in the node with specific id using XPath, but not foreach method.
Here's what I have
<people>
<person>
...
</person>
...

Hi i have question regarding the php symfony delete.my javascript and ajax post code is fine. I dont know why it cannot delete to my database. i already targeted and pass the id, and also i already set up my routing.yml. I keep on debugging this but nothing happened.
Here's frontend module seminar

Good Evening everyone, sorry for any english mistakes first.
I got a working jquery chosen plugin populate with my field 'estado'(or province).
What i need is to populate another jquery chosen plugin with the respective cities of that state(province, not sure about the term anyway...).
This mu...

Ever since I moved to Linux, I noted some strange behaviour. In Ubuntu, http://localhost/index works but on WAMP it does not work. I tested this with APACHE's rewrite module set to off on both. Any good explanation?

Goody, Recently just got another project with super duper limited timeline. whilst i found several module can be done with "bundle" of laravel. Unfortunately i couldn't find any other bundle for the following modules have to be done and integrated with the system.
Forum
Blog
CMS
Ticketing Syst...

I want to use the session['something'] value inside my js, what if I don't print it out somewhere, how could I use that value?
only 2 ways I found
1) use hidden field trick
2) ajax
note : I've a 'huge' session data because it's an array

I Have table on browser Like This
Name | Action |
________________________
Septiyo | Edit | Delete |
Fahmi | Edit | Delete |
Tejo | Edit | Delete |
For Edit, usually I use link like this
<a href='edit.php?ID=$data['ID']'>Edit</a>
With link, I can Include the ID variable an...

I'm asking a .Net question here because I've been developing VFP apps for 16 years now and I need to get going in the Visual Studio .Net web development stuff and I cannot figure out a roadmap to get there. Its so intimidating at all the different apps I have to know to be productive in this new...

I am working on a application using multiple subdomains :
.domain.com
admin.domain.com
{username}.domain.com
and so on.
I am using the FOSUserBundle to handle my users and I am wondering how I could force users to login only on the main .domain.com.
For example, when a user is trying to ...

I was trying to use basic php to insert data into a mysql table from an html form. i was succesfull initially with basic plain text inputs. However when i was trying to input an email id i keep getting this error :
Could not enter data: You have an error in your SQL syntax; check the manual tha...

Hi I'm uncertain about my code although it's already working. Can someone suggest some tips on how will I optimize it and to improve its performance? It's a bit slow even retrieving a content for less than 200 records. Please don't mind ellipses inside the loop. Just wondering if there's other wa...

We all know, this is a very important issue for many web developers. They want to protect direct access or direct readability to their confidential images, say the folder that contains all the images. Me too. I think if I get a solution here, many guys will be helped from this question. Writing ....

I want to do HTTP Post from Android to a backend server that will be running a PHP script to receive those data and save the contents to a text file.
For Android HTTP Post, I am following the example that can be found at http://www.androidsnippets.com/executing-a-http-post-request-with-httpclien...

Using PHP and MYSQL I do a left join on 2 tables. I then use var_dump to show the results.
$myData = mysql_query($sql,$con);
while($record = mysql_fetch_array($myData)){
var_dump($record);
this outputs
array (size=13)
0 => string '276' (length=3)
'pro_id' => null
1 => string '14...

how can i get arr child using $arr join '[xx]'?
please see my codes bellow, I want to get $arr['jimmy']['age'] here. the $str is 'jimmy.age' which will be posted from ajax
<?php
$arr=array(
'jimmy'=>array(
'age'=>31
)
);
$str='jimmy.age';
$keys_tree=explode('.',$str);
$x='';
for...

As per one of the tutorial on configuring MyPHPAdmin I configured the apache/conf/httpd.conf file as follows to establish the connection for PHP in apache.
PHPIniDir "c:\webserver\php"
LoadModule php5_module "c:\webserver\php\php5apache2_4.dll"
AddHandler application/x-httpd-php .php
I am gett...

Since I started use sitemap.xml for my site, I put changefreq: weekly for all significant pages (like algorithms and problems description). This seemed relevant since I sometimes find something to change or fix on these pages and in average each page could be expected to change during a week.
Ho...

So I am trying to activate the chikita plugin for my website codysweeny.com. I keep getting this:
Warning: curl_init() has been disabled for security reasons in /srv/disk9/1551975/www/codysweeny.com/wp-content/plugins/chitika-premium/premium.php on line 518
Any thoughts on how to bypass this? I...

I am new to testing. All i knew was we PHPunit for testing various functions within class and then i know selenium for browser testing.
I know we can write php to link with selenium web driver to do headless testing of browser.
I am not able to get how does behat and mink come in there. Are the...

I am trying to access a Solr 4.5.0 instance that rests on a private server,
http://12.34.56.789:8983/
My application is located on this web server,
http://www.mywebapp.com
That said, I elected to use JavaScript library AJAX Solr to make the initial call to access the JSON object that's wit...

Halo, i have a problem to loop date and time in PHP. I have initial value for start date, end date , start time and end time.
I want to loop 20131201 until 20131210 with time from 0540 until 0600.
I run my code, but it just loop in 20131201.
INSERT INTO golf_list VALUES ('', 'others', '', '2013...

i want to insert my table in sql server from php. but i don't understand how to fix it form my query. is there any suggest that can help my query. is that correct that case statement can be put into php code like i did?
this is my code :
<?
include "new.php";
$ID_Person = $_POST...

I have my custom web-application. Now, I want to integrate moodle with my custom web-application.
I have problem in User - Singup / Login Form.
I already have registration and log in form in my website. All i want now, is to know. What encryption system does moodle uses to store password, and w...

I made a form for my website, I just dont know how to setup where the information they fill out goes to. I've searched around forums for info, and from what I can tell I need to create a PHP page somewhere. Can anyone give me any tips on how I would start?
Here is my code for the submit button o...

I have tried at least 4 plugin to post wordpress posts to facebook wall.
Please see the image below:
Every single plugin posts it as a link. But I would like to see it as a text message and image.
The only plugin was "xyz social media auto publish" which posts it as a text message and image. ...

I am running this plugin, http://xhanch.com/wp-plugin-my-prayer-time/.
I am wondering, how the data set will look like ? I am new to query stings. I am trying to learn how to put 12 months data in one file. Is there an example of how the dataset look like for query strings because I am unable to...

i was wondering if anyone would know how or has already done before:
Upon a member purchasing a membership plan through s2member, i could have plugins like bbpress and buddypress receive a little badge that goes permanently under the users avatar and then removes itself when that user unsubscribe...

I'm using createimgfromjpeg to clear EXIF data for images on my site, but createimgfrompng will corrupt the image. I'm not sure if it is used differently and can't find anything on google or stack overflow. Here is my code:
$path = $filedir.'/'.$newname;
if (strpos($path,'jpg') !== fal...

I am trying to print the json_encode in my view. But its always displaying as json object. I want to print the below object in an html formatted output. I am just implementing a twitter like more button for the pagination results. Can some one help me.
Here is my Controller:
function get_result...

I searched alot for the issue but didn't figure it out.I want to capture the like event while in js.I put the iframe code in popup and when user click the like button i want to fetch the like status.I tried different links but no one solved my issue.I think the issue is with popup.Below is my htm...

I have some script that I would like to make a little more difficult for amateurs to copy and paste. (I know I can never truely hide anything and a halfway smart person would figure this out. But I'm not worried about those people.) :)
Half of my code I have now condensed into a seperate file ...

I am trying to do a form that upload a few fields, and 3 images. The images will be uploaded via FTP, there is a problem connecting to ftp with ftp_connect() when the php is uploaded to remote server. It couldn't connect to server when the php is in the shared host. But when the php is in the loc...

I have successfully tested the vline-node example locally but when i uploaded my code into server and my user is able to call the other person but at the other end user is unable to receive any call because there is no call to receive. i am using this script which i downloaded from GitHub. The li...

I am having a trouble with regard to table. I have a field here that goes like this.
invoice.table
id
member_id (related with member table)
donor_id (related with donor table)
receipt_no
currency_type (USD or PHP or YEN)
rate
amount_type (CASH or CHECK)
if check{ chec...

I am trying to develop a server in PHP which keeps getting video frame image after every few mili seconds from client side and at the same time sends them to other clients via live video stream. The client side is essentially a mobile device which is capturing live video from its camera and is se...

This is my current PhP Program
$dateStamp = $_SERVER['REQUEST_TIME'];
Which I latter log.
Result is $dateStamp contains numbers like
1385615749
I want it to contain human readable date with hour, minutes, seconds, date, months, and years.
So I need a function that pop up human readable da...

I am not sure why this keep happening, I tried several different work around and nothing seems to work :/. I have an edit view in my laravel application and I am trying to update the content and I keep getting the MethodNotAllowedHttpException error.
THE EDIT VIEW
@extends('layouts.master')
@...

I am trying to scrape the quantity of items one of my distributors has in stock per product. They do not know how to export this data. So I am wondering if someone could help point me in the proper direction on how to scrape a site with PHP that you have to log into to get to the data?
I have tr...

I have confirmed that all of my code is working except for fetching of the array. It returns that there is only 1 row, and somehow 32 columns. However, my database has only 16 columns. Also when trying to print anything from the array out, there is nothing. Any help is much appreciated!
//Get A...

I can't figure out how to get the blog title into the data field of the ajax call. I have been looking for tutorials on beginner SQL / PHP / AJAX and I am struggling so if anyone has any good tutorials for this kind of stuff I'd be happy to hear it. I understand jquery and php okay, but I am tryi...

Let say I have an xml file containing 200 records, I want to read and insert 120 records into mysql using 'for statement' not foreach statement. I knw how to do this using foreach statement which always reads and inserts the entire records and I don't want that.
My code using foreach statement is...

Hi I need to Show/hide blog post from the home page, so I used option framework for it
Then I used this code
<?php if (is_home(of_get_option('showhide_homepge', '1') == '1' )) {} else {?>
my home page code
<?php } ?>
now home page hide always and Page, Tags And Catagery working well
but show...

It seems that sessions work when I set them for an instant, and then they are destroyed.
Here is my phpinfo page, can anyone see the problem?
I don't have access to the phpini file.
Can you check my cookie settings and tell me if I can use those instead?
http://cksgrill.net/phpinfo.php

Here is my script
when i submit the data it dosent updated in database
and i want make one more change the password has to be sent to database as md5 converted.
here is my code i have pasted all the page code below
<?php
//*
// teacher_change_password.php
// Teachers Section
// Form to change...

I like to have messages that are different than the standard returned by RestException class.
For example HTTP code 400 with custom message:
return array ('code'=>400, 'result'=>"Fail", 'reason'=>"Bad meta tag: $meta");
Is this possible with the latest version of the framework?

I have a simple jQuery script that passes a search term to a php page and returns results from that page.
Everything worked fine until I added a php function on the search.php page, that logged search terms. After that even though the search terms get logged, no data gets returned to the script....

I'm trying to use AJAX to process information on my php page, but for some reason the first JS call doesn't seem to be executing. I've been looking at this off and on for 6 hours. Can anyone spot my mistake?
<script>
function GetData()
{
var idNumber=document.getElementById("idNumber").val...

I need some help please.
I have a php script which generates a xml file and then i need to submit this to another server using POST. The XML file is ok as i can manually upload it using curl from the command line.
my code is:
$file = 'temp.xml';
file_put_contents($file, $output);
$post = array...

So I have the following Code. I need to search for the input given from the user, I want it to specifically search each category via the radio button. I can get the Title/BookTitle one to work however it refuses to output anything for the other searches.
Also, I can't seem to connect my 'catego...

My case is i have price of an item in a range of Kilogram, like
price in range 0.01-0.04 is 5
price in range 0.05-0.09 is 30
price in range 0.1-0.15 is 50
now i want to make an array so when user input 0.02 it should return price in range 0.01-0.04 which is 5, similarly if user input 0.07 so i...

I am storing vote count on vote action as
//after vote action triggered
if ($count == '') { //for first time
$count = '1';
} else { // after fisrt time
$count ++
}
This is fine. Now i want to calculate how many vo...

I'm pretty new to PHP, and I'm following this PHP academy tutorial on a register-login system.
In the tutorial, he uses MySQL functions, like mysql_connect, mysql_query, and mysql_real_escape_string etc.
As recommended, I'm working on a new project and want to use mysqli to accomplish the same ...

So I haven't programmed in a while, but i decided to tackle a small web app to get back in the game. Im having a bit of trouble though, and its kind of annoying because I know the answer is simple. So i'm making a databaseless image gallery, and i'm using Twitter Bootstrap as the front end. I wan...

i am create a function in which pass a url.
in this function get url page and get its contant and store in a variable
but proble is that some contant not i get which is address and keyword
my code is.
function insert_Data($create_url, &$count_page)
{
$new_create_url = $create_url."/p...

I am using jquery mobile to develop a small website. Now I want to pass variables from javascript to php. I am using #.ajax post
Here is my code in javascript:
var link_id = $(".templateLink").attr("id");
var link_name = $(".templateLink").attr("name");
$.ajax({
type:"POST",
url: "test...

I am downloading multiple files in zip using PHP and its working perfectly fine. I am collecting all files required and downloading them as parent.zip file.
Now since there are large number of files in my zip, i want to split the zip download into parts. say when a user clicks the button i want ...

I want the request to delete a record from sql without changing the web page. Unfortunately its not actually deleting the record when I click this button. What I want to happen is I want the blog post with the button delete to disappear when I click that button (without reloading the page). It's ...

How can I use PHP to round the user input to the nearest full number? Say I input the number 1.4, then it must go to 1 and 12.6 must go to 13 and 19.5 must go to 20. My code:
if( !preg_match($_POST['number'], /^\d$/)) {
echo 'Only number are allowed';
} else {
echo 'your rounded number i...

I have just started using ZF2 and am really enjoying it.
One thing that puzzles me a bit is the absence of a Registry component. I realise that the Service Manager makes the Registry obsolete in most cases. I rely on it heavily and its great.
But from time to time I find myself needing access...

I am finishing college next April, and for my graduation I am required to make a full scale project.
In a team of two, I came up with an idea to develop an Ad site similar to JOB boards. This site will have people post ads and view ads, people will communicate via website and so on.
Idea is a h...

I need a function which can check my $_POST array, for example see this code, there is nothing common in the $_POST array. But i want to check if the array is returning null value from the user.
<?php
switch ($_GET['action']) {
case "one":
$a=$_POST['a'];
echo "your value is". $a;
break;
case...

In my register form, if user disable javacript validation for registeration form and try to insert value alert("hacked") then this value is inserting to in my database table.
Can you please assist me how can I secure my application from that type problem?
Thanks.

We are creating a web application. In there, we would like to disable some pluggings installed in the user's browser when the user visit out site, such as video downloaders. Is there anyway we can do using PHP, JavaScirpt, Java, ASP or whatever other technology? If there is, even though we disabl...

How can I call a function without throwing any errors when certain variables are not set?
For example, I need to logUserActivity($uName,$uId). This'll work ok if a user is logged in and both those variables are set. However, it will not work if a user is not logged in, and will throw an error.
...

Can someone explain to me why when my PHP script "returns" a value I get "undefined" in angularjs but when I print a value my response value is accurate.. What would my PHP have to do to return a json object?
This is my PHP
$postdata = file_get_contents("php://input");
$data = json_decode($post...

this is a repost becuase i figured out how to post my code. please dont get mad admins!
It seems that sessions work when I set them for an instant, and then they are destroyed.
Here is my phpinfo page, can anyone see the problem?
I don't have access to the phpini file.
Can you check my cookie set...

when i post on facebook wall through api from myaccount its ok while i try from other account its not worling
hear is my code
$msg = $_POST['msg'];
// We have a user ID, so probably a logged in user.
// If not, we'll get an exception, which we handle below.
try {
$ret_obj = $facebook->...

iam trying to over write a file in the yii web app the code is in the view file and i want to over write the a file inside the protected/config folder can u suggest me how to fopen ($file,'w');
i following is the code which i used
$my_file = '..\..\config\main2.php';
$file=fopen("..\..\config\m...

I designed this website, and I have been unable to place an the element ( div#endinglogo ) in a way that renders properly for firefox / Linux operating system users.
http://motivacionenlinea.com/
I am working with all browsers in windows 7, and although the design appears as it should in the fi...

Hello I have a webcam 'foscom' that send automatic snapshot every 30minutes a pictures to this folder in my ftp "testcamera/img"
I was able to create a code that display the latest image uploaded in php.
But i want also to display a drop down menu that display all old image that's mean i will l...

I tried to calculate the distance between the given city and my city using Google distance API. But the problem is that the distance is in javascript and I have to compare this with some integer to determmine whether to list the event or not and repeat this process for each event. Is there any wa...

how can i transform
http://domain.com/index.php?page=product&id=17&type=acos5-64-cryptographic-smart-card
to
http://domain.com/product/17/acos5-64-cryptographic-smart-card/
i just need to remove the variable names in the URL and leave their values there,
Thanks

How can I take a simple rand(1,100) function and make it give a 2 percent edge (better odds to go on that side, of either half of 50?
I've been racking my mind on how to do this for a long time.
Can anyone shed some light?

Ok, let me try to shorten things so less to read.
wamp works fine for the past few months, then I started to learn laravel4 and optionally requires vhost and rewrite_module which works pretty well that when I type in larave.intro as URL it works.
Now I'm trying to use wamp again just going to lo...

On the index page i have created a form (not in HTML but via JavaScript) and has enclosed it in a function which is called after certain conditions. Here is the JavaScript code:
function next_page()
{
var card="Some values ab,xy";
var form = document.createElement("form");
input = docume...

I am trying to develop an IVR application with VXML and PHP. I need to do the development with code level not high level graphical development like eclipse VTP. What is the IDE I can use for develop the IVR applicaiton?

I need to convert following data in csv to nested tree
S.No Name
1 A
1.1 B
1.1.1 C
1.1.2 D
2 E
2.1 F
2.2 G
Is there any way S.No can be used to make array keys like 1.1.1 to $test[1][1][1] and then I can store corresponding Name as value.
or I should make paren...

@orange hello！my first try just for test!
hello！my first try just for test!hello！my first try just for test!hello！my first try just for test!
hello！my first try just for test!
hello！my first try just for test!
hello！my first try just for test!hello！my first try just for test!hello！my first try j...

I am using polyvore clipper to clip items to polyvore. The clipper fetches all details such as url, image, title and price. upon saving, it is not showing price in the polyvore site.
Price and "buy at from " button also missing. any idea on how to achieve this?
thanks in advance

Hey everybody I'm kinda new at programming and I wanted to know how to code a function that adds 10% every 24 hours and then when the 10% is added, I want it to show up in a textbox. And I also wanted the 10% to end after 10 days. (Sort of like one of those High Yield Investment programs.) I woul...

So in post_action.php I have a bunch of div's being echo'd to test if I am reaching that file during my ajax request. When I click on .deletePost I get an alert saying 'Deleted Successfully' which leads me to believe the ajax request is working, but the div with content "hello world" from post_ac...

I'm new to Laravel and I'm getting an error which I think has more to do with logic than anything else but I can't quite seem to grasp how to overcome it.
So, I have a page with a simple form to search for a particular string in my database. But I want to have the result show up on the same page....

I am using jquery, jquery mobile and html to build a mobile app using phonegap.
Using ajax to call php scripts in server, works fine; updating, inserting data and sending email. However ajax error function is what always called,
Using firebug, 200 ok status is what returned, no idea what trigge...

I have the following :
header( "refresh:5;url=http://linkhere.com/caretech/resetpassword/reset_p/'.'$random_key'" );
I want it to redirect after 5 seconds , but I keep on getting the following error:
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - ...

Okay, this is going to be a very weird request/question.
There is a very long running PHP script that needs to be launched by the user (admin) who is not very technically adept. When running the script through apache, it throws a timeout (502 or 504 Bad Gateway).
Let's just assume that apache ...

I have a set of rows to be removed, but when i used the jquery remove it didn't work.
It didn't remove the clone, but it did remove the original. What I want is when the delete button is clicked, the rows which is the parents-parent to be removed.
HTML
<tr class="expnedu-edu-record">
...

I want to colour different regions of an arcgis online map according to data in my database using php, mysql. Help
i am trying to integrate arcgis online API using jasvascript into my system and colour an arcgis map through data in my database.

I have a long IF else statement that checks the url and display a button, Im struggling to simplify the code so that it will also be easier to maintain.I would prefer a loop to go through all tohse pages.
if(($currentUrl == 'http://example.com/example/management_toolkit.php')){
echo '<di...

i am trying to learn how to configure "mercury xampp" to run a smtp server. and i have searched everywhere and i found 2 links form where i have leared.
http://www.open-emr.org/wiki/index.php/Mercury_Mail_Configuration_in_Windows
and other one is the youtube video : http://www.youtube.com/watc...

When I click on .deletePost I get the following errors. It seems like $mysqli is undefined, but I use it in a similar php script in the same way and it doesn't have this error so I am confused as to whats going on. Can someone please explain? Thanks!
errors:
Notice: Undefined variable: mysqli i...

I need to work with a hashtable which values can store variables like:
$numberOfItems
$ItemsNames
If I ain't wrong, that would mean another hash like array as value.
What should be the right syntax for inserting and iterating over it?
Is anything like:
$hash['anyKey']=>$numberOfItems=15;
...

I am developing a SMS gateway for my E-Commerce website and I am using Woo Commerce plugin in the Website. I have purchased SMS API from www.sms19.info. So, i want to use that api to send sms notification of status of order booked by customer and more even i want to edit the e-mail format being s...

I'm attempting to create a dynamic drop down list, but after searching for hours I'm still completely stumped as to how to do it. So I am experimenting with variables in a list. This is the code I've started with.
<body>
<form method = "post">
<select id = "State" onchange = "a = this.o...

Everyone..As the my title says,I have a question and want to leave my comment ,but fail.
Here is the old question link(Progress bar while running while loop). In the question ,for Vlad Preda's answer, I am a little confused.
In his every javascript loop, use php do the main thing.But the php do...

i follow this url http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/ for display push notification in android.code is running without any error but when i send message from server it not showing on device and also not showing notification

I've inherited a Magento project and needed only to change the value of two config variables, both payment URLs in table core_config_data.
I did so easily, but the old values persisted when loading the payment button pages. I then attempted to clear the cache by running the following:
$mage_fil...

I'm trying to post a serialized data from jQuery to php like the following.
$.post(location.href, $('form).serialize(), function(data){
// do something
});
It's working very well. But is there a way I can set a name to the serialized data, so I can use that name for isset() function? It'll...

I have a codeigniter app that my model sends out some stats for the current month to the front end. My code now seems very redundant but I don't know how to combine using Active Record queries. Hoping someone can show me a simplified version of below. Initially I get the month we're in (start and...

I have a php method that should return some values as JSON :
function pass_value() {
....
$output[] = 'some value';
...
if() {
//JS get it right
echo json_encode(array('response' => $output));
return;
}
...
//eventually another echo
}
Where's the problem to do it like this ?...

I have been trying to figure out on what is missing in my codes. Basically whenever i click the submit button to send the data in the contact form, it basically returns me to the home page and displays "page not found" in the tab.
Here is my code
<?php
$error=false;
$sent=false;
if(isset($_PO...

I realy don't understand the following syntax yet, i need some help.
I want to click some result from the auto-complete results and have the Pid from PHP appended to a div with an ID named Pid.
Here's my JQuery Auto-complete
$(function() {
$( "#SearchInput").autocomplete({
...

I have a linux based router with two interface , one is for WAN and another is for LAN. and configure DHCP. all clients are getting internet properly. actually i want get which ip downloaded how many data in MB. i want to create a php page for showing realtime data transferred by per IP. so pleas...

I will have multiple servers to host my PHP web application. So I can't store session on server, instead of it I need to store session in database. Because it will be common for all servers. That's the way users' session will be maintained, no matter which server the user connects to with each re...

My code inside of function deletePost() is not executing. This is because the contents of $_GET['action'] is not "deletePost" as it should be. I tried echo $_GET['action'] to figure out what it was and I got this error:
Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), exp...

i have a problem but with my magento, it's about export price in export/import profile. i've done it by click run profile in popup but after i check in profile page for export price, the date is not modified for the new one. i checked in history, it listed. (attachment). it confuse me when i whan...

Hi i have a repeating dates in array values i wan to count the number of repeating dates from the array value. I tried this but am not sure to do it correctly and am getting error Undefined offset: 0
<?php $array = array('2013-11-28','2013-11-28','2013-11-28','2013-11-29','2013-11-29','2013-11-...

I'm new in GitHub and I want to fork a project. Within that forked project, I need to create another forked project.
For visulaization, here's what I need:
FORKEDPROJECT1
|
|
|
SUB-FORKEDPROEJCT2
|
|changes on forkproject1
|.....
how am I going to make this?
Than...

Hi I faced a problem in Drupal CMS. I browse online but i not found any result about this. In different places we read that open .htaccess file and uncomment the following lines by removine hash tag from start but this is not working please help me out.
# To redirect all users to access the site...

I understand in some way the differences between mysqli_fetch_row, mysqli_fetch_object, mysqli_fetch_assoc and mysqli_fetch_array.
My question is if they are so similar (if they are really almost the same as many topics say) which should we use?
Why should we use the preferred one and is there s...

So i'm using a solution i found on internet to send file, and it's actually working !
But i don't really understand why :(
In my solution i'm generating a CSV (test;test;test;test;test).
So i tell my header it's a csv file and that it should be an attachment as well :
<?php
$nom = time().'.csv...

Why will this only work the SECOND time I navigate to another page?
On page on:
session_start();
$a_var = $_POST["var"];
if (isset($_POST["var"])) {
$_SESSION['ses_var'] = $a_var;
echo "<script type='text/javascript'>relocate('http://www.mydomain.com/newfile.php');</script>";
}
On page two:
...

I have 2 sets of code 1 for limiting the results and creating extra pages 1 2 3 4 etc
And a seach that wil go trough all database records to find something specific.
But i cant seem to find a way to combine these two.
So the goal is get a search that show a limited amount of results and make ext...

I tried to create a chart in which weekly played games are present.
ie, how many times played a game weekly and how many games played
weekly details are included in a chart. my table values contains a
game played in particular date. that means
gid name date count
ex. ...

My customer with shop "x" has created new shop for the client "Y" which is a wholesaler. Retailers are doing shopping in a store customer "Y" and the client "X" issue all invoices to the customer "Y". Client "Y" in an external program invoices to their customers. Place of delivery must be seen in...

I'm planning to connect an existing php application with Magento, in order to use it's powerful store features. I already have a database with all the user data.
What I need to do is to simplify the ordering process. Think the following scenario:
The user first logs in into my application
Then...

I have a table called admin_permissions with the following columns:
sequence
page_name
level_user
level_admin
level_support
level_accounts
the last 4 columns are the different levels
I have this code which checks the permissions:
$permission_sql="SELECT * from admin_permissions where page_n...

Can someone help me as i'm new to php?
I'm running a movie site that using smarty template engine and what i'm trying to do is return and display all categories foreach movie but what happens is it displays the same category 'Comedy' for all movies when i use this
The functions
public functio...

So I'm trying to build a website in which I will have different Youtube videos organized in playlists.I want a page to display the playlists I have grouped by categories, and a watch page to watch the videos with "previous" and "next" buttons. I am using PHP and MySql. I always sucked at database...

How can I get all attributes from a tags?
<a href="URL1">TEXT 1</a>
<a href="URL2" rel="rel2">TEXT 2</a>
<a href="URL3" rel="me" target="_blank">TEXT 3</a>
How can I get this result with PHP? Is there any way to do this with PHP DOMDocument?
Array
(
[0] => Array
(
[hre...

Hi here is my script when Someone upload image it saves data to the database and also it creates a page with title filled up in form. See the $template in PHP script it is the page which is generated it is empty but I want to show image in this page when image was uploaded.
What this script can ...

There are an html code that contains many hrefs. But I don't need all of hrefs. I want to get only hrefs contained in the div:
<div class="category-map second-links">
*****
</div> <p class="sec">
what i want to see as a result:
<a href='xxx'>yyy</a>
<a href='zzz'>www</a>
...
My version (n...

Hi i am creating simple news website and i need to count news views.
That news hits increased per page reload like joomla. How should i structure database in mysql.
I have 2 method:
create column named hits and updates hits+1 in all page views.
Create new table that have 2 column { content_id...

I want to automate Recover Password flow. If user click on link button provided in email then automatically new password should be sent to user.
Steps for getting new password: (I want to automate this scenario)
1. Open php based web application
2. Click on Forgot Password
3. Enter email addres...

I need to run some long tasks in background, I have 2 options
Using laravel queues
Using cli to launch artisan command as the following
$process = \Symphony\Component\Process\Process('php artisan commandname');
$process->start();
Which of those options has better performance?

I've the following code in php file:
<?php echo htmlspecialchars($item['title']); ?>
now the same, how can I include in js file?
In default_files.php I have the following:
<?php foreach($this->files as $item) : ?>
<div class="file">
<div class="thumbnail" style="background-image: url('<?...

I am in middle of an issue where I am getting a string "INSERTED SUCCESSFULLY" as the response from my httprequest, my aim was to match it with a local string (same as above) however when I try to match them they dont match hence does not enter into my condition.
UrlEncodedFormEntity entity = ne...

I am trying to blur an image and need a faster solution.
This is my current attempt which is much too slow for large images and I do not want to use imagick.
public function blur($filename, $extension, $factor = 20){
if (strtolower($extension) === "jpg" || strtolower($extension) === "jpeg"...

I need to send "a base64 encoded serialized array of custom field values" to PHP api from C#.
An example in PHP looks like
base64_encode(serialize(array("1"=>"Google")));
Its easy in c# to convert encode string to base64, but how should string look as?

Im having trouble with this query:
SELECT a.created_by,
CASE WHEN a.created_by_alias > ' ' THEN a.created_by_alias ELSE ua.name END AS author
FROM #__content AS a
LEFT JOIN #__users AS ua ON ua.id = a.created_by
WHERE a.state='1'
GROUP BY a.created_by
ORDER BY author
The results which re...

The last two times my production server reboot, I noticed some of my MySQL database tables had been changed.
I'm using CI Bonfire on PHP 5 server. The concerned tables are users, permissions, role_permissions and settings. These 4 tables are reset to their initial structure every time the server...

Seems I don't quite understand much the function strtotime. My case is I would like to compare the current time (now) with a specific time on specific timezone
For example the specific time is "this Monday at 15:00:00" at the timezone "America/New_York":
$specificTime = strtotime("this monday...

i have a live website on the modx revolution i have taken its copy and installed it on the local server the installation so far went successful but the admin login page looks messy just like that css is missing or something else so can anyone tell me how to correct it ? i have done login with my ...

I am trying to select a random row from my table with ids in my array.
The string $data has all the list of ids that i want separated by commas.
$statement = $conn->prepare("SELECT * FROM clients ORDER BY rand() WHERE find_in_set(id,'$data') LIMIT 1");
this is my query,
id is the field of my...

I'm running a blog on subdomain. "blog.ourcompanyname.com".
Wordpress folder is located under "/var/www/wordpress"
Apache instance is running on 8081 port (manually configured) and being proxy passed by Nginx (which runs on 80 port). The reason we need NGINX is because we are running a second ...

I get a string from a database. The string can look like this....
Homeland - Some Loose Ends Will Be Tied Up in Homeland's Finale
Game of Thrones - Star Jack Gleeson to Quit Acting After Series
I want to remove the title including the - in each string. I looked into str_replace() but i can onl...

hi have elements in li they are generated using for loop
but i wanted to split them in group of 3
Like,but i could not achive this uisng for loop so i used manual switch case for eg,
apply row1 for case between 1 and 3 than apply class row2 for case between 4 to 6 but if
there are many produc...

i have started learning codeigniter a week back from now,i am still relatively new at it and s till my finding my ways through mvc pattern and Codeigniter
the issue i am facing is quite strange and em not sure what i am doing it to cause such a flow
i am followig this tutorial http://ellislab.c...

I have a problem with jQuery pop up. I have some content load by ajax. And I want that content to be a pop up message (onclick event). On the first time whenever I click the popup link it shows correct content. And after loading content(in Ajax) first time it shows correct content, But next time ...

As my title said, I successfully remove index.php from URL, but apparently when I type "index.php?", it is not working. I have googled everything but found nothing with this issue.
Here is the code in my htaccess (I am using CI also):
RewriteEngine On
RewriteBase /
RewriteRule ^index.php/(.*)$...

I am using a "process class" witch performs some loads of Excel files, some getCell and setCell. Furthermore some writes to output.xlsx. The process class will also echo the peak memory usage. None of the input files changes during the process. Now when I run the process multiple times (e.g. beca...

I am literally cracking my head to covert the PHP array to Java array and convert the same in the correct format. This is what I have
My PHP array is stored in $data (this comes from a SQLserver query) which I am converting to Java array using json_encode
Here is the code $javaarray = json_enco...

When the user press button the data will be save into database.After success I want to retrieve data from database and place it in the proper td ( in the same row of the clicked td) i am success to retrieve data but not assign the retrieved data to the different td
ajax
$(document).ready(funct...

I am creating a PHP curl request to server and expecting some string in response but no response generating , What may be the reason for that?
Below is the Curl code for the same:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://host:8090/add-user");
curl_setopt($ch, CURLOPT_HEADER, f...

I have an issue with file_get_contents which gets me the result (an echoed json flow, with json_encode). The file_get_contents get the data echoed from website1 and echo it on website2, but this data is gotten only once every two times!

I want to make the sorting via getLoadedProductCollection.
For product attribute, I have one custom attribute 'featured_product'
Here is my code:
$sort=$_GET['s'];
$_productCollection=$this->getLoadedProductCollection()->addAttributeToSelect('featured_product');
$_productCollection->clear();
...

The registered users on my website can create nodes from a content type called 'Stuff'. I'd now like to display the author's User Points he/she had when he/she created the node. That means: the value shouldn't be updated when the author's User Points change in the future.
How can I do that? Can ...

I'm working on an already existing cakephp 1.3 project and I needed to add a new table to the database. I have this in my controller:
$conditions = array('ShootingPlacement.person_id' => $id, 'Email.person_id' => $id, 'Email.shooting_placement_id' => 'ShootingPlacement.id');
$shootingPla...

im biggner in opencart my issue is i add field in product table called (model_choice) ,
in the product.tpl page in path (catalog/view/theme/default/template/product/product.tpl)
i want to get the value of the row (model_choice) for the selected product
i already get the product id with $this->r...

I have a blog that has WP-Ecommerce setup. The problem I am having is with the WYSIWYG editor. If I paste text into the editor it encloses paragraphs in div tags rather than P tags. Now if it is an E-commerce part of the blog ie. the new product WYSIWYG editor it always does this never encloses w...

I want to insert one link in the email for example:
https://login.yahoo.com/config/login_verify2?&.src=ym&.intl=us
When user click on that link button in email then this yahoo login page should open in the default browser, it's very simple to do but I want that one predefined username should al...

I am trying to create a sparkline chart where the transaction amont is being fetched from the database .but the problem i am facing is i am not available to retrieve mutliple values from the database directly into the html page. here is my htm code for the above .
<script type="text/javascript">...

Good day,
I am designing a game and part of that game is to collect items which can be exchanged for other items... for example
If a user wants to get a car they will need to first have the following
2 x steel
1 x alloy
1 x rubber
So the script i need to create will need to check if the user ...

I am building a Laravel 4 application and I am trying to sort out where my admin controller functions should go.
eg my admin user view, edit and update functions.
Previously in my User controller, I would have
function getIndex()
{
// Get method for normal users
}
function getAdminIndex(...

I realy don't understand the following syntax yet, i need some help.
I want to click some result from the auto-complete results and have the Pid from PHP appended to a div with an ID named Pid.
Here's my JQuery Auto-complete
$(function() {
$( "#SearchInput").autocomplete({
...

I am currently checking if a device is an iPad or not using the following code
if(stristr($_SERVER['HTTP_USER_AGENT'], 'Mozilla/5.0(iPad;')) {
// probably an iPad
}
It is reliable enough for my needs. I need to detect whether it is an iPad 1, 2 or 3.
I have searched and can not find an an...

i have developed the web site using wordpress.When i view the website in Internet explorer 9 it works fine and all the contents are displayed in correct position.but when i view it using IE8 the position of the images are not inthe places where they are supposed to be. Using meta tag to fix this ...

I am trying to integrate Sage Pay token system with PHP but i couldn't any useful help.
My problem:
I just want to know how can i send request and receive response to get token via server integration.
Please guide me to resolve my above issue. It will good if anyone can provide me sample code ...

Ok, so a long title, but apologies, he only way to describe it without getting the wrong kind of answer.
So, the scenario....
I am creating a site which has a search form of sorts in the header, and therefore on every page. I would like it to retain its previous variables when being used for us...

I was trying to set a dynamic height to an iframe but it always fail; I'm looking for an iframe alternative that retrieves contents from webpage and display it in the holder page with dynamic height. Any suggestions?

I want to synchronize two tables of different databases. for Example if a user update the phone_no of table1(in db_one)it should read the record of table1(in db_one) and insert it to the table2 (in db_two) as a new record.
is it possible? any help will be appriciated
thanks in advance.

I need to use PHP's SoapClient using CLI interface.
It works, but the problem is WSDL files are loaded over and over even when WSDL cache is enabled:
var_dump( ini_get_all('soap') );
array(5) {
["soap.wsdl_cache"]=>
array(3) {
["global_value"]=>
string(1) "1"
["local_value"]=>
...

I've created a custom module in SugarCRM and a process.php file for it that the code what it has to run when I save a record. Made it
like here.
My question is:
Where is the file that will call and run this code when I hit the save button on a new record?

Since I started developing my website using OS X i get issues with headers.
I am using CakePHP framework on Mavericks. When I was running it under Linux, I had no issues at all. I guess it is an encoding error...
I checked I had no whitespace before or after the php tags.
And I get this error ...

cssimageslangs en
site.phpprotected
controllermodelview
This is my folder structure. I want to import this site.php file in a controller SiteController. I tried Yii::import('langs.en.site', true); , tried alias in main config. But nothing worked. Any other way ?
code in site.php
define('Ente...

i have a model generated as Parent from Yii.
class Parent extends AppModel {}
so when i use it as following, i started getting an error.
$parent = new Parent();
Fatal error: Cannot use 'Parent' as class name as it is reserved in E:\Customer\Qelasy\Project\QelasySecurity\web\SourceCode\prote...

I need a little help.
I have pictures in my directory, directory path /camera/test
I need a php code that rename all the picture with date and time they are uploaded to that's mean last modified date and time.
Can someone give me this code?

I've installed a module for prestashop that moves the product customization tab after the details and checkout button of the product but I want to get it before the checkout button so my customers can save their customization before they checkout. It makes sense. Please help me out for this!
by t...

I have a multisite Wordpress setup (3.5.1, I cannot risk updating) on which I am querying some posts after having switched to the correct blog.
I have a query_posts function with the following parameters:
$posts = query_posts('posts_per_page=5&paged=1&post_status=publish&orderby=date&order=desc...

I want to show <li> </li> in at my php page. But when i am writing this code i am getting HTML ourput as List tag. But i want to show the example code as <li>This is first line </li> there
How can i show that. I know that there need to use \ to make any code readable is PHP. So i used,
\<li>Thi...

I am just about to write a method to convert some billing data into an invoice.
so say i have and an array of object that contain the data necessary to create the invocie items.
While in the billing controller Which of the following way is correct
$invoice = new Invoice();
$invoice->createInvo...

I'm currently learning Symfony framework and I have a problem with extending the base.html.twig template on the same page.
I've created two bundles, one for a header bar with specific features that will be everywhere on the application and one for the actual page.
For now their controllers are...

If my database contains some
previous records, how can I query each db row before new record can be inserted into database from my xml file (containing 400 records) to
prevent duplicated insertions for
every xml file load or read
sessions.
Below is the Php & mysql code that simply read and ...

Hi I want to learn typo3. For this I install the typo3 4.7 dummy & source on my xampp. I can start the backend but my Problem is that I don't can use the Extension Manager.
I see the Extension Manager but if I want to change the language. I get the follow error:
router
tx_em_Repository_Util...

I am using Doctrine result cache in symfony2.
only in production environment doctrine result cache delete is not deleting cache.
but in development environment result cache delete is work fine.
here is code which i have written to use result cache in doctrine.
//code to store result cache in ...

i have a postgres based database and there is a table that has more than 5000 rows.
i need to display these rows in a page, but the way i am doing it now is i get all the 5000 rows all at once which gets very slow at times.
i installed memcache and i want to call 20-40 rows per scroll; meaning ...

i've created a page that displays all of the table results in a list, but if you select a category name, then it filters those results to all rows that match the category name in the URL(using friendly URL's) in either the category_1 field or the category_2 field. here's what i have now:
$colnam...

I have the following drop down list populated from a db query.
I am struggling to figure out a way to add items selected from this dropdownbox
to essentially a list like a shopping cart which allows me to make multiple additions from this drop down box.
Can you anyone guide me with this
<

I am new to PHP coding. I have created a Customer form, followed by send e-mail function. When a Customer submits data (including E-Mail and password) he should recieve a confirmation e-mail with User ID (same as entered E-Mail Id) and entered Password.
At this moment, with my current code, when ...

I am fallowing video tutorials on the internet and this is one of them But I am getting syntax error and couldnt find where it is
<?php
function hesapla($ilktarih,$sontarih){
$yil=$son-$ilk;
$ay=$yil*12;
$gun=$ay*30;
return array("$ilktarih","$sontarih","$yil","$ay","$gu...

I had a basic QR Code generator but the problem is cusstomizing the QR codes. You can look at this website
http://www.unitaglive.com/qrcode
I got a clue that I can use Imagick - an php extension to customize images after generated but I haven't found any tutorials about how to use it to make l...

I have completed coding of a web application created in Yii.Now my client needs to make it responsive.I have searched about this for a while and found yii-bootstrap for responsive design.But looks like I must have started coding with that.The components are different than I used.
Is there any wa...

I have a Database with set of specific addresses, I want to use Google Maps API to search within a radius all the addresses which fall in and use markers for them.
The data i am getting from PHP would be like this:
...

I have some custom exception for my application. I placed them to app where it is running well. Now I want to move them to one of my plugin and use exception from their.
I have implemented custom exception as mentioned here:
http://book.cakephp.org/2.0/en/development/exceptions.html
But, I am l...

I want to make a Bootstrap Theme with the Menu on the left sidebar. The problem is that I can't fix the content after the sidebar menu. Here's a screenshot:
I am working on Sensitive WP, the free Bootstrap for WordPress template.
Here is what i have in header.php.
<div id="wrapper">
<...

Hi I'm sending a variable from .js file to a PHP file but it always give me an error like this Could someone please help me to sort it out.
. js file................
function AddDataRows(){
var retVal = prompt("Enter the number of textboxes need to add");
$.ajax({
url: 'CreateTheForm.php', ...

I have some MySQL tables, I like to red and process by PHP. Those tables are bigger ones, which does not fits to the RAM.
For performance reasons I need to read a block of table rows, process them in PHP an read the next block. Using PHP PDO I found out, that "fetching" means: fetching data from ...

In dev env Symfony2 logs SQL queries to dev.log by default. For profiling and debugging purposes I'd like to log a query's execution time as well. This must be possible since the "real page"'s profiler shows the execution times next to each query. I think the correct class is the DBalLogger + a s...

We are using PHP Mailer class to send email from our website. It is taking around 17 seconds for sending the email everytime. Apart from email sending remaining page loading and executing are normal.
Environment: SuSE Linux 11, Apache 2.4.1 and PHP 5.5 versions.
When sending email with PHP mail...

I use the following code to get information from my MySql data base in order to display items :
$sql = "SELECT product,size1,size2,prdname,price FROM multisize WHERE online= 'online' AND category = 'backcovers' AND campaign = '".$brand."'
ORDER BY size1 DESC, size2 DESC ";
Some times I have th...

At the moment, I have a shopping cart that will add an item to the cart session. If another of the same item is added to the cart, it displays duplicate items, each with a quantity of 1.
What do I need to add/change for the code to update the quantity of an existing item? Instead of adding a dup...

i have write a little function in php that create an array from a css file contained values of element in css.
Now i need to cicle this array and extract in another array containing just the value of colors (all string start by #) but i don't know exact lenght of string (sometime #FFF, other time...

This place has been a real lifesaver at times so thank you all for your efforts in making this place so great. However, I have an issue that I can't find an answer to on here.
I have a website that has a contact form on the home page, and a contact form on some inner pages. I need each one to ...

I got a question. I can't seem to get the last inserted record/id from my MySQL database/table. I want to return the last inserted id from the column 'tag_id', but I'm not getting anything back at all. I'm using DBO by the way. I tried both the 'mysql_insert_id' and the 'lastInsertId', but no suc...

i'm using this api below to find out nearest hospitals.In response json i'm not getting the contact number of those hospitals. how do i get that????
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=22.5531,88.3564&radius=500&types=hospital&sensor=false&key=AIzaSyBdBBjxmc51SAq...

Hi I have been using Rcurl for a couple of days, so I apologise if this is very basic.
I am trying to extract information from a table that spans multiple pages in http://www.ncbi.nlm.nih.gov/clinvar/?term=BRCA1
Specifically I am interested when Clinical significance is pathogenic and I would l...

Is this the surest way of detecting an AJAX request, or is it safer to add a custom header to my jQuery.ajax code?
function isAjaxRequest() {
if (isset($_SERVER['HTTP_X_REQUESTED_WITH'])) {
if (strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest') {
return TRUE;
}
}...

I have three classes Billing Invoice InvoiceItem
The billing class works out the billing and finishes up with the data for the invoice and and array of data from the invoice items $billing and $billingItems
the questions is how do I call the methods needed
In Billing Class
$invoice = new Invo...

I've been looking for awnsers for hours now, and I'm not able to figure it out.
What I have is an Array that I want put into a database
if(isset($_POST['newvalue']))
{
$array = $_POST['newvalue'];
$getcatidquery = mysql_query("SELECT * FROM categories...

I have the following route:
Route::controller('/boards', 'BoardController');
which responds to the following routes:
/boards -> function: getIndex()
/boards/board/Some-board-Alias -> function: getBoard()
what I want to do is - when I enter the following route:
/boards/board/Some-board-Alia...

I want to synchronize two tables of different databases. for Example if a user update the phone_no of table1(in db_one)it should read the record of table1(in db_one) and insert it to the table2 (in db_two) as a new record.
is it possible? any help will be appriciated
thanks in advance.
i tried...

I have following requirements
There is a admin table where we are storing sub admins(QA Manager, QA) using parent and child relation
There is some task table where all tasks are getting stored.
Now what will be the table structure of assignment table so that I can retrieve task assigned task wi...

I have written a PHP Script to insert data into MySQL, for client side i am using Android, by using one the button i am uploading Image and by using second button I am storing Image Information into same table (Information like:- PersonName) i have around 10 fields.
but I am not getting my data ...

Given a user's email address and then determining its domain, I would like to retrieve the SMTP settings for the server for that domain.
Is there a way to fetch this infomation form the server for that domain ?
Or do I have to maintain a repo of my own and query it?
Eg:
A user enters his email ...

I am getting time in the following format as a response of an API call. How I can I convert it to Y-m-d H:i:s I used the following :
$time_other_format = '2013-10-29T08:34:01-0700';
$time = date("Y-m-d H:i:s",strtotime($time_other_format));
This is returning the time, but the time is changed ...

I am posting data from iphone application problem is that when i access the url using post from browser and pass www.apple.com then it shows result but when i pass from iphone code it does not return any thing in data as given below in code.
NSString * URL=@"www.apple.com";
NSLog(@"User ...

I need to connect to a certain webservice that uses RSA encryption. Using NuSOAP and PHPseclib I can connect to the server to get the public key used to RSA encrypt and send back data to the server.
Problem arise in the way they are encrypting the data, the developer there gave me documentation ...

PHP set cookie works sets a cookie correctly for example.azurewebsites.net but not for example.com url. The example.com is a url that redirects example.azurewebsites.net . Any ideas on how I can solve the problem? Thx in advance !

I am currently working on a project and i'm required to use AHP.
A brief outline of what i'm trying to achieve here:
User creates a goal
For every goal, there could be many risks involved
And for each risk, there is one or more alternatives to solving the risks. And an alternative can be us...

I'm trying to create a forum in which people having their account and i don't seem to understand this concept.
After we created the file named after the user, do we create a new PHP file and write all the codes in it or is it something else.
I can't understand it quite nicely.

I am trying to Send and receive the XML using curl in PHP. I want to try
to connect the salesforce via curl request.
But the problem which I am facing is that the response is a single
string, whereas salesforce returns the response in XML.
I am sending XML request to login into the s...

I'm a php programmer. I need to get an API response via an TCP/IP Socket connection (XML over TCP/IP) and an XML data need to be passed with parameters.
I tried the following code:
$host = "12.345.567.789"; //dummy
$port= 12345; //dummy
$certFile = 'certificates/certificat...

I have 1 million+ records in database.
On the index page, multiple filter to filter through database create where clause.
eg
select * from primaryinfo where category='abc' and technology='PQR'
I want to show--:
1. number of records found
2. pages.
3. 10 out 100(kind of thing) on the page.
Am ...

I'm trying to run this code but I keep getting this error.
Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION
cannot be activated when safe_mode is enabled or an open_basedir is
set in
If I simply comment out the offending line the script fails. Is there an alternati...

I have a website where I index informations about movies. To find a movie the user can input the title of the movie and this query will be sent to the database:
SELECT IMDB, Name, Year, Views FROM Movies WHERE Name LIKE '%$search%'
I used the "similar_text" function to solve little mistakes. F...

The goal
Using $context as property name of a stdClass in PHP.
The Scenario
There is the following scenario in my application:
[...]
public function diagnose($issue, $index)
{
$json = json_decode($this->getJson());
$json->$issue[$index]
}
[...]
The instance:
$investigator = new ...

We have a product listing page, how to show 404 error where in if the product is not published in Joomla 2.5. Here v_status in database is the publishing value, 0 as not published and 1 as published
function loadProduct($vid){
$database =& JFactory::getDBO();
$sql = "Select *, (select prod_name ...

I have purchased a template from Themeforest, and have most things up and running, but struggling to get the contact form to send me an email when submitted. I have contacted the developer of the template three times, and have not received a response, so thought I would try here.
I've set up my...

I want to INSERT 4200 rows into MySQL with PHP (laravel 4), but after row 127, the rest of the rows will remain as the same as the row 127!
(Sorry! can't post any img...)
http://i.cubeupload.com/vj6k7v.png
the query:
DB::insert("INSERT INTO unit_word (unit_id, word_id)
VALUES (1, 1...

I'm trying to make an if statement that if the a meta data field is filled than post the youtube video, if it isn't than post the featured image on my single wordpress post page. I'm new to If else statements so I'm not sure if my syntax is right as I keep getting errors.
<?php if ( get_post_met...

I am an amateur hobbying a video site, where users can submit video urls. Everything works, but now I want multiple categories to be able to be selected for one same video. Categories are stored in seperate tables. I am sure you will understand from the code:
mysql_query("INSERT INTO videos
(ti...

i am using get_entry_list method to get the data of 'Leads' from sugarcrm using soap. I want to get the data using a query.
I am using the below line of code to get that
$client->get_entry_list($session->id, 'Leads', NULL, NULL, NULL, array('id','email'), NULL, NULL, NULL, NULL);
but It is f...

hi guys please answer me ASAP so what i need is a code for a textbox, then, what will they type on that, will redirect them to a url. For example, i f you typed "stack" on the text box,youll be redirected to " mywebsite.com/Stack " thanks for the help

Hello people ive got a problem with this php form it emails a automatic reply back to the user, but the email coming back doesn't include £ signs and ' single quotations, I have looked at something to do with the header and encoding the email message but not too sure on how to incorporate this?
...

This file encryption code works fine. The data in a.doc is encrypted in b.doc and decrypted in c.doc (all the files are in the same directory).
Encryption_decryption.php
<?php
function CryptFile($InFileName,$OutFileName,$password)
{
if (file_exists($InFileName))
{
$In...

I'm using the multi datepicker for my registration site. http://multidatespickr.sourceforge.net/
The problem is , it clears the value of my input field every time i use it. and i need to get the value in the input field from $_GET before I use the plugin. FYI the date formats from $_GET and mult...

I'm using PhpStorm and WAMP.
My project location is: C:\!Dev_Web\PHP\PHP_test where I have a file test1.php
<!DOCTYPE html>
<html>
<body>
<?php
echo "My first PHP script!";
?>
</body>
</html>
The wamp location is: C:\wamp (port 80)
When I run the file I see the results in run window.
How ...

How can I use a link to navigate between input boxes? So if I click the link it will focus on a specific input box. The solution can be with PHP, CSS, JavaScript or HTML.
So:
<a href='link1' class='link'>
Will navigate to
<input type='text' id='input1' class='input'>
And
<a href='link2' c...

ok i am fairly new to the PHP scene so please correct anything i might have done wrong ect. I am trying to do a calender list, which as soon as it get to the day after the due date it hides it from view. i currently have it getting the information that is submitted however not sure how to continu...

in my current product view http://goo.gl/pgdoUl I have all required custom options with a pop up windows that show up in case the value is wrong eg. Track/Pole Length - Finished Curtain Drop. If in the text file all the information are wrong it's still possible to add to cart the product.
How in ...

The problem I am facing is that spl_autoload($class) passed in spl_autoload_register callback, will not load classnames which refer to the same filename, but in different directories.
What I want to achieve is using spl_autoload, not using require and without namespaces, to load automatically fo...

I'm currently building an app, which allows users to create client accounts. The clients account all need to be linked up to there facebook fan pages, so I can pull through likes, comments and statuses in my app for the client to see.
My problem is I need the user to be able to login to Facebook...

I have a custom Html Module, I need to display in a Component view. How to get the Custom Html and display it in component view.
jimport('joomla.application.module.helper');
// this is where you want to load your module position
$modules = JModuleHelper::getModules('custom');
foreach($modules as...

I'm trying to create an external php script outside of wordpress to manage posts in a custom backoffice (using Symfony2).
So far everything works fine. I just want to know how to set a post thumbnail manually by uploading a picture and registering its informations directly into Wordpress databas...

I have a string variable and I want to get the first letter of every word of it.
I want the end result to be an array of first letters.
$language = 'Sample Language';
preg_match('/(\b[a-z])+/i', $language, $match);
print_r($match);
What I am getting is only the first letter of the first word.
...

I've ready so much sad people whining about how bad structured PHP is, the big inconsistencies it have, WTF quirks, etc.
And as I know PHP is open-source, which means anyone can get the code, fix its problems and publish a new lang. But the question is: why nobody does that?
I mean, PHP was mad...

I want to search objects by tags. The first approach I came up with was the following model:
Object(OID, Tags, ...)
Tag(TagID, Name, ...)
ObjectTag(OID, TagId)
The field Tags contains all tag names.
Now I don't only want to search by one tag but by many tags. The query looked like this:
SELE...

i had created my account in paypal.I need to integrate payflow paypal pro to my website for this i need to get partner,Merchant Login,Password details,how i should get it, how i can
integrate payflow paypal pro,and how it should be tested

This is the scenario I have,
I am using PHP and Jquery.
An object is encoded as Json and sent to a browser, the user then makes changes to the data and updates, the self same Json string that has been passed is now being returned to the class to be decoded.
How can I ensure that when I decode...

I've been working on this problem for hours and can't seem to find the solution, hopefully someone can help!
I'm trying to create a simple MailChimp subscribe form on an HTTPS site and hence must use the API. I am using the "super simple mailchimp-api" PHP wrapper they suggest, and am trying to ...

I'm using Ajax to load the content of another page in a div with Twitter Boostrap tabs, but the ajax is taking too long to load the page.
Without Ajax page loads very fast!
Page loaded in ajax call: 28.743376016617 ms
Page loaded without ajax: 0.00022506713867188 ms
This is a code of the ajax c...

I am imported my Project trough git, the project is a php project running on symfoy2.
However it seems that intelliJ does not recognize it as a php project and therefore only shows a bunch of files (static web files such as .js, images, ... )
I was wondering if there is a fix for this, i did the...

Friendship in my DB is a two way street. Check screenshot:
So user id 14 and 1 are friends.
I want a query that can be initiated by either party and that deletes two way street completely removing both rows.
How would I go about doing this? This is not simple WHERE asked asker = id.

First of all, m not so good at PHP and learning it, please help.
I want to make a page where I accept only mobile number and text and send it to 'process.php' for process next step after the following check.
A1- Mobile field contain only digits (no alphabet, no '+ or -', no 'comma'). If field ...

i am using sonata admin bundle and creating one employee form to save employee detail and i want to upload employee photo and display that photo on click of edit profile for that i am writing following code in location -
E:\xampp\htdocs\SymfonyStart\src\Sigma\EmployeeBundle\Admin\EmployeeAdmin
...

I am compiling PHP version 5.2 with mysql extension mysqli
bellow are the steps
Configure
sudo ./configure --with-mysqli=/opt/mysql/server-5.1/bin/mysql_config
[It's working fine mysql version is 5.1 i have also try with latest]
make
make
[After make bellow error i am getting]
-l...

I have an ajax search function that produces a list of names from database. Each name is echoed back as a form button so when user clicks on the name another ajax call will bring up all info related to that name. However, it is not working. I have tried several variations of the ajax function bel...

I'm not quite sure what happens here, and before I screw up my session data, maybe someone can explain it to me.
As a user logs in, I create a session for that user. The sessions are created in a special directory using ini_set('session.save_path',...) to prevent others from viewing them.
On t...

Alright, I don't know if this is even possible but I thought, Who better to ask then the professionals over at stackoverflow.
There's a game called, Zwinky, note I only play this game because it provides alot of easy access to alot of things that I feel can help me in the future, Via learning wi...

WordPress/Azure
I have edited my php.ini and changed upload_max_filesize from 2MB to 64MB successfully. Here you can see my phpinfo() results: http://www.lurkingpixels.com/wp-admin/info.php
I also wrote another script to verify that the values have changed indeed: http://www.lurkingpixels.com/w...

I recently added a cron job to execute a PHP file daily, but the database is not being updated as it should be in the PHP file. I'm assuming this is because the cron job is not running.
Here is what I put for the cronjob :
@daily /etc/cron.php (located by executing crontab -l)
-- php file ...

I have two webspaces, one domain. One webspace contains ~ 5 TB Audiofiles & Images, and one webspace is for the script.
My problem:
Take for e.g. my webspace url are domain1.tld & domain2.tld
On domain2.tld are all(!) files and and other things.
On domain1.tld i uploaded only the php files.
...

I have Google Analytics account with 2 websites to track.
Each of the websites has the 'new' code.
Here is one of them:
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.g...

I have a problem with a bit of code and connat figure why it is going wrong
//Searches the database for the username
$mysqli_username = mysqli_query($mysqli, "SELECT username FROM ajbs_users WHERE username=`".$username."`");
// if name does not exist
if ($mysqli_username == null)
...

I am trying to use doxygen to generate a call graph for a simple php file. My set up is:
OS X 10.8.5
Doxygen 1.8.5
graphviz 2.34.0
dot is in my path and my doxygen config file looks like this
When i run doxygen with my config file it generates the html and latex folders but I don't get any g...

I am having a bit trouble getting the PHP script to work. I am making a very basic form just collecting name and email
<form action"email.php" method="POST" id="signup-form">
<p><input type="text" id="name" name="name" placeholder="name" /></p>
<p><input t...

I want to create web based game. It may be on facebook platform or any java, php based framework or game engine.
I am familiar with php, javascript, java.
1.Can I do is using any web based game engine?if yes then can you suggest me game engine?
2.can android will be a good platform using faceboo...

i make a plugin in opencart that require to add extra field in the database
the field is model_choice int (255) in the product table
how to make it in product files that when replace files add this field if not exist

I have two innoDB tables in my database named customers and vessels. I also have a form with 2 select boxes one having the column: company_name of table: customers as options, and the other having the column: vessel_name of table: vessels.
What i want to do is make the options of the 2nd select...