« first day (220 days earlier)      last day (90 days later) » 
00:00 - 15:0015:00 - 00:00

12:04 AM
-3
Q: group key based on value array php

Tiago PereiraI would like to make an array with group key's based on value's array for exemple: I have this array array(17) { ["user-insert-resp.php"]=> string(3) "123" ["login.php"]=> string(3) "123" ["project-list.php"]=> string(3) "123" ["logout.php"]=> string(3) "123" ["index.php"]=> string(3) "123" [...

0
Q: Cut excess data from two files

user2821558I'm trying to find of organising to text files. basically one file has for example 12k numbers and another file has lets say 3k numbers. I need all the numbers from the 3k list to be found from the 3k 12k list and delete the excess on the 12k list. ![enter image description here][1] http://i.st...

 
12:16 AM
0
Q: filter php list with angularJS

Pacuraru Danieli am trying to create a blog page and i chose WordPress over AngularJS so google can index the page ( or atleast that's what i think it works). So for now i have a list which looks like this <ul> <li id="1"> <h2>My first Post</h2> <p>The Message...</p> </li> <li id="2">...

0
Q: md5 hashed string to normal string

user2805941anther simple question sir. ill be using this in my update profile. and im rushing. thank you in advance. ive been inserting my password in my database with this POST $txtPass = md5($_POST['txtPass']); then how could i turn this again to normal string. ?

-1
Q: C# Exception Error

Joshua PersontiI've been editing this emulator and I keep getting this error; 'Could not load MySQL.data.dll" - I've checked GAC to make sure the MySQL version is correct but I couldn't find it; I'm very novice when it comes to C#, I mainly only code HTML, and PHP. Here's the exception error from when I debugge...

0
Q: Symfony/Twig can't extend a template when displaying a grid with APYDataGridBundle

Erica AckermanI have a base.html.twig template that I have successfully extended in an index.html.twig file, which I take to mean that the base.html.twig file is well formed and being called correctly (this is my second day with Symfony, so bear with me.) I successfully installed APYDataGridBundle and am able ...

0
Q: How to add error message to this php function?

nRovI've added NOT IN so it wont include 21 and 25 when displaying the Knights but I want to add message like clan not found and etc but it will says something else. if (!isset($_GET['id'])) { $this->Error('CLAN_NOT_FOUND'); return; } $db = $this->database[GDB]; ...

0
Q: Custom where clauses in PHP prepared statement

HikariI'm reading about PDO and prepared statement, focused in Postgres. As I understood how ps is implemented in PHP, I can register a named query, then define variables for it and run it multiple times. But what happens when the use of where clauses depend on parameters. For exemple, if !empty($par...

0
Q: Creating an event when closing a window using Javascript

marchemikeI'm creating a popup that will allow me to select values from it, then after I've selected the values, I need to close the window, then pass it to my main form. The code in my main form: onClick="cust=window.open('popup.php?count=<?=$RowStart?>&name_id=' + document.form1.name_id<?=$RowStart?>....

 
12:40 AM
0
Q: php - strip path from url - no built in function?

Marty WallaceGiven a URL: http://mysite.com/this-is/the/path I just want the scheme and the host I.e. http://mysite.com/ Currently I am using parse_url and then building it back up like so: $urlParts = parse_url($url); $newUrl = $urlParts['scheme'] . "://" . $urlParts['host'] . "/"; Is there no PHP fun...

0
Q: Objective array giving Undefined property stdClass?

Dr.Neosimply i have JSON array which converted to objective array to working with it . each time i tried to echo any property (Object) from the array it gives error Undefined property: stdClass::$title this is the array stdClass Object ( [info] => stdClass Object ( [title] =>...

0
Q: Turning a mysql column into a php array and echoing it

GustavoxDguys, i'm having some problem when i try selecting a column from my table in mysql and turn it into a php array. When i echo my result (the php array), it doesn't return me a thing. Here is my code: $result_while= mysql_query("SELECT id FROM afunda_eleva"); $array = array(); whi...

0
Q: Unexpected T CONSTANT ENCAPSED STRING in CODE on line 2

user2821643Hello I am working on making a blog php script and I cant get it to work. I keep getting a error. If it is useful I am using Microsoft WebMatrix 3. <?php Print "<div class=""post""> <h2 class=""title""><a href=""#"">" .$info['title'] ."</a> </h2><p class=""meta"">...

0
Q: How to put watermak on video with FFMPEG,without resizing the watermark becuase of video resolution?

Shahbaz YounisIm looking for a way that the watermark picutre does not get resized,if the video resolution is high or less.Right now i have this problem,if i upload a video like 720p the watermak is really small and when i upload a video that is 240p the watermak is really big.I would just like it to be only o...

0
Q: Use wordpress username/password to register seperate account via php

neanderslobI have an odd question about password management under wordpress. What I want to do: I have a wordpress site in which users have the option to register for a separate app on the server if they chose. Each user has their own username and password, saved using wordpress protocol; the app also r...

 
1:10 AM
0
Q: Reg exp. with optional paramters

denlauI'm in need of reg-exp to match some text and then resulting in a CTA-button. What i want is, that the following text will result ind the output: {BUTTON text="(some text)" link="(some link)" target="(target, OPTIONAL)" class="(classes, OPTIONAL)"} <a href="$2" target="$3" class="$4">$1</a> M...

0
Q: get metadata from wordpress custom taxonomy

JaymesI have a custom taxonomy that I am using on a custom post type. I have added a custom field to my taxonomy through Advance Custom Fields. I need to call the meta data that is selected on my taxonomy.php page. I can call the id of the custom taxonomy with this code... $term = get_cat_ID( single_...

0
Q: MySQL value don't show in picture name

freddyI have a code to upload a picture. When the picture is uploaded, the user can crop it. Then, the picture is called with the $new_name. The only problem I have, is that in the $new_name, $_GET['MomentEvent'] never appear in the picture name. But when I echo it, it appear normally. So, how could I ...

0
Q: Yii, Php, mPDF, generating a pdf with widgets of different orientations

Yii NewbieI am implementing an application in Yii php, and I am trying to make PDFs using the mPDF extension. I'm generating a sort of Summary Report where i make a pdf for it. Inside the generated pdf are 3 widgets, basically tables to create that report. Here's how it look like: $mPDF1 = Yii::app()->...

0
Q: Error establishing a database connection to Cloud SQL

Jacobplease forgive a novice question: I have Wordpress up and running on my development server with no problems. When I try to upload it using appengine, I get the following error output from WP_DEBUG, where MYSITEID is the name of my site: Warning: mysqli_connect(): (HY000/2002): Unable to find th...

0
Q: jQuery dynamic content links load url from sql database via php but when refresh it doesn't load

kenwinI need some help please. I've coded up my portfolio with the following code below, I'm using the BBQ plugin, there's a page call portfolio.php which leads to a page call graphicdesign.php which populates items from an sql database, when clicking any items it leads to a page call graphicdesignpage...

 
1:40 AM
0
Q: Creating a WordPress 301 Redirect Function To redirect each page on old domain to the same page on a new domain

Nik CreeIf I don't have permissions from the host to create or write to an .htaccess file what would be the way to 301 redirect each page on an old WordPress website Domain to a corresponding Page on a new WordPress website domain. I don't want to simply redirect the old domain to the new domain, but wan...

0
Q: How can I abstract away access to different types of objects through a single common interface (class)?

csjohnI am currently attempting to refactor some legacy code. As it stands, I have a EX_User class, which represents a generic user in the system I am working within. There are several other classes that extend the EX_User class; for example the EX_Limited_User class. The EX_User class extends an acti...

0
Q: jQuery - Ajax submit JSON data in GET

adamjHere is what I've tried: JS: $.ajax({ type: 'GET', contentType: 'appllication/json; charset=UTF-8', data: JSON.stringify( { data: 'bla' } ), dataType: 'json', success: function( data ) { alert(data); }, error: function( data ) { alert('error: ' + data...

0
Q: ajax file download : progress event, for download

trogneI understand the xhr.upload.onprogress event (file upload). Like this : xhr.upload.onprogress = function(e) { // if (e.lengthComputable) ... var percentUploaded = Math.floor(100 * e.loaded / e.total); progressBarElem.value = percentUploaded; messageAreaElem.innerHT...

0
Q: How to simulate HTTP requests?

ttworkhardHow to simulate HTTP requests. For example, I want to simulate request to insert data into my database, to check safety and reliability of my program. Are there some good tools ?

0
Q: Table not rendered fully after 470 rows in Yii

elendilI have about 240 rows in a database. I'm trying to generate a matrix from the data with color-coded cells. However, the matrix is never fully-generated all the time. When removing a few rows, it completely renders the matrix. What seems to be the problem with this?

 
2:05 AM
-1
Q: Why this php/mssql query doesnt work correctly?

nRovIt doesnt matter if Authority is 0,1 or 2 .. it shows the error for all instead only for 0 ? Any clues why ? $db = $this->database[GDB]; if (!isset($_GET['id'])) { $this->Error('CHAR_NOT_FOUND'); return; } $data = $db->doRead(); ...

0
Q: AWS S3 PHP 2.0 - How to upload an image from computer to a bucket?

AtadayonI've been trying to figure out how to push an image to an S3 bucket using the new PHP 2.0 SDK. All I've found are tutorials for how to upload an image from your web server rather than from a local computer. Here is the code that I'm using $result = $s3->putObject(array( 'Bucket' => $bucketna...

0
Q: Getting data out of an array

Jess McKenzieWhat would be my best option to get the data out of this array? array(4) { [0]=> array(10) { ["id"]=> string(3) "158" ["name"]=> string(8) "Tractors" ["parent_id"]=> string(1) "0" ["image_id"]=> string(2) "37" ["blurb"]=> string(17) "Agrilife Tra...

0
Q: PHP Pagination [1] [2] ... [N]

Asean JazzI have an pagination using PHP. In table, I have more 200 data. Now my question, how can I give the pagination like this : [1] [2] [3] ... [200] Because now, all the pagination page number show. [1] [2] [3] continue until the last page and here is the PHP code : $strSQL = "SELECT M.MODEL_N...

0
Q: What is set() used for in cake php?

TaoistWhat is set() used for in cake php? The documentation only explains Set not set() I am explicitly referring to the blog tutorial at the CakePHP home site and the following code below. class PostsController extends AppController { public $helpers = array('Html', 'Form'); public function...

-1
Q: Unexpected T_ECHO, expecting ',' or ';'

LukePatrickSo, I've got this bit of code, for which I'm getting the following error. Parse error, unexpected T_STRING, expecting ',' or ';' I'm sure this is a very, very simple fix, but I'm still a bit new to the world of PHP. Any thoughts? echo ' <li> <a href="'....

0
Q: regarding ftp_rawlist: what is file or directory number?

Arpan DasI've a question regarding ftp_rawlist... ftp_rawlist returns an array as below <code>array(3) { [0]=> string(65) "drwxr-x--- 3 vincent vincent 4096 Jul 12 12:16 public_ftp" [1]=> string(66) "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 public_html" [2]=> string(73) "lrwxrwxrwx 1 vincent vince...

0
Q: How to capture uploaded file data in PHP extension

sirgeorgeI'm writing a PHP extension now in c/c++. User uploads a file (could be POST or PUT method, but I can limit it to POST only). I need to capture the file data while being uploaded, without writing it to disk on the server. I need to process the data and (maybe, depending on a situation) send it so...

0
Q: Unable to access localhost using android mobile

Rochelle CanaleHello I have a problem in accessing the localhost in my android device. I can't open my localhost in my browser. I installed an application that supports httpd, php and mysql. But when I have a connection in the Internet there's no error in displaying the localhost. But if I disable it, I can't o...

0
Q: How can I send an base64 image on a mail body with PHP?

CarinaPilarI'm trying to send an email with an image in base64 on the body with PHP using the code below, but the image never appears... If I change to an URL it works, but it doesn't with the base64... I tested the base64 on a new page only with <img src=base64> and worked too... What am I missing?? <?php...

0
Q: How do I reference a row immediately after it has been added to a table?

MaxcotThis is PHP / CodeIgniter / MySQL The only way I can think of is to do the insert ($this->db->insert(...)), and then immediatly after, run another query to find the record again. I'm hoping there is something (which seems a bit more efficient to me) that returns the primary key (or something) ...

0
Q: jQuery .get() not returning data, but commands are firing

GeorgeThe .get() requests were doing just fine until I added mysql into the mix, and I debugged the SQL and made sure it was connecting perfectly and everything but its still not working. If someone can tell me where I'm going wrong that would be great. JavaScript - if (command !== '') { term.ech...

0
Q: How to delete a file from upload folder

user2821383I am trying to delete a photo from upload folder when i press delete all records are deleted except the picture in upload folder here is my delete.php, how to i code the snippet to delete from upload folder //triger to delete

0
Q: The "CompanyForm" form only accepts a "Company" object

Marty MiroHi im wondering whats wrong with this code <?php class editAction extends sfAction{ public function confirm($request){ $this->companyId = $request->getParameter('id'); $this->data = $this->getUser()->getAttribute('company', $this->companyId); //if(!$this->data){ // return red...

0
Q: Failed to connect to MySQL: (1045) Access denied for user 'xpressmu_lic'@'localhost' (using password: YES)Error

CmdWhat ?? SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT /; /!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS /; /!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION /; /!40101 SET NAM...

 
2:53 AM
0
Q: Wordpress: Getting post page title from custom meta boxes is overwriting home page title?

elisa_nicI wrote the following function in Wordpress: function custom_meta_title($default) { global $post; $meta = get_post_meta( $post->ID, 'meta_title', true ); if ($meta == '') { echo $default; } else { echo $meta; } } And here is how I call it in the header.php file: <title><?p...

0
Q: Record the size & position after drag & resize

Shivan RaptorI used jQuery UI Draggable & Resizable to drag & resize a logo within a boundary. How can I load the position & size of the resized & dragged logo from the parameter obtained by .stop() event callback in Resizable & Draggable API ? First Question: I got ui.position.left, ui.position.top, ui.siz...

0
Q: How to fix these few errors in .htaccess: 302 (tempoary) and HTTP/1.1 500

fizzixSo basically, I am checking my page with this site: http://www.ragepank.com/redirect-check/ My domain is http://www.candoboatloans.com.au I am attempting to remove all errors that RagePank displays. I managed to fix a few, but there are still a few small problems. Here are the three small err...

0
Q: getting a warning when extending a class method in PHP

aditI have the following class: <?php namespace Oh\InstagramBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; class InstagramController extends Controller { public function...

0
Q: function in codeIgniter help conflicting with another function

vidhuIn codeIgniter I auto load the url_helper.php In my site I also have a phpbb forum and so within codeigniter im trying to include a script from the forum. The problem is, phpbb tries to declare a function redirect() but its already declared in the url_helper.php so i get the following error ...

0
Q: getJSON parse error on validating JSON

iizI am trying to use some JSON with JS that is output by a PHP script I control. The output validates fine at http://jsonlint.com/ but when I try to use it with $.getJSON it returns a parse error: This is the non-descriptive error: Uncaught SyntaxError: Unexpected token : This is the source of th...

0
Q: Catch error when querying with PDO

Paul DinhamI have a portion of code importing .sql files to execute this way: <?php $Server = "localhost"; $Db = "test"; $User = "root"; $Pass = ""; function exec_file($File_Path) { global $Server,$Db,$User,$Pass; $Con = new PDO("mysql:host=$Server;dbname=$Db",$User,$Pass); $Con->setAttri...

0
Q: Update query with PDO throws error

cali17I'm trying to get the hang of PDO but I'm getting the following error: Call to a member function execute() on a non-object Here's my code to update the members table $firstname = ($_POST['firstname']); $lastname = ($_POST['lastname']); $update = query("UPDATE members SET firstname = '$fi...

0
Q: Modify dataURL for use with FLOT chart

DanielAttardI am trying to create a FLOT chart using my own data, rather than the sample data included with the documentation. There is an example file which shows how to load data dynamically with AJAX. The example file is working fine, although it has static data. I want to replace the static JSON data,...

0
Q: How to rebind jQuery script after it has been called used once?

Tiffany LoweI have three things going on: I am sending information with this form. <form method="post" id="myForm" action="includes/functions.php"> <input type="hidden" name="group_id" value="$group_id" /> <input type="hidden" name="submit_join"/> <button class="request" id="sub" name="submit_j...

0
Q: php how to to do operation on date

sreypovI have problem when i want calculate date. Simple Example: I have 2013-09-01 is start date and I have 30day per month. My work i need alert tell to my user in 10 day before end month(it's mean on 2013-09-20i must alert message it's 10day more for end of this month). So every one have any idea fo...

0
Q: regex for time validation Compilation failed: unmatched parentheses at offset 18

Emann Tumala Saligue preg_match("/([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?/", $time want to preg_match 24 hours Matching time formats : 01:00, 02:00, 13:00, 1:00, 2:00, 13:01, 23:59, 15:00, 00:00, 0:00, 14:34:43, 01:00:00 Not matching time formats : 24:00 # hour is out of range [0-23] 12:...

0
Q: What is PHP syntax to send output from DateTime and Diff into a variable?

CorepuncherHow can I send the output from this code into a new variable? $var1 = new DateTime('09:43'); $var2 = new DateTime('10:55'); $interval = $var1->diff($var2); echo $interval->format('%H%i'); This results in "0112" I want to do something like this but obviously the syntax is incorrect: $var1 ...

0
Q: Wordpress add_filter doesn't do the job

WendiTI want to add onclick="_gaq.push(..... to the nav menu by adding a filter to the theme's functions.php. Thought it would be a peace of cake, but there is no output, so something must go wrong. This is the Wordpress core start_el function function start_el( &$output, $item, $depth = 0, $args = a...

0
Q: Adding an input field to Uploadifive/Uploadify

user2751902I've been searching and searching for the answer to how to add an input field and have the extra variable passed to the uploadifive.php file. However, I can't get any of the posted solutions to work and most of the time those solutions I did find were never listed as working or solved. Can someo...

0
Q: Javascript onclick function not working on HTML heading

nepalipunkI want onclick to trigger when clicked on HTML heading as shown in code below. <h2 class="title" onclick="viewPost('<?php echo $pageLink; ?>', '<?php echo $tabLink; ?>');"> <?php echo $menuItem["ContentMenu"]['title']; ?> </h2> My javascript function is as follows <script> function viewPost(p...

1
Q: What happens after Facebook login URL dialog

Bryan LearnAs title goes, I have generated a url to prompt for Facebook Login Dialog. What happens next? User is able to enter the username and password, however the page got directed to an invalid page (localhost). How am I suppose to get the access token for/from the client? I do not know the flow an...

 
3:52 AM
0
Q: Update statement is not working on my php code

zereninIm creating an online mobile reloading site for a school project. But it seems my update statement is not working... but i think it was written correctly so I cannot figure out whats wrong in my code. What my code do.. is when the user try to reload his account. The balance column in the balanc...

-1
Q: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING

Bongskyim getting this error Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING what's wrong with my syntax? <select name="term" id="contacts" onchange="ChooseContact(this);" required> <?php while ($termrow = sqlsrv_fet...

0
Q: Automated test for class that converts number to text string

Cody RomanoI created a PHP class that converts integers and floats to text strings. For example: 40300 -> forty-thousand three hundred 503.23 -> five hundred twenty-three and 23/100 I need to create an automated test for this class. (I'm doing this to demonstrate my knowledge of test-driven development...

0
Q: How do I send data to a website without writing anything in the URL?

chipperyman573I'm trying to make a login script in PHP, however a user will signup/login via a C# program. For obvious reasons I don't want to use GET, but I don't want to make forms and use POST either. How should I (securely) send data over? This is only a proof of concept so there isn't any SSL on my we...

0
Q: JSON AJAX REQUEST FROM PHONEGAP

Adam Joseph LoozeI am building a phonegap app for droid and iphone I created a json ajax request in the phonegap html file to call upon a php script from my website that pulls information from my database. I had a limit set to limit how much information is brought back and anything over 5 it wont go through. It...

0
Q: CakePHP testing: Cannot modify header information - headers already sent by

user2484173Note: this is not a duplicate question. I've seen some similar questions but I'm asking about unit testing. I'm trying to write test cases using CakePHP 2.3.6 and having problems with the test cases that use header() function. The test runs with no problem from a browser, but from command line, ...

 
4:16 AM
0
Q: Use Cakephp Validation with custom form / without formhelper

harris priambudiCan I use Cakephp validation without formhelper? for example, I was created model, controller, and view like this model: class KnowledgeBase extends AppModel { public $useTable = 'corp_kb'; public $validate = array( 'kb_title' => array( 'rule' => array('minLength', '2'...

0
Q: Execution time of ReflectionMethod

Beaver21I'm building an web application in php, I've create my own MVC framework(for multiple reason, like more flexibility). I have a caller method that call the right Method in the right controller automatically with posted data. But I was wondering about the execution time of ReflectionMethod to get ...

0
Q: Unique URL for Images on the same page

Tim ClemensI am trying to integrate the Facebook like button on my website for individual images. The easiest way I thought to do this would be to give each image a unique URL on a page for example: http://photography.theamateurproject.com/aurora_borealis.php?id=1074 Here is my current link code: a class=...

0
Q: How to MD5 a password that outputs a 40 character string?

James Smithhow to have my MD5 function to generate 40 characters string output? <?php $password = 'abcdef123456'; $md5password = md5($password); echo $md5password; ?>

-3
Q: How to get date difference in php?

omegaIn php, if you have a string in the date/time format example "2013-09-08 00:25:31", how can you compare that with the current time, and get the difference in number of days? Thanks.

0
Q: Is there a limit like max_input_vars in versions before 5.3.9?

rubo77It seems like there is a problem with older PHP versions and more than 1000 input fields in one form (see this question). If I run a webserver with an older PHP version, is there a limit to the maximum number of form elements in (one nesting level) like it is controlled by the php.ini variable m...

0
Q: Tank auth Register always expired

Annurysmcan everybody help me.. I want use captcha in my registration form. I use Codeigniter 2.0 with tank auth, but the captcha always expired when I resgister. This config for captcha tank auth: $config['captcha_path'] = 'captcha/'; $config['captcha_fonts_path'] = 'captcha/fonts/1.ttf'; $config['ca...

0
Q: Where is my PHP OOP wrong?

John SmithHey I'm new to OO in PHP but I know basic Java and understand OO in Java but I'm trying to understand how to make it properly intertwine with HTML via OO. Why wouldn't the code below spit back the message? Thanks. <?php class SubmitPost { public function __construct() { $Db = new...

0
Q: My facebook comment plugin is working fine on Local host but not on our company dedicated server . Why?

R_sharmaI have used facebook comment plugin in my website. On localhost I have tested it it works fine. We can comment using our facebook id. But Tommorow i just copied the same code that i have been using on localhost to .aspx page and published it to our company dedicated server. Now the facebook comme...

0
Q: How does the behaviour of max_input_vars differ in different PHP versions?

rubo77Since PHP 5.3.9 there is the runtime configuration variable max_input_vars in php.ini that limits the amount how many input variables may be accepted by one form. But what exactly happens if the limit is exceeded? Are the supernumerary variables ignored? Or are all variables discarded if the...

0
Q: async soap request over https

FaddishWormI am a php developer working with an SDK which uses soap to send data to a server. It all works great, except for the fact that the SDK blocks while it waits for the response to come back. This is causing 8-10 second page load times, which is unacceptable so what I am trying to do is hack up th...

0
Q: DirectoryIndex only takes effect on refresh

Daryl ChanI have a .htaccess file located in a subdirectory with DirectoryIndex pointing to a php file. However, the browser loads the main page's index file instead of the one DirectoryIndex points to unless I refresh. For example: When I go to x.com/subdirectory, it points to x.com/index.php and not ...

0
Q: getting product details from amazon web services api in zend

user2822042Im new to this amazon api.I want to include aws to my website using zend framework. im stuck on the following code.please help me out to proceed to obtain amazon product details.Thanks in advance. $amazon = new Zend_Service_Amazon('AKIAIJ4F77PREMJDCCLQ', 'US', 'icuTT8RH/zr6ASQvkg2pbSQ2On3EgoEEO3...

0
Q: Make visble left and right contents in opencart

IcecreamsandwichI have opencart site like the picture given below , what i need is the category ,best seller modules should appear in the left content , instead when i included category module with home layout , its coming inside to slider ! , how can i fix this , thanks . the picture is shown below :-

1
Q: Call custom function inside shortcode

ThomI have a function to display a list of files from a given directory as links. I then have a shortcode to display the function, but I can't figure out how to make the shortcode work without using inline php to call the function. The shortcode only works right now because I have another third-party...

0
Q: URL parsing and sessions in Reservation system

BurhanI am creating a flight/hotel reservation system like farecompare.com Farecompare parse values to other sites and create sessions other sites too. Anyone tell me how they create sesssions in it. I can parse url but i am not able to create sessions. public function flight($depart, $return, $from, ...

0
Q: I am conducting online test. To do this I am using Multiple popup window. can you guys help me to do all thing in single Popup window

user2787527I am conducting online test To do this I am using Multiple popup window. can you guys help me to do all thing in single Popup window. Structure is like this. User logs in with is credentials.(userdetails.php) If successful creates table of particular user using username. Question 1 : dispalys...

0
Q: wordress Plugin Install Asks for FTP Details

nikunj kansaraWordPress is asking me for my SFTP credentials in order to install any plugins. I am using Linux ubuntu 12.**. But Same thing I tried on Window "Wamp" server. I can install plugins. Can Any one know why this happen?

0
Q: Why am I getting "Call to undefined function findOne()" here?

neoistheoneI've got a little PHP script that has the following code in it: $m = new MongoClient(Settings::$db); $db = $m->db; // get the 'customers' collection $customers = $db->customers; // determine if this customer already exists $c = $customers.findOne(array('email' => $email)); <--- throws if (is_n...

-1
Q: Php Regular expression to find question mark in an array

Nabeel SheikhI want to check whether the array value contains '?' or not. If yes, then the character succeeding question mark has to be extracted. Thank you.

0
Q: Converting image url to complete html image tag

deeroxI am working on comments thing and i want my user to be able to post image url which i will change into image url with tag my function function ImageTag($text) { // The Regular Expression filter $reg_exUrl = "/(http|https)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/"; // The Text...

0
Q: how fetch only part of html page

rezataslimi_eduhi all my sample code is below : <?php $html = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-...

0
Q: How to fetch final value of Jquery UI Slider into PHP Variable ?

user2822086I want to display 2 JQ UI Sliders on 1 page. My Site is in PHP. I want to take final values from both sliders (last value when user will stop sliding them) into php variables and multiply them. How can I do this ? I have exposure to Jquery and PHP. So it will be great if you could explain in d...

0
Q: php session start and call

user2818691Firstly, to solove this problem here is my website structure: index.html |_controll.php |_success.html |_chat.php On index.html i got a login form. In controll.php i'm starting a $_SESION like this: <?php session_register("myusername"); session_register("mypassword"); header("Location:...

0
Q: Cannot retrieve all row in table php, only half is retrieved

user2810332I have a table named 'laptop' and a column inside the table named 'Lap_War_Expiry'. The code run well as what I have edit in previous posting, How to retrieve more than one data in email? . However, the code only run for 45 data only. It supposed to be 100 data and sent the email to user. (I know...

0
Q: How to get gzip content as ajax response

Harishmy ajax response is very large its actually 900kb. so I need to gzip to improve the performance. can anyone please help me to get gziped content from my php. Thanks in advance.

0
Q: Cannot create phar

SarmenHBI am trying to learn how to create phars and i am getting this error and have no clue how to fix it. Any ideas? Fatal error: Uncaught exception 'UnexpectedValueException' with message 'Cannot create phar '/myapp/build/myapp.phar', file extension (or combination) not recognised or the directory ...

0
Q: Database records not placing exactly continiously

dummy dummyI have this code, My primary in my database is counter. <input class="textbox1" tabIndex="8" maxLength="49" size="30" name="n_counter" value=' <?php $result = mysql_query("SELECT * FROM procurement WHERE counter !=' '"); while($row = mysql_fetch_array($result)) { $value = $row['counter']; ...

0
Q: Allow users to upload backgrounds

OfficialAkashH guys, How can I enable users to upload backgrounds? I have a social networking site using "phpdolphin" and It's pretty easy to work around, and making certain modifications shouldn't be hard but I can't seem to get "background" uploads enabled. The database has a field for backgrounds but it'...

1
Q: PHPMYADMIN not loading in Ubuntu12.04

user2822079I have installed phyMyAdmin on my Ubuntu 12.04 using sudo apt-get.. I configured the Apache2 Server as it was given in the Documentation The problem I am facing is that when i take "http://localhost/phyMyAdmin" nothing is displayed in the browser,instead it downloads a php file. Why is this occur...

 
5:44 AM
0
Q: automatically open gmail from my website using a form and php

telexperis it possible to open gmail directly from my website using php? let say my username and password for my gmail is on my sql database then i have a form ready <form id="gaia_loginform" action="https://www.google.com/a/telexperience.com/LoginAction2?service=mail" method="post" onsubmit="return(...

0
Q: PHP Pagination query not working

user2773365In my controller I have the following code: if($action=='shipping_list'){ $numrows=inquire_row(); //Get number of rows in query $pages= new Paginator('10', 'p'); //create object $pages->set_total($numrows); $shipping=shipping_list(); //Goes to model include('shipping_list.ph...

0
Q: Magento manager Customer DB Table Structure

SelviI want to Create New Customer from Adempiere to Magento . Can Anyone give me the Customer DB Table and column Structure Customer and Customer Address details Tables Are: Customer_Entity Customer Entity Varchar Customer Address Entity Customer Address Entity Varchar

0
Q: Unable to increment the value of session dynamically

JeevanYii::app()->session['currentpages'] = Yii::app()->session['currentpages']+1; //print_r(Yii::app()->session['currentpages']);die; if ($output['moreResultsAvailable'] == "true") { //print_r(Yii::app()->session['cachekey']);die; $cache[Yii::app()->session['currentpages']] = $output['cacheKey...

0
Q: Pass hidden value from database when Using autocomplete feature

user2822187I am suing autocomplete to display values from database. The file is as follows: autocomplete.php <?php require_once "../includes/conf.php"; $q=$_GET['q']; $my_data=mysql_real_escape_string($q); //$mysqli=mysql_connect('localhost','root','','autofield') or die("Database Error"); $sql="SEL...

0
Q: Find the size of a an image sent from Java to PHP as a byte array.

user2822178I am very new to PHP, Java is my domain. I have a specific problem that when I upload a picture from my client side to be stored in the database, before saving it I want to calculate the file size and it should be less than 3mb. I am sending this file from Java as a byte array. I Googled around a...

0
Q: How to fix php array format json error

Ponraj PaulThis is my mysql script $result = mysql_query("SELECT users.*,games.game_names,games.id AS games_id FROM users LEFT JOIN games ON FIND_IN_SET(games.id,users.games)") or die(mysql_error()); while($user = mysql_fetch_array($result, MYSQL_ASSOC)) { $array = $user['games']; $name ...

0
Q: Android: Upload File plus sending a String with JSON/PHP

Katherine99I'm not an expert on PHP so I'have taken many things from the Internet and from questions of this page. I need to send a file to a WAMP server (sing s PHP Script) plus sending a String in order to create the target path, which will depend on the date plus the sent string. At the moment the targe...

0
Q: Phalcon PHP + Twig Template engine

AlexeyI've started using Phalcon php framework which comes with Volt template engine. But I like using Twig for processing templates, so I've tryed to combine them. There is a part of phalcon documentation about that. http://docs.phalconphp.com/en/latest/reference/views.html#changing-the-template-engi...

0
Q: How to use an interface in business logic

Parker SmithHow do I use an interface in my business logic? For example, if I have an interface for a gateway like this like this: <?php interface Gateway() { function writeToDatabase(); function readFromDatabase(); } ?> And an implementation of it for a specific database: <?p...

0
Q: Order data within group by that has 2 different columns in MySQL

Joem MarananI am working with a discussion board where there will be a certain topic and the user can comment or upvote another comment. Each comment can also be replied by another user and will recieve notifications. ***This is my notification table: notification_id is the user_id of the logged in user ...

0
Q: Replicate C# code hash to PHP

user1763096I have to replicate C# hash from the code below into PHP. I have been searching but didn't find a solution so far. private string createHash(string stringToHash) { // Byte[] originalBytes; MD5 hash = MD5.Create(); hash = new MD5CryptoServiceProvider(); // o...

0
Q: Android - Sessions in two webview

user1386213i have in my app two activities, and in each activity i have a web view. if i created a session in my php code in the first webview, can i read this session in the 2nd webview?? and what is the cookiemanager used for? is it for reading the sessions created over the server (by php) or there is a...

0
Q: Yii Framework: authenticate user at many levels

TomI'm newbie in Yii Framework. I see Yii has Yii::app()->user->isGuest It just check you are login or not. I want to check user is guest or admin or member ... to show others info and permission. Please help me. Any help will be appreciate.Thank you.

0
Q: display a calulated value on all post in a category in wordpress

Marshall Ericsoni am working on wordpress based coupon site. I have to create a amount calculator which would work on all the individual category pages . I would be having a amount slider which would be having $ values. Once a value is selected and on clicking the submit button, i want the percentage deals (und...

1
Q: Validate email address exist or not?

user2703611Yahoo email validation: how to validate yahoo email exist or not exist in php? I have tested gmail,hotmail, it return ok but when I give yahoo email it return nothing or Failed.

0
Q: PHP get array values from 3 dimension array

Suneth KalharaHello i have array with 3 dimension. the main array hold 3 message sets and each message sets hold 10 messages. i need to show the message data on page i used this code for generate array. $messages=array(); for ($i = 1; $i <= 3; $i++) { $messages[]=$sqs->receiveMessage('https://sqs.us-west-2.a...

0
Q: error while displaying multiline data in ckeditor

Deep Gandhii am displaying content in ckeditor textarea from the database. my content is stored in content variable and it is multiline. code: editor.setData(' < ?php echo nl2br($content); ?>'); it gives error unterminated string literal!

0
Q: processing loop one by one on php

Mico P.I want to do something like this site http://www.robingupta.co/bulk-domain-authority-checker.html. How can I do that when you put multiple urls, it will proccess every single url one by one.

0
Q: How to remove the __utmb,__utmc the google Analytic cookies using php

Sino ThomasI am trying to remove the cookies from Joomla 2.5 project and it contain google Analytic code. When i trying to remove the cookies using the below code . it is not delete the __utmz and __utmc cookies $cookies = explode(';', @$_SERVER['HTTP_COOKIE']); foreach($cookies as $cookie) { ...

-1
Q: Encoding function without toString (eg. sha1, base64, ...)

Ellesmess Glain is there some way to use PHP objects without converting them to string in hashing functions? If I've class Foo, that has no __toString, then base64_encode will return NULL/false. But if I implement toStr, then it work. Is possible use variables in their "byte" representation (class Foo wouldn't...

-2
Q: Validate email address?

Shahzad ThathalOnly Yahoo email validation: Can anyone tell me how to know yahoo email exist or not exist in php? I have tested through gmail,hotmail, it return ok but when I validate yahoo email it return nothing or Failed.

0
Q: how to post xml with curl with php GET variables?

user2822230the script will post xml content to a url, and i need to include the php GET variables (eg. $rid), pls advise how to. ***$rid = $_GET["rid"];*** // xml data $xml_data ='<AvailabilitySearch> <RegionId xmlns="http://www.reservwire.com/namespace/WebServices/Xml">***$rid***</RegionId> <Ho...

0
Q: how to create select box in registration form in joomla

karthickhow to create select box in registration form in joomla. I have try to add birthyear in my registration form using dynamic. option value from 1950 to current year.how to add the year using loops or dynamic code. Here is my code. <field name="joinyear" type="list" description="COM_USER...

0
Q: Parsing XML to JSON in PHP provides incorrect result

Sebastian RushI try to parse through this XML data url: Link This is my PHP snippet: $xml = simplexml_load_file("http://veloconnect.eosweb.de/veloconnect.php?BuyersID=417641&Password=26AK25&RequestName=SearchResultRequest&TransactionID=dmVsb2Nvbm5lY3Rfc2VhcmNoLkhJUl9TUkNfMTIwMg==&StartIndex=0&Count=60000&Res...

0
Q: Get the email of other user (who has installed the app) from Facebook

AddevI'm developing a game and I want to allow the users to start games with their friends. The users in my app are identified by user_id, email and password. Using Facebook for invite users I retrieve the list of friends who have installed the app (property "installed"=true) and I'd like to retrie...

0
Q: return mysql column comma separated to object

user2070749I have some trouble here.. I hope somebody could help me. so let me explain first Lets say i have this table idBarang | idAttribute | Value ---------------------------------- 1 | 2 | A 2 | 2 | B 3 | 2 | B 4 | 2 | C,D And t...

0
Q: photo booth frame changing and stickers in php

naruSomebody help me to make process for what I'm doing..I'm using this open source photo booth http://vamapaull.com/photo-booth-flash-webcam-image-capture/comment-page-4/ ..my problem now is how can I add some features like adding frames and stickers as well as save it to database at same time the u...

0
Q: Include A View Of Another Controller Within Views/site/index

MaxxI can't figure out how to solve this problem i'm facing. Alright, so basically i have a default view/site/index.php view file which is generating the home page. Now i have built two separated Models and their associated Controllers and views. I want to include those view of the controllers in the...

-3
Q: Can't Destroy a $_SESSION

user2818691When logging in to my webpage i'm creating an $_SESSION and then i want a logout. How to destroy that 2 $_SESSION's so the users is logged out.? Thanks for your help

0
Q: How to solve 'Can't write to file tahoma.z' - fpdf add font error

Satheesh ThangavelI'm using fpdf class file to generate pdf in my php program. I want to use true type font named tahoma. Generated .z,.afm,.ttf,.php files from a website. I've included makefont.php in my program and used a function makefont(). But it shows me an error "Can't write to file tahoma.z". I've done e...

0
Q: Interval between two dates is not integer in PHP

user1466527I'm using this to echo interval number of days between two dates, but the second line echoes a float number. echo (mktime(0,0,0,10,27,2013)-mktime(0,0,0,8,18,2013))/(3600*24).'<br>'; echo (mktime(0,0,0,10,28,2013)-mktime(0,0,0,8,18,2013))/(3600*24).'<br>'; Result: 70 71.041666666667 Can any...

0
Q: how to calculate reward points using codeigniter mysql?

nathiyabalaramanI will be building an ecommerce application and i need to add reward points in my website. but i dont know how to calculate reward points.I have referred many sites regarding this but none of which could give solution to my issue.

0
Q: PHP multiple $_FILES for forms

Vaibhav BhanushaliI am a newbie in php and using WordPress as my CMS. I am trying to enable an audio upload with desired featured image in WordPress front end form The PHP code of form is if ($_FILES['audio']) { foreach ($_FILES as $file => $array) { $newupload = insert_attachment($file,$pid); $theconen...

0
Q: click on button hide one li usiing Jquery

sealong MalyI have the code as below: <ul class="classul"> <?php $uid = $_REQUEST['uid']; include("lib/db_function.php"); $query = "SELECT * FROM tblproject"; $exc = mysql_query($query) or die (mysql_error()); while($val = mysql_fetch_array($exc)){ ?> <li id="li<...

0
Q: create Form without using Gii

panditi searched on Google but i didn't find my answer. i have created one small webapp in yii. now i am making same app manually to explore more future of its(Yii). i want to know that how to create form,model & controller without using Gii tools. i know this thing using Gii. Please suggest me an...

0
Q: PHP CLI echo/print missing text before array var....driving me mad

James NapierRunning a script from the PHP CLI, I am echoing the following line: echo "\r\nServer {$res['proxy']} | $response | $httpCode | OK"; However this is what is returned: | 4.003182888031 | 200 | OK Its missing out the text before the $res['proxy'] var. Ironically though it is still doing the \...

0
Q: Doesn't write properly on new line in file

GoroSo I have simple registration form that write user and password in file.txt. When 1 line in the file has already user and password every next registration is on same line and in the same time put empty next line. If the file is empty is writing properly, every registration is on new line. Here ...

0
Q: Convert php data() to mysql datatime type

user2764080My code is like $now = time(); $mysqdate = date('Y-m-d H:i:s', $now); but when i insert it into sql, i can just get 0000-00-00 00:00:00. insert into mytable(current_time) values ('".$mysqldate."'); Thanks in advance.

0
Q: Php Script loaded by js loses POST

user1957700I´ve a ASPX-Page unter www.site.com/Page.aspx. There is a PHP-Script embede sub.site.com/Script.php. These Script is embeded with javascript with $('#LoadPhpScript').load("http://www.site.com/Proxy.aspx?http://sub.site.com/Script.php"); This works fine but with one issue. In the PHP-Script th...

0
Q: multilingual web: php + mysql + cookies

A1exandrI have coded a multilingual web with php & mysql. Now I've faced problems (mainly with robots, seo and search engines) because language chooser is based on cookies. how it works now: user => index.php : function cookies() { if (!isset($_COOKIE["lang"])){ setcookie('lang','ukr', time()+(60*6...

-1
Q: Difference between JSF and PHP code ignitor

anasI have a hard time understanding which is better to work on. Can anyone tell me is PHP better or JSF. Thank you in advance

0
Q: Cut HTML Tags and wrap HTML tags again

Foo Lingi try to convert the follow string <p> string <b> bold <em>italic string</em> also(bold) </b> </p> to this string <p> string </p> <!--------------------------------------- insert --> <b> bold </b> <!------------------------------------ ...

0
Q: Find key based on value PHP

user2645436[items] => Array ( [0] => Array ( [product_option_id] => 328 [option_id] => 26 [name] => Product Type ...

0
Q: PHP passing data across pages

NZHammerI am trying to figure out the best way to pass data across two pages (Page A to Page B) using PHP for a (somewhat) specific scenario: Page A: A gallery of images with titles. To create this page, a database call is made in a PHP file to an images table that holds and image id, and image locatio...

0
Q: Matching string with preg_match_all

MedallionPlease how do I match this exact string with regular expression (preg_match_all()) <a title="Click for more" href="/directories/interpreters/2054/lewis-moutou"><strong>Lewis MOUTOU</strong> </a> Please note that the link might occur more than once in the page but ofcourse with differen...

0
Q: Pause bgmusic joomla extension

GaurangI am using two extension in Joomla, Slideshow ck bgmusic bgmusic plays background music on load of page. I want to pause music of bgmusic when user click on video of Slider(Slideshow ck). How can I do so ?

0
Q: Should Class Properties be Stored as Variables or in an Array

OthmanI've been using php for a while now, and I always wondered which is the best way to store properties in a class. The first method is to store the data as properties. class Foo{ private $id; private $name; function __get($var){ return $this->$var; } } The other method...

0
Q: Hidden values in php echo

user2822187I have this query in php code: $sql="SELECT vName,id FROM employee WHERE vName LIKE '%$my_data%' ORDER BY vName"; I have echoed the vName. echo $row['vName']."\n"; The above values appear in a autocomplete textbox. In the same aboce echo statement I want to pass 'id' as hiden value. is it...

0
Q: Magento - Extension Development, deal with uninstall

TomI am really new on magento extension development. I have learned from others and create a simple demo for magento 1.7.0 extension. It working well, in its install script, I added an attribute to "catalog_product", it's working too. Now I am wondering, when this extension removed from system, or ...

0
Q: loading zendframe work model in phpunit class

user2820094i want to call my zendframe work model and use there functions in AuthenticationControllerTest.php but i am getting error when i run it from terminal - -MyZendproject - -application -model -testmodel - +public - -tests - aplication - controller - .AuthenticationContro...

0
Q: Retrieving a database column that contains xml

ShimonI must admit it is late and I am tired. Perhaps too tired to see what is in front of me! I have a MS database table where 1 column contains xml data. I need to retrieve the data into a variable (or whatever) and then display it. I am connected to the database. I can retrieve data from any other ...

0
Q: Upload folder to server

Muneem HabibI want to upload whole folder to server. I have found after extensive research to use webkitdirectory directory in input tag. its workinf fine and now it is also selecting folder from the dialog. but it is only showing list of all files in the folder it is not uploading full folder to the server....

0
Q: Symfony2 forms + doctrine - selected choices

user2739610Ok guys, I've got table build based on entity with integer fields, id, user_id, project_id, stats, risks. Now I'm trying to build form with only fields stats, risk. So I select by userId and projectId: $dql = "SELECT m FROM DevDashProjectBundle:Module m WHERE m.user =" .$options['user']->...

0
Q: AJAX request doesn't seem to recieve the response

Bujanca MihaiI have the following code: AJAX: $.ajax({ url: "mail.php", type: "POST", data: {first_name:first_name,last_name:last_name,email: email,telephone:telephone,message:message}, cache: 'false', dataType: "json", ...

0
Q: System image editor PHP + jQuery

JavierGood morning. I'm using Cropzoom as a system, but will not let me ahcer other features. Can anyone tell me good image editing frameworks in PHP + jQuery? I need you to give him the URL of the image ORIGINAL let me zoom, crop, and if possible, edit the background color set output. Thanks and r...

-1
Q: Convert php date() to mysql datatime format

user2764080I used "$will = mktime($hour,$minute,$second,$month,$day,$year)" to build a time type, and i wanna translate $will to mysql datatime format, I tried to use $mysqltime = date('Y-m-d H:i:s', $will); but when i insert it into msql, i can only get 0000-00-00 00:00:00 in the table. Thanks in advance.

0
Q: PSD To PHP Parser

Janak PrajapatiI was recently asked to come up with a script that will allow the end user to upload a PSD (Photoshop) file, and parse it accordingly I have tried PHP PSD reader it would not work much for me as there any other class or library to parse PSD.

0
Q: Security.salt value in controller

pratik patelIn cakephp there is one file core.php It contains Configure::write('Security.salt', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); How can i get the value of Security.salt in controller in cakephp. Thanks

0
Q: PHP Short Code on String

user2822382I am currently using: $string = str_replace("[map]","<a target=\"_new\" href=\"https://maps.google.com/?q=", $string); $string = str_replace("[/map]","\">Click Here to View the Map</a>",$string); echo $string; This allows my users to enter " some text [map] full address [/map] some text so...

0
Q: Call to undefined function imap_open() in php

RamyaI am using this code to fetch the content from gmail inbox body, but this code is working fine in my localhost inside xamp server but when I am uploading this code to my server that is godaddy.com ,here getting this error: Call to undefined function imap_open() in php. $hostname = '{imap.g...

0
Q: php nat sort associative array by value without reindex

machineaddictI have the following array: $data['array'] = array( 1 => array( 'currency_name' => 'USD', 'totals' => '310.00 USD' ), 24 => array( 'currency_name' => 'EUR', 'totals' => '200.00 EUR' ), 26 => array( 'currency_name' => 'GBP', 'tot...

0
Q: How can i delete junk text from all the post using my sql command

pradipBecause of an autoblog plugin, my site has got junk text in every post! The text format is as below .. funny-pictures/funny-pictures-of-the-day-30-pics/attachment/funny-pictures-41-2/" rel="attachment wp-att-3846"> You can see the same junk at the below links! http://www.woophotos.com/someday...

0
Q: Smarty: cannot use the same template twice

Eugeny89I'm having the following Smary template (it's a file-tree, files are populated separately and then list_html is assigned to geberated file tree hrml) <script> $("#directory-list-root").on("click", "div.content", function() { $("div.selected", "#directory-list-root").removeClass("sele...

0
Q: Convert service from xml to yaml or import xml to yaml

charlesnashI have service in XML: <service id="sonata.news.admin.comment" class="%sonata.news.admin.comment.class%"> <tag name="sonata.admin" manager_type="orm" group="sonata_blog" label="comments" label_catalogue="%sonata.news.admin.comment.translation_domain%" label_translator_strategy="sonata.admin....

0
Q: Highchart Columnrnag

John Smithi m working on highcharts i need to show the graph having starting and ending date like low date is 2013-08-10 and high date is 2013-08-20 with different colors each line, i have done with the numbers but cant do with dates can any one help me?? series: [{ name: 'Initiatives', ...

0
Q: php email is not moving to my personal mail (google, yahoo)

elayarajai am facing a problem that i am sending a mail from my php form is showing that message sent but it is not reflecting in my personal mail. i ve been searching for the solution find simple email form, even i can't get the exact solution. if anybody knows the solution kindly share and help. <?php ...

0
Q: Procedure 'getList' not present SOAP

PandanotbreathingI'm trying to create SOAP service about two days. And i got this error, I cant find decision of this problem. Can you help me please? I got next files: soap.wsdl <?xml version="1.0" ?> <wsdl:definitions xmlns:tns="http://current_test/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" ...

1
Q: passing input value in getJSON jquery

user1933824i have an <input> box that requires user to enter their ID number. upon entering i want to print the associated name of that ID from mysql via JSON. my question is, how do i pass the ID value in javascript/jquery $('input#name-submit').on('click', function () { //get the ID input var id = ...

0
Q: Is this MySql query valid?

jr.greenDefenderSo I came across this when I visited a friend. He is trying to show in a table data from his created DB. This is the part where he asks for the Start and End dates: <form method="post"> <input type="date" name="Date1" value="<?php echo $_POST['StartD'] ?>" style="position:absolute; top:2em; lef...

0
Q: .htaccess to redirect parts of a URL to local files

OurxI have a custom web app and the file structure works like this: /apps/calendar/frontend/index.php /apps/calendar/frontend/view/index.php /apps/calendar/backend/index.php /apps/calendar/backend/edit/index.php /apps/calendar/backend/add/index.php /apps/calendar/backend/view/index.php I'm trying ...

1
Q: How does Stackoverflow warn users for new activity

Alireza FallahI know that php is a script language and it cant response to client AFTER page loaded.unless using ajax. when I stand in the http://stackoverflow.com/questions/tagged/php , whenever a new question is asked , the site warn me :: "1 new question with new activity ". I'm sure its not using ajax ...

0
Q: adding arrays of numbers into html form input and displaying the calculated result

Marshall EricsonI have an array having 2-3 titles. eg. 'Get 20% Off' , 'Receive 40% Savings' , 'Grab 10% discounts' etc. I would like to get the numeric value before '%' sign. and pass this numeric value into a html form as inputs. and in return the form would calculate a percentage amount. and display all the r...

-1
Q: how to upload images and echo the same image to another page...?

user2717260i am learning php and phpmyadmin I want to upload Images to database then echo the same image to another page any one help me index.html <html> <body> <form name="form" method="post" action="insert_ac.php"> <h1>Insert Data Into mySQL Database</h1> name...... <input na...

0
Q: Remove phrases from string

Marius GentvilasI have a string like this: ..., "test1@test1.com" <test1@test1.com>, "test2@test2.com" <test2@test2.com>, "test3@test3.com", "test4@test4.com" <test4@test4.com>, .... I am exploding everything by , , but problem is that i dont want to have value laike this [0] => "test1@test1.com" <test1@test...

0
Q: Filters and validators are added twice

Adrian NowickiI wrote about it on zf2 github and no one answered yet. But maybe it's not a bug and I'm doing something wrong. Here is my code: Fieldset class TestFieldset extends Fieldset implements InputFilterProviderInterface { public function __construct($name) { parent::__construct($n...

0
Q: Hide Legend from PHPExcel Charts

Awais QarniI have started using PHPExcel 1.7.9 for creating different types of charts. I want to hide Legend. I have tried many possible solutions but coudn't be able to find the exact way. First I tried to empty the first parameter of PHPExcel_Chart_Legend like this $legend = new PHPExcel_Chart_Legend('',...

0
Q: How to insert array key as table column and value as column value into mysql using php?

Abdur Rahim AbhiI have an array that looks like: $frmData = array([name]=>Abhi[cell]=>050000000[email]=>abc@xyz.com[address]=>1/2 South Road) Now I want to insert data into my mysql db from the array, and use the array key [name][cell][email][address] as table column and values as column value. I tried seve...

0
Q: PHP Read many files inside a directory

WebDesignerI have seen that this question already exist inside stackoverflow but there isn't an answer for my problem. I have directory with many files downloaded from another server, I don't know how much files and how much is the dimension can be 1GB I think or 100Mb depends of the external server. Now ...

0
Q: Path image + file upload to amazon s3 with transloadit

nielsvI want to upload images/videos/... to my amazon s3 bucket. I am using Transloadit to upload my files. The upload works but my images are stored like this: images/ef/c3f8aa22f70265d8c12c799df0bbed/image.jpg I just want to have the "image.jpg" in my /images folder. My Transloadit code: $('fo...

0
Q: I echo form data from a php file to html form now i want to update changes to MYSQL

user2759987i have a form which is popullated via a server side php file and this echo's all the fileds and data from the records in MYSQL echo '<li class="form-line" id="id_21"><label class="form-label-left" id="label_21" for="input_21"> Customer Job Details </label><div id="cid_21" class="form-input">'; e...

0
Q: Magento - Create an Attribute and Applied it to specified product type

TomI have created an attribute for my extension from this tutorials - http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/installing_custom_attributes_with_your_module It's the best one I have found on the google. Acutally I also created a custo...

0
Q: in the same query where and like zend framework 2

Chiara Lo MonteWhere to make a query like this, how can I do? SELECT * FROM hotels WHERE name LIKE '%mykey%' AND country_id = '12' I have done so, but we must not: $select = $this->sql->select(); $select->from(self::TABLE); if ($params['key']) { $where['where'] = new \Zend\Db\Sql\Predicate\Like('name'...

-1
Q: remove duplicate value looping statement

JayhsonHi to all i have a problem, i want to remove the duplicate value from my looping eg. I have a 4 record, It must be 4 records display from my output, the problem is, it display a 16 records that's why I need to remove duplicate from my looping statement See my code below coming from submit <...

0
Q: Symfony2 array access in twig error

StrikoMirkoI don't know what is going on but here is my predicament: When I want to access nested arrays in twig I get this error Impossible to access an attribute ("path") on a integer variable ("10977") in KprCentarZdravljaBundle:Parts:articleDefaultBlock.html.twig at line 12 Now here is my twig cod...

0
Q: Temporary security through obscurity website folder

user1753362I need to make an uploaded file on my website publically avaliable for a few minutes but keeping it secure. Is creating a temporary long-random-named folder sufficient? A PHP script would create the folder, make it available, then delete it. I would also run a cron-job every 15 minutes (as fre...

0
Q: PHP - Slim Framework: Best practice with a lot of code inside routes closures

Agustín DondoI'm using Slim. In the documentation they only show examples working with only one index.php file, which has really little functionality for every route. For example: $app = new \Slim\Slim(); $app->get('/books/:id', function ($id) { //Show book identified by $id }); But in my case, my inde...

0
Q: mysqli update not updating eventhough stating successful?

AnthonyI am building a project and for some reason, I am unable to get my Update statement to actually update. I have some input fields in a form which provide the details for the variables below. Here's my code: //update database $stmt = $mysqli->prepare("UPDATE pages SET pg_na...

0
Q: Store data in DB for fast SELECT

kanashinI made a custom admin panel for a news website. The administrator can select many "position" when he choose where to publish. I'm using PHP and MySQL. My question is: Which should be the best way to store the position? I have considered: Serialize "position". CONS: Slow SELECT, so I will need...

0
Q: Webpage config file

vicRI need something like a configuration.properties file for my webpage. Like in php, js or just a txt file. I want to use it to change data afterwards, to make maintenance a little bit easier. But my i have no service or any think else running on my page so i need something different. Is there an...

0
Q: how to use php GET or POST variables in xslt?

user2822230as the title, how to use php GET or POST variable from submited form in xslt? with practical sample would be much apreciated. thanks

0
Q: target _blank funny behaviour

Cosmin SerbanescuI'm having a real problem with target _blank. The website is this: http://www.l2herbal.com/ When I placed a link with target _blank in the menu ('Forum') if the user clicks on it, it opens in a new tab BUT the problem is that http://www.l2herbal.com/forum remains in the old address bar. I've chec...

0
Q: Inserting JSON output into Database every X minutes?

AliasAlthough I know how to do this, the way I'm thinking just doesn't seem "the best", using PHP. I have an API (locally) which produces a JSON output with a lot of data which I want in my database, however I'd only like to update every 5 or so minutes. The way I'd do this is: Parse JSON output C...

0
Q: Updating php from 5.3 to 5.5

davidI have tried to upgrade my php by using terminal. So far I have tried this sudo apt-get install php5. But I have no solution. Is there any solution to upgrade my php from 5.3 to 5.5 by using terminal ?

0
Q: Caching via static properties in PHP

waiwai933I have a number of classes that extend an abstract DatabaseRecord class. Essentially, the DatabaseRecord class handles some common functions that all of the child classes use in interacting with the database (e.g. searching by id, updating, etc.). Now, I'd like to not have to constantly go to th...

0
Q: Fetching function from different class causes database interaction to fail

gutigrewalI've got a login session, in my login class I have created a function which fetches the user information for me. For now I have limited this to the user_id for now as I want to save this into the database so I can easily tell which user posted what in my database. I am trying to access this func...

0
Q: How to execute a wordpress function inside custom PHP file

Konstantinos PapakonstantinouInside my active theme there is a user.php which serves this kind of url http://mysite.com/user/username. Inside user.php I echo a script tag with the following content $.ajax({ url: "' . get_theme_root_uri() . '/fray/userslogan.php", data: {"id": ' . $profile['id'] . ', "slo...

0
Q: PHP Download from webContentLink to server

user2593135I have mp3 files in my Google Drive that i want to download to my server. google drive api gives me download url like this "https://docs.google.com/uc?id=0B-8ZjfWGsMOwZVdmQnBXX1pnTEE&export=download" $data = file_get_contents("https://docs.google.com/uc?id=0B-8ZjfWGsMOwZVdmQnBXX1pnTEE&export=d...

0
Q: Cannot send session cache limiter

kapilWhen i run my website on localhost it runs properly,but when i run it on remote host i'm getting following error on the top of webpage: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at/home/content/77/10963277/...

0
Q: Redirecting URLs after mod_rewrite?

user2738640I'm trying to understand how the mod_rewrite works. For example, if I have a URL like: example.com/user.php?id=123 And with the mod_rewrite I can create the URL Like: example.com/user/123 Now this is ok, but on other locations in my application, I have linked to the user page using the old ...

0
Q: PDO MSSQL - INSERT INTO check for duplicates - named placeholders

ManolisIn my script, i am parsing a URL with JSON, and with json_decode i'm creating an array. What i want is, using PDO for mssql, everytime i am parsing this script, to check if the values that are about to be inserted in the DB are already existing and if not, insert them in the DB. I don't have a s...

0
Q: CodeIgniter RESTful web services html format not rendered correctly

Beniamin SzaboI am using Philip Sturgeon's RESTful web services and when I request an HTML(table) format it adds some weird empty cells at the beginning of every row. This is how the table looks: As you can see there is an empty cell. And if you look closely in firebug you can see that it contains all the...

0
Q: mysql image to submit button

Alexander VestlingNeed some help getting the images into submitbuttons. I am using a while loop to fetch multiple images from database and in the same time trying to create a form with a submitbutton displaying the image for each new image fetched. I can't use CSS to have an image as a submitbutton since I am f...

0
Q: Breaking id statement PHP

user2527826I need to break an if statement somehow. Here is the code public function userData($data) { //checks if user is in the database if (self::checkUserExist($data)==false) { $userInfo = array(); $userInfo['id'] = (isset($data->id)) ? $data->id : break; $userInfo['em...

0
Q: PHP proc_open skip progress and straight for final output

checksumI'm trying to run a program with php's proc_open. The source look something like this: $pipe_settings = array ( 0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("file", "stderr.log", "a"), ); $process = proc_open("/usr/libexec/git-core/git-http-backend", $pipe_settings, $pipes...

-1
Q: how read content from rss link only main text

rezataslimi_eduI'm trying to make "rss" readers , but the problem is just want showing the main link which is important so when doing that other parts emerge which are not necessary! how can i solve the problem ! for instant in below sites: 1) . http://reader.aol.com/ 2) . https://digg.com/reader

0
Q: mysql result not displaying based on my query

futuringI have a table called add_project. Here you can view the table structure of add_project And the another table called assign_project Here you can view the table structure of assign_project Now the table add_project : Here on this table admin add the new projects. The admin user_id is 1 so it is ...

-2
Q: How to convert two dimensional array to multi dimensional array in php?

dnsudhakarMy give my input in array structure like bellow i mentioned Array ( [0] => Array ( [3] => a [2] => b [1] => c [0] => d ) [1] => Array ( [3] => a [2] => b [1] => c [0]...

0
Q: Drop Down of float values not showing option as selected

Gokul ShindeI am displaying a drop down of height and it content float values. When I displaying this drop down on edit form, not showing old value of height as selected in it. I want to show 5.6 ft height value as selected in my drop down having values from 4, 4.1, 4.2....6.10, 6.11, 7 etc. Following is t...

0
Q: Rewriting GET variables using modrewrite, absolutely stuck

JackolaiI have a subdomain artist.DOMAIN.com, which i'm using a $_GET variable on of ?artist=ARTISTNAME How can I modrewrite this to look like artist.DOMAIN.com/ARTISTNAME. I'm having a real hard time with modrewrite. Haha! Also do i put the .htaccess specifically in the subdomain folder, or the root o...

0
Q: Tracking a click from Google

andyI am working on a legacy system at the moment and the traffic source indicator has broken for some bizarre reason. As far as I can tell from looking at it is all traffic came through a file called visitor.php that logged $_REQUEST['traffic_source'] to a session variable. I now need to rework tha...

0
Q: How do I use the Google Docs editor in my Yii application?

ragingprodigyI know it seems there are lots of similar questions but unfortunately, none of the answers provided seem satisfactory (at least for the questions I've read). I'm interested in using the Google drive Word processor and spreadsheet app within my Yii application. I want to know: 1) If this is even...

0
Q: PHP Write a variable to a txt file

jayt.devI am trying to get a variable from the query string and write it to a text file. I have tried like this: <?php $content=( $_GET['var'] ); echo $content; $file = fopen("etlLOG.txt","w+"); echo fwrite($file,$content); fclose($file); ?> I get the following errors: Warning: fopen(etlLOG.txt) [fu...

0
Q: How to redirect to previous page after a form save in cakephp?

Dan Ovidiu BoncutI have two pages: bookings/index and users/myUserAccount that have a link to locations/add. What I want is that after I save the form for locations/add I want to go back to the page that refered this one. If I am in myUserAccount, click locations/add, I complete the form, save my location and I w...

0
Q: jQuery loads only certain part of page

Patrick FalizeI know this is asked 1000x on this website but I cant get it to work. I want to get the table information from this website with the current style: https://webuntis.a12.nl/WebUntis/?school=roc%20a12#Timetable?type=1&departmentId=0 So I tried this (fiddle here): <div id="wrap"></div> <script> ...

0
Q: About PHP XMLwriter() encoding input and output

PatoI've been looking everywhere for a detailed explanation on how the XMLWriter() encodes its output but couldn't find it. I would like to know what encoding should the input data be in if I want an specific output encoding, for example ISO-8859-1. Should I give it the input data in the same format?...

0
Q: Send XML to PHP server with Android

FilnikI've tried a lot of different solutions to post an XML file to a PHP server. The response is always "09-27 10:49:10.550: I/TAG(3950): File MIME-TYPE was not recognized." The last version of the code is: httppost.setHeader("Content-Type","text/xml;charset=\"UTF-8\""); String textToUpl...

0
Q: GUI for managing users with symfony2

matterixI have build user and roles managment with login system with tutorial on symfony docs. Now i want to do action to create users with form. But i don't know how to add role to user to database. i have made this: entity User: <?php namespace (..)\Entity; use Doctrine\ORM\Mapping as ORM; use Symfo...

0
Q: $_SESSION check if empty and redirect

user2822767Hello how to check if $_SESSION['myusername'] is empty and if so redirect them to index.html Now i'm using <?php session_start(); /*** begin the session ***/ if(!isset($_SESSION['myusername'])) { header('Location:index.html');; } ?> But that allows non aut users to access

1
Q: PHP: get a result from a chaining method from extended classes?

lauthiamkokI am trying to get a result from a chaining method from extended classes below, class Base { protected $id; public function setId($input) { $this->id = $input; return $this; } } class PageChildren extends Base { public function getID() { return $this-

0
Q: fetching of data from mas90 by odbc is slow

dipanshumy query is taking 5-6 sec to execute for 2 records. as there are 8022 records in mas90 so how to speed up fetching of records from mas90 using odbc. select IM_ItemWarehouse.ItemCode,IM_ItemWarehouse.QuantityOnHand, CI_Item.TimeUpdated, CI_Item.DateUpdated from IM_ItemWarehouse,CI_Item...

0
Q: How to create forms with multiple submit buttons

user2770039I'm new to Yii framework.I'm using the form.php to update the fields of the table. So now I use this form with three submit buttons - [Save, Accept, Reject]. The form now has the following fields. <div class="row"> <?php //$model->ReviewedDate=date('Y-m-d H:i:s');?> <?php echo $form->l...

-1
Q: PHP mail form trouble shooting

user2822648Im quite stuck on this, it's worked in the past when I've made php mail forms, but my brain just isnt working on this one. Any ideas would be very helpful. <?php if(isset($_POST['email'])) { $email_to = "paulsizer12@gmail.com"; $email_subject = "eKoWeld Feedback"; $email_message = "Form detai...

0
Q: CakePHP 2 - Validating password fields

LuisI have some problem with Cakephp 2 validation. I am trying to validate several fields on an Edit form. Some of them are a password and confirm password fields. I want to validate both only if they are supplied. If they are empty I dont change the password, but if the user writes over them I wo...

0
Q: laravel 4 cannot get into the specify controller method

diligent My routes.php Route::get('course/{id}', 'CourseController@show'); Route::get('course/{id}/{comment_type}', 'CourseController@show'); Route::get('course/search/{key_word}', 'CourseController@search'); My CourseController.php have these method public function show($id,$comment_type=1) { //d...

0
Q: tinymce in cakephp how to set it's value

Erdei RudolfI am using CakePHP 2.4.1 and Tinymce for CakePHP2. I have an Edit page and I want to give some default text (extracted from the database) to one of the 's. Using plain Cake code I have this: echo $this->Form->input('conditii_plata',array( 'value'=>$conditii_plata[0]['Setare']['value'], ...

0
Q: Inserting Blob to Firebird using php

Swetha swethaHow can I insert a blob image to firebird database?I am using pdo connection to connect php with firebird database. I have tried the following code. $src=$_FILES['logoid']['name']; $loc=$_FILES['logoid']['tmp_name']; $tmp_logo=$_FILES['logoid']['name']; $d="images1/".$src; copy($loc,$d); t...

0
Q: Algorithm to generate NTLMv2 Hash in PHP

asim-ishaqI am trying to develop a PHP function to calculate NTLMv2 hash by providing server & client challenge, domain, account and password. The resulting hash appears to be not correct. Can someone guide me about the correct way: Here is the code: function GenerateNTMLv2($password, $account, $domain,...

0
Q: PHP with MVC Pattern

ChinI just started to learn the PHP in MVC pattern. I took an example from here. Here is my code : <?php class Model { public $string; public function __construct(){ $this->string = "MVC + PHP = Awesome, click here!"; } } class View { private $model; private $controlle...

0
Q: How to cache HTML pages from Word Press to avoid querying the database?

GibboKI would like to know how to delivery to the browser CACHED html pages so to avoid querying the database often. So basically I need the equivalent of OUTPUT CACHE in .Net, but should work in PHP and WordPress

0
Q: Get users email from facebook API

AddevIs possible to retrieve the email of an user registered in the app without the user's access token (as an admin with the app secret for example)? For example to retrieve the email of all the users registered in your Facebook app in order to notify a security issue? Thanks

0
Q: Laravel Eloquent querying relationships

Andrew WillisI have created a messaging system for a project I am working on and appear to have hit a bit of a stumbling block. I have the following table structures (irrelevent columns omitted for clarity) messages ------------------------- from_id to_id spam users ------------------------- id gr...

0
Q: UPDATE or INSERT if empty fields in a unique row?

user2714558There has to be an easier way to quary a table and IF the row has DATA then UPDATE, ELSE INSERT INTO the table. Seperately they work fine to UPDATE or INSERT but together they keep inserting another row. I only want to keep one row per unique id. I'm horrible at IF statements. Please Help. $r...

1
Q: Image file management in a web service

AndyI'm developing a web service in php which generates images using an external application. After generating the image file is inserted into the html page. Like this: <img src="img/52454879c7158.png"> After viewing the file, it is no longer needed. But in the end in a folder with pictures accumul...

0
Q: MySQLi edit is not editing

Lior Elenbyi'm learning MySQLi instead of the old MySQL functions. I've tried to make an edit file, which gets the ID from the URL and the rest from a form, the "app" script: <?php session_start(); ob_start(); if (!$_SESSION['user']) { @include "login.php"; } else { include('top.php'); $id = $_GET['i...

0
Q: why it is not converting?

Jessica Girayim new in BBCODE and im having a problem. . . my code is already saving in my database but it is not converting from BBCODE to html so what i is like this ([b]hey[/b]) this is my editor.php <?php include("Tools/MyTemplate.php"); // Include your designed template include("Tools/Config/DBCon...

-1
Q: Submit record in 2 databases

user2226181I have a form and I want to submit the form data in 2 databases. But the problem is: both the databases are on different servers. I am new to mysql so I don't know exactly how to do that. I am working in php. I am sharing my code with you, its not working properly. so please check this out: $con...

0
Q: Cut HTML Tags and wrap HTML tags again Part/2

Foo Lingits possible to map the cascade of tags in each child-tag of current parent tag, like this FROM: <p> string <b> bold <em>italic string</em> also(bold) </b> </p> TO: convert to this String <p> string </p> <b p><!------------------------------...

0
Q: How do I send data to php on $.ajax success?

tofuThis could be a silly question, but I´m not used to working with Ajax and JSON. I have an array tags, and I want to get media_counts for them from Instagram. On success, I want to send the received data to a php-file (and later save it to a database table). I have this code: for (var i = 0; i < ...

-1
Q: Old database connection class with functions deprecated

guillaumeWorking on an old website (PHP 3), I need to update its code, notably this DB connection class (mysql_db_query seems deprecated) : class db { var $host; var $port; var $login; var $pass; var $data_base; function db(){ $this->host = ""; $this->port = ""; $this->login = ""; $this->

0
Q: jQuery auto complete suggestions - How to fetch particular country?

Kaushalya RamI have display the country and cities in suggestion box by using jQuery. Here I have to display 'United Kingdom' and their cities. My code is below.. jQuery(window).load(function() { LazyLoad.js([ "<?php echo base_url(); ?>js/jquery.autocomplete_custom.pack.js", "<?php echo base_url(); ?>...

0
Q: cURL POST with SSL and AUTH to Laravel PHP API

adam KearsleyI have been writing a RESTful API for my Laravel application. I can submit data using cURL in Terminal with the following line; curl -i --user admin@admin.com:qwertyuiop -d "data=somedata" https://www.xxxxxxxxxxxxx.co.uk/app/api/v1/clients but when i try and do the same in cURL using PHP it gi...

0
Q: line break in textarea without displaying HTML tags

charlieI am using this HTML/PHP Code <textarea name="ticket_update" id="ticket_update" cols="70" rows="2"><?php echo 'Ticket '.$ticket["ticketnumber"].'\n'.$result["notes"]; ?></textarea> I have tried using \n \n\r and <br /> but it is displaying the HTML tags in the textarea. how can i stop them di...

0
Q: How can i edit a txt file using php and ftp

jayt.devI want to edit (write some data) to a txt file located on an ftp server using php. I looked to this post writing to a file using php ftp but in this case CHMOD 0777 is applied which is not understood by my server.

0
Q: How can I delete 1 selected row from a lot of tables in PHP (from mysql)?

Miszter SoulI haev a PHP function, to write out my tables from MYSQL. I'm made a button, for delete (torles) the selected rows. How can I delete with my 'torles' button the row where I'm pressed it? function munkalapok(){ kapcsolat(); //connect to mysql, and write out all rows ...

0
Q: HTTP_REFERER the same site but works in Javascript?

andyI'm trying to capture the HTTP_REFERER using PHP when clicking in from Google. If I print it out on the page after coming through, it says the referrer is the same site as I'm on. I would assume it's being redirected, but if I type document.referrer in the console, it correctly shows Google.co.u...

1
Q: How to retrieve the information from the frame of data link layer?

user2822851Is there any code or tool or something so that I can retrieve the information of the frame ? I have search and even I have found the code but it is not working in WAN. So guys please help me....thanks in advance...

0
Q: how to load php in apache http.conf

user2818025I'm using bitnami subversion that will configure subversion and apache.Now i'm trying to use the same apache for my php file can i do this if yes how can i use this. I had already try this by editing the httpd.conf file in the following manner: LoadModule php5_module modules/libphp5.so Set...

0
Q: Change the Layout Order on Wordpress One Page Theme

Johan LimI wanna ask how to change the layout order on this theme http://next.coupleshops.com/ The original sort order is: Services, Gallery, CSR, Our Team, News and Contact (from top to bottom of the main page) Is there anyway to change the sort order to: News, Services, Gallery, Our Team, CSR and Cont...

0
Q: PhpStorm understanding of magic methods

Viktor LivakivskyiOur classes don't have explictic getPropertyName() and setPropertyName() methods. Instead we're using trait, which implements combination of magic __get(), __set() and __call() methods, so, we can have following as result: class Device { use ModelAttributes; /** * @var \string */ protected $t...

0
Q: MongoDefaults.MaxConnectionIdleTime in php driver

SergioCWe need to set the option MongoDefaults.MaxConnectionIdleTime in php driver. Can someone point me to how i may be able to achieve this?

0
Q: cakephp formatting an array

Curtis Timo SchmidtMy goal is to display 1 Projects and many Keywords to it. My DB is simple: Project has many Keywords Keyword belongs to Project So far so good. Now I try to get the Information in my ProjectsController: public function view($id = null) { $this->Project->bindModel(array('hasMany' => ...

0
Q: Refreshing the browser/window to work the application

BukamanushI am using CodeIgniter with DataTables. In the DataTables edit window I can edit some product item. It's working fine, but the images(thumb images) for the product is not displaying when I select the product first time. If I close the edit window and then click on the product again, it shows up ...

0
Q: Uploading Image from scr of img tag to php

Jenerson JoseI just want to ask if there is a way to upload an image from scr of <img> tag . The scr of the img tag was not from the server and look like this one: <img scr="data:image/png;base64,iVBOR...52Eysdsadsa===" /> This was the product of the approach I learned from this site. Thank you in advance...

1
Q: php return wrong value

Shakti PatelI am trying to calculate this in php : echo (int)((0.1 + 0.7) * 20); why it return 15 Expected result: 16 Actual result:15

0
Q: get date of adding to wishlist in magento

user2822599I know magento several days. Can somebody help me to find solution to get date of adding to wishlist. I would like get this information in template/wishlist/item/column/info.phtml i have tried like $item = $this->getItem(); $product = $item->getProduct(); Var_dump($product->_data) but with...

0
Q: Combine two strings - Special case

user2157236I have all my text defined in separated language files, meaning if I write: Example 1 (working): echo TEXT_FOR_PRODUCT_TENNIS; The text defined depending on your language for TEXT_FOR_PRODUCT_TENNIS is shown on the site (for example: "Great tennis products!". BUT if I try to combine two str...

0
Q: Resizing and moving an image

Wojciech MajI'm kind of a beginner in PHP and here's what I'm trying to do: Recieve an uploaded image and move it to temp/ folder Examine it and decide whether it needs to be resized or not (it needs, if it's not 135px wide) If needs to be resized, resize it and save as results/{number}_cover.jpg If it doe...

1
Q: I have C language library how to expose to a restful web service

user2822934I have shared library in C Language on linux environment. How to expose those shared library API's to REST based PHP webservice? Please guide me regarding this. I am new to the linux environment.

0
Q: Get the full string from line buffer in "readline_completion_function()" php?

Ash WinI need to get the full string from the line buffer when i do [TAB][TAB] in php command line. Some thing lik this, my_php prompt> hello world **[TAB][TAB]** myAutoCompleteFunction($string,$index) { echo $string; **// Prints hello world** }

0
Q: Dealing wit classes that instantiate other classes using a DI container

DraconySo my problem lieas in that I want to decpouple my classes, which I've achieved to some extent with a DI container. The only problem I have now is dealing with classe that instantiate other classes. For instance after querying the database you get an instance of ORMResult, which has a next() meth...

0
Q: insert comma separate value with same id in php mysql

ThushI have a problem with comma separated values when fetch and insert to 1 table from to another table, my problem is, table_1 has comma separated values like this 1 | apple1, apple2, apple3 2 | samsung1,samsung2, samsung3, samsung4 3 | nokia1,nokia2 I want to fetch these values from above ta...

0
Q: TimThumb src parameter is a url with it's own parameters

i-CONICAI'm implementing timthumb to resize and create thumbnails of attached images on a forum. The forum uploads the images and they're accessible via it's own query string, and it also creates 1 thumbnail (for the post/thread view). The tim thumb is needed to create another, even smaller thumbnail f...

0
Q: apache authentication with .htpasswd password using salt

Adrian GeorgescuI am wondering how the Apache server authenticates me with .htpasswd I have a .htpasswd file inside a folder. The .htpasswd content is generated with php and the password is encrypted with the crypt() function like this: crypt($password,mb_substr($password,0,2)); The problem is that no matter w...

0
Q: How to access a specific key from an associative array in PHP?

JSLoverI'm a newbie to this associative array concept in PHP. Now I'm having an array named $sample as follows: Array ( [name] => definitions [text] => [attributes] => Array ( [name] => Mediation_Soap_Server_Reporting [targetnamespace] => https://mediation.moceanmobile.net/soap/reporti...

0
Q: BBcode parser, how to attach to main page

user2590369I am trying to use this simple BBcode parser shown below, but I am not sure how to actually make it work on my webpage. I have used previously some lines which have used some functions that are not recognised. Such as: require_once('parser.php'); // path to Recruiting Parsers' file $parser = new...

0
Q: I need a code to incremeny a column in my table when condition is satisfied

prakashfireThe below one is the code i'm using for incrementing,it shows no error but the "like" column is not incrementing. $sql="UPDATE photo SET likes++ WHERE imagename=':id'";

0
Q: Error code 1582: Incorrect parameter count in the call to native function 'FROM_UNIXTIME'

user2764080My code is like: $current = time(); $nexttime = mktime($hour,$minute,$second,$month,$day,$year); //$hour...from a table and mySQL statement is like: INSERT INTO table(...) values ('FROM_UNIXTIME(".$current.")',FROM_UNIXTIME(".$nexttime.")); I found the first FROM_UNIXTIME(".$current.") is a...

0
Q: Dynamical Image loaded from php after javascript need to run

Raj MohanI have page with image loading Dynamical from php.The image height is various px size(70,130,100,60).my need is how can get the image size currently viewed in page automatically in alertbox i try same code is not working.please help code <?php foreach ($images as $image) { ?> <img src="<?...

0
Q: Symfony2: How can i see a list of open sessions

user2794692is it possible get a list with opened sessions in Symfony2? I need this to check if one session in particular is opened in this moment. Thanks.

0
Q: SimpleXML and french characters

ShaakirI work for a International company and thus we have loads of languages to cater for. I'm having a problem with some special characters. I created a standalone test php page to eliminate any other issues that could be introduced by my system. From various pages i read through i found that Simpl...

0
Q: Getting information from Pusher channel using PHP

Daniel YeffetI'm getting new to "Pusher" (the websocket api) and I'm having hard time to understand how can I fetch information from the server after sending it to the channel. For example, this is my code: <?php include "pusher/Pusher.php"; ?> <script src="http://js.pusher.com/2.1/pusher.min.js"></script>

0
Q: jQuery UI DatePicker From and To

Eric TI have somethinng like below, and wanted to make sure from date shall not overpass to date which is not selectable(even after changing the date) and vice versa. From: <input type="text" id="xx_from" value="<?php echo $date_from; ?>" /> To: <input type="text" id="xx_to" value="<?php echo $date_t...

0
Q: peg_replace image links with image embedded with swiftmailer

DelightedD0D The html contents of a div are sent from page A to page B via POST. This content contains multiple images. I want to send the contents as an html email using swiftmailer. The images should be embedded so that they appear in there proper places in the email and look just like they did in page A...

0
Q: Add a Payment mode in Prestashop

yafrackWhat I need is simple. I could configure Paypal to work. Now I need a paying mode in which user is asked to fill a radiobutton selection and a textfield and an email is sent to the admin with this contents and the cart info. I don't want the user to be sent to a paying process, just confirming it...

0
Q: PHP SQL Select all where date is present of future only

Satch3000I know this code works: $eventdate = new DateTime($event['date']); $datenow = new DateTime(); if($eventdate->format('Y-m-d') < $datenow->format('Y-m-d')) .... I need to do something similar in an SQL query. Something like: SELECT * FROM MyTable WHERE `date` = `$eventdate` or Future Date H...

0
Q: Kolab 3.0 address book user list with local (kolab users) and Active Directory under same heading

Sunil RaiI am able to integrate kolab 3.0 addressbook with local and Active directory users. To implement it I have to pass two array with different name and parameters as mentioned in below example. For end user these contact list are coming under two heading, say "Kolab Address Book" and "AD Address Boo...

0
Q: Group values and get percentage from database

RocksteadyI have a database table where I save players bets it the following logic: This table will of course have several user_id's for every match_id. I want to display how the users have placed their bets. If they think that the home team will win lose or draw. AND I want it to be stated in percentag...

0
Q: How to store and calculate dates when dealing with Daylight Saving Time (DST)

iamjonesyI'm working on an appointment scheduling application. I'm wondering what is the best way to store dates and not have problems when the british daylight saving times come into effect. The way I've been doing it so far is to convert all dates to UTC using d.getTime() and store them as that. Then ...

0
Q: PHP urldecode() - escaping "+" symbols

user2758571I have this cookie which indicates 2 items split by /: 10=BATTLEFIELD 2 + 1=20.00/10=BATTLEFIELD 2 + 1=20.00 I need to decode it with urldecode(), but when I do it I lose the + sign between BATTLEFIELD 2 and 1, how can I avoid this?

0
Q: vb.net - how to get real link from php url

user2823046i am newbie.. and i cant english more... i have an example of URL. Example: http://www.techspot.com/downloads.php?action=download_now&id=2991&evp=113a02f49ca8ac11b566336b984b1655&file=1 but when i click the link, the url will change to http://www.exisoftware.com/downloads/picture_finder/PictureF...

0
Q: Amazon mws automate price check process

Matthew BazanetI have create a DB by importing the amazon report of inventory. So with the seller sku I try to get my price making an api call. But something went wrong. The server give me internal error. these are the 2 file that I try to join. File 1 is the amazon api call. I host it on pastebin because is t...

0
Q: Create Multi User Chat Room in Ejabberd

PRASANTHupto now i have successfully installed ejabberd and registered two user for a one-one chat. In client side i used strophe and is working fine with one-one chat. Now Iam moving on to multi user chat and have to create chat room with limited users to get access to this room. What is the procedure f...

0
Q: Mysql query i want

user2822526table Select * from table order by rank asc what is the mysql query (any one help me) O/P I need like this O/P id rank id rank 1 1 ...

0
Q: checking status of session with session id

nanu146I am trying to develop a chat application and I need to know whether the other user is active or not.I already went through "timestamp" example( if the last activity is more than specified time consider the user as offline ) and the problem with this method is that this code need to executed rep...

0
Q: Display Categories with Image in Multiple Pages of Homepage - Magento

SelviIn my Customization , i have more than 100 categories under Default Category so I want to Display all the categories in multiple pages with images Homepage - Magento. Im Using the below code : <div class="category-products"> <ul class="products-grid"> <?php $_categories=$this->getCurre...

0
Q: how php remote debugging works?

user2001842I have a php webserver setup running in a remote website; lets call it remote.com Have the wamp installed in local windows machine ( localhost ) and did the necessary xdebug configuration and netbeans installed. Now my doubts are: My IP is not static IP but dynamic one. So specifying this in th...

0
Q: Adding field to class of my module ,not working

FaceOfJocki have a model located in classes folder of my module: public static $definition = array( 'table' => 'myTable', 'primary' => 'id', 'multilang' => false, 'fields' => array( 'day' => array('type' => self::TYPE_INT, 'required' => true), 'hours' => array('type' => sel...

-1
Q: Japanese text Insert to MYSQL via Ajax shows Error

ElbyI have an issue with insert Japanese text to Mysql. This is only when I submit text via AJAX. If I insert using normal form submission there is no problem.

0
Q: How to keep alive cookie on Glype

Ega Gilang Ramadhani want to keep alive cookie on glype, url to keep alive cookie: agent.sriwijayaair.co.id but web apps agent.sriwijayaair.co.id, just one userlogin for one browser or one IP i need to acces webapps for all PC on my office,, with one userlogin. help me please...

 
 
2 hours later…
12:51 PM
0
Q: How to insert text content in most secure way from textarea in MYSQL

LulzimI am simply inserting the text that you write in the textarea in mySQL without using any extra method to protect my site... Actually i just made a test wrote the html code that creates a input textbox to the textarea and saved it into mysql, which prints me the component on the page... How can i...

0
Q: Laravel using UNION in query builder

Al_I have an SQL query that works fine and I'm trying to convert into fluent:: SELECT DISTINCT tags.tag FROM tags, items WHERE tags.taggable_type = 'Item' AND items.item_list_id = '1' UNION SELECT DISTINCT tags.tag FROM tags, itemlists WHERE tags.taggable_type = 'ItemList' AND itemlists...

0
Q: Best solution for pagination results ajax codeigniter

fabrizioI made a scroll pagination on a system of posts/comments with jquery / Ajax and codeigniter everything work fine, but i exaplain the my problem with a example: THERE IS USER A AND USER B I'm user A and i wrote on the profile of the user B, In the same time the user B scroll down for see the inf...

-1
Q: Character Encoding issue Json post to php

Androidenter code hereI have used the json post for form submit to a php page.In json request russian characters are showing correctly(checked in firebug console).but in php $_POST it shows like this "%u041F%u0440%u043E%u0441%u043C%u043E%u0442%u0440". Added the utf-8 meta tag.saved the file as utf...

0
Q: PHP: setcookie() returning true but not setting the cookie

L42I have a problem with my login script. I these lines after checking if the username/password-input is in my database: $log_hash = md5($user["id"].time().$user["password"].$IPlong); mysql_query("UPDATE users SET log_hash='".$log_hash."', lastIP='".$IPlong."', lastactive='".time()."' WHERE id='".$...

0
Q: Combine .htaccess rules: remove extension and rewrite URL variables

C. OvidiuI have an .htaccess file with the following rules # replace 'RewriteBase' with current working folder # put '<base href="/">' in <head> if you are in the root folder # put '<base href="/foldername/">' in <head> if you are in a subfolder of the root Options +FollowSymLinks RewriteEngine On Rewrit...

0
Q: Memcached client for php on php

Ramil AmrI have old version of php 5.1 and memcached client library doesn't work. I want to use client on php. Already found one https://github.com/cookpan001/php-memcache but not sure it works properly. May be you know good implemented php client class?

0
Q: getting error while trying to find sat or sun using php

HeartDiskI am trying to find a day who provided by the user and I am getting error: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 79 bytes) $days = $array('saturday','sunday'); // it's dynamic array if(sizeof($days)>0) { foreach($days as $key => $value) { ...

1
Q: Post a link and show thumbails from that link - php

New CoIn some websites like facebook, when we post some link it show us thumbnails from that website, Like this in Picture below: How to do that?

0
Q: radio button php mysql edit

Mantykora 7hello I would like to see (photo_edit.php) if it is 0 or 1 in radio button but I see no fields are empty <td> <p> <input type="radio" name="visible" id="visible" value="1" /><?php echo (@$visible == '1') ? 'checked' : ''; ?> {widoczny} | <input type="radio" name="vis...

0
Q: mysqli_num_rows is always 1

user2620338Can anyone tell me why this $pages_query = mysqli_query($link, "SELECT COUNT(`id`) FROM `gallery`") or die(mysqli_error($link)); $row = mysqli_num_rows($pages_query); echo $row; echos 1 even though there are 7 rows in my table?

0
Q: Single array element becomes object with Zend_Soap_Client

aryan kumarI'm using Zend_Soap_Client and encountering this issue: <parent> <child><name>abc</name></child> <child><name>def</name></child> </parent> If there's more than one child element then Zend return array and I can access like $result->parent->child[0]->name but if there's only one child node...

-2
Q: How to load a one dimensional array into a two dimensional array in php

John MayerI'm trying to get a one dimensional array, fetched from a mysql database, in a two dimensional array with a second selector. $row_number = 0; while($session_data_row = mysql_fetch_array($sessions_data_row_u)){ session_data[$row_number] = $session_data_row; //What is wrong here?? $row_num...

0
Q: creating 2D javascript array from ajax php call

Barry WattsI have a mysql table with image data in. I want to retrieve the image data and push into a javascript array. There are two fields that I want to put into the array and they are image_ref, and image_name I know I need a 2D array for this and I need to retrive the data from the db using ajax and ...

-1
Q: variable value is not printing properly

prakashfireecho"<tr>"; echo "<td><img src='photos/$file' alt='$file'><br>$file</td>"; echo "<tr><td><a href=\"delete.php?id=".$file."\" onclick=\"return confirm('You want to delete .$file???');\"><button>delete</button></td></tr>"; echo "<tr><td><a href=\"like.php?id=".$file."\">like</td></tr>"; echo "<tr><td>

1
Q: Stripping last character from a foreach loop

portnoy-the-elderHow do I strip the last pipe out of the list of numbers that is generated? $days = new DatePeriod(new DateTime, new DateInterval('P1D'), 6); foreach ($days as $day) { echo strtoupper($day->format('d')+543); echo "|"; }

0
Q: php xml-rpc return null when I want to get more than 5000 words

user1472060I'm using codeigniter xml-rpc library (php) to get pages from xml-rpc server(Atlassian Confluence). It works good for pages which include one or two paragraphs but i encounter with a proplem (return null content) when I want to get some pages which include more than 5000 words. I think it's relat...

0
Q: How to initiate php-cli script xdebug session in netbeans under windows?

user2001842Would like to debug php cli script in netbeans under windows. All the necessary xdebug config has been done. I am sure netbeans started to support cli debugging from 6.3, am using 7.3. But it don't seems to be working. Already selected the run configuration in project properties.

0
Q: How to safely store and access user session data

user2422960I am currently learning about security aspects in web applications. My application used to identify the current user by a cookie which was created on successful login. It contained the user's id. Every time the user has made a request to the database, my application would use that id to select o...

0
Q: Social Network language

user2823411I am thinking about making a social website, where you have to log in with your Facebook account. I already know how to do this as it is explained on the developers page of Facebook. It will be a pretty big network, with a lot of features etc. It is also extremely important to have a secure syst...

-1
Q: Find youtube Link in PHP string and Convert it into embed code?

Code HunterFind a Youtube video link in PHP String and convert it into Embed Code? Embed Code: <iframe width="420" height="315" src="//www.youtube.com/embed/0GfCP5CWHO0" frameborder="0" allowfullscreen></iframe> PHP Code / String: <?php echo $post_details['description']; ?> Youtube Link: http://www...

0
Q: Expressionengine Admin - Add language to relationship dropdown

user2823357I'm using Expressionengine for a multi-language website with products. I used Transcribe for controlling the multi-language. Products have the same title in different languages and this gives me some problems selecting the correct product in a relationship field. The builder of this site did no...

0
Q: Session class warning

Joran Den HoutingI'm getting this warning: Warning: session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent But the first this I do is actually ob_start.. Test script: ob_start(); $session = new SessionClass(); echo "Test"; SessionClass: function __des...

-1
Q: Using this login, a user should be able to signup for the website and send a pre-populated but editable message to a friend of his on Facebook

Vivek SinghCreate a Facebook login for a website. Using this login, a user should be able to signup for the website and send a pre-populated but editable message to a friend of his on Facebook. The end result will be a message sent to the friend of that user in his Facebook inbox. It should work like this: ...

-2
Q: rewrite rule to my website using htaccess file

srinui have doubt in htaccess rewrite rule, i need from http://example.in/hyd-real-estate/property.php?id=3-BHK-Deluxe-Flat-For-rent-in-Ram-guda/1282 to http://example.in/hyd-real-estate/3-BHK-Deluxe-Flat-For-rent-in-Ram-guda/1282 can anyone help me..

0
Q: jquery gets data from other page and enter into form fields

Salman Razaki simply want to get values from test2.php page and fill my form input fieds accordingly on test1.php. please help and advice. test 2 page $empidx="Design-1012-1000"; $countries = mysqli_query($con,"select country from countries"); $query = mysqli_query($con,"SELECT * from employee where emprec...

0
Q: netbeans (or PHP in general) debugging options

aserwinI have tried for months (quite possibly years in toto) to get xdebug to work with Netbeans with no success... I have to have debugging! Is there an alternative? What are my options (without porting everything to Zend server) Am I doomed to crawl back to M$ and become a .NET developer once more?

0
Q: Post using Curl

esafwanI am for the first time trying to us php curl. I am trying this by creating issue in Bitbucket issue tracker. The API documentation shows below as the end point for authenticated user: POST https://bitbucket.org/api/1.0/repositories/{accountname}/{repo_slug}/issues --data "title=value&content...

0
Q: Cant update one column in Mysql database through html form

user2815059I really hope you can help me with my problem. I have my form completed and all buttons working and everything was hunky dory but today I've decided to add one extra column in my table. Column is called 'Country'. Now, all of my buttons are still working and data is added or updated no problem, e...

-1
Q: Using a value from an array to get a value from another array

Dustin McGrewI have these 2 arrays. One array holds the names of colors. The other holds their hex values. $availableColors = array("white","black"); $hexColors = array("white"=>"ffffff","black"=>"000000"); I'm hoping this would output #ffffff.... $hexColors[$availableColors'white']; But that doesn't se...

0
Q: RegEx matching - stop first matching

Foo Lingthis string must be checked, with regex ... <u>str<b>#u #bold<em>#u b #ital<strike>#u b em #ic stri</strike>ng</em>also(bold)</b></u><u>str<b>#u #boldalso(bold)</b></u> This is the regex [^.?]>#(.*?) # The matching must be contained follow values <b>#u # <em>#u b # <strike>#u b em # <b>#u ...

0
Q: Retrieve mail via PHP / IMAP - Header is changed after fetching the mail

Ju Chi have a big Problem. I'll fetch all mails of a mailbox with php_imap, connecting to pop3 service of an microsoft exchange server. The Adress of the Mailbox: sample@sample.com This Mailbox has many aliases: e.G. sample_test@sample.com, sample_test2@sample.com My problem: When someone writes a m...

0
Q: require works on SSH but doesn't on browser

GuerraI'm trying to use AWS SDK on my project but getting "Failed opening required", Its very strange becouse the path is pretty right, and if i call the php file from "Putty" it run fine. But if i call from browser i'll get a fatal error on my require instruction. PHP: set_include_path(implode(PATH...

-4
Q: Add product accessories programatically in magento

user1844205I have products and their accessories ids in a CSV file. I searched through Google, but couldn't found that how to add product accessories in Magento through PHP. I need some assistance here.

0
Q: how to display comment text to another page?

user2717260i want to display the comment when we wrote on comment box after submit i need to display what we wrote in comment box (it is working on database when i submit comment it will save to database i need that value to display under the comment box then i am using ajax for sending values to another p...

0
Q: how to use DISTINCT properly to display only one item per user_id

user2643870Now, before I ask this...let me say I already searched for like ever and tried several things which just don't seem to work and I don't know what I'm doing wrong. I have a website where users (with different "owner_id") can list one or multiple products. On one special page, I want to display on...

0
Q: unserialize data in foreach gives invalid argument supplied - WordPress

sunI used separate table instead of options table for storing the values of my plugin, in here i wanted to try storing multiple value in single field(column) so i tried maybe_serialize and maybe_unserialize <?php $test=array("one" => $_POST['test1'],"two" => $_POST['test2']); $se_test=maybe_serial...

1
Q: Sum of date time difference in a mysql query

user1421214Mysql table columns are Starttime - type:datetime, Stoptime - type:datetime Data Starttime, stoptime 2013-10-25 09:00:00, 2013-10-25 17:00:00 2013-10-26 09:00:00, 2013-10-26 17:00:00 2013-10-27 09:00:00, 2013-10-27 17:00:00 2013-10-28 09:00:00, 2013-10-28 17:45:00 Query select, min(startti...

0
Q: keeping GET variables after URL rewrite

Kevlarim trying to rewrite my product page URLs which are dynamic an example of one is: product.php?id=780-1AC930D and Im trying to rewrite it to: product/780-1AC930D i need the variable to still pass through with the URL though but currently its not working for me. I have a redirect at the top ...

0
Q: Overriding sylius layout

Tiago BritoI want to override the frontend layout.html.twig, so I create a file in: /var/www/sylius/app/Resources/WebBundle/views/Frontend/layout.html.twig but nothing change. Can someone help me?

0
Q: variable passing to Javascript function is not changing

Steve GreenI'm trying to implement a feature for reporting a comment on a site. I'm using PDO and have the function in a PHP class. When clicking 'report' a JS function is called that uses Ajax to then call the PHP function that'll update the database / email the admin. I can't see why but the id getti...

0
Q: Similar issue to: Multidimensional Array Find and Update The Value using PHP

Christopher Van HeerdenI am at a loss, I have seen similar posts but cannot get my array to have similar structure so that I can implement the solution: I have an array that I create like this: foreach ($lastsubresult as $lastselect) { array_push($finaldata_array, $subrecord->data ."=>". $lastselect->total ); ...

-1
Q: subtracting result values from each other

Cloneu InglewoodI have all working fine and now wish to add this statement which now displays fine but I need it to subtract the first from the second and display that as the \n echo "$num_rows HyperGrid User(s)\n";echo $this->db->count_all('GridUser WHERE Online = "True" AND Login > (UNIX_TIMESTAMP() - 86400)');?

0
Q: Insert Multi Checkboxes List In a dropdown list

Leachim HcaGuys that's my multi Checkboxes select php & html code what is the code needed to put it all in a dropdown list box? I really appreciate some help been trying to work it out for the past 2 days but no success at all I really need to wrap it all with a dropdown list on click extracts and shows th...

0
Q: SQLSTATE[42000]: Syntax error or access violation: 1064 PHP/MySQL

Karina McGourtyI am creating a script to automatically export the results of a query i have created in MySQL, in a table format in an email. I have it working up to the point where i receive 2 emails, one email gives me the error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in you...

0
Q: phtml encoder files are not working

sridhar sI have encoded a php file using phtml encoder from rssoftlabs.com, The encoded file is not working as desired, please find the code below: <?php if(!function_exists("phtmldec")) {$w=(substr(PHP_OS,0,3)=="WIN")?1:0;$ln="phtmlenc".phpversion();$cd=dirname(__FILE__);if($w){$ln=$ln.".dll";if($cd[1]=...

0
Q: Splitting HTML content into translatable chunks

SamI am using the Google translate API to content, there are cases where the length of this content exceeds the limit Google imposes on the API calls. Any one know the best way to split the content so that multiple requests could be used instead? I'm concious that I don't want to break the html or ...

-5
Q: PHP photo upload like picasa

al404Hi i need to do a web interface to let people upload large photo, about 8Mb each, what i'm searching for is a way or a script that upload it like picasa Drag and Drop would be the best solution but is not required Would it be better opening an FTP connection to server?

0
Q: Put input box in circle of arborjs

GBDI am creating Mind Map Search through http://arborjs.org/ I have implemented following so far. http://nooshu.com/explore/arbor-visual-thesaurus/ Problem Now, I want to put search input box into circle of each entity. I have gone through documentation provided by http://arborjs.org/ but t...

1
Q: Send a Copy of email to Sender PHP contact script

BlackCoderi am using the below PHP Script to get emails to my from my contact form. i want to send a copy of the same email to the sender email also. how can i do that... can some one add some lines to my script to do that.. can i separate multiple emails in $emailTo like $emailTo = 'owner@website.com, $e...

0
Q: Add Silex Application to Symfony2

TokytokHy, I would like to extend Silex Application in a Symfony bundle. So I add my silex application in the composer of my Symfony2 website. The silex application is in the vendor, but how can I add it in appKernel of my Symfony ? The Silex application don't have "bundle name", and I need it to do...

0
Q: appending an element multiple times in DOMDOCUMENT

carver3Is there a way to use repeated child elements in DOMDOCUMENT in PHP? In my case, the Billing and Shipping information will always be the same. For example: $fullname = "John Doe"; $xml = new DOMDocument(); $xml_billing = $xml->createElement("Billing"); $xml_shipping = $xml->createElement("Ship...

1
Q: PHP proc_open multiple input

user985409I want to start a CLIPS process using proc_open function in order to interact with a CLIPS script. So if i set it like this: $descriptorspec = array( 0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array('pipe', 'r') // 2 is STDERR for process ); $process = proc_open('./clips ...

0
Q: Failed to connect to Recurly

nielsvI want to use recurly for billing. I just have a very simple example like this for testing in my indexController: public function init() { require_once APPLICATION_PATH . '/../library/Recurly/recurly.php'; Recurly_Client::$apiKey = Zend_Registry::get('config')->get('recurly')->get('apike...

0
Q: Join 2 other tables and 2 on conditions within those joined tables

user2823610$result = mysql_query("SELECT DISTINCT subscriberMaster.id, subscriberMaster.locationCodeID, subscriberMaster.firstName, subscriberMaster.lastName, subscriberMaster.company, subscriberMaster.address, subscriberMaster.address2, subscriberMaster.city, subscriberMaster.province, subscriberMaster.pos...

0
Q: Matching sets of tags in PHP with Regular Expression

KF4I am currently working on protecting my AJAX Chat against exploits by checking all text in PHP before it is passed to the client. So far I have been successful with my mission except for one part where I require to match sets of image tags. Overall I wish to have it pick up any instance of there...

0
Q: Protect htdocs directory

Diegote92I have a web application wrote in php , working with Apache in a Linux server, the problem is that this server can be access by many users, what I want to do is , restrict the htdocs folders without broke the permissions that need Apache in order to display the web application. My idea is somethi...

0
Q: zend framework2 how does the autoload function work

Roberson Youngrecently I was learning zend framework 2, and there's a problem annoying me for a long time, things look like this: <?php namespace Album\Model; // Add these import statements use Zend\InputFilter\InputFilter; use Zend\InputFilter\InputFilterAwareInterface; use Zend\InputFilter\InputFilterInter...

0
Q: Searching MySQL like keywords should return 1 result but returns false

crmI am trying to display 3 event names that are similar to this event name. Currently build this code returns FALSE and I cant see why: calling(no problem here that I can see): // get 3 similar events (by name) $nameArray = explode(" ", strtolower($name)); var_dump($similarEvents = $event-

-1
Q: Open webpages in iframe with different IP?

Ashish RevarI need to open many webpages in continuous timely interval, but each time with different IP. I am having list of many like... 183.89.108.17:3128 78.93.73.182:8080 218.92.252.21:8080 These are proxies with port numbers. How can I create a script that loads my hundreds of webpages with two minute...

0
Q: Blobs don't always appear, - refresh issue

Andrew WebbBlob sometimes shows... I have a small gallery using blobs, however sometimes the image shows; and sometimes they don't... (Just keep refreshing and you'll know what I mean) http://courtlandshouse.co.uk/test.php Code for displaying the blobs... include('../connect.php'); $imS = "SELECT id,...

0
Q: connecting to data base send only one word iOS

WildWorldI want to send some string text data from my iphone to the server. I am using a php file on my server. The php works fine if i use it on the webpage but only sends one word if there are 2 words nothing will be send like the connection does not exist. PHP: if (isset ($_GET["vic"])) ...

0
Q: Kohana ORM fetch posts from multiple categories

AvisionI'm using Kohana 3.3 ORM. I have the following models defined: class Model_Post extends ORM { protected $_primary_key = 'ObjID'; protected $_has_many = array( 'categories' => array( 'model' => 'Category', 'through' => 'posts2categories', 'f...

-3
Q: how browser can know the hidden parameters using htaccess in the urls

srinuWhen using the htaccess file some parameters are hidden(using rewrite rules), in this situation But the browser will know the ids and it show the particular result. Example: http://visakhpatnam.olx.in/houses-apartments-for-rent-cat-363 in the above url there is no ids or any parameters, but it ...

0
Q: Phalanger in ASP.NET Web forms

fredefoxI am trying to embed a php-script in my web-site written in the ASP.NET Web Forms framework. I'm developing the site using Visual Studio 2012 and have installed the extensions PHP Tools and Phalanger. I can run PHP scripts if I create a new project with the PHP Web Project template, but seeing ...

0
Q: In PHP, I'm trying to export Chinese and Japanese characters from MySQL table to Excel

Tony LazzoHere's the issue: The Chinese and Japanese characters are in MySQL as HTML codes e.g. &#20122; I would like to export them to an excel file but convert them back to their original characters before writing them to the excel file. E.G. 亚 How do I go about doing this?

0
Q: How can I search from two fields in a select2 dropdown

Lee ChetwyndI have just started using select2 and it is working fine when I fill the selections up with two fields using: function formatemp(item) { return item.empnum + " : " + item.empname; } $("#empsDropDown").select2({ data:{ results: <?PHP echo json_encode($employees);?>, text: 'empname'}, ...

-2
Q: Extract marks of a person to store in the database

manoj P</td> < /tr></table> </p> <div style="margin-left:30px"> <p align='center'><table><tr bgcolor='#FFFDE5' align='center'><td>PREVIOUS SEM RESULTS </td><td><font color=#cc0000'><a href='get_res.php?usn=1rn11ec123&sem=1'>1 sem</a> <a href='get_res.php?usn=1rn11ec123&sem=2'>2 sem</a> <a href=...

-2
Q: Fetch data from database into a php array

SuspiciusI've created an array of categories in php like this: $cats=array("Coffee", "Beverages", "Drinks", "Snacks/Desserts"); But I want to make it like dynamic. Let's say when I update my database via my website (delete-change name-add a new category), I need this array to follow those updates. Is ...

0
Q: jQuery and ajax to post into a php page, also some validations

Mo CastañedaI'm new to jQuery and Ajax, doing some stuff and I got stuck on this. my interactUI.js $(function () { $('.error').hide(); $('.careersAddSubmit').click(function () { // validate and process form here $('.error').hide(); var careersAddPosition = $("input#careersAddPosition").val(); ...

0
Q: PHP and Memcache - Session not work

Diego Caldas PiresI'm facing some problems using PHP + Memcached to handle sessions in separate servers. In fact, even on the same server. In PHP im using pecl extension memcache. Not mecached. My php.ini settings memcache.hash_strategy = consistent session.save_handler = memcache session.save_path = "tcp://10....

1
Q: How do I determine how many times a gif loops using PHP

HelloPabloI'd like to know [if there is] a simple way to find out how many times an animated gif loops, using PHP. As far as I can tell this information is encoded into the header of the gif binary (after a string which is something like "NETSCAPE2.0", for what it's worth), but I've no idea how to read th...

0
Q: How do I add an element into the genesis_do_nav?

user2823684I am just starting out and have limited PHP knowledge, but I am trying to learn as fast as I can. I am working with the Genesis framework and designing a site for someone. I moved my navigation to the top of the page using remove_action & add_action. So now the genesis_do_nav loads on the genesis...

0
Q: PHP crypt() returning wrong result

Boulevard$first = '!Password1'; $second = '!Passwor'; $password_salt = "311ca5f0-08ac-0131-ca44-42d9c34959f9"; echo crypt($first,$password_salt); echo crypt($second,$password_salt); //Result: 31T5JJcAI4fZg 31T5JJcAI4fZg Can anyone explain me about this ? Sorry for my bad English.

1
Q: CakePHP: unable to change file name when using $this->response->file()

EmersonWe're sending a zip file download as a response like this: $this->response->file( "/export/stuff.zip", array('downlaod'=>true, 'name'=>"stuff.zip") ); return $this->response; This works fine, BUT the file is always named export.zip. Our name option does not seem to have any effect. We'...

0
Q: socket connection fails in php script while it works in terminal

Vladimir HrabanThat is the script I have <?php $timeout =- 10; $target = "tls://testbed-epp.nominet.org.uk:700"; $result = stream_socket_client($target, $errno, $errstr, 30, STREAM_CLIENT_CONNECT); if ($result === False) { throw new Exception("Error connecting to $target: $errstr (code...

0
Q: CakePHP - Errorhandling form in seperate view element

BibtexJust starting out playing with CakePHP so please bear with me if this is an easy question. I'm using CakePHP 2.4.0 and I want to reuse a specific form in multiple views. Therefore, I add this form to an view-element and include this element in each view. This is the element.ctp file: <?php ec...

0
Q: Combining two Xpaths into one loop?

Ryan TravisI'm using xpath to grab information from a document, the only issue is I havn't been able to combine them into 1 for loop so the information displays correctly on the page. My code is http://pastie.org/8360106 I need to combine the MarketRent and MarketingNAme information together as opposed t...

0
Q: Is there a way to know if a Facebook user liked my Fanpage without having them to authorize my Tab App?

Sven FingerI know that Facebook sends a Signed Request via $_POST for the first time when a user visits a Tab App on Facebook. When visiting the App directly (e.g. mobile) i don't get $_POST data from Facebook, of course. I thought, that this is no problem so far. So i embedded a Like-Button and implement...

0
Q: Mysql with where condition and between dates with inner join

user2823712I have the following query which works fine, but I want to add between dates, which I cannot get to work. SELECT user.user_id, user.s_name, user.f_name, user.year, it_club.date, it_club.room, it_club.period, it_club.id, COUNT( it_club.user_id ) as uvisits FROM it_club INNER JOIN user ON u...

0
Q: Call a php function with a name that's partially a variable

jakubplusI'd like to ask you a simple question, I have a class with functions called: somethingModule() someotherthingModule() otherthingsModule() How can I call these functions based on a pattern? I mean something like: $call = $class->{$modulename}Module($params);

0
Q: What is the best way to execute a .php file from android many times in background?

Marco SeizWhat is the best way to execute a .php file from android in the background? I need that for refreshing the user activity time in a mysql database. So if the user clicks on a button a new entry should be done in the db with his last active datatime. Should I use an asynctask for it like that? pr...

0
Q: Dynamic dropdown form breaks when enabling last JS function

ZZZZZZZZZZI'm desiging a dynamic dropdown form that will help my customers choose the right product for them and was looking to test the function to output the final results. When I add the JS function to take the info from the last dropdown and use it to build the results list the whole script seems to br...

-2
Q: php ORDER BY date doesn't seem to work

user2816376I want to display only the books whose discount is current. Dealstart and Dealend represent the window. But I'm messing something up. $sqlCommand = "SELECT id,bookcover FROM booklist WHERE category1='$bookid' OR category2='$bookid' OR category3='$bookid' AND dealstart >= CURDATE() AND dealend is >...

0
Q: PHP Query comes back as 'Array' instead of a name from database

ThovexMy PHP query: $name = $wpdb->get_results("SELECT appname FROM $table_db_name WHERE ID = '$ID' ", OBJECT); Every of these values are correct and when I query it to myself in the database it returns me an array with 1 option. When I want to echo $name somewhere its result is: 'Array'. While in t...

-1
Q: Use two arrays to get variable and value ($key = $value) in PHP

Chris$cfields = array_filter(explode(",", get_option('CComment_fields'))); $Ctlds = array_filter(explode(",", get_option('Ctlds'))); Sorry, I know this is a mess. Basically I end up with two arrays: $cVal $Ctlds The arrays: $Cval = Array ( [0] => Fun Co [1] => 555-555-5555 [2] => test@test.com ...

0
Q: Send POST data on redirect with Javascript/jQuery to a top level iframe?

Andy PlattThis question refers to: Send POST data on redirect with Javascript/jQuery? The solution for the problem was to generate a hidden form which is then submitted to handle the POST + redirect - however I will be generating the page in an iframe and redirecting the parent frame - is this possible w...

-1
Q: MySQL/PHP Adding "." periods to returned Data

luskboI have a MySQL database with a few hundred records. All fields are ser to varchar(255) allow Null. Charecter Set is utf8. Collation is utf8_general_ci Data is mixed. Some is just text, some fields are number such as phone numbers with scattered hyphens. The data in the database looks fine. I c...

0
Q: Amazon MWS - PHP - Generate Product Feeds for all categories on all sites

LeeTeeAfter reading the majority of the Amazon MWS documentation, downloading the PHP Client Library and completing each point in the "Quick Start" section, I am totally at a loss to know where to start with my project. I need to create product feeds on the fly that can be uploaded to clients Amazon ...

-2
Q: What's wrong with this php function?

NRovECan you please review this php function below ? I'll appreciate it. Please let me know what's wrong on it. Also, else around CURRENTUSER doesn't work. I'll really appreciate it. function doProcessNationTransfer() { if (!isset($_POST['submit...

0
Q: Persist an entity and relate it to another entity without persiting the second again

patrykI am building a front-end app with Durandal/Knockoutjs and a web service back-end with Symfony2 and I use Doctrine to access the database. I have two entities that are in association of one-to-many, like this use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity * @ORM\Table(name = "drew_cat...

0
Q: redirection after uploading a file in php through Android app

user2302301I am trying to send an sms to the phone after uploading a file to the server using android application. When I invoke the php script on server side through browser, it works. But when it is invoked through the Android app, I get no results, no error logs either. I've tried using both header() of...

0
Q: SMTP server dynamic sender

Matic PusnikI am using Mandrill SMTP server and always the "sender" is my mail which I added in Mandrill. I want that the "From" mail would be dynamically set for the user who sends the message, so the receiver could respond directly to them. They cannot send the message if they are not logged in (Wordpress...

0
Q: How to unserialize a serialized data from DB - WordPress

sunHi i tried maybe_serialize and maybe_unserialize for storing multiple option of an plugin.before that i tried simply(without storing the data in DB).Here is the code $data=array('hello','hai'); maybe_serialize($data); $uns=maybe_unserialize($data); foreach($uns as $s){ echo $s; } This is ...

0
Q: How to implement autocomplete functionality using PHP, jQuery and AJAX in following scenario?

JSLoverI'm using PHP, Smarty, MySQL, jQuery and AJAX for my website. Now the scenario is as follows: There are three fields present on my form. The code for these three fields from smarty template is as follows: <label>Class</label> <div class="form-element"> <select n...

0
Q: Find after initials in cakephp

Dan Ovidiu BoncutHow should a specific find function should look in cakephp? I have this criterias: I want to search by a given code that is formed of 2 letters and 5 numbers. Those 2 letter are the initials of the first two words in a field and the numbers are meant to match a field. For example I have the cod...

0
Q: shorten url with letter and number meela v2

hogwarts.vnI'm using Meela Shorten Url Code V2. There are some problem that link after shorten are only number. I want shortened link with number, uppercase and lowercase letter. Please help me solve it. Full code you can download at http://www.4shared.com/rar/rpcl4L_R/MeeLa_V2_Release.htm Demo here: htt...

0
Q: DOC_ROOT cant locate file

stylojack_10I am not really sure how to explain this but in the below code, the Doc_Root is unable to locate the controller (or the file needed). Can someone help me? I dont even know what additional info may be needed. (I am new to PHP.) The actual problem is, no matter what link is clicked, everytime the d...

0
Q: Use MSSQL stored procedure with parameters in Laravel 4

LarsFor a project we are using a MSSQL database. I want to use Laravel 4 to access a stored procedure in the database. I manage to do this in the following way: $pdo = DB::connection()->getPdo(); $stmt = $pdo ->prepare('getArticles'); $stmt->execute(); But if the stored procedure expects parameter...

0
Q: str_replace() doesn't replace needle in a Chinese string

Mad MaxI have a few languages in my site but the code below doesn't work for Chinese language. Every other text appear on the screen so there no problem with output. I wonder if str_replace() becomes allergic to %s when used in Chinese texts! Only replacing %s doesn't work. Note: %(any char doesn't mat...

-1
Q: How do i allow users to input data into online database

user2812509I am building a website which allow for learning a new language. I am doing this by creating a database and linking to it using php code and phpmyadmin. However if i want a user to input say a new word and its meaning into the database how do i do that? What is the code required? Also i dont wan...

0
Q: Php pagination link not showing on last page

user2620338I have a pagination script which works. The first page has a 'next' link, the last page should have a 'previous' link and the ones in between have both. The problem is that the last page doesnt show it 'previous' link. Heres the code include '../inc/connect.php'; //paganation settings $per_page...

0
Q: Passing a variable to a lambda-function

ARISTARHHow to pass a variable "$field" to a lambda-function? function implode_assoc_array($array, $field) { // $ids = array_column($array, $field); PHP 5.5! $ids = array_map(function($item) { return $item[$field]; }, $array); return implode(', ', $ids); } implode_assoc_array($my_multidimen...

0
Q: How do I successfully use jQuery Ajax load and keep multiple javascripts working in jQuery Mobile?

om123I am having difficulties with keeping the external javascripts working in the original index.php, when one of the external javascript files (consisting of a jQuery Mobile Slider widget) is executed and a php file is loaded into a div in index.php. As a specific example, the popups are not workin...

0
Q: JSON.parse: unexpected character - what character am I missing?

user2672744Environment: PHP 5.3.5 MySQL Server 5.5.8 Using Ajax to auto-populate a dropdown list of countries. I keep getting this error and I have tried numerous things. Such as surround the $results with "'$results'" before encoding. The error still persists. Here is the an example of output: array(1)...

0
Q: Show div if session is set

MichaelI have a bit of a problem on my site, if the session is set I want the page to show the info, if not show the other div where it says "no user found" here is my code. I dont know why it dose not work. I can start the session(that's not the problem) but it show's the same div no matter what... <?...

-1
Q: multidimensional array to create unique array in php

sandyi have multidimensional array in php i want to make it unique and i try 'array_unique' for this but it is not working, i want to remove the duplicate data from the array Array ( [2] => Array ( [account_id] => 176 [entered] => 1380288044 ) [1] => Array ( [acco...

0
Q: Loading PHP Libraries and Using Classes using Drupal Libraries module

kilrizzyI'm trying to wrap my head around using the Drupal Libraries module in order to load PHPGoogleMaps library. I've worked my way to creating the configuration and loading the library into my module. I guess my main problem gets to using the libraries classes now. I'm sure there is a different way I...

0
Q: Output of strings has <br> in them

user2816376$bookCategories = array("19"=>'Romance', "18"=>'Thriller', "20"=>'Science Fiction', "21"=>'Horror', "22"=>'Fantasy', "23"=>'Childrens'); $bookcategory1 = $bookCategories[$category1]; $bookcategory2 = $bookCategories[$category2]; $bookcategory3 = $bookCategories[$category...

0
Q: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in

crmWhen using 2 or more words this search method works fine. But if there is only one word it gives the error: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in. var_dump of $stmt gives: object(PDOStatement)#5 (1) { ["queryString"]=> string(11...

-1
Q: How to use a backup db connection using PHP/Mysql

user1026605I have a function that handles my db connection. In casse my main DB isn't available I want to use a backup one. I tried to do so using below code but it's not working... $host = 'xxx'; $database = 'xxx'; $login = 'xxx'; $pass = 'xxx'; if (! mysql_connect( $host, $login, $pass ) ) { // try ...

0
Q: Toggl Reporting API with PHP cURL

SarahI am trying to access the Toggl Reporting API. I tried following in PHP with cURL, which connects to the API but gives the following error message: 'This method may not be used.' Any light on why this is the case would be useful as I'm very new to webservices. I may be missing something obvious...

 
00:00 - 15:0015:00 - 00:00

« first day (220 days earlier)      last day (90 days later) »