« first day (268 days earlier)      last day (42 days later) » 

12:01 AM
0
Q: htaccess redirects not working in relative paths

user1532587I'm trying to make a redirection from all files to a template file. But redirects only works when I specify an URL For example: Does not work (it does not redirects) Options -Indexes RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule (.*) /temp...

0
Q: What is the best way to add quotes in array and pass it to mysql database

Georg Kirschsteini always get warning mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in.... i guess its because there are no single quotes around the array items. how would i do this? any suggestions to make this code better/smarter/safer(sql injection) and mainly working? i'm new wi...

0
Q: Sql Queries in a foreach slows down the page

HighstrikeI have a problem where I get an array of words and I have to insert every one of them in DB via a foreach, but the whole thing is running too slow. foreach($words as $word) { // even more checks if(strlen($word) < 3) continue; $word = $this->db->escapeString(strtolower($word)); ...

0
Q: Symfony2 edit form for gedmo uploadable as embedded form prevent overwriting with empty path

ahmet2106I just created a Report and an Image Entity to work together like a Blogging System. Image uses Gedmo\Uploadable. My ReportType has an add like: $builder ... ->add('image_cover', new ImageType(), array('required' => false)) ... the ImageType has two adds like: $builder ->add('name') ->

0
Q: Can't wrap my head around Global arrays

user2981166I asked about this last night but the answers told me to research global arrays. After spending an entire day trying to solve this I have sacrificed my man card and I'm now seeking help. I have 3 files that work together to echo a variable $body. The 3 files are login.php, global.php, and theme.p...

0
Q: Using curl, how can i call a php class and a function inside the class from a form i have on another website (different server)

cooksite1 has the php function and site 2 has a form, both sites are on different servers. What's the most concise way to accomplish this task? The form on site 2 is a very simple login with "email" and "password". The php class on site 1 is called Shopper and i need to run the login method inside ...

1
Q: How to return file(s) with web service in PHP

Aaron ChenI'm developing a web service which returns a file for clients request. How can I attach the file in the returned XML file or any other ways? The client is not web based so I can't simply write any javascript to handle that. The web service was written in PHP. Any concepts or sample code would be ...

0
Q: Querying Database Infomation using PHP

user2977339I am working on a project in which I need to query 3 tables within a php document. I am querying a userTable in which I am also querying a School Names, Security Questions and Security answers based on their ID's in separate tables. The three tables are userTable, schoolTable, and securityQuestio...

0
Q: Submit one array for each selected checkbox

TiagoOliveiraI'm new to php and I'm building a form in which I need to send a pair of values when the user checks a checkbox. Currently I have the following code (in the form page)... $value = array('title' => $title, 'year' => $year); echo("<input type=\"checkbox\" name=\"options[]\" value=\"$value\"/>); ...

0
Q: Using Drupal AJAX with Drupal Messages

alexjewellI have a custom module right now in order to text AJAX functionality with Drupal Messages. The module has the following code (test_error.module): <?php function test_error_user_view_alter(&$build) { //_assassinations_player_profile($build); } function test_error_form_alter(&$form, &$form_...

0
Q: {if isset issue on Smarty

user2989327I'm pretty new on PHP and Smarty. How can I write this: If the user write their email a div will appears to say that they do it well. If not a different div should appears. Maybe is something like this: {if isset($profile->email)} <div class="1">YES</div> {else} <div class="2">NO</div> {/if}

0
Q: CI-Bonfire Nested LIKE query

user2342263I could need a little help in nesting a like query. My goal is to accomplish something like followed: Select * from 'Library_Book' WHERE( ('BookName' LIKE '%FILTER1%' OR 'BookDescription' LIKE '%FILTER1%') AND ('BookName' LIKE '%FILTER2%' OR 'BookDescription' LIKE '%FILTER2%') ) My a...

 
12:49 AM
0
Q: How to retrieve data in put_file_contents in PHP?

Rochelle CanaleI am having a trouble with my code. My goal is to write a data in txt file and retrieve that data. In writing data I used an array. And I added the FILE_APPEND parameter for rewriting the text file. After I write the data into the text file I serialize it first. Then after writing the data I retr...

0
Q: Couldnt use $_GET value

G3MBefore that, I searched around for problem same as me, but not found any.. I got a url http://mywebsite/rpc.php?stat=22 then, I have this code: if(isset($_GET['stat'])){ $id = preg_replace("/[^0-9]/", "", $_GET['stat']); $result = $rpc->get($id); print_r($result); } this code will print arra...

0
Q: Spotify player button doesn't play

Stack OneThe spotify player button doesn't play when I click on the play button , instead it redirects me to the spotify site even though the documention was intended to make it play when it's on your website ... Here's the documentation https://developer.spotify.com/technologies/widgets/spotify-play-butt...

0
Q: .htaccess redirect to URL when match on certain file

Leandro GarciaUnder my root web directory, I have this two files: aboutus.php about-us.php Now going to this URL http://local.com/about-us.php will render the file about-us.php. If I will do the inverse, how can I dictate the .htaccess that whenever the URL above is access, the aboutus.php will be rendered?

0
Q: Searching a Grid of Tiles With MySQL and PHP

MorslaminaI have a series of rows in MySQL with a 'location' column, which represents the location of an object on a two dimensional xy grid. I want to search the table for rows with a location which is within a given distance of a certain tiles. For example, if I ran a search within 10 tiles of [34,56]...

0
Q: PoEdit don't parse string in PHP comments

SequenceDigitale.comIn POEDIT, It seems that the code analyser removes any PHP comments before parsing the code. This means that any translation that are not found in a PHP comment (// or #) or Documentation Block ( /* */) are skipped. Is there any solution to includes them and make it detectable? Here is an exa...

0
Q: PayPal PHP SDK REST API Response not JSON

bbbbbbbbbbI get an object with nested arrays of nested objects when I make an API call. In the SDK I have the header set to accept: application/json. I am wondering why I am getting objects and arrays back? Here is a partial part of the response: PayPal\Api\CreditCard Object ( [_propMap:PayPal\Comm...

0
Q: Phone numbers in php

user2946880ok I have a website and it gathers user information. the registry form asks for a phone number or email. When the user inpurs thier email as a $_POST variable.I need the number to be scanned and return the URL for their carriers website. It looks something like this : `if(isset($_POST['tel'])) ...

0
Q: Connect to the Log in page via another project

SaraWe have two projects A,B.(B is an authenticated project) A updates some information of B. For any change, we need to make it manually in B. We are looking for a way to do the B changes automatically from A. We are not able to change any code in B project. I suppose we can send the URL, username...

-1
Q: Load different pages at different times PHP

user2990068I want to create a php statement that switches the "video.html" to different html files after a number of seconds, but i don't want to load a new page, just have that "video.html" section change. EXAMPLE - On first load "video.html", after 10 seconds "video1.html", after another 40 seconds "vid...

0
Q: Wordpress - remove #! characters from URL

AlexPThe question seems to be easy but after 3 days of searches I gave up. I thought that I will find it here and it seems to have similar ones but it doesn't work for this stuff. Currently I have a customer that has a really advanced marketing based on his previos JS/AJAX driven website. All the bac...

0
Q: client_id in Bitstamp's API

parkIn Bitstamp's API documentation, a client_id is mentioned. It is used to generate a signature. https://www.bitstamp.net/api/ But I couldn't find how I can get that client_id. Any hint on that? Many thanks.

 
1:26 AM
0
Q: Roll MySql queries into next column using php.

Blake MitchelI am creating a monitor display that needs to be able to display 16 numbers at a time. 8 in one table and 8 in the next table. Right now I have to tables that just keep going down the rows based on the number of entries I have in my MySql data base. What I need is for 2 columns in each table (4 n...

-1
Q: PHP Search JSON File

FrostyGamer150So far I have this: <?php $obj = json_decode(file_get_contents("URLTOJSONFILEHERE"), true); $termStr = "WORD TO SEARCHHERE"; $terms = explode(" ", $termStr); $results = array_filter($obj, function ($x) use ($terms){ foreach($terms as $term){ if (stripos($x["label"], $term) || ...

0
Q: Is strlen() safe from injection?

Edward YuIs it safe to run strlen() on user input from a HTML form? Or are there ways to break out of the function and inject unwanted code.

0
Q: How can I prevent my error messages from disappearing?

user2981347How can I prevent my error messages from disappearing? My error messages appear on my page and then after a few seconds they disappear, is there a php way to prevent it from happening? I have tried different " $ERRORs " ways of writing the code but the errors keep on diapering after page refresh....

-1
Q: Why is the first image off to the right in this Slideshow?

user2278110http://jackphillips.comxa.com/portfolio.php When you first load the page the slideshow goes off to the right side of the page. It then corrects itself after it transitions.

0
Q: Doing multiple actions based on url segments

Ricky MasonIn my web app, the user can enter a few different URLs. It uses ajax but can also be loaded by entering the url manually (Assuming they want to favorite the page or something). The URLs they can enter are as follows: (controller/:id/:notsavedkeyword) (controller/:id/:savedkeyword) (controlle...

0
Q: ajax add to cart module don't update shopping cart until page refresh

adit covhi I am using ajax add to cart module, after I click add to cart, pop up appear that my item has been add to cart, but my cart doesn't update until I refresh the page. here is my cartcontroller.php code class AW_Ajaxcartpro_CartController extends Mage_Core_Controller_Front_Action { public fun...

0
Q: How can you insert a .pdf into a mySql database using php

user2297613I am trying to insert a pdf file into my database, using php. I know that is typically not good practice, but I need to none the less. So here is the schema for the table I am trying to insert the pdf into: create table manager_certificate( manager_id int, certificate_id int, ce...

0
Q: Update Multiple Rows in one PHP

thelincsterI have three rows with three columns in one table id type value 1 gold 1000.00 2 silver 32.21 3 platinum 1500.00 I have a form on my page with three inputs to fill in the updated values and am using ajax to send those values to update_values.php The code below...

1
Q: Changing parsed arguments ($argv) for native getopt in PHP

FilouI have two PHP scripts for command line use: standalone.php: a standalone script using the native getopt() function. shell-loop.php: a shell-like interface that repeatedly reads a line, exits if necessary, otherwise passes the input with some additions defined in this 'shell'-environment to the...

0
Q: Refresh page after only one click on submit

freddySo I have the code bellow. My problem, is that to make the «vous êtes amis» message appear, the user have to click twice on the submit button. But I want to make the user click only once on the submit button. Thanks! <?php $checkcontact = mysql_query("SELECT * FROM contacts WHERE I...

0
Q: Googlecharts - Plotting existing PHP arrays with googlecharts

GustavoxDI'm in doubt about something with google charts, when i use addRows command, is it enough that my php variable be in the required format? I'll put the code i'm working with: <!--Load the AJAX API--> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/...

0
Q: Relaying $_POST, adding authentication to external page without cURL

RogueI am attempting to relay a form to an external site for it to be handled and sorted into a database, but I need to add Basic Authentication to the HTTP header. I do not know much about HTTP headers and have attempted to do so, but I'm confused about how to add the $_POST payload and whether or no...

0
Q: Create or insert an xml into a CDATA

PonceI have been testing something but I can not make it work, here is the problem: I have an xml: <?xml version="1.0" encoding="UTF-8"?> <history> <name> <age/> </name> </history> I would like to insert a CDATA in that XML and the content of the CDATA is part of the xml as well, s...

0
Q: Confused about use of dirname and rtrim - PHP code (OpenCart)

pablofiumaraI am trying to understand some piece of code. define('HTTP_OPENCART', 'http://' . $_SERVER['HTTP_HOST'] . rtrim(rtrim(dirname($_SERVER['SCRIPT_NAME']), 'install'), '/.\\'). '/'); What I am unable to understand is: A) rtrim: According to PHP manual, rtrim function should only receive two param...

0
Q: Error messages set up as different

user2981347How would you set an error message in different way. Here is the code: $error_message .= 'Invalid email'; Although I know its not set completely right it can be translated to this code. Here is the code: $error_message = error_message; How can I display my error message in this fashion? H...

0
Q: URL REWRITE is navigating to /directory_name/<param> instead of /file/<param>

Mike DiMuroI've recently started dabbling in MOD_REWRITE to make cleaner URLs for my websites. Most of my URLS work except for when I try to add the file name before the parameter within the URL. For example: I am trying to make my URL read http://www.kickstartforex.com/strategy/name-of-strategy and the U...

0
Q: PHP Shopping Basket Issue

Nquilty1801I'm currently trying to implement a shopping basket function to my personal website but seem to be struggling. I have added the link from my products page and that is passing the 'ID' information over as it should however whenever I add a product to my basket and it takes me to my shopping basket...

0
Q: DateTime and business days

user2988034I've looked around and cant find a very elegant solution for this. If I have a timestamp, is there an elegant way to add a X number of business days to it? I've found solutions that calculate business days between two dates and some implementations in C++ and C# but nothing exactly like this for ...

0
Q: How to assign class based on if Drupal region is used?

ScriptsConnectIn a Drupal 7 theme, how do I assign a class name to a region if it is used or not? I need three conditions for the region in question for my Drupal theme. There are three content regions: sidebar_first, content and sidebar_second. The code for it is below: <?php if ($page['s...

0
Q: Get values from for loop in controller-model (php)

smarcI use yii framework but I have a php problem here. I struggle to get datas from a loop which begins in my controller, continues in my model and ends in my controller. Here is my code : adminController.php public function actionAdmin() { ////code generated by gii//// ...

0
Q: Log out on browser close

PadraigI have a PHP site with a login. Once the person is logged in (using standard file based sessions), the person can click a log out page that will log him out. Problem is - visitors generally don't do that. They simply close the web browser. However, the next person can come along, open the brow...

0
Q: How to Proxy Requests from JavaScript to API (Search Results based on 3 APIS)

1977I am seeking to create a search bar that basically mashes up results from 3 already present search bars; APIS. EG. Last Fm Events. After some trial and error with some hard coding.. I am told that: To use the API on a public website with a different domain as the API your site has to proxy ...

0
Q: Compare groups of arrays, not single arrays

Jack SniperI'm building an automatic dropship email system for my oscommerce store. The following code pulls both the drop ship id of each product purchased by a user, and the whole list of drop shipper id's. Once both are pulled, the users products are grouped and organized into arrays within an array by e...

0
Q: How do I get user-inputted information from the website directly to my e-mail?

user2967568So I've decided to make a website a few months ago and have then picked up basic HTML, CSS, Javascript and Jquery. Now I want to do two things with my website, show a user-voted poll somewhere on my website that will update live as the users vote on different optinos. A form on my website that ...

0
Q: How to insert select query output to another table which is in different server

user2990087How to insert select query output to another table which is in different server I have developed following code to get string output link id, name, address, age. but How can I insert this multiple data set in to INSERT query. Coding: if(isset($checktable1)){ $db1_name = $_SESSION['db1name_...

0
Q: php function not returning string and how to remove line breaks

JoshuaTwo issues with the below php function. One problem with the below function is the function echoes the $boo and $boo2 variables where the function is (i.e. before 1 and 2 is echoed). I'm unsure how to return the variables without prematurely ending the function with 'return'. The $boo variables...

0
Q: Passing multiple values with jQuery

Jess McKenzieI have a couple of inputs that have a different data-id. The data-id's are 'single' and 'multi'. I somehow need to get the data-id for item_single and item_multipule in such a way that I can pass them into my db field called shop_shipping_rule_type How would I do this? Below is an example of...

0
Q: unexpected T_STRING for "true"

Michelle CantinI get this when I load the page: Parse error: syntax error, unexpected T_STRING The line they are talking about is "true". I tried putting in single quotes and double quotes. function tcx_customizer_live_preview() { wp_enqueue_script( 'tcx-theme-customizer', ...

-1
Q: An Open source ecommerce solution

user1945763I come here to ask for some help. I'm planning to create an online store for digital content sale. It's a small Digital Distribution Platform. Like Steam, Desura, etc. I tried Magento, OpenCart, Prestashop, etc. But find no fits my needs very well. Could you genius guys give me some suggestions? ...

0
Q: JSON and Highcharts

AnfucaI'm recently new using JSON and i´m not able to draw any kind of charts from Highcharts. Since last Friday i'm reading and reading over the internet, i'm learning a lot, for sure, but right now i'm desperate. I just want a simple bar and a pie! From my php file, Json_encode prints something this...

0
Q: how to access & process youtube video file for face detection via youtube API V3

Chandra Shekhar SenguptaI am developing a YouTube App using google-api-php-client library & youtube API V3. I want to detect faces present in the video and do further processing.. i could list down the videos and access related information, but not able to access raw video file. how to access & process youtube video ...

0
Q: Refactoring: Simple regex

fabiolLets say I have the following: $string = 'New+York-NY and where + is I want a \s and where - is I want ', '. The formatted string would appear as New York, NY. Here is my code: $string = 'New+York-NY'; $formattedLocation = preg_replace('/[+]/', ' ', $location); $formattedLocati...

0
Q: Retrieving user posts

nCorehow can I pull all the posts of a certain user? should i foreach all the posts of a certain user? Like if user1 posted something and I want to pull out whatever he posted and only shows when he's logged in.

0
Q: Need general assistance with debugging an evasive PHP/ZF bug

Chris BarnhillI've been upgrading a game I wrote for Facebook. The game is written in Zend Framework (PHP) and jquery/AJAX. After my latest modifications, I tested the game and it crashed. I could not find an error in the backend log and nothing was showing in Chrome's console. I used trial/error to find the l...

0
Q: MySQL Triggers using phpmyadmin

user2990266I'm trying to write a very simple trigger for MySQL using phpmyadmin 4.0.8, what I want to do, is after a table called 'upload' is inserted into, I take the username, and id and put it into a second table called 'rating' This is what I'm trying, CREATE TRIGGER copy_pid AFTER INSERT on upload ...

0
Q: conversion between multiple timezones dynamically

rosemaryI have a simple site under development where users can question & answer. The problem that I face is that there are users from many timezones across the globe who might be posting where their respective time will be displayed as well.Someone is posting from Asia/Calcutta,someone else from America...

0
Q: Magento Cart Template Update Not work when first visit a page

user2742536I want to override the exist cart template since I add some module in it. I use the XML below to update the layout. <checkout_cart_index> <reference name="checkout.cart"> <action method="setCartTemplate"> <value>magefd/shipandpay/checkout/cart.phtml</value> </action>

0
Q: CODEIGNITER cart strange behaviour

mabbsi'm a bit confused about the cart class of codeigniter. $this->cart->total_items(); supposedly return the number of items that i have added to the cart. but mine is different. seems like it returns the quantity of items that i have added to the cart. i.e if i add 5 of item A. $this->cart->tota...

0
Q: CakePHP First postLink() doesn't create form

user2990303Using code that has been baked into CRUD, I have the following code for deleting an item: <?php echo $this->Form->postLink(__('Delete'), array('controller'=>'attachments', 'action' => 'delete', $attachment['Attachment']['id']), null, __('Are you sure you want to delete "%s?"', $attachment['Attac...

0
Q: Setting up the favion

MithileshI have following code for my header.php file, in the includes folder. <html> <head> <title>Health Mate</title> <link rel="icon" href="/favicon.ico" type="image/x-icon" /> <link href="stylesheets/public.css" media="all" rel="stylesheet"/> </head> <!-- Some m...

0
Q: Object function as callback for add_shortcode( ) in WordPress

CMoreiraI created a class to build custom post types and I'm trying to include a way to insert specific shortcodes for that post type, but I can't seem to get the callback function for the add_shortcode() to get a function from inside the created object. I have something similar to this: class custom_...

 
3:06 AM
0
Q: How to upload the raw bytes of image data to facebook

WooDThe program will download the user profile picture and then apply an effect to it via imagemagick. As facebook example is only for file base and I dont to want store it as temp file, How can I upload the finalized image in binary format to facebook? <?php //1. prepare frame $overlay = new I...

0
Q: symfony2 multiple firewall "/admin/login_check" unable to find

leoI have a problem with security configuration in symfony2, i have two entities, one is Admins and the other is Users,and i am following [a link]multiple firewalls with symfony2 . but always got a ["admin/login_check" unable to find] exception. Thank you! security.yml security: encoders:...

 
ping
 
0
Q: my php shopping cart update button not working correctly?

Jay Jibo'lekan HamzaMy products gets added to the basket but when i update the amount of quantity it duplicates and gives this errors Notice: Query failed: Unknown column '_2' in 'where clause' SQL: SELECT * FROM Workshop3_products WHERE prodid=_2 in /home/ihamza/ihamza.bimserver2.com/RadioDawg/imp/mysql.data.php ...

0
Q: Using a .htaccess file in a subdomain

TehJamDudeI have been working on a website, and it seems as though my server won't let me use .htaccess in a subdomain. e.g. sbfg.example.ca Here's what I have in my .htaccess file: Options -MultiViews RewriteEngine on # external redirect from actual URL to pretty one RewriteCond %{THE_REQUEST} ^[A-Z...

0
Q: Does the DirectoryIterator read the entire directory?

thelolcatSo I'm a bit confused about how the DirectoryIterator works. Let's say I have a directory with 100000 files. Using the readdir() function I could easily walk through the entire file list without any performance hits, because the function gets me one file at the time. Does the DirectoryIterator ...

 
3:24 AM
0
Q: PHP always get default checked of html check box even I removed

user241597I tried to get values from html check box, and I got error. I got values that I checked check box and also the default checked of html. Please see my code Html code: <input type='checkbox' name='check[]' value='1' checked> <input type='checkbox' name='check[]' value='2'> <input type='checkbox' ...

0
Q: Adding Simple-Ajax-Upload to Existing Ajax Form Submission

Greg LI want to add an image upload field to this, and submit the image WITH this form data. This is the plugin I found thanks to this website: https://github.com/LPology/Simple-Ajax-Uploader I am not sure how to implement this image upload plugin with my existing ajax form submit code. It runs via ...

0
Q: URL Rewrite/ Remove Part of URL Using PHP

CraigI have javascript providing me the user's screen resolution in the url bar. Everything works fine except that this breaks my pagination. I get Urls like http://localhost/funny-videos?r=1&width=1366/page/2. For my pagination to work, the url has to be like http://localhost/main-videos/page/2?r=1&w...

0
Q: PhP Subract 24 Hour from two Time

user2954757I want t subtract two 24 hours formt from each other. how will i get the result? $start = '08:00:00'; $end = '18:00:00'; thanks for the future answers! :-)

0
Q: How to edit date picker format

user2963035I need help over here.. my problem is, it is about date picker.. i want it to be 2012-11-04 format once the date was picked.. but what happend is 2012-11-4.. i try to change but it become worst.. haha so hope someone here can help me =D .. this is the codes that i used.. var winCal; var dtToday=...

0
Q: Do I need to enclose PHP built-in functions in parentheses?

user2216098Do I need to enclose PHP built-in functions in parentheses? Are these the most proper ways? (empty($UrlArray[1])), (is_numeric($UrlArray[1])), (strlen($UrlArray[1]) == 4) Or, are these the most proper ways? empty($UrlArray[1]), is_numeric($UrlArray[1]), strlen($UrlArray[1]) == 4 This one w...

0
Q: Wordpress Genesis content archive not displaying all items from post

NFdesignI have set genesis to display post content with a limit of 400 characters. Everything is fine except it is not posting the social media share icons. They appear on the individual blog posts but not on the content archive page. On my custom posts content archives they are fine. The site is he...

0
Q: how to make option value selected ini ajax

user2990391edit1.tpl <tr> <td>Temperature Limit</td> <td><select id="asset_templimitv2" type="text" class="validate[required]" div class="styledselect"> <option value="DryAC">Dry AC </option> <option value="Chiller">Chiller </option> <option value="Frozen">Frozen </option> <...

0
Q: CodeIgniter Pagination not showing the correct rows per page

neknek mouhhello my pagination is not working. This is my controller class. customer_controller.php public function __construct() { parent::__construct(); $this->load->helper('url'); $this->load->model('customer_model'); $this->load->library('pagination'); } ...

0
Q: Can't get $_GET after Apache rewrite

Fat CatI have a rewrite rule like this(just to implement mvc): ^signup$ index.php?page=signup And this rewrite rule is used to map the request /signup to index.php?page=signup But when i request signup?username=haha, it seems that in my signup.php code the $_GET["username"] isn't set at all. ...

0
Q: How to write php code for a button?

user2977811I am newbie for web-developing. I have table with a textbox and a button(not submit button) on "test.php" file( this file is on server side). I want when i type "John" then press button to send the data("John") to add it to my MySQl database( server-side too). But i only want to use a PHP file...

0
Q: How to put associative array in csv using PHP?

Rochelle CanaleHello guys just want to ask how can I put an associative array in csv? For example if I have an array like this. Array ( [0] => Array ( [restaurant_id] => 1227 [new_lat] => 13.62241 [new_long] => 123.19341 [date_updated] => 2013-11-14 11:2...

0
Q: PHP_SELF with htmlspecialchars Strange behaviour

user2419434I read all the posts regarding PHP_SELF and htmlspecialchars and I did according to it. But I am not sure whether the behaviour of my website is correct or not. Below is my code. <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="post" id="enquiryform" name="enquiryform">

0
Q: Displaying specific information from 1 SQL SELECT query

Josh WoelfelI have a database table that contains a bunch of different options and their values. The table has 3 columns which are ID, menu_option, and value. So one row may have the following information: 1, "menu_color", "#AB324B". I want to display the value of each option on the page so the user can edi...

0
Q: How best to count views per page, per user, on a high traffic website?

Mark GladstoneI’m creating a website that will have articles, and it will support the ability for people to sign up as an affiliate (and get a subdomain) and get paid per “View” that they send to the website (they typically post their links on facebook pages which drive the traffic to my site) So a typical U...

0
Q: How to send file via HTTP from .NET app to PHP web page?

CJ7What is the best way for a desktop .NET app to send a file over HTTP to a PHP web page? The .NET app could use this code to upload the file: using(WebClient client = new WebClient()) { client.UploadFile(address, filePath); } What code in a PHP page should be used to 'accept' the uploading...

0
Q: Upload image exit rename file php

Bong ThornI have problem when I upload one time it OK but if file of image exit it can't more image to the folder it see only message "already upload": let's see my code follow <?php $name = pathinfo($_FILES["file"]["name"], PATHINFO_FILENAME); $extension = pathinfo($_FILES["file"]["name"], PATHINFO_EXTE...

0
Q: Laravel: What is the best practice in testing controller

wisootI'm using laravel 4 and trying to write a test for controller with a mock up of the business logic which pass some fake data. Then I encounter errors in rendering view due to missing of variables. First of all, I didn't expect that the view will be rendered, so I didn't care to pass the exact da...

0
Q: in_array not working correctly

Jess McKenzieI am using in array to try and load a specific dropdown but I am unsure why its not working - I am getting no data from shop_shipping_rule_item_multiple Array: array(2) { [0]=> array(3) { ["shop_shipping_rule_name"]=> string(13) "Overnight UPS" ["shop_shipping_rule_item_multiple"]=> string(4) "...

0
Q: Is there a serialization format for PHP that I can seek without loading everything?

AndreKRI have a huge array like this: array( '5486215d2f02cc0f257ebda5125486215d2f02c' /* (SHA1) */ => array( 'filename' => 'p_2486433.png', 'directory' => 'aaaac2013' ), '95b23be7c97d532295b23be7c97d532295b23be' => array( 'filename' => 'p_4857312.png', 'directory' => 'aaaff2013' ...

0
Q: PDO Insert not working- but hardcoding works

PasargadI'm trying to insert into my database by the following code: $dbh=new PDO("mysql:host=localhost;dbname=test22", "root", ""); $stm=$dbh->prepare("Insert into locations (City,NumberOfEmployees) values(':city',:num)"); $city=$this->input->post('company_city'); $num=$this->input->pos...

0
Q: How can get value from URL using php?

user2990420I want to get the value from URL using PHP, I could use following code,it's working in localhost, but not working in server, this code does not given URL value in Server, sample.php <a href="report.php?id=<?php $a=5; echo $a; ?>">View</a> report.php <?php $id=$_GET['id']; echo $id; ?> Th...

0
Q: Is it best practice to query or store?

user1128097Using PHP and MySQL, if I wanted to regularly output how many records I had for a particular attribute that was liable to change. Would I use a select query using server side code to query the database and then display it? Or include the information as an attribute in a related table? I.e. someth...

0
Q: Post to wordpress via php

user2984982I'm trying to post on my wordpress site using php . I used php to fetch data from a website and stored all of them in variables . I found the code to a few auto wordpress php posters but they are kind of complex and i'm not really sure how to use/alter them. What the simplest way to do it vi...

0
Q: ! ( NULL || 0 || '' ) if condition in PHP at the same time

user2989475If I want to check the variable I need to do this: if ( $i != '' || $i != 0 || $i != NULL ) { // ...do some code } Could these 3 checks be somehow merged into 1 via some php function or a trick?

0
Q: Add both text and variable in WordPress wp_nav_menu $menu_class

user2248259I am generating a menu in WordPress using wp_nav_menu() function and I want to add both text and variable into the 'menu_class' property. Now this is how I do it: `'menu_class' => 'text' . $variable,` However no class is shown when I use this method (no error/warnings as well). I want ...

0
Q: Digital distribution platform development

SuperRabbitI'd like to build a digital content sale website. Like Steam. Are there any open source frameworks or solutions for this purpose? I've tried Magento, OpenCart,..... a lot of shopping cart, but no fits my needs. Please give me some suggestions or clue. PHP, Ruby, Python are OK. Any open source fr...

0
Q: SQL Injection on a local server

Mike WeberI have a project for a course where I connect to a local server localhost:8080/website.php and execute SQL Injection. The server has an Account ID Number and Password field. When submitted the ID and Password values are input into the SQL statement: SELECT * FROM accounts WHERE id = (ID value) AN...

0
Q: CANNOT READ CKEDITOR DATA PHP MYSQL

user2990463Please help me, there is no error but when i check my database, it insert nothing. Please Help. here is the insert.php <?php $editor_data = $_POST[ 'ckFAQS' ]; ?> <?php $sql="INSERT INTO FAQs (FAQs_Text) VALUES ('$editor_data')"; if (!mysqli_query($con,$sql)) { die('Error: ' . mysq...

0
Q: how to call mysql procedure in php with php variable as arguments?

Adheesh Bhatiai have defined the the mysql procedure as follows DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `create_subcategories`(IN path VARCHAR(255)) BEGIN insert ignore into moodleui.z_subcategories(name, idnumber, description, status, last_processed_date) select distinct concat(path, s...

0
Q: Div changes position on refresh but not when typing URL

Émile PerronI have a bit of an issue on my website. On one (and only one) page, that doesn't have anything different from the other pages before the body tag, there is a section that changes position for no reason when the page is refreshed. It doesn't move when I simply click on the URL from the menu, or ju...

0
Q: How do I get the DST hour for a given timezone?

rubo77 Clock changes in "America/New York": When local daylight time was about to reach Sunday, 3 November 2013, 02:00:00 clocks were turned backward 1 hour to Sunday, 3 November 2013, 01:00:00 local standard time instead Clock changes in "Europe/Berlin": When local day...

0
Q: Setting a LIMIT on a JOIN in MySQL

user1216849I created the following query in order to produce a two-level navigation, Level one - categories Level two - subcategories Ex. category - Year subcategories - 2013, 2012, 2011 It looks like this: $query = "SELECT categories.Category, categories.idCat, subcategories.subCategory, subcategories.i...

0
Q: How to store your URL that has a hash and exclamation mark using PHP?

Stephen DelaneyWe have a website using a AJAX plugin which puts a #! at the start of each page on the website. Example of a page is: http://www.exit8.tv/#!bellybang-2013-mr-mob-dj-performance/ We are trying to get the URL using PHP as to store in a meta tag when the page loads. And is important for sharing via...

0
Q: PHP fixed width image query

GT22I'm trying to rewrite this query for a wordpress site to force the thumbnail images to be displayed at 200px x 200px, the actual image sizes are about 300x300. <?php if (has_post_thumbnail( $loop->post->ID )) echo get_the_post_thumbnail($loop->post->ID, 'shop_catalog'); else echo '<img src="'.w...

0
Q: ZF1 dispatch error controller from bootstrap

Mr. EZEKIELIn my Zend Framework 1 project I am trying to add an init to Bootstrap.php that will load some configuration values and then catch an exception if the configuration value doesn't exist. After it catches an exception I want it to route to the error controller and display the error message from the...

0
Q: Symfony2 abstract structure

Patrick DesmaraisI can't seem to figure out how to get this working with Symfony2 forms. My database structure looks like this : (i'm using the hasOne, hasMany notation for simplification and understanding) Object (this is the class name) hasOne ObjectType hasMany ObjectValues response ObjectType ...

0
Q: How do I get javascript to send form to php

aldito2I have searched the questions and none directly addresses the issue I'm having. Please forgive me if it has been addressed; I could not find it. I am making a form using javascript and trying to submit it, but when i do form.submit nothing happens. The page reloads, but it never gets to the php p...

0
Q: bbcode & preg_replace not working

YoPlaiti code this for bbcode replacement with my forms : // BBcode conversion $message = $this->request->data['Minichat']['message']; $conversion = array( '\[b\](.*?)\[\/b\]' => '<span style="font-weight: bold;">$1</span>', '\[i\](.*?...

-1
Q: How to convert string to date in without knowing the string format

JakeI know there is a MySQL function that converts string to date, but it requires the string format. Is there a way to do it without knowing the format? Or is there a way to get the format using PHP so that I can use it in MySQL?

0
Q: How to not get Masonry to load all divs at once

pinksharpiiI've used the jQuery Masonry on tumblr for a while now so I thought I'd use it on my portfolio site to load in my photography. But I'm not finding anywhere that explains how to have sets of them load in as the user hits the bottom of the page. Am I supposed to use a pagination to control that? ...

0
Q: Editing MYSQL with PHP

user2977587I have a database which has edit buttons on each entry but I get this error when trying to edit an item. Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /editentry.php on line 32 Here is the line in question and files corresponding to the problem. $order = "S...

0
Q: Get Office Hours in one timezone based on another timezone

Rid IculousI'm trying to code a function that returns whether people are currently in their office when they work in a different timezone. Below code seems to work, but seems cumbersome to me. I wonder if there is a better approach. <? function isInoffice($remote_tz){ $office_hours = array...

0
Q: Magento minimum order amount with discount

SophyOn Magento shop system, We have a campaign running now offering 50€ discount on orders above 100€. The coupon does not work on orders between 100€ and 125€ because the shop’s minimum order value is 75€. The coupon rule checks the subtotal of the cart after the discount has been applied.

0
Q: php email sms delivery rate terrible

Dan PrideI am trying to use the email gateway to send SMS and tracking the user response (I send a code for them to enter) using swiftmailer. The results using the lists are very sporatic, customers saying they don't receive the texted code, altho it does go out and CC's to me. I can't figure out why. W...

0
Q: Can't seem to get mod_rewrite to behave the way I need it to

Tony FrizI'm dealing with a server that has mod_rewrite enabled but I can't seem to get any rewrites to work except one... The following works RewriteEngine on RewriteRule (.*) /test.php [R=301,L] But obviously creates an endless loop back to test.php. So if I type website.com/something, it's being ...

0
Q: I want index.php to access files restricted by .htaccess

user2990545I dont have code to show you because none of mine really work but I need to know how restrict files (jpgs and php) in my upload folder located in my root (root/upload/). I want to make it so if you go to mysite.com/upload/ then nothing appears but I want my index.php located in my root (root/inde...

0
Q: My hosting server firewall always blocks my joomla site when in login to admin panel

Mehedy MizanWhenever i login to my any joomla site admin backend on my hosting server, my ip get blocked by the server firewall, asking about it the hosting ticket replies, They only allow 200 connections at a time for 1 website. their CSF firewall is blocking my site ip. it only happens when i try to logi...

0
Q: Facebook sharer.php does not pass all the parameters of a page I'm trying to share

Aunt JamaimaI have a simple random silly name generator for a baby webpage that I have. I wanted people to be able to share a unique name that may have found by clicking on the link. So that the page remembers what they made, I embedded the results in the url. When I try to see if it works, facebook does not...

0
Q: php save looped data into array

bagofmilkI'm new to php. I have a jQuery script that will generate new elements. The user clicks submit and is taken to page2.php. That's where I need a php loop to determine how many text inputs the user created. page1.php <!DOCTYPE html> <html> <head> <script type='text/javascript' src='http://code.jq...

0
Q: Django facebook library

bsdI have a question in regard with facebook notifications implemented in django .. For a project I have used FBIgnite, it's a php framework based on Codeigniter. It has some functions for facebook, like "send a notification" on facebook. I want to know if there's something like that for Django. I ...

-2
Q: Facebook sharer unterminate string error in javascript

Abhay DwivediI am trying to share something on facebook and using facebook sharer. But it gives error as : unterminated string when click on link to share. I checked the string , its correct. When give a backspace in summary parameter on firebug, it works. I dont why this happening?

0
Q: How to set the path of the application for facebook while entry point is localhost?

user2987477I have created an application for facebook to distinguish male and female friends of a user now my application setting are like these app domain : localhost:8080,canvas url :http//:localhost/facebook-php-sdk/src?", secure canvas url :http//:localhost/facebook-php-sdk/src/fb.test? I am getting e...

0
Q: To check the account_status and log the account

user2982187In the below code i have used codeigniter in my database i have a column name account_status it will be inactive by default .Now i want to check the account_status if it is active it should make me login else not.Pls help me to do . Controller: function index() { $data['main_content...

1
Q: Catching emails with a script, then deleting

ChrisI need to create a system that will pipe incoming emails to a PHP script, then get rid of the email. Technically, I don't want these email addresses to actually exist. I would want to validate the email address by checking a database. So if I have a database with say 100 email addresses (i.e. 232...

0
Q: Registration Form not submitting - No errors

Marcus ReedI am not sure what is wrong with this code. I am not getting any errors on submit, but no email is sent and nothing is being added to my server. I would like it to redirect also upon submit. How do I do that? <?php session_start(); include('config-db.php'); if(isset($_POST['submit'])) { if(iss...

0
Q: Traverse FQL Result on PHP

KingCrimsonI'am having a lot of issues understanding how json works. I create a FQL query to Facebook and I receive the correct response, but I just can't seem to parse it. This is what I get { "data": [ { "value": { "M.25-34": 3392, "M.35-44": 2601, "M.45-54": 1675, ...

0
Q: Drag and Drop'ed file to input type file

Yehia NadaI have a small problem that I cannot seem to find a solution for. I have a simple form. It contains an input type file field, a select field, and a submit button. I would like to be able to drag and drop an image file in the input type file field without submitting the data directly to the script...

-2
Q: Not Acceptable error on my php script

user2460790I have a ecommerce script that I purchased from third party, its simple with object oriented PHP code. The script works fine and suits my needs. The only problem I have is that on the backend of my admin panel, whenever I edit or changed some category, it throws an error that Not Acceptable An a...

0
Q: Dynamic Link inside PHP

user2921824I have been toying around with the idea where I echo a link and it changes based on the string I got from my database. Here is the code I been working with: <?php echo '<a href="submittoplay.php?="' . ($username) . ">";?> I want the output of the echo to appear like so, where $username = bob ...

0
Q: PHP - check if cross domain AJAX?

DarcCodeFor same domain AJAX, I can use this: if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'): But the statement above return false when it's a cross-domain AJAX. What's the right conditional statement to detect that? Thanks

-4
Q: How can get value from URL in php?

user2967857Any one ans me immediately........ I want to get the value from URL using PHP, I could use following code,it's working in localhost, but not working in server, this code does not given URL value in Server, sample.php <a href="report.php?id=<?php $a=5; echo $a; ?>">View</a> report.php <?php...

-1
Q: PDO bindParam, Invalid parameter number

shanksheraI have this function function insert($table, $array){ $c = connect(); $query = "INSERT INTO $table (url, name) VALUES "; $arrcount = count($array); $qPart = array_fill(0, $arrcount, "(?,?)"); $query .= implode(",", $qPart); $stmt = $c->prepare($query); $i = 1; ...

0
Q: What is the easiest/lightest way to parse user agents for purely Windows, Mac, or Other?

RyanI've been investigating various user agent parsers and have been surprised at the complexity and size required. If I'm only interested in parsing for the OS into three categories: Windows, Mac, or Other — how can I do this efficiently, lightly, and quickly? I don't care about browsers, versions...

-1
Q: php email management and Event management

JonI have a client that has a list of several thousand email addresses (and their personal info). If they are holding an event in a particular city, they want to send an email to "everyone in these cities with these parameters". They would like to keep track of who attends each event, let people uns...

1
Q: How do I use memcached to invalidate updated records?

Barry ChapmanOn our site, we have a variety of data collections. We pull a lot of records by ID, and we also have some records that are paginated content. We are caching our queries using memcached - we essentially serialize the query array and then md5() it. This provides us a key to use for this specific q...

-1
Q: Javascript refresh query database?

user2990466This is the website: enter link description here Right now this is the function: $("a.wtf").click(function(){ //get the id the_id = $(this).attr('id'); // show the spinner $(this).parent().html("<img src='images/thanks.fw.png'/>"); //the main ajax request $.ajax({ type: "POST", ...

4
Q: Fool a PHP file to thinking it is alone in it directory

Sigurd B. SvelaI’m developing a thing where I will have two very distinct components. Structure at this moment is Core: Stuff inside the core 3prty: Third party developed stuff Now, what I want to do is to keep the third party developed php script from doing something like scandir("../"); or require ...

0
Q: Alternate behavior for previous/next links based on single post URL

wittyhandleI have a custom post type called project. In my single-project.php template I'll have previous and next links to allow users to navigate to adjacent projects. In the case where the url to a single project is: domain.com/all/works/identity/my-project the next/previous links will not consider the c...

0
Q: WordPress plugins_url() without http://?

user2248259I want to generate the Wordpress plugin directory using this function plugins_url() However, it gives an output like this http://localhost/wordpress/wp-content/plugins I want to know, is there a way to generate links like /[wp-installation-root]/wp-content/plugins? Thanks.

0
Q: Opencart 1.5.6 Admin login slow

NileshI am new to opencart shopping cart, I installed it successfully on my test server, but a moment i am trying to signin to admin panel, it takes around 40 to 50 minutes to sign in. I debug the code and come to know that , upon each login request , opencart send curl request to yahoo server to get...

0
Q: php post not working using header and ajax

ahmad gulzari am sending a post request using jquery $.post to another domain. every thing works fine but i am not getting the posted data in the requested page please check my code jquery code var data = {mydata: 'testing'}; $.post("http://anyurl/file.php",data,function(info){ alert(info...

0
Q: How to resolve session issue with cms in magento?

DRAJII have created one cms page for showing coupon code information in magento. sucessfully created. But when i open that cms page, it will be opened another user acccount's coupon information. But other liknks are working correct. In the url(http://www.example.in/coupon/), if i put "/" at the end ...

0
Q: Set php environment variable(XAMP)

AanshiI want to set PHP environment variable.I tried this solution from How to set the env variable for PHP? You need to put the directory that has php.exe in you WAMP installation into your PATH. It is usually something like C:\wamp\xampp\php But stil in confusion.How to set it?

0
Q: Wordpress in Google App Engine gets stuck (Saving search indexes)

user2990607I'm trying to run the application but it gets stuck in the last line: 2013-11-14 03:05:49 Running command: "['C:\\Python27\\pythonw.exe', 'C:\\Program Files (x86)\\Google\\google_appengine\\dev_appserver.py', '--skip_sdk_update_check=yes', '--port=8080', '--admin_port=8000', 'F:\\Gabriel\\Deskto...

0
Q: PHP : howto create links from results

ParamI am decent in PHP coding but i am not sure how this requirement is generally acheived. I don't have a piece of code to show since i can start coding easily once i get the logic of how this is generally done. Need some pointers on how to start... I am writing a website that would show up the ...

0
Q: htaccess 301 redirect not working properly

Sumit BijvaniI have rewrite URL via htaccess now I want to redirect that URL to another URL. For ex Below is my rewrite rule, which I am using for short URL RewriteRule ^([a-zA-Z0-9_-]+)$ modules/pages/content.php?page_url=$1 [NC,L] This is working fine and I can access URL like.. http://www.domain.com/...

-1
Q: What kind of Array is this and how do I use the data?

Ed BoothI'm using a Gravity Forms to create a form but want to do something extra with the data after submission of the form. I'm using var_dump($_POST); to see what the resulting information that is sent is and I get this: array(12) { ["input_1"]=> string(8) "John Doe" ["input_2"]=> string(11) "Some ...

0
Q: GoDaddy: possible to set up email forwards in PHP?

BingI have a shared hosting GoDaddy account and I'd like to make it so that when someone creates a user account on a website I built they get email forwarded to their account email address too. So if my site were example.com, and someone signed up as Bob with email address bob@gmail.com, my site wou...

0
Q: PHP: Load any div content by clicking <a> tag by corresponding DIV id="" in ajax?

AbrahametryI developed a SLIDING page site which has only one index page and 4-5 different DIV section distinguished by DIV id, here is the link: http://gosick.tk/ name: 08093103002 pass: mak but it take quite a long time to load because the whole site is only 1 page and the full page is actually 9200 PX; ...

0
Q: Fetching and updating long relational tables

ro koI have a task where I have db tables which have relations like this: tbl_a - ida tbl_b - idb | ida tbl_c - idc | idb and goes on for another 12 tables… I need to do some thing like this: ida - make a new copy of ida row (ida_1). set old one non-effective, idb - make a new copy of idb row, us...

0
Q: The PHP form output from one file to other PHP file's division

gree_tejasI have two php pages. In first php page I have two divisions, where in one division I have hyperlinked text which on click showing result in other division of same page, with the help of ajax. The code for same is below: <body> <div id="container"> <div id="content"> Sidebar <p> &nbsp; </p>

0
Q: How to update a text file using a condition in PHP?

Rochelle CanaleHello guys I have a problem with my code. Because I want to create a tool for updating google maps. But my data is in txt file not in database. That's why I am having a hard time coding it. Ok the scenario is: The user will locate it's new location After that, the user will click UPDATE and the...

0
Q: how to use PHP to convert numerical string to float?

YangI got a string "1.0E+7" And i hope convert it to a float 10000000.00 Is there any php functions do this job? Or I should do this conversion myself? Further more, I will receive many strings like this, some are numerical and some are in scientific format, how can I convert all of th...

-1
Q: Symfony 2 - Error : "Call to a member function * on a non-object in * line *

manonthemoonI recently learnt Symfony 2, so i'm still a beginner. For fun, i'm trying to make a simple social network website. So I have posts, and hashtags. I create a relation ManyToMany between this two entities (posts/hashtags) I tried to get a hashtag from my database, by using getRepository. I used t...

0
Q: Getting array of date group by "some time interval" between a particular time span

user2902203I am new to MySql . I am trying to get some data from a web server of e-commerce website by placing a php file on it. I want to get only the count of all products sold or cancelled everyday. If no product is sold, It should return 0. and I want to get details in particular time span, like every w...

0
Q: Slashes in a string PHP

user2146684I have looked everywhere for a simple way of doing this and just cannot get it correct. In php I want to assign a name to a variable and then replace the name in the string with the variable. The slashes are causing syntax errors. //Assign the name to a variable. $patient_name = "John_Doe"; //R...

0
Q: Auto Increment Issue - Incrementing By 10

DinoI'm getting a strange issue on my database. All auto increment fields of my database (all tables) are getting increment by 10. Previously it was working fine (increment by 1). And now its started to increment by 10. Table 1 Another table

1
Q: php x64 not supported x64 interger.. (Wamp & dropbox API)

user2990720I try to connect to dropbox API with WAMP x64 installed. This is the exception from dropbox authentication file that i get from this.. Dropbox php API Fatal error: Uncaught exception 'Exception' with message 'The Dropbox SDK uses 64-bit integers, but it looks like we're running on a version ...

0
Q: how to convert string into single dimension array in php?

siddheshPlease help me to convert a string into single dimension array... example $str = abc,xyz,pqr; convert to $arr = array('abc','xyz','pqr');

0
Q: PHP DOM nodeValue not doesn't work

AzeemI am trying to parse an HTML table with DOM and it works fine but when some cell contains html it doesn't work properly. Here is the Sample HTML Table <tr> <td>Razon Social: </td> <td>Circulo Inmobiliaria Sur (Casa Central)</td> </tr> <tr> <td>Email: </td> <td> <img src="generateImage.php?emai...

0
Q: How to get the sum of two fields in different table?

altaire lastnameHow to get the sum of Purchase_Order.QTY and Purchase_Request.QTY as balance? My problem is there are multiple po_number in Purchase_Order table with has a same counter. Below is my Tables, Table Purchase_Order counter | po_number | QTY | unit_cost 100001 | 08-13-co 200 | 10 | 16.50 ...

0
Q: having problems with array in php. Help please

user2930137I have this <?php if(isset($_GET['datos'])){ $xd = $_GET['datos']; $datosCompletos = explode(',', $xd); $longArreglo = count($datosCompletos); for ($i=0; $i < $longArreglo; $i++) { $arregloInformacion = explode('|', $datosCompletos[$i]); ...

0
Q: How to update a particular row using id in redbean php

CashewI have database with table "users" +------+--------------+----------+ | id | username | password | | 22 | foo | foo | | 23 | bar | bar | | 24 | world | world | I wanna update the username where id = 24 How can i do this using redbean withou...

-1
Q: In which framework http://www.realestateindia.com/ was developed.?

blasiei'm trying to develop a real Estate website quite similar to http://www.realestateindia.com/.so i need to know that which php framework will be suitable to develop the website.thanks in advance.

0
Q: search matching words in large table

Yaakov SwissaHoe to do search matching words in table like this: id = 1 | name = marly bob | format = normal way id = 2 | name = james bob | format = extra way id = 3 | name = stack overflow | format = default way if name and format from id 1 metching to name or format from all name and format display t...

0
Q: Wordpress XMLRPC not working for all website

AtulI have a website which post to two different Wordpress websites using XMLRPC. It is working fine for one and local as well but for the second it's posting and I got no response. Site Details: 1st website like http://blog.mysite1.com (Working Fine), 2nd website like http://mysite2.com/blog (No Re...

0
Q: Wordpress Theme development with social login and registration without using plugin

Hemendra AjmeraI what to develop a theme and allow user to login with social site(Facebook,Google +,twitter,LinkedIn ,etc)and also word press default login and and registration. i want this as a theme feature and i don't want to using any plugin for that. also user can comment using with social site and word p...

0
Q: Session variables in codeigniter

Nitish MahnaI am starting a session in controller but i am unable to call that session variable in view. When i am working on localhost its working perfectly but on server there is nothing in that session variable. I am writting my code:= Controller if($_REQUEST['username'] == $result['users']...

0
Q: YoutubeAPI NoLinkedYouTubeAccount CURL

justine1234We implemented this youtube API in our site which lets the users upload videos to our youtube account. It was working before because we were able to test this functionality. However today, we tried testing it again and get an error response from youtube 'Error=NoLinkedYouTubeAccount'. Googled o...

0
Q: How to create array using customize value?

WolverineI have some values below: 11 12 13. I need to make an array using this value. array(11,12,13); I tried this code below : $selected is the variable that contain the value 11 12 13 //Special Instruction foreach($selected as $key=>$val) { $sel.=$val; $sel.=","; } $str = rtrim($sel,','); ...

0
Q: mouse over on pie chart using jsp in php

Vamsi Krishi need to display the data when mouse is placed on pie chart please help me this is my code $(document).ready(function(){ var data = [ { label: "Internet Explorer", data: 12}, { label: "Mobile", data: 27}, { label: "Safari", data: 85}, { label: "Opera", data: 64}, { label: "Firefox", data: ...

0
Q: store xml data in to mysql database

user2496644My Xml file Look Like this type:- <child_4331 entity_id="4331" value="Region" parent_id="0"> <child_4332 entity_id="4332" value="Asia" parent_id="4331"> <child_4333 entity_id="4333" value="India" parent_id="4332"> <child_4334 entity_id="4334" v...

0
Q: Fat Free Framework: how create dynamic menu with submenu

sineverbaI have this table id children voce alias pubblicato 11 NULL Chi Siamo chi-siamo 1 12 11 Chi Siamo - Sub chi-siamo-sub 1 So the id 12 is children (submenu) of 11. With this block i can print the first level of a menu <repeat group="{{ @result }}" key="{{ @ikey }}" value="...

0
Q: Get user id from url php

user2990788Hi there i'm trying to get data-id from url and use this id to insert into database, to make like dislike system. data-id="1" it is user id. The link look like this: <a data-fav="like" data-block-active="like" class="block" data="21" data-id="1" data-token="e6fcbe9adff7764872b8b9a571848084e36...

0
Q: Randomize photos from a directory via PHP

Matt II have the following code that is functional that will randomize the photos I have in my 'photos' folder each time the refresh button is clicked. I know this may not be the most efficient way for this to be coded but for my matter it works. I am looking for help regarding my PHP code that will ma...

0
Q: validating and submitting form using jquery issue

user2990754I'm trying to submit form using j-query, before submitting it should do some validation and in that I've validation for capcha using ajax. Everything works fine without ajax validation. <form id="RegistrationForm" name="RegistrationForm" method="post" action="save.php" > jquery code `$('#Regi...

0
Q: createAction does not insert data in database PHP with jtable

user2990813I am using jtable to help users to manage a contact form, However I am having trouble getting it to insert the data into the mysql table with CreateAction.php the front page code is the folowing: <script type="text/javascript"> $(document).ready(function () { $('#Pers...

0
Q: Essential curl headers to be included?

Surabhil SergyI am making an application to make use of the Youtube Data API.I think CURL will always be a better option than 'file_get_contents()' with PHP. With CURL I need to know which all headers should be included with the request for an optimized performance. I need to set some timeout settings,error h...

0
Q: mysql 30 days range selection from column value

Dchaser88Each customer have their own billing cycle of 30 days starting from their predefined billing_cycle_day (say billing_cycle_day is 7 th of October then their billing cycle would be 7th Oct to 6th Nov and so forth for every month..) //kilowatts : double //report_date : timestamp //billing_cycle...

0
Q: Loading chart. Please wait fusion chart HTML 5 in ajax request

AbhishekThis is the code which is getting rendered in my smarty file. Its showing Loading chart. Please wait. How to tackle this issue. I am using FusionCharts version 3.2.2.1 & using $objFusionChart = new FusionCharts( 'Column3D', '898', '300', '0', '1' ); $strGraph = $objFusionChart->renderChart( fals...

0
Q: Webinar using google+ hangout API

VishalI want to add a webinar to my php website. On going through internet i found that now a days google+ hangout is widely using for webinars.And i got a good reference from http://www.trainingauthors.com/how-to-host-a-live-webinar-for-free-using-google-hangouts/ Here i'm looking for any google han...

0
Q: How do I include a jpgraph in tcpdf

user1137313I want to generate a PDF file with some information on it, then send it to some email address. The information inside the PDF will contain among other stuff, a PIE that I generate using jpgraph. Of course, the chart will be dynamic, so it's not an option to generate a static PIE and use it as a s...

0
Q: Recursively search all directories for an array of strings in php

NariI am new to PHP coding and here am looking for fastest way to do recursive search on all directories for an array of strings. I am doing this way $contents_list = array("xyz","abc","hello"); // this list can grow any size $path = "/tmp/"; //user will give any path which can contain multi level ...

0
Q: Editing Google Store Locator to Display Results on Separate Page (geocode function not running)

MxmastaMillsI'm using the Google Store Locator and have set up a successful example of it where it displays the results on the same page (the standard set up with the search bar above or to the left of the map). I'm using the PHP/MySQL example and followed the instructions there: https://developers.google....

0
Q: Propel Symfony 2 multiple connection

MadzmarHi guys I was wondering if anyone of you knows how to connect in symfony2 having 2 database connection? Right now we have only 1 file that have a connection like so propel: dbal: driver: mysql user: root password: root ...

0
Q: Hi, I need to send api request using get variables via http requests using php

user2603466I need to send api request using get variables via http requests using php. Format is some thing like : https:"www.thirdpartyurl.com"/Request.ashx?command=_&username= &password=_&customer=&customerpassword=_ Where 1. command = create customer username = my username password = my account pas...

0
Q: PHP convert string to array with variable element length

Sujathan RI have a string AB0512CD123456 and using preg match how can I convert it to Array[0]='AB'; Array[1]='05'; Array[2]='12CD12'; Array[3]='3456'; That is first element with size-2,then 2,6,4 etc.

-2
Q: HTML Contact Form that can attach file and send to email

user2990760please i have this html form which i want it to send me email with one file attachment in either pdf, word or jpg. Please help me to modify it as appropriate. HTML FORM <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html...

 
7:15 AM
0
Q: CodeIgniter - Add social media profile via login

BobeI'm developing a CI application that, let's say for the purposes of this question, simply allows a user (registered through Tank Auth) to compile a list of their social media profiles (Facebook, Twitter, Google+, etc). The process for adding a profile would be similar to signing into a site via ...

0
Q: ActiveRecord vs Transaction in Codeigniter

EchusenI just want to know, which is better in doing database access, activerecord or transaction? I can't find any source explaining the difference between the two and the advantages of one another. I know that some of you would say that it depends on the situation but could you enlighten me on this...

0
Q: Is there any algorithm wirting software available

user2990817I am kind of new to programming world , i have learned javascript , jquery, and php , and i find that writing algorithm before writing any code is the most efficient step, but i have been writing algorithm on a plain text editor, is there any kind of algorithm software which can provide the funct...

0
Q: codeigniter extract stdClass Object

Aldi Aryantoi'm using codeigniter, here's my view : <select name="kode_promo_air" id="kode_promo_air" class="span3 input2"> <option value="">-PILIH-</option> <?php $data = $this->app_model->get_promo_air(); foreach($data->result() as $t){ ?

0
Q: custom error page - can't get into handler

MaximusI'm trying to add my custom pages. I'm following the official instructions in a guide, which says that I should override the method handler of Kohana_Exception_Exception class. I did that but I can't figure out at what point the application gets inside this method. Currently if I throw an excepti...

0
Q: Yii - How to get option value different in ext.combobox.EJuiComboBox from the name displayed

user2770039I'm using ext.combobox.EJuiComboBox to create a dropdownlist. When I use this I get the HTML as below : <select id="SearchForm_max_cost_select" style="display: none;"> <option value="0"></option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value...

0
Q: creating a drop down select with change of location

user1619177I WOULD LIKE TO HAVE ON TOP OF THE PAGE A JOB CATEGORY DROP DOWN that gets the data in a database and than according to the option chosen it redirects to a specific url but it doesn't get the right url name but to the id i wanted that it should get to /job_cat/automotive/(name of the category) an...

0
Q: How to compare aggregated field in doctrine 2 with use of queryBuilder

Hardeep PandyaI am learning symfony2 and doctrine2. There is error in my query and I am unable to find solution. I want to know how to compare aggregated column with the use of queryBuilder. $repository = $this->getDoctrine() ->getRepository('SviplAdminBundle:CouponHolder'); $qb = $re...

-2
Q: connect internet using sim300 GPRS in raspberry pi

subaI want to connect internet using GPRS using at commands.how can i connect internet in raspberry pi using SIM300 GSM/GPRS via usb serial port

0
Q: How to select the last id of grouped selected names in Codeigniter?

user2990967function retrieve_income_types(){ $this->db->where('active','1'); $this->db->group_by('Income_Type_Name'); $this->db->order_by('Income_Type_ID', 'desc'); return $this->db->get('Income_Types')->result(); } this is my model it returns the smallest id of gr...

0
Q: What's wrong with the global variable declaration in following code?

JSLoverHere is a small snippet from my code: <?php set_time_limit(0); require_once("../../includes/application-header.php"); require_once OCN_ROOT."/core/extention/pdfcrowd/pdfcrowd_config.php"; require_once OCN_ROOT."/core/extention/pdfcrowd/pdfcrowd.php"; global $active_p_tag = true; ...

0
Q: CCavenue Could not able to get the return status of the transaction?

user2615566I had integrated ccavenue in my website using the php scripts provided by the provider. i used a live card to test the transaction and its succeeded but not able to get the payment status. its not returning to the return url, its display status in the ccavenue site itself, please anyone help me o...

0
Q: Not able to understand annotations in php symfony

user191542I am having hard time in understanding annotations in php. I have few questions If i use @myAnnotation(var1, var2) private username where in the annotation definition , i can have a look what var1 and var2 are what happens by using annottaion, i mean at what point during the exution of code...

0
Q: What is the best way to build message system

吳承諺I need to build a message system, send by admin to member, this is my database schema users id primary key username varchar messages id primary key title varchar contents varchar recipients id primary key user_id int message_id int status varchaer 'read | deleted | .....' If I create a ...

0
Q: Doctrine2 Annotation

user625681I have a little problem with doctrine. I have an entity "a" with a annotation to entity "b". I configured a cache for all my results. When i make a foreach for every "a"-entity and ask for value "b" there are many queries generated. Which function will be used internally by doctrine to find the ...

0
Q: Filling a shape with other small shapes in HTML,CSS,JQuery

Sohail I want to fill in a shape dynamically with random sized & random number of balls using html, css, & jQuery. For example in the figure attached, "Figure A" is the custom shape I want to fill in when a user add a ball (Ball will actually be user pictures when he puts a comment). For example 100 ...

0
Q: sum array values there key is the same

iffyIve looked around for similar issues and none seem to fit my situation, so hopefully this wont get me all flamed for posting it. My issues is this: I am extracting some data from a mysql, then I am trying to sum up the values of the resulting array where the keys are the same. I have done this b...

0
Q: How to change picture name php header

brendanHow to change picture name in php page i have file "photo.php" which get id of a picture. and when i access link location name on title bar show as "photo.php (JPEG image, 228x228 pixels)" i want to set it name as some field. I've tried header('Content-Disposition: attachment; filename="'.$name.'...

0
Q: Get external data via form and put into url without clicking submit

user2989448I have a simple form, one text field. When submit I get data from external XML file. I Need to put the data from external XML into url for further search action, without clicking submit. This is my code: $url = 'website.com/name.alx?k='.$_POST['text']; $xml = simplexml_load_file($url); $c = ...

0
Q: Rendering php file in twitter bootstrap

Bran AlgueI'll try to keep it simple. I downloaded bootstrap template. It has contact.php file along with a bunch of html files. I use node.js app that I deploy on heroku. The problem happens when I go to contact item: it suggests me to save that php file instead of opening it in a browser. My web.js file ...

0
Q: How to use double quote and plus sign in url parameter php?

Manish MalviyaI am using double quotes, plus sign, & sign and many more special characters in url parameter mysite.com/Screen Size-5.5" i have done urlencode for 5.5" $var = urlencode(5.5"); it is not working in this case. i have to do double urlencode in case of & sign. mysite.com/Brand-Barnes+%26+Nob...

0
Q: Didnt receive any mail from My Website...?

Anup KaranjkarI am working on simple website but facing some problems with contact form, I try all type of settings but Its didnt work. The problem is When I fill form and press submit button then It will be shows "Message sent successfully" But I cant receive any mail to my mail ID. So What Can I do...??? ...

0
Q: About facebook api /user/posts and application users

Minkyu KimI'm developing website using facebook, twitter api based on php. I want to get someone's posts, so I used this api /someone/posts and I got 'someone's posts. But I want to get all users posts at once that use my Facebook application. So, there is my question. Is there exist getting all user...

0
Q: Joomla 2.5 Strict Standards

Joey Ng'etheI have this website i am building with Joomla! 2.5. It is a shopping cart and i was building it on my Xampp bu the minute i uploaded it to my server, it doesn't show anything on the front page. The admin section is okay but the front page doesn't show anything. When i turn on error reporting for ...

0
Q: how to download csv with hebrew values in php

zion ben yacovi a csv string built from data from my DB for example: id , name , description \r\n 1 , zion , cool \r\n 2 , hebrew name, hebrew description \r\n anyway, the hebrew words display as gibrish in the csv file i download. note - i dont save the file in my server and then provide a link so no fput...

0
Q: Use/get default image from server if no file is uploaded

user2978990Hi i have a form which ask the user to upload photo. is uses the photo as second image(image on top of another) in imagecreatefromjpg and imagecopyresampled. but it seems like the uploaded image is not being get properly. also the default image is not passed from the server when no file is upload...

0
Q: nginx with php-fpm or standard LAMP in heavy load sites

Danny ValariolaI'm currently using Nginx with php-fpm 5.4 (Centos 6.4) I want to switch to standard LAMP installation with OpCache for performance improvement. I decided to go with Nginx initially because it's very lightweight and can handle load, but now that all my static resources comes from CDN (amazon / ...

-3
Q: difficult to understand the result of using loop within loop

C-Linkfor ($i = 1; $i < 3; $i = $i + 1) { for ($j = 1; $j < 3; $j = $j + 1) { for ($k = 1; $k < 3; $k = $k + 1) { print "I: $i, J: $j, K: $k\n"; } } } Here's the output: I: 1, J: 1, K: 1 I: 1, J: 1, K: 2 ...

0
Q: How to add upload script

user2991153I am just a beginner and need your help. I made an upload script (MySQL), but the image/file needs to be uploaded. I don't know where to place the upload part of the code. This is my code: <?php error_reporting(E_ALL^E_NOTICE); if ($_POST){ $query =...

0
Q: How I can use the Autoloading in PHP?

Tarasovhi i learn php now and I test the Autoloading but it don't work. I have two files: start.php and myClass.php. The files I have in the path ./xampp/htdocs and I want If I start start.php use the Autoloading for include the myClass.php and this functions. here my Code: start.php <?php func...

0
Q: Twig Navigation done right (appending variables to render)

jeroenvisser101I was trying to get a navigation to work in symfony using twig. It didn't work as I expected. I want a service or another controller to provide the navigation.items, so I don't have to include it in every response object. So that if I'd render like this: ... return $this->render('AcmeDemoBun...

0
Q: PHP server time-based instruction

Tim BanonIm a seasoned dev that just wants to know if PHP is capable of setting variables at certain times of the day. For instance, I have a video of the day widget which I can manage on my own by changing the WHERE id='$x', but I'd like $x to $x to be randomized like executing ORDER BY rand() LIMIT 1. T...

0
Q: can't declare localStorage with onClick

user2978378It can't handle the code below, I don't know why: <input type="button" value="Map" onclick="open_win(); localStorage.setItem("mapSelect", "map1");"> I wish to declare the localStorage variable when I press that particular button. Can I do this in another way?

1
Q: Benchmark memory usage in PHP

Alma DoSO, Specifics Let us suppose that we have some problem and at least two solutions for it. And what we want to achieve - is to compare effectiveness for them. How to do this? Obviously, the best answer is: do tests. And I doubt there's a better way when it comes to language-specific questions (f...

0
Q: how to insert white space between xml tags when database value is null

sunnythi is part of xml file. the inner values are fetched from database table and inserted in xml file dynamically. when a field value is null or empty in database the result xml tag looks as in case of LabTestsNo tag. and I get the <Code>141113-0001</Code> <EntryDate>14-11-2013</EntryDate> <L...

0
Q: PHP ~ Cannot use a scalar value as an array

user2991218Heey, Can some one help me with this code with a error on scalar value as an array? $getal = $_POST['getal']; For($teller=1; $teller<=11; $teller=$teller+1) { $uitkomst[$teller]=$teller*$getal; } Thank you :)

0
Q: custom wordpress comment form html

LordZardeckI would like to modify the actual HTML of the comment forms in WordPress. I know of the comment_form() function that WordPress provides, but it doesn't actually let me modify the html of the form. What I'm specifically trying to do is make a bootstrap responsive form, which is not possible with t...

0
Q: vtiger - magento synchronization error

user2935780I am new in vtiger CRM.I want to synchronize vtiger CRM and magento site.I am installed magento and vtiger synchronization modules and enter details in synchronization settings page.But it shows not synchronizing.How can I change it?Any one please help me

0
Q: How to Wordpress dynamic url prefix based on taxonomy

Knskan3I'm developing an offers site using wordpress. We are trying to offer different offers regarding the city. So we have two taxonomies (category and city). The thing is that I don't want to use the normal url structure, I wish it could be: root -> http://site .com/city-taxonomy category -> http...

0
Q: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/xyz.php on line 336

user2896851See i am gettinf this error.it works fine on wamp.i kept db values still getting error.... My results shows no results Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/thecowk5/public_html/thecs/medical_salerpt1.php on line 336 Date Patient Name Medici...

-1
Q: passing parameters to URL using PHP in a loop

rondI am trying to write a php script to pass parameters to a URL dynamically and then parse the URL(JSON output) to store in a database. I am a newbie to PHP and would like to know how can we pass dynamic parameters to a URL within a loop to store the minute level information on a daily basis. A sam...

0
Q: Jquery UI Autocomplete get data from another select

Martin IvanovichI want to have an jquery ui autocomplete to get the data from certain mysql tables. So if the html select is from email, it will send param to the php to get data from email table. if handphone it will send the param so the php select different table. However, the script seems to send only the 1...

0
Q: Course recommendation for writing a CMS

user2987972hey guys i'm looking for a course to buy or youtube videos for writing a CMS on my own can you recommend me anything that can help? thank you

0
Q: custom php.ini - nothing seems to work - what do you suggest? FastCGI-php mode - allow_url_fopen OFF

johnI need to modify the allow_url_fopen value from OFF to ON i have an hosting account on a shared hosting which uses linux and plesk... php is running as fastcgi and safe mode is off. this is the only way i can use this server (except i can switch on php safe mode) according to phpinfo() php.ini fi...

0
Q: How to find out if the key value is existed in an array using PHP?

Rochelle CanaleI have a question I need to find if the value of key in an array is existed in PHP and get the index value of it. Example I have this array: Array ( [0] => Array ( [restaurant_id] => 1519 [new_lat] => 14.63807 [new_long] => 121.03158 [...

-1
Q: How to get output of a php file in separate html form at the middle of screen of lesser size

Sekhar BhattacharyyaHow to get output of a php file in separate html form at the middle of screen of lesser size. See tyhe below part. It is not working. Help pl. </head> <body> <form> <!-- This is the other part of form here.....--> </form> <!-- I want to get the out put of below ...

0
Q: Yii - Dropdown will not retain the selected value after onchange

sftdevHow can I retain the item and value of the selected from dropdown list after selecting? Let me show you first my code: <select id="categories" class="select2-select-00" onchange="getData(<?php if(isset($_GET['student'])) echo $_GET['student']; ?>);"> <option selected="selected" value="<?p...

0
Q: The result of array_unique

sergioWorking with DateTime in projects again have a problem with duplicating if use array_unique to array which have a elemts of object,(but probles only with DateTime), see code: class simpleClass { public $dt; function __construct($dt) { $this->dt = $dt; } } $dateObj = new...

0
Q: Assigning array of objects in smarty

CodeMonkeyI want to use a loop in smarty to read an object value which i will be passing from controller later on. {foreach from=$foo->bars item=bar} {$bar->product->name} {$bar->code} {/foreach} To initialize this, i wrote the following code in smarty file: {php} $bar1->product->na...

0
Q: Dynamic page creation PHP + MySQL

user2991257Been struggling with this problem for a while now and I just can't het my brain to understand it. I have a very simple website where I can add items in a database. There is a list on index.php where the list is displayed and each item needs a url that directs to a "more information" page. The ...

0
Q: PHP MySQL - Notifications panel, update DB when dropdown is clicked

user2910809I have a simple dropdown menu which displays notifications for my users. When there is a notification for the logged in user that was created before the user last checked their notifications (stored as notescheck in my user table), the notification drop down is highlighted. I want notescheck for ...

0
Q: foreach for a large table with less memory used (yii framwork)

Yaakov SwissaI have a website on yii framework and i want to search a table for a matching words but i keep get "out of memory" (is large table) so i try this code but its keep loading the page $dataProvider = new CActiveDataProvider('Data'); $iterator = new CDataProviderIterator($dataProvider); foreac...

-4
Q: Want to create online customizable post card for print

Arjun Solankii want to create a online customization functionality for the postcard website. and after customization i want to save the output as pritable media file TFF or else for better printing resolution. here is the example of the editor that i want to create please guide me how i can create large size ...

0
Q: PHP FFmpeg not working in windowxp and on live website same code working in ubuntu

Kamani RahulHere is my script i want to work in all case : Its working in only ubuntu but not in all case like windowsxp Please suggest me... // where ffmpeg is located, such as /usr/sbin/ffmpeg $ffmpeg = 'ffmpeg'; // the input video file $video = "upload/uploads/movies/animations/dho...

0
Q: how to take from the space next name with PHP?

Arman KaraPHP and my database "name" bird have a table named "surname" I'm going to a table. Example: the person named Arman Land "Void after the first or second name surname'll put the statement" So, first and last name "names in my table" I'm from the space after the name or the surname of the next nam...

0
Q: Variable assignment in function call

whyscreamI inherited a php codebase that contains some variable assignments in function calls: <?php function some_func($foo, $state) { .... } some_func("random stuff", $state = true); ... some_func("other stuff", $state = false); ... ?> I did some research and some tests, but I can't find out what ...

0
Q: Symfony2 .htaccess should also check if the requested file exists in a subdirectory within web and serve it

daggerI want to extend the following .htaccess rewriteCond to also check if the requested file exists within a subfolder in web (and serve it, not redirect - but serve the file) # If the requested filename exists, simply serve it. # We only want to let Apache serve files and not directories. RewriteCo...

0
Q: RegEx, preg_match_all and filter domains

Andon IvanovFor several hours I'm trying to ride my fair one script and end up almost ready, but it gets weird problem. Attach a piece of code to get an idea what I mean. $sep = '\.com|\.tv'; $string = 'sub.sub2.sub3.tv-bole-el.com'; $pat = '~[-[:alnum:]]{2,}\b('.$sep.')\b~i'; preg_match_all($pat, $string...

0
Q: How to replace an array value using a condition (PHP)?

Rochelle CanaleI just want to ask how can I replace an array value if I am using a 2 dimensional array? But the hard part for me is I need to find if there's an existing ID value of the array. And that array is the one I need to replace with my new array. Here's my code supposed that we have this ouput. Array...

0
Q: htaccess rewrite rule accesing folder without redirect

Mando MadalinI have an root folder like this: ROOT |- Service | |- Admin | |- Service 2 I'm interesting in accessing the admin folder from service folder To access the admin path via url i use mydomain.com/Service/Admin Is there any way to make it access like this mydomain.com/Admin without moving folde...

0
Q: Sort single dimensional array & keep keys & values relation

Ramesh MhetreI have a array both key & value are string like $myArr = array('ball'=>'zebra', 'tree'=>'plant', 'zoo'=>'animal'); I need to sort array by its values and keep key, value association, so output would be like $sortedArr = array('zoo'=>'animal', 'tree'=>'plant', 'ball'=>'zebra') I am looking for sh...

0
Q: Doctrine 2 Common 2.5 - where is the Cache classes?

Adam BlokI use Doctrine 2 in my project with ZF1. Because I've got quite old version of Doctrine, today I'd like to update it. I've checked the Common package: https://github.com/doctrine/common/tree/master/lib/Doctrine/Common but I see the whole "cache" directory with classes for caching just disappear...

0
Q: php auto-relpace link css

Ing. Michal HudakI have MVC structure where I load view. In view I use BASE_URL constant to adjust CSS and JS links to my defined folder. I want to remove BASE_URL from links but still loading files from that path. My template folder path: http://website.com/project/template/default/ $template = 'default'; BAS...

0
Q: Twitter update statuses only working with my account

doriancamiI'm trying to create a tweet posting application based on a twitter OAuth login and a jQuery ajax call which send data to the tweet sender file. Unfortunately, i can post a tweet only from my personal account, not with others. Here is my code : $.ajax({ url: 'assets/twitter/sendTwe...

-1
Q: Property "CWebApplication.clientScript" is read only

Michel PhelpsContoller public function actionSend(){ Yii::app()->clientScript->registerCoreScript('myplugin'); $this->render(); echo 'submit'; } main.php 'clientScript' =>array( 'packages'=>array( 'myplugin'=>array( 'baseUrl'=

0
Q: Ordering By Another Table Column If Exists

AllerionI'm putting together a simple forum script with topics/posts. I'm trying to order topics by latest post and I've had some luck with the answer in the following question: MYSQL Order from another Table, but the problem I have is that some topics don't have any posts yet, so the query doesn't selec...

-6
Q: php to replace 2nd line with sum of this line

user2991308I want to replace a numeric line with sum of this line from 1 for example this text.txt 11 2 22 I want to be 11 3 '(2+1) 22

0
Q: PHP: Call parent magic method from function of same name

michaelward82I am using an ORM class - each table in the DB is represented using a subclass of the ORM class. I am using PHP interfaces, and I wish to specify which methods (db fields) are required in some of my ORM subclasses. Adding a function to an interface requires the method to be explicitly declared i...

0
Q: How to place database results in ScrollBox

Hashey100I am trying to place my database results into a ScrollBox but im having a difficult time, I was checking online and it was saying that i need to use the scrollbox:auto function. But i tried add it too the CSS regarding the table for which the database results go in but it did not work and just d...

0
Q: MySQLi Transaction Server gone away

ChrisI use the following code to insert some orders in the DB with a mysqli transaction. Sometime it works without any problems and sometime it just throws an error after 1 minute saying: "Mysqli Server gone away". When I trigger the same thing just after the error it just works. The php file is trig...

0
Q: how can I build the mysql bind_param() in a group of selects dynamically?

user2933000I have to generate differents sql SELECT statements for each different possible outcome. My question is how can I build the $stmt->bind_param() and how to output the result? Thanks $tipoCategorias = array( 1 => 'ID_CAMARAS,ID_PRODUCTOS_OFERTADOS,ID_CATEGORIA,MEGAPIXELES_CAMARAS,Z...

0
Q: Remove php extension from URL - except one and only one URL using htaccess

pedroteixeira07I'm using this code to remove the .php from the end of my URL's making them more SEF. RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/(.+)\.php[^\s]* [NC] RewriteRule ^ /%1 [R=301,NE,L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^ %{REQUEST_URI}.php [QSA,NC,L]...

0
Q: Why are there 'ObjectInstantiationNotAssigned' violations in Sonar (PHP_CodeSniffer) with a PHP project?

VicenteWhen running Sonar analysis on a PHP project, I can see 'ObjectInstantiationNotAssigned' violations thrown by PHP_CodeSniffer. These violations occur when there are object instanciations directly in a function call. For instance: $anObject->setProperty(new AnotherObject()); These violations c...

0
Q: Codeigniter PDF displays in unreadable format

user2991258In the below codeigniter i have placed the controller.Now i have placed a PDF file in a view and i want to call the PDF file from the controller.but it displays like unreadable format (ie) ÄQ°ùÂ/B‘]xJxyEÆ›Vòþ˜X‚X ð?¼—ä*î7îç·JÚ–ÎÐhK*_ÝüÊ®ˆ¯=»W'{(. Controller: <?php class Help extends ci_contro...

0
Q: How to get rid off the PDF Crod library error "Pdfcrowd Error: [6] name lookup timed out"?

JSLoverI'm using a PDF generator class written in PHP called class PdfCrowd. When I'm generating the PDF using this library I'm getting the error message as "Pdfcrowd Error: [6] name lookup timed out" on a blank page. Is there anyone who know how to resolve this error? Any kind of help would be greatly ...

0
Q: create a css dynamically using image and hover image

PHP_USER1<style> .n1{background:url(../images/no.png); width:110px; height:29px; float:left; margin-top:6px } .n1:hover{ background:url(../images/no-h.png); } </style> I have defined it in between head . I am working in a php language . In my database there are normal image and a hover ima...

0
Q: Best method to find rank of a particular user for large number of records

user2648239I am creating a project which displays rank of each user on their profile based on their points. I searched online and found two methods to get rank: Get points of a particular user and then write the following code to get rank. SELECT COUNT(*) FROM urank where points>3306; ...

0
Q: Cleaner code when using alternative syntax and associative arrays.

samIm writing a foreach loop for my view using the alternative syntax, to get a piece of html like this <h3><a href="post.php/?id=1">My Post</a></h3> Ive used the line below, but it seems awfully clunky with all the concatenation. <?php foreach ($index_posts as $post): ?> <h3><?= "<a hre...

0
Q: modify google spreadsheet php code

Chavan ParmeshwarHere I am writing the PHP script to modify the value of existing spreadsheet. I am using spreadsheet.php <? #from php-form-builder-class class Spreadsheet { private $token; private $spreadsheet; private $worksheet; private $spreadsheetid; private $worksheetid; public function __construct($user...

0
Q: Latitude and longitude from hexadecimal value

Sujathan RHi I need to convert the response value from a GPS tracker to latitude and longitude.The response value is in Hexadecimal format and the document says the latitude and longitude will be measured in degrees with a 1x10^-7 degree lsb, signed 2’s complement. For example: Hexa Binary ...

0
Q: onchange function takes time to refresh the page

arokiaI having the drop down box in that i am showing data from database, when i select any data it no refreshing the page quick when its selected but it refresh the page after 5s ,can anyone help me how to fix this, below is my code Javascript: $(function() { document.ready $("#client").on("...

0
Q: PHPUnit_TextUI_Command test all tests in path without --configuration

jakenobleI am using PHPUnit_TextUI_Command in the following manner $path = 'a/path/to/phpunit.xml'; if(!file_exists($path)) throw new \Exception("Cannot read PHPUnit config file at '" . $path . "'"); $argv = array( '--configuration', $path, ); $_SERVER['argv'] = $argv; \PHPUnit_TextUI_Command:...

-1
Q: Query not working in online phpmyadmin, works in offline and on site

user1045280I have the following query: SELECT DISTINCT NAME FROM Events t1 LEFT JOIN UserHistory t2 ON t1.Name = t2.Event AND t2.ID = '$usernum' WHERE t2.Event IS NULL This works on phpmyadmin locally, as well as on the actual published website. However in phpmyadmin on the server where the website is pu...

0
Q: ZF detect file SRT as audio/mpeg mime type

JoDevI having some troubles using this piece of code : $fileTransfer = new Zend_File_Transfer('Http'); $fileTransfer->getMimeType('f_subtitle_file'); I'm sending a .srt file, encoded into UCS-2 Little Endian, and I expect to get text/plain mime type... But instead I get audio/mpeg! And if I co...

0
Q: How to echo dinamically selected categories from back-end in front end in wordpress

AdrianI have in functions.php //Example of select field $this->settings['select'] = array( 'section' => 'general', 'title' => __( 'Example Select' ), 'desc' => __( 'This is a description for the drop-down.' ), 'type' => 'select', 'std' => '', ...

0
Q: Yii: Force authentication with given username and password

Ionut Flavius PogacianIs there anyway to force yii to authentify a user by a given username without consulting the database? My app will use a api to login and until that api is not written, we cant use the app. Beacause of this api we don't have a user model so, the authentication process cracks when trying to use ...

0
Q: Something goes wrong with filter, not saving data

Arvis AvensI made some code for filter my prices, but its not save that filter, i post information, and when i refresh, all lost. And its show only one page for filter, i know the are more items, but it show only one page. if(isset($_POST['sort'])){ $cena_no = trim($_POST['fl_cena_no']); $cena_lidz...

0
Q: How to get the image value in rss <dc:image><url>

user2991392I need to parse the image value in dc:image. below is the rss xml. Windows 8.1: Visual Tour http://www.informationweek.com/windows-8/windows-81-visual-tour/d/d-id/1005561?f_src=informationweek_section_267 <dc:creator>Michael Endler</dc:creator> <dc:image><...

0
Q: Google ping failing - cURL

Darren SweeneyI'm trying to ping Google when I update a Sitemap but always get response '0' Here's what I'm trying: $sitemapUrl = urlencode("http://testsite.com/Sitemap.xml"); // cUrl handler to ping the Sitemap submission URLs for Search Engines… function myCurl($url) { $ch = curl_init($url); cur...

0
Q: select multiple with JsonWireProtocol

koralI use own library for functional testing in PHP, it's based on JsonWireProtocol. I have an select element selected by id and I need to select 2 options from this element. I know how to select singe element - I just find desired option and click on it. But it's impossible with 2 options as second...

0
Q: How to integrate facebook or google oauth login systems with our existing website's login system

Ashwin PathakAfter reading the facebook, google documentations and some researches i have got to know that how to work with OAUTH and how to get the user data from facebook, google. But now when it's time for me to integrate the application with my existing website's login system which has id | name | email...

0
Q: Is the URI the only way to send data to the web server?

XegaraIn order to send data to the web server via GPRS and after the GPRS module is configured to IP and TCP mode, is sending a URI the only way to send data to the web server? Also, what does the transparent mode do(AT+CIPMODE=1 // Transparent TCP mode)? And what would be the fastest and most efficien...

0
Q: php attached file size is zero

Shahzebi am trying to attach a file to an email and want to send it as attachment , following is my code. To read the file if (file_exists('/home/folder/upload/' . $this->fileUid.'.'.$this->extension)) { $fp = @fopen('/home/folder/upload/' . $this->fileUid.'.'.$this->extension,"r"); $data = ...

0
Q: Symfony 2 - Add new article comment

ServietskyI'm trying to add comments to articles with Symfony 2 but I get a white page when executing the POST. Here is the controller : public function articleAction($id) { $repository = $this->getDoctrine() ->getManager() ->getRepository('PortfolioPor...

0
Q: stopping loops in php(break and continue not working for me)

PHPnoobI have some series of loops in my php for an example //select statement while (gyu_fetch($acaYear_results)) { $Year = gyu_get_col($Year_results,0); $page->main .= '<option value="'.$Year.'"'; if ($Year!="" and $Year==$Year) { $page->main .= ' selected="selected"'; } ...

0
Q: how to get id of the table column when clicked on image in php?

RonnyRulesWhen someone clicks the image, I want to get the id of the column where the image is stored in the mysql database and use it to show other data in a different div. But i dont know how to do that. Here is my php code: <?php $blog= mysqli_query($con,"SELECT * FROM blog"); while ($row = mysqli_f...

0
Q: Cannot Install PEAR folder inside PHP version 5.3

RakhiI have an IIS7 server installed as Remote where I have installed php, everything is working fine but inside my php folder PEAR folder is not present, because of that I cannot receive a mail through smtp, Also after doing lot of googling which said to install pear i require gp-pear.php file which ...

-2
Q: PHP include condition in if only when criteria matched

user2991576I want to build an if then statement with criteria including/excluding the final criterias. Example : $vanilla_on=true; $sugar_on=false; $flour_on=true; $vanilla=10; $sugar=2; $flour=100; // As I set $vanilla_on to false, it doesn't appear in my if statement, if it was set to true, it would b...

0
Q: Joomla menu item

nitro29I want to create a subtitle option for menu items in Joomla (an alternate layout), so a menu item displays with its title and subtitle. I imagine this can be done in many ways, including: 1) Altering menu item layout in Joomla and adding a subtitle input field, telling Joomla to display this sub...

0
Q: PHP mailer connection error

user2870941I am getting following error: SMTP -> ERROR: Failed to connect to server: Connection timed out (110) The following From address failed: test@gmail.com : Called Mail() without being connected What is problem in my code or any other problem? My openssl is also enable I am doing following coding:

0
Q: nginx remove .php from mu url adress

MakromatI have problem with remove .php from my url adress. I will happy for every opinion! Thanks a lot.... server { listen 80; server_name example.com; return 301 $scheme://www.example.com$request_uri; } server { listen 80; root /usr/share/nginx/www; index index.php; ...

0
Q: Email not received after completing the email form

user2983295Ran into a problem with my coding. I have an e-mail form which somewhat works. I tried to search for answers in the previous questions here without luck. Also tried to fix it, no luck again. I can send the email and it says Email sent, but I get no data to my email. I'm out of ideas. Here is the ...

0
Q: Some troubles with facet search

Andrey TarykinI started develop facet search in my project. As example how it should work I took asos.com. As engine I use mysql for no fulltext search and sphinx for fulltext search. For faster search I denormalized data in db and created special table for this. CREATE TABLE `item_search` ( `id` int(10) un...

0
Q: Get the difference of two column in two different tables?

user2991590My sql codes execute but I don't know how get the difference of purchase_request total_qty and purchase_order qty. Table Purchase_Order counter | qty | --------------- 100001 | 10 | 100001 | 10 | 100001 | 10 | 100004 | 30 | Table Purchase_Request counter | tota...

0
Q: Bootstrap multiple choice

user1045280Im trying to bootstrap a mulitple choice tickbox for PHP. I have the following code: <div class="container"> <div class="row"> <div class="col-lg-6"> <div class="input-group"> <span class="input-group-addon"> <form action="catcheck.php" method="post"> <input type="checkbox" name="check_list[...

0
Q: Pop up div form using a button

user689017I have the following line of code : <?php foreach($prescription as $process){?> <button id="issue"> <?php echo $process['medname'];?> </button> <?php }?> On the click of the button , the following div form should pop up <div id="dialog-form" title="Create new user"> <p cl...

0
Q: Form Registration not getting a error

Mojtabaso i edited my code but still unable to get the results part of code is responsible for reporting error that do not work too i'm open to other ways of coding to do the work as long as it fits in the code here comes the code <?php require 'core.inc.php'; if(!loggedIn()) { //check miku...

0
Q: Restler 3.0 framework on IIS

user2122784I am trying to run the Restler 3.0 framework on IIS, but I don't get the examples to work. First of all I solved the 'REQUEST_URI' issue on IIS by adding the following code: if (!isset($_SERVER['REQUEST_URI'])) { $_SERVER['REQUEST_URI'] = $_SERVER['ORIG_PATH_INFO']; if (isset($_SERVER['QUER...

-1
Q: transfer files of any size without uploading to a third-party server using php

Newbie123I searched on Internet regarding file transfer from one place to other and found that we need to upload files and then share link with friends. Then my friend can download the file using that link. I want to transfer files of any size without uploading to a third-party server using php for my pr...

0
Q: Check if a variable is Saturday or Sunday

user2955523Hello i'm trying to get a script to work that check if $acdate is a saturday or a sunday, if it is it should alter the current class with a new one. But i don't get it to work for some reason and i have tried different methods, search for possible answers to get it to work but in the end i had to...

0
Q: Looking for assistance on joining queries in CodeIgniter

Todd JenkI'm having trouble joining two activerecord queries together. The uncommented code displays what actually works and the commented out code displays what I thought should be the code. Obviously the commented out code needs to be in the loop. $musicQuery = "album1,album2,album3,album4"); $albums ...

0
Q: How t change the color of column data in table with twig?

MONTYHS{% for item in items %} <tr> <td > {{item.generated_on| date('d M, Y')| default("")}} </td> <td> {{item.number}} </td> <td> <ul> ...

-1
Q: Fatal error: Call to a member function setFetchMode() on a non-object

RamkumarI am getting this error in PHP: Fatal error: Call to a member function setFetchMode() on a non-object Source code: <?php $c1=103;//customer ID $c2=104;//customer ID try { $conn = new PDO("mysql:host=localhost;dbname=stored_procedure_examples","root",""); // execute the stored procedure $sq...

0
Q: retrieving post values from form with dynamic element names

MsKazzaI'm trying to retrieve the post values from a form where the element names are based on values from a recordset. Here is the form: $recordID = $_GET["recordID"]; $colour_result = mysqli_query($con,"SELECT colour_variation.*, colours.* FROM colour_variation INNER JOIN colours ON colour_variation...

0
Q: Home page is not loading without index.php in url, example.com/index.php

Philip SamsI am using cakephp , Now the home page shows a white blank screen when I load the root domain name eg: conia.net. But the page is loading when we add index.php to the url eg: conia.net/index.php. Please help me to resolve this.

0
Q: PHP MySQLi calling 3 different procedures error

user2989145I want to call 3 different procedures in one connection but i still get error Fatal error: Call to a member function fetch_object() on a non-object but calling one at a time works for every call. Code bellow:: $sql1 = "CALL `something`.`proc_something1`(4,10);"; $sql2 = "CALL `somet...

0
Q: How to find definition in smarty

StalinkoI'm not so familiar with smarty. In the code I'm exploring I have found such construction: <a href="{url a.category=$bcm_content.category_url a.subcategory=$bcm_content.subcategory_url a.nice_url=$bcm_content.series.content_nice_url item}?nord#header" title="...">...</a> Can't understand, how ...

0
Q: How to integrate wordpress functions inside codeigniter view pages?

Eli_junI have able to set up to run ci pages and wordpress separately but putting them together inside the codeigniter folder. I have followed a tutorial for ci and wp integration but it just that you can integrate wordpress inside the codeigniter framework yet they will just work separately and not the...

0
Q: Dynamic Navigation?

LeoCurrently for my projects I create the navigation for each page manually and it looks something similar to: <nav> <ul id="mainMenu"><!--Main Menu--> <li><a class="active" href="index.php">Home</a></li> <li><a href="contact.php">Contact</a></li> </ul> </nav> This works fine, howev...

-1
Q: Php assign variable to an array

akarshaI am a Php beginner, and my problem might be pretty basic although i can't seem to fix it. $xyz='hi'; for($i=0;$i< count($profile);$i++) { $array['rows'][]['c'] = array(array('v' => 'hello' ),array('v' => "170735"),array('v' => "3107")); } I have the above array and I want to assign ...

0
Q: Joomla submit a weblink url

user2991239I'm trying to give the url input a value so that people dont have to type http:// (if you dont do that the link does not work) i've tried the setValue in the edit.php file. <?php echo $this->form->setValue('url', null, 'http://');?> but i get a 1 behind the input instead in the input. i'...

0
Q: init tinyMce from other file

IsraGabI have made some classes that initialize tinyMce ex: var tinyMce_reader = function (rp_documentPath, objectID_arr){ this.objectID_arr = objectID_arr; this.idx = 0; this.rp_documentPath = rp_documentPath; this.doc_sent_arr = []; this.doc_modif_arr = []; } tinyMc...

0
Q: Formatting problems for strings representing numbers, especially integers

Lorenz MeyerThis is quite a simple problem, but I don't see a simple and straight forward solution. I have values that represent numeric values, but are strings. Examples: 0.0, 1.0, 10.0, 1.1. Most time they represent integers, but there can be fractions. I want to display these numbers as 0, 1, 10, 1.1. ...

-1
Q: Split each array elements in specific places in php

user2991676I have a array output as follows in php /var/www/queryfiles/1_r_1_d.xyt /var/www/RIGHT_d/1_r_1_d.xyt 499 /var/www/queryfiles/1_r_1_d.xyt /var/www/RIGHT_d/3_r_6_d.xyt 6 /var/www/queryfiles/1_r_1_d.xyt /var/www/RIGHT_d/6_r_2_d.xyt 5 I need to get output as follows 1_r_1_d 1_r_1_d 499 1_r_1_d 3_...

0
Q: PHP DNS resolver

nutella_eaterI need to resolve dns. Here is my cmd command: host -a google.com 8.8.8.8 or (host -a s4.artemisweb.jp ns0.domain_name.com host -a s4.artemisweb.jp 77.88.8.1) and it returns something like that: root@min /etc # host -a google.com 8.8.8.8 Trying "google.com" ;; Truncated, retrying in TCP ...

0
Q: Is there a way of effectively identifying/extracting headers from a table : Perl

UtopiaI am trying to write up a perl script to generate a xml from a arbitrary tabular data which is available in a text file. For discussion sake lets say that I want to take the output from linux command df -k and parse it to my perl script and generate a xml on the fly. Sample check_disk_usage...

0
Q: More information from PHP error_reporting

LennartI have automated my error_reporting process. Errors are logged to a file and periodically sent via email. Problem is I don't get enough information. E.g. I can see a undefined index notice; but I can't see where it was triggered as often its an included file. Is it possible to get a dump of $_S...

0
Q: A YAML file cannot contain tabs as indentation

eddard.starkThis is my first working with symfony 2. All I am trying to do here is whenever the user clicks on the submit button he will go to another page. But my index page isn't loading. They are saying there is something wrong with my routing file. I don't know what I have done wrong. Here is my routing...

0
Q: Android/PHP - Protect client-server communication from leaks

FeFei'm developing an android application that communicates with my server. That server provide informations through a get (or post), and the application display these informations. The question i want to make is if it's possible to make this connection "safe", i mean, i want to provide informations ...

0
Q: jqGrid for PHP - setGridParam with postData and reloadGrid

user2360915I have 2 grids (same as the example in the selection example here http://www.trirand.net/demo/php/jqgrid/) and the first grid use localdata, and the second grid should access my database. Code of the first grid : require_once 'jq-config.php'; // include the jqGrid Class require_once ABSPATH."ph...

0
Q: Ajax pagination links customization

Ayoubi'm using a web module for ajax pagination in wish the pagination links content is set from the begin (once the page is loaded) and the data content (data to display) is loaded using ajax (page per page), once you click the page link the content data will be changed. the problem is that i want to...

0
Q: all combination between 1-7 without any duplicates

user2856734I found this here PHP take all combinations I modified it further to include n number of sets to the given array. However i am not able to figure out how to not get any duplicate numbers in a set. for example If the output is 1 , 1, 3, 4 then it should remove the extra '1' and give it as 1,3...

0
Q: All Plugins Deactivated and Cannot Install The Plugins in WordPress

Michael ChristiWhen I login into wp-login (WordPress 3.6.1), I found that all my Plugins are deactivated. Error message after wp-login: The plugin user-locker/user-locker.php has been deactivated due to an error: The plugin does not have a valid header. Then I try to install any Plugin, but failed. Error me...

0
Q: how to get php data at javascript variable

Sekhar BhattacharyyaThis is a php file below named getques.php at server. In this php file, the variables subnm1, chpno1 and qnumber1 are posted from a html-javascript file from client side. With these, a database at server is accessed and the output of SQL query is stored in a variable $px. <!DOCTYPE html> <html>

0
Q: Symfony2: InvalidArgumentException with Command folder

svprdgaI have a Symfony2 application. In one bundle, I have a command class inside a Command folder; then, when I try to execute: php app/console doctrine:database:[something] I get: [InvalidArgumentException] There are no commands defined in the "doctrin...

0
Q: php determine if a range of dates fall on a weekend

danyoI am building a a script to detect whether or not certain dates fall on a weekend every year. The 25th and 26th are bank holidays, and if they fall on a weekend the next weekday is a substitute for that bank holiday and the remaining weekdays are working days. Example: if the 25th is a saturda...

-1
Q: Dynamically add custom option file which is already uploaded in magento while adding product to cart

karthikI'm working on a project that has online print option. So user need to upload their image from product view page. Currently we are having that feature as custom option file type. I have added an custom option as file type and displayed it in product view page. Image getting added in cart item af...

0
Q: how to use each output value of while loop ,outside of while loop for some other purpose

Ramkumar**Source Code:** Please help me how to use while loop outputs outside of while loop Ref Values fetch()): ?>

0
Q: Mongo result as JSON

PHPstUsing following code to convert as document to JSON is: print( json_encode((new MongoClient())->db->col->findOne())); //Output:{"_id":{"$id":"52838520f7c255c009000000"},"test":"test"} Is there any way to set Mongo to return _id field as string insetead of object? Is it safe to return _id value...

0
Q: The alert message is displaying without the login form

user2991258In the below codeigniter code i have placed the controller and view part.Now if a inactive tries to log the account it should display in active user along with login form .In my case the message is displaying without login and finally login forms disappear. Controller: function index() { ...

0
Q: How can i share cusome title and description in google plus like facebook?

Abhay DwivediI have a lot of products and want to share each one with different title and description in Google plus instead of page meta tags. How can i do that?

0
Q: Issues installing PHP 5.4 on centos

Sameed Alam QureshiThe problem is, php -v shows that PHP 5.4 is installed, and I have apache working properly with HTML files, however PHP files just displays the source of the page, and i realise this is probably a misconfiguration of apache, but I have tried every guide, tutorial and suggestion i could find, and ...

0
Q: Insert data if number of rows is greater than 0 does not work

marc_sI have this PHP function which will insert urls into MySQL, but only those which didn't exist until moment of executing. I have a problem, my if condition is simply ignored, so everything goes to database, ignoring the condition. Code is here: function storeLink($url,$gathered_from) { globa...

0
Q: Get hashtag from string and get into meta keywords and tags

Mario RossiI'm creating a kind of a blog sharing link. Basically, for each link i would extract hashtag from post string and put it into a meta tags and keywords. So, string normally is like this #helloworld #test #video #youtube Bon Iver are the best daily surprise :D Now, how can i get only hashtags a...

0
Q: Calculate time left, from Datetime in Mysql Database

Mads Anderseni got a date format 0000-00-00 00:00:00 from my database that is the expire date of a product. how can i calculate the time left? Thanks.

0
Q: Wordpress: Multiple taxonomies in same url

Knskan3I'm looking for a way to list items basing in two different taxonomies in wordpress. Let's say we have the following taxonomies: Category ( restaurants, shops, cinemas ) City ( cordoba, malaga, sevilla ) So one post could have city = cordoba and category = restaurant. I'd like to have a s...

0
Q: Posting JSON with jquery ajax to PHP

The_GuyI have a simple php file that decodes my json string, passed with ajax, and saved all in an array, but I can't keep the $_POST variable, why? I try to inspect with fireBug and I can see that the POST request is sent correctly, when the php script is called, he respond Noooooooob to me, it seem a...

-3
Q: alternative to union select or union all select in MYSQL

rummykhanUNION select is creating a lot of problem in website that are sql vulnerable, and we also need to implement in our code, so is there any way we can use an alternative of union select or union all select in our code. thanx for help in advance

0
Q: can not understand regenerating session id

Aleni have just learning session fixation attack from this atricle http://shiflett.org/articles/session-fixation but for defence of this attack i do not understand what is the usage of session_regenerate_id()? when attacker include session id in url and say to server that i want use this session so a...

0
Q: Magento Order Set to Processing but no payment received

TGuimondWe have a Magento website that processes payments using Worldpay and Paypal payment gateways. Both are using the redirect method to process payments. Yesterday a user attempted to make two orders which were both abandoned and then a third order was placed which was set to 'processing' within the ...

0
Q: Calling PHP Web service via ajax in jquey mobile

user1581939I'm developing mobile application in Jquery Mobile.Its containing only html fils.I'm going to get data from server using PHP.So i've used PHP native SOAP web services for this.I want get the values from my PHP fuction via web service. After hitting 'submit' button in my jquery form,the web servic...

 
12:00 PM
0
Q: display the google page rank and page number using seo stats google api(php)

Harun Thuoi have a form like this..i want to use the seo stats google api to display the google page rank and page number of any word entered in the text box.. <form method = "post" action = "pagerank.php"> <input type = "text" name = "fname" placeholder = "Enter key words...">&nbsp; <select> <option ...

0
Q: php javascript report to show line details and summary

JustStartingnot sure where to start on this one so looking to the community to point me in the correct direction. I need to create a report/view for ALL orders in our database. I can write the sql easily enough to fetch the line item details (Product, QTY,Price). I can also write the sql to return the summ...

0
Q: Nested Sets Model MySQL

Antweny SaweI need your help, i have to two tables category and category_description. With columns category ( category_id, image , parent_id , sort_order, status , created, modified, PRIMARY KEY (category_id) ) category_description ( category_id, name , description, meta_descriptio...

0
Q: php create instance of loaded model in controller

Ing. Michal HudakI have Controller where I crate object Load to load model controller.php class Controller { public $load; public function __construct() { $this->load = new Load(); } In Load I create and return instance of model: load.php class Load { public function mod...

0
Q: Error : This feature is not available for the database you are using when trying to return insert_id

user2733443I have function in my codeigniter model returning the function insert_id() I am using Oracle11g, Does anyone know how to return the last inserted record in codigniter using Oracle DB Here is an example of what I will like to do public function test_insert($data) { $this->db->insert('PERFORMANC...

0
Q: HybirdAuth User profile request failed

GunsI am using HybridAuth2 with CakePHP and my controller function is as public function loginwith($provider) { // $this->autoRender = false; require_once( WWW_ROOT . 'hybridauth/Hybrid/Auth.php' ); $hybridauth_config = array( "base_url" => 'http://' . $_...

-1
Q: attendance track management for employee joomla

user2991890i am a php joomla developer. am going to install attendance management system on my joomla site but there is no open source plugin for this attendance management. so can anyone please tell me the best open source plugin for this attendance management. Joomla attendance management system for emp...

0
Q: How to get php data in javascript

Sekhar Bhattacharyyaphp code is below. It is just about communication. <!DOCTYPE html> javascript code below. This has to get the variable $px. <html> <head> <script type="text/javascript"> var abc = "<?php echo $px ?>"; alert(abc); </script> </head> <body> </body> </html>

0
Q: Laravel 4 where in condition with DB::select query

VictorI have next SQL query: SELECT summary_table.device_id, WEEKDAY(summary_table.day) as day, AVG(summary_table.shows) as avg_shows FROM ( SELECT device_id, day, sum(shows) as shows FROM statistics GROUP BY device_id, day ) as summary_table WHERE device_id IN (...

1
Q: Union multiple mysql queries after ordering each query result

user1621945I have two queries on the same table that need to be joined into one mysqli result. The issue that is proving to be quite unique is ordering the individual statements, and THEN merging into one result, preserving the order, so I can iterate through each result. Here is the simplified version of ...

0
Q: PHP foreach loop misses the first value of the array?

Harris GeoAfter using var_dump on the rows of the mysql query, I got 5 values a, b, c, d, e. After using the foreach loop bellow, I noticed that it returned 4 values. b, c, d, e Here is my code. while($row = mysql_fetch_array($res)){ $clients[] = $row[0]; $stats[] = $row[1]; } foreach ($clie...

0
Q: Calendar with time slot reservation

user2991684I'm very new in this site. Spend a lot of time for searching an answer for my target, but unsuccessfully. So, there it is (sorry for my english): I'm quite new in php, but already created nice stuff. But now I'm interested in calendar with time slot reservation. I saw good exemple then I registe...

0
Q: Ajax form submission error using PHP Mailer

user2991977I implemented this http://www.websitecodetutorials.com/code/jquery-plugins/jquery-ajaxsubmit.php tutorial on my form, and the form works successfully and displays the thank you div on submission. But the problem is I don't receieve any email, seems like PHP mailer is not working. Please see the ...

0
Q: how to post a link on page's timeline automatically using php sdk

user2978990Hi a have an app that asks for user's input. and generate an image out of those. I want to post the link to my page's timeline. (NOT ON USER'S TIMELINE). how can i do this using php sdk? i found this post How do you post to the wall on a facebook page (not profile). it's very informative yet i st...

0
Q: Woocommerce: Changing the text on the ratings select box in the single product page

Susan SloanI am using a custom theme with woocommerce and am looking to change the wording in the drop down select box for the ratings on the single product page. I have tried changing this area of code: if ( get_option('woocommerce_enable_review_rating') == 'yes' ) { $comment_form['comment_field'] = '<p c...

0
Q: Merging returned results from two querys for log type feature

HarryInformation I am currently making a history/log page that will show the users payment history with my website. The two tables are tasks and payouts tasks is a table full of tasks a user can complete and earn money. The columns returned that I use are tasks.title, tasks.payment and tasks.timest...

0
Q: Woothemes Listings Theme - Customising the categories panel

user1756040I'm building a listings theme in Wordpress using Woothemes Listings Theme. Out of the box the Categories listing panel in my opinion is not how it should be for a directory site. Currently it lists all taxonomies in the panel rather than just showing the category title and linking through to the...

0
Q: drawing points evenly distributed on a circle

roebi want to get the coordinates of n points on a circle with the diameter of x i tried this: <?php header("Content-Type: image/png"); $img = @imagecreate(900, 900) or die("Cannot Initialize new GD image stream"); $background_color = imagecolorallocate($img, 255, 255, 255); $red = imagecoloralloca...

0
Q: Create a custom validation constraint that will check if a word begin with an uppercase - Symfony 2

Secular KidI've followed this tutorial : http://symfony.com/doc/current/cookbook/validation/custom_constraint.html to create a custom validation constraint. I made it work, no problem. The tutorial explains how to create a constraint that will only allow a user to type alphanumeric characters into a field. ...

0
Q: Formatting the text in an e-mail

Jim RaymondSorry, still a novice but getting better. I'm building a website and because I'm not that good I'm providing a page where club members can report problems and give me enough information to look into it. I have written the PHP code to send me an e-mail. If I echo the $message it prints fine on ...

0
Q: PHP self static reference equivalent on ASP.NET

Felipe FranciscoIs there any equivalent command on ASP.NET to reference the class itself on static calls without using the proper class name as do self in PHP ?

0
Q: Menu in CodeIgniter

kilosMenu view <td colspan="3" width="60"> <div id="menu"> <ul> <li ><a href="pages/home">Home</a></li> <li><a href="pages/about">About</a></li> <li><a href="pages/staff">Staff</a></li> <li><a href="pages/chat">Chat</a></li> <li><a href="pages/championat">...

0
Q: How to enable FastCGI/FPM for PHP+Apache+Ubuntu 13.10?

user2992008I am developing several projects on localhost with Apach and PHP on Ubuntu 13.10. phpinfo() command shows "Server API" is "Apache 2.0 Handler" I want to be FPM/FastCGI. I tried to use that manual: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html but it didn't change anything. And all manual...

0
Q: No way to open local htm file in php?

martin.softproNeed to open an htm page that is located on my local disk. I'm running an application using php and xampp server. I've tried in every way and not make it. My application path is C:\xampp\htdocs\portal My htm file path is C:\sistemas\test.htm I can't move my test file and put it into portal folde...

0
Q: Countdown timer with updated target date

LejjoI have been searching the web for a long time now for this and I have not found what I'm looking for. What I want to do is to make a countdown timer so that each time it hits 0 it starts over. I am using JS, PHP and SQL db for this. Why I use db is because I want the target date to be stored so...

0
Q: PHP: Uploading multiple images to imgur at once

user1775598I've got the following code and it works perfectly fine for uploading one image to Imgur using their API: $client_id = $myClientId; $file = file_get_contents($_FILES["file"]["tmp_name"]); $url = 'https://api.imgur.com/3/image.json'; $headers = array("Authorization: Client-ID $client...

0
Q: Random football matches in php or javascript

Th3lmuu90I don't know how it happens in international football but in my country (Portugal) we have football matches divided by journeys. What I want to do is to make random football macthes between all the teams in a championship. Example: (4 teams) TeamA,TeamB,TeamC,TeamD 1st journey TeamA vs TeamB...

0
Q: How to make page blank when user access php file directly?

SabTheCoderSo I'm trying to make a theme from my Html file. And using require('file.php') where file.php is a series of different components of my theme. Now when I access the file directly, I still see the html. How do I make it display a blank page when user accesses the file.php directly? Explanation So...

-5
Q: Get parent array if any one child has key value

aryan kumarI want to get parent array item if any children has specific key value. Like: $arr = array( 'Parent 1' => array('id'=>2,'name'=>'Name 1', 'claims'=>array('orderno'=>123)), 'Parent 2' => array('id'=>3, 'name'=>'Name 2', 'orderno'=>234) ); I want to get if any child array 'or...

0
Q: Which JOIN to use

Seth ForzaI'm trying to get info from a table. I have boards and sub-boards. The column sub_id in table board tells me whether or not the board is a sub-board or not. If it is a sub-board then the id of the parent board is the value, if it isn't then the cell is null. I wrote this to display whether or n...

2
Q: Ternary operator shorthand to use subject of expression in true/false clause rather than repeating

Rodgers and HammertimeSay I have a long(ish) variable, $row['data']['manybullets']['bullets']['bullet'][0], and want to test whether it's set using the ternary operator: $bulletx = isset($row['data']['property']['bullets']['bullet'][0]) // condition ? $row['data']['property']['bullets']['bullet'][0] ...

0
Q: How to change the value of a php variable on every time page is loaded?

PradeepI have one variable as $pwd="abcd"; I want this variable's value should be changed dynamically , every time this page is loaded. How to do this.

-8
Q: Change code this from php to c#

user2992086I need to use the following concept in c#,i have the code in php,i dont know how to convert this into c#,Can you please help me to convert the following code into c# from PHP. <?php /** * this function builds a secure key that can be used in * PriceGrabber XML API requests to authenticate ...

 

« first day (268 days earlier)      last day (42 days later) »