« first day (289 days earlier)      last day (21 days later) » 

12:00 PM
0
Q: Zend 2 redirect (bug or feature)?

user3070045Zend 2 seems to execute the "redirect()->toUrl()" not directly if it's called. I have the following code: public function onBootstrap(\Zend\Mvc\MvcEvent $e) { $em = $e->getApplication()->getEventManager(); $em->attach(\Zend\Mvc\MvcEvent::EVENT_DISPATCH, array($this, 'onDispatch')); } p...

0
Q: Sugarcrm - Notes date modified to update leads date modified?

bcrajkumarI'm using sugarcrm CE 6.5.14. Whenever I added a task for a lead the date modified field not getting updated of that lead. Right now, it is very tedious to track and follow-up the recent updated leads. I've googled and found related searches on sugarcrm forums using logic hook. http://forums...

1
Q: PHP Incomplete Class OOP

Arturik1988hello i have this code public function query($sql, $params = array()) { $this->_error = false; if($this->_query = $this->_pdo->prepare($sql)) { $x = 1; if(count($params)) { foreach($params as $param) { $this->_query->b...

0
Q: Creating multiple CSV files and then zip them ready for download using PHP

CNWLshadowI'm trying to create two CSV files from separate tables in a MySQL DB based on the users input (html form). The user can select which columns to display and the data range. I've gotten to the stage where I'm able to query the DB and output the result to HTML, I now want to create two csv files,...

0
Q: Populating an HTML select list from a PHP MySQL array

Sam HI'm fetching a list of 'actors' from my MySQL database table actors & trying to populate the result into a HTML Select box: <?php $query = "SELECT actor_name FROM actors"; $result = mysql_query($query) or die("<h1>Error - the query could not be executed</h1>\n"); $num_rows = mysql_num_rows($...

0
Q: unexpected '' (T_ENCAPSED_AND_WHITESPACE) while output

meksI'm sorry if my question may appear silly, but I'm really confused with an error I'm getting while outputting a file name from array. First I'm populating array with a column names from my database. Here is the code: $AddNews = "SELECT * FROM picture_names"; $result = mysql_query( $AddNews,...

0
Q: How to echo out the whole table? Right now I only get the last row

user3070065I have this code right now and I only get the last two rows, but I need to get as many as there are in the database with the html. Thank you in advance //We include the includes.php, which contains our db connection data. include("includes.php"); //dbCon(); references the db co...

0
Q: How to get a particular row in CActiveRecord in Yii framework?

CashewLets say I have a record like the following Users - id - username - password While login i want to check user's x_username, x_password with this record and i should return the matched row. How to do that in CActiveRecord? I tried the following $user = Users::model()->find('userna...

-2
Q: Push a button with HTTP POST

Karolis RaišelisI'm new to objective c and iOS programming, but my boss asked me to add paying method to the app using HTTP POST. I have managed to fill text fields with POST, but i dont know how to press a button "Pirkti" it stands for "buy". Do i have to know something about how that button was made in php, o ...

0
Q: Blocking fake users from using Facebook login

Markus OssiI am doing growth hacking at a startup. We are currently running campaigns where we give incentives (monetary reward, product prices, free goodies) for people who register as our users. In our most recent campaign we started using Facebook login for a fast and easy registration. However, we noti...

0
Q: How to replace all characters except a numeral (200, 200.45 etc.) from a string in php?

user2866631I have few strings where i need to extract only the prices in php (which will obviously be numerals). The use cases are follows: 1) Rs. 23,459.45 desired output = 23459.45 2)Our best price 23,459.45 desired output = 23459.45 etc. I gave the above use cases to ...

0
Q: sorting some weird array in php by a value

MihaiHow can i sort something like this $a = array( 0 => array( 'field' => array( 'id'=>'valueid' ) ) ); by valueid? I have managed to sort it by field but i can't realize how to do this weird sorting

-3
Q: Downloading an image from database in php

user3070119iam fresher in php. I want to download the image from the database in php. That images is stored in wallpaper folder. My script is running on localhost bt not on server. plz take a look on mi code n give me the solution. Table name: wallpaper attributes(id name, image) Images are stored after ...

-2
Q: Make a calendar with 2 cells for 1 day. PHP

user3070146I got the following code and that works, but I want to split a day in 2. AM and PM. I've been looking on the internet but I can't find how to do this! Can anyone please help me? Thanks in advance. Here is my code: class Calendar { var $events; function Calendar($date) { ...

0
Q: Cannot solve: PHP Warning: POST Content-Length of 13110857 bytes exceeds the limit of 10485760 bytes in Unknown on line 0

aahungI try to modify the post_max_size, upload_max_filesize and memory_limit I just cannot avoid this: PHP Warning: POST Content-Length of 13110857 bytes exceeds the limit of 10485760 bytes in Unknown on line 0 I dont know where 10485760 comes from, I'm using JustHost service and Choosing Sin...

0
Q: JQuery class vs ID

Aaron FI have a foreach loop here. For every item it prints, there is a comment section that is expandable/collapsable. The problem I have is, when I hit the "Expand All" for an item, it expands the comments for EVERY item in the loop all at once. Whereas, I only want to see the comments for that spec...

1
Q: JavaScript Array vs C# Array

HeinRichardSonButtWhat type of array is this JavaScript Array shown? 1-dimensional, 2-dimensional or 3-dimensional? Also what will be the exact representation of this array in C#? var arr = new Array ([34.01843, -118.491046], [34.006673, -118.486562], [34.009714, -118.480296], [34.010408, -118.473215], [34.01521,...

0
Q: How php is sending mails directly from the script?

Dency G BHow php is sending mails directly from the script?Without any smtp server installed? I am curious..!! On my server, I dont have any mail server installed.But it can send email. How does this happen?? I am using phpmailer.

0
Q: Is there any way to insert array element to mysql database

madhurjyaI am little confuse about to insert the array element in mysql i have a array as following $a = array( '1' => 'a', '2' => 'b', '3' => 'c', '4' => 'd', '5' => 'e' '6' => 'f' ); and i have a table field id1,id2,...may be id1 id2 a b...

0
Q: How to upload image taken from camera in android into MYSQL database

user2975407How to upload these images taken from camera into MySQL I can take multiple images and These images shown in image view but i couldn't find a way to upload them in to MySQL database. below is my code. This is the solution class public class solution extends Activity { static int ...

0
Q: Requesting for voice call in mobile app using php via elastix server

ElangoAm using elastix server for voice call functionality in mobile application, in this i can able to store value(extension data) in asterisk database and also able to view data's in elastix page through the php code . When am calling via extension number am receiving "service not available". h...

0
Q: Wordpress Rewrite Rule API

Piero MalteseI'm gone crazy with Wordpress rewrite API. I have: add_action( 'init', 'add_rewrite_rules' ); function add_rewrite_rules() { add_rewrite_rule( 'type/([^/]+)/?', 'index.php?pagename=$matches[1]', 'top'); } But when I go on www.mysite.com/type/article-name...

0
Q: Detect Price with xpath Efficiently

TransformBinaryI need to scan the page for price and extract it, i was thinking of detecting $ and extract the value after $. How can i do that using xpath? Unfortunately different page has different format. Therefore i need it to be smart enough to detect $12 or $12.30 $price= $xpath->query("//??[@??]"); ...

0
Q: Probleme in loop using Javascript , Please need clarification

nabilinfoi have this Javascript Function in a .js file , i need to customise this code by using a loop to display 9 locations // Javascript File function GetDateTime(plg) { switch (plg) { case "fr": language='fr'; break; case "en": language='en'; break; ...

0
Q: CodeIgniter two tables join with last table having optional rows

Majid Khan MohmandI have two tables in my database which are organized as follow --> Articles(ArticleID,UserID,ArticleCategory,ArticleTitle,ArticleBody,ArticleIsActive) --> ArticleImages(ArticleImageID,ArticleID,ArticleImageExtension) Scenario: => A user wants to post an article, the user has the option to pos...

0
Q: Show Youtube video on my PHP Website using proxy filter

user3070174I am new to Stackoverflow and apologize if I made any mistake in my wording or break any rule of Stackoverflow. I am using following code to show a youtube video in my php website, but Youtube is banned in Pakistan and cannot show the video on my website. Is there a way to show this video "using...

0
Q: php files are not working in my enkompass server

user3069471When i run .php file in my enkompass server showing below Error message. Server Error 500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed. Please help me how to solve this Error. Thanks in Advance

0
Q: How to make Opencart 1.5.6 urls use product name

user2689642Currently when you choose a product (Business cards) the url looks like this http://smoothprint.co.uk/index.php?route=product/category&path=59 What would I have to change so the Url would be http://smoothprint.co.uk/business-cards Is the url saved in the database attached to the product?

-2
Q: Adding a script to an Admin Template

user3057374I recently bought a Admin Template form themeforest and I was wondering how to apply a script to get it working. Or what are the steps to make it work.

0
Q: Canonicalization of php system

Kristoff RandI'm trying to get rel=canonical to work on my site, a php cms system called tomatocart. I'm using this php snippet which does create the correct url, however it shows the url on the page and it does not place it in the Head area where it should be. Canonicalization checkers do not see the code. ...

0
Q: Joomla 3.2 Increase the upload_max_filesiz

user974946i try to download this template on joomla 3.2 extension manger : http://scriptmafia.org/templates/115622-yt-moustache-yootheme-for-joomla-25-32.html but every time u upload it , its give me this error : There was an error uploading this file to the server. i read in articles about increase the up...

-1
Q: Using data which contains ' and ", storing it in WordPress database & displaying it back in a meta box

user2992596I have some custom meta boxes on WordPress, storing some information such as page titles and descriptions, but I am having a bit of a problem which I can't wrap my head around. The meta input boxes need to be able to accept " and ' (Speech marks and apostrophes), and WordPress is storing the dat...

0
Q: Getting variables after Randomly selecting two rows in PHP

Muhammad UmarI am using following code $con=mysql_connect('localhost','admin',"password"); $db=mysql_select_db('DbName',$con); $query="SELECT COUNT(shuffel.clientid) as total_users FROM shuffel"; $result=mysql_query($query); $total=mysql_fetch_array($result); $total =$total['total_users'];...

0
Q: Need to get all records from DB where ID is not known

user1476992in my project, the user can enter categories into a budget. So the user enters an annual amount in a form field. They can then select "monthly" or "annual" from a dropdown menu, and also select which month they want the annual category to start on. So if they select annual and June, then recor...

0
Q: View details data from grid in new html page [OpenJS]

user3070210I am using the OpenJS grid perfectly! I have a grid with students. I can click on the student row and get the studendID. And I can open the StudentID.php without problem, $Students.on("rowClick", function (event, $row, rowData) { var SN = rowData.StudentID; var url = "Stu...

0
Q: Is there a need for die; after print json_encode() when responding to api calls?

omar-aliI'm creating various 'my version' of web services. Basically, it's a yii controller with lots of actions.. each action is as follow public function actionNameOfWebService() { if(isset($_POST)) { // do some processing, when I have a result... I do .. print CJSON::encode('result...

0
Q: how to rewrite wp-admin url to some other folder using htaccess?

sunI tried to rewrite a simple RewriteRule but i guess it doesn't turn up good. I created a htaccess file in wordpress wp-admin folder and i tried to rename the wp-admin directory name in my localhost.Here is the code i tried RewriteEngine On # Turn on the rewriting engine RewriteRule ^wp-admin$...

0
Q: prev() is not working it seems

404 Not Foundi have my code like this in one file... $d = new db(); class db { function fetchform() { global $wpdb; $content=''; $result = $wpdb->get_results("select * from kp_contact_form",ARRAY_A); $path =plugins_url().'/kp_contactus/ajax.php'; $content.='<form action="'.$path.'...

0
Q: Paginate query result with ajax and php

Johny totaI have a fully working pagination with get method. I get the results from my query and the page is changed when the variable pagination changes on URL. I recently changed the site to ajax and now i can't get the clicked page value from URL i have a form with some inputs that i use to generate t...

0
Q: PDO_OCI prepare/execute

CrazySabbathI'm trying to figure out why my pdo_oci execute/prepare statements aren't working. It might be something trivial that I'm missing or oci drivers them selves or I don't even know anymore ... Short description: there's one query, array of parameters to be inserted. try{ $conn = new PDO($dsn,$...

0
Q: Mysql select older rows than x days, group by and order by and limit

user2301881I made a really uggly sql table long time ago. But now I need to use the data from it. The table looks like this: id => 1 video_id => gds1513sfsd51 user_ip => 244.154.16.. datum => 2011-01-11 10:10:10 referer => http://something.com user_id => 1 I whould like to get those rows are older than 30...

0
Q: Embed a Youtube video in my PHP Website using Proxy

user3070174I am new to Stackoverflow and apologize if I made any mistake in my wording or break any rule of Stackoverflow. I am using following code to embed a youtube video in my php website, but Youtube is banned in Pakistan and cannot show the video on my website. Is there a way to show this video "filt...

0
Q: Highchart not displaying cakephp

ChandreshI'm working on one of the cakephp website, Where i'm using HighchartPHP libraries. But high-chart is not displaying. This issue is only when i use dynamic data from database, but if i use static array to pass then it will working fine with same code. Below are array which i get from dynamic code...

0
Q: Uncaught ReferenceError: FB is not defined

user2078421I know this question is asked frequently, but I have not found the solution. I use this code: open the html tag with <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#"> in the index immediately after the opening tag I entered this <div id="fb-root"></div> <script> ...

-1
Q: MYsql and php best saving in database

Malin PedersenI have created a forum and created a "like" button, almost similar to that facebook has. when a user presses this button, give it a likes to record in the database, which will be shown Beside this "like" button. Now I have the problem of how it should determine if the user has liked the same "po...

0
Q: Syntax errors with my php code

user3040823I m struggling with a piece of code. I already know that there are errors with this code. It uses cURL. The curl process works perfectly however i have added an if statement to check a logic in order to pass certain variables to the other server. Thanks in advance.. <?php include...

0
Q: Very slow curl request to same domain

BenI am calling an API with curl to the same domain (right now its localhost) with the following code $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url ); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); curl_close($ch); It is very slow, (up to 7 seconds) unless I ad...

0
Q: Twilio - redirect to Twimlet in a PHP script

al_manchesterI have modified the Twilio call screening script so that it simultaneously tries several phones, and if someone preses a key to accept the call then it connects. If this doesn't happen, or it times out, then it is sent back to a switch statement that decides what to do. The issue I am having is...

0
Q: Building an Online Quiz

JamesI'm trying to build an online quiz for a charity. I've search SO already, but I've not found anything suitable. Ideally, I'd like a Flash quiz template (or something similar), but it seems the quiz templates that once did exist are no longer available. The quiz would be on their actual website ...

0
Q: Change the value of XML file using PHP - certain child

user3070268everybody! My problem is as follows: I am using an xml file with products info. Here it is - example.xml <?xml version="1.0" encoding="ISO-8859-1"?> <products> <item> <name>Flat Screen Television SONY KDL-4500WEED</name> <image>http://img.zap.co.il/pics/2/7/9/2/37682972c.gif

0
Q: Amazon API - finding products by filtering

user3070303How can i search products on Amazon's API using the filters they have on the website? For example, only smartphones that cost more than 100$ and 4.0 to 4.4" screen etc... Is this possible? If not with their API, then how can i do this manually ? I already tried to search the net on how this can ...

0
Q: concat and insert using php using quotes

user983983I want to add quotes to $sdatetime, so i can insert ('2013-12-1217:15:15') something like this into db. How do I go about it? form -- <input size="16" type="text" name="sday"> <input type="text" name="stime" size="16"> function --- $sdatetime=$_POST["sday"].$_POST["stime"]; $model->start_da...

0
Q: SQL Query Syntax error?

Satch3000I am trying to modify a query which results in 2 records before the modification for some reason my modification makes it not work as it return nothing. This Query works and returns 2 record: $query = mysql_query("SELECT * FROM `table1` WHERE `date` = '{$eventdate->format('Y-m-d')}' OR `date` >...

-1
Q: Call functions in php file along with the code

Muhammad UmarI have following php file when i run it xxxx/api.php nothing is shown in browser. the echo doesn't show up either. What is wrong. <?php try { echo "asdf"; $conn = GetDBConnection(); $statement = $conn->prepare...

1
Q: How to speed up template rendering in Symfony2?

cw'I have a symfony2 application that renders about 6000 database entities. I optimized the ORM (propel) queries and the database requests are now very fast. What remains is the symfony controller and the twig template rendering engine. Is there a way to speed up rendering (e.g. switching to php ...

0
Q: read old sms from smpp server using php

user3070323I have a project coming up where I need to send and receive messages through a specific mobile operator, which only provides an SMPP interface. The whole project will be a hosted website. I have already read quite a lot, but I do not yet quite understand what is actually needed from my side to us...

0
Q: PHP fputcsv() to create a CSV to import into outlook contacts

flynnI'm fetching values from a database and inserting them info a csv file to be downloaded and imported into outlook. I'm using this code // output headers so that the file is downloaded rather than displayed $today = date("m.d.y"); header('Content-Type: text/csv;'); header('Content-Disposition: a...

0
Q: Uploading single photo to 7 pages always fails 2 specific pages. OAuthException [code] => 2"

user3056517Uploading Photo to two of the pages I manage fails with "unexpected error has occurred. Please retry your request later. OAuthException [code] => 2" I am using a batch request to upload. I am a manager of all 7 pages. Debugging the Access Token gives me: Issued 1385854349 (on Saturday) Expires...

0
Q: Fill an polygon with dynamic text and dynamic size

user3070296I have no glue, wether there is almost an solution for my problem nor if it is at all possible to do solve this. What I want to do: I have a picture of polygones. It's a abstract drawing of a persons. Something like that: http://image.pixelio.de/000/362/837//player/1--362837-Familie-pixelio.jpg ...

0
Q: how to install zend guard loader on mac(os x 10.9 with php 5.3)!

user3070324i download zendguardloader 5.5 on zend.com, and get this error: /usr/lib/php/extensions/ZendGuardLoader.so: mach-o, but wrong architecture then...i... lipo -info /usr/lib/php/extensions/ZendGuardLoader.so it seems can not run on x64 mac osx... if i use zendguardloader 6.0(which is for php ...

0
Q: Inserting data using arrays within a loop of unspecified number of input fields

JummahGURUHere is the code that displays the table in a form where you are to insert manually only the last field. After filling you should go ahead and save the form into the database, but since there are no specific number of input fields (as they will vary), I need to use an array to capture all the d...

0
Q: Symfony2: pthreads produces blank page

LordSkI'm trying to use the extension php_pthreads with Symfony2. I set up a simple controller: <?php namespace Test\TestBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; class SimpleThread extends \Thread { public function run() { sleep(100); } } class ...

0
Q: Codeigniter, controller doesn't run when payson send

user256631I got a controller which will update a database if a customer has paid or not! I am using Payson to do this. and payson will send back post data to site (controller) where it will say if the payment worked or not. and if it worked it would update the database. THE PROBLEM: I have set payson to s...

-2
Q: Database structure for MySQL login

SJ PollockI am wanting some advice for setting up my database for a project that allows users to generate color palettes using Flickr's API based on a hex code inputted into the search bar. Basically, the system will allow for a user to input a color into the search bar, this will then look to flickr to ...

0
Q: Using PHP cURL to get Behance API feed stopped working

Andrew Welchup until today the below code was working fine, however, now it has stopped working. Yet if I put the URL in it returns a feed. Any idea what is going on here? I tried to debug Curl with error handling. <?php if (!isset($_GET['page'])) { $page = '&page=1'; } else { $page = '&...

0
Q: How to pass the result of a form to another website with cURL?

user3056723I am a student who is new to the web developing world.Please bare w/ me for having some mistakes and insufficient knowledge. Currently studying about the PHP cUrl, because according to my friends and base on my research, it is the php library that would fit in my current project still not sure t...

0
Q: Parse array with a array inside to PHP

Žydrius NežydrasI have array in my JS and I have to parse it to PHP: var transfer_data = { cl_name : $("#free_1_1_title").val(), contact_name : $("#free_1_1_name").val(), contact_lastname : $("#free_1_1_lastname").val(), contact_email : $("#free_1_1_email_1").val(...

0
Q: How to run composer update via puppet?

razbakovI'm using composer to manage dependencies. And basically want I want to do is automatically run composer update in puppet config when vagrant up is running. I'm using puphpet to generate puppet files for vagrant. I added composer::exec section in this code in the default.pp file: if $php_value...

0
Q: php array serialize key value codeigniter cache

user2924581I have table name 'preferences' column(key,value) http://imageshack.com/a/img202/2909/lvaz.jpg I use cache in codeigniter look this : $pref = $this->ci->db->get('preferences')->result(); $this->ci->cache->save('preferences', $pref, 30000); save cache : a:3:{s:4:"time";i:1386246188;s:3:"ttl...

-1
Q: How to fetch content from URL and save as xml file?

user3068785I want to fetch data from url and want to save to save it as xml file.I try something like this but its not working $xml = file_get_contents('http://example.com/file.php'); file_put_contents('file.xml', $xml);

0
Q: When using PhpStorm and Symfony 2 console I get error messages

user3070359I'm having troubles with the console when using PhpStorm in combination with Symfony 2. But when I use the same command in the terminal, it works fine. Somebody knows how I should fix this problem? In PhpStorm console: ➜ /Applications/MAMP/bin/php/php5.5.3/bin/php /Users/job/PhpstormProjects...

0
Q: Attaching a Image as attachment in Outlook

HiteshI am working with a PHP web application, where I need to attach an image to outlook on z click of a button. Provided outlook is configured in the system, and is logged in. The image is coming from a canvas(using canvas.toDataURL()) which gives a base64 encoded image. Is there a way to do it usi...

0
Q: CDbConnection failed to open the DB connection: could not find driver in Yii

Cashewwhile trying to connect with mysql in yii framework it shows "CDbConnection failed to open the DB connection: could not find driver " error php code : 'db'=>array( 'class' => 'CDbConnection', 'connectionString' => 'mysql:host=localhost:3306;dbname=testdrive', 'emu...

0
Q: Arrays names PHP Concatenation

nabil l.How can I concatenate arrays names in PHP5 without repeat the name : So this what I think to do , but doesn't works : $thisProduct = $data['deliveryMethod'][1209]; $thisProductReceiver = $thisProduct['receiver']; And after I do: $lastName = $thisProductReceiver['lastName']; I got this er...

0
Q: Getting the number of rows on MySQL with SQL and PHP

SercanI have a db with some tables like this: - fruitsTable id name numberOfPeople 1 apple 3 2 orange 4 3 cherry 1 - peopleTable person fruit john apple john orange john cherry jack apple ...

0
Q: How to put a dashed line around a specific row in php and mysql

NicI just found out how to display my table from PHPmyadmin but I would like the fifth row to have a dashed outline. I know how to make a dashed border in css "border-style:dashed;". The problem is how my code is calling my data from a database and putting it in a HTML table, do I need to re-code th...

0
Q: old sms read from smpp

user3070323i am using smppclient.php for send and receiving the sms from my tcp/openssl smpp server i am read only unread(latest) sms only how can i read old sms from smpp server using php I have a project coming up where I need to send and receive messages through a specific mobile operator, which only...

0
Q: PHP Not executing .bat file in windows

user3070383I am trying to execute a batch file using PHP on Windows Server 2008. The file is called NEWDNS.bat and its mission is to write a new entry into a DNS zone file stored in c:\windows\system32\dns - the zone file is named motlocal.co.uk. Here are the contents of newdns.bat @echo off cd windows...

-1
Q: Input directly to the same page

user3070406I'm trying to make a way to input an image directly onto the same page, but I can't figure it out. The image doesn't need to be saved when navigating away from the page. I've tried <form action="#" method="post">, but I still can't figure out how to actually put it where I want it. This might be ...

-2
Q: how can I connect an php row to an image?

user2796989For a school project I`m using php for the first time, the thing I want to make is a page with images on it, and when you click on an image it opens a new page with the information from my database. do I have to make a variable in javascript and connect cite this in the php query or is it possibl...

0
Q: Magento 1.8.0 creates multiples url redirects while reindexing

Styopchikall! I've been faced the next problem: every time, when i make reindex, magento creates premanent redirect for each product and category with number at the end. F.e www.site.com/product.html -> www.site.com->product1.html. So after several reindex processes, url rewrite rules quantity grows up to...

0
Q: Run HTML through wamp without specifying url

ronI have just installed WAMP for use in a web project i'm working on (Wampserver 2.2E). Now i've added an alias to WAMP so I can work in alternative folder (i.e. c:\myapp) my question is - how can I run the project files (html/php) without having to specify to the browser 'localhost/webapp/somefil...

0
Q: HTML2PDF - fopen() failed to open stream: Permission denied in/html2pdf/_tcpdf_5.0.002/tcpdf.php on line 6168

KevOneI got a problem with the HTML2PDF library (i use PHP with Zend Framework 2). I'm on a linux ubuntu dedicated server and the destination folder for my .pdf file got chmod 777. I even tried chmod 666 ... but i still get the same error : [warn] [client ..*.*] mod_fcgid: stderr: PHP Warning: fo...

0
Q: How to access hidden field's value?

PHPLoverI'm using smarty template and my code is as follows: <div class="form-element"> <select name="subject_id" id="subject_id" onchange="get_topics_by_subject(this.value, 'get_topics_by_subject_for_filter', '#topic_id'); return false;"> <option value="">All</option> ...

0
Q: PHP MySQLI Query error inside class "mysqli_query() expects parameter 1 to be mysqli, null given"

Raviv gI tryed everything , i read other questions here in stackoverflow and i still cant fix this. I know there is plenty other questions like this and answers, but none help me! tryed over 5 hours to figure out Anyway i have the following : class RecoverPas{ private $mysqli; public function __...

0
Q: Value not showing when sub folder is coming

PrakashThis is my table tag enabled bank 1 WT 1 Credit 1 Debit 1 EMI 1 and my query is $sql = "SELECT * FROM payment WHERE enabled = '1'"; $result = mysql_query($sql); while($data = mysql_fetch_assoc($result)) { $gateway=''; if($data['tag']=='credit') $gateway='/...

0
Q: how to get and display html tags from xmlhttpresponseText

BeSomehow can i retrieve HTML TAGS from responseText xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { inserttxt(xmlhttp.responseText); } }

0
Q: Magento Admin Config settings won't save

mikeunbI have a Magento 1.8 installation which was working fine up until yesterday evening at which point changing any config settings in the admin area stopped working. E.g. If I change 'store name' to anything different and clicking save: it says "The configuration has been saved" in the green bar at...

0
Q: Symfony2 - import config.yml in services.xml

user3049779I am new in Symfony2 and I want to import my config.yml into the services.xml. config.yml: cleverreach: soap: key: myApiKey url: myWsdlUrl services.xml: <parameters> <parameter key="key">getKey</parameter> <parameter key="url">getUrl</parameter> </parameters> I dont know...

0
Q: how can i solve this curl respose error?

SarwarCSEI was using a server(http://aserver.com) where i get some data using curl. my curl configuration is $url="http://aserver.com/alic/?lc=wpvlc"; $handle = curl_init(); curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, 5 ); curl_setopt( $handle, CURLOPT_TIMEOUT, 5 ); curl_setopt( $handle, CURLOPT_URL, ...

0
Q: How to use my own password hasher

SalsaI tried to follow cake's documentation do create my own password hasher, but it seems that the authentication component is not using it. This is my code: class AppController extends Controller { public $helpers = array('Html', 'Form', 'Session'); public $components = array( 'Session', ...

0
Q: Creat valid JSON from array, from database

Jeroen de BeerI'm trying to put my data into Json format. The code seems to work fine, I get a Json format, but the data is not Json valid. This is how the json comes out: ({ "sample": [ { "0": "12", "image_id": "12", "1": "background.JPG", "path": "background.JPG", ...

0
Q: mysqli update not working

user2987790I'm trying to replace my mysql with mysqli, and i get results - that's ok but when it comes to update mysql my code fails: $sql = "UPDATE ".$dbprfx."_users SET costAlertVar = ?, WHERE connection = ?"; $eintrag = $db->prepare( $sql ); $eintrag->error(); {die('Not Working');} $eintrag->bind_para...

0
Q: Wordpress custom post types not showing in search

user3070441I'm trying to get custom post types and advanced custom fields to show in my search results. At the moment it only searches the default posts. I have created my custom post types with this plugin: Custom Post Type UI I'm using advanced custom field plugin: Advanced Custom Fields Here is my cod...

 
2:07 PM
0
Q: Drupal's 'Print Theme' Not Printing List of Links

Chris MazzochiIf you can help I'd appreciate it. I'm taking this Lynda.com tutorial called "Creating and Editing Custom Themes". I'm at the section where we're learning how to customize a page template. We were advised, in order to create a page.tpl.php file, to copy over the index.html file, and simply re...

0
Q: Nginx + PHP-FPM Using CPU and Not RAM

Devin DixonI am doing load testing on an Nginx Server and I am having an issue where my CPU hits 100% but only 50% of my ram is being utilized. The server is this: 2 vCPU 2 GB of RAM 40GB SSD Drive Rackspace High Performance Server This is my Nginx Config worker_processes 2; error_log /var/log/nginx/e...

0
Q: Review form is not being submitted

Mr_GreenIn my project, I added a new field location in "product reviews" of admin panel going through the following steps as explained in many blogs. Created a new field in database table review_detail as location. Added the following code in app/code/code/Mage/Adminhtml/Block/Review/Edit/Form.php ...

0
Q: Why does my form with empty upload form take so long ? What could be the reason?

SkeletorI have a form with a simple file upload input like: ... <div class="contenttitle radiusbottom0"> <h2 class="finfo"><span>Uploader</span></h2> </div> <p> Chose your ...

0
Q: creating dialogue boxes for editing and deleting records in Yii

user2492854In My Web app I have a CRUD table and I need to implement a dialogue ox on clicking a particular record for editing ,deleting and making other changes. I googled it but unable to find proper tutorials. Any body kindly help me how should I proceed.How should I implement it.I know its a silly ques...

0
Q: PHP/MySQL/HTML Add user Error?

Haidar Musangi have file siswa-tambah.php <?php //siswa-tambah.php //periksa apakah username = kosong dan hak akses = adm if(empty($_SESSION['username']) OR ($_SESSION['akses']<>'adm')){ //jika user belum login echo "Anda harus login untuk dapat mengakses halaman ini !\n"; echo "<a href=index...

-1
Q: SimpleSamlPHP unexpected T_FUNCTION in GenerateGroups.php

Brian F LeightyI received this error when trying to test simplesamlphp Parse error: syntax error, unexpected T_FUNCTION in /simplesamlphp/modules/core/lib/Auth/Process/GenerateGroups.php on line 139 What is causing this? I'm running PHP 5.2

-1
Q: MySQL select a pair of unique rows

user3070443I'm trying to retrieve a pair of rows from a selected category that a given user has not already seen on a given day. I have a couple of tables: one table contains the items to be selected (item_id, item_name, category and item_description) and another table that tracks which items have been sele...

0
Q: Passing Javascript ID Value to PHP for download

user3070499I am pretty new to PHP but I am learning fast.. I have been trying to use AJAX to Pass An ID to PHP. With this ID I use SQL to get the path of a file from the database than use it to download the file. However after some research this is not possible and I couldn't understand alternives... maybe ...

0
Q: Rewrite Rule replace a symbol

Antonis VergetakisI have my website mywebsite.com/this.php?That=Blah+Blah My rewrite rule is RewriteEngine on RewriteRule ^That/([A-Za-z0-9-+]+)/?$ this.php?That=$1 [NC] RewriteEngine on RewriteRule ^([A-Za-z0-9-+]+)/?$That/$1 [NC] When I type mywebsite.com/Blah+Blah it is working fine. How can I change the...

0
Q: Jquery security regarding mysql injection

Mike OltmansI know its probably unconventional but I want to know if the below code is secure or not. First piece of code is htee jquery object creation plus the call to the retrieve_data function: var dataset = [ { query_column: "articles.id,articles.category_id,articles.text,articles....

0
Q: Access bitbucket git repo via php script from browser

ritaI'm trying to set up my POST hook to automatically update the git repo on the server on each push. This works all fine and when I am user apache on the command line and execute the script, it works all fine - the permissions are set, the ssh keys work and it runs the pull. But when I try and run...

1
Q: Need a PHP proxy script with database

Sameed Alam Qureshii have a ip database get from max mind. our site gives a affiliate on images views for different location with different rates. Now i have a problem some one run proxy bot on site like these use a USA proxy but our system detect ip range of USA and pay it. i want proxy and vpn detect ip script on...

-1
Q: PHP Parse HTML Table

Xorgi want to put the substitution plan of my school (html table) into an output for an android app. An example (contents of the page which contains it) (i replaced all Private data with * * * *): Pastebin So here is the layout: <tr> <td class="vpTextZentriert">5.2</td>---> Class <td clas...

0
Q: wordpress mutli array from custom posts

Matthew O'DonnellSo I been trying to get a multidimensional-array to check multiple custom post types via taxonomy to then display a list of relevant titles. <?php $genres_terms = get_the_terms($gametitleID->ID, 'gaming_genres');?> <?php $rating_terms = get_the_terms($gametitleID->ID, 'game_ratings');?> <?php $s...

2
Q: SQL Generated select menu, updating textbox based on related value

Mathew MacLeanSome Background information: I have a table with two fields, TECHNAME and TECHCOLOR What I am trying to do is: Have a SQL generated Drop down menu based on TECHNAME (DONE) Have TECHCOLOR update in text box when TECHNAME is selected (ISSUE IS HERE) What is wrong Currently, the textbox is...

0
Q: PHP accessing web service protected by PKI/SSL

eluish192I need to use PHP to access data from a RESTful web service that requires certificate-based client authentication (PKI) over SSL/HTTPS. What is the recommended way of doing this? I need use webservices to EJBCA from PHP.

-2
Q: Printing / Echoing To Console from PHP Script

Dropped.on.CapricaI'm debugging a PHP script that runs a couple SQL queries and emails a set of users. I'm sure this is a very basic thing, but every time I try to echo, print, or print_r it doesn't appear while running the script. So say I have this in the script: print("This should print"); echo "on the comma...

0
Q: mySQL 2 update query in sequence, the second is not waiting the end of the first one

marcoi'm using MySQL 5.5.34 (InnoDB) and the workbench. i'm running the below queries: UPDATE Product SET PRD_CostoEuro = ROUND(PRD_CostoEuro * 1, 5), PRD_UpdateDate = sysdate() WHERE PRD_FlagPC = 1; UPDATE Product SET PRD_SpeseEuro = ROUND(PRD_CostoEuro * 0.20000, 5), PRD_UpdateDate = sysdate() ...

0
Q: php instagram api to post photo by computer

user2995370hi can any let me know how to post photo to instagram by php api using computer i am using this code to comment. <?php foreach( $comments as $comment ): ?> <p><strong><a href="?example=user.php&user=<?php echo $comment->getUser() ?>"><?php echo $comment->getUser() ?></a>: </strong><?php echo \In...

-2
Q: How to group only certain results in php, MySQL

Mihajlo LjubenovićI have a query that is showing results of posts on my website. I have an integer column with "0" as default value. What I want is to group all results where this value is not equal to "0". Results with default value shouldn't be grouped. Is this possible and if is, how can I do that. Thanks!

0
Q: Proper way to require file that requires db connection

blong824I don't use php very often and was wondering if someone could answer this question for me. I have a folder structure like so: -pages/rightCol.php -pages/privacyPolicy.php index.php In my index file I have a connection to the database like this: ob_start(); require($_SERVER['DOCUMENT_ROOT'] ....

0
Q: PDO error sql state 42000

Ing. Michal HudakI have query function in model: public function query($qry, $params = array()) { try { $pdo = $this->prepare($qry); $pdo->execute($params); return $pdo->fetchAll(PDO::FETCH_OBJ); } catch (PDOException $e) { return '<div cla...

0
Q: extract images from PDF with PHP

RichardThe thing is that the client wants to upload a pdf with images as a way of batch processing multiple images at once. I already looked around and out of the box PHP can't read PDF's. What are my alternatives? I already know the host has not installed imageMagick or any pdf library and the exec ...

0
Q: readdir() and opendir() working locally but not working on live server

vishalI was getting below error so changed opendir(http://test.myserv.com/Optfolder/upload/upload) [function.opendir]: failed to open dir: not implemented so changed to file_get_contents($dir) but then in next i got this error readdir(): supplied argument is not a valid Directory resource ...

0
Q: HTML/PHP How to collect and echo form data that doesn’t go to server?

user3070663I am trying to write a basic online recipe schema code generator that takes a recipe via user input, wraps the HTML schema code around it and outputs the code that can then be pasted into a Wordpress post. As an example, a user would use a form like this: Recipe Name: Hot Chocolate Author: Jane...

0
Q: Paypal is not working on a mobile browser

user3070654I am using Paypal in my site. it is working fine on system(desktop) browsers and I have received all the callback variables posted correctly. but when completing the Paypal transaction using a mobile browser e.g. iPhone, iPad, android it will return nothing. Please help me to seek it out. Thanks...

0
Q: Warning on loading XML data

Alok JainI am using following code to get current time (hours) in Los Angeles $response_xml_data = file_get_contents('http://www.earthtools.org/timezone-1.1/34.05223/-118.24368'); $data = simplexml_load_string($response_xml_data); $dt = new DateTime($data->localtime); $time = $dt->format('H:i:s'); list(...

0
Q: if it is possible to use PHP and MySQL in ASP.NET project

Kamran Sadini am working on a portal that is modular, something like Dot Net Nuke, it accepts modules in any Dot Net languages (C#, VB.NET,...) now i want to know how to use Php and MySQL in this project to create modules? You know i want to have modules in other languages is it possible to use php codes in...

-3
Q: Editing PHP files for script

user3070693I got the following error on top of my newly installed ptc script: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/wwwdmtra/public_html/sitename.php on line 6 Have no idea how to fix this. Also how do I get a title on top of my website www.dmtrafwe...

0
Q: MongoDB collection sorting with respect to no of occurences of keywords in a filed

Imran NaqviNeed to sort documents in a collection with respect to number of occurrences of a search keyword in a field. There can be multiple fields but for the sake to simplicity consider only one field.

-4
Q: Warning: mysql_num_rows() expects parameter 1 to be resource

StykkerI'm new to PHP/MySQL and I know there's a few of these topics but I really can't figure out what's going on. I'm trying to connect to the database, perform a query and count the number of results. It still echos the "No match found" even when it's not supposed to. $con=mysqli_connect("127.0.0....

0
Q: Websvn showing blank screen after adding svn binary location

coding_idiotI installed SVN & configured just 2 things, after renaming distconfig.php to config.php $config->setSVNCommandPath('D:\SlikSvn\bin\'); // e.g. c:\program files\subversion\bin $config->addRepository('Assembla', 'https://subversion.assembla.com/svn/projectname', null, 'username', 'passwd'); In...

0
Q: jPlayer -- multiple instance mp3 player

SliQzI am working on a program in wich i need to use up to 4 instances of the jPlayer mp3 player. All seems to be working fine, but when i play all of them, 1 by 1 the following happens. I play the items, and when i try to play them once again, it seems to somehow not rewind all the way to the begi...

0
Q: Drupal 7 site with web services

NickFI have a Drupal 7 site. I want to create some web-services written in PHP, that uses Drupal's database. For example export/ import the users. Can I create the services under the Drupal site folder? Is there any module for that? or I just read the data from the database?

0
Q: PHP/MySQL/HTML Add Error?

Haidar Musangi have files nilai-tambah.php , nilai-edit.php 1.nilai-tambah.php <?php //nilai-tambah.php //periksa apakah username = kosong dan hak akses = adm if(empty($_SESSION['username']) OR ($_SESSION['akses']<>'adm')){ //jika user belum login echo "Anda harus login untuk dapat mengakses halaman ...

0
Q: how to parse the contents of a particular row of a html table into array

PrasI need to pass a one of these row contents of features-table to an array. But the problem is I used an iframe to display the table. How could I do it? In main.php <iframe id="ifrm" src="reserved_tables/reserved_rooms_table.php"></iframe> In reserved_rooms_table.php <?php include '../cor...

0
Q: Wrapping each child key within an UL

ChaplinI'm wanting to wrap each child array within an <ul>, but I'm not entirely sure how it may be done? function RecursiveWrite($array) { foreach ($array as $v) { echo '<li>'; echo $v['id']; if(isset($v['children'])) RecursiveWrite($v['children'...

0
Q: error invalid controller specified in zend framework after upload to another folder

metallurgicalMy problem is, when i upload my project into hosting: http://172.20.30.43/psm/CB11011/ i got this error An error occurred Page not found Exception information: Message: Invalid controller specified (psm) this is my full domain link.. http://172.20.30.43/psm/CB11011/carrental/public/user...

0
Q: Modal window on a Form

user3057374Is there a way to make a modal window popup when a input is skipped. For example if someone forgets to put in their email, my current php mail file opens a blank page thats say "please enter email", but I want a modal window (preferable with an image) thats says the same thing without leaving my ...

-1
Q: Conditional outcome

user3069332What am I doing wrong? Im trying to get a green text if conditions are met, or normal line when not. This is my code: if($result) { echo ("<br> <u><b><h2>Totaal:</h2></b></u> <br>") ; if($formatted_one <= $formatted_two || $formatted_one <= $formatted_three || $formatted_one <= $f...

0
Q: Twitter Oauth Statuses/show in codeigniter returns error

Bananam00nI am using this library for implementing twitter Oauth in my project, and codeigniter if that is relevant in this case. I am trying to get a tweet based on the tweet id, but it's returning an error: {"errors":[{"message":"Sorry, that page does not exist","code":34}]} Here is the code I am usi...

0
Q: Cakephp with PEAR on Windows Azure Website

Ronny vdbI am trying to setup an Azure Website that will host my CakePHP website. Setting up CakePHP was simple enough by choosing the CakePHP template during the creation wizard of the Website. I tried installing PEAR by following the "PEAR in hosting environments' option, by uploading the go-pear.php f...

0
Q: Connection Timed Out error - postfix

Kermit the FrogI have postfix installed on centos 5.6. When I try sending mail using the php mail() function, I get a Connection Timed Out error. What can I do to fix?

0
Q: php loop through array within array - output array value and key

odd_duckI have the following array structure in place that i have to keep as it's an existing website: $label_options = array( "label_size" => 'A4', "label_position" => 'Top', "label_qty" => 50 ); $ink_options = array( "black" => 1, "colour" => 0 ); $item = array( "item_number" =>

-2
Q: How to write a language detection algorithm?

user2957386I am wondering how I can write a language detection algorithm in PHP or Java. For example, given a text, the algorithm should be able to detect whether the text is in English, German, French or any other language. Any thought? Thanks!

0
Q: Upvote/Downvote based forums and user profiles

Nicholas laneI am in the early stages of developing a website and I became curious as to how an upvote/downvote code works, similar to that of reddit and stack over flow. What is the code usually written in? Im guessing that this is mostly done with some sort of database to record and store the votes? Is ther...

0
Q: Registration Page Error - 404 joomla 2.5

HASSAROVhere's the interesting thing - I've used this function before but for someone odd reason its stopped working and its sending me to a page that doesn't exist within my website or folder for that instance .... Example: www(website).com/index.php/component/comprofiler/?task=registers I use Joomla...

1
Q: write data to DB with PDO give strange result

phpKoderI have this code for connecting PDO: $conn = new PDO('mysql:host = localhost; dbname = DataBase', 'kkk', 'kkkkkk'); if ( $conn ) { echo 'Connect Shodee'; } } catch (PDOException $e) { $e->error(); } and this lines for INSERT the values: function InsertFileToDb($filename, $filetype, $r...

0
Q: html_entity_decode( '&#039;', ENT_COMPAT, 'UTF-8' )

thylori get different results on different servers using html_entity_decode. i have searched a lot but did not find an answer directly to what i am experiencing, so i decided to ask for some help here... html_entity_decode( '&#039;', ENT_COMPAT, 'UTF-8' ) html_entity_decode( '&#39;', ENT_COMPAT, 'UTF-...

 
3:49 PM
0
Q: Ajax concatenate select and total record query

Paolo RossiI've a php page where there is a ajax concatenate select and a div with the total number of records in the table tb1 HTML <p> <select name="model" id="model"> <?php echo $myclass->selModel(); ?> </select> </p> <br /> <p> <select name="year" id="year"> <option value="">&nbsp;</option> <

0
Q: Magento Worldpay Integration - "Error Occurred"

MikeI am experiencing the following error with a Worldpay integration in Magento: http://www.magentocommerce.com/boards/viewthread/236952/ The transaction works from Magento to Worldpay completely fine and payments go through successfully. The problem occurs after a transaction, when returning to t...

0
Q: AJAX update MYSQL database using function called from HTML generated from PHP

user3070866I have a php page generating and displaying a table. for the last row in the table i want to display an image with an 'onclick' function attached. this will send the username for the selected row to a script that will use AJAX to update a database. The table displays fine but the AJAX is not work...

0
Q: Some questions regarding how to use a shell interactively with another shell in linux

OBVthanks for reading. This post is about some automation tasks, and also to satisfy my curiosity. Is this scenario possible, can anyone offer any practical pointers? From PHP --> Run a shell shell_exec(bash script); Bash script like: Run a shell; read file for input; pass input to shell; fetch ...

0
Q: CodeIgniter: How do I correctly run two queries with each other based on the first query result?

RyanI am querying my database for results (which all display correctly) and then while running a foreach statement I am attempting to look in another table for a matching ID to gather an override price which will take the place of the 'storeprice' listed in the first result. Here is my model: publi...

0
Q: htaccess dynamic rewrite rule

Vladimir GatevI have some request parameters which I am converting to friendly URL For example http://domain.com/members/girls/sort/last_reg/nick/ted/from/18/to/28/hfrom/150/hto/190/bbody/Athletic/ The parameters are dynamic so the URL could be http://domain.com/members/girls/nick/ted/from/18/to/28/hfrom/150...

1
Q: Using file_get_contents() without specifying a $context

DOOManiacI'm writing a wrapper class, part of which passes things off to PHP's built-in file_get_contents() method. I want to utilize the 4th and 5th parameters ($offset & $maxlen), but I do not need or want to use a $context. According to the manual, I should be able to just skip $context by passing in ...

0
Q: Joomla - Updating a table field with variable from another SELECT query

quantum_leapMy site runs in Joomla 1.5.26 and I am using a SELECT query to convert a filename path to a last modified date and print the contents n the page: $db =& JFactory::getDBO(); $query = " SELECT `filename` FROM `#__joomlatable` WHERE `filename` != ''; "; $db->setQuery($query); $options = $db->loadAs...

0
Q: Triconsole DatePicker Calendar - change displayed date programmatically from Javascript

tony gilUsing Triconsole DatePicker calendar class, BEFORE creating a calendar instance, you can easily set its default date $myCalendar->setDate(1,1,2013); but once you have written the datePicker, can you change its value programmatically from within Javascript (yes, easily) AND have the calenda...

0
Q: mysqli update with empty vars/values

user2987790I change the mysql to mysqli in my code BEFORE: mysql (worked fine) $set = "costAlertVar ='', costAlertSend = ''"; $eintrag = "UPDATE ".$dbprfx."_users SET $set WHERE connection = '$userConnection'"; $eintragen = mysqli_query($eintrag) or die("Error:".mysql_error());; NOW: mysqli (not working...

0
Q: Insert element into elements?

Me123How can I add a link to a footer with Simple HTML DOM and normal PHP? I use this to find the footer: $html = file_get_html('/index.php'); // Find footer foreach($html->find('footer') as $f){ //the normal php code here } Now how can I use PHP to add the link into the footer?

0
Q: Syntax error that only happens at the clients end

einarI'm having some difficulty finding what I'm doing wrong. I was writing a Wordpress theme for a client that works fine on my end, but when the client tries it out they get an parsing error that I can't seem to fix sins I'm not even sure what the issue is. My code line where the error is looks li...

0
Q: Symfony 2 : Catch every error thrown by the symfony framework

Robin HermansI'm writing a custom logger wich has to catch every error that is thrown by the symfony 2 framework. This includes stuff like: Warnings, Notices, Error and more. Currently I have my ExceptionsListener setup with the onKernelException. In this service I can catch all exceptions that are transform...

0
Q: Convert string to Base-4

user2455897I would like to convert a ASCII string to Base4 (not Base64) and then convert it back. The only way I can see how to do this is to convert the string to binary then split the bits eg: $str = 'help' Binary = 01101000011001010110110001110000 Base4 = 1220121112301300 is there a direct way of d...

0
Q: What is the Best MySQL Database Formatting Type for GPS Coordinates?

PrestoI have a script which is inserting latitude and longitude into the MySQL database. I have assigned these rows as: `gpslat` DECIMAL(11,4) NOT NULL , `gpslong` DECIMAL(11,4) NOT NULL , For some reason, when I pass the string gpslat=45.7834 and gpslong=78.7834 I am getting a rounded value in ...

-4
Q: A PHP Error was encountered

thanhkhietA PHP Error was encountered Severity: Notice Message: Undefined property: Teacher_incharge_controll::$student_model Filename: controll_teacher_incharge/teacher_incharge_controll.php Line Number: 74

1
Q: PDO... Am I doing it right?

MfaspkSo honestly, this is the first time I am working with PDO and Error Exceptions. I have gone thru manuals as well as different Q/As resolved here in past and came up with code that I am pretty satisfied with. But I really really need your opinion on this. I have built few functions that I normally...

0
Q: ftp_put uploading zero byte files

Stefan DunnI'm make a quick PHP script to run locally on our computers in the office. The idea is so we can manage a competition from our office without allowing online access. The FTP upload is so we can upload the file to our FTP account. I've got the following HTML form code: <form method="post" id="ne...

0
Q: message delivered confirmation in php

Bîlål Çhådhåri am making a php website for my semester project ...and i have a contact us page in which user send me a message and the message is stored in database . but i want that when user type the message and click the send button then after checking form validation it send the user that "your message is...

1
Q: Code igniter mysql backup fails with large databases -- any alternatives besides mysqldump?

Chris MuenchI know that mysqldump will always work, but my users are not technically inclined enough to use it. Which is why $backup =& $this->dbutil->backup(); has been so great! As the database grows it size the backup will eventually fail. PHPMYAdmin can seem to do larger databases than codeiniter's backu...

0
Q: how to echo php from html

user2706762i have a php code that that have a function that print html via echo like so: <?php function show_html($num_found) { $html=" <html> <head> </head> <body> <table width='100%' border='1'> <tr align='center'> <th colspan='2'>ERROR REPORT</th> </tr> <tr align='center'> <td>Number of error found</td>

0
Q: Replace array values with corrections?

JamesThis should be easy. I have an $array. some of the values of which are $wrong (second array) so I want to change them for their $corrections (third array) I was using this: $corrected = str_replace($wrong, $corrections, $array); But realized that it was replacing letters instead of taking ...

0
Q: database php like button

Malin PedersenI have since made an attempt to create a " Likes " button to my forum , including its " posts " . right now I have three different issues I need some help solving . Problem number 1 : after I press the button , and add a likes (see the source code I 've attached at the bottom of this post ) as r...

-1
Q: php MySQL Selecting value from table which includes values from another table

user2951102I have a two tables requirement- (r_id,r_description) - example value (1,The Robot must weigh less than 80 kg) keyword - (ke_id,ke_description) - example value (1,must) I want to select r_description which includes the words given in ke_description in the keyword table. What is the correct php ...

0
Q: CROP IMAGE IN FPDF is possible?

user3071057May i crop images in FPDF ? i have try this one Cropping images in CodeIgniter for FPDF output but does not work

0
Q: in_array is not working, it appears it should be

robz228Alright, i've tried everything. SO is my last resort!! heres my code: for($i = 0; $i < 15; $i++){ $coach = $trainergross[$i]['instr']; $tclub = $trainergross[$i]['club']; $rookcheck = "$coach $tclub"; if(in_array(trim(strtolower($rookcheck)), $rook)){ $pls = 'y no work'; ...

-5
Q: Parse error: syntax error, unexpected end of file in C:\Program Files\EasyPHP-12.1\www\Sitedeteste\upload.php on line 37

user3071019Parse error: syntax error, unexpected end of file in C:\Program Files\EasyPHP-12.1\www\Sitedeteste\upload.php on line 37 <?php //Funcao que vai abrir o arquivo php que faz conexao com o servidor require_once ("sistemadelogin.php"); $descricao = $_POST[descimagem]; $nomeFOTOG = $_FILES['fot...

0
Q: Google Maps Marker Clusterer

alliefaydenI'm using the Google Maps clusterer along with the Google Maps API on Wordpress. I'm trying to combine the two together, and get different results each time. When I define my markers, the map will show them without the marker clusterers. When I don't define my markers, the map will show the marke...

0
Q: TinyMCE or WordPress inserting WBR html element into text in WordPress

North KrimslyGreeting all, I've written a simple WordPress shortcode which wraps its $content in <code> tags. I see that sometimes the $content contains <wbr /> elements, which must be inserted either by TinyMCE or by WordPress. I'd never even heard of <wbr /> (word break opportunity) until I looked it up. ...

0
Q: How to pass the data obtained from the PHP page on the server's local page in JS?

DPD-I have an HTML 5 page that you can use offline. When this page is online you should connect to a PHP page (the 'I've already done) with a login and receive response in 1 string and 2 integers. How to pass the data obtained from the PHP page on the server's local page in JS?

0
Q: adding datetime to mysql database php

Amy Jenningshi guys just wondering how i go about adding a clock in time to mysql database from php script. Here i have php script to detect user login, and im wondering how i go about adding the datatime of when the user clicks on the clockin button and saving it to the mysql database??? include 'config.ph...

0
Q: How I can render interlaced image in kohana 3.3

user3071107I want to make the images are not loaded from the top down, and once fully gradually improving the quality of $result = Image::factory($filename) ->resize($width, $height) ->watermark($mark, 10, -10, 70) ->render($ext); $this->response->body($result); maby use ...

0
Q: Looping through a multidimensional array to output path to files in array

Rik89I have this script which will search a directory and store a file tree to an array below: $dir = ABSPATH."/uploads"; function getDirectoryTree( $outerDir , $x){ $dirs = array_diff( scandir( $outerDir ), Array( ".", ".." ) ); $dir_array = Array(); ...

0
Q: Paginate query result with PHP and AJAX

Johny totaI have a filter form in my html that send data to php via ajax to mount a query. I want to paginate the results from my query. what is the best way to do it? you can check the site here (click filter) ajax: jQuery(document).ready(function(){ jQuery('#filtros').submit(function(){ ...

0
Q: Magento issue with external mod "Integrity constraint violation: 1052 Column 'created_at' in where clause is ambiguous"

user1806445$select->joinLeft( array('order_table' => $collection->getTable('sales/order')), 'order_table.entity_id=main_table.entity_id', array('admin_user_id' => 'admin_user_id') ); in a custom magento module that is causing the error Integrity constraint violation: 1052 Column 'cr...

0
Q: Conflict while using two traits using the same trait although the methods are aliased

olvlvlI wanted to create traits for properties such as created_at and updated_at for my ActiveRecord implementation, but it looks like even if the methods are aliased, PHP consider that there is a clash and throw a fatal error. That makes me sad. Is there a solution to that? I created a girst there: h...

0
Q: Symfony2 Doctrine MongoDB & "private" fields

cept0I'm looking for a function, to remove fields from a Document in doctrineauto-magically. Let's say, I have a User Document that can be queried anonymously with a RESTful api. Of course, I want to remove dangerous fields, such as password or secret etc. Document: // src/Acme/StoreBundle/Documen...

0
Q: PHP Jquery-like nesting readability

KeiI'm building a new framework and beneath all the work I'm suffering a strange question aroused my mind. Is it worth creating a jquery-like nesting syntax like this ? core->component->...->method() Assuming all "components" expand an abstract class and the core is like class core { public ...

0
Q: PHP doesn't compile when there is a space before array creation

MalharhakSo I just spent 30 minutes trying to debug my code, when I finally understood that: $words = array("word", "word", "word"); // doesn't compile $words =array("word", "word", "word"); // Does compile I just tried deleting the space between "=" and "array" as a sort of desperate random try and it...

0
Q: Yii2 thirt-party PHP class

KevinI want to install a thirt-party PHP class for my application. How should I do that in Yii2? I could not find anything in the documentation.

0
Q: preg_replace find and replace with appended value

Brad$string = 'img-file_name.jpg'; $pattern = '\.\w+'; $replacement = '_small$1'; echo preg_replace($pattern, $replacement, $string); I want to append _small to the end of the file, just before the . extension I want the final result to be: img-file_name_small.jpg Receiving error: preg_replace...

0
Q: getting null when decoding what it seems to be a json object

maxin the firebug when a ajax call is send i see the response as json i'm trying to decode this json response with php $data = '[[10592,[[2778318,"Damash Gilan FC","Malavan",10592,"2013-12-06T11:30:00.0000000",[[5950609,0,,,,1]],[],,,,,5732,5717,-1,-1,0,0,0,0,"Soccer","Iran - Pro League",1],[...

0
Q: php - preg_replace a character not followed by a specific character

hobaileyI have a string: this &foo and&foo but not &#bar haius&#bar All "&foo" should be replaced by "&amp;foo" and "&#bar" should be left untouched. I.e. any & not followed by a # should be replaced. Any ideas? I've tried the following but it's not going very well... preg_replace('/&*$[#]*$/', '&am...

0
Q: Merge Multidimensional Arrays

BenI have a somewhat complicated function that builds an array structure dynamically to insert fields into MongoDB. We store the structure in MySQL. The function outputs the following array structure: Array ( [address] => Array ( [street] => 10 Stack St ) ) Array ...

0
Q: .htaccess: should I use general rule or a few specific rules?

jave.webI am creating a webapp which consists of a very few main scripts. And I wonder - is better AND faster to use some specific rules (from about 10 to 20) Or is it better to use some general rule e.g. http://example.com/go/my/boy would come to go.php?my=boy ? This question is about PERFORMANCE :)

0
Q: Is there a simple way of changing magentos tax to only round down to the nearest penny?

user3021997Hi I am just wondering is there an easy way to get the tax in magento to only round down no matter what the last number is. for example: 12.56 will stay 12.56 12.563 will round down to 12.56 12.569 will round down to 12.56 no matter what the ending is i want it to round down i am only using...

0
Q: PHP returns NULL from database as empty string "". Why?

Alan KisThis could be connected to my previous question, and maybe a duplicate to this. Well, why value declared as NULL in MySQL database is returned as "" (empty string), in this case all my functions which returns some value dependently on result of evaluation, dont' work. $var = NULL; // false $var...

-1
Q: New site using Joomla backend

user3071190I would like to ask if it's possible to use Joomla backend for my site. The site is ready(in php) and I want only to use some joomla backend applications. Thank you, Angelos

0
Q: Long IF Statement.. Getting mixed up between OR and AND

PeanutI'm getting so confused on why this isn't working: if( ( ! $listing_info && $listing_info['status'] !== $this->get_approved()) || $listing_info['user_id'] !== $this->auth->get_user_id() || $listing_info['user_group'] !== $this->get_admin()) { return false; } Ok so my dilemna is these requi...

0
Q: Cannot modify header information - headers already sent by (i am using cookie in my set i want to reset the cookie)

user3060459//Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/students/public_html/beta/inner/logout.php:1) in /home/students/public_html/beta/inner/logout.php on line 4 //Array ( [cookie_name] => gausulpersonalive@gmail.co...

0
Q: PHP Select Form Not Populating: Undefined Index

visualbasicNoob9000I am attempting to load some values from my SQL database based on my selected option value. However I am getting the following error. Here is my code: <p> <select id = "selectedValueG" name="selectedValueG"> <option value="Amphibians">Amphibians</option> <option value="Birds">Birds</option> <o...

0
Q: having trouble with php glob() pattern

Genius in troubleHi I have this requirement where files names are named as 365974556_5123_200x200.jpg 365974556_5123_500x500.jpg where 365974556_5123 will be same (its a variable). Now i need to match the pattern to delete these files. I tried: array_map('unlink', glob(MEDIA_FILES_PATH . "contents/" . $im...

0
Q: New to multi-platform development. Need to trigger a java based client to make an API call to a PHP web application server.

BigAlNew to multi-platform development. I need to trigger a Java based client to make an API call to a PHP web application server. Any help or pseudo code would be very helpful.

0
Q: Getting XMP and EXIF from JPG with PHP

user3071204I'm trying to just read the exif and xmp of a jpg with PHP. I've tried several options, including the Metadata toolkit from ozhiker, which will never load (It just says that there's no specified file, which there was), and also trying to just load the xmp, which doesn't return anything. $content...

0
Q: Delete data from tables php mysql

user3063908I have 2 tables which i was to update at the same time via 1 query if possible. I have a customer table with a primary key of cusomerid which is set to auto increment and a complaints table where customerid is set to a foreign key.I want to delete from the customer table and put simply when i del...

0
Q: PHP Script to create Multiple Word Documents and allow download

MichaelIn our office we have forms that we create for work that we do and the idea is to simplify and speed up the process of creating these forms. I have up to 4 different Word documents to create (.docx format) and a form to create them based on the input of the user (checkbox fields). Based of the us...

0
Q: Angularjs+nodejs+mongodb or angularjs+web service REST (php)+mysql

user1260928I m looking for the best architecture for my webapp. This app will mainly manage lists of elements(CRUD). I m wondering what would be the best architecture between the two I ve mentionned. Could anyone give me a hint? Thanks in advance!

0
Q: PHP Function not returning replaced string when using variable

user3071239I am having trouble using a function for replacing text in my string, here is the function: function decodeString($string){ $foo = "foo1"; $string = str_replace("foo",$foo,$string); return $string; } I am accessing it from another page and the PHP file the function is in, is included before I ...

0
Q: Server down after PDO connection

mandzaI don't know is this off-topic for this site but i have site that run on php and mysql. And i want to change my mysql connection to PDO. This is my connection file that i include in every file at the begining: session_start(); $connection = @mysql_connect("localhost", "user", "password"); $data...

0
Q: SQL - select distinct only on one column

Jason LipoI have searched far and wide for an answer to this problem. I'm using a Microsoft SQL Server, suppose I have a table that looks like this: +--------+---------+-------------+-------------+ | ID | NUMBER | COUNTRY | LANG | +--------+---------+-------------+-------------+ | 1 |...

0
Q: Parsing Text, Assigning Variable, Updating Variable

markmillyI am looking to take a number of text files, parse them, find the largest number after a certain regular expression and put that into a variable. Here is what I have thus far: $txt_file = file_get_contents('files/11042013_300_active_users.log'); $rows = explode("\n", $txt_file); $array_size = ...

0
Q: can't use JOIN with related entities in doctrine2

meteorI was guided by this http://docs.doctrine-project.org/en/latest/reference/dql-doctrine-query-language.html#joins and i can't understand what's wrong. My entities: /** * @ORM\Entity * @ORM\Table(name="term") */ class Term { /** * @ORM\Column(type="integer") * @ORM\Id * @ORM...

1
Q: Use Laravel 4 Encrypter within a namespace

Hilmi Erdem KERENI am trying to use Illuminate\Encryption\Encrypter; within a namespace which I created. The code really exists in my file. Problem: I want laravel to use the key set under 'app/config/app.php' automaticly. However the constructer wants me to set it properly with my hands. To see how this task i...

-2
Q: If else statement for login and logout

Hubbak Khani am using a script at front end, if a user logs in, it should render username in place of login button else it should remain the same. but my script is not not working.... <?php if(!isset($_SESSION['txt_username']) || !isset($_SESSION['txt_pwd'])){ echo "<a href='login.php'>Log in</a>"...

0
Q: mysqld crashing, php processes remain in memory

ironywritI had a database configured for collation utf8_unicode_ci but after a mysql database upgrade (the server was running an out-of-support version) the stored procedures that I use to interface with a desktop app would not run... kept saying that there was a collation conflict between implicit utf8_u...

0
Q: Is there something other plugin for php autocomplete under sublime text 2?

Zhaonan LiI use sublime text 2 to write PHP. I need php autocomplete. But I found that the AutoComplete under sublime text 2 always provided none-accurate information. So I shut down that feature by "auto_complete_selector": "comment", in user setting. And I install "SublimeCodeIntel". But I found that th...

0
Q: Is it adviced to develop an ecommerce website with PHP and MySQL?

Cro ResistorI can understand this question may be weird. But I am thinking about the possibility and analyzing here. I need to develop an e-commerce website as soon as possible. And in the reviews and rating I understand Magento is very good for e-commerce, but the review said it takes much time to configure...

-1
Q: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found

JimmyI tried to run the following code but it returned this erros: Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column ''1'' in 'field list'' in /home/cardg/cards/jogar.php:59 Stack trace: #0 /home/cardg/cards/jogar.php(59): PDOStatement-...

0
Q: Wordpress - issue with the lightbox plugin inside a loop

Francesco Lupo Renzii'm having problems with the Lightbox Plus plugin. I need to create a bunch of elements in my homepage, and Lightboxes linked to them to show more content. Now, I managed to create all the elements needed, but the Lightboxes generated are all the same, all with contents related to the first of th...

1
Q: undefined variable in php

user3071283Hi i'm new to php and I keep getting an error in my guestbook saying ( ! ) Notice: Undefined variable: errors Call Stack # Time Memory Function Location 1 0.0156 154584 {main}( ) ..\guestbook.php:0 ( ! ) Warning: Invalid argument supplied for foreach() on line 61 Call Stack...

0
Q: Realtime image from rrd file in php

szpalI would like to generate a "realtime" image from a rrd file in php script, but no success. This is the php script (/var/www/rrd_image.php), which should generate the picture: <?php header("Content-type: image/png"); $options = array( "--start", "-1d", "--title=xxx", "--lower-lim...

0
Q: Paypal not posting data on Return url on mobile browsers

user3070654I am using html form to integrate Paypal and my form is as When I am testing this Website code on desktop browsers this is posting paypal data back on return url perfectly. But when I am testing same website code o...

0
Q: Prestashop Search Function

Conner BurnettWe have Prestashop 1.5 and have ran into a problem. We have searched around and can't seem to find an answer, so I thought I may see if anyone on here may know. We are trying to modify Prestashop's search function so that it will also search the reference numbers of the Combination products. Exa...

-1
Q: deletion from mysql through php

NerdsRaisedHandI am trying to delete a product listing from my shirt_types table (which is tee-shirt products). I have an administrator page that list all the items in the table along with there information. I have added a delete link at the end of the columns for each item. When I click the delete button it ...

0
Q: Copy external image to server with PHP

user3071325I want to copy an external image to my local server. I know how to do it when the url looks like this: www.external.com/image.jpg But how does it work when the image is like this: www.external.com/image.php?image=flower ? The code I have is this: $headers = get_headers($url, 1); $type = $heade...

0
Q: Redirect from https to http

user3071333My website's page www.itcontractorsuk.com/contractor_mortgages.php has been indexed in https version in Google index, i.e. https://www.itcontractorsuk.com/contractor_mortgages.php However, I have uninstalled SSL from my website, but Google has still kept the https version of the page in its inde...

0
Q: How to encode for "Entity 'igrave' not defined" error in XML feed?

TomI'm building a feed from an url, so I take all the html content (with "file_get_contents" php function). Then I do some cuts to the content and take out what I need. It seems I've a problem with the accented vocals. In fact XML page return me this error: "Entity 'igrave' not defined", where the ...

0
Q: Loading a wp_editor () via ajax doesn't work correctly

user1920428I have a problem with loading a wp_editor via ajax jQuery into post_type page. I have removed the classic wp_editor and i want add my wp_edtior via ajax. Here is my code: // MY PHP CODE add_action('init', function(){ new Page_Editor(); }); class Page_Editor{ function __construct()...

-3
Q: jQuery mouseenter mouseleave show/hide div

FoxWizzy$z = 1; <td id=imgs align=center valign=middle><a href=\"" . $dir . $entry . "\"><div id=img$z style=display:none;position:absolute>test</div><img src=\"" . $dir . $entry . "\" name=\"" . $entry . "\" width=150 height=120 /></a></td>;$z++; <script> $(document).ready(function(e) { $('#imgs').mous...

0
Q: Getting PHP templates for download

user3045125i have been looking for website templates to download so far i got only one bootstrap template. I can't seem to find much with source code attached with them for download. which site do you recommend. please

-1
Q: How to avoid SQL injections with prepared statements

LithilionWhen I use prepared statements do I have to use functions like mysqli_real_escape_string or are the executed automatically? For example should I just use this $stmt = $mysqli->prepare("INSERT INTO REGISTRY (name, value) VALUES (:name, :value)"); $stmt->bindParam(':name', $name); $stmt->bindPara...

0
Q: Web based Departmental Report Submission/Management with Tracking and Deadline

user1990795Basic Background We run a company with several small regional departments. Monthly Sales and Departmental reports (basically a fixed format form to be filled with the Monthly Numbers/details) have to be submitted to us in the HO. Currently it is done manually via email. Requirement We were loo...

0
Q: Server-side Single sign-on with Live Connect API

user3019997Assuming I get user's email and password in a variable, how do I authenticate on Live Connect on behalf of this user who consent to grant me with permissions to access his information ? Is it possible to perform this by only using REST implementation ? Using PHP.

0
Q: Requiring a Password / Passphrase to view contents of category with Wordpress

ignu5_I'm trying to set something up where when a user clicks on a category link within the navbar, it asks them for a password / passphrase to view that categories posts. I've done a lot of digging, and I can't seem to find a solution. Can anyone point me in the right direction? I figured I would be a...

0
Q: Limit time user is allowed on website before forcing a login

user1387976I'm not sure what language to use (php, Java or other) but I'll need to limit the amount of time a user is allowed to browse our website before forcing a login popup appears. Example: Unregistered user browsing our website, after 1mins of browsing we show a popup saying they need to log on to c...

0
Q: Magento : Fatal error: Call to undefined method Zend_Db_Statement_Exception

tintinbossTo put it shortly, I'm looking for a lifesaver... I'm in serious trouble with this I had a working Magento 1.7 installation, there was some problem with a plugin named worldpay, so I checked for various upgrades via magento connect and was upgrading. While trying to upgrade Mage core or somethin...

-1
Q: input field error with php echo statement

DanishcjI get this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''05/12/13)' at line 2 Because of this code: <input type="text" name="submitdate" value="<?php echo date('d/m/y'); ?>" readonly> Any help i...

0
Q: Queuing up videos for live stream

Abdul Aliwould first like to tell that am new to streaming and ffmpeg. would try to explain scenario as much as possible. A web service is intended to receive chunks of video from a user. those chunks need to be simultaneously sent to the web for live streaming for a seamless viewing. so the videos ne...

0
Q: composer has ignoring installer-paths configuration

Patrick Maciel - p4devI'm try using CakePHP for the first time with composer, but I have some problems. I have this composer.json: { "name": "example.com.br", "repositories": [ { "type": "pear", "url": "http://pear.cakephp.org" } ], "config": { "vendor-dir": "Vendor/" }, "require"...

0
Q: PHP / Python / Ruby - Long running tasks with short previews

Cody SmithI have a web frontend which uses data from a task that must be run frequently in bulk (which takes more time than I'd like to use PHP for). The data can be stored in a database so I was planning on writing a Java application to run the task and use the database as a middleman to get the results o...

0
Q: Child class to access child class

JarrodI have a single class that calls aload of other classes; require_once('class.database.php'); require_once('class.users.php'); Class Bootstrap { public $db; public $users; public function __construct() { $this->db = new Database(); $this->users = new Users(); } } $est = new Boo...

0
Q: ios comparing memcache and core data

user2093708Currently in order to limit the number of mysql requests, each user has a folder with multiple empty files corresponding to updates made in the database. The last accessed date of a file is compared to a date stored in core data. Only if the last accessed date is after the date in core data doe...

0
Q: PHPform not updating SQL Row

Maggie AckermannI am trying to update sql ROW only using member_id this is my current code. if ($con = mysql_connect($host, $username, $password)) { if (mysql_select_db($db_name)) { $sql = "UPDATE members set ussd_office = '".$ussd_office."', ussd_email = '".$ussd_email."', ...

0
Q: Validating that all checkboxes are checked in form / Wordpress

steboI have the following that works great in jsfiddle: http://jsfiddle.net/cRKPt/ but when implemented here: http://tinyurl.com/kyttpue (within a wordpress page [view source to see coding/js]), it's not working..any ideas? HTML-- <form action="" id="myForm" method="post"> <input type="checkbox" id...

-1
Q: In preg_split, what do the different delimiter notation mean?

user3032931I want to know the meaning of the different notations used in preg_split?

-1
Q: undefined variable, and parameters null

user3071283My guestbook is telling me that some parameters are null instead of 1, and some variables are still undefined. ( ! ) Notice: Undefined variable: result in C:\wamp\www\unit08\unit08\includes\login_functions.php on line 27 Call Stack # Time Memory Function Location 1 0.0000 144576 {m...

0
Q: Wordpress wp_is_mobile() function not working

Attis BarrosI have a plugin on my Wordpress that I want to block when a user is on mobile. In my functions.php I added the line: if (wp_is_mobile()) { wp_dequeue_script('flare'); wp_deregister_script('flare'); } Unfortunately, this made the script not load for both mobile and desktop users. So I n...

0
Q: PHP update page when user submits by postback form

user3025099So I have a page with a postback form where users can delete records (which appear as checkboxes) from a database. When you click 'Submit', on the same page a confirmation message is displayed "Successfully deleted the record". The problem is that the checkbox remains there. Only after you refre...

0
Q: Creating dynamic header links in PHP

user3063919In my code i have an if statement, which is return is true, it would header the user to a specific page. But i want to send some data to the next page. So i tried using dynamic links. but it doesn't seem to work. Here's my code; <?php $row = mysqli_fetch_object($query); if($row->Usertype = "Gen...

0
Q: PHP JSON functions not available while being called as CLI script?

ehimeJust noticed something, but I'm not sure why this is true, or why it is different than a standard script, maybe someone can help me solve this riddle. When running a PHP script that contains a json_* function from the command line as an executable I will get a Fatal error: Call to undefined funct...

0
Q: Htaccess pretty urls

user2965243trying to make pretty urls, but it doesnt seems do enything. Im doing this first time and by the guide. So i think im missing something or it aint that simple. Maybe some1 can help? Any advice? Tryed to with generator do but none of them generated code that would work :S this is page: domain.com...

0
Q: I need to set forwarder for user after login

user3026568I am trying to set forwarder in login page for users to redirect them to the page. I mean if user is at mysite/abc and now user wants to make a comment on that page so I need user to be logged in and It will redirect user to mysite/login?continue=abc But it is not redirecting user to abc page, i...

0
Q: Best way to paginate query result without GET method PHP

Johny totaWhat is the the best way to paginate mysql results without refresh the page? I'm using ajax to connect my html file to php. The php file has the query and i want to paginate the result. I'm paginating passing an URL parameter when is clicked but it doen't fit in what i want because my query is ...

0
Q: Alternatives to shell_exec for clearing varnish in php

Marty WallaceI have a script that I have inherited and it clears varnish cache on the server using shell_exec. I have not ever been a big fan of using shell_exec but I do not know another way of clearing the cache directly from a php web page. Are there other ways for this to do?

0
Q: Using method with mixed attribute vs 2 methods

darkheirMy problem is that I need 2 ways to retrieve some informations, one using the id of the object and one using its name. When I'm retrieving the information using the name, then I need to get the id so after I come back to the first way to retrieve the information. I have in mind 2 solutions that ...

0
Q: Paypal advanced GET fields returned

xShiraseThis is a very easy question. I need to code a receipt for a paypal advanced payflow (the page at RETURNURL). Unfortunately, the site is live and I can't switch it to sandbox for testing and I don't want to use my money testing it... What I need to know : Are the COMMENT1 and COMMENT2 fields r...

0
Q: Please recommend a library or framework for custom fields in PHP

PadraigI would like a library or framework to implement custom fields in PHP. Could someone please recommend something? I'm not interested in Wordpress or Drupal; I need to integrate this functionality into a custom application so I'm interested in something compact that I can drive via an API.

1
Q: How to use a transaction query mysql to keep it on for a few page in PHP?

Nina SuhariI know how to using a transaction query in mysql and also commit or rollback. I want to make a portfolio of an application in my website. Some guest could try to use it, but when it end (either they logout or suddenly close the browser), i want all the query they've been made to be rollback so i ...

0
Q: PHP - I need a function that can easily test that a string starts with something or ends with something

DurpDurpkinsFor example: 'Hello World' I need to test if it starts with 'He'. I need to also be able to test if it ends with 'ld'.

0
Q: How do I access the Google Spreadsheets API in PHP?

Josiah SpragueStarting with the Google Developer documentation on the Google Spreadsheets API, I found that "A number of client libraries are provided in various languages.", but Google only provides client libraries for Java and .NET. For a PHP library, they recommend using Zend GData. So, I headed over the t...

0
Q: get class variable in static method

user1238763I have a class variable that I need to have available without an instance of the class. Something like $size = Image::getSize('original'); Here's my attempt, but it getSize returns null. class Image extends Model { protected $sizes = ['original'=>['w'=>'2048','h'=>'1536','f'=>'1'], ...

0
Q: How to add custom rewrite rule to Wordpress

user1869566I have a wordpress page called products which is using a custom template i want them to be able to click a link such as /products/games/ which rewrites to /products/?cat=games is this possible, i've tried RewriteRule products/(.*)/$ products/?cat=$1 [L] placed in the .htaccess but thi...

0
Q: if statement disabling my jquery function/button

Jason KatI am a noobie and still stuck on this problem after hours of searching and trial and error. Any help would be greatly appreciated, as I am completely out of ideas. Thank you. I have a jquery comment submit form, that displays the comment live when you post. The code is working perfectly until ...

0
Q: php while loop ending unexpectedly

Michael McLaughlinSo, I'm writing a custom website for a photographer. I am trying to make it mobile first, and make sure everything can work without javascript. I decided to use a php while loop to create a really long string, for a script tag that I am injecting next to some html. I do not want to put this into ...

0
Q: PHP connect to mysql database

user3071512I'm trying to make a connection between my database and the login form that I'm using in my website, but I'm facing a problem with that, so every time I click on login in this massage appears "No database selected" here is my code ` if(isset($_POST['Email']) && isset($_POST['Username']) && is...

0
Q: resolve url to get the actual page of website?

Ankur Dhanukai came across this kind of URL http://www.ukbidz.com/Baby,category,1889,parent_id,categories actually this URL is not generated by me. I want to some changes in it, and i am unable to locate the page from where the data is coming. So i need to know is there any way to find the page from the dat...

0
Q: Nginx doesn't create cache files (using uwsgi+php)

ArangelI use nginx as a web server and I want to cache everything for my homepage "/". It's a PHP application and I'm using uWSGI with the PHP plugin. This is in my nginx vhost configuration file: proxy_cache_path /var/lib/nginx/ levels=1 keys_zone=cache:10m max_size=1000m inactiv...

0
Q: is my php salt safe?

user3071523I'm wondering is my php salt safe also for open source?, i've trying to search more information but I wasn't able to find what I needed to know. my code: <?php class salter { // this will create 3 ciphiers in order to make hashes clearly unreadable! (I hope...) public function simpleSalt($pa...

-2
Q: Get recently viewed posts by using PHP

zackI want to store and display recently viewed posts. I don't want to use cookies because not only want to show what the visitor him/her self viewed posts but viewed by others as well. I know I can simply store post id in the table and display the data. But is this is best way to do this. As I unde...

0
Q: Product images not appearing in Woocommerce

Rob644I have been using Canvas with a WooCommerce theme in order to develop an ecommerce site for a client. This morning, I realised that the product images that were being uploaded through the 'featured image' tab were appearing blank. Anyone have an inkling of what the problem is? My site is at htt...

-1
Q: Fatal error: Class 'Services_Twilio' not found

Andrew CharltonI'm trying to send a text message when a form is submitted using Twilio's test account however I'm receiving the following error: 'Fatal error: Class 'Services_Twilio' not found' My code is as follows: } else{ //PHP native mail( $to_guest, $subject, $html_text, $header_guest); ...

0
Q: Javascript obfuscate AJAX code

user3065191First of all sorry if the name of the topic isn't the most correct. Imagine the following code which connects to a PHP file by AJAX. function get_locales(){ var the_locale = $('#page-add-text').val(); var url = "classes/load_info.php?type=locale&value=" + the_locale; var all = ""; ...

0
Q: How to stop atomatic submition of a form on your website?

CyberBoySomeone one is posting random comments website http://computerinfo.in/lostandfound/searchlost.php. You can have a look at it. The only forum available for posting is... http://computerinfo.in/lostandfound/reportfound.php. I dont want to apply captcha on it. I want to block that particular IP(...

0
Q: How deploy my environment with git?

mayconfsbritoI've a environment to deploy with git and I don't know how do this. Our team works with several developers hosts (local repositories for each one) which should push for one server with the central repository. So we have other two servers with "bare" repositories for each one, but this two reposit...

0
Q: Google column chart bug with the drawing in Web app

manqkusIn my web app there is a google chart that uses dataTable(jsonObject) to draw the graphs and I have bugged data. Here is my code of calling the function : <script type="text/javascript" src="//www.google.com/jsapi"></script> <script type="text/javascript"> google.load('visualization', '1', {pa...

0
Q: MYSQL Time differencials

CBC_NSBare with me as I explain my scenario. I am using php and mysql to create an automated html email report. This report shows the total number of emails received and logged into our system by a particular client. This is broken down by month in the given year. It also shows the average turn tim...

0
Q: group by, but display only one rows different value from 2 fields and display all other value is this possible?

user3067323Apologies for the strange subject, passed 50 and like php and mysql Have a question that I can not find the answer to or if it's even possible to do. I collect comics and want results like this on a php page Name and year is displayed once. GROUP_CONCAT give me close to the resault i want but h...

-2
Q: 500 Internal Error, Whats wrong with my code?

PrivateMufasaIm having a little issue with my coding, i keep getting a 500 error when i run this script: <?php include_once("../../includes/connect.php"); if (isset($_POST['action']) && $_POST['action'] == "check"){ $email = mysql_real_escape_string(strip-tags($_POST['email'])); $username = mysql_real_escape...

-1
Q: How to delete likes of a Facebook fan page?

vishnuI am developing a Facebook app to manage my pages. Is there any any way to delete the likes of pages? For example the likes should not exceed 500 for a page. Say I want to delete 250 likes from my Facebook fan page. How can I achieve this? I can delete the likes of a post by issuing a HTTP DELET...

-3
Q: Teaching server side programming by building an mvc framework in php

JeremiahI'm exploring different ways of teaching a server side programming course for sophomore students at university. I want to develop course content that teaches the principles of server side development by having the students build a framework and several applications on top of the framework. Below ...

1
Q: Clean way to integrate JS into JS

user300675My goal is to generate some JS from PHP. That is the content of my scipt.php so I can use later <script src="script.php?id=1&username=tom"></script> here is the content of script.php if (isset($_REQUEST["username"])) { $username=$_REQUEST["username"]; $params.="&username=$username...

0
Q: Image not showing ob_start()

user2014780Couldn't find anything on the webs so here is the issue: I have a cropper tool and I want to show the cropped image on this page. But because my functions.php has a function that uses a header method, I had to use ob_start in my file. That causes the problem that my image is not shown (it's a que...

0
Q: Sphinx Search Sorting/Ranking

PhilippI just recently discovered sphinx search which I want to use for my PHP application. I have a table of geolocations where every record stores a country code. For every user who uses the search function to look up geopositions, I know which country he is from. How would I reweigh the results such...

0
Q: MySQL SELECT with double quotes giving trouble printing in php

user3071630If anyone has any ideas on how to help me out with this, when I run it usually just creates a never ending table. <?php $link = mysql_connect('localhost', 'blah', 'blah') or die('Could not connect: ' . mysql_error()); mysql_select_db('blah') or die('Could not select database'); extract($_GET...

0
Q: How to Post object array to php

Arun RajI am working on an asp.net application. I need to call php webservice.I am using Asp.net web Reference to connect the webservice. I need to pass a object array. But WebReference class not correctly converting it to xml format so php cant find data what I send. Below shows my code: C# class ...

0
Q: Update table using mysqli

Joseph82I wrote a PHP function, that takes two input parameters and updates a database table. function updateTable($a, $b){ $query = "UPDATE myTable SET dataUpload=CURDATE(), lastUpdate=NOW() WHERE Code IN(SELECT Code FROM myTable2 WHERE QR = ?) AND aid=?"; ...

1
Q: Is it possible to spoof a php define?

ArianI want to prevent direct access to my header.php and footer.php files... I know there are a lot of questions on SO about how to prevent direct access, but none of them really explain how secure those methods are. Things like the example below, seems like security through obscurity, because any...

0
Q: Getting mysqli_fetch_array data without 'moving' to next row

user3033026I have a result from a complicated sql query. The result is something like this: player_id mail_text mail_title 1 hello talking 2 hi talking 1 how are u? talking 2 fine! talking Now, I want to scan through all the result using ...

0
Q: UTF-8 characters in uploaded file name are jumbled on file upload

gazarethI'm running a system on IIS7. The page META tag has the encoding as UTF-8, and the real encoding would appear to be the same according to the Chrome menu. When I upload a file with a "long hyphen" in its name ("–") it gets converted to junk characters ("–"). The junk characters are saved in M...

-1
Q: php logic for coding

geek-ballerhi i want help with the logic and understanding part of this programming,these cars calculated in the form. what i need help with is how do i understand the logic behind it. 1) Your rental company now offers 6 models: a. Subcompact - $20 a day b. Compact - $25 a day c. Mid-size - $30 a day d...

0
Q: When posting to a URL, Google Analytic's Event isn't firing

Brian LoganI am using a Cron-Job to search the database I have every 15 minutes for new users, the problem I am running into though, is when it finds any new users, it is supposed to use jQuery's GET function to get another URL with some parameters, for instance: http://sampleurl.com/report_to_ga.php?usern...

0
Q: Undefined index using button's name attribute and post method

user3071639So, using PHP, I'm trying to make a simple poll for my website and I've hit a block which I can't seem to get around. To explain this as short as possible, I've got a form, in which I'm displaying the values from the database, and it all works fine. Using a post method, I thought I'd submit the ...

0
Q: HPHP HipHop for PHP make fails at 98%

Bas Kuis[ 98%] Generating systemlib.php [ 98%] Built target systemlib Linking CXX executable hhvm ../third_party/thrift/libhphp_thrift.a(TEventBase.cpp.o): In function `apache::thrift::async::TEventBase::SmoothLoopTime::setTimeInterval(unsigned long)': TEventBase.cpp:(.text+0xf1b): undefined reference to...

0
Q: Laravel, Dropzone "Trying to get property of non-object" File upload error

mateoooi am working on a project that needs file uploading. I have implemented Dropzone.js and Laravel Framework. I am sure i have setup everything correctly but when i drop the files to dropzone and they finish upload i get this error {"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalError...

 
7:28 PM
0
Q: [Microsoft][SQL Server Native Client 11.0]SQL Server Network Interfaces: Connection string is not valid

user1424232I'm trying two methods to connect to my Microsoft SQL Server. We host our own website and have Microsoft SQL Server 2008 installed. I've tried connecting using the server names of localhost, dsw-server, and our public IP address, all throw the same error. You can test the connection here http:/...

0
Q: Drupal session/cookie to non drupal session/cookie

RecurI'll try to simplify this as much as possible and add details if needed. I have two pages: page A and page B. page A has drupal included and I'm logged in. page B doesn't have the drupal includes so I'm not logged in. In page A, I save a string to the session/cookie variable and then I post to...

-4
Q: PHP: I need a function that returns a list of months

DurpDurpkinsFor example: I want it to return something like ['2012-12',''2013-01', '2013-02'... and so on.

0
Q: Allow .htaccess only from one directory to another

gravityboyI have mp3's in a directory called /mp3/ and I want to be able to access them only from another page.php in another directory /main/ on the site. No direct linking from outside. All of the pages are written in php I put this code in the .htaccess file inside the /mp3/ directory... Order deny...

0
Q: Fatal Error: Call to undefined function _()

GameDevGuruI'm trying to use this php class http://www.nongnu.org/phpprintipp/ on my CUPS Server. Now when I try to call a function from this class, i get Fatal error: Call to undefined function _() in /usr/local/share/php/printipp/BasicIPP.php on line 344 Line 344 Looks like this: self::_putDebug(spri...

0
Q: paypal ipn error: Receiver email does not match merchant's

Daniel WhiteI am writing a codeigniter app and trying to get paypal IPN working. Everything works and it logs my ipn response to the database, but instead of 'SUCCESS' it says 'ERROR' and the reason is: Receiver email {my email} does not match merchant's ===== No matter what I do I cannot figure out how t...

0
Q: PHP form processing

user3067188I realise this may be a Noob question but I have read over 40 posts and am still none the wiser as to where or possibly even how to sanitize the output from the form I attach. I found the following code (I have adapted it to fit my form). I have seen on here so many different ways of Sanitizing ...

0
Q: PHP Scrape - Create multidimensional arrays from results - current code only returning one result

user3015175I'm quite new to PHP and am creating a web scraper for a project. From this website, https://www.bloglovin.com/en/blogs/1/2/all, I am scraping the blog title, blog url, image url and concatenating a follow through link for later use. As you can see on the page, there are several fields with inf...

0
Q: flot doesn't draw bars chart

asterix_jvI tried with my other two scripts(line chart and pie chart) but the flot doesn't draw the bars chart... can you help me with this...I think the error is in the javascript.. The library: <script src="js/jquery.flot.min.js"></script> <script src="js/jquery.flot.pie.min.js"></script> <script src="...

0
Q: Want to make title header more loved by Google

Patrick HarrisonApologies for the newbie-level php question. But I want to make title headers more appealing to the Google bot/borg. This is what I am working on for the page title: <title> <?=$this->user->username?> / <?=$this->user->city ?> / <?php if (count($this->memberInterests)) : ?> </title> So, I ha...

0
Q: PHP $varible++ not working :(

user1269625I have this code: $arrayOfData = ("Data1", "Data2", "Data3", "Data4", "Data5", "Data6", "Data7", "Data8", "Data9"); var $dataCounter = 0; var $setCounter = 1; foreach($arrayOfData as $row => $value){ $this->$dataCounter++; if($this->$dataCounter == 3){ $this->$setCounter++; ...

0
Q: How to show uploaded image to View and Table in Yii?

gultomicroI have uploaded images into my project folder. But I cannot show it in the: 1. Gridview I want to show the .jpg file and then 2. Table I want to show the .jpg file And the images data are from database. Can anyone teach me how to do it? Thanks

0
Q: Google Map Marker Clusterer - var markers issue

alliefaydenSo I'm using Marker Clusters on a Google Map. I've got custom markers to begin with though, and the Google Marker Cluster code is as follows: var markers = []; for (var i = 0; i < 100; i++) { var dataPhoto = data.photos[i]; var latLng = new google.maps.LatLng(dataPhoto.latitude, ...

0
Q: PHP persistent socket connection

Alexander PresmanI have the following architecture. A Windows application which can talk with external software through a defined port. A webapplication running on the same localhost. PHP-script serving as connector between these two sides. I make from the webapplication AJAX-request to php-script which sh...

0
Q: match text strings not contained in quotes

thomas(?:'.*?') matches text inside single quotes. I want to match string of text that are not inside quotes though. [^(?:'.*?')] is not working for me though: it matches every character that is not a single quote. How can I change it to match text not within quotes?

0
Q: PHP - Alternating rows & column output

Jennifer FletcherThe principle is similar to zebra-striping a table, but it's not exactly the same thing, so I've had a tough time finding a solution / thinking about the way to do this. I am trying to alternate the number of columns per row. Every odd row will have 4 columns and every even row will have 3. ...

0
Q: Why does my code is executed after window location?

Imri PersiadoI wonder why my code is executed after I use window.location and how I can avoid it? <script type="text/javascript"> if(!confirm("question?")) { window.location = 'index.php?a=my_posts'; } </script> <?php delete("spikes","id",$id); ?> Why does the php code is executed ...

0
Q: how to execute a query within a query?

user3071763After a query is done, on the basis of the result i want to make another result.how can i do that? $sql="SELECT * FROM programme"; $res=mysql_query($sql); while($row=mysql_fetch_array($res)) { echo "$row[0]"; if($row[3]==1) { $prgrmsql="SELECT MovieName FROM movie WHERE MovieId=".$row[1]...

0
Q: PHP: How to load xml schema files and generated a xml instance

user2980469I have a bunch of xsd files and want to generate xml in response. Due to the scalability I don't want to hardcode the xml results.I am using php. This is the sample xsd file, which will also import another xml schema file. <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns="device:info" xml...

0
Q: Cookie dies after Browser restart

John BrunnerI set up the cookies on my site with an 1 year expiration date, but they die when I quit and restart my browser. Is the expiration date too high, or what can be other problems related to that? My code looks like: <?php ob_start(); $_SESSION['SESS_USER_ID'] = $user_info['user_id']; $_SESSION['S...

0
Q: Does the session die if a user lands on a page without session_start()?

RickI've got a site with several hundred pages. Most of the pages do not have session_start() at the top. I do have it on the index.php page, where I need some info from a session variable. But, if a user navigates away to a page without session_start(), then goes back to the index.php page, the s...

0
Q: htaccess URL Rewrite trying to simplify current one

Robert E. McIntoshSo I have an htaccess file already that works fine, but I want to change it from having a bunch of parameters to only one. so my current htaccess file looks like this: Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !/(_modules|css|files|fonts|ico|img|js)/ RewriteRule ...

0
Q: How to display random image and text from MySQL Database with PHP

mxmxwoI'm trying to make this html page (display.html) display a random image submission and random text submission from my MySQL table labeled "submissions". This is the current code for display.html: <!doctype html> <html> <head> <meta charset="UTF-8"> <title>MIXED MESSAGES</title> </head> <?php ...

0
Q: Parsing json data in php

runelynxI can't seem to wrap my head around this. I am getting json data into my php script in the following format: I want to loop through "OnlinePlayers"... which, from reading other questions here, seems to be at $json->{'ServerStatus'}->{'OnlinePlayers'}; assuming I decode it into an object an...

-1
Q: How can I automate the clicking of a button in a web-page?

user7378My rural internet package (using T-Mobile) means that every time I use 250MB, a web-page loads up and doesn't let me have any connectivity until I click a button giving me another 250MB of usage. I would love to be able to automate this process somehow. I have already inspected the various eleme...

0
Q: PHP- How to make it so someone can't change parameters in url and dont run script again on refresh on a page?

user2883722I have a page where any user gets directed to after a payment was made, and in that page there is PHP code to send a confirmation email and some certain other tasks. So I don't want user to be able to refresh that page so the script is run again and I also don't want them to be able to change the...

-2
Q: Decrypting MD5-Hash throught Email?

user3071850I am working on a project, and need to have my Users to get their Password Decrypted from MD5 -> to the plain text (Password) throught their Email-registration, I know that this is possible, so I would love some answeres. If you need any more specific information, just let me know and I'll respo...

0
Q: exif_imagetype is not working in windows

AaliyaI am developing app using cakephp 2.4 in windows in which I need to create Image upload facility. But when I use exif_imagetype it gives me fatal-error. So using this code I checked if exif tool is installed or not if (function_exists('exif_imagetype')) { echo "This function is installed"; } els...

0
Q: CodeIgniter and nginx - Class not found

PJuniorI'v uploaded a CodeIgniter application from my localhost with Apache to a server running nginx. Its works perfectly on my localhost and on other server with Apache. It's under a subdomain, an domain and other subdomains are running PHP 100%. This application in CI doesn't start, and PHP is ret...

0
Q: Full text not displaying after a quote

Jeremy DuenasI've got an item in a database that has a quote in it and when it displays on the page that's calling it, it cuts out a quote in the entry and everything after it. This is what's in the database: 5' & Under P&S All that gets outputted is just the 5. Silly mistake, just need to make it escape t...

-1
Q: please help ... i need to convert this php code to asp.net

user3071574this php cod calling api , but i need to implement it using asp.net can any body help me please? var $xmlData = new DOMDocument(); $para['ID'] = "123"; $para['Name'] ="ABC"; $request =xmlData->createElement("PARAMETERS"); xmlData->appendChild($request); foreach ($para as $key => $val) { $key =...

1
Q: pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0

TyronAfter a apt-get dist-upgrade to Debian 7.2, pdo.so disappeared. What am I doing wrong? root@tynix:/usr/lib/php5/20100525# apt-get purge php5-mysql Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: php5-mysql* 0 upgr...

0
Q: how to create table and insert data from php?

SoheilI'm pretty new in php , i wanna add some data from form in html , i created a table and add insert code to php , this is my question : i want to create a table once and after that just insert data but in my code every time the code wants to creat a table here is my code : <?php //create co...

1
Q: Handling data with 1000~ variables, preferably using SQL

user3002686Basically, I have tons of files with some data. each differ, some lack some variables(null) etc, classic stuff. The part it gets somewhat interesting is that, since each file can have up to 1000 variables, and has at least 800~ values that is not null, I thought: "Hey I need 1000 columns". Anoth...

0
Q: Using Drupal to store json content and images for a site

RoseI'm planning to use drupal to store some JSON content for our company site. So we don't have to hardcode the strings in our dynamic web project and we can change the strings in drupal and publish the content that would ultimately display in the site. The same thing for images. We wanted to store...

0
Q: PHP: Scrape all numbers from Brackets "(123)"

user3071873I have a HTML-Code. The structure is always the same. But i don't know, how i can extract all numbers from the brackets. Example-Code: <table align="left" border="0" cellpadding="0" cellspacing="1"> <tbody><tr> <td style="padding-right:0.5em;padding-bottom:1px;white-space:nowrap;font-size:1...

0
Q: How to traverse child elements by xpath in DomNodeList?

user3061744guys! I need to parse various HTML pages with different structure. For example, I have executed xpath query: <?php libxml_use_internal_errors(true); /* Createa a new DomDocument object */ $dom = new DomDocument; $dom_grep = new DomDocument; /* Load the HTML */ $dom->loadHTMLFile("http://domain...

0
Q: restFUL API dependency on store

Pretty Good Pancakemy app is a Book manager where I can create Books and Pages. I have my bookController with a "store" on POST, which store a title and a description. public function store() { $rules = array( 'title' => 'required|min:3', 'description' => 'required|min:30' ); ...

0
Q: Redirect App to Facebook Tab after granting permissions

arielcrI'm trying to redirect my app to the installed Facebook tab after granting permissions, I configured the getLoginUrl to use the page tab url as the redirect_url like this: $params = array('redirect_uri' => 'https://www.facebook.com/pages/mypage/xxxxxx?v=app_xxx'); $login_url = $facebook->getLogi...

-2
Q: restricting access of php page till user logs in

Amy JenningsHi im trying to write a script that restricts the access of user to a page until he has logged in with username and password. I keep getting undefined index file for username and password? any one have any suggestions?? <?php include 'config.php'; mysql_connect($host, $user, $password); mysql_s...

-4
Q: Get Current Date,Month,Year

Wayne Tun MyintIs there any easier way to get current Date, Month and Year? for example (11/12/2013) day = 11 (example 398173123 may be) month= 12 year=2013 Thanks, I only want timestamp.

0
Q: Issues with Browscap.ini

HeyItsProdigyI recently started to use the get_browser() function inside of PHP and I encountered a major issue. I am trying to return the browser that the user is using back to the user but when I run the code: $browser = get_browser(null, true); print($browser['browser']); It returns 'DefaultBrowser'. I...

0
Q: Open PDF from FPDF in new tab

Deep DoradlaI have a process where customer clicks if he wants a report to be generated and downloaded while creating a business unit. This report will be in pdf format. Currently I am using Codeigniter and I use FPDF to generate pdf files. The pdf opens well when it is requested. But Problem: 1) PDF ope...

0
Q: Wordpress - And & OR in same array to compare

Matthew O'DonnellBeen spending most of day working on issues with my array. After solving the duplication issue with entries i am now met with something that is proving tiresome. <?php $mergedterms = array_unique(array_merge($age_terms, $game_terms, $series_terms, $rating_terms, $genres_terms), SORT_REGULAR);?> <...

0
Q: JSON Directory index with PHP - file access?

IARIThis is a very simple version without any error handling of what i want my php-script to do: echo json_encode( scandir($_GET['d']) ); Now i want to restrict file access for this, such that the index is only built, if the given path is one, which say Apache also serves an auto-index for. Alter...

1
Q: Shorthand when using || for comparison (==) rather than assignment (=)

terralingI've seen lots of questions about the use of || in assignment expressions such as $a = $b || $c but I haven't come across this, so forgive me if it's a duplicate. Can you abbreviate a comparison used in an if statement such as: if ($a == ($b || $c || $d)... or is it necessary to write it ...

0
Q: Error 504 Gateway time out OR how to force NOT keep-alive in PHP?

Zod123sorry for the long question, in fact I have two questions, a simple one and a trick one. If you could help me with the simple, this will be enough, please go to the end of this text. Or read the complete text and try to figure out what is happening. I am facing a very strange situation building ...

0
Q: How connect php webservice to the network operator to allow facturations from SMS sent by GSM devices

user3071731I'd like connect my php webservice to the network operator to allow the facturation of all SMS sent from mobiles devices. So, my question is what can i add into my webservice to factured all SMS sent, and how do that. I can't see this on google because i have not the key word to realize that

0
Q: How to check if text widget has content?

shnjaveeI need to check if Text Widget has certain content? To be more specific, I need to check if Text Widget has content with shortcode that starts with: [button ... Any help is much appreciated! Thank you!

0
Q: removing (case insensitively) duplicates from array while trimming whitespace

crazy sarahthis is a very similar question to Best solution to remove duplicate values from case-insensitive array In the accepted answer the 1st comment mentions using trim() to remove whitespace as well. I'd like to do this but I can't figure out where the trim should go can anyone help me? $r = array...

0
Q: AJAX Multiple Forms With Same Submit/Click Function

user3065173I've got multiple forms (that are similar) that are passed using Ajax to appended a PHP page using this code below. However, when I click the first or second form, it only sends the data from the first form. Can I use just the one function on all forms, or is there a better way to go? $('.co...

0
Q: WordPress Display User's Avatar not Showing

TaylorTDHouseI am making a wordpress site now, and I just inserted an HTML block into my sidebar. I want to to serve 2 functions. 1. If the user isn't signed in, I want it to display a login block. (working) 2. If the user is signed in, I want it to display their avatar. (not working) I looked up the get_a...

0
Q: PHP zipping solution for large file that does not involve the shell

pillarOfLightso I'm creating a gigantic zip file (may be over 1GB) with PHP... so far I've explored -ZipArchive -shell_exec however ZipArchive eventually runs out of memory and using shell_exec to execute a Linux Zip command is undesirable for security purposes I tried closing the zip and reopening them ...

0
Q: Automatically rename or convert all .jpeg files to .jpg in MySQL

mxmxwoI have an HTML/PHP form that has a text and file input. <form enctype="multipart/form-data" action="add.php" method="POST"> <label for="textarea"> <div align="center"> <br> <br> ::: MESSAGE :::</div> </label> <div align="center"> <textarea name="name" id="na...

0
Q: Molecule with JavaScript canvas?

user3071969Molecule with JavaScript canvas Hi If I could get a piece of code introduced me to. So the molecular formula is received (for example h2o) and very easy to show.

0
Q: how to make my php client be the only one that can get data from my php server

Alejandro CasasHello I have this simple code: Client <?php function get_url($request_url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $request_url); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec($ch); curl_close...

0
Q: PHP Git Hook works directly when test execution but not when executing via git

Bradley WestonI created the following git hook to automate some tasks for me and to pipe it back down when I push a commit to my server. The code works fine when I run it directly. When the git push pushes to the server and the server executes the hook it says remote: Deployment [BETA]: updating. remote: git...

0
Q: How to create two columns PHP?

TheWebsI am having the worst time trying to create this, it should be simple. I have an $info array that consists of $person=>$personInfoArray and I am trying to say, for the first six, do one column, for the next x amount, do another column. What I have is: $infoCounter = 0; foreach($info as $person =>...

0
Q: GET method with checkboxes - PHP

OscarIm trying to display results of a checkbox on a separate page using php, however currently it displays as "array" instead of listing which boxes have been checked. Here is my html: Vegetarian <input type="checkbox" name="diet[]" value="Vegetarian"> Vegan <input type="checkbox" name="diet[]" val...

0
Q: Error with transfering MySQL database (connected via PDO) from localhost to hosted server

KetOkay, so this is my code: try { $pdo = new PDO ('mysql:host=127.0.0.1;dbname=db_name','user','password'); } catch (PDOException $e) { exit ('Database error.'); } I tried so many different combinations with host name, username and password, and every time I get 'Database error'. My question i...

-1
Q: PDO + PHP + AJAX proper implementation

Mike OltmansI had asked a question a question here and was asked by @MonkeyZeus to repost the results since I apparently did a good job with it. include '../../config.php'; include ROOT_DIR . "php/dbconnection/dbconnection_pdo.php"; $query = "SELECT * FROM site_users WHERE username = :username"; $query = $pdo-

0
Q: DOMDocument: createElementNS vs createElement in terms of speed (exponential vs linear time)

WeboideI am working on creating an XML file using namespaces. There is about several hundreds to several thousands of records, and for each record we need to add about a 100 fields (sub-nodes). What happens is: When using createElementNS() in the nested loop, The time it takes to add a new element is t...

0
Q: PHP - Display Curl Verbose info

user2029890I'm having some trouble with a particular Curl command and I'd like to see the headers and responses. In the command line I use -v and it displays everything, however... In PHP I'm attempting to use: curl_setopt($curl, CURLOPT_VERBOSE, 1); However, nothing is being displayed. I'm using PHP 5...

0
Q: Symfony2 for errors not showing, UniqueEntity error message not shown next to the corresponding field

pregmatchI am having problems displaying for errors on registration page. public function createAction { if ($request->isMethod("POST")) { $form->bind($request); if ($form->isValid()){ //do stuf } else{ return array("form"=>$form->createView(), ...

0
Q: Firing SQL query on click of button?

APAD1I have a simple PHP/MySQL counter which incrementally increases a value in my SQL database. Currently, this script fires every time the page refreshes meaning that the number increases by 1 every time the page is refreshed. I would like to change it so that it only increases when a button is pres...

0
Q: AJAX - Button Submit to update a form

user3072030I'm attempting to learn to make use of AJAX. I removed most of the complexity of the program to just isolate the problem I'm having. So I have a text area and beneath that a div that has "STATUS" printing out. On button submit using AJAX I want to change the word "STATUS" to the value of my varia...

0
Q: MySQL Cant connect.. details correct

PrivateMufasaForgive me if this is a dumb question but this is really frustrating. Im having issues trying to connect to my MySQL database. The details are correct as i can login via phpmyadmin and terminal, the database was created with the user whose details i used in this script but i keep getting 'Cannot...

0
Q: Nginx proxy_pass to dynamic host

Chris WhiteAt the moment I have a PHP script set up with a chunk of code that reads a file from a dynamic location (which comes from a database) and echo's it out to the user in chunks. It's basically a file streaming script to hide the location of the original file. However, this comes with a large overhe...

-1
Q: Filling an HTML drop down box from database using php, but I'm missing one record

twinserI'm pulling rows from a mysql database to fill a drop down box. It works, but it misses out one option. I think it might be due to the fact I'm using the <optgroup> tag in the middle, where the option would be - in fact if I remove this, the whole list is printed. My database has data similar to ...

0
Q: move_uploaded_file - failed to open stream: No such file or directory

Corey StadnykI have seen this question asked many times before. But the scenario I am having is different than anything I have seen or read. I have a site with 2 forms. A user fills out a worksheet and is able to upload an image along with it. The other form is used for a user to edit / update the worksheet t...

0
Q: Prestashop Edit Meta-Tag in Home Page

user3072064How do change a meta tag in Prestashop ver 1.5+ <meta name="description" content="Shop powered by PrestaShop" /> <meta name="keywords" content="shop, prestashop" /> <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> <meta http-equiv="content-languag...

0
Q: Form selectbox post multiple variables from selection

Cole LeflarOkay so I have a form with a selectbox to select each State in the US, below is just a portion of the states. Each state has a different email address the form will need to send to. In the form results that are emailed, I need to pass the State's name and the email address. How it's setup right ...

-1
Q: Use php to create a dynamic menu without a database using only folders in the directory?

user3071439I would like to thank anyone who is able to help me in any way possible, I am extremely new to php/coding in general so I am not even sure if I am on the right path. I wanted to know if it was possible to create 2 step or dynamic drop down menu using only php and html that populates the first dr...

1
Q: CakePHP Persistant Data Storage without Database (config file)?

ConnelI am building a CakePHP app and I want to store and modify a group of global settings that are customisable by the admins. There is only one shared instance of these settings so a single row in a database seems like an overkill and doesn't feel right. I was thinking a config file would be more ap...

-6
Q: please look over my code

geek-ballerplease i dont know why my code is not working, please take a look at it and let me know how can i fix it. i think some calculations are wrong, if you can find the mistake please let me know how i can fix it . Thanks PHP <?php // Script 4.2 - handle_calc.php /* This script takes values from ...

1
Q: Simple success/error return with ajax and php

user756659Just starting to learn about ajax although I am running into trouble trying to return a success message in an array. <script type="text/javascript"> $(function () { $('#delete').on('click', function () { var $form = $(this).closest('form'); $.ajax({ type: $form.at...

1
Q: PHP array handling on-the-fly

stephenI am trying to use the PHP error_get_last() function, but my question goes more to general handling of arrays in PHP. error_get_last() returns an array, but I only want the 'message' element from it. So this works: $ErrData = error_get_last(); $ErrMsg = $ErrData['message']; but this is a sy...

0
Q: username and pass required in "git push appengine master"

eddard.starkThis is my first time using google appengine. I am trying to upload a php website. I am trying to upload it using git. I have followed their tutorial. At the end they said to type this code in so i did. I have tried to type this code in git bash. Here is the code - "git push appengine master". It...

0
Q: Can't get PHP to pull line entry from mySQL as array

lindgrenj6Ok fellas, I've been working with a SQL database via PHP for a couple days here now at work and I cannot for the life of me get it to work I have someone else who worked on this project and they have all sorts of functions that work at pulling one element out of the line, but I'm trying to pull a...

0
Q: Dynamically sorting the table along with other few selection criteria via javascript and php

nepsdotinI have two parts First part is building dynamic queries based on various inputs second part is sorting the result table ASC / DESC PHP part is well tested and working fine if( !empty( $_REQUEST['cond1'] ) ){ $sql[] = mysql_escape_string( $_GET['cond1'] ); } so on.... until last condi...

0
Q: Please help me translating this little php function to perl

JohnnathanI have this function that i need in perl: <?php function dv($r){$s=1;for($m=0;$r!=0;$r/=10)$s=($s+$r%10*(9-$m++%6))%11; return chr($s?$s+47:75);} ?> I've got this from here, where is already a perl function intended to do the same task (here) but it doesn't calculate correctly sometimes. PHP f...

 
9:47 PM
0
Q: PHP Sort by letter

user2982706I have an array of brands and I need to sort it by letters of the alphabet it should look something like this site http://only-u.com.ua/ where is a,b,c,d,e .....etc This is my attempt to do something <?php $brands = array("A" => array(), "B" => array(), "C"=>array(), "D"=>array(), "E"=>arr...

0
Q: PHP json_decode() not decoding JSON array

JohnI have a JSON string in my database such as this... a:1:{s:26:"abcdefghi@jklmnopqrstu.com";s:26:"abcdefghi@jklmnopqrstu.com";} After I fetch it from the database I use the following... $my_array = json_decode($row2['json_data']); The problem is that I'm not getting any array from $my_array....

0
Q: What is the best method to keep all logs in one place and be able to access them

Martijn RiemersI have a web application using multiple background workers. All those workers are on different servers. Now my problem is. I want to be able to have a log, per user, and be able to output it to them using Ajax. Now, my question is, how can I store all logs in one place (could be externally using ...

0
Q: retrive only certain values from an object in a nested array?

vimes1984OK i have the following array: array(2) { ["campaigns"]=> array(50) { [0]=> object(Campaign)#2122 (48) { ["name"]=> string(26) "FOO" ["id"]=> string(74) "****************" ["link"]=> string(44) "/ws/" ["status"]=> string(4) "Sent" ...

0
Q: Faster parsing of array in php

menardmamI have a CSV file with 40 000 lines, i load ALL THE LINES in a array and i use this function to return a subarray with just the value i need... here is the code <?php //---------------------------------------------- function query_array($theArray,$theQuery,$col){ $return = array(); fo...

0
Q: Browscap file is updated but not working correctly

HeyItsProdigyI updated browscap and pointed to it inside of the PHP.ini file and ran $browser = get_browser(null, true); print_r ($browser); The output that i get looks a bit funny as it does not have any information for each part of the array. I want to know what i might be able to do to fix it and have ...

0
Q: CakePHP - optimizing specific urls by stripping down unnecessary functionality

NebojsacBesides the obvious like caching pages, using recursive and containable, what is a good way to really minimize the memory footprint on certain urls, without just going out and writing flat php? For example, I have certain controller actions (and model methods) that have minimal interaction with ...

0
Q: Handle complex data types in WSDL & PHP

MalaiselvanI am working on a webservice project where the client wants to send a complex type request to the server. We are using PHP at server and jQuery Mobile as the client. Below is the type of SOAP request the client is sending. The client is sending 2 argument. The first argument is a string 'doLo...

0
Q: php/mysql search results - filter result when type >1 while keeping results where other types not >1 - codeigniter

johnnyletroisApologies for the title, I'm still trying to work out how to explain this. I have a codeigniter web app that has a decent search function that nicely tabulates the results. Let's call it an airbnb clone where multiple users create listings. Users can create a single listing or they can create m...

0
Q: When was function use closures implemented in PHP?

rubo77I couldn't find the section in the PHP manual that explains use I have the code $num = 0; array_walk_recursive($_REQUEST, function($mValue) use (&$num){ static $num; $num++; }); and my Eclipse complains: Parser error "'{' expected in compound-statement. So I g...

 

« first day (289 days earlier)      last day (21 days later) »