« first day (280 days earlier)      last day (30 days later) » 

2:02 AM
1
Q: Arduino Get request and host server?

joeybab3I am trying to have my arduino run a web server but also post a variable from time to time. I have the following code: client.println("HTTP/1.1 200 OK"); client.println("Host: joeybabcock.me"); // client.print("GET /writetemplocalserv.php?t0="); client.println("Content-Type: text/html");...

0
Q: XDEBUG to profile PHP on Apache fails to write output

Dave CohenI'm trying to track down some performance problems and the xdebug profiler seems like the tool to use. Unfortunately no matter what I try xdebug simply will not write an output file. I've searched similar questions and tried all suggestions. Nothing helps. No errors in log file. I've made a ...

0
Q: using sql MONTH or YEAR in cakephp find queries

user765368I'm trying to get all the users that has registered during a particular month using a query like this in a cakephp application: $registered_users = $this->User->find('all', array( 'conditions' => array( 'MONTH(User.date)' => 10 ) )); The query above is supposed to return me all...

0
Q: Joomla 1.5 on WampServer 2.2E loads slowly, shows blank page

hederaI have a Lenovo Thinkpad running Win7 Pro 64 bit, on which I've installed Wampserver 2.2E 64 bit. I've installed a copy of a Joomla 1.5 site which I want to upgrade; my plan is to test the upgrade process on the laptop. I can load the Localhost page and phpMyAdmin with no trouble, but when I tr...

0
Q: Photo Resize when loading... PHP photo from server

Zach HarveyI'm wondering if anyone could provide me with some advice on where I went wrong. I'm trying to get a photo to resize when loaded in a DIV but the photo keeps taking it's own dimensions. Does anyone have any idea why my code isn't working? Thank you in advance! if($row['coverphoto'] === NULL)...

0
Q: Browser identification (get_browser) for Firefox v.25

user2723490Are there any issues with the get_browser identification of Firefox v.25? This is a simple code: echo $_SERVER['HTTP_USER_AGENT'] . "<br>"; $browser = get_browser(null, true); print_r($browser); it returns correct info for all browsers except Firefox. For Firefox I am getting the following out...

0
Q: a long array or unknown how many value in it? How to do each select database?

user1575921I'm wondering if it is a long array or unknown how many value in it? How to do each select database? Any suggestion? $Array = explode(",", $Array); $DbRead = new DbRead(); $DbRead->$ArticleRead($Array); ?? Class DbRead{ function ArticleRead($Array){?? $sth = $db->prepare("SELECT * F...

0
Q: multiple event dates update to database

Abhishek SalianMy scenario is that i have an events list and each event has multiple dates. Now I am using jquery multipledates plugin to load datepicker where i can select and unselect multiple dates. I can set as many dates as i want which i have already done. But Now the issue is when i have to unselect cert...

0
Q: MySQL Database/PHP - Generate 100 contacts from a script

user3009883Well I have most of the code working now. The point of the application is to store information from a contact form to a text file. So basically the point of the application is to take in information inputted by the user, store the information in a text file and allow the user to go back to the ho...

 
2:32 AM
0
Q: CakePHP query data using free text search via query string

CameronI have built a very simple search mechanism in my CakePHP app to allow a user to search on title and content for my Notes model. The function is as follows: function search( $q = null ) { if ( $q == null ) { $this->redirect(array('action' => 'index')); } $this->paginate...

0
Q: Data not received while uploading csv file to database

NewPHPI have developed a page to upload a big CSV(greater than 7000 rows) file to the database. Sometimes it works fine, sometimes not. Sometimes, I am getting an error like "Data not received" in the middle of uploading. But the values are inserted into the database upto that moment. I have checked th...

0
Q: MAMP + dreamweaver + delay issue

user3034631I am very very new at PHP programming. I am making up some code to test my learning but I just discovered a very annoying problem. I have no idea about the cause, so following I'll describe my situation and I'll leave to you the "honor" to find the problem :) I use dreamweaver to write my PHP...

0
Q: Background Image 100% Not Working In Instances

jadeallencookThis works for my homepage to make a image fit my background. <body> <div style="height:100%; background-image:url(location.png); background-size:cover;"> <?php include("homebuttons.php");?> </div> </body> But doesn't seem to want to work in this one <body> <div style="height:100%; background...

0
Q: how to tigger html/php file base on screen resolution

Accore LTDi am developing one responsive website. but now i am facing problem menu issue. please see the bellow image for my navigation. so i want when screen resolution bellow 800 then top menu and logo part will be different. i know one way like i can make separate header part then hide it via css and...

0
Q: slimframework help! - HTTP method not allowed for the requested resource. Use one of these instead: GET, HEAD

user3034680Hi I am new to slim framework and am wondering why I am getting the following error: "HTTP method not allowed for the requested resource. Use one of these instead: GET, HEAD". I know it has something to do with adding the slim framework to my code but I am unsure how to implement correctly. My ...

0
Q: How to insert to database using php?

GhostI'm very new to php and I really want to learn it. I'm learning from w3school, but I can't manage to do this (saving to database)... I also tried specifying the values in the .php and managed not to get error but it did not save in the database. Please tell me what is wrong in this. <form action...

0
Q: How to insert with a where from another database?

user3034706How do I insert using sql when my data is on one table and my where is on another. Here is teh code: $sql = "INSERT INTO user_can (online_id) VALUES ('$online') WHERE user.online = 'online'"; mysql_query($sql); I seem to be getting errors when tryign to insert, the insert does not happen. ...

0
Q: Multiple text box attached to current Objects array in php

