« first day (282 days earlier)      last day (28 days later) » 
00:00 - 13:0013:00 - 00:00

12:03 AM
0
Q: How to check for incomplete POST request in PHP

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

0
Q: Permission levels for PHP Pages not working

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

-3
Q: Wordpress - execute shortcode inside php

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

 
12:21 AM
0
Q: changing php.ini has no effect on my EC2 instance's PHP config

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

0
Q: Adding data into MySQL from a dynamic jQuery form

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

-1
Q: PHP INSERT a variable number of records to mysql from a html form

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

0
Q: How to get all alphabetic letters in codeigniter from DB? PHP, MySQL, CodeIgniter

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

0
Q: Reference the value of a variable in another file

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

0
Q: scrape a website with secured login

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

0
Q: CENTOS PHP PDO ODBC MSSQL 2008 r2

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

0
Q: string comparisons in php (to create a sql query)

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

0
Q: SQL query is empty?

DepenzThis php is suposed to send five attributes {id, description, email, price, shape} to the sales table in the salesinformation database. <?php define('DB_NAME', 'salesinformation'); define('DB_USER', 'root'); define('DB_PASSWORD', ''); define('DB_HOST', 'localhost'); $link = mysql_connect(DB_HO...

0
Q: RewriteRule not working properly

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

0
Q: I get error SQL

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

0
Q: Port 80 blocked on my ISP so how my browser still works?

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

0
Q: PHP and HTML: 000webhost error

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

0
Q: PayPal with REST PHP returning error 400

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

0
Q: parsing string response http

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

0
Q: How to parse a json in php

NarenI am parsing the below json in php { "responseHeader":{ "status":0, "QTime":22, "params":{ "fl":"title,id", "indent":"true", "q":"einstein", "hl.simple.pre":"<em>", "hl.simple.post":"</em>", "wt":"json", "hl":"true", "rows":"3"}}, "...

0
Q: How to convert this Array into JSon in PHP

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

0
Q: How can I create, monitor and run/stop a process in linux

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

-1
Q: Need help Understanding PHP Code

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

0
Q: passing multi-line commands to popen with php on windows

tweak2So, on linux, this works fine in php (as it would on the command prompt): $handle = popen("command \ -switch1 true\ -anotherswitch yes", "r"); but on windows, this doesn't work: $handle = popen("command ^ -switch1 true^ -switch2 yes", "r"); The command, if typed...

 
1:15 AM
0
Q: PHP Error: Call to a member function

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

0
Q: Why does this PHP code run on one machine and fail on another?

UndoI have this code at the start of a .php file: <?php $url = 'https://api.stackexchange.com/2.1/info'; $data = array("site" => 'space', "key" => "T1h2I3s4I5s6M7y8A9p0I1k2E3y!"); $response = (new Curl)->exec($url . '?' . http_build_query($data), [CURLOPT_ENCODING => 'gzip']); $obj = json_decode(...

0
Q: Call to a member function loadXML() on a non-object (PHP - PayPal)

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

0
Q: recommend some open source Data Sync framework for me (from mongoDB data(php server) to Sqlite client)

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

0
Q: Sql – Insert value only in first empty cell of column

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

0
Q: Form Validation in codeigniter is not working

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

0
Q: Sphinx search very slow in Yii framework

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

0
Q: Is this include_path for a PHP framework correct?

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

0
Q: @PrePersist called in merge() but not in persist(): what Lifecycle callback should I use?

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

0
Q: Yii-user AfterLogin callback

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

 
1:51 AM
0
Q: PHP turn bracket string into php post indexes

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

0
Q: php multilanguage website error issue

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

0
Q: Is the session in CodeIgniter safe?

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

-1
Q: What's the best way to do pagination?

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

0
Q: Trouble getting array back from JSON call to SQL

prismspecsJust trying to grab everything from a table "guesses" sorted by "cnt" and turn it into a javascript array. Can't get it to give me anything I can work with, though. PHP file: <?php $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = 'root'; $dbname = 'words'; $dbtable = 'guesses'; //-----...

0
Q: ssh2_scp_send okay for first time but fail the second time

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

-1
Q: database online number is different

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

0
Q: Creating an array setting the keys as strings

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

0
Q: Search data table with Date

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

0
Q: In Prestashop, how can I display category with its own products in a separate page?

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

0
Q: Using an Access Query through ODBC in PHP

user2288983I was wondering if it was possible to use the queries in Access through ODBC in PHP? Thank you!

0
Q: How to remove header and footer in existing pdf file

user3044105Is there any way to remove or change the header and footer in existing pdf file?

0
Q: Can Html5 audio player play more then one song

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

0
Q: php and mysql online visitor

user3036848 | ip | date | hits | online | |______________________| | | | | | | | | | | | | | | | | | | | | | | 28-11-2013 | 1385603233 | --> Why ...

0
Q: Overriding a apply_filter with add_filter duplicates the output?

user28240I have this function function bp_insert_activity_meta( $content ) { global $activities_template; // Strip any legacy time since placeholders from BP 1.0-1.1 $content = str_replace( '<span class="time-since">%s</span>', '', $content ); // Insert the time since. $time_since =...

0
Q: php connection with MSSQL on Somee server

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

 
2:45 AM
0
Q: PHP: Drop down menu selection to populate two fields in sql database but one is a predefined ID which will be used in a search criteria

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

0
Q: How to write data in node with specific id using simpleXML and php

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

0
Q: php symfony delete wont work setting up also the routing.yml

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

0
Q: Jquery Chosen Plugin - Populate a Chosen based on another Chosen

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

0
Q: Strange behaviour between wamp and lamp (ubuntu)

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

0
Q: Suitable bundle for laravel4

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

0
Q: how to get session value to client-side without echo it out

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

0
Q: HTML input type button cant send PHP Variable?

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

0
Q: VFP 2 .Net Roadmap

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

0
Q: can't instantiate same class multiple times

iminhere's a portion of my php class class Gamification { private $webAction; private $initialLimit = 3; private $maxLimit = 10; function __construct($belongsTo,$getWebAction) { $this->webAction = $getWebAction; } public fun...

0
Q: PHP FFmpeg metadata usage

user2976292 shell_exec("d:/wamp/ffmpg/ffmpeg -metadata title="Movie Title" -metadata year="2010" -i $vaw -b:v 64k -bufsize 64k $mp3"); i need add meta data to new output file with utf8 chars in installed windows localhost. How can i add metadata txt have you any examples for metadata.txt?

0
Q: Symfony 2 Login on main domain only

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

 
3:21 AM
0
Q: Basic Input from html into mysql database

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

0
Q: How to optimize when reading and handling files?

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

1
Q: Protect image contents from unauthorised people

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

0
Q: HTTP Post from Android to PHP backend

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

0
Q: Var_dump shows value but returns null mysql query

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

0
Q: how can i get arr child using $arr join '[xx]'?

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

 
3:45 AM
0
Q: Configuring apache httpd.conf file with PHP

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

0
Q: Sitemap.xml - should I prefer lastmod to changefreq

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

0
Q: Curl init() Disabled for Security Reasons, while trying to activate chikita plugin

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

0
Q: What is the difference between behat, mink and selenium in php

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

0
Q: PHP import using txt file

user3034536I am using following code for importing data into database using txt file while (!feof($handle)) // Loop til end of file. { $buffer = fgets($handle, 4096); // Read a line. $data_array =explode("|",$buffer);//Separate string by the means of | $escaped_array = array_map('mysql_es...

0
Q: Proxy.php not working w/ AJAX Solr

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

0
Q: Looping date and time in selected date period

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

0
Q: ObjectOrientedProgramming

Destinyso I have seen this OOP script that validates/sanitize a string from the fields. <?php /** * Pork Formvalidator. validates fields by regexes and can sanatize them. Uses PHP filter_var built-in functions and extra regexes * @package pork */ /** * Pork.FormValidator * Validates arrays or p...

0
Q: insert mysql with case from php

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

0
Q: Integrating Moodle with Custom Web-Application - Session and Cookie name

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

0
Q: How do I setup where my data goes for my form? HTML

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

 
4:21 AM
0
Q: How to pretty print JSON into a line based key structure?

hendrySay I have an arbitrary nested JSON file: {"menu": { "id": "file", "value": "File", "popup": { "menuitem": [ {"value": "New", "onclick": "CreateNewDoc()"}, {"value": "Open", "onclick": "OpenDoc()"}, {"value": "Close", "onclick": "CloseDoc()"} ] } }} And I want to ...

0
Q: wordpress plugin which can post to facebook wall as a full text message and image not link to the website

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

0
Q: PHP Query Strings, PHP File

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

0
Q: s2member, upon purchase, recieve a bbpress/buddypress supporter badge

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

0
Q: codeigniter controlador metodo

elzurdo87bueno mi problema es el siguiente. quiero bloquear un metodo de un controlador para que esta no sea accesible por url.. este metodo que quiero bloquear es utilizado como callback de de un form validation.. intente cambiando a private o protected pero cuando lo cambio. deja de funcionar como cal...

0
Q: createimgfrompng is corrupting my images

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

0
Q: results not displaying in foreach

user3044341I have the following code: $aProfiles = array (); $sMainContent = ''; foreach ($aProfiles as $aProfile) { $sMainContent .= $row['date']; } $ret .= $sMainContent; $ret .= '<div class="clear_both"></div>'; ...

0
Q: Print json_encode object in Codeigniter View returned from controller

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

0
Q: Facebook like code in js/PHP

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

0
Q: Whitelist domain check in js

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

0
Q: What would cause setting the value of one property in an object to also set sibling properties to same value?

RyanWhen I print_r my object ($myObj), I get something like: stdClass Object ( [first_property] => stdClass Object ( [January] => Array ( [1] => 500 ) [February] => Array ( [1] =>

-1
Q: Warning: ftp_put() expects parameter 1 to be resource, boolean given in

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

0
Q: Integrated vLine Video Chat in php application and receiver do not get any call

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

0
Q: PHP - HTML table with ueven rows elements ( colspan )

Obmerk KronenI am trying to built a very simple diagram or flow chart representation of buildings . $floors = array( array( 'app_1','app_2','app_2_A' ), array( 'app_3','app_4','app_5'), array( 'app_6','app_7', 'app_8','app_9') , ...

0
Q: I have created a form field label dynamically using php/mysql

user2715480i want to change the key. this is the output once i submitted the form. Array ( [year] => 1 [event_name] => 2 [Sno] => 6 [First_name] => kodeesswaran [Last_name] => thanagaraju [Dept/Class] => cse [topice] => test ) i want to replace[Dept/class] to [Dept_class]. what array function i want to ...

0
Q: invalid argument supplied for foreach() in -----joomla

AnkitThis Is My Full Error Warning: Invalid argument supplied for foreach() in /home/techandw/public_html/plugins/system/helix/shortcodes/column.php on line 31 31 line is foreach ($columnArray as $key=>$value) $html .='<div class=' . $value['class'] . '>' . do_shortcode($value['content']) . '<...

0
Q: Why the count function returns 1 for false and 0 for NULL

Athaher SirnaikI was going through the count function in php. Here, http://docs.php.net/count I have not got why the count function returns 1 for false and 0 for NULL <?php $result = count(null); // $result == 0 $result = count(false); // $result == 1 ?> This answer (count of false gives 1 and if o...

 
5:09 AM
0
Q: Tips on Creating Fields on table

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

0
Q: PHP | Creating live video stream from images

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

-1
Q: How to create feed subscriber custom widget for wordpress

rahulkashyapCan you help me. I want to create a custom WP subscriber widget for my Wordpress theme. But I don't know about that how can I start so please help me. Regards Rahul Kashyap Thanks

0
Q: How to merge array using array element in php

KennedyHow to merge array using array element My first array : Array ( [0] => stdClass Object ( [id] => 1 [firstname] => john [time] => 03:40:18 ) [1] => stdClass Object ( [id] => 2 [firstname] => ttttttt ...

0
Q: How to create human readable time stamp?

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

0
Q: What is the best method for using forloop in php with arrays

user876345I have two forloop method, Can you guys suggest me which one is best in practice? Method 1: for($i = 0; $i < count($array); $i++){ //code here } Method 2: $count = count($array); for($i = 0; $i < $count; $i++){ // code here ...

0
Q: Laravel 4 MethodNotAllowedHttpException when editing user

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

0
Q: using proxies for scraping using php curl

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

0
Q: PHP -> MySQL not returning data

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

0
Q: Ajax / jQuery ? Need help to add parameter to pass

AldinI'm learning ajax/jQuery and have some problem. Code : .click(function() { var periode = 'ALL'; if ($('#registerat input:checked').val() != 'ALL') periode = $('#sdate').val() + '-' + $('#edate').val(); name = $('#merchant'); oTable.fnReloadAjax('re...

0
Q: How does jquery ajax call work

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

0
Q: read and insert xml file's records using php mysql via For statement not Foreach Loop

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

0
Q: Wordpress Home Page show hide option using options framework

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

0
Q: When looping through an array of object properties, how can I return an array value given an existing key?

RyanIf $myObj is: $myObj = new stdClass(); $myObj = array(1 => 100, 2 => 200, 3 => 300); echo $myObj[1]; // returns 100, as expected But when iterating through an array of properties like so: foreach ($properties_array as $property) { echo $property; // returns property name, as expected ...

0
Q: php sessions destroyed instantly

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

0
Q: Change password dosent work

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

0
Q: Using PDO::ATTR_PERSISTENT => true with connection string

user2519788Does anybody know how to use PDO::ATTR_PERSISTENT => true with the sentence $handle = new PDO("sqlsrv:Server=$myServer;Database=$myDB");?

0
Q: How to manually change the returned HTTP code and the message

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

0
Q: jQuery will not return any data after adding a php function

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

0
Q: PHP and AJAX handing off variables

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

0
Q: PHP upload file from server to another server using curl post

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

0
Q: Mysql, Searching for keywords and Joining tables

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

0
Q: PHP Array, access array value by a range of indexes

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

0
Q: Associative array doubts for vote count

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

0
Q: Converting from MySQL to MySQLi, how can I pass a connection to MySQLi inside of a function?

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

0
Q: Simple php logic

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

0
Q: how to get contants of an online web page from php

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

0
Q: php can't get data from #.ajax post in Jquery mobile

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

0
Q: Is there a way to download multiple zip at once using PHP

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

0
Q: how display mysql query count(*) result in textview android using php page

user1722880I'm using a query to output a total record in table using count() in mysql database.I want to display count() result in android textview using php page..

0
Q: PHP CLI not functioning with Zend Framework

EthanI have php cli working perfectly on my local (windows) box with ZF2 (php 5.4.16). I installed ZF2 and Zend Server onto linux, and php5-cli separately (php 5.4.22). After importing my project I try running a console script: php public/index.php update This doesn't work, nor does it output anyth...

0
Q: Proper usage of .ajax jquery method?

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

-2
Q: Round user input to the nearest full number?

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

0
Q: Alternatives to Zend Registry for ZF2

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

0
Q: Unable to merge 2 arrays

Archie.bpgcecho $existing_data; echo $current_data; array_merge($existing_data->original, $current_data->original); array_merge($existing_data->large, $current_data->large); array_merge($existing_data->small, $current_data->small); echo $existing_data; The Output is: "existing": { "original": [], ...

0
Q: Not operator with multiple or operator

Kajal SinghI am confuse with bellow code: Fist code that is not working: if ($_SESSION['userType'] != 'A' || $_SESSION['userType'] != 'S') { redirect('dashboard.php'); } Second code that is working: if (!($_SESSION['userType'] == 'A' || $_SESSION['userType'] == 'S')) { redirect('dashboard.php')...

0
Q: Need advice on technology for College Final project

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

-1
Q: $_POST checking empty

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

0
Q: Is there any mysql function which is not allow such data which contain script-tag or html-tag?

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

0
Q: How to disable / Enable plugging

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

0
Q: Function parameters when variables values are not set

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

0
Q: Angularjs and server side return value (PHP)

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

-1
Q: sessions instanly destroyed after 1 page load

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

0
Q: label value wont echo when submitting?

user3034828i try getting the value of my label but it end up with nothing, I don't know what is wrong with my code? I got an error message saying " Undefined index: l_id" can anyone help me solve this. here's my code below. <?php if(isset($_POST['add'])) { $itemName = $_POST['l_id']; echo $itemName;...

 
6:46 AM
0
Q: when i post on facebook wall through api from myaccount its ok while i try from other accounts its not working

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

0
Q: how to connect to Google Analytic API in PHP?

Donatas VeikutisI'm trying connect to google analytic through Google PHP API. But when I execute code below in URI like that: www.saitas.com?code=1 my code: require_once $baseDir.'/inc/google_api/Google_Client.php'; require_once $baseDir.'/inc/google_api/contrib/Google_AnalyticsService.php'; session_start();...

0
Q: YII over write a php file in web app

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

0
Q: Remove the int dynamically from create table using preg match

faizphpHow to remove the int dynamically using preg match function in php This is actual code CREATE TABLE vtiger_meter ( meterid int(11) DEFAULT NULL, meterno int(25534) DEFAULT NULL, cdate date DEFAULT NULL, address varchar(255) DEFAULT NULL, customer varchar(100) DEFAULT NULL ) Output CREATE TAB...

0
Q: php designer not working on ubutu linux os?

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

0
Q: webcam send snapshot to my website automatically how can i display them?

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

0
Q: PHP code to Find Road Travel Distance Between two Cities?

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

0
Q: add_rewrite_rule does not work

user3044675I want to add my own rewrite rule to Wordpress but I cannot get it working. What's wrong? function rcl_custom_rewrite_rule() { add_rewrite_tag('%post-group%','([^&]+)'); add_rewrite_rule('^recipe/(.*?)$', 'index.php?post-group=$matches[1]', 'top'); } add_action('init', 'rcl_custom_r...

0
Q: new URL using htaccess

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

0
Q: 2 percent edge on rand() leaning towards one side of a half

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

0
Q: wamp localhost not working (I know there are few posts but mine is quite weird)

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

0
Q: Access forbidden (403) if access file via JavaScript

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

0
Q: IDE for IVR development?

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

0
Q: Nested numbering to array keys

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

-4
Q: my first try just for testmy first try just for testmy first try just for test

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

0
Q: retrieve data from database without refreshing the page

babirajWhen the user press entre the data will be save into database. Ajax $('td.edit').keydown(function(event){ arr = $(this).attr('class').split( " " ); var clientid=document.getElementById("client").value; account_id=document.getElementById("account_id").value; if(event.w...

0
Q: Items not showing price in polyvore website

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

-1
Q: How to code a function that adds 10% every 24 hours

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

0
Q: My Ajax request returns successful but the script isn't executed?

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

0
Q: Laravel 4 : trying to get variable from same page

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

0
Q: Ajax POST keep firing error function event though php script success

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

0
Q: Header redirect after a certain period not working

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

0
Q: Launch shell command from PHP

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

0
Q: Jquery remove doesn't work on clone

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

-6
Q: URGENT HELP : how to integrate arc gis online maps to my system

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

0
Q: Magento ajax add to cart product not found error

user3007326The magento 1.8 ajax cart is showing product not found error The java script I used is function setLocationAjax(url,id){ var data = jQuery('#product_addtocart_form').serialize(); data += '&isAjax=1'; url = url.replace("checkout/cart","ajax/index"); jQuery('#...

0
Q: How can I simplify my code for easy maintainance

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

0
Q: how to save a .doc file as a mediawiki page in DB

sravaniI am new to mediawiki , I want to learn how to publish an existing article say a word document as a wiki page in mediawiki database

0
Q: Mercury XAMPP error "requests allowed from localhost only" when i am cofiguring my mercury in windows

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

0
Q: Get cache with yii to image function

Yaakov SwissaI have this javascript code: function Thumbnail(url) { $.each(url, function(key, value){ $('#thumb_'+key).load(function(){}).attr('src', "http://domain.com/="+encodeURIComponent(value)); }); } Thumbnail({<?php echo $id ?>:'<?php echo $domain ?>'}); and i have this php code: <...

0
Q: Insert into database by using php and json fails :(

user3032822I don't know why . But whenever I run this application . response always return "insert Fail". Help me finding error pls .( When I check this php code from brower It's ok . ) public void OnClickForSave(View v){ String response=null; String memberID="000000011"; String teamID=txt_...

-1
Q: Why is my database variable undefined in this php script I'm calling from Ajax?

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

0
Q: How to declare, insert and iterate a php hashtable with a hashtable as key?

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

0
Q: adding a sms api along with wooCommerce E-mail sending

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

0
Q: using a variable from drop down list

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

0
Q: i cann't comment for no enough reputation ..so post quesetion again:Progress bar while running while loop

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

0
Q: Push Notification is not display in Android Device

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

0
Q: how to show array values in list and sublist

Dipendra GurungHi I have an array values like 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 3, 3 how can we print this in the format most efficiently? <ul> <li>0</li> <li>0</li> <li>0</li> <li>0</li> <li>0</li> <ul> <li>1</li> <li>1</li> </ul> <ul> <li>2</li> <li>2</li> <li>2</li> </ul> <ul> <li>3</li> <li>3</li> </ul> <ul>...

0
Q: Clearing Cache In Magento Removes The Cart

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

0
Q: jquery:animate() works only one cylce

user3044839 $(document).ready(function(){ $(".press1").click(function(){ $(".inner-slider1").animate({ right:'1px', opacity:'1', height:'400px', width:'600px' },function(){ $('.push1').click(function(){ $('.inner-slider1').animate({ left:'30px', opacity:'1', height:'400px...

0
Q: Post jQuery form serialized data to php

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

0
Q: Trying to consolidate my queries in codeigniter using Active Record... gotta be better way to do this

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

0
Q: Passing value to JS with php return?

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

0
Q: Trying to fix my contact form

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

0
Q: JQuery Autocomplete append associated item Id from php to some Div

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

0
Q: How to get actual amount of data tranfer by per IP

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

0
Q: How to manage sessions on common database for multiple servers in PHP?

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

0
Q: Creating Registration form

dean012HI i got error on line 20 i have tried mysqli Parse error: syntax error, unexpected 'mysql_query' (T_STRING) in C:\Users\User\l\htdocs\register.php on line 20enter code here <html> <body> <?php include("connect.php"); if(isset($_POST['register'])) $username= strip_tags(trim(mysql_real_ecap...

0
Q: How to properly use "data:" with jquery ajax request?

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

0
Q: magento export price dont take last date such as history

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

-2
Q: How to check matching array values in php?

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

0
Q: Need Search two values in one field Mysql

Pritesh MahajanSorry for my English. I need Search two values in same fields.please check below ╔════╦══════════╦════════╗ ║ ID ║ Meta_key ║ Meta_value ║ ╠════╬══════════╬════════╣ ║ 1 ║ first_name ║ pritesh ║ ║ 2 ║ last_name ║ mahajan ║ ║ 3 ║ first_name ║ ritesh ║ ║ 4 ║ last_name ║ jain ...

0
Q: How to Fork a project and then create another fork project inside that fork project

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

0
Q: Rgular expression for this alphanumeric string

user3024125$string = 'SSM1234'; preg_match("SS{2,}\M+[0-9]", $string); but this regular expression is not working....

0
Q: How to redirect non-www to www url in drupal

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

0
Q: Convert array to json with php

mayusI would change the shape of the array into json but difficulty in parsing the data, I have an array like : Array ( [id] => 1 [fisrt_name] => raul [last_name] => gonzales [tgl_booking_start] => 2013-11-04 00:00:00 [tgl_booking_finish] => 2013-11-30 00:00:00 ...

0
Q: When and why to use mysqli_fetch_row, mysqli_fetch_object, mysqli_fetch_assoc, mysqli_fetch_array

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

0
Q: why is readfile necessary after a flush

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

0
Q: REST API, data returning way for success and error

mazraarai am writing a REST API and would like to know weather this is a good practice or not. Below are sample JSON response. Error response, { "code": 1100, "status": false, "message": "Values of imei/email/pin cannot be empty.", "server_time": "2013-11-28 09:13:06" } Success Response, wit...

0
Q: PHP sessions only works second time?

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

-1
Q: when did php start to support embeded excuting?

user2485026I am trying to do a introduction about php, a part of this includes a php history overview. But I'm not sure when php started to support server-side executable embeded html tags. Do you have any idea?

0
Q: php search with page numbers

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

0
Q: sprintf using the same values multiple times

jmenezesI'm trying to use the same value in different places when using sprintf, but failing. <?php $score = 50; $percent = 10; $str = "Hello: You scored %s (%s%%). Your score is %2$s %%"; //Problem is here %2$s echo sprintf($str,$score,$percent); ?> I get this error: Notice: Undefined variable: s ...

0
Q: google chart: create charts weekly played games

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

0
Q: curl_setopt returning false with CURLOPT_COOKIESESSION, CURLOPT_COOKIEJAR, CURLOPT_COOKIEFILE

KirzillaPHP version 5.4.19 under FreeBSD $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); //returns true curl_setopt($ch, CURLOPT_HEADER, true); //returns true curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6'); /...

0
Q: does not display a particular id in mysql

user41549I would like to not display the id 49 and 50. I've been using the following query but it did not work $tampil= mysql_query("SELECT comments,nama,kota,jwb FROM user where id='49','50'");

0
Q: joomla 2.5 module: how to call a php function like javascript onclick?

user3009655In joomla 2.5 module helper.php have a function function hello() { echo " something my code"; } In my tmpl/default.php have a text loadFunction. echo " loadFunction"; I want, when someone click the text loadFunction then will be run function hello() . Like javascript onclick event s...

0
Q: MySQL Update 2 tables using 2 mysql_query() in single php script

Ashish GamezAddictedfor(some loop condition): mysql_query("UPDATE `details` SET `url_battlelog` = '".$stats[$out]['url_battlelog']."', `url_bf3stats` = '".$stats[$out]['url_bf3stats']."', `rank_img_medium` = '".$stats[$out]['rank_img_medium']."',...

0
Q: Each order invoice for the same client, shipment to different customers

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

0
Q: Best way to integrate Magento with an existing php application and share user database

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

0
Q: Setting permissions in PHP

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

0
Q: Only Returning 1 Item

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

0
Q: How to design a database to achieve navigation effect in a website with php?

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

0
Q: All Attributes from a tags

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

0
Q: Show image in new automaticly created page

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

0
Q: Dynamic Search with 2 Tables - Efficient Work Around

kinsesyetehere's my problem, I have 2 Tables involved here: TINVOICES and TJOBS TINVOICES - Job_no TINVOICES - Year TJOBS - Staff TINVOICES - Month TJOBS - Country TINVOICES - Paid TJOBS - Client_no TINVOICES - 30 Days I need the search to be dynamic, Could you please give me a work around for my approa...

0
Q: RegExp. Finding tags between specific tag

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

0
Q: Count content views in Php, Mysql

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

 
9:16 AM
0
Q: Unable to get an authorized session from Beatport API using Rauth

Jaskaran RanaI'm using Rauth for my requests to the Beatport API. The follwing is my current code. from rauth import OAuth1Service import urllib beatport_login = 'login' beatport_pass = 'pass' beatport = OAuth1Service( name='beatport', consumer_key='xxxxxxxxxxxxxx', consumer_secret='xxxxxxxxxxx...

0
Q: Automate recover password scenario using some tool?

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

0
Q: Best practice for background long process with laravel

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

-4
Q: how to php code into js file for the following?

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

0
Q: stringbuffer toString does not match with same static string

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

0
Q: PHP implementation of stackblur algorithm available?

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

0
Q: C# to PHP array

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

0
Q: Group By Issue in MySQL Query

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

0
Q: SQL: Selecting IDs that don't have any rows with a certain value for a column

George NewtonI want to select the distinct IDs (which is associated with multiple rows) that DOESN'T have any rows where VAL = 'current'. For example, in a table like this: PK | ID | VAL ------------- 1 | 23 | deleted 2 | 23 | deleted 3 | 23 | deleted 4 | 45 | current 5 | 45 | deleted 6 | 45 | delete...

0
Q: Can I still verify after consuming in-app item

DiegoI'm using Android IAB v3 and after consume I call a php script on the server to verify and process the order: function verify_play($signed_data, $signature) { global $public_key_base64; $pkey = "-----BEGIN PUBLIC KEY-----\n". chunk_split($public_key_base64, 64,"\n"). '-----END PUBL...

1
Q: MySQL tables altered after server reboot

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

0
Q: Aptana Studio 3 combine php with html

user1658490hi guys am having problems mixing P.H.P code into an HTML file i get error on P.H.P that says missing end tags any help please

0
Q: strtotime is different with timezone

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

-1
Q: modx admin design issue

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

0
Q: Retrieve random row from a Table from ids in a string

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

0
Q: How would I make an alert box popup if my php is ran successfully? (for my php contact form)

Cody Balos<?php $name = $_POST['name']; $email = $_POST['email']; $title = $_POST['title']; $message = $_POST['message']; $from = 'From: Colbert Is America'; $to = 'cjbalos@gmail.com'; $subject = 'Visitor Inquiry'; $human = $_POST['human']; $body = "From: $name\n E-Mail: $email\n Title: $title\n Message:...

0
Q: Wordpress permalinks do not work. No errors

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

0
Q: PHP remove variable string length

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

0
Q: split for loop in group of 3 php

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

0
Q: .htaccess (removing index.php ) not working as explained in user guide

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

0
Q: jQuery pop up showing old content not the new content

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

0
Q: Remove index.php is working but not for index.php?

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

0
Q: PHPExcel: Repeated process increases peak memory usage

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

0
Q: PHP Array and Jason_Encode (separated with comma)

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

0
Q: how to assign the retrieved data to the different td

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

0
Q: No Response getting from Curl Request to https server

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

-4
Q: php - file_get_contents getting json flow once every two times

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

-1
Q: magento - sort product collection by using addAttributeToSort for custom attribute - not working

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

0
Q: How to save current User Points as field at moment of adding a node?

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

1
Q: CakePHP 1.3 - Unknown column in where clause

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

0
Q: Query get specific value in opencart

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

0
Q: WPAutoP doesn't seem to be working

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

0
Q: Parameter passing for the username field using one url

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

0
Q: how to fetch multiple database values directly from the database to html?

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

0
Q: Exchange certain database items for another

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

0
Q: Helper gets passed an empty value in Mustache

MilkManMy test helper $mustache->addHelper('somehelper', function($value) { return $value; }); And my .mustache {{% FILTERS }} {{ something | somehelper }} I know the closure is being called, but $value is empty. What am I doing wrong? Mustache v2.4.1, php 5.3.10

0
Q: PDO PHP ORACLE connection

user2981440heres my code $database = ' (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.8.28)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = orcl) ) )'; $db = new PDO('oci:dbname='.$database, 'middleuser', '1'); $sth = $db->pr...

0
Q: Location of admin controller methods

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

0
Q: JQuery Autocomplete append associated item Id from php to some Div

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

0
Q: Detect iPad version - php

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

-4
Q: Why 'break' is not working in array_walk php

Jacob ZachariahPlease see my code, i am almost stuck in this, Why the break inside the array_walk not breaking... $bool=array_walk($_POST, 'check_empty'); function check_empty($item, $key) { $bool=(isset($item) && $item != "") ? 1: 0 ; if(!$bool) { return 0; ...

-1
Q: Internet Explorer compatibility issue

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

0
Q: SagePay token system in PHP

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

-2
Q: PHP Scraper that supports inline <style> tags

Ivan Risticdoes anyone know of a PHP scraper that can scrape tags? I cant seem to find the attribute in simple_html_dom?

0
Q: How to tackle variables that may not be set when using blade template engine to build forms

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

0
Q: what are iframe alternatives that allow dynamic height?

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

1
Q: Using $this when not in object context - Laravel 4

GazI have these two methods in my Contact.php model: public function getSubscribers($listId) { return $this->withTrashed() ->where(DB::raw("concat('',email * 1)"), '!=', DB::raw('email')) ->where('opt_out', '0') ->select('email') ->chunk(1000, function($results) ...

-4
Q: How to synchronize data of two tables of different databases automatically using php and mysql

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

0
Q: PHP CLI SoapCLient not using WSDL cache

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

0
Q: Where is the file in SugarCRM which will call and run my custom module's logic hook?

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

0
Q: PHP/encoding - Headers already sent

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

0
Q: Yii import an external file

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

0
Q: PHP parent keyword. any way to get rid?

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

-7
Q: rename image in php by date and time

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

0
Q: move product customization tab before the checkout button on prestashop

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

0
Q: Wordpress query_posts result differs from wp_query request result

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

0
Q: Connection between android and mysql by php

user3032822Whenever i ran this application . reponse is always "Insert Fails".When I ran this php code in browser , it's seem fine . Help Me Please . This is my PhpCode: class joinTeam { //when player joins a team function join() { if((isset($_POST["userID"]) && !is_null($_POST["user...

0
Q: How to make HTML code as readable in PHP

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

0
Q: PHP Staic vs Instance

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

0
Q: Symfony: More than one controller matching one URL

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

0
Q: query mysql database before insertion of records from xml file via php

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

0
Q: not displaying image which saved in mysql.i have tried lot of way to solve it, anybody? please help me?

user3045354//code to display image from mysql <?php ini_set('display_errors',1); error_reporting(E_ALL); require("connect.php"); $query=mysql_query("select * from admission order by roll_no desc limit 1")or die(mysql_error()); while($row=mysql_fetch_array($...

0
Q: MySQL: Get people connections from database

PsychoXI have two simple MySQL tables: user & relations. Relations table: user_id int(10) unsigned NO PRI friend_id int(10) unsigned NO PRI (part of) User table: id int(10) unsigned NO PRI username varchar(128) NO What I need to do, is to get user data + his frien...

0
Q: Why my Extension Manager don't connect to the repository in typo3?

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

0
Q: Doctrine result cache is not deleting in production environment in symfony2

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

-1
Q: database query result caching using memcache

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

0
Q: Filter MYSQL where multiple fields can match URL PARAMETER. IN, LIKE or REGEXP?

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

0
Q: Adding multiple items from same drop down list

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

0
Q: Mail send function not getting called from .php Customer Form

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

0
Q: confused about php syntax error

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

0
Q: Rewrite url, remove category word

Bogdan CrișuThis is my htaccess: Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^picxeto\.com [NC] RewriteRule ^(.*) http://www.picxeto.com/$1 [L,R=301] RewriteCond %{HTTP_HOST} ^178\.157\.87\.220 RewriteRule ^(.*) http://www.picxeto.com/$1 [L,R=301] RewriteRule wallpapers/(.*)/ wallpa...

-1
Q: Is there a script to write to a github file automatically?

user3045458I mean, can i use a txt file on my github repository to save form data of my website that's hosted on a different server? { programatically login and modify the files }.

0
Q: How to customize and edit generated QR Code?

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

0
Q: How to make web app created in Yii responsive?

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

0
Q: Plot Points within a Radius using Google Maps

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

0
Q: How to use custom exception from cakephp plugin?

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

0
Q: Bootstrap sidebar menu WordPress

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

0
Q: Variable sent through .js file is not recieving by .PHP file

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

0
Q: PHP: read an process blocks of mysql rows

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

0
Q: php, Amazon API, which response group and operation to get product dimensions , ItemDimensions and weight?

Istiaque AhmedThis amazon page says : ASIN : B00EAM0202 Product Dimensions: 1 x 1 x 1 inches; 1 pounds Shipping Weight: 1 pounds (View shipping rates and policies) I want to get the product dimension and weight . I used ItemLookup Operation and ItemAttributes response group but that returns Package dimens...

0
Q: Symfony2: how to log query duration to logs/dev.log

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

0
Q: PHP Mailer send email too slow in Linux

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

0
Q: How does look like a well formatted regexp for filtering extensions?

2astalavistaHow to match 4 extensions with regexp? I have tired this: $returnValue = preg_match('/(pdf|jpg|jpeg|tif)/', 'pdf', $matches); I dont know why I get 2 matches? I'm I something missed in the regexp? array ( 0 => 'pdf', 1 => 'pdf', )

0
Q: Display the same item in several categories

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

0
Q: Increase quantity when adding same item to cart session?

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

0
Q: Find color value into an array (string start by #)

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

0
Q: Two php contact forms on site, one redirects the other doesn't. Both submit fine

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

-4
Q: What are the differences between procedure-orienteds languages and object-oriented languages?

rahul nayarmy name is rahul nayar (india) i went to interview last Friday one of my interview ask above question , plz help anyone? query !

0
Q: I can't seem to get the last inserted record/id from MySQL

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

-3
Q: Sort 3-d array by keys

Naveen Kumari have a 3 dimensional array like $arr = array("6"=>array("e"=>array("2007"=>"149","2008"=>"200")) "4"=>array("e"=>array("2007"=>"149","2008"=>"200")) "5"=>array("e"=>array("2007"=>"149","2008"=>"200")) "2"=>array("e"=>array("2007"=>"149","2008"=>"200")) ...

-1
Q: CentOS PHP PDO FreeTDS MS SQL 2008 R2 stored procedure output

KrzysztofAfter upgrade ms sql server from 2008 to 2008 R2 I can't catch a output parameter from stored procedure. Does somebody have any idea why ?

0
Q: Try to get List of Hospials using Google-places-api

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

0
Q: accessing multiple pages in R curl postForm getForm

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

0
Q: Detecting AJAX request in a PHP page?

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

0
Q: PHP Class inside class inside class

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

0
Q: How to show once a repeated value in PHP

PLATANIUMI have this code: foreach($this->authors as $autor){ if($autor->author == $filter_autor){ echo '<option value="'.$autor->author.'" selected="selected">'.$autor- >author.'</option>'; }else{ echo '<option value="'.$autor->author.'">'.$autor->author.'</option>'; ...

0
Q: Array into Database

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

0
Q: Laravel - routing a child controller on child route

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

0
Q: Can I add custom id for a record in SugarCRM?

user2936389Can I somehow add a custom id for records in SugarCRM? I would like to connect records from the database by their ids but they are added automaticly. Can I write a custom id for them?

0
Q: How to synchronize data of two tables of different databases using php and mysql

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

0
Q: What will be Task assigned to users and sub users for review by admin database structure in mysql

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

0
Q: embed php dropdown box in javascript

user2876976I want to embed this a drop down list populated from a db query : <?php mysql_connect('localhost', 'blahh', 'password'); mysql_select_db('reporting'); $sql = "SELECT DISTINCT ProductNumber, Description FROM Stock WHERE ProductGroup ='800'"; $result = mysql_query($sql); echo "<select name='PR...

0
Q: Update data into MySQL using PHP

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

0
Q: PHP Determine a servers SMTP settings from email address

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

0
Q: PHP List Directory structure and exclude some directories

charlieI have this PHP Code: $rootpath = '../admin/'; $fileinfos = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($rootpath)); foreach($fileinfos as $pathname => $fileinfo) { $pathname2=substr($pathname,2); $sql="SELECT * from admin_permissions where page_name = '".$pathname2."' ...

2
Q: convert soap time in PHP

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

0
Q: Posting data from iPhone application to php web page

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

0
Q: RSA encryption from From C# to PHP

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

0
Q: PHP set cookie works for example.azurewebsites.net but not for example.com url

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

-1
Q: implementing AHP (Analytical hierarchy process) using PHP

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

0
Q: Can anyone explain me how to form a link like "https://abcd.com/aviyan_khadka"

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

0
Q: How to Receive response in XML format from CURL XML Request in PHP

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

0
Q: Php: Send xml data over TCP/IP Socket connection

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

1
Q: I have 1 million+ records in my database. How to paginate it faster..?

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

0
Q: How to get timestamp with CakeTime

YoPlaitI don't understand how to get the timestamp of current time with http://book.cakephp.org/2.0/en/core-utility-libraries/time.html can you help me ?

0
Q: CURLOPT_FOLLOWLOCATION Google-Voice-PHP-API

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

0
Q: Redirect mispelled search php

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

0
Q: How to make hour and minutes as x axis in nvd3.js graph

Amith Raj ShettyI am using nvd3.js to plot a graph with x axis as time and y axis as some decimal value. I would like to make the x axis as HH:MM but am stuck here. Is there any way to do so.

0
Q: Using variable as stdClass property name

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

0
Q: How to show 404 error in Joomla, if a product is not published or unpublished

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

0
Q: PHP form not working on Template

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

0
Q: Repetitive values when INSERTing a lot of rows in MySQL with PHP

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

0
Q: How making an if else statement work in wordpress

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

1
Q: multiple column update with the value of other column

Rishabh Raji have two tables fw_invitations id moduleid qdetailid 1 1 10 2 2 11 3 3 12 4 7 13 5 8 14 fw_ind_details id moduleid officeid 10 0 100 11 0 110 12 0 120 13 ...

0
Q: Insert Muliple Rows in Categories Cross Table but with same Auto Increment ID

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

0
Q: get entry list method soap sugarcrm

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

0
Q: Text box help : Typed text on box redirect to a URL

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

-1
Q: PHP Form - Automatic reply not using symbols, UTF encoding issue

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

0
Q: Notice: Undefined variable:

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

0
Q: jQuery multi datepicker cleares field value?

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

0
Q: PhpStorm run file in browser

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

0
Q: How can I use a link to navigate between input boxes?

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

0
Q: How do I get the oauth_verifier for a session in Rauth

Jaskaran RanaI'm using Rauth for my requests to the Beatport API. The follwing is my current code. from rauth import OAuth1Service beatport = OAuth1Service( name='beatport', consumer_key='xxxxxxxxxxxxxx', consumer_secret='xxxxxxxxxxxxxxxxxx', request_token_url= 'https://oauth-api.beatport.co...

0
Q: item to hide once overdue by 1 day

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

0
Q: disable add to cart if custom options are required.Magento

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

0
Q: spl_autoload and same filenames in different directories

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

0
Q: Facebook API PHP getting and storing page access tokens

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

0
Q: How to render Custom Html module in joomla component

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

0
Q: How can i use attibutes from table as variables?

user3045733Sorry for my bad eng. I have this code ` $emp_id=$_POST['Personal_ID']; echo"$emp_id"; $sql="select distinct * from dir, training_list_of_dir, trainings_of_dir where dir.personal_id=trainings_of_dir.personal_id and trainings_of_dir.training_tag=training_list_of_dir....

0
Q: Upload wordpress post thumbnail manually

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

0
Q: How to get first letter of every word using regex in PHP

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

-1
Q: inserting directory and file names in a database

charlieI have a table called admin_permissions and i want to insert my directory names and file names into the table What's the best way to do this but also to exclude chosen directories from being inserted?

0
Q: Why nobody forks PHP and make a consistent language?

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

0
Q: Searching objects by multiple tags in minimal time

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

0
Q: ios 7 on clicking the button getting delay to open uiimagePickerController in ipad in ios 7

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

0
Q: How to create a PHP proxy to bypass the mixed content restriction

Rain LoverWhen I embed an HTTP iframe into an HTTPS parent frame, I get the mixed content error message. How can I create a PHP proxy to bypass the mixed content restriction and echo the iframe from my domain?

0
Q: Browser returns Json to be redefined as a specific object

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

0
Q: Subscribing users with groups through MailChimp 2.0 API

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

0
Q: Ajax call VERY SLOW with PHP

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

0
Q: IntelliJ Ultimate, Project shows only a few files and does not recognize php

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

1
Q: Delete query for two way friendship (mysql)

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

0
Q: Mobile number and massage text checking

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

1
Q: How to upload image and display on edit of profile using sonata admin bundle

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

0
Q: Unable to compile PHP 5.2 with mysqli extension

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

0
Q: multiple forms on page onclick ajax function not working

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

0
Q: Using reference to session data

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

0
Q: Breaking the connection of a file

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

0
Q: Uploading theme larger than 2MB

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

0
Q: Cron job not executing a PHP file

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

0
Q: .htaccess redirect to external url but with mod_rewrite

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

0
Q: Regex to extract lines between specific strings

user3045880I need to extract the lines between two specific strings. Example: ---Title--- Header 1: Sample text. Multiple lines Header 2: Sample Text Here I need to extract all the lines between Header 1: & Header 2:. I tried with /^Header 1:(?s)(.*)Header 2:/i.

0
Q: Google Analytics tracking code not installed, two websites, different results

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

-1
Q: PHP/mysqli throwing true every time

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

-2
Q: user 's screen's height & width to be saved in variables

UjjwalCan We Copy The height & Width of the screen of the viewer or user in variables like var h=? var w=?

0
Q: Generating a call graph for a php file using Doxygen

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

0
Q: PHP Sending Form Script

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

0
Q: What's the proper way to add one-to-many relationships across tables when submitting form data of an object in CakePHP?

igneosaurI have the following, simplified, schema: CREATE TABLE IF NOT EXISTS `photos` ( `id` varchar(20) NOT NULL, `title` varchar(200) NOT NULL, PRIMARY KEY (`id`), ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `categories` ( `id` int(11) NOT NULL AUTO_INCREMENT, `photo_id...

-2
Q: I want to create web based game? Which platform is more suitable? Any game engine?

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

0
Q: Payflow Paypal Pro PHP

user3045871I tried the following code for integration of payflow paypal. <?php try { require_once dirname(__file__).'/Payflow-paypal-pro.php'; $txn = new PayflowTransaction(); //these are provided by your payflow reseller $txn->PARTNER = 'VSA'; $txn->USER = 'myappyrest'; $txn-

0
Q: DynamoDB BatchWriteItem - No Throttling?

MouliIn my table "products_1", I've configured 1 capacity unit Read and 1 capacity unit Write. I'm using AWS PHP SDK to write 8 items into DynamoDB using "BatchWriteItem". The code returned this response: Object ( [structure:protected] => [data:protected] => Array ( [...

0
Q: Add new field in opencart database

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

0
Q: Make the options of the 2nd select box populate depending on the 1st. Both are PHP arrays

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

 
00:00 - 13:0013:00 - 00:00

« first day (282 days earlier)      last day (28 days later) »