user2419434I have list of products in database. I am loading products on page load and then displaying. I will ask user to enter the quantity for each product. Now after submitting the form, I want to retrieve all those quantities against each product. Below is my current code. <?php $productList; if ($_SE...

0
Q: php get select option and text input

user1043816Hello I'm trying to get a selected value and do stuff when it's selected. Also trying to print that textbox (print is just temp) HTML (removed "<" from start so it doesn't go off): form name="recAdd" method="GET" action="add.php"> select name="rec"> option value="1">1</option> o...

0
Q: How to set a input value of a form with Jquery Cookie

Michael FalcigliaHi I am learning Jquery and right now I am trying to use Jquery Cookie to set a form input value. I have been able to set the cookie from a form using this: <script> $(document).ready(function () { $("#saveForm").click(function() { $.cookie('myCookie', $("#element_1").val(), { expi...

-2
Q: Decrementing an alphabetical value in php

user2342185Base on the answer Decrementing alphabetical values what about if i have a character like this $char='AF', how can i make it to $char='AE' and so on ?

0
Q: equivalent to for loop and while loop?

DestinyI know basic examples about foreach to for loop and while loop since I was begin coding I didn't paying attention from the speed of executing a script which it is very very important since then I keep converting all my for each statement to for loop. If it's comes to array i'm quite confused -_-....

0
Q: Javascript echos PHP command, not PHP variable

gibberishThe jquery code: $('.up_IMG').click(function() { if (notLoggedIn()) return false; alert('Got to here'); }); The function (attempt #1): in quotes: function notLoggedIn() { alert('here'); logged_in = "<?php echo json_encode($logged_in); ?>"; alert('Logged in: ' + logged_in);...

0
Q: wordpress: how to get custom taxonomy parent category name from ID?

Jon FurryThis function creates a select menu from a custom taxonomies child categories only. function cityDropdown($dropID, $taxonomy, $exclude) { $catArgs = array( 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => 0, 'hierarchic...

0
Q: Laravel 4: Checking if an email is real during registration

user1521753I need to check if the email the user enters during registration is valid/real, meaning they can't just enter whatever they want as long as it meets the proper email format, I need to actually be able to send mail to it. I also don't want to do email confirmation, though, where the user would ha...

0
Q: php/html5 playlist using glob()

BlueDream420I'm using the php glob() to get all the song's in the song folder then use the array_rand to get a random song then use a foreach loop to loop the songs.Any way I can get this to work <!DOC TYPE HTML> <html> <head> <title>ymp</title> <link rel="stylesheet" href="style.css...

0
Q: Verify SSL Certificates using Openssl in PHP

Viren H. AjmeraI am working on below things: Generate CSR(Certificate Signing Request) Upload SSL Certificates To generate SSL certificate I am using something like: $privkey = openssl_pkey_new(); $csr = openssl_csr_new($dn, $privkey); $sscert = openssl_csr_sign($csr, null, $privkey,...

0
Q: Visualizing Array Data

user2967081I have a problem visualizing arrays greater than one dimension. I did a query on a database table and stored the data in an array, then used mysqli_fetch_array() to create another array. Now this array has the table name and the table data in but I'm having trouble figuring out how to A) access j...

0
Q: Gender not showing in table

user3030416<?php $hostname="#"; $username="#"; $password="#"; $dbname="#"; $db_conx = mysqli_connect($hostname, $username, $password) OR DIE ("Unable to connect to database! Please try again later."); if(mysqli_connect_errno()){ echo mysqli_connect_error(); ...

 
3:55 AM
1
Q: select the contents of the row based on the formula in column

user3034792I am not sure where to start with this... Ive looked up computed columns but was unsure if this question fits. I have a mysql table with the following details `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `text` text, `conditions` text, `active` int(1) NOT NULL ...

0
Q: is this php code overly complex or i am too dumb to understand this

user24I am making symfony application and and the main framework and testing framework , code has been set by the very experienced contractor. But i am finding hard to understand his code. i want o know from experienced PHP developers with PHP unit testing experience that is that code all ok and i am ...

0
Q: page is blank when connection to database is included

user3029820I have one problem that need all of you to help. I don't know what wrong with it. I created connection to database, it worked. But when i include that connection to other pages, the page is blank, nothing appeared. My connection dbconfig.php <?php define('DB_SERVER', 'localhost'); define('DB_U...

0
Q: How to set path when download file

user2492364I write a code and it works well on localhost. But when I put it on a website. It can't download image anymore. Please tell me how to edit to download file to my disc C ? my code: $outdir = 'C:/AppServ/www/curl_prac/10.0_edition/downloads/'.$comic_number.'/';

0
Q: logged in content using ajax and session

user3033162I use the script here http://www.saaraan.com/2012/05/ajax-facebook-connect-with-jquery-php to make a website that can login with facebook. the script has 2 main file, one is process_facebook.php which handle the ajax POST. It return some text with echo to check whether the user is logged in or ...

0
Q: How to create sortable items on my website

Web Dev 80Is there a way I can sort items by different criteria on my website? I'd like to able to sort all the products on my page by price (both ascending and descending), Name (alphabetically) and by a set order I have chosen. How can I do this? EXAMPLE: http://www.pccasegear.com/index.php?main_page=i...

0
Q: jquery progress bar disappears after using .load()

JustSomeGuyI've added progress bars to my site and they work perfectly when the page loads. However, I want to reload the div using jQuery .load() and after the div has reloaded the progress bars disppear but everything seems to work perfectly. Below is an abridged but similar code to what I have used: <s...

0
Q: How to run php script while adding text to same html page?

CompressionsSo basically, I want to have someone complete a form, run a php script, and instead of pulling up the php file's web page, I want to append text at the end of the form. Currently, I have a form: <form action="scripts/email.php" method="POST"> <p>Name: <input type="text" name...

0
Q: mysqli return results grouped loop

user3018854I have a table with fields id , group_a, group_b. I need to query the database to look in each "group" and count the amount of similar records. The returned display would be something like Group_A: Value 1 = Count of 20 Value 2 = Count of 3 Value 3 = Count of 44 Etc. Same thing for Group_B...

0
Q: Text area content is breaking at & through AJAX call ..solution?

Ashok Kumar Reddy SI am creating a form with text area, I am processing the form using AJAX call..I am facing a issue with AJAX call. The data in the text area is breaking at &. Example : var text = 'This is the and it is breaking at & what is solution'; when I process the above text through AJAX, the text after &...

0
Q: How to implement SQL statement to create either/or functionality

darkgingerSQL statement question. Let's say I have the following in my mini-table. Let's say the table is "images." ID | file_name |fruit_type | ================================ 1 | ex.jpg | apple | 2 | am.png | apple | 3 | pl.jpeg | orange | 4 | e.png |...

0
Q: explode string one by one character including space

metallurgicalhow i can explode string into an array. Acctually i want to translate english language into the braille. First thing i need to do is to get the character one by one from a string,then convert them by mathing the char from value in database and display the braille code using the pic. As example w...

0
Q: PDO class methods with try catch and begin Transaction

samithaWhat i tried So far was bellow class TheClass { public function __call($name, $arguments) { $result= null; try { $PDO->beginTransaction(); $result= $this->$name($arguments); $PDO->commit(); } catch (PDOException $ex) { ...

0
Q: Updating MySQL db

tgcowell <?php $host="localhost"; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name="hsp_property"; // Database name $tbl_name="project_directory"; // Table name // Connect to ser...

0
Q: is it possible to import pdf and take certain data/content on the pdf using php

hijacker83I thing title is explaining my question. Will be realy great if there is possibility to do that. I was able to use pdf template with mpdf1 and tcpdf but I don't have any idea how to read the certain content on the template and keep them as variables.

0
Q: Should I use prepare statement or transition in mysqli?

ChrisHere is my scenario: I am setting up a game server, a bunch of insert, update, delete will be committed to database every second. I am using a prepare statement approach in php to avoid overheat of DB. (i.e. the same sql statement with different parameters will commit to the DB at the same time i...

1
Q: Falt error while fatching data from the server to android app

Neerav ShahI had return a code to fetch data from the server to android app in php. I am creating and array that will bring all the table name it column details and all the data in the table.But when i run the php code in browser to check the data in echo json form its showing this error: Fatal error: Allo...

0
Q: prevent php timeout exception for image uploads

crazy_PHP_MANI have an ajax image uploader that sends images to a php script, so that they are validated / resized & saved into a directory. The ajax uploader allows multiple files to be uploaded at the same time. Since it allows multiple files there can be timeouts, so I thought of increasing the execution t...

0
Q: Why does strpos not work here?

phpnoobIm making a function that checks if a certain username in the process of registration contains certain characters that I dont want the users to have in their username. And it echoes the user what characters they can use. public function checkUsername($username){ if(!empty($username)){...

0
Q: using preg_replace to remove html tag

user2650277Here is some part of html in my page. <div id="video-ad"> <div id="wpn_ad_square"> </div> </div> I want to remove the wpn_ad_square div completely with preg_replace statement.Take note that there may be other wpn_ad_square div on page and i want to remove all of t...

 
4:49 AM
0
Q: Regex pattern to match Titles and #s in pairs as an array

MarkI am trying to build a database of car dimensions, with raw data as follows: Length 4638 Width 1825 Height 1384 Wheelbase 2810 Track (f) 1545 Track (r) 1594 Weight, unladden (G37) 1740 Each line contains the title, ie. "Length", "Track (f)" or "Weight, unladden (G37)" followed by the raw numer...

0
Q: Call to a member function get_news() on a non-object in C:\xampp\htdocs\CodeIgniter_Practice\application\controllers\news.php on line 11

KabirI wrote a small application from CodeIgnitor user guide but when I run it, display the given message Fatal error: Call to a member function get_news() on a non-object in C:\xampp\htdocs\CodeIgniter_Practice\application\controllers\news.php on line 11 The code is class News extends CI_Controlle...

0
Q: PHP, Mysql row data separation (,) and print <li>

user3034899I have a database with movies. E.g: table: movies Id - Title - Actors 2 - Avangers - 2,5,11,16 table: actors Id - Name 2 - Jason 5 - Emma 11 - Stuart 16 - Thomas My question: How can I print this with .li.s like this: Actors: *X *Y *Z *Q Thanks a lot!

0
Q: Mysqli Group Array Print Count of Group

user3018854I'm querying my database to group all the similar records and count them. HERE IS MY CURRENT CODE: $query= 'SELECT digit_1, count(digit_1) FROM data GROUP BY digit_1 '; if ($result = mysqli_query($mysqli, $query)) { /* fetch associative array */ ...

0
Q: How come I am getting an undefined index when trying to query my database?

CodeManiakI am working on creating a very simple content management system... Unfortunately I'm failing to retrieve posts from my database. My error is: Notice: Undefined index: title in C:\wamp\www\NightOwlSoftware\index.php <?php include 'scripts/db_connect.php'; include 'scrip...

0
Q: Sort items on a page by specified criteria

Web Dev 80I'd like to be able to sort content on my webpage by different criteria (for example: by price and name). I would like the outcome to be exactly this: http://www.pccasegear.com/index.php?main_page=index&cPath=7 I'm using static html, the list of items is not being called to the page in any way...

0
Q: php check when last time user visited a page

Krish KaineI have a page login.php in which when the user login a cookie is set by the username just to ensure that if the user comes back again he need not have to log in. But now I need to specify his last visit also. How shall I do that? Login.php if(isset($_POST["checkbox"]) && $_POST["checkbox"]==1) ...

0
Q: PHP average rating system

user3034897I am building a website where people can rate other user profile's on a scale of 1-5. My question is: How do i make it so that every rating a user receives the average is calculated. Then depending on a users average rating they are given a rank number. The user with the highest average rating ...

0
Q: How to connect to mysql with laravel?

Michael Joseph AubryThis is such a simple basic question I don't think there is much people asking this but simply how do I connect to mySql through localhost phpmyadmin with laravel (ive searched, there is some stuff, but I need to ask because I am a noob and Id like to ask, the stuff I saw I don't quite get 100% o...

0
Q: how to save value of color picker into mysql

Meuhow to save value of color picker into mysql,,i have code to change background but i want to save the value of color picker into my sql using php script..help me please.. Thanks before ^^ <!DOCTYPE HTML> <html> <head> <title>Control Color</title> <script type="text/javascript"> ...

0
Q: why would PHP run better in VM?

user1972866I just saw a presentation in HHVM. They said one of the big things that will make performance so much better is the fact that it'll run PHP code in a virtual machine. My question is why would a VM be an advantage? What are some possible disadvantages for having a VM?

0
Q: Yii - Parametrized hostname from sub directory not working

IbonobijI have a Yii app located in a sub-folder of a parent app. I have tried to get the "org" into a GET variable but its not working. The parent app uses the rule below and works fine, variable is passed to GET. 'rules'=>array( 'http://<org[\w]+>.localhost.com/<controller:\w+>/<id:\d+>'=>'<controller>

0
Q: Bootstrap Carousel Image Comrpessed when Screen is Small

User1291223How do i make my image work like http://graduateland.com/ I tried following their css, i'm currently using bootstrap 3 carousel. My Current Code .carousel-inner > .item > img { position: absolute; top: 0; left: 0; min-width: 100%; height: 500px; } GraduateLand [id="get-started"] { displ...

0
Q: what is user agent ?how we use this in our php mobile based webpage coding?

user235449hi how we redirect traditional web page to mobile based web page using user agent about this i searched some details ..but it's not clear please help me is this the correct way for using user agents??? strong text var isMobile = navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerr...

1
Q: Character encoding of HTML form

Naveen Kumari have a page in iso-8859-1 <meta http-equiv=content-type content="text/html; charset=iso-8859-1"> and two forms in the page, one form submits to the same page and another submits to a different page <form method='post' action='post.php'> </form> i insert comments added in different langua...

0
Q: Loading multiple templates in Twig

HawiakI am fiddling with Twig and I like it so far. I do have a problem though, I want to load 2 or more templates from the PHP site and " merge " them together in 1 render or multiple if that gives the same result. Lets say I have a class that has to do the rendering and I have these templates, templ...

0
Q: Can Sublime text 2 Follow path in a file?

Vincent DuprezIs it possible to open a linked file in sublime text 2 ? What I mean is, imagine I have the following code : <?php require_once( 'include/const-inc.php' ); require_once( 'include/db-inc.php' ); require_once( 'classes/dummy-class.php' ); ?> I would love to be able to click on the...

0
Q: Reading word as a utf-8 from database php

Kinjali have a database which in that word is with utf-8 encoded i am reading database by below code <?php header("Content-Type: text/html;charset=UTF-8"); include("./config.php"); $sql=mysql_query("SET NAMES 'utf8'"); $sql=mysql_query("SELECT * FROM `Albanian` W...

0
Q: Use of config variable in site page

AparnaThis is my path: $count = count(glob($_SERVER['DOCUMENT_ROOT'].'/tulip/gallery/'.$id.'_*.jpg')); i set $base_path=$_SERVER['DOCUMENT_ROOT']; $config['base_path']=$base_path; then i set value to- $count = count(glob($this->config->item('base_path').'/tulip/gallery/'.$id.'_*.jpg')); but s...

0
Q: Method to Check whether the Response is JSON in PHP?

user2324085i need a function to check whether the incomming response is JSON or NOT in PHP..! Can anyone HELP..? For eg. my JSON is this $json = '{"a":1,"b":2,"c":3,"d":4,"e":5}';

0
Q: how to clear form using php PDO after successful submission

Synodi have this php code in my form. I used pdo to get into mysql database and insert data. A simple form where use enters his name, email, comments, and a checkbox. I use this in jquery mobile environment. <?php $hostname = 'localhost'; $username = 'root'; $password = ''; $dbName =...

0
Q: PGSQL driver not found PDO

user2907171i am trying to connect PostgreSQL using pdo i have alos enabled extension=php_pdo_pgsql.dll and DLL is also exist in ext directory i have this code for connecting <?php $host = "localhost"; $database = "ciadmin"; $username = "postgre"; $password = "ind@nic701"; $db = new PDO("pgsql:hos...

-1
Q: error occuring while inserting data into database using php in codeigniter

user3034972Hi frnds if i assign values directly means it's inserting values into DB. But if i use variables(like $user,$pass) to pass values in members_model class,it's showing error like below: Parse error: syntax error, unexpected '$user' (T_VARIABLE), expecting function (T_FUNCTION) in C:\xampp\htd...

0
Q: Generate and download big data from mssql using php

errorareI have a system where user can searching and listing the data. The data listing is flexible base on user searching. The searching and listing work fine. I set the limit for listing is 1000 rows only no matters how many rows that the query return. User need to download the file to get the full lis...

0
Q: Using file_get_contents to parse webpage data

KarimkhanI am parsing webpage data using ` PHP function. But problem with this is it gives error when url starts fromwww.` ( ! ) Warning: file_get_contents(www.iiit.ac.in): failed to open stream: No such file or directory in F:\wamp\www\test.php on line 63 Here is the demo for this code: Link to DEMO <...

 
5:54 AM
0
Q: When image are more than 6 I need a line break , how can I can do that?

Aourongajab AbirWhen image are more than 6 I need a line break. while($row = mysql_fetch_array($q)) { echo "<img src=\"$row[image_link]\" />"; }

-1
Q: Display multidimensional array in php

user2754416I just want to display the following array in php .How it possible. Please help Array ( [0] => Array ( [0] => Array ( [category_ID] => 1 [category_name] => System Reporting [category_desc] => ) [1] => A...

0
Q: Apply different post order on loop results using post_rewind, PHP if, and pre_get_posts?

user3034960I'm modifying a Wordpress theme which uses post_rewind() to run the loop multiple times on a standard page to display two separate lists of all posts. I'm new to PHP and am trying to modify the order in which posts are displayed - the main list by post date and a side list by title alphabeticall...

0
Q: Google analytics issue or limitation

Rakesh KanyalI want request count of each request on the server. My URL can be www.domain.com?module=development_dashboard&action=login. Google analytics work fine in this case. But my issue is "If I call a module's action using ajax and It returns data in the format on JSON". I guess in such case Google an...

0
Q: Starting an application on the server using php

dom_beauI have web server that publishes a web page with an image viewer and a "Start Acquisition" button. On the server, I have a small application that looks like this: ./cgi-bin/ccss -d GenericUSBCamera ... with several more parameters. My application belongs to root / root. In the web page, I use A...

0
Q: get nearest next one date records in mysql

Mohamedali Jinnai am having an event table.and i show events for today using.SELECT * FROM `special_banner_tbl` WHERE `SPLBANNER_pubsdate` = current_date LIMIT 0 , 30 if there is no events for today, it have to display the future day record which is more near to current date. if the table like..-----------------...

0
Q: Missing Controller - Cake PHP (New installation)

Comrade RajI have installed cakephp in document root folder and renamed it to todo. So the complete path is (C:\localhost\todo). I am able to run the index.php perfectly fine (all tabs are green). I created the 'todo' example application from the book 'Beginning CAKE PHP - Novoice to Professional'. I keep g...

0
Q: Encode Laravel project codes

iDevocI have used base64_encode() and gzcompress() to encode my project in pure PHP. But when I encoded my Laravel project, it's not working. Warning: Invalid argument supplied for foreach() in /var/www/html/laravel/vendor/composer/autoload_real.php(6) : eval()'d code on line 30 Catchable fatal error...

0
Q: XMLHttpRequest cannot load 'url' Access-Control-Allow-Origin

Cyan PileI've been struggling to this error with ajax and php: XMLHttpRequest cannot load http://url.org/dir/testing.php. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. I can't see what is wrong here. Here is my php file test...

0
Q: Code Igniter Auto Load With custom name

ahmad05i want to know is there way that I can pass my custom class name in autoload class Example: in a controller i know we can do this $this->load->library('parser','','my_parser') but what i want to know is there way that i can pass custom name while autoloading i.e $autoload['librari...

0
Q: Best practice: Number of views/clicks over the last 30 days

Martin M. JørgensenI realize that there's a number of ways to do this, so before I get started I wanted some input from some with experience with this kind of task. I have an MySQL table with 1000s of downloads. Each download has a columb containing the numbers of total downloads. What I want to do is to make it...

0
Q: I want output in the form of array based on parent and child combination accordingly

bhaveshHi Friend need some help from your side. I want output in the form of array based on parent and child combination accordingly. The code structure seems like there is a input field having multiple child field and there can be multiple parent input field as well. I mean there is a add button wer...

0
Q: PHP Default ini Not Executing PHP Files from CLI

rennekonphp -f connect.php Running this outputs the contents of connect.php into the terminal, but if I do php -n connect.php it executes the file. I'm guessing this is some php.ini flag I've missed. Any ideas?

0
Q: BigCommerce API. How to create cart and how to search customers using wildcards

Farhan AsimI'm working on BigCommerce API for client's website, I have following questions: Is there any way to create cart or add products to cart? So far I have learned that we have to maintain shopping cart on our system and once everything is done we can create Order on BigCommerce using API and post ...

0
Q: Regex to extract title from webpage source

KarimkhanFollowing regex works fine for me for most of url. But in case of few url, it does not give title, though source code has title. $data = file_get_contents($url); $title = get_title($data); echo $title; function get_title($html) { return preg_match('!<title>(.*?)</title>!i', $html, $...

0
Q: How to make fade edges in image magic?

user3034996I want to create faded edges image effect using imagemagic commands. Please help me for a command to make effect as like http://postimg.org/image/h51e4twyp/

0
Q: run a java class file using php

bumbaI have java class file (server.class) I want to run this file to client machine using php. My approach download the file from server to client machine run this file in client machine close the cmd and delete the file after on pressing another button tell me my approach is right or I am mak...

0
Q: Internet Explorer 9 Display Issues

LizzeiyI am working on a website for a client. I have tested the website on Chrome, IE 10, IE 9 etc. But it seems on her computer the site does not display correctly (The logo overlaps the navigation text). She is using Windows Vista 32 Bit, Internet Explorer 9. She doesn't have compatibility mode on, a...

0
Q: php script for using the on duplicate key update with random numbers

user2943374I have a php script of student form.. Am making use of d on duplicate key update function. I automatically assign unique primary key 2 users after records have been saved.. My query 2 assign numbers is like this. $length=(10000000,99999999); $random=substr(uniqid,0,$length); A short save nd...

0
Q: How to create one page checkout in opencart?

pankaj kumar singhI want to create a one page checkout in opencart. which is easy and fast. default checkout page is very slow and have to be clicked on continue on every step. or i can say -- How to remove slideup and slidedown feature from opencart 1.5.5.1 checkout page? please see the link for the similar que...

2
Q: How to get all of the content from rss URL

vs7I'm working on a automated system in which a cron job automatically get the fresh content from a RSS feed , then store them to Database for later use... (May be in used as WP post)... All is working good, but only problem is I got only small description. I want to pull the full post content fr...

0
Q: Unable to save file in server with tcpdf

Vasanth S$html = <<writeHTMLCell($w=0, $h=0, $x='', $y='', $table, $border=0, $ln=1, $fill=0, $reseth=true, $align='', $autopadding=true); $pdf->Output('order/orders_2013-10.pdf', 'F'); This is the code i use to create and save a pdf file and it worked well on my local wamp server but when i run it over ...

0
Q: How to preview image that wide 500px. only ? , How can i do?

user3030013.......................................................................................... Why image still preview when image not width 500 px. , How can i do ? .......................................................................................... <script src="http://ajax.googleapis.com/aj...

0
Q: PHP - Check to see existance

user2770994I am having some difficultly getting this to work. I want to check to see if a record exists in the memusers table. If it does send and email. If it does not, add to a table. Am I simply overlooking something? Thanks! //********** Check if specific record exists ************ global $c...

0
Q: attachtment image not showing on wordpress

user41549I want to show images of featured post image but does not appear <?php $url = wp_get_attachment_url( get_post_thumbnail_id($post_id, 'thumbnail_size') ); ?>

0
Q: PayPal Intent Time Limits

SukhI'm using the Paypal Rest API in PHP I'm building a payment process system on my site but I wanted to know the limits (in time) I have on each time of payment capture. How long do I have till I have to capture / complete the payment in the following situations: Intent is Sale (Using Create), ...

0
Q: Passing Data From Javascript-Generated Textboxes to PHP

user3035089long time reader, first time poster. I am working on a form which uses select boxes to create the number of text boxes a user requires. The Javascript appears to work just fine, each creates the right number of textboxes. I become lost in how to get the values from these varying number of text...

0
Q: error SQL (Update Set Where) on submit

iplayjumanji2I am currently having an issue getting the following code to update MySQLi after the user inputs in a text type form: print "<input type='text' name='prof' >Prof<br />"; $profselectorX=$_POST['prof']; $profselector=$mysqli->real_escape_string($profselectorX); $query="UPDATE homework1 SET '...

0
Q: Stream of multiple polls on one page - how to insert?

user3035113I have a page which displays a stream of polls (each poll has up to 4 answer options). This page is generated dynamically from a database, so it's pulling each poll question and the options from a mysqli_fetch_array. What I'm having a hard time with is how to let users vote on the polls. I have ...

0
Q: how can i get the value of my dropdown inside my cart? always getting zero

Ezekiel Blancothis is my view <?php foreach ($cart as $item): ?> <tr> <td><?php echo $item['name']; ?></td> <td><?php echo $item['qty']; ?></td> <td><?p...

0
Q: PhpMyAdmin Access Denied #2002 Ubuntu, Lampp ( Xampp For ubuntu )

Dipak Kumar PustiAfter Installing lampp ( xampp for linux ), i got some xampp new security exception. For that I changed the http-xampp.conf file as follows <Directory "/opt/lampp/phpmyadmin"> AllowOverride AuthConfig Limit Order allow,deny Allow from all Require all granted </Directory> After ...

0
Q: Event Tracking in google analytics

Rakesh KanyalI want to have track o all Ajax requests coming to my web page. Is it possible using event tracking in google analytics?

0
Q: How to Downgrade PHP on Centos 6

AkkiI am in trouble downgrading PHP on centos 6 My application server was running on Fedora 8 and now i have moved to Centos 6 but there is problem with PHP, the framework developed in php 5.2 is not supported in PHP 5.3 or upper version in Centos so I am trying to downgrade PHP but i am facing lot o...

0
Q: Table Parsing using selenium webdriver php?

Rakesh BitlingHello Friends, I want to fetch all table information which is contained in td section. I have tried this code: $host = 'http://localhost:4444/wd/hub'; // this is the default $capabilities = array(WebDriverCapabilityType::BROWSER_NAME => 'firefox'); $driver = RemoteWebDriver::create...

0
Q: Add to cart with product custom option in magneto

ZawMyoHtetI have a virtual product with custom option (type-1 and type-2). Price may change depend on type. How can I add to cart with this option directly and change the price depend on custom option. I tried this code but it doesn't work. <?php // the ID of the product $product_id = "123"; $product ...

0
Q: Phpseclib inside wordpress is not working

user2090076I installed phpseclib in my wordpress site. Every time I run the this script, it shows blank page and even it hides wordpress admin bar. include('Net/SSH2.php'); $ssh = new Net_SSH2('www.domain.tld'); if (!$ssh->login('username', 'password')) { exit('Login Failed');} echo $ssh->exec('pwd...

0
Q: Need to create New Session ID in .cs file using C# in windows form application

SigamaniFor login function I need to create New SessionID for every login. But I'm not able to create it in .cs file using CreateSessionID(Context) function. It throws the Error "The name Context does not belong to the current context". What i need to do ?

0
Q: NicEditor Image uploading

Sajitha RathnayakeI am using nicedit.js for my website content editor. So I want to know how to change the image uploading location and how to create php file to do it. There is a file given by the http://nicedit.com Here is the script: http://svn.nicedit.com//trunk/nicUpload/php/nicUpload.php But it doesn't wo...

0
Q: Warning: ftp_get function

Mian AnjumI am calling this method ftp_get($refConnection, $local_file, $remote_file, FTP_BINARY) facing this error Warning: ftp_get(/var/sandbox/client/api/clientapi/remote_files/OUTPUT/TRANSACTIONS/Transaction_2013_11_06_74130845_01.xml) [function.ftp-get]: failed to open stream: Permission denied in ...

0
Q: how to display file data in html table using php

user2995144I have the table and I want to display data from file to this table. Here is my table: <html> <head> <title>Projects</title> <script> function GetCellValues() { var str = ''; var rows = document.getElementsByTagName('tr'); var table=docume...

0
Q: equivalent to php gzinflate() in linux

MDThakkarMy server is responsing with Content-type:application/binary, I am able to decode that data by removing first 10 char and last 8 char from data and passing that data to gzinflate() command of php. But I want to do same thing using Linux shell scripting, but i am not getting how to do that, does...

-1
Q: Remove comma from last array value

Macko TaranaPHP $meta = get_post_custom($post->ID); $images = $meta['img1'][0]; // urls separated with comma $images = explode(',', $images); foreach ($images as $image) { echo '{image : '.$image.', title : "Credit: x"},'; }; Output: {image : 'http://localhost/slideshow/1.jpg', title : 'Credit: ...

0
Q: MySql Update query without where clause vs with where clause

mimI am trying to reset some values in a large table having around 4 million records. I just wanted to know which approach is better: UPDATE TABLENAME SET VAL1=0, VAL2=0, VAL3=0; or foreach ( $catIds as $catId ) execUpdate("UPDATE TABLENAME SET VAL1=0, VAL2=0, VAL3=0 WHERE CAT_ID='".$catId....

0
Q: WooCommerce, price not showing on cart page

user1269625I have this site here: http://artendijen.com/cart/ Can anyone tell me why the prices are not appearing on my cart page? do I have to enable something? I have my shipping set up, payment gateway is getting setup tomorrow.

0
Q: Update one name of data from one column, all data that have same name and in the same column will also updated

user2963035i need some help, i have a table named POSITION. the columns for this table are p_no, p_name and p_training_type. p_name is stand for position name.. one p_name will attend many type of training, for example it can be like this p_no |p_name | p_training_type 1 |GENERAL MANAGER...

0
Q: mysql replace is not working in codeigniter

Zohaib Waseemi want to replace space into commas(,) in field value in codeigniter i make this query ,i try my self best but not sure what is issue $this->db->select(" demo_functional_area.functional_area_txt,main_job_role.job_role_txt,COUNT(main_job_role.job_role_txt) as f_c_jobs, REPLACE('demo_funct...

0
Q: Warning: end() expects parameter 1 to be array, string given on line 31

ClarklightI am pretty new to php, and trying to do a multiple images upload form( i am looping the process). For some reason i am having this warning(Warning: end() expects parameter 1 to be array, string given on line 31),Which is this line ($temp = ( $_FILES["file"]["name"][$i]);) please give me some he...

0
Q: Check Multiple Radio values with mysql

Kapil VermaI've 10 question and each have 4 options, i want to check radio values, whethr it is correct or not with the result stored in database when a user submit the form. thanks in advance...

0
Q: PHP Stack Implementation

Christian MarkI want to construct a stack implemented in PHP. Initially I have this code: class Stack { protected $stack; protected $limit; public function __construct($limit = 10) { // initialize the stack $this->stack = array(); // stack can only contain this many items ...

0
Q: PHP Fatal error: Uncaught exception 'Zend_Cache_Exception' with message

user3035197Im experiencing problems during a installation. I receive this following message in error log; PHP Fatal error: Uncaught exception 'Zend_Cache_Exception' with message 'cache_dir "temp/cache/" must be a directory' in /home3/ultdno/public_html/library/Zend/Cache.php:209 Stack trace: 0 /home3/ul...

0
Q: How to do multiple counts in one DQL query using Doctrine@ ORM?

user3035179I am trying to do multiple counts in one DQL query using Doctrine2 ORM. Here is what my query looks like: $em = $this->getDoctrine()->getManager(); $query = $em->createQuery(' SELECT COUNT(u.id) AS users, COUNT(t.id) AS teams, COUNT(p.id) AS posts, COUN...

0
Q: changing HTML content in PHP

user2524205I am newer to PHP and I have a problem changing the resultDiv contents if(mysql_num_rows($res)==0) { echo "<script>document.getElementById('resulDiv').innerHTML='No such flight';</script>"; // echo "<script>alert('No Such filght');</script>"; echo "No such fl...

-2
Q: Code Generator Script For PSN and Xbox?

user3035217I got this PSN and Xbox Code Generator script that many says it works. I would like to know if this one really works. I got this from http://isra.li/psnxbox

0
Q: Converting a location such as "Buffalo, New York" to Latitude and Longitude using the Goggle Maps API

SaffronOk, I'm using the Google Maps API and I need to convert my users location they enter, convert it to Latitude/Longitude using the API. So far, I just have some PHP, But i'm not sure how to implement this into the javascript, etc. <?php $coords = toCoordinates("88 Main St. New York New York ...

0
Q: How to check given word occures at last position of string in php

ArpitaI want to get an alternate of an sql query WHERE field LIKE '%subStr' in PHP for example actually I want to conditionally of different file types so I want to check whether the extension is .ppt or .pptx or .pptm .ppm or any thing else.

0
Q: Database mysql_num_rows() expects parameter 1 to be resource, boolean given in

MaheshDigarsePlease anybody can tell me what wrong with this code it showing this error---------> Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/ocwnewco/public_html/user/rejectedcase.php on line 62 the line 62 is showing this------->$ocwConnections = mysql_num_rows($resu...

0
Q: mysqli_result could not be converted to string

Muhd NazmiFirstly,Thanks for reading this. How to solve my problems CODE $roomid = CMS::$MySql->Query("SELECT room_id FROM user_roomvisits WHERE user_id ='".$users['id']."' ORDER BY entry_timestamp DESC LIMIT 1"); $room = CMS::$MySql->Query("SELECT caption FROM rooms WHERE id ='".$roomid."'"); AND go...

0
Q: is there any way that i can get the $_SERVER['REMOTE_ADDR'] of the visitor on my page?

user3035185I want to know if there's any way where I get the remote address of the person visiting my page? Can anyone help? I am currently working on my response to the request and one of my security is by checking the remote address. I wanted to know if there's such codes where I can get the remote addres...

0
Q: How to create nested object in PHP

吳承諺$array = (object)array( 'name' => 'David', 'friends' => (object)array( (object)array('name' => 'Max'), (object)array('name' => 'Jian') ) ); var_dump($array); I want to learn how to use stdClass function to get the same result, don't want to use (object) before each ...

0
Q: Cannot insert checkbox value into database

user3035176Hello i'm a newbie in PHP language. So I hope u guys can be simple with me. I need to create like a attendance system for a meeting. Now I was stuck at one part. I need to add a staff from a department for every created meeting event. The staff name was already appear when I click from dropdown m...

0
Q: How to use this jquery ( preview image ) in ie 6 - 10?

user3030013How to use this jquery ( preview image before upload ) in ie 6 - 10 ? Or who have any jquery ( preview image before upload ) that can use in all browser please tell me . Thank you. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script language="JavaScript"

0
Q: Issue uploading mySQL database for Wordpress

user3035226Trying to transfer a Wordpress site (and its database) that is being developed on a XAMP localhost to a live server (the host is Hostpoppa - and I'm using a mac). I am using the searchreplacedb2.php tool and keep receiving the following error every time I submit the DB settings: Warning: mysq...

0
Q: when i have two php version in windows 7 OS, how php.exe in the cmd will find which one of php.ini

user2893319I have installed two PHP, one is PHP 5.2 and the other is PHP 5.4 (it's already add envionment variables). When I run php -v with PHP 5.4 in the cmd, it access php.ini for PHP 5.2 version, and it trigger error for import extension. But in the phpinfo() it correctly find php.ini. Why, and how ca...

0
Q: Laravel 4 and full-text search

SayakI have seen quite a few articles on fulltext search in Laravel where users recommend using whereRaw(...) or DB::query(...), but my aim is to remain database agnostic. I understand that a where('col', 'like', '%foo%') is terrible w.r.t. performance. So I believe I am left with creating my own dat...

0
Q: is it possible to search in mysql or PHP a multiple words displaying a multiple possible result

Vincenti have table in sql employee table ID firstname lastname 1 John Lennon 2 Paul Mccartney 3 Ringo Starr 4 George Harrison now if i searched "George Mccartney" ,the result should be the row with the ID of 4 and 2 or if searched "1 Paul Starr" , the result should be 3 rows containing of those...

0
Q: Trouble mapping an existing entity to an embedded form in symfony2

mattexxI have an entity which is on the inverse side of a three one-to-one mappings. Entity FittingStep is mapped by FittingStepSingleValue, etc. FittingStep has a field fittingStepType which identifies which one of the three entities the FittingStep should look for. I want to embed that object in the F...

0
Q: Convert multidimensional array to single array by removing offset vlaue

user3035261array([0]=>array(['customer_id']=22,['customer_name']='Ajun'),[2]=>array(['customer_id']=23,['customer_name']='Aju')); I want to convert it below procedure using php array(array(['customer_id']=22,['customer_name']='Ajun'),array(['customer_id']=23,['customer_name']='Aju'))

0
Q: Get radiobox checked value by name in java script or jquery

Rahul NarheI am developing an application in that there is need that I want checked value by name in java script or jquery. My HTML code is <input type="radio" name="type1" value="Manual" /> Manual<br/> <input type="radio" name="type1" value="Auto" /> Auto and my javascript code is var aqi_type = (...

0
Q: How should I be laying out my code in Codeigniter?

ProdiklCurrently I'm doing something like this: Controllers: Immediately call models and then views. No real other logic than deciding which model and view to call Models: Contain all functions per table in my db. I have one model class with its methods per table in my db. View: Only contain layout, ...

0
Q: Upload file and the file already upload in the folder but why the file did not store in database

nazerolI have some problem about uploading and database. I upload the file (abc.txt) and the file already insert to the folder name (uploads). But when I check in database (php), it did not enter. Here is my code: <?php require_once('Connections/sperformance.php');?> <?php session_start(); if(isset($_S...

0
Q: Ajax auto updation of time and date in social networking site

Sibi T MathewI am developing a social networking site using php,jquery and ajax. In that i need to update the time and date dynamically, for eg the same way the 'facebook' did this. For each posts or updates, the facebook shows times and date auto updated, like 'few seconds ago','one hour ago', 'two hour ago'...

0
Q: Why isnt my foreach loop working?

SirBTThis is frustrating, After I feed an values from a text field in a HTML form like the below. In the PHP file below I read in these values, turn them into an array and then attempt to print out only the text fields that were filled in via a foreach loop. For some strange reason the foreach loop en...

0
Q: fastest way to convert d/m/y to m/d/y in php

timus2001I have 1000000+ records in flatfile as below 24/11/2013,ac1234:dr,ac454566:cr,1000 23/11/2013,ac1234:dr,ac454566:cr,1000 22/11/2013,ac1234:dr,ac454566:cr,1000 i need to convert 24/11/2013 to 11/24/2013. i can accomlish it with code below <?php $change = "24/11/2013"; list($date, $month, $...

0
Q: php get the primary numbers in recursive function

Rakesh MishraI am just a newbie in php. Currently I am going through recursive function. So I want to know how to get all the prime numbers starting from 0 to 1000 in recursion. So can someone kindly tell me how to do this? This will also help me to get the idea about recursive function.

0
Q: DOMPDF, I cannot create two pdf at time

sangeethulugondaWhen i try to create two pdf at a time it's throwing errors... Fatal error: Uncaught exception 'DOMPDF_Exception' with message 'No block-level parent found. Not good.' in C:\wamp\www\si2i\application\libraries\dompdf\include\inline_positioner.cls.php on line 38 ( ! ) DOMPDF_Exception: ...

0
Q: joomla location base search with current location

user3035305Need following functionality in my joomla website When user lands on my website. in my search box i should get the current location of the user. When user type anything in the search box, it should give suggestion of location from google map search ( i know i need to use google map API) when us...

0
Q: How to use respect/rest with nginx to act as api server for angularjs?

Kim StacksThis is my directory structure ng-book |------api | |--- index.php | | |------index.html |------js | |---app.js | |------css | |---app.css | |------composer.phar I created the api folder using this command php com...

0
Q: Performing sql query on button click

Sunil PachlangaI had design a form and value of form are showing in table format.In table i have two columns which are buttons Edit and Delete respectively.I want to perform update and delete query on that buttons where id is first column in my table. here is code <?php mysql_connect("localhost","root","")or d...

0
Q: Which is the best practice when using img in HTML

sarsarahmanI am writing a Webapp using PHP and JS at client Side i am using mysql at the back. I want to store the images when the database record gets added for example you can consider a profile pic. which is the good practices whether to convert it to base64 and store it into DB itself or to upload image...

-1
Q: Get most relevant and shortest results at top in sphinxql

Fiaz AhmadI am trying to get most relevant and shortest string as results in sphinx, but it is not returning the results like mysql fulltext search return. Now I want to get most relevant and shortest string result at top, I have tried a lot of websites and tutorials and Getting Started Books about sphinx ...

0
Q: IMporting to phpMyAdmin's specific database via website

RyanI'm new to mySQL & I'm using IPB (invision power board: paid not nulled). I'm confused on how to implement something into mysql via my website upon account creation. I'm sorry If I'm not being specific enough in this question I don;t know what i'd be leaving out as I'm new to this part. Upon a ...

-1
Q: Facebook Like Button Return Value

Salih GündüzHello I want add a like button on my page. But I want after I click like button my facebook page open in popup and then I want to return value if user likes or not. For example. http://addmefast.com/home.html Which way they do that?I add like button but can not open popup. How they reach popup ...

0
Q: font size doesnt work in tinymce

user2783193I just added font size option in tinymce. Inside html editor it displays correctly changed font size but it doesn't save that changed content. I dont think that xss filtering is issue here since other formatting works (bold, italic, ...). I initialize tinymce like this <script type="text/javasc...

0
Q: php foreach loop issue

dang2mani have this function to generate dynamic html menu my problem when count more than 5 ul apper on every loop i want to know how i do if number more than 5 the ul tag apper only once function GenerateNavHTML($rows ,$count=5) { $html = ''; $html .= '<div>'; ...

0
Q: Laravel 4 and payment gateway API (Zooz) - Use of undefined constant ResponseStatus

JaimeMSEFirst of all I apologize for my English. I'm using the payment gateway Zooz (http://www.zooz.com/) in Laravel 4 . They have a library to make requests to the API for PHP (https://github.com/zooz-mobile/ZooZ-Extended-Server-API-Libraries/tree/master/ZooZExtendedServerAPIPHPLib) The first thing I ...

0
Q: how send attachments in zend framework1?

user2366160<?php set_include_path(implode(PATH_SEPARATOR, array( realpath('C:\wamp\www\library\Zend\library'), get_include_path(), ))); require_once 'Zend/Mime.php'; require_once 'Zend/Mail.php'; require_once 'Zend/Mail/Transport/Smtp.php'; require_once 'Zend/Mail/Transport/Abstract.php...

0
Q: get user rank (mySQL)

user3032715I'm making a login, with ranks. When you are logged In you receive a welcome message. But that's for every rank different. my index.php: <?php include_once("config.php"); ?> <?php if( !(isset( $_POST['login'] ) ) ) { ?> <?php } else { $usr = new Users; $usr->storeFormValues( $_P...

0
Q: Using PHP within JS for $redirectlocation and .$_POST

Jarod Emerson ThorntonI've looked and my tweaks won't work (noob) but I've tried! I have a custom login for cPanel Webmail at a secured port and would like the error message to populate at the custom login page rather than redirecting to the default ports generic login page. Here's the code I found which should work...

0
Q: AJAX to retrieve and store object in a variable

user3033162I have two files. One is index.php where the user clicks and invokes an AJAX request. The second one is process.php whic sends back data back to index.php. function AjaxResponse() { var myData = 'connect=1'; jQuery.ajax({ type: "POST", url: "process_facebook.php", ...

0
Q: How to load a model in CodeIgniter HMVC into an autoload?

JerielleHello guys just need a little help here. I am trying to study and create a CRUD in CodeIgniter with HMVC approach but I have a difficulty in loading the model. Here's my structure: CRUD - application - config - autoload.php - modules_code - address - contr...

0
Q: error occurring while calling stored procedure

user3011896Hi friends I am getting the following while calling select stored procedure from mysql database in codeIgniter using PHP: A Database Error Occurred Error Number: 1305 PROCEDURE login_form.select_members does not exist CALL select_members() Filename: C:\xampp\htdocs\system\database\DB_...

0
Q: how to get values using simple html parser or something else

Mubin KhalidThis may be possibly duplicate. but I want to know that how can I get text from a paragraph using simple HTML DOM Parser or something else which have a more button (perhaps prefferably called a link) at the end of paragraph. e.g This is test string and I want to get this data but don't know how t...

0
Q: PHP NGINX PHP-FPM, forking needed / possible?

user169099I'm using a setup including PHP (5.5), NGINX (1.1.19) and PHP-FPM, with MySQL (5.5.34) as Database, and many, many stored procedures. I dont want to get too far into the reason for why I'm using stored procedures, but as far as I know it's a good practice to use persistent connections with them,...

0
Q: Database Error Fro duplicate entry

MaheshDigarseI have a proper db connection dbname is db-name and table name tb-name and field name are same.I have a from in which have 4 field name, phone, form no, address. i want to do is no one can feed duplicate form no it should b one time submitted for example if i submitted a form with name - abc phon...

-1
Q: object doesnot initiates when object is passed by refrence in php

Pk bossI want to pass object by refrence but it dont give proper result This is I have already tried <?php class my_class { var $my_var; function my_class ($var) { global $obj_instance; $obj_instance = &$this; $this->my_var = $var; } } $obj = new my_class ("something"); echo $obj->my_var."\n"; echo $o...

0
Q: Apache SOLR HttpTransportException

user3035297Occasionally, I get exception mails from a customer's server telling me something with SOLR is going wrong: Uncaught exception 'Apache_Solr_HttpTransportException' with message ''0' Status: Communication Error' in C:\xxxxxxxxx\php\Apache\Solr\Service.php:338 or Uncaught exception 'Apache_Solr...

0
Q: Excel VBA - File does not exist error message for remote users

Jason SamuelsI have a an html page with a form where users can upload a .txt file to the server. They choose the file and press an upload button and the file gets uploaded to the website root folder via a PHP script. In this root folder is a .xlsm file that the user use to upload the file they uploaded into a...

0
Q: PHP Switch Statements

Dameatrix2020I am a complete novice with PHP but here goes. I have an array set up with information about particular cars. I am trying to create a switch statement that will allow me to click on a link about BMW cars and echo the associated array about that particular car. I used a switch statement because I ...

0
Q: Html iframe suggestion

Vidiccheck out the image I have posted As you can see I have used an Iframe.everything works fine,once I click on create pdf,there is a page that gets displayed in the iframe instead of the error.The problem arises the first time when I go to the page,since some values are missing,exceptions are t...

0
Q: Cannot autoload namespaced library

TjorriemorrieI get the error: Fatal error: Class 'HoneyComb\HoneyComb' not found /composer.json: " autoload": { "psr-0": { "HoneyComb": "src/HoneyComb" } } /vendor/composer/autoload_namespaces.php: return array( 'PHPExcel' => array($vendorDir . '/phpexcel/...

0
Q: Similar names in a huge list

d.raevI have database of 50 000 + companies that is constantly updated (200+ per month). The is a huge issue with repeated content because the names are not always strict/correct: "Super 1 Store" "Super One Store" "Super 1 Stores" We need tool to scan the data for similar names. I have some experie...

0
Q: How to handle dropbox's selected changing?

user3024013I have a little tag <select name="txtTK" > <option value="None">---</option> <option value="Mat">Materials</option> <option value="Cate">Category</option> <option value="Cus">Customer</option> <option value="Work">Work</option> <Option value="Em">Employee</Option> </select> ...

0
Q: If statement in Mysql Select query umer

user2035872I want to filter mysql query with a post. if i get a special value in post then filter it and if it get value 'ALL' in post then show all value don't filter. i tried like this. it works but i want to handle it in one query. if($_POST['comp']== 'all' && $_POST['cat']== 'all'){ re...

0
Q: Most efficient way to authorize access to a web service

user2267462I am writing a web service in PHP which returns JSON-formatted data to callers. However, this web service is not open to all and only authorized callers can request data from this web service. What is the most efficient way to authorize users who make such requests?

0
Q: How to redirect a HTTP Request to a static File with the GET Parameter

user2763903I've a Page example.com/u/_USERNAME_ and i want to redirect the request to example.com/u/profile.php?u=_USERNAME_ I've tried a .htaccess (in the /u/ folder) file with the following content: RewriteEngine on RewriteRule (.*)$ profile.php?u=$1 It redirects the request BUT the $_GET['u'] Va...

0
Q: How to return true/false from a function in php

user3026745How can I use the return true/false for another function? > > <?php > > class Bet { > > private $Client; > > private $Secret; > > private $Server; > > public function __construct() { > > $this->Client = md5(uniqid(rand(), true)); > >...

0
Q: How to connect two dropdownbox?

papao surnameHow to connect my 2nd dropdown to the first. The first dropdown connect with the script to pass the q on app_list.php. How I can connect the 2 dropdown select? I thinking of coding just like this, but I don't know how to implement this code. app_list.php?q="+str+"&id="+ids,truehelp? function sh...

0
Q: Password protection with .htaccess, switch variable on / off

JacekQuestion: I've got a config.php file in my cms with some define's. I want to have a flag in my config.php: define('PROTECTED', true); And than protect my page directory using htaccess, and htpasswd only if PROTECTED. What should be great is to have user and pass also stored in config.php: ...

0
Q: PHP-behaviour: Why is code in PHP-tags not displayed on screen?

michael.zechWhat is the reason for the PHP-behaviour described in the code-snippet? // "demo.txt" is a plain text file. // Content is read into a string. $demo = file_get_contents('http://example.com/demo.txt'); // Browser displays the content of the text-file. echo $demo; // "functions.php" is a php-file...

0
Q: Android Volley: POST Param Array

user1507913I'm writing a POST request to a PHP API server. Previously with ASYNC tasks, I had an ArrayList where I mapped multiple values to "array_id[]". With Volley, it uses a Hashmap, so there is only one value. Is there a way to achieve the same result?

0
Q: simplehtmldom - follow links

user3003977Can someone show an example how to follow links for each elements <a href> while scraping and get its related info ? $html = file_get_html('http://www.blabla.com/'); $html->find('div', 1)->class = 'bar'; Now each <li> has a link to more info <li class="#Selected"> <a href="/contactinfo/ITSer...

0
Q: php for loop is not working properly

Thobias NordgaardSo somehow im messing my for loop up. I set a two dimensional variable here: $menuQuery = mysql_query("SELECT * FROM pages ORDER BY menu_number ASC"); $counter = 0; while($page = mysql_fetch_array($menuQuery)) { $pages[$counter]['id'] = $page['id']; $pages[$counter]['title'] = $page['tit...

-4
Q: best backend technology to make a shopping site.Suggestions please

Ramkibest backend technology to make a shopping site.With front end html5.Please suggest me the easy way in which the back-end technology can be used.

-3
Q: How to do this: site.com/users/user1

AntonioHow to make a url to look like this: site.com/users/user How to do it? I do not use framework and write a procedural php code I write this because the system of stackoverflow doesn't allow me to ask the question

0
Q: PHP $_SERVER as security issue

user3035443iam writing application that will deal with very sensitive data, like bank account numbers and such, so i need to secure it well.I dont realy have an issue, iam confused a bit.Iam using symfony framework, and i did setup a scanner that wil scan $_GET, $_POST, $_COOKIES, $_REQUEST and $_SERVER glo...

0
Q: How to access an array from stdClass Object (json output) using PHP?

JerielleHello guys just need a little help here. Because I have a json data and I decode it. But I can't access it using the foreach loop. When I tried to print the array structure I got this: Array ( [0] => stdClass Object ( [code] => AD [country] => Andorra ...

-2
Q: use ajax returned value in php

user3033162in my js script tag I hv a var that store data of my ajax success callback. let say it's $result. How can I use it in php? I don't want to directly use for example $('#element').html($result) to manipulate the DOM.

0
Q: Trouble with Google charts getting this.J[a].c is undefined

user3035480I'm VERY new to google charts and I cant seem to find the problem in my code: My php file returns: {"cols":[{"id":"","label":"Time","type":"string"},{"id":"","label":"Max","type":"number"},{"id":"","label":"Average","type":"number"}],"rows":[[{"c":[{"v":"2013-11-19 14:38:00"},{"v":2576},{"v"...

0
Q: AES/CBC/PKCS#5 Encryption Algorithm In PHP

slickboyIm attempting to integrate the SagePay payment gateway into a website using the 'Form Integration' method. Basically the form integration method works by inserting a FORM in a webpage and POSTing information to SagePay's servers whenever the Submit button for the FORM is selected. Before the inf...

0
Q: Doctrine ORM 2 PHP EntityGenerator from ClassMetaDataInfo example

sturrockadI was just looking for a decent example of this, having been able to find one online. Would anyone be able to explain what is held in the ClassMetaDataInfo for an SQL sample and an example of what the Entity returned by generate would look like? $em->getConfiguration()->setMetadataDriverImpl( ...

0
Q: Matlab standalone executable runs indefinitely in Web-server

user6923when i tried to run a matlab standalone executable using PHP from an IIS server, the program is not stopping and it runs indefinitely. however when i ran the same executable manually,its working fine. Following is the my matlab code.. /////////////////////////// Pairs=21; TimeHistories=csvrea...

0
Q: Nginx+Memcached+Apache Vs Apache+Memcached

sayed.jalilI have been reading about this for a while but couldn't find anything that directly address this issue. I want to know if it would be better to use Apache2 with worker MPM for dynamic content + Memcached for delivering static content OR Apache2 + Memcached + Ngnix.The site is built using Php. Wou...

0
Q: WORDPRESS: Transition of post with nextnav and prenav but limit to 3

John Alvir BismonteI have this code in my index.php, what i want to do is to display 3 Posts only to the page and put nextnav to show the next 3 post then prenav to get back to the previous 3 posts. Can anyone show me how? my code starts here: <?php query_posts( 'cat=10' );?> <?php if ( have_posts() ) : ?> <?ph...

0
Q: How to show a table on click of a button in php?

Sumit RathoreI want to list files from mysql table to a webpage in php. For this i use tables so that i have more regular view. Now there are n numbers of tables on a page. This n is depending upon a mysql query. I am able to list the files on the page. But if numbers of rows in table get increased and value ...

0
Q: OSX Mavericks - Set up php based localhost and subdomains

TomI have successfully set up a local server running PHP on my Mac but i am having trouble setting up extra local sites as subdomains (i.e. site2.localhost) Here's what I have so far: hosts file: ## # Host Database # # localhost is used to configure the loopback interface # when the system is boo...

0
Q: how to send value var s from jquery to show in input tag id="text_var"?

user3030013How to send value var s from jquery to show in input tag id="text_var" ? <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <input id="text_var"> <input name="offer_image_1" type="file" id="offer_image_1" onchange("loadname(this,'previewimg')") size="50" /> ...

0
Q: Implementing PHP Activerecord in self made MVC Framework

Solaiman MansyurI'm trying to implement a PHPActiveRecord for my own tiny PHP MVC Framework. But it only work for several table, and won't work for other table. OK, my MVC structure like this: index.php - assets - config/ - core/ - Bootstrap.php - Controller.php - Model.php - View.php - etc ...

0
Q: Measuring the delay between POST was sent and the webserver starts PHP processing?

BurninLeoWhen fighting performance problems, a common issue is: The problems are not reliable. One time, there is a delay and when you test it by yourself, it's gone. Even worse: Server monitoring does not capture such problems accurately. If only 1 on 20 requests is slow, it is unlikely (5%) that a 10-mi...

0
Q: ACH payments using PHP. Issues viewing transaction record with ACHworks

MahendraI have integrated ACH payment using PHP with http://www.achworks.com/ . Im getting SUCCESS response from API but not able to find transaction on virtual terminal (https://havt.achworks.com/EXEC). Following is my code: <?php error_reporting(E_ALL); class CompanyInfo{ public $SSS; public $...

0
Q: Getting NAN value in difference between two dates

justinI would like to ask your help. I wanted to get the days difference between two dates. $timestamp_start = strtotime('2013-10-26'); $timestamp_end = strtotime('2013-11-26'); $difference = abs($timestamp_end - $timestamp_start); echo floor($difference / (60*60*24)); echo value is NAN Thanks, Ju...

0
Q: opening a window in a target frame

user3035527I have a website and ran into an issue. First of all the website is in dutch however the problem i have you dont have to understand dutch. My website is www.hobbysite.zz.mu When you click the login button it redirects you to a mybb forum login (this is correct) next part is the tricky part for...

0
Q: parsing a url localhost vs online

WaldermortI have this simple method which checks if a url is for part of my admin area. protected function is_admin_url ( $url ) { $parts = parse_url( $url ); if ( !empty($parts['path']) ) { $steps = explode('/', $parts['path']); if ( $steps[1] == $this->slug ) // $steps[0] will al...

0
Q: How to set rewrite rule in .htaccess for the 'pagename/id'?

SachinI have used the following code in .htaccess, Options +FollowSymlinks RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.+?)/?$ $1.php [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^user-projects/([0-9]+)/?$ user-projects.php?uid=$1 [L...

0
Q: Facilitating clients without browser add-ins

ZaZepGood day! What I want to do is for a webserver to render a page that requires a client plugin and pass it along to the client even if it only passes to the clients browser as an image. Basically I want server side scripting to handle the entire thing. I work on an industrial plant with an OSIso...

-2
Q: MySQL server has gone away wordpress

Luka VugračI worked in wordpress plugin wp security and i did backup some files when wordpress blocked and next thing that is poping out is this i dont know how to fix this.. Settings (general_settings) Error: fetch - MySQL server has gone away --- Query: select * from d4o1yq7rl_revslider_settings #0 /hom...

0
Q: kohana log files permissions: not writable for group

tkoomzaaskzWe're developing an API in Kohana and we've got a problem that our log files have no write permissions for the group. This is how November directory looks like: .../application/logs/2013/11$ ls -al total 2520 drwxr-sr-x 2 xyz wwwxyz 4096 Nov 26 09:12 . drwxr-sr-x 9 xyz wwwxyz 4096 Nov 14 0...

0
Q: Redirect page with GET variable htaccess

Muhd NazmiFirstly,Thanks for reading this. How to rewrite the url , in htaccess For example wwww.domain.com/home?name=MuhdNazmi <---OLD URL wwww.domain.com/home/MuhdNazmi <---NEW URL I dont need put .php , since it code for not showing > .php

0
Q: Can't debug on localhost while using selenium stand alone server and phpwebdriver

user2811538I'm using selenium-stand-alone-2.37.0.jar and running my test through PHPwebdriver (It works using JsonWireProtocol to comunicate with Selenium server). I'm using xdebug and NetBeans IDE 7.3.1 to debug my test, everything is working fine while running and debugging my test against online page, bu...

0
Q: Keeping my session after scripts ends

Carlos GoceI wonder if is possible to keep the login while the cookie exists so i just need to do the login once, even on with differents scripts. I'm doing the things like this: $tempCookie = 'mycookiefile'; //Begins with the base URL to save cookies $ch = curl_init($url); curl_setopt($ch, CURLOP...

-2
Q: Unable to create a table in the MySql database....?

Hemanth KumarActually I am trying to run the 38 tables query inside a database but I am able to only create 8 out it. I have some errors which stops the table creation.Someone please help me to solve this issue. Thanks in Advance.... *Error SQL query:* CREATE TABLE IF NOT EXISTS jobberland_job ( id BIGINT N...

0
Q: Getting client IP and then city name from it

KarimkhanHere I am trying to get IP of user when he click login button on my page. I want to get city name finally from IP. function get_client_ip() { $ipaddress = ''; if ($_SERVER['HTTP_CLIENT_IP']) $ipaddress = $_SERVER['HTTP_CLIENT_IP']; else if($_SERVER['HTTP_X_FORWARDED_FOR']...

0
Q: nodejs integrated possiblity of ajax call with nodejs

krishnaHi am using nodejs and my call is exactly after the socket.emit() .My problem is that if ajax call fails but socket interaction continues logic will fail.So, is there a possibility which sends ajax call with socket?? Please help me

0
Q: phpunit testing Call to a member function fetchMock() on a non-object

RayI'm trying to run a test on a method which works in the browser but's throwing the error above. Not sure how to resolve. The error is being thrown when this call is made: $this->call('POST', 'books', $input); My method is: public function store() { $input = Input::all(); $result = $this-

0
Q: Composer does not install required dependencies

TjorriemorrieMy package has a dependency on PHPExcel: "require": { "php": ">=5.3", "phpexcel/phpexcel": "~1.7" }, But when my package gets installed in projects, the package installs fine, but not the phpexcel dependency. How do I achieve that?

0
Q: a variable declared on a blade view template is not passing onto another blade view with inclusion

aimilianomy code is this inside the blade view {{--Include some Vars and functions for this template--}} @include('common.functions') {{--Include zend translation init--}} @include('common.zend_translate') {{--Include HTML assets js css etc..--}} @include('common.header') then the functions.php ->...

0
Q: exclude a folder and match all .html pattern files in a root folder using regex

Bhanu PrakashI am doing migration from html to Drupal. Using migrate module. Here in our custom migration script i need to match all .html files from all the folder except images folder. pass this regex to $list_files = new MigrateListFiles([],[],$regex) Below is format of html files /magazines/sample.htm...

0
Q: Switching from mysql to sqlite in zend

john smithI am just starting out with zend framework and I have followed the skeleton app tutorial that sets up zend to use mysql. I am experimenting a bit and I am trying to change my db to mysqlite, and I guess I need to modify the global.php file in config/autoload. My current setup is: 'db' => array...

0
Q: Drupal multisite installation

VeerendraHi can anyone please explain me how to create a drupal multisite as this is the first time i am using drupal I have to create 1 Umbrella site and other 6 subsite in the same installation Please explain thanks in advance

0
Q: Param in Prepared Statement contains Hyphen (-)?

user3035598I'm trying to rewrite all of my standard MySQLi queries to MySQLi Prepared Statements. I've noticed a problem though, whenever I have a variable that contains a hyphen, the execute() fails. The variables I'm dealing with ($project_id) look like this: 'AAD0012003-01'. $get_progress_done = $db->...

0
Q: Woothemes Canvas (child theme) header-*.php

KortschotI've done a basic (done a million times kind of wp install) with Woothemes's Canvas theme. Created a Childtheme for it. Everything is ok up until I wanted a custom header like: header-custom.php. When I try to load the header in a page template: <?php get_header('custom'); ?> It won't load th...

-1
Q: Unable to create output file - mpdf

vamsiI am using mpdf library to generate pdf files. For now it is working fine, but one of the user complained me that when he hits the submit button he is getting the error mPDF error: Unable to create output file: userfiles/xxx.pdf How come it is only happening to one user, not for all??? Any hel...

0
Q: symfony2 render php return contains invalid characters

BrunoRamalhoI'm trying to render a php file in symfony2. In config.yml I'm using: # app/config/config.yml framework: # ... templating: { engines: ['twig', 'php'] } and in the Controller: public function installAction($name) { $finder = new Finder(); $finder->files()->in('../sr...

0
Q: Search through array and removing duplicates

CataneoI am trying to remove duplicates from a text field. The text field auto suggests inputs and the user is only allowed to choose from them. The user however has the option of choosing same input field more than once. It's an input fields that states the firstname + lastname of each individual from ...

0
Q: i am generating qr code to browser how do i save that to a folder in php

user3035337i used this code to save image file. but its returning an empty file . function save_from_url($inPath,$outPath) { $in= fopen($inPath, "rb"); $out= fopen($outPath, "wb"); while ($chunk = fread($in,8192)) { fwrite($out, $chunk, 8192); } fclose($in); fclose($out); } save_from_url('ur...

0
Q: slice large file into chunks and upload using ajax and html5 FileReader

user3035467What I want to implement is: in the front end,i use the html5 file api to read the file,and then upload the file's content to the php backend using ajax,and it's ok if the filesize is small.However,if the file is big enough,it cause chrome to crash.So i split the large file into chunks using fil...

0
Q: Using prepared statement to retrieve login test info to $row parameter

CoreyIm trying to use a mysqli prepared statement to retrieve the login information that is needed to test input data for a valid login. The problem im having is that I can't find a valid way to add the result values (salt, password) to the $row parameter so I can use the salt and test the password. ...

0
Q: How to add a fraction on PHP?

JeraldPunxpublic function add($temp) { $newNum = $this->num + $temp->num; if($this->denum == $temp->denum) { $answer = $newNum . "/" . $this->denum; } else { // IDK how to make the same this two here.... $newNum = $this-> } return $answer; } on else IDK how to add and make balance on the denu...

0
Q: The shipping rate cannot be determined at this time

Emerald214I get this message when the first time call SetExpressCheckout and the shipping cost doesn't show. Why is it? How to fix it? paypalwpp.php::order: order Object ( [info] => Array ( [order_status] => 2 [currency] => JPY [currency_value] => 1.0000000...

0
Q: How to get entity at the controller in symfony2

TroyashkAI have a Product entity and want display a list of products (from database) on page and after that get selected entity in controller. ProductsType: class ProductsType extends AbstractType { public function setDefaultOptions(OptionsResolverInterface $resolver) { } public funct...

0
Q: How to get data from Relations with two different joins in yii

Rizwan Shamsher Kaim KhaniI have three different tables. First Table First table is language(id, language_name) // id is primary key. Second Table Second Table is verse(id, topic_id, surah_id, verse_text) // id is primary key, Third Table Third table is verse_translations(id, verse_id, language_id, translations_te...

-1
Q: create a PHP timesheet to store hours spent by a employee on a particular project

user3030425i have a employee database storing all employee details with thier employee_id . I have a projects that are assigned to a particular employee . i want to track time spent by that employee on that project (multiple projects can be assigned to him) on weekly basis . I select the employee and the w...

0
Q: Counter in real time

user3013963<body> <ul> <li id="d5"></li> <li id="d4"></li> <li id="d3"></li> <li class="seperator"></li> <li id="d2"></li> <li id="d1"></li> <li id="d0"></li> </ul> <p><span id='rowcounter'>xx</span></p> <?php include "host.php"; $query_user = mysql_query("SELECT COUNT(*) AS totale FROM table"); $row=mysql...

0
Q: htaccess Rewriterule on URI with exceptions

Tom SennerI would like to rewrite the following URLs: http://www.web.de/productCat1 -> pass Var productCat1 to productCat.php http://www.web.de/productCat1/product20 -> pass Var productCat1 + Var product20 to products.php http://www.web.de/shop -> do nothing as file exists http://www.web.de/contact -> d...

-1
Q: Specific regular expression in PHP

JohnDoeAs title of my question says, I need a specific regular expression and I'm really lousy in regular expressions. It should check length of password, does password contain at least than two symbols, at least three uppercase letters and at least four numbers. So, for example, password: `myname123` ...

1
Q: Dynamical column names depending on the single row of the query result

Ivan NikolovI need some help with dynamical column names in a sql query. First I will try to explain my database structure and then the problem. Database structure: admin_group table: +--------+----------------+ | id | language_code | +--------+----------------+ | 1 | en_UK | | 2 ...

0
Q: laravel logout fail on pressing back button

user3035711on logout from my laravel application using the laravel logout method: public function getLogout() { Auth::logout(); return Redirect::to('users/login')->with('message', '<div class="alert alert-success">Your have successfully logged out</div>'); } i am successfully logge...

0
Q: Phonegap external html file

user3035705I have a problem with this code. <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <script language="javascript"> function callWeb(){ document.getElementById("myIframe").src = "MY NEW URL PHP"; ...

-1
Q: Zend; Im getting a fatal error message

user3035197As the title says, im getting a fatal error message during installing a script. The error log tells as follows; PHP Fatal error: Uncaught exception 'Zend_Cache_Exception' with message 'cache_dir "temp/cache/" must be a directory' in /home3/ultdno/public_html/library/Zend/Cache.php:209 Stack tr...

0
Q: PHP not showing correctly in web page

TheodorI am absolutely new to php.. I have to make connection to MYSQL database. I am using XAMPP 1.7.2m and it came with: Apache 2.4.4 MySQL 5.6.11 PHP 5.5.3 phpMyAdmin 4.0.4 So far, i have searched for compiler(phc-win 0.3.1), it creates .exe file, which i execute in CMD, but i got warnings: Unabl...

0
Q: MSCRM Authentication with php invalid or malformed elements

user1820381I'm working on a php that connects with MSCRM on-premise installation via basic authentication. From what I understand i have to use NTLM authentication and simply wrap it into a SOAP request. In my first request i send the "username" data with the following request: $authmsg = '<s:Envelope xmln...

0
Q: how to manage div in one line sort-able using j-query

user3030853I am creating div Sortable() using j-query. I am getting refer of http://jqueryui.com/sortable/. but here div is vertical line. But I want all div in one line. so I have created but when I drag div then designing or sequence is disturb. I cant drag with disturb design. Please help. Thanks in Adva...

0
Q: create rel=groups with fancybox in wordpress

WezzouI am using right now out of Fancybox plugin for creating me a small portfolio, but right now n'r I replace the image so it takes like never stop, it reads all the images on the page and not only those pictures that appear in my project . so I assumed that you have to carve out the rel = "group" ...

-2
Q: sorting color selections on brightness

user3035730Let's see, i give you a little background about my question. I am a airbrush guy that love to paint with these kind of things. BUT i airbrush RC car body's that i have to paint from the inside out. This means that i paint the colors in reverse so first the dark colors and finishing with white. N...

0
Q: How best to build a simple CMS app?

Glenn CurtisOk, I am currently tasked with making a system / app like a CMS package. Now you might ask why I can not use something like Wordpress or Drupal, well I am not a big fan of CMS packages anyway but the end user needs the UI to be very, very basic. They do have a current Wordpress based site and the...

0
Q: Live video stream format with metadata for dumping on Debian

user1617092I have a little trouble. I need to dump live video stream and split it into pieces. I can choose specification and format of this stream (in which I will receive it). The other side will send stream in the format that i'll choose. I need to receive metadata that contains date and time for every s...

0
Q: How to remove this warning to this php script

user3029499I have this php query, which join many table from (baby class up to standard seven), so that I may get the Total SUM form SUM of each table. But when I run the query it gives me Warning says Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\db_v...

0
Q: Import categories in magento through script

Sohil DesaiHello I have just started to learn magento. Now I was trying to import category in magento through script. my magento code looks like <?php require_once 'businessclasses.php'; define('MAGENTO', realpath(dirname(__FILE__))); require_once MAGENTO . '/app/Mage.php'; umask(0); $...

0
Q: php algorithm for creating a list of keywords from a string of keywords

Alon DorI have a string of keywords to search for in the format: A,B+C,D+E,B+F,E+G+H,... each letter represent a keyword, and the + is for when I would want all keywords to appear. There is no guaranteed order to the keywords. later I will search a DB for names that contain these keywords. So following m...

0
Q: PHP Dbus stable implementation

Radu MarisMy situation: I have a software composed of some compiled C++ daemons running in the background, a PHP/JS web interface and a CLI interface written in Python. Currently to send a Dbus command from PHP (web interface) to a daemon we use a python script to proxy the call, because python has a v...

0
Q: if insufficient store credit display message

user2987843i want to check store credit before product adding in cart. if have insufficient store credit then product will not add to cart and display a message to user that he have not much credit to buy that product.

0
Q: Send multiple <option>s through form

jskidd3<fieldset> <legend>Available Areas</legend> <select id="availableAreas"> <?php $sql = "SELECT * FROM workArea"; $result = $db->query($sql); while ($row = $result->fetch_assoc()) { $id = $row['id']; $area = $row['name']; ...

0
Q: MySql AUTO_INCREMENT in INNODB Engine as second column

viperneoi have a very annoying problem at this moment. i want a table with the following specification: CREATE TABLE `test` ( `client` INT NOT NULL , `id` INT NOT NULL AUTO_INCREMENT , `test` INT NOT NULL , PRIMARY KEY ( `client` , `id` ) , INDEX ( `test` ) ) ENGINE = INNODB; you ca...

0
Q: Taking time to run php program in Amazon EC2 machine

snehalI have php script which extract xlsx file and put it to mysql database. Executed this script in local machine(windows 7 32 bit) it is taking 2 mins to execute and here other processes are also running. when same script executed in ec2 machine(windows 7 64 bit) it is taking 30 mins and here onl...

0
Q: How to manage SQL Result wordpress

Andrew HoI writing a PHP statement for an ios app to get results from the Post_meta field in Wordpress. We use a plugin for woocommerce to see where the article is stored. I wrote the code but in the wordpress database the meta_value is stored in an odd way: a:1:{i:0;a:9:{s:5:"title";s:22:"Brands Meubel...

0
Q: How to Resolve "Error Establishing a Database Connection" on WordPress XAMPP Localhost for Google App Engine

user3035713Following Google App Engine's instructions for creating a local WordPress development platform, I created the database and initial user using the instruction's MySQL direction: CREATE DATABASE IF NOT EXISTS wordpress_db; CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'wp_password'; GRANT ALL PR...

0
Q: Float to int error

HendriqYesterday I was helping some one and got a weird error which I could not explain to him how it worked. The code // (float)65.35 $percentage = round(65.351, 2); // (float) 6535 $total = $percentage * 100; // (int) 6534 $int = (int) $total; What is suspected was that the int value would be 6535...

0
Q: Magento Get Product Attribute Text in Stock.php

user892970I've been trying to adjust the amount stock reduced by a sale, depending on a product's attribute, I've tried the following methods, but seem to be getting nowhere. Magento Version: 1.8.0.0 File: /app/code/core/Mage/CatalogInventory/Model/Resource/Stock.php Around line 158 after: foreach ($pro...

0
Q: Search box for online pictures and links

user2995803I have a 10000+ picture in form of web page links (e.g. www.xyz.com/abc/gef.jpg), each has its own name or set of keywords to identify it. Also each has a < a href...> tag that leads to specific story of that picture. What is Needed: ONE webpage page where we can use a search box to find and ...

0
Q: For loop with AJAX

user3033005I am creating a survey with a html form with radio buttons. The user answers 5 questions, and hits submit button that calls a javascript, where I want a loop to get the value from each radio button, and put it all together into one variable. My problem is, that I cant figure out the correct way...

0
Q: What is the meaning of "$this->object->..." in php?

Jimi HendrixI am working on a php script where this syntax is used (and it seems to work properly) inside an abstract class: $this->object->prepareTextareaOutput() and i cant find the place where the method prepareTextareaOutput() is defined, neither inside the abstract class itself nor in classes which u...

-1
Q: mysql query 2 different data

user2977272i have a table +----+---------------------+----------+ | id | waktu_be5b | fqi_505 | +----+---------------------+----------+ | 69 | 2013-10-24 00:31:09 | 334438.1 | | 70 | 2013-10-24 02:30:20 | 334481.9 | | 71 | 2013-10-24 05:28:22 | 334524.4 | | 72 | 2013-10-24 06:19:36 | 334565.5 | |...

-3
Q: How do i do a php include?

a1b2c3I am new to PHP and don't have much experience with it. I'm trying to add another page into the one i'm currently working on. I have tried a few things but aren't getting any luck at all. I only started PHP the other day. HTML <div id="sidebar"><?php include('sidebar.php'); ?></div>

0
Q: How to call skype api in php

user2986106I have some phone numbers diplayed from database. When i click on that number i have to call that number using skype.I am using a php code. <a href="skype:echo123?call">Call the Skype Echo / Sound Test Service</a> It works only if the system have skype installation. Anyone help me.

0
Q: RewriteRule not redirecting

kaleeswariDue to request, every page needs to be prefixed with "index.php"; if the path was first /it, now it needs to be /index.php/it. I have tried changing base url in settings.php. But it doesnot works.Tried rewriting in .htaccess also. I have tried the following code RewriteBase / RewriteCond %{HTTP...

0
Q: PHP htaccess script not working after changing host providers (Server error 500)

user2119707We recently changed host providers for our website. We have multiple folders with a PHP script for limited user access. When I try to access the protected site on the new host or the script itself, I do get the prompt to type in the user and password, but then just a 500 internal server error. I...

0
Q: substr() foreign characters gives me black diamonds with white questions marks

Todd JenkI'm taking foreign (Japanese) characters from a database and using substr() to limit the length of the string. However when I do this it cuts off a character from the string and that leaves behind one of those question marks in black diamonds as a replacement character (�) Everything (Document...

0
Q: Find overall rank of a MySQL record and determine if tied

dsol828I using the following code to retrieve a player's overall ranking in 6 categories (Games Played, Goals, Assists, etc....) The code works well and either produces the overall rank, or if the player is tied with another player, adds a "T-" before the rank (i.e. "Ranked 152nd" or "Ranked T-152nd"). ...

0
Q: How to make Indivdual array results, into links?

ClarklightI am trying to return an array of results from php, and each result is a link. When a link is clicked, it will go into another php that echo the details that are related to link/array clicked. But i am not very sure how to do that. What i attached below is the array echoed out. Please any though...

0
Q: view only top 10 from my star ranking

user3035776I have a 5 starrating system at my side, and in want to view top 3 best rated, and for that i use this code: SELECT Ranking, Rating FROM ORDER BY Rating DESC LIMIT 3; but it dont show the top 3 it's shows the 3 with the highest number, if 10 people have voted for one tihing, and 20 people have ...

0
Q: PHP : Limit request time

JeanneD4RKI'm trying to list shared printers in order to retrieve their page counters via SNMP. I extract the printer list through prnport.vbs, get the list and stuff. Now, before trying anything on the printer, i'd like to ping it. My ping function works like a charm, but when it comes to unreachable h...

0
Q: PHP session is lost when viewing page from windows phone

idipousI have a legacy PHP application that uses the following code to create the session $url_path = substr($_SERVER["REQUEST_URI"], 0, strpos($_SERVER["REQUEST_URI"], $project_dir)+(strlen($project_dir))); session_set_cookie_params((60*60*10),$url_path); session_start(); $_SESSION['sessionid'] = se...

0
Q: create folder in php using a variable in path

user3017928i am a newbie in the field of web development, i am trying to create a folder using php's mkdir() command... when i use... mkdir("somefolder"); it works... i had tried mkdir("/somefolder/'$id'/photos"); but it won't work....i think i am doing it wrong how do i do this... well the $id is...

-1
Q: Select Rows with Kanji

Mr AI have a table called contacts. The name field has both kanji and english names. I would like to be able to query the DB and get only names with Kanji characters in it. It doesn't have to be sorted. It just needed to be kanji names. Thanks.

0
Q: PHP-CLI How to write in user input?

AsteryI want to get predefined user input. echo 'Enter value: '; # here write some 'default value' $value = fgets(STDIN); So then user get prompt, he can edit input. Enter value: default value # Here we can backslash and write new one. How to achieve?

0
Q: Advices about Bulk Email System with VPS

Cuky80I'm bulding a system to send thousands of emails monthly. I guess outsourcing is not an option cause it would be too expansive with these numbers. We have a vps with dedicated ip address. I've spent last hour to read everything about this on stackoverflow and i've "only" these questions: PHP w...

0
Q: How to manage multiple div in one line with horizontal scrollbar

user3030853I want to display 30 same div. So I am taking for loop with showing 30 div. Now I want div in only one line. if div is out of screen then it will show horizontal scroll bar. Please help. Thanks in advanced. The Code is - <div id="sort-able" > <?php for($j=0;$j<30;$j++){?> <div cl...

0
Q: mysqli bind_result()/ only returning nul

user2509366I am having a fair bit of trouble with the mysqli's bind_result() and fetch() functions. I have tried a few things including echoing the result of: $sql->prepare() $sql->bind_param() $sql->execute() $sql->bind_result() and they were all returning true the only function that is returning false...

-1
Q: Html to Microsoft word

M PatelI got a fantastic project in my company, In this project users are submitting answers in website. Now when user will click on a button (download as word) that time they will get one word file in their pc. In this word file they can see their given answers correctly with connected question and ...

0
Q: $_GET is not null and returns undefined id

José Ribeiroi have being tried to do solve a problem with a undefined id but i can't. It says me that i have undefined id but if i don´t use "isset" the program runs really nice but i need the file outputs the information instead of the: Notice: Undefined index: id in C:\xampp\htdocs\treeview_v2\load_url_db...

0
Q: Using function from model in view

Vincent van den BoogaardIn CakePHP I've a model Customer which looks like this: <?php class Customer extends AppModel { public $hasMany = array( 'Invoice' => array( 'className' => 'Invoice', ) ); public function getDisplayName($id){ $customer = new Customer(); ...

-1
Q: simultaneously run foreach results php

user3009108I pull results from my database, with a while I process each result. Now I would like to run all these results simultaneously. Is this possible with php? Below I added a example code, I would like to have that for each result the query is executed simultaneously without waiting for the other re...

0
Q: My new anchor tag is not working in .tpl file

user3035896i am trying to modify a template which is consisting of .tpl files instead of .html or .php . there are some anchor tags like this: About Us but if i try to point a different page in anchor tag like this: About Us it is not working. i have already created "newAboutUs.tpl" and copied "abo...

0
Q: Can't establish proper routes in Laravel 4

user2747008So sorry to bother y'all, but I was wondering if anyone could help me. I'm having a wee bit of a problem with my code in Laravel, being used to working from scratch rather than with frameworks. I made use of the Laravel Bootstrap Starter Site and I'm trying to add additional pages, but the routin...

0
Q: PHP interpreter behaving weird

Catherine TylerI found this weird behaviour on classes. Is this a PHP Bug ? <?php class A { public function disp1() { echo "1"; } public function disp3() { echo "3"; } } $a = new A; echo $a->disp1()." 2 ".$a->disp3(); Expected Result 1 2 3 Actual Result 13 2

0
Q: Date convertion between JS and PHP

Barth ZalewskiI seem not to understand the logic between date conversions client <-> server. I can't find a good way to handle this... Background: my app will run on customers' servers, which I (in general case) will not be able to configure. So I need to find out the PHP time zone offset (it's mostly UTC, but...

0
Q: HTTP POST a JSON array using PHP/CURL

RaniI'm trying to send a JSON array to an API via HTTP POST, get a response and print it. I tried using cURL to do so, but it doesn't seem to work. I simply get zero response, a blank page. My request: <?php $data = array( "login" => "myLogin", "password" => "myPassword", "id" => "1234...

-1
Q: How to upload image into folder form xlsx file?

pankaj I want to upload image form xlsx file into folder using php. any idea?

0
Q: call php function from python

ishitaIn php file: start(height,width){ ... ... return image } here my python code: import subprocess def php(script_path): p = subprocess.Popen(['php', script_path], stdout=subprocess.PIPE) result = p.communicate()[0] return result page_html = "test entry" output = php(...

0
Q: Zend Framework 2 - Interfaces, modules and controller

StupidusI'm new to Zend Framework 2 and I'm trying to build an application for (so far, moderate) "fun" and I need some hints to know how should I structure my application. I have a existing module that allows me to display some web pages with 2 controllers and a database access. My application is aime...

0
Q: Validate url and convert into protocol format

KarimkhanI am using file_get_content($url) which does not work with url starting from www. So I am trying to append the http:// and converting into proper form if user entered url is not in correct form. Check DEMO HERE <?php $url= 'www.google.com'; $pad = 'http://'; $cmp = 'www'; $prefix = substr($u...

0
Q: JInstaller: :Install: File does not exist tmp/template_copy_52946b599c123/en-GB.tpl_shaper_minima.ini

AnkitThe full error code is this: JInstaller: :Install: File does not exist tmp/template_copy_52946b599c123/en-GB.tpl_shaper_minima.ini Please help me how i can fix this problem..

1
Q: Content of div - JQuery

VaMoosethanks for taking the time to look at this post. So after about a week of pondering and failing I am getting somewhere! I have a database with posts inside, and I need to retrieve those posts, list them in date order and when the user selects a date, it changes the content of the div. Now I hav...

0
Q: CakePHP 2.x retreive/query using data in HABTM join table

harrygI have 2 tables joined by a HABTM relationship. portfolios and assets. The join table is portfolios_assets. I wish to have an extra field in the join table, rebalance_date such that I can query the assets in a portfolio for a given date. How would I construct a find such that I can determine the...

0
Q: How to disallow scripting tags in text boxes

user2969426i am trying to implement "post" functionality in my website and i am working on codeigniter(PHP) , and my problem is when i write <script> alert("aaaa"); </script> and post some thing javascript starts working and an alert pops up, so how to avoid scripting tags in textboxes

0
Q: Not able to create xml file on remote server using php

tavI am developing a php app where I need to fetch some data from MySQL database and create an xml file. I have succeeded in doing that in my local server(XAMPP on Windows) but, when I tried to load it from remote server(Linux) I am not getting any output. PHP Code: <?php $dom = new DOMDocument("1...

0
Q: Expression Engine multi-product order form

DomAllow the following image: http://i.imgur.com/CJlksHr.jpg, Basically I have a table with a list of products I have stored in expression engine. I need people to be able to fill in the quantites of each product that they need and submit the order. There is no money being exchanged here. I ne...

-2
Q: Send html form to variable php

user2834008I have a html form, and i want that when u send the value of the html, to be a php variable <form action="callback2.php" method="POST"> Telefoon nummer invoeren: <input type="text" size="10" name="nummerb" id="nummerb"> <input type="submit" value="submit"> this is the html and the value of th...

0
Q: Variables from included php file

user3035964I currently have a php file with html code in it. At the beginning of the body tag im including a dbcon.php which contains a db connection, a query and a fetch_result. I now want to use those results later in the html file but i cant get it to work. Website-file looks like this: <html> <head>...<...

0
Q: How to generate thumbnail from a uploaded video using Imagine’s library

Aman VarshneyHow to generate thumbnail from a uploaded video using Imagine’s library. i want to generate thumb when i upload a video from backend. i m using sonata media bundle. they are using imagine library from generating thumbnails.

0
Q: PHP Updating Array Values Issue

userMod2I have a very beginner level question here - I've tried googling around and reading the PHP.net tutorials and as obvious it seems to update an array I'm not having any luck. This is my issue. In my code is the line: $router = Router::get(array('appDirectory' => dirname(__FILE__).DIRECTORY_SEPA...

0
Q: PHP fails Updating existing records

AlihamraI have the following PHP Code : //Selecting amount from rcpts_exp table $query = "SELECT amount from rcpts_exp"; $result = mysql_query($query); if(!$result){ echo "FAILED"; } $num = mysql_num_rows($result); //fetching each row for($i=0;$i<$num;$i++){ $row = mysql_fetch_assoc($result); //Sim...

0
Q: how to make multiple combo box with value coming from data base through javascript

user3035813i have made the code to make than one textbox but when i am using the combobox containing value from databse it is no working <script type="text/javascript"> $(document).ready(function() { var scntDiv = $('#p_scents'); var i = $('#p_scents p').size() + 1; $('#addScnt')....

-2
Q: php data separate file from website

SandroDevosOn my website I show some products with their brand and model. This data is saved on the webpage via PHP. Example: <?php $producttype1 = array("01" => array("id"=>"01", "brand" => "ABC", "model" => "Hello"), "02" => array("id"=>"02", "brand" => "ABC", "model" => "Hel...

-3
Q: How to avoid users to open other server files

XtraCodeHow to avoid users open other server files like all .php files,directory,images. The only thing that is accessible must be index.php or index.html.

0
Q: How to upload file in server in Agiletoolkit Framework and Php

ankanI am novice in Agiletoolkit Framework. I have done some portion like registration/login page in Agiletoolkit Framework with connecting with database and inserting the table in manually in database table.I cann't understand how to upload file in Agiletoolkit Framework.(1)I have source file.I Shoul...

0
Q: wordpress update multiple posts post meta

danyoI am trying to update multiple posts post_meta at once. Here is my form: <?php query_posts(array('showposts' => -1, 'post_type' => 'product_variation', )); while (have_posts()) : the_post(); ?> <input name="regular_price[]" type="text" value="<?php echo get_post_meta(get_the_id(), "_regular_pri...

0
Q: Symfony: How to alter data sent to custom FormType

ra_htialI'm trying to create a new FormType, my FormType requires an array parameter example: $form = $this->createForm(new MyFormType(), array( 'test' => array( 'one' => 'first', 'two' => 'second', ) )); before i use the array, i want to m...

0
Q: How do i echo feedback in php dropzone

LegendchykeI am writing a php script using the dropzone to upload images. if(uplaoded){i intend to echo success }else{echo failed}. but i dont get any feedback. althogu it uploads to the folder, i need to do further proccessing such as uploading file name to d db. but i dnt get feedback. all i get is a NIKE...

0
Q: upload security protection - do i need additional protection on a 777 folder

user1547410I just started working with uploading files via php. From my understanding you need to set the properties of the folder to 777 so anyone can upload to that location. That's fine and i only obviously keep information there that is not sensitive, its basically images which are displayed back to t...

0
Q: Why won't this INSERT work in MySQL

user3036014I'm being dumb right here because I don't know what messed up my program. I accidentally DROPPED my database, all the other details are gone but I made a DB from scratch right away. After I've done with a table(which worked fine) I've encountered a problem with this mysql_query("INSERT INT...

0
Q: Make the Android app as a Server..?

user2545522How to make the android app as Server. I installed web server in the Android device and tried to call the service from the php which is the client. Its telling that it is unable to listen to the socket. I Implemented SOAP to send the request from the Php client to the Android server. Any suggesti...

0
Q: Amazon Product API code not working

user3035984I am working on a project that requires the use Amazons product API. The code I have was written using Amazon API documentation for me it looks fine and it should work but of course I am missing something I am getting getting 2 errors that are related to AccessKeyId and AccessKey. Warning: ...

0
Q: MySQLi: Number of variables doesn't match number of parameters in prepared statement

Ben ShepherdI'm trying to pass a prepared query through a function that prepares the query and executes but I keep getting "Number of variables doesn't match number of parameters in prepared statement". I cannot figure out what's wrong because I have the same number of variables as parameters. Query: UPD...

0
Q: How to use MySQL with PHP-Liquid template engine

kanarifuglI'm using a template engine called PHP-Liquid. It require me to use arrays to work. Now I want to use my database to output blog entries instead of manually add new arrays directly when posting a new blog entry. $assigns is like the main array and a umbrella for everything I want to output on my ...

0
Q: doctrin2 tools to create association form yml creates wrong schema

SachinGI've three tables - Users Groups UsersGroups Right now I'm having following schema( written manually ) for each of above table. Now I've planned to use doctrine so I'm going to create same database design from yml files. Three tables structures shown below is what I have right now and works ...

0
Q: Unable to edit a mysql subject using Php

user3035999So I'm creating this CMS for faculty information as part of my thesis. When I need to create/delete a subject, my code seems to be working fine. However, when I try to update them, it tells me that the editing process failed. Not sure where exactly it's going wrong. Below is my subject query. I'...

0
Q: What is the exact detail but simple meaning of [x-amz-meta-expires]?

user3004444I have uploaded images using putObjectFile(). I have used there "cache-control" attribute. So I just want to know is [x-amz-meta-expires] returns the object expiration time? Thanks in advance...

0
Q: Call PHP Function In Smarty

mike jonesCan some show or tell me how to call the php function below to get the ratings for each movie in smarty as i'm new to php. public function getRating($movieid){ $movieid = mysql_real_escape_string($movieid); $average = 0; $e = mysql_query("SELECT AVG(`rating`) as average FROM movie_ra...

0
Q: Strange issue with Content-disposition: inline on IE 11

GetzI have a download code in php which works fine, i just want to add the possibility to open file when it's possible instead of download it. I set the Content-Disposition to inline, which works like a charm for all browsers except...IE. No problem with the file displayed directly in browser (Imag...

0
Q: Putting ContentURL in smartwizard working, does anyone know how?

user3021575Im using smartwizard in a multistage booking process. But cant seem to be able to load content throught ContentURL.. I know that there is already open questions about this, but from what i saw, no one has found a solution.. I want to use contenturl to load a php page that will include other page...

0
Q: PHP export / import mysql table data to / from sql file for wordpress plugin

GravyI am building a custom wordpress plugin for one of my clients. I have a php activate and deactivate script which creates and drops the custom tables. Before deactivating, I would like a wp-admin to be able to download an sql export script with insert statements for my custom table data. That wa...

0
Q: How to prevent designing is disturb during sortable() of j-query.

user3030853I am creating drag functionality using sortable() of j-query. I am showing 30 div in one line with horizontal scroll bar. I have some design disturb issue. When I drag one div to place another div then It disturb designing. Please Help. Functionality is done but only design disturb issue is gener...

0
Q: I have error in function of recursive xml traversal

pankajfunction ReadUserXml($requestXml) { static $res = ''; $xml = new SimpleXMLElement($requestXml); if(count($xml->children())) { $res .= $xml->getName().php_eol; foreach($xml->children() as $child) { ReadXml($child->as_XML()); } } ...

0
Q: how to set up virtual host in nginx?

Manoj KumarI am using below configuration settings but it is downloading index source file on execution. But it is showing output of index.html if it is put instead of index.php Overall it seems it is not reading php file. server { server_name test.com; root /var/www/test; index index.html index.php...

-2
Q: Trigger jQuery from PHP?

JamesI'm fairly new to jQuery but I'm sure this has a simple solution. I have a Popup jQuery function defined in my .js file. I am checking with PHP if the USER needs to verify his Login credentials with facebook: <?php if(empty($user)){ // the user needs to verify credentials // execute Jquery po...

0
Q: PHP with curl for Xml parsing

rahulI am parsing a google map api for getting latlong form address.I got the xml succesfully.How can i get the latlong from the xml response. My response is SimpleXMLElement Object ( [status] => OK [result] => SimpleXMLElement Object ( [type] => Array ( [0] => locality [1] => political )[formatted...

0
Q: PHP - Get variables from a URL & save it for later use

D.MIm using this short php script to get variables from a Url which sends me data. file_put_contents( "log.txt", print_r($_REQUEST, true)); Now when i make a test call the variables are saved in my log.txt file, but any following call doesn't get saved or displayed in the log.txt. So basically it...

0
Q: How to upload photo in yii?

404 Not Foundi am not able to upload photo in my database and folder... this same code is working if i use CModel class for building form... but if i am using plain html it's giving me error Profilepic cannot be blank... my code is given below my form <form method="post" action="<?php echo Yii::app()->g...

0
Q: Manage ID's inserted an in input box seperated by commas

PLATANIUMI'm developing an "input box" where you should insert various ID's seperated by commas (1,2,3,4...etc) where later on I would like to manage these ID's in a MYSQL query. How is the best way to do this? How can I later use the variable in the MYSQL query? Thanks in advance for your help!

0
Q: Get the total of a Project from related project items in CakePHP

Vincent van den BoogaardIn CakePHP i've a model Project and a model ProjectRecord: <?php class Project extends AppModel { public $useTable = 'project'; public $hasOne = array( 'Customer' => array( 'foreignKey' => false, 'conditions' => array('Project.customer_id = Cus...

0
Q: FB API Request/notifications

Mr SorboseHave seen various articles dotted about with similar material on FB request invites. How is it possible these days to invite friends to an external website rather than a canvas app or game. I have the necessary usernames and IDs from the graph API. I need to loop these in PHP and send out an i...

0
Q: Class resolution quirk with 'implements'

Jonas BerglerCan someone explain the following, seems like a bug to me. <?php class A implements JsonSerializable { public function jsonSerialize() { return []; } } new A(); new B(); class B implements JsonSerializable { public function jsonSerialize() { return []; } } Has the following result ...

0
Q: Is it bad practice to use a global $config variable?

danijarAt the moment, I use a variable called $config, which is a big associative array containing settings for the application like folder configuration, database connection, urls to match, and so on. This variable is defined in its own file system/config.php which gets included by the main file system...

0
Q: I got a very strange function returnvalue behaviour in PHP here

SteiniHi I have a very strange behaviour of PHP and hope that you are able to help me. I have a Symfony 1.4 based PHP project on PHP 5.4.7. I have the following class function to resize images: public function getResizedImageHorizontal($newWidth) { $image = null; $data = $this->getData(); ...

0
Q: Form input formatting

MatthijnIs there a good way to format the input for form's in laravel? For example I have a field in my database calles price which has the price in cents. But in my form I want to display it as a normal "money" value. (e.g 300 becomes 3,00) but when I read the value from the form laravel converts it bag...

0
Q: How to combine two arrays with same keys?

Gottlieb NotschnabelI have two arrays First array [0] => array('date' => "2013-11-26", 'value' => "2") [1] => array('date' => "2013-11-24", 'value' => "6") # Note there is no entry for "2013-11-25" Second array [0] => array('date' => "2013-11-26", 'value' => "null") [1] => array('date' => "2013-11-25", 'value' =>...

0
Q: I need class written by the Trirand team to solve this issue

user1384389I'm facing an issue with jqGrid php component integration with MSSQL server. while browsing stack overflow i found this thread but the answered thread missing the class. Can someone Pleaselink go through this thread and send me the class which is written by #Trirand team to solve the issue.I'm un...

-2
Q: If condition - $a and $b || $a and $c

Macko Taranaif ( 'post.php' == $hook && $screen->post_type == 'slideshow' || 'post.php' == $hook && $screen->post_type == 'page' ) if ( ('post.php' == $hook and $screen->post_type == 'slideshow') || ('post.php' == $hook and $screen->post_type == 'page') ) It's not working properly. Any suggestion ? How ca...

-1
Q: How can you execute php/sql code within a form

user3032860I want to make a form with a textarea that displays the tekst so you can modify it. If you press submit, it wil update the database table and return to the same page. I thought you could insert code in the action attribute, but what about returning to the same page? <form action= <...

0
Q: Implement PHP logic to jQuery

Jhilke DaiIn a system I have 3 users, Ben, Shane and Payne, the site functions normally for all users and also have same Menu system. However I am tasked to add one Menu item from core and be visible only for Ben. So, I added Candy in the Menu item as Ben is kid, but now I cannot change the core in PHP sa...

0
Q: Order on MySQL is Returning 1,11,2,22 not 1,2,11,22

tim.bakerOn this MySQL Query the ordering is sorting all results digit by digit. What I want is to simply return the smallest number first. Am I going about this wrong, or is it just the way PHP sorts? MySQL: $history = mysqli_query($con,"SELECT id,credits,timeadded FROM users ORDER by credits ASC); R...

0
Q: Different PHP directory Apache + CLI (chrooted)

user3036021I have an issue running php command line tasks on chrooted environment. (CentOS Linux running Plesk 11.5) If I execute the following php code: <?php echo getcwd(); ?> On web server (Apache + suexec + php fastcgi) it prints: /var/www/vhosts/mydomain.com/httpdocs On command line (/bin/b...

0
Q: I want make a OOP pagination for my articles

user3036158I want make a pagination for my articles.. Here is class: <?php class Mynews { public $conn; public function __construct() { $this->conn = mysqli_connect("localhost", "root", "", "mynews"); } public function readAllarticles() { $sql = "SELECT * FROM article...

1
Q: Safely auto increment MySQL field based on MAX() subquery upon insert

Ben DodsonI have a table which contains a standard auto-incrementing ID, a type identifier, a number, and some other irrelevant fields. When I insert a new object into this table, the number should auto-increment based on the type identifier. Here is an example of how the output should look: id type...

0
Q: run a script PHP from MS DOS without opening any browser

user2915878i want to run a script PHP (example : http://localhost/project/test.php) from MS DOS without opening any browser. i use the command : START http://localhost/projetc/test.php but this command opens a browser do you have any solutions?

0
Q: Video Upload PHP Script Not Working

user3023297I want to upload videos instead of images I have used this script for image uploads but now I want to upload videos and I have changed file types to video file types but it's not working and it is giving me this notification Notice: Undefined index: file in C:\xampp\htdocs\mysql_login\upload.php...

0
Q: add subdomain to folder php

user3035800I need php script to perform the next thing to be performed cpanel account management system storage . The following example - Creating a subdomain Create a folder at the same time of course (is the example here involves creating a folder ? ) I wonder if the reference of the domain folder is do...

0
Q: Is there a way to temporarily disable Duplicate entry in phpMyAdmin?

SirBTI keep on getting the below error message when I try to enter some important records I accentually deleted. Duplicate entry 'EMIR2023 ' for key 'flightNo' Is there a way in the phpMyAdmin environment I can disable the UNIQUE KEY then activate it when I am done with inserting the records? Fi...

-1
Q: PHP string output buffer to html- generating extra anchor tag

user2678538Once again, I have no choice but to ask you guys for help on this one as i'm completely baffled and I've been trying to solve it this past hour. I have some php code structured something like this : function build($url=""){ $output = '<ul class= "bc-ul">'; $output .= '<li class= "bc-li"

0
Q: Simultaneous Requests to PHP script with Transaction

Yuan ChenI have a script with update the table record. I use the transaction for rollback if there is an error occur. The problem is that when the script try to update the same record then the system will broken. Example: the record is 10 2 simultaneous request then request 1: +5 to the record request 2:...

0
Q: Undefined index: aksi

kputriHi i'm getting an error as :Undefined index: aksi in C:\xampp\htdocs\crud\lat1.php on line 6 my php code is: <?php include"class_koneksi.php"; $db=new database(); $db->konek(); if($_GET['aksi']==''){ //line 6 $daftar=$db->tampilData(); echo"<table border=1> <tr> ...

0
Q: Allowing user to type html tags and save them to file to display on website

FeathersI am writing blogging software from scratch (mostly as a learning experience). My method of allowing the blog owner to make a new post is for them to type the post into a form (textarea), including formatting tags such as <br />, and then use PHP to create a file and write it with the contents of...

1
Q: JQuery not changing the content of div from even numbered links?

VaMooseThanks for taking the time to look at this post. So I have managed to do my task to a point. I am pulling data from a database called posts with the following fields: id, account_name, data, heading, subheading, videos, voice_notes, music, images, post_date, date_for_post. So This is the proces...

0
Q: Populate Google Charts with php array

almalI am trying to create a Google line chart using their API and JSON. Hard coded, this chart works: <?php include "include/dbcommon.php"; $url = "http://".$_GET['P1']; if (! is_null($_GET['P1']) || $_GET['P1'] != "") { // Connects to your Database $conn = mysql_connect($host, $user, $pwd) or ...

0
Q: php get array elememnt using $$

ddw147i know this $var1 = "10"; $var2 = "var1"; then echo $$var2 gives us 10 i want to this with array i have array $intake_arr = array(5=>10,7=>20,8=>30,9=>40,10=>50,11=>60,12=>70); i have some logic that will pick one array from set of array , all array will look like $intake_arr ...

0
Q: How can I access parent class variable?

Repon HossainI would like to access parent class variable. How can I access parent class variable? here is example: class myclass { var $parentvar; function __construct() { $this->parentvar = 'Some text or array'; } } class anotherClass extends myclass { function __construct(argumen...

-1
Q: Wordpress admin panel error?

Debakant MohantyWhile accessing the admin panel of my site http://freepokemmorpg.com/wp-admin/ te following error appears Warning: Cannot modify header information - headers already sent by (output started at /home/freepoke/public_html/wp-content/themes/hanami/functions.php:9) in /home/freepoke/public_html/wp-i...

-2
Q: "Private" not not really private?

Joran Den Houtingclass Test { private $private = ""; public function add($string) { $this->private[] = $string; } public function evaluate(Test $container) { return $container->private; } } $test = new Test(); $test->add("zero"); $test->add("one"); $test->add("two"); $resul...

0
Q: PHP Markitup wysiwyg doesn't read my content

Ludovico LoretiIf i add some text on Markitup wysiwyg, and i send the form, it doesn't save the content of the text area in the POST variable...Someone know why? `<textarea id="markItUp" cols="80" rows="15" name="contenuto" placeholder="content" required></textarea>` this is the query: <script type="text/j...

0
Q: Exclude Wordpress posts from being shown on homepage from a specific category

Bob FlemmingHeres a tricky one... If a post is marked as 'Category A' I want it to be excluded from the homepage. This can be achieved with the following code: function exclude_category($query) { if ( $query->is_home() ) { $query->set('cat', '-3804'); } return $query; } add_filte...

0
Q: redirect html page that is ajax content

user3036243I have a one page portfolio site that uses ajax to load some portfolio items. These portfolio items are separate html pages, for example folio-item.html. The problem I am trying to solve is that the pages like folio-item.html are being indexed by google (which is good) but when clicked or are l...

0
Q: CGridView filter whit CJuiAutocomplete

TaviI want to filter an GridView by using an autocomplete field since the table of values has over 4000 entries and a simple dropdown wouldn't help. what i've tried so far lots of ways. closest i got was this way : View file: $this->widget('zii.widgets.grid.CGridView', array( 'id'=>'activitate-...

0
Q: curl with php not giving any results

user2964771this is my php code, where it is not giving any result, please let me know if I have made any mistake. <?php $curl_handle=curl_init(); curl_setopt($curl_handle,CURLOPT_URL,"http://www.my-ajax-site.com 'https://ajax.googleapis.com/ajax/services/feed/find?v=1.0&q=Official%20Google%20Blogs'"); ...

0
Q: Replace space with dash (-) in url only

Luc PrevooIs it possible to change the space in the url to a dash (-) without changing it in the code? The URL is used to identify the page, so it is not possible to just change the url because the page will not be found anymore so str_replace is not usable in this solution. Using str_replace twice, once...

0
Q: Array key partly repeats, merge by that

php_nub_qqI have an array Array ( [database_db_host] => localhost [database_db_user] => root [database_db_pass] => qwerty [database_db_db] => db [system_base] => http://www.mysite.com/ [system_DEBUG_MODE] => 0 [system_name] => mysite.com [system_VAT] => 20 [appearance_c...

0
Q: How to get hyperlinked PHP value in other PHP file

gree_tejasI have a PHP page where I have hyperlinked text: echo "<li><a href=list_result2.php?name=$disease_name>$disease_name</a></li>"; Let I have 5 diseases in hyperlinked list, i.e. diabetes, Ischemic Stroke Stroke, Cardiovascular Disease and malaria. Whenever I am clicking single word disease, say...

 

« first day (280 days earlier)      last day (30 days later) »