« first day (260 days earlier)      last day (50 days later) » 

12:03 AM
0
Q: HOW to get $_POST variable into my CLASS?

David McClaveProbably a newbie question, but then I'm learning on the fly: Within the following code, I need to name $targetname and $imagelocation come from the $_POST variable coming in... I KNOW I can't define these variables properly the way I'm trying to, but am a bit stumped... help anyone? class Post...

 
12:20 AM
0
Q: Google Analytics Codeigniter Class

Castiel MartinI'm using the class in here within codeigniter where i've included that as a library, : http://code.google.com/p/gapi-google-analytics-php-interface/ What i've did in codeigniter as a difference with the normal class is just the constructor part within the original class which is mentioned in he...

0
Q: NSNonLossyASCIIStringEncoding to PHP - PHP to iOS Push Notification

Matteo Gobbiin my app, i send a data encoding with NSNonLossyASCIIStringEncoding (for emoji etc.), save it in the database and return it when is requested. When i receive the data, i use the same encoding and everything is ok. But, if i have to send a push notification from the PHP file, i don't know how co...

0
Q: php mvc can't find css sheet because of ending slashes in url

user68621I just ran into a weird problem that I hope someone can help me with. Well, im using a mvc framework with my php project (first time), but it can't locate my css stylesheet from the different views if the URL is ending with a "normal slash" (/). I have a Bootstrap class for handling this (delet...

0
Q: how display sql query results using tbgridview in yii

user2958474I want to display this sql query using tbgridview in yii. this is my controller. public function actionSVI(){ $list = Workstation::model()->listSvi(); $this->render('svi',array( 'list'=>$list, )); } my model and sql query. public function listSvi(){ $svi = Yii::app()->...

0
Q: PHP Dropdown Menu Populated from Database

bloodstorm17Hey so I have a database that looks like this: +-----+--------+----------+ | ID | Name | Quantity | +-----+--------+----------+ | 1 | Shoes | 50 | | 2 | Shirt | 20 | +-----+--------+----------+ I'm trying to make it so that I get the item name in one dropdown box and the q...

0
Q: 2 operators / sintext related questions first is return with && second is var ? : ;

Neta MetaSo first question is .. what will the follow return: public function can($right) { $something1 = true; $something2 = true; return $something1 && $something2; } Second is I know that :; is ternary operator however i know if only while the first thing is a condition of some sort w...

0
Q: Codeigniter with xpath and on duplicate key update

user2505513Looking for a bit of advice. I have an update script for my website’s database, but as yet - I’ve not been able to figure out how to convert it to the Codeigniter framework ie. it’s saved as it’s own file in the home directory of my website, and executed from there. There’s a couple of things m...

0
Q: FineUploader 4.0.3 Error accessing iFrame response IE

user783622Have setup FineUploader 4.0.3 and it's working wonderfully in all browsers except IE8/IE9. The return message I'm getting is: https://www.dropbox.com/s/t367y3zx3z2n9to/Screenshot%202013-11-05%2018.26.17.png 'Error when attempting to access iframe during handling of upload response (Access is d...

0
Q: I have a website and when I put one page in the root it works fine but within a folder I get an error?

user2692720I have uploaded the same file on to the website. The php code in it looks like this $f = fopen("http://thefreetechhelp.com/testsrc/top.txt", "r"); while(!feof($f)) { echo fgets($f); } fclose($f); ?> </code> And there is two of these in the document. Below are the links, notice how in t...

0
Q: Wordpress returning half a response

NateRunning out of ideas that could be causing this issue so just thought I would throw it out there. I am currently developing a site based on Wordpress which has some search functionality powered by a web service. The web service returns a load of details of various residential properties, includi...

-1
Q: Nested mysql queries in codeigniter

Oluwamayowa SteepeI'm having a bad day here. I can do this plainly, but I need to replicate this in codeigniter. Can anybody help please? enter code here $query1 = "SELECT id FROM tbl_pledgeform"; $result1 = mysql_query($query1) or die(mysql_error()); $rows = mysql_num_rows($result1); for ( $...

-2
Q: Script with WYSIWYG editor where users can add their own content

user2630155I am looking for a PHP script where users can quickly create their own page with simple content (text, images, videos) and share the link. Something like pastebin, but with more advance WYSIWYG editor.

0
Q: Input remain "onfocus" after first selection

Moncho ChavezHi im building a form where in php i already know the email of the user.. So i insert it as value "in gray" if you select the input with the mouse. it became black "active". but then if you select something else, it became gray again.. obviously cause its not in focus anymore.. but how can i pre...

0
Q: jQuery add field on click error inside simpleTabs jQuery

ButternutI have this code jQuery its an add new input field var scntDiv = $('.q3_field'); var i = $('.q3_field p').size() + 1; $('.add_field_q3').live('click', function() { $('<p><span class="added'+i+'"><input type="text" name="inputq3['+i+'][q3]" class="edit-text" placeholder="http://www.doma...

0
Q: JSON matching data and using data

BeardyI've only every used json to fetch data to use on pages or set as variables. But now I would like to search json for a matching name then fetch its views from the json [{"id":1,"name":"Pale","description":"This is a description","url":"http://domain.com//1/pale","views":2212,"createdBy":{"name":...

0
Q: Use PHP GD or ImageMagick to replace uploaded image to disable malicious codes

user2909037If i use GD or ImageMagick to copy/replace image.jpg (note that we are working with pixels not with the file binary) uploaded by an unknown user, would it be enough to protect the server against malicious codes ? Or will i need to take other measures ? If so, which ones ? Id like to discuss this ...

0
Q: PHP Codeigniter insert delete update with submit buttons

BarletNeed help with PHP Codeigniter framework. I have a form with 3 Submit buttons. I want to Insert - Update - Delete using those buttons. I successfully made the Insert button work. So when I click on Insert the data is stored in MySQL Database table. Since they are all submit buttons all of them a...

0
Q: Summarise consecitive array items

user2958546I have an array like the following: Array ( [10:00-18:00] => Array ( [0] => Mon [1] => Tues [2] => Wed [4] => Fri [5] => Sat ) [10:00-21:00] => Array ( [3] => Thu ) [10:00-13:00] =

-2
Q: Professional networking CMS like linkedin

Arash KavianiDo you known any free professional networking CMS preferably in PHP which could have all or some of Linkedin features? Cheers, Arash

0
Q: Where are the JavaScript field definitions?

MelI have a PHP form that includes javascript js_qty.js. Js_qty_.js has this function called xhrGetValue. I am in my NetBeans IDE and it shows the field definitions for f.job_id, f.item_id, etc. I have looked in the JavaScript and the HTML portion of the PHP and I cannot find the field definition...

0
Q: PHP - Play any stream from online list

user2957159I'm coding a website that features Twitch streams. I've been trying to code a feature which grabs a random stream from the online list and plays it at the top, but I still can't get it to work. The page has a Twitch video player and a list of online streams below (name and thumbnail, no video). ...

0
Q: What is the character encoding of headers sent to the server from client

MichaelMitchellI am trying to figure out what the character encoding is of the headers sent from the client to the server. I am trying to interface with a browser that is in a game ( it uses webkit ) and the data that I am trying to get is suppose to be in UTF-16 but when I run mb_detect_encoding($_SERVER['HTTP...

0
Q: basic php classes, error catching for arguments

d-_-bI have a pretty basic question on whether or not what I'm doing is a good practice, or is overkill. class myClass { public function doSomething($thing=false) { if (!$thing) echo "Your thing is missing!"; echo "Did you get that $thing I sentcha?"; } } Is it a good pr...

0
Q: pageSize bug in yii grid when using joins

EnricoI have this search using joins. The results are correct but yii grid does not show all of the results even if the pagesize selected is greater than number of result. here's my code : if(!empty($_GET['BaseIar']['description'])){ if($_GET['BaseIar']['description'] !='empty'){ ...

0
Q: Need advice with routing in Symfony2

GardnerI'm quite new to symfony2 and I need some help with its routes. I'm working on a bundle that works quit like a service. It receives data through QUERY_STRING and process this data according to internal rules and store its result in the database. For now, let's assume that this bundle is accessed...

0
Q: How to fix jQuery/PHP form submission?

waveboyI am updating a client site and the simple contact form that used to work is now broken. It appears that the HTML form sends and receives data from the jQuery file as I get the error messages returned, though it is not passing the data through to the PHP file for sending an email. If I send the d...

0
Q: How to submit second AJAX form produced from output of first

alias51I am loading a form as a json output from an AJAX request. The following PHP forms the JSON output of the request that displays the form: $this->errors[] = "<form id='confirmreset' name='confirm_reset' action='" . URL . "login/forgotPassword_action' method='post'><input type='hidden' name='us...

0
Q: PHP - JQuery Autocomplete error

user2958591I'm getting a Uncaught SyntaxError: Unexpected token < jquery-1.9.1.js:541 whenever i try using my autocomplete field. In my HTML file I have <head> ... <script src="../../scripts/js/schools.js"></script> <script src="../../scripts/js/jquery-1.9.1.js"></script> <scri...

0
Q: Check if current user is administrator in wordpress

NarenI am developing a plugin for wordpress, I want to find if current user is administrator or not, unfortunately I could not use the current_user_can() as it gives me error, so am using the global $current_user. But I could not get inside the if part even for admin user.. How to fix this? global $c...

0
Q: Running first php script from web browser

user2958615I am in school and have a simple .php script that i want to run. I have created a public_html folder and added 2 files that count the number of visitors. I have given permissions 755 to my $HOME folder, to the public_html folder and to the .php file. I know that the php works, because I can ru...

-1
Q: how to update xml from php

Juraganerkai have a xml data that load from my database.i want to ask how to update my xml file from php. this is my xml file : <T_Person> <Person> <ID_Person>8BE9EFC3-BD3D-4DD2-BD48-0C08D507A038</ID_Person> <First_Name_Person>Rico</First_Name_Person> </Person> <Person> <ID_Person>A04FDD24-67E3-4426-...

0
Q: Facebook api about username PHP

Anaes AriasWhere can I find the facebook information regarding registering users. I have the app to register my users, but I am not able to find the first name and middle name. Does anybody know where I can find them or what they are. Here is a part of the app: {"name":"name"}, I was wondering what the f...

0
Q: Updating web applications when users don't refresh

CmdrMoozyAt my job, I write code for a web application, and as such new code will get pushed to the servers relatively frequently. We are running into a problem, though, where some of the users of this application tend to leave it open in a browser window for up to days at a time. They then run into this ...

0
Q: Adding PHP inline to HTML

BlaineI'm trying to use PHP to set the value of a text box, and I tried the solution in this question: Can HTML be embedded inside PHP "if" statement? Here is what I'm doing: <?php if(isset($_SESSION['date']) : ?> <div class="label">Service Date:</div> <input type="text" class="service_date...

0
Q: adding next and previous button on mediawiki pages

alvinbI have a mediawiki site that has the following categories: Characters, Enemies, Weapons, Allies. Each Category has a list of pages (e.g. in Characters, i have char1, char2, etc.). Lets say I'm currently viewing char2 page, I want to have a next/prev button so that I can directly view char3 or ch...

-1
Q: Movable Divs In a PHP Website

user2930379So, I plan on creating a dynamic website. The thing is, I have a text input box (I'll call it tib) <div id="tad"> <form action="<? echo $user;?>" method="post"> <textarea id="post" name="post" rows="5" cols="70"></textarea> </div> </form> Anyway, I want the user to be able to move the bo...

0
Q: Create new image from 2 images in webpage

YeahMKDI want to create an image from 2 images stacked on top of each other. I dont mind if it uses PHP or JS. I need it to display in another image tag and then send that off to email. There is a fiddle to give you an idea of what I want to do. http://jsfiddle.net/7UwDe/ <img id="shirt" src="#"> <i...

0
Q: I can't Upload video path file to server by using PHP web service?

ramanA couple of weeks I was try to upload the recorded video path file to server by using web service from PHP team. Here below I used two methods that is "ASIFormDataRequest" & "HTTP Method" But I can't get positive results from both methods. I. "ASIFormDataRequest" -- Method NSLog(@"I st...

0
Q: header cache seems to be ignored

Leandro GarciaI've been wondering what seems to be wrong in my cache. I set this headers so that it will not cache contents on the website (html, css, php) files. header('Cache-Control: no-cache, no-store, must-revalidate'); // HTTP 1.1. header('Pragma: no-cache'); // HTTP 1.0. header('Expires: 0'); // Proxi...

0
Q: php and postgresql deallocating prepared queries

JaseNOTE: To say I am a newbie to postgresql is to insult the newbies! I am writing a web app which will utilize a PostgreSQL database for it's data storage. In what I have done so far, I have managed a good grasp of the syntax for creating queries, and retrieving results from them, whether it be ...

-1
Q: How to pass PHP variable to a PHP form w/ ajax

Dan wHere is my jquery (it is within a PHP echo): <script type="text/javascript" language="javascript"> $(document).ready(function() { $(".star_' . $pvid_ID . '").click(function() { $.ajax({ url: \'/dev/scripts/find_ratings2.php\', type: "POST", data: { \'id\...

0
Q: php code igniter using curl for ios push notifications

aemadI've made web-service to send push notifications to ios using curl, i have the ck.pem file for development which contain both cert & RSA private key, and referring to it correctly. but every time i call the web-service i get the same error Curl failed: unable to use client certificate (no key fo...

0
Q: Retrieving the entries in descending order and displaying them

MithileshI have serial number (named as srno in my database) as primary key in my database.It is in auto-increment mode. I also have date column in database. For a particular user (say aamir)I want the user's records to displayed in a descending format i.e latest first. So far I have done this : <?php ...

0
Q: Post multiple dynamic textbox value

user2901740The textbox is dynamically generated using javascript var txtLoop = 1; function add(type) { if (txtLoop !=23){ var element = document.createElement("input"); element.setAttribute("type", "text"); element.setAttribute("value", ""); element.setAttribute("name", "txtLine" +txtL...

0
Q: Get html tags content using regex with php

KakitoriI have this html with the next content: code.php <section class="tags"> <ul> <li><a href="/tag/image1" class="link">image1</a></li> <li><a href="/tag/image2" class="link">image2</a></li> </ul> </section> I want to extract the next content using regular expression: <a href="/tag/image1" clas...

0
Q: mysql select count from rows with same id

Jia Lunim using mysql and php. i have 2 tables. 'school' table contains : student_id , product_id, student_Name 'products' table contains: product_id, product_name i did a query select student_id, p.product_name as product_name, p.product_id from school s join products p on s.product_id = p.p...

0
Q: Change date format from dashes to nicer fomrat

MikerI have dates that are being stored in the database like this: 08-11-2013 (That's Day, Month year BTW) Is there a way (without changing the database entries) to output this on a page like this instead... 8th November, 2013 Cheers.

0
Q: Magento Error while editing

user2958711Got this error when editing mobile_device_detect.php located in app\design\frontend\default\sm_sport\template\page\sm\includes already reuploaded the original file and the error still persists. Fatal error: require_once() [function.require]: Failed opening required '/home4/balaji32/public_html/...

0
Q: OpenCart - Display Sum of Ratings on Product Page

Ashish VermaOpenCart: v1.5.6; Theme: Default. I want to show sum of rating for individual product on product detail page. For example, there are 3 reviews received for a product, and ratings are 5, 4 and 3 stars respectively. So, it should be displayed '12 ratings' on product page at frontend.

0
Q: SQL statement - double and single quote confusion

user2828701I've stared and stared at this but cannot seem to understand why it is not working. Something is up with my use of single quotes and double quotes, but I cannot seem to figure it out. My error: mysqli_fetch_array() expects parameter 1 to be mysqli_result the query note: yes the cookies I am ...

0
Q: How can I get the first name from this facebook php?

Anaes AriasHow can I get the first name from this facebook. I have a facebook php code for registering my users but I can not figure out how to get the username and the first name from app. Here is my code: <iframe src='http://www.facebook.com/plugins/registration.php? clien...

0
Q: Sonata Admin Bundle - How to make a custom field that has no related property within the entity specified

NikNot sure how to do this using the SonataAdminBundle. Simplified example: There is Page entity and PageAdmin admin class User should be able to add/remove tags when managing the Page entity There should be no $tags property within the Page entity, Tags will be fetched by a custom Repository's m...

0
Q: How facebook user id and page id been designed in database?

keatweiIn facebook, user can sent message to page, page can send message to user too.. user have images, page have images too. We use image table for example. Let say, we stored images in 1 table Images Table Image_ID Image_Type Image_Size Image_URL Image_Owner (reference to user and page) as there i...

0
Q: Accessing records in a database in reverse order using a button

MithileshIs there any way to display all the records of a particular user in a reverse order. For eg if I do order by desc I get latest record first. How can I display penultimate and subsequent previous records on a web page using a previous button.

0
Q: Bigcommerce - How to redirect users to login page from homepage if not logged in

user2958677How do I have customers see the login page instead of the homepage if they are not logged in? I tried using the following code but it redirects to the login page even if the customer is logged in. <script language="javascript" type="text/javascript">//<![CDATA[ if (window.location.href.toString(...

0
Q: HTPASSWD Automatic

ldigginsquick question. I setup a tiemcard and po system for a family business. The employees enter their username and password to enter the system. Everytime the family hired someone though they send me the info. I use htpasswd generator, and open the file up, add it, and then re-upload use ftp. My wife...

0
Q: Using sqoop to import mysql data into HDFS through PHP but have some java version error

ArvinI trying to use sqoop to import mysql data into HDFS through PHP, I write a script which contains a sqoop command below: sqoop import --connect jdbc:mysql://my-database-ip/$1 --username myusername --password mypasswd --table $2 --fields-terminated-by " " -m 1 then I write a php file that ca...

0
Q: PHP cURL + Google Places = Strange illegal characters

Matt RabeI'm retrieving places from the Google Places API via PHP's cURL functions, and some of them have names which contain odd, non-ASCII characters. I have whittled the curl calls down to a bare minimum. If I visit the URL I am GETting in a web browser it looks fine... Doing a basic PHP curl GET to ...

0
Q: PayPal IPN Not Being Verified, Notify Version 3.7, CakePHP 2.x

SobiborTreblinkaI have the following CakePHP 2.x Code <?php App::uses('HttpSocket', 'Network/Http'); class PaypalUtility { public static function isValidPayPalIPN( $data ) { $result = false; $HttpSocket = new HttpSocket(); $data[ "cmd" ] = "_notify-validate"; $response =...

0
Q: How do I access a column in the association table?

PadraigI have a many to many association articles *---* categories via article_categories This is what article_categories looks like id article_id category_id Now I added another column to article_categories called 'score' id article_id category_id score Here is how I h...

0
Q: Draggable Items in Jquery

user1234440For some reasons, my div blocks that are inside the div aren't draggable even when I have enabled them. Javascript <script type="text/javascript"> $(document).ready(function() { $("#boxes_holder").draggable(); }); </script> HTML / PHP <div id = "boxes_holder" class = "initBox"> <?php //Crea...

0
Q: How do i upgrade osCommerce Database from v2.2 to v2.3.1

rubo77Inside the Oscommerce folder there is an upgrade_guide called upgrade-230.pdf. there it sais This upgrade guide only provides the minimum required changes in the form of security updates and bug fixes. These changes will not upgrade your store to a complete v2.3 version. Please continue to ...

0
Q: How do I create a post like option in php that will be viewable to friends?

Newbie CoderFirst of, Imma newbie. Can your answer be clear and specific and include code? Explainin would help. So, my question is this. In php, I have a text input box. <form action='write.php' method='POST'> <h2>What's Going On?<br><br><textarea rows="8" cols="30"></textarea> <input type="submit" ...

0
Q: How to create laravel 3 if else with LIKE condition

syamimiI have a bundle of controllers such: Route::get("users", array("as"=>"users", "uses"=>"users@index")); Route::get("user/(:any)", array("as"=>"user", "uses"=>"users@view")); Route::get("user/(:any)/edit", array("as"=>"edit_user", "uses"=>"users@edit")); Route::p...

0
Q: String from Multidimensional array

MDSI have an array similar to this but could be more or less pet names: Array ( [0] => Array ( [pet_name] => Bella ) [1] => Array ( [pet_name] => Zoey ) [2] => Array ( [pet_name] => Pooky ) ) And I'm trying to get a string like this: Bella,Zoey,Pooky I've tried to implode the array but I ...

0
Q: Paypal custom checkout for Express Checkout

user1552879I want to customize it through the API and not the console. As I understand from this documentation https://developer.paypal.com/webapps/developer/docs/classic/api/merchant/SetExpressCheckout_API_Operation_NVP/ there are about four to five parameters &LOGOIMG, &HDRIMG, &CARTBORDERCOLOR,&PAYFLOWC...

0
Q: PHP: INSERT Into Database Using MySQL

bloodstorm17I'm running this on my website: $PlaceOrder = " Insert INTO Table VALUES ( '$CustomerID' , '$ItemID' , '$Quantity' , '$Date' ) "; $result = mysql_query ($PlaceOrder); if (!$result) { die('Invalid query: ' . mysql_error()); } But when I ever I do I keep getting the fo...

0
Q: HWIOAuthBundle doesn't redirect to twitter login

dextervipI am settting up FOSUserBundle and HWIOAuthBundle("0.3.*@dev") to work with facebook and twitter. I followed all documentation steps and facebook is working well but twitter doesn't work correctly. When I click to connect with twitter, it just redirects to my app login page. Here are my config...

0
Q: Propel filterBy array not working with string variable

DoogieI have been trying to do the following with no luck. I have tried it many ways and always the same result. If someone could suggest a workaround or tell me what I'm doing wrong it would be much appreciated. One way: $stringOfIds = "1,4,15,21,25,32,35"; $clients = ClientQuery::create('...

0
Q: remove decimal, following number(s) and round the values

paulie.jvenuezI have the following data. $96.2k $75.2k $44.4k $35.6k Etc....... What I am wanting to do is replace the decimal and any number(s) following the decimal. Then i want to round the whole number to the nearest tenth. All of my data is between 10k and 90k So the expected output would be.. $100k...

0
Q: implementing plugins loaded action hook in wordpress

NarenMy plugin code looks like below, if (!current_user_can('administrator')){ function hide_post_page_options() { //global $post; // Set the display css property to none for add category and add tag functions $hide_post_options = "<style type=\"text/css\"> .jaxtag { display: none; } #category-adder ...

0
Q: Buggy Custom Omegle Client

Daniel BurnettThere's a topic on the HackThisSite forums that details the workings of Omegle (the anonymous chat client at omegle.com): https://www.hackthissite.org/forums/viewtopic.php?f=76&t=3783 That's a little out of date, but it's still mostly accurate. Using that as a jumping-off point, I've been workin...

0
Q: Difference between memcached and mod_mem_cache

user1852837I just want to know what are the difference between mod_mem_cache and memcached(stated in http://memcached.org/).

0
Q: Is this "echo" necessary?

GoodbyeEarli've recently acquired a copy of Programming PHP, 3rd edtion, and on page 10 i saw an "echo" that brought me doubt. <html> <head> <title>Personalized Greeting Form</title> </head> <body> <?php if (!empty($_POST['name'])) { echo "Greetings, {$_POST['name']}, and welcome."; } ?>...

0
Q: trying to understand postgresql via php database connection sharing

JaseTo say I am new to PostgreSQL is an understatement. As such I have spent a great deal of time in the last couple of days going over the various manuals at http://www.php.net/manual/en/ref.pgsql.php and at http://www.postgresql.org/docs/9.1/interactive/index.html . Short form of my question: Do...

0
Q: Accessing records in descending order in database

Mithileshretrieving the enteries : <?php $query1 = "SELECT * FROM table2 WHERE id='{$user}' order by srno desc " ; $result1=mysql_query($query1,$con); if (!($result1) ) { die('Error: ' . mysql_error($con)); } else { $values1= mysql_fetch_array($result1); } mysq...

-3
Q: Array manipulations in Delphi

JUANderboyI'm a beginner in using delphi, Please Help me.. Is there a way of copying a whole array of integer into another array of integer? making the first array as a back-up. Thanks in advance..

0
Q: How to get localhost/foldername url in localhost

user2757460I setup folder in localhost. I want to write a script to get that domain path but I've tried using $_SERVER['SERVER_NAME'] $_SERVER['HTTP_HOST'] getenv('HTTP_HOST') these all given http://localhost only , how could i get full path like http://localhost/abc

0
Q: select subquery cause mysql server to be unresponsive

XiaoDELETE FROM item_measurement WHERE measurement_id IN ( SELECT (-id) AS measurement_id FROM invoice_item WHERE invoice_id = 'A3722' ) I've really tried hard to find what's wrong with the code. I tried to run this in a php page, which doesn't respond. I also tried the same line in phpmya...

0
Q: installation of xampp in windows xp

vikash_NoidaI am installing xampp in my computer(Operating System -windows xp sp2 , dual core processor,1GB RAM) but in xampp Control Panel Apache not start it;s show Apache started [port 80] Busy. I think the file is corrupted or viruses so i formatted my computer and install from xampp cd but this show sam...

-1
Q: I don't know how can i delete post for page

SamLaioI have a problem with the facebook. I need delete post from facebook page, i try facebook graph api this: https://developers.facebook.com/docs/reference/api/deleting/ but it's return me this: { "error": { "message": "(#100) Invalid parameter", "type": "OAuthException", ...

0
Q: Splitting array by id then handling the split arrays

Jack SniperI'm trying to organize a group of arrays that I'm extracting from my database. Here is an example of the array: $productsarray = Array ( [0] => Array ( [id] => 789 [pro_name] => Product1 [dsid] => 5 ) [1] => Array ( [id] => 237 [pro_name] => Product2 [dsid] => 3 ) [2] => Array ( [id] =>...

0
Q: Timthumb 403 forbidden issue

Nirmal RamI am trying to use timthumb in one of my projects and it doesn't seem to be working and i searched all over and couldn't get the issue sorted. Here is the url of my site http://192[dot]185[dot]98[dot]213/~ancoradc/wp-content/themes/AncoraDC/timthumb.php?w=150&h=150&zc=1&src=http://192[dot]185[d...

0
Q: automatic 301 redirect to parent category in wordpress

purse9644We are scheduling posts to be archived on a monthly basis. However, this is causing a large amount of 404 errors on the website and obvious SEO issues. All our posts sit inside a category. So my question is, how do we create an automated 301 redirect when a post is archived (unpublished) to it's...

0
Q: How to download video from Vimeo with php or javascript?

user2958793I was finding how to download video from Vimeo with php for 2 weeks. But i can't make it. please let me get the source about how to download video from Vimeo with php or javascript. thanks.

 
4:14 AM
0
Q: Strange gzdecode issue even though header shows Content-Encoding => gzip

Ambrose BwangattoI am trying to download file and un-compressing it depending on the Content-Encoding in headers but when i check the header to find if the stream is encoded or not like this. For example this is the header response i am getting HTTP/1.1 200 OK => Server => nginx/1.4.2 Date => Wed, 06 Nov 2013...

0
Q: Issue with error validation and page action?

RomelHi guys I'm new to coding and loving every minute of it :) So the following code is in my registration.php file. I want to make it so that when the user fills everything BEFORE it will direct them to my invoice.php file after pressing the register button. If they are missing some requirements, ...

0
Q: Hide values in hidden input

BurrowsI have some hidden inputs, however, if you view the source code, you're still able to see the value saved in the input. How can I hide the values from the public? Encrypt then decrypt? How? Thanks.

0
Q: Keep Tags when reading from raw text file in PHP

user2958933I have a simple text file. The content has xml tags. The issue with that is some of the elements don't have closing tags. I am able to read the file in line by line, however the tags are missing when I echo back what was read. Sample File Content. <SOL> <Name> JJ Evans <Address> 1010 Good ...

0
Q: cezPDF cant insert image

hadsiNo image is showing up, have researched everywhere and i know many people are having the same problem but can't seem to find a solution for it, can someone please help. $path = base_url() . "img/tt-logo-info.png"; $this->cezpdf->ezImage($path, 50, 100, 'none', 'center');

0
Q: php shell_exce return null when executing command

deepu sankar $shell_query = "mysql -u username -p password --execute=' INSERT INTO `mawinkcms`.`tbl_current_push` (`id`, `magazine_id`, `push_keya`) VALUES(NULL, '175', 'checker');'"; $test = shell_exec($shell_query); var_dump($test); But i got only NULL Value as output. If any one can tell me what i...

0
Q: Is it possible to store the values of Array as one new variable?

Sylvie YunjaeI have sample data in database with multiple different name,date and menu... I need to proceed data with the same name and date, but each data has a different menu... DATABASE the problem is that I need to store all the menu from the same name and date as a new variable since I need to call ...

0
Q: How to set limit $this->User->findByFirstName('Nadim');

user2893413How to set limit to this query $this->User->findByFirstName('Nadim',array('User.id','User.first_name','User.last_name')); it sql is SELECT `User`.`id`, `User`.`first_name`, `User`.`last_name` FROM `users` AS `User` WHERE `User`.`first_name` = 'Nadim' limit 1 I want to remove limit 1

0
Q: Accessing next and previous records in myql database

MithileshSay I have 3 records of same users with IDs 2,4,7,9 and I want to be able to go from one to another by navigation via next/previous links. The problem is, I don't know how to fetch 1 record per page with link redirecting to same page. So when I have record with ID 4, If I click previous it must ...

0
Q: Verifying form fields

7O07Y7I am trying to verify some form fields using javascript but I cant seem to get it to work. Its just a simple html form with a few inputs.. name phone message etc. Contact.html <form action="sent.php" method="post" id="myform" enctype="multipart/form-data"> <div id="myform"></div> <fieldse...

0
Q: Time between loading page and finishing form

TickingHandsWell, I'm only a novice PHP programmer. However, I've been working on a contact form for a live website. I'm minimizing the troubles a legitimate user has to go through in order to stop spam bots. So I have a honeypot, but I also wanted to check the time between loading the page and clicking the ...

0
Q: Use PHP variable in AJAX

Dan wI am trying to accomplish the following on the page "videos.php" (note, this is all inside of a PHP echo): User clicks .star_' . $pvid_ID . ' which submits a video rating to a form (this is working properly) Now, I need to refresh the div that displays the current video rating to show the updat...

0
Q: CActiveForm cannot validation

AsamoaI'm just beginning study Yii for a week , now I want to use Yii CActiveForm to create a from and validate in new JS file . But i'm stuck when use CActiveform combined with jquery ajax validation ,when I click Submit button,nothing happend. If i don't use CActiveform ,the jquery ajax file running ...

0
Q: Using ctype_alnum() with spaces

NormanI was trying to check if a string is alphanumeric using ctype_alnum(). Problem is, the string can have spaces in it, and ctype_alnum() returns false. Is there a method to check if a string is alphanumeric even with spaces in php, or is there a hack to use ctype_alnum() with spaces.

0
Q: jQueryUI Autocomplete keyword match returns 2 values from database

user2632063I am using jQueryUI Autocomplete widget successfully to search my database for rows matching the request term: $("myinput").autocomplete({ //delay ajax request delay: 500, minLength: 5, multiple: true, source: function(req, response) { $.ajax({ url: "getV...

0
Q: codeigniter dynamic routes if statement

Jess McKenzieI am wanting to make changes to the code below but I am unsure how to do it if I am using the while loop. What I need to do is be able to have an if statement that allows me to basically say if($website_page['post_url_link'] == 'value') { write the specific routes for this link }else{ write s...

0
Q: Cant UPDATE all column values only few columns are getting updated

AMRUTAI want to UPDATE ALL COLUMN VALUES WHICH YOU CAN UNDERSTAND FROM THE CODE.. BUT ONLY ONLY FIRST THREE COLUMNS GET UPDATED AND LAST TWO VALUES GET UPDATED. 1.Home_number 2.Office_number 3.Fax_number does not get updated. plz help me to solve the following problem if (i...

0
Q: Curl in PHP Via Get Request

RashmiI am using Curl . i want to access url via Curl. When i direct Access url, it is working fine. but via curl it doesnot display anything. here is my code $baseurl="https://www.addressfinder.co.nz/api/address?q=184+willis+st%2C+te+aro%2C+wellington+6011&key=9QTP8F3CHXEVU7WGYA6J&secret=KQLTAXY4...

0
Q: pagination codeigniter can't link page

gabrielhy, i can create pagination , but from page 1 can't link to page 2 ...data page 2 can't show... can help me ?? my code : $config['base_url'] = base_url() . 'transaksi/index/'; $config['total_rows'] = 21; $config['per_page'] = 10; $config['uri_segment'] = 3; $con...

1
Q: styling css with php from constructor

C-LinkI'm very beginner to php so I'm trying to understand the following: class Style{ public $fontsize; public $fontcolor; public $bgcolor; function __construct($fontsize,$fontcolor,$bgcolor){ $this->fontsize="font-size: $fontsize"; $this->fontcolor="color: $fontcolor...

0
Q: MySQL query produces correct results, but using PDO produces NULL value - why?

RobI am currently working with PDO on a project of mine, and am having a problem I can't seem to get past. A standard MySQL query (executed in phpMyAdmin) returns the results I want, but when I use PDO, it produces a NULL result. I notice if I don't bind the values the query works, so would like to ...

0
Q: Applying Twitter API using example but return Null

user2959014I am using twitter-api-php-master to search keywords through twitter but got Null return. Really not sure why it is like that. My code is like: <?php #### Include the class file #### require_once('TwitterAPIExchange.php'); #### Set access tokens #### $settings = array( 'oauth_a...

0
Q: HTTP Header gotten from apache_request_headers() is giving a question mark instead of UTF-8 char

MichaelMitchellI am trying to get a UTF-8 String value from a header. And it always changes the UTF-8 characters into ? and the ASCII characters are left untouched. Why is it converting my characters to ?'s? $headers = apache_request_headers(); echo $headers['myHeader']; // prints a '?' if ( $headers['myHeader...

-1
Q: Fatal error: Call-time pass-by-reference has been removed in

AntonI have an oldish script and lately I get this error. Fatal error: Call-time pass-by-reference has been removed in /****/******/public_html/****/cp-list-summary.php on line 100 And it looks like this around line 100 on that file. if ($row[images]) { $image_set = array (); $result = mysql_que...

0
Q: PHP: check if a value exists in array ( not as equal but as Part of )

Average JoeOk... right of the batt, let me clear what the question is not about. it is not about in_array. Because as the PHP manual clearly explains, the function 'in_array' checks if a value exists in an array. But it does this check based on equality. It does not do as based on partial existence. Fo...

0
Q: Android php mysql app force closed during running

user2959025Hi am new to android development.I am trying to connect with android and back end php-mysql using the tutorial http://www.androidhive.info/2012/05/how-to-connect-android-with-php-mysql there is no error in the program while running bt when the 'add' button(for add data from app to server) the ap...

0
Q: Querying a Windows service from PHP (access denied)

Bill BrooksI'm trying to query a Windows service from PHP, using the php_win32service extension, and win32_query_service_status() is returning 5 (access denied). I've modified the service security descriptor many different ways to no avail, and have finally given "Everyone" full control of the service with...

 
5:24 AM
0
Q: User friendly URL's for profiles

BurrowsI have the following link: www.website.com/profile.php?user=Test I want to change the link to be: www.website.com/Test Where the username is after the / without any extra gibberish. I have this set up in my .htaccess file, but it's not working. Why? RewriteEngine On RewriteRule ^/profile/...

0
Q: Magento: category custom layout update (to set new product_list template) is not working

WackGetI have some categories in Magento (EE 1.9) for which I'd like to use a different product/list.phtml template. So under Manage Categories, I select the target category and apply the following custom layout update: <reference name="product_list"> <action method="setTemplate"><template>catalog...

0
Q: Wordpress display specific taxonomy term on custom taxonomy template page

Red Zephyr DesignI'm beyond my capabilities in figuring this problem out. What I need to accomplish: On this page I need to display the results of only the items labeled with the term "Doral" under my custom taxonomy of "New Developments" which is a part of the custom post type "Listings". Currently the page i...

0
Q: Image not displaying from SQL , BLOB , PHP

user2959053I am in testing phase of a new project ,just learning my self how to work with php , so i know pdo is better and will learn it soon Now to the question I wrote a registration page which includes profile picture and i am saving it in the fb fine , but i am having issue with retrieving it This i...

0
Q: Pagination not working in Wordpress

ftntravisCan't figure out why this stopped working all of a sudden. The website is: http://www.revival.tv/sermons/topical-messages/ once it goes to page two it just uses the archive template :( not sure why it is doing this, it worked fine for the last year. Wondering if a Wordpress update did it, we jus...

0
Q: Opencart Modification

user1728037I am currently using OpenCart 1.5. I need to display the product purchased in the orders page inside the admin: sales/order. along with the Order_id, customer, status, total, etc... Should I be able to do this with a module? or can I modify the model (order.php) with another database query. Cur...

0
Q: URI segment as parameter to function: passing commas,+,date formats as URI segments allowed?

yashCan you pass commas or + symbols or data in date - time format as parameters in URI segment in codeigniter? like calling through ajax a url like : controller/function/argument1/argument2 Now can this argument 1 contain characters like +,(,),comma when called from front end? Seems otherwise.I tri...

0
Q: Incorporate honeypot into my .php file

Dewayne PhillipsI am trying to add a honeypot field to my form and every thing I have researched I cannot understand where to place the code. Any help would be appreciated. Here is what I have: <div class="hide"> <label for="spam">What is two plus two?</label> <input name="spam" type="text" size="4" id=...

0
Q: How do I solve this PHP-PEAR error / install PEAR on Fedora?

zack_falconI'm trying to save an old, failing web-server setup consisting of Fedora, PHP, PEAR, and Oracle. With some difficulty (I'm very new to all four), I've been able to set up something similar on a newer system. I used Fedora 19, PHP 5.5.4 (with Apache 2.4.6), and Oracle 11g. That just leaves PEAR....

0
Q: what is wrong with following code

user2907171i have this function to find class from any level of directory function _findFile($path, $class) { $founded_file = ""; $dir = scandir($path); foreach ($dir as $file) { $current_path = $path . $file; // echo $current_path . "\n"; if ($fil...

0
Q: Input type html tags are not being removed by PHP Simple HTML DOM Parser

leodeepTo remove input type html tags with PHP Simple HTML DOM Parser, I tried in following way: // Get DOM from URL or file $html=new simple_html_dom(); // Loads the file from URL $html->load_file($sourceurl); // Remove input type text tag foreach ($html->find('input[type="text"]') as $e) { ...

1
Q: Zend framework virtual host

DoItI developed a project in zend framework 1.12 Now I want to deploy it on server. I have a shared hosting. I uploaded all files and folders to public_html folder. When I am opening domain as www.domainname.com it shows all the folders listing, and I need to type as www.domainname.com/public/ then I...

0
Q: Fatal error: Call to undefined method CI_Controller::CI_Controller() in C:\xampp\htdocs\CodeIgniter\application\controllers\hello.php on line 8

user2724401Fatal error: Call to undefined method CI_Controller::CI_Controller() in C:\xampp\htdocs\CodeIgniter\application\controllers\hello.php on line 8 I am new to framework.I got the above error in CodeIgniter while doing a small application.Please help me..My code is given below enter code here ent...

0
Q: In php ,can we generate pdf thumbnails without using Imagemagick or ghostscript

user2485618i like to ask that In php ,can we generate pdf thumbnails from an uploaded pdf file without using Imagemagick or ghostscript instsalled?

-2
Q: How to save image in php mysql database using post method

HarshI want to save image in MySQL database using the post method how can i do that. Thanks

0
Q: PHP module not built when compiling PHP 5.5.5

Josh SantangeloI'm trying to build PHP 5.5.5 as an Apache module (on a Dreamhost VPS). I'm using this configure command: './configure' '--prefix=/home/stimulantvps/php/php5.5.5' '--with-config-file-path=/home/stimulantvps/php/php5.5.5/etc/php5' '--with-config-file-scan-dir=/home/stimulantvps/php/php5.5.5/etc/...

0
Q: xampp error while loading shared libraries

Gary ThomannJust adding this for myself and others future reference. Installed xampp for the first time and was getting this error when trying to run the startup script. error while loading shared libraries: libc.so.6 The work around is to change the kernel version in the /opt/lampp/xampp script ##expor...

0
Q: PHP POST to localhost from server

General_TwyckenhamI am using the RocketShip.it print server to print UPS labels, and am using cURL to send the label information to the print server. The print server runs on localhost port 8080, so the URL that the data is being sent to is http://localhost:8080. When the cURL post is initialized from localhost ...

0
Q: Deprecated: curl_setopt():

user2948950Okay so I am using the PHPPWinty library on a client project for API calls to Pwinty (a photo printing service) And when I make a test call, I receive this error: Deprecated: curl_setopt(): The usage of the @filename API for file uploading is deprecated. Please use the CURLFile class instead in...

0
Q: submit multiple forms with same name with one click Jquery

user2959035Hi i have a forms in loop which are created dymanically , and i need to submit all of them on one click , i am folowing the below code , cam you please suggest me how can i do this thanks <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> ...

0
Q: How to include the external style sheet in dom pdf

KiranI am using Dompdf for the report generation in the php. I am not able to include the external style sheet for the same... Please let me know how to include the external css file..

-2
Q: Is there a way to get search keywords from search engines?

xRobotI am using this code: echo $_SERVER[HTTP_REFERER].'<br>'; echo $_SERVER[QUERY_STRING].'<br>'; but it only show me the domain name and not the keywords.

-1
Q: PHP - Reading data from card

user2621160I have to make a application where card reader will be attached to system and I have to read magnetic card reader data if someone swap card on card reader attached. Magnetic card basically holds user details for registration. So user will give card on reception. receptionist will swap card and s...

 
6:59 AM
0
Q: mysqli::mysqli(): (HY000/2002) localhost not working

Ronald FernandesI am trying to connect to my data base and i get an error when I use 127.0.0.1 instead of localhost. Warning: mysqli::mysqli(): (HY000/2002): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connecte...

-4
Q: Click on right menu slow responce

user2905787my site url My Site click on about us. on click side menu take time to open new page. please suggest me how i can do fast response.

0
Q: Updating variables each submit click without javascript

WhoppaI'm trying to cycle through my photo gallery with next / previous buttons. When the user clicks on a photograph it enlarges it. When they click next it should go to the next photo. When the user clicks on the submit button immediately after selecting the photo it will enlarge the next photo. Howe...

0
Q: Return Character (Newline) inserted at top of file which corrupts the file PHP?

Stevie GI have a function that returns an image from a database, the image is 100% fine in the database however when it is sent to the browser a newline (return) character is inserted in the very beginning and it corrupts the file. The code to return the file is: //if(ob_get_length() > 0) /...

0
Q: how to minus quantity in mysql using php

msalmanWhen I'm running the following query with + sign it is adding the values and showing correct result but when I replace + sign with - sign it is still showing the correct result but showing - sign before the result. Why is it displaying - sign in the result? please help me to fix this issue thank...

0
Q: Profile Picture not getting uploaded

AdityaI am trying to change the user profile picture but it is giving an error like : undefined index newpic Here is the code which i am using to change the profile picture : <?php require_once('connectvars.php'); require_once('appvars.php'); $user_id=$_SESSION['u...

0
Q: i need to match 2 string and adding line break after match string

Nitin Futeroxi need to match 2 string and adding line break after match string for example $string1="<p>he adventures of adolescence had taught Piet Barol that he</p>"; $matching_with_string="he adventures of adolescence had taught Piet Barol that he"; i need string 1 output will be same as string $m...

0
Q: httpd-ssl.conf not working php

Tin Aung LinI have setup my MAMP free version apache to work with https. It successfully loaded a test html file [ https://mydomain.com/test.html ] yeah but when I called my .php files it is not loading at all. I have well configure my main httpd.conf file also. What else do I need to make for php to work o...

0
Q: how to update the php variable using jquery variable

user2934937Hi I am developing a shopping cart.The products ordered by a customer is shown to him. All the products and their details are stored in a session variable. He can change the quantity of each product, if he wants to.When he changes the quantity of a product,corresponding price changes.This I have ...

0
Q: Reload PHP code after Ajax

user2693422i am still learning here folks, so excuse my code if its messy. I have 3 separate pages as follow: AccountView.php---Where the data is shown: <div class="panel-body"> <div id="opentasks"> <!-- view Open tasks --> ...

0
Q: Using Case in SQL

user2894116My sql table is like posts-> id postedby timestamp 1 1 12716826 comments-> id postid comby tstamp condition 1 1 1 12716826 me 2 1 1 12716826 all 1 1 ...

0
Q: PhoneGap - IOS Scroll

ShivaI am developing a basic application on PhoneGap with IOS guide and facing an issue when I try to run the application on Xcode. The data part does not scroll. The meta viewport part has the following code <meta name="viewport" content="width=device-width, initial-scale=1"/> Any help here ple...

0
Q: how to call addtransaction function when buy specific product in opencart

user2746803i make a function to store credit. public function addTransaction($customer_id, $description = '', $amount = '', $order_id = 0) { $customer_info = $this->getCustomer($customer_id); if ($customer_info) { $this->db->query("INSERT INTO " . DB_PREFIX . "customer_transaction ...

0
Q: Laravel Pivot Table and indirect relationship

LF.I'm writing a survey with Laravel 4 and need the ability for users to be able to take the same survey multiple times (and have their answers saved as different instances.) I currently have a pivot table called survey_user that links a user to an invited survey. A potentially positive side effect...

1
Q: How to create a json file using an array in PHP

EGrI have the following php script in which I attempt to write a JSON file with contents of an array: $name = "TEST"; $type = "TEST"; $price = "TEST"; $upload_info = array(); $upload_info = array('name'=>$name,'type'=>$type,'price'=>$price); $temp_array = json_decode(file_get_contents('upload.json...

0
Q: construct sql code to limit form submit

gurungI allow people to submit images and I need to limit their submits to not more than 5 in a day. I just need your help to construct the sql code as rest of things are prepared. I would rather not use solutions based on sessions and cookies. IP based solution is not rock-solid either but for me it i...

0
Q: Conversion failed when converting the varchar value '[field]' to data type int

Terence Eric AleguiojoI'm creating a smart list for better viewing of reports. My problem is when im generating the query below, it fails with this error message "Conversion failed when converting the varchar value 'Field2' to data type int." This my query SELECT * FROM (SELECT *, ROW_NUMBER() OVER (ORDER BY [SECCO...

0
Q: Creating pages from data in table using href

user2959153long time reader first time poster. Using PHP here for a custom page in Wordpress. I am using data from mysql to build a table. I want the data (in this case, city names) to be "a href" and individually create a new page with the data name as URL. So I want to click any city name in the table o...

0
Q: PHP - using public function in one class but not in extended classes

user2959149I have 3 classes class Header { public function _after_save () { } } class Line extends Header { } class Details extends Line { } Line extends header and Details extend line. Header has a function which ‘ll be called many pages in my site & I have made it public. I don’t want ...

0
Q: MySQL - Delete row with last timestamp

sargunsterI'm trying to use this SQL query to delete a row from the table that has the latest date from the rows that have a specific member. This query selects the correct row to delete... SELECT * FROM Swears WHERE Date = ( SELECT MAX( DATE ) FROM Swears WHERE Member = 36 ) ... but this query doesn...

0
Q: Label Username or Email in place password label in wordpress

RajI am getting Username or email label in place of password label suddenly. . . from last 3 days . . . in wp-login.php but when we enter password and login, it is working, but the only change is label name can any one help me to figure this out

0
Q: Escaping characters/strings in php

Elson SolanoHow can I escape this string or shall I say characters '"); " ' (; '") ; to be put on this html element <img src='<?=$this->webroot;?>img/document-note.png' onmouseover="tooltip.pop(this,'<?=$finalNote;?>')" /> The $finalNote variable is equal to '"); " ' (; '") ; this value. I tried doing t...

0
Q: how to show every data from a table and how to run a 2 query in while loop?

mishir.ali<?php session_start(); include("dbconnect.php"); $sql="select * from $_POST[select_catalog_query]"; $rslt=mysql_query($sql); if(!mysql_fetch_array($rslt)) { echo "<script type='text/javascript'>\n"; echo "alert('There is No...

0
Q: Wordpress WooCommerce display product attributes

user1269625I am trying to display my product attributes with this code: $versionvalues = get_the_terms( $product->id, 'pa_version'); foreach ( $versionvalues as $versionvalue ) { echo $versionvalue->name; } but nothing displays. When I print_r $versionvalues I get this message: WP...

0
Q: Show new activity on frontpage in Joomla 1.5

ericpapasitI am currently, updating a joomla site and it is joomla 1.5, owner is not yet willing to migrate it to the newest version of joomla because of the pain of migration. Anyways, does anyone know a module or extension that will show new activity of the site, that is a user upload a new photo on the ...

0
Q: Php Login with access level

MahouGood Afternoon, I am trying to create different levels of access for login session. However, it is unable to work on login session. I have no idea where would issue. Here is login php code: <?php // *** Validate request to login to this site. session_unset(); s...

-2
Q: Json request and response PHP

NatuGoldI want to create a web service which accepting request and response as json format. Please share with me any way to do this. For example: {"username" :"xxxxx" , "password":"12345"} //as a request parameter. And Reponse { Message:"Login Success" } IF any framework available please share wi...

0
Q: Am I in the right place?

DerekI was ask to make a code that can update the attributes(loc1,loc2,loc3) whenever either one of their options/labels were updated, this are 'select' type attributes by the way. SO I copied Api.php from Mage/Catalog/Model/Product/Attribute and transferred it to local. question is, was this the r...

0
Q: PHP Cookie is not set/working

Ali ShanI tried a lot but did not find what is the mistake. kindly tell me in detail/example how this will work for me. I am trying to set cookie for a login form. here are basic steps that I have implements. 1) HTML and CSS code for creating login form. 2) Implement jQuery to check that login form shou...

0
Q: Email validation in PHP won't work properly

become experti will put a validation on email but it is not working, why.. the error is that whe i write example@yah.oo.com it will not sho any error message, why? my code is elseif(!filter_var($email,FILTER_VALIDATE_EMAIL)) { echo "email is not valid"; return false; } i will also use the p...

0
Q: Transition from dynamic site with symfony on AWS to static site with flat CMS

bowoComplete newb here. First question asked. Not a developer. Please bare with me! We have a large site (100k+ pages) that was built with symfony 1.2.8 and currently hosted on AWS. We have no further plan of developing the site or keeping it in it's current form, and want to bring down server costs...

0
Q: Fine-uploader out of the box questions / errors

wfinleyAttempting to run fineuploader right out of the box using the same code that's on the site. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fine Uploader Demo</title> <link href="custom.fineuploader-4.0.3.css" rel="stylesheet"> </head> <body> <div id="fine-uploader"></div> <script sr...

0
Q: How to include the slash at the end of base_url Codeigniter

jonprasetyoSo I have a dynamic link and I wanted to write the dynamic link like this: echo "<a href='".base_url('browse/category/').$all_categories[$j]['id']."'>"; However the link appears to be like this... www.example.com/browse/category2 There is no slash between the category and the dynamic number...

0
Q: Calling a shell script from PHP vs. writing the logic in PHP and only calling the external programs that are needed

cadejscrogginsShould I use one shell_exec() that calls a bash script to do all of the processing, or should I write everything that I can in PHP, and only use shell_exec() for external programs that can't be implemented in PHP? An example: // php script <?php shell_exec("./myScript.sh"); ?> // in myScri...

0
Q: How to install PHP support in eclipse Luna?

DPKI downloaded the latest eclipse version "Luna". But I am not able to find PHP support in the "Install New Software" Can anyone provide me with the software site link for installing php support and symfony/twig plugin for eclipse luna ?

0
Q: case in select statement?

user2894116Is my statement correct $uid=1; $pby=1; $db->query("SELECT CASE WHEN (c.uid!='$uid' and c.uid!='$pby') THEN ( SELECT c.id, c.comment, c.uid,c.msgid, c.tstamp, u.fullname, u.img FROM comments c join users u on c.uid=u.uid where c.msgid='$id' and c.condition!='ga' order by ...

0
Q: Join/Minify javascript in a simple PHP function

faravishThere are a lot of tools for compressing and minifying js. But I do not look for caching tools. I just want to use it only once I hosted my website. What I want is: function compress($jstext) { ... } Which gives me minified result. If Environment == Developer Always use minifier Else if E...

0
Q: need matched 2 string and remain html output string

Nitin Futeroxneed matched 2 string and add tag after matched string, for example; $string1="<p>he adventures <p> <p>of < span >adolescence< /span > had taught Piet < span >Barol< /span > that he</p>"; $matching_with_string="he adventures of adolescence had taught Piet Barol that he"; i need string 1 ou...

-1
Q: Markup for turning URLs and Tags into anchors

ImtiazHow do I turn some links like this http://someaddr.ess/linked [URL NAME] into <a href="http://someaddr.ess/linked">URL NAME</a> I'm looking for solution in PHP or jQuery. *I didn't find a solution particularly for this in stackoverflow. If you already know some answers, please link to it.

0
Q: Select query using PDO and oops

user2959330Am new to PDO statements in PHP. Am having trouble in writing query to implement pdo using oops concepts. The goal I wish to achieve is a reusable select function. public function selectpackage($table) { try { $query = $this->db->prepare("select * from $this->table"); return ...

0
Q: Error of value <br of type java.lang.String cannot converted to JSONObject

MichelleIm having problem with string cannot convert to JSONObject.Anyone could help to solve this problem? Thanks and very appreciate for helping. <?php mysql_connect("localhost","test",""); mysql_select_db("test"); $response = array(); $fullname=$_POST["fullname"]; $result = mysql_...

0
Q: How to fix declaration error while update the php lower version to latest

Dharmaraja.kHi am integrating php old version to php latest versions.but now am getting declaration error. The error is Strict Standards: Declaration of Walker_Comment::end_lvl() should be compatible with Walker::end_lvl(&$output). can you anyone help me.how to fix it. thanks in advance.

0
Q: Delete lines that found in another file

user2568578i have 2 files: text1.txt and text2.txt how can i do this: if found a row in text1.txt that match to a row from text2.txt, delete it (or display the unique)? this is what i have so far: <?php $a = file('text1.txt'); $b = file('text2.txt'); $contents = ...

0
Q: Form don't submit [Yii]

Michel PhelpsI do not understand how a form submission work in yii.Help me please... public function actionHome() { $model = new LoginForm; $form = new CForm('application.views.website.formV', $model) //protected/views/website/formV.php. if($form->submitted('login') && $form->valid...

0
Q: Codeignitor how to create PDF

Ralph SchipperI'm going to create a invoice system, i am preparing for that now. I'm gonna use codeignitor. The thing is that I want to create invoice in pdf so I can send it tru email. What do you guys advice? I was thinking of html to pdf conversion, Or Show the invoice on screen and install a pdf printer (...

0
Q: Get search results from other websites into my website

CodeFishRecently I came accross a website, if you wish you can check this link. In this site, user can search for a product and result is collected from different other sites and shown in an order. However when a user clicks a particular link of a product then user is redirected to that site where the s...

0
Q: PDF download/view wrong decoded

lokileinI've got a problem with showing a PDF-File from my customer-area. A logged in user should be able to show his invoices by clicking on a link, but the problem is, that die file could not be loaded correctly. I've tried it the same way as here, but if I try to download it, it has the right size (so...

0
Q: Different items from eBay finding API and from eBay site

MarekI work with Finding eBay API on Java. I create advanced request with same criteria as the search on site, but on response I get different items. What I should do to get same items?

-4
Q: I can't fin the error about MySQL and PHP

user2959366$sql = mysql_query("SELECT * FROM prestamos LEFT JOIN libros on prestamos.codlibros = libros.cod_libros where id_usuariospr ={$_SESSION['idusuarios']}"); $row = mysql_num_rows($sql); //$datos = mysql_fetch_array($sql); while($datos = mysql_fetch_array($sql)){ $tit = $datos['titulo']; ...

1
Q: The code keeps fatal errors cannot access undeclared static property

Mostafa TalebiI have written a class for codeIgnite which extends a more generic class. I need to change the class __construct's params so to fit into CI. Now, it keeps showing fatal error "Cannot Access Undeclared Static Property. Here is the original construct without changing it: public function __constru...

0
Q: How can i export row data from highchart to excel file and not csv?

user2959402I have chart generated from highcharts using php and MySQL and I want to export the data to excel(xls) file a found many solution but all of them export data to csv file any solution?

0
Q: avoid form submission if duplicate jquery,php,ajax

user2916676I've a form which submits to self and validates records if all records are valid inserts data into database. I'm using ajax to check duplicate record as shown below jquery $(':submit').on('click', function(e) { $('#message_line').text(""); if(!validate_fields_on_submit()) { ...

0
Q: Parse error on double quotes (but there's no error on local server)

Brian SandesSo I have the following function on my code: /* returns a random string */ function randStr($length = 32, $chars = "abcdefghijklmnopqrstuxyvwzABCDEFGHIJKLMNOPQRSTUXYVWZ!@#$%&*()_-+=") { //function randStr($length, $chars) { $validCharNumber = strlen($chars); for ($i = 0; $i < $length; $i...

0
Q: Laravel NotFoundHttpException

user1964443Since Monday I'm Learning laravel php framework and I'm having problem. I'm using this tutorial http://www.codeforest.net/laravel-4-tutorial-validation-frontend/ And I'm having problem with: "Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException" and Class App\controllers\Admin...

0
Q: Laravel 4 DB seed issue

user1995781I am trying to create a database seed file. Here how is it: class UsersSeeder extends DatabaseSeeder { public function run() { $users = [ [ 'email' => 'mymail@mail.com', 'password' => Hash::make('123456'), 'name' => 'Admin' ] ]; ...

0
Q: url rewrite on same page but different url

danishi have followin url rewrite code. RewriteRule category/(.*).html game.php?subcatmain=$1 RewriteRule category/(.)/(.).html game.php?subcatmain=$2 i wants to get main category and subcategories data on game.php. rewrite rule 1 is working with this url www.example.com/project/category/games/ but...

0
Q: data pagination can't change codeigniter

gabrieli'am create link 1 2 selanjutnya but if i click page '2' or 'selanjutnya' data can't change, always 10 data in page 1... why? $config['base_url'] = site_url() . 'transaksi/index/'; $config['total_rows'] = $tot_hal->num_rows(); $config['per_page'] = $limit; $config['uri_segment...

0
Q: how can I filter by date in mysql with the same data entry using php?

user2959418I have this problem on my project this is my code: <?php if (isset($_POST['search'])) { $a = isset($_POST['from'])?$_POST['from']:""; $b = isset($_POST['to'])?$_POST['to']:""; $c = isset($_POST['status'])?$_POST['status']:""; if($c=='Delivered' || $c=='Cancelled'){ $rest = mysql_query("...

 
8:04 AM
-3
Q: preg_replace not working on simplexml_load_files

Sam Ram SanIt was working, bur something happened and all the sudden not working any more. $vehi = simplexml_load_file('http://apps.cbp.gov/bwt/customize_rss.asp?portList=250401&lane=all&action=rss&f=csv'); $sysd = $vehi->channel->item->description; $ret = preg_replace("/(^.*?Commercial\s)/","",$sysd); ...

-5
Q: Page won't load? PHP MySQL

user2955368<?php define('INCLUDE_CHECK',true); require 'core/init.php'; $general->logged_out_protect(); $username = htmlentities($user['username']); // storing the user's username after clearning for any html tags. session_name('GamesFXLogin'); // Starting the session session_set_cookie_params(2*7*24...

0
Q: ajax jquery post example error 503

user2511140When i click run button show this error in chrome console and don't alert anything POST http://mysite/gd/add.php 503 (Service Unavailable) index.php <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> </head> <body > <script> functio...

0
Q: PHP: No Trust For Web Hosting

Michael RichI've been with a few bad Web Hosts, I won't name them, but the experience has left me with a mistrust for the people who run them. I have been developing what I call "not for my personal profit website" it's like a careers website for my local area where I live. It's custom designed and I have pu...

0
Q: Writing multimodule CMS on PHP

Lambrusco.NewbieI want to write CMS for multi-module site. The reasons are 1) I want to learn this process , I'm just a beginner now 2) I want to reuse it in future in my projects When we write simple CMS where one module can reflect all functionality on one page, it's just as simple as writing proper .htacc...

0
Q: How to set execution priority in Symfony2?

Rick SlinkmanIn Symfony I have created a service to determine which database to select based on the given subdomain. This works for every controller I have written until now. The problem occurs now that I have login functionality implemented. Symfony seems to execute the login controller earlier then the se...

2
Q: jQuery enable/disable checkbox based on checkbox selection

Homer_JI have a two series of checkboxes as follows: <input class="oDiv" type="checkbox" value="1" /> <input class="oDiv" type="checkbox" value="2" /> <input disabled="disabled" class="Spec" type="checkbox" value="1" /> <input disabled="disabled" class="Spec" type="checkbox" value="2" /> <input disabl...

0
Q: Docker and connections between containers

kbuI'm trying create connections between docker's containers. One container with php5-fpm and second with nginx. Config for php5-fpm default, just few changes: listen = 9000 listen.allowed_clients = and nginx (/etc/nginx/sites-available/default): server { listen 80 default_server; #lis...

0
Q: Translation of whole web page based on user

user2954757im having a problem. I want the user to choose which language they know and automatically translate the page into the selected language... is it possible?

0
Q: Closing session when user close the browse or after time period

cyclicOn my site user enters after facebook login. So session will be maintained as per facebook session. I want the session to be terminated after user performs browser close or after 30 minutes. Any clue?

0
Q: How to connect PHP with Microsoft Access database

George JamesI am currently faced with a new challenge to develop a site using Microsoft Access as the primary database instead of mysql. I have not used MS Access before and I would like guidiance on how to go about it, I have looked up the w3c website on W3c but the code gives error Warning: odbc_connect()...

0
Q: Single Controller for HTML and JSON results

MouliWhile writing a controller, are there any pitfalls in having a single action respond to multiple response formats? AFAIK, Rails does this with 'respond_to' but couldn't find something similar in PHP. Frameworks that provide facility to create 'REST' controller (e.g. Laravel) do so with focus only...

0
Q: Fetching data using DOMDocument XPath Query in PHP

Gireesh RajuI am trying to fetch data using dom document xpath query and I am facing some problem while fetching it. Here is my html <div class="abc"> <a href="xyz.php">some text</a> <span class="a1">Mexico</span> <span class="a2">Mexico</span> <span class="a3">Mexico</span> </a> </div> This is my html co...

0
Q: PHP, error_reporting(), 6143 triggers also E_DEPRECATED (8192)

user2959445When I use below (simplified) error handling with $notice then it does catch E_DEPRECATED (8192) errors. With $notice, the value is 6143, the bitmask for that is: 0001011111111111 And that does not include the bit for E_DEPRECATED, wich is below. 0010000000000000 I don't understand why this...

0
Q: Number of visitors viewing current page

DemilioI'm not sure what would be the best way to do this, but I need to be able to show the number og guests that are viewing the current page a visitor is viewing. No who but how many. What would be the easiest approach to do something like this? is is possible to do this without a database, but mayb...

0
Q: Stop session from expiring when browser closes

Prakash RamanIt seems to be that my PHP session is expiring/deleting when the browser is closed. Is there a way I can prevent this to happen ? Is it only a PHP setting or is there a browser say in this as well ?

0
Q: Getting null value when using getStringwidth

user2901740Getting 0 value when using getstringwidth,. Can anyone help me what is wrong with my codes? Am I doing it right? $pdf->GetStringWidth($txtLine[$x], $fntStyle, '', $fntSize);

0
Q: Wordpress Create multistep form using json or multcolumn

vishalI want to create multistage form with wordpress.It has many fields around 25 to 30 in each step. so table should be withing json format or normal column structure? Normal column structure will increase the number of columns.so should i go with json formte for example columns like and in jsondata...

0
Q: Browser halt for the site during file download

jogesh_piI have small chunk of code that helps to download a file. But the site not opened/work during file download, but when i open the site on other browser then its working. I don't have any idea what going on with the browser during file download. Here are the headers that i am using to download a zi...

0
Q: how do i change url by .htaccess file in php?

Tania paulproduct url link is http://mysite.com/product-detail.php?proId=UFJETTEzNzI3MjU0NThGNVZBVVRKUDBI please make it with the name of the product like http://mysite.com/Healthy food Also please Add RSS with the icons for all pages and products

0
Q: Basic forum going to created topic

Smitty Johnson the secondI am making a forum as a bit of practice. But i have run into a problem. when i create new question i want the page to go directly to that question. But things like the id are made inside the database. Maybe i need to change the structure of my database? So how can i do this? If you need anymore...

0
Q: Invalid Query- Trouble Updating MySQL Database

Josan IrachetaI've been having the most difficult time trying to update a simple table in a MySQL database. All of my attempts to diagnose this have failed and I keep receiving the same error message: Invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL serv...

0
Q: Create list of items specific to the session user in PHP

mickaelb91I would like to create a list from my database via PHP (I use CodeIgniter). Here's my database : CREATE DATABASE IF NOT EXISTS `flux_demo` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; USE `flux_demo`; CREATE TABLE IF NOT EXISTS `people` ( `people_id` int(11) NOT NULL AUTO_INCREMENT, ...

0
Q: Check whether 1 of the records field is filled in

user2485647I'm wondering if it's possible with mysql to check whether 1 up the 3 records I pull of has the specific field filled in? For example, I have the following records: Record 1: name = 'Richard'; Age = 42; Location = ''; Hobbies = ''; Record 2: name = 'Stacy'; Age = 22; Location = 'Amsterdam'; H...

0
Q: Error while running php code

Refaati'm making a small PHP application that uses some data to check whether it matches the records of the database or not(a prototype of a login process), but it gives me a (extra junk data error) and when commenting the header line to check the error it gives me that fatal error: Fatal error: Maxim...

0
Q: recursive/nested loops with php and mysql

fraidooni have a dynamic mysql table that can have multiple dynamic tiers. To help better understand the situation here is a sample of mysql table: Name Parent Earth - Rock Earth Sand Earth Desert Sand Mountain Rock Water - River Water Ocean...

0
Q: Missing html content when using dom->saveHTML in PHP

user1597438I am getting data from a website using DOM. I've tested my code in my local server and it works perfectly however, when I uploaded it on a server and ran the code, the script I created returned html tags without any content. My code looks something like this: $divs = $dom->getElementsByTagName('...

0
Q: Author profile comments system wordpress

JimmyI have a custom php file to get all the users/authors from the DB in WP, so it's all showing correctly and working BUT, i want to make the comment to work properly, what i did now is: <?php comments_template(); ?> I added the above line in the file, but the issue is that if i comment on one ...

0
Q: Is node.js excessive for non real time web sites/apps?

ShrimpCrackersI just today heard about node.js, being new to web development. After hours of research, I finally found this article that explained clearly to me what node.js did. I'm in the process of creating a reviews website. Content will mostly be stored and retrieved from a database, with an emphasis on ...

0
Q: could not get full string when send to php file from ajax function

vithal04<!--viewservice.php--> On blur i send data to get_service_category.php with the help of ajax function getservice_search. Before sending i alert the variable it give full string as Buff & Gelcoat [Acrylic Nail Enhancement] but when it is posted to get_service_category.php and then echoed back to...

0
Q: Joomla - Caching causes Problems with forms

BiffyMost of the times, when I want to send a form with CKForms, the plugin does not recognize it and I get a blank page. The HTTP Post definitely arrives at the server, I can see that in the Logfiles. When I use another Form Plugin (proforms) the same thing happens. I'm pretty sure that the problem ...

0
Q: List files, folders and subfolders of a directory php

Lukas KasIm try to list files of a specific folder and its subfolders. I write this code, and when access to any folder, the root change but the code doesn't list the files of this subfolder... <? $dir = $_REQUEST['app']; $root = "./".$dir; echo $root; $path = opendir($root); while ...

0
Q: How to send $file value/path to PHP file with jQuery using input field and onClick button?

CyborgI have a form where I use a GET/IMPORT button to get values from other document and into the current form as shown below. Previously I had set fix value: $file = '/user/doc.xml'; inside meta.php so when I pressed the GET/IMPORT button it got the results from the current file. Now I have added <i...

0
Q: Sphinxclient search PHP

user1199899So here I have Sphinx made search. Sphinx has indexed 2 fields: title and data. When user inputs a value I want to display all results sorted by relevance ( i think ) For example: row 1, has title:foo and data='foo bar' row 2, has title='foo bar' and data='foo bar' if user inputs foo i want row...

0
Q: Ajax not working while working with api classes

Umar Khancurrently i am working with google apis and on page i have two dropdowns one for accounts and second for profiles. now what i am trying to achieve is to get the value of accounts drop down without posting the form and update the properties dropdown. for this i am using Ajax but its not working wi...

0
Q: PHPUnit - do not validate array params

pepuchI want to create unit tests for existing application but I don't want to change app code. Many methods in app uses arrays as params. The problem is that arrays may contain different keys every time (method is very long and contains a lot of conditions). For example: /** * $params array() */ fu...

0
Q: Zend Framework 2 Error: Adding one more module

user2959636I'm very new in Zend Framework 2. I'm programming a website based on it. But I'm stuck with one problem and I can't solve it. 1) When I add one more module such as "Shop" into application.config.php, It display Shop View but It don't display Manager View (Their both all work well), if I want do...

0
Q: Wrapper/variable class in a session variable ERROR

EglCodeI am getting this error. Catchable fatal error: Object of class net[domain]\helpdesk\Wlogin could not be converted to string in [path]\helpdesk\login.php on line 24 Here is the code that makes it work to get to this error. the Wlogin class class Wlogin { public $id; public $un; ...

0
Q: Error when using assetic:dump in symfony2

davidI have an error like this when I tried to typing this command php app/console assetic:dump [Assetic\Exception\FilterException] An error occurred while running: '/usr/local/bin/node' '/tmp/assetic_lesswt3ok6' ...

0
Q: Updating session variable based on changes made by jquery

user2934937Hi I am developing a shopping cart.The products ordered by a customer is shown to him. All the products and their details are stored in a session variable. He can change the quantity of each product, if he wants to.When he changes the quantity of a product,corresponding price changes.This I have ...

0
Q: Class is not inheriting DB correctly

Edd ClarkSo I have a DB class that looks like this class db{ private $hostname = 'localhost'; private $username = 'root'; private $password = 'root'; private $con; public function db(){ try { $dbh = new PDO("mysql:host=$this->hostname;dbname=myDB", $this->username, $this->password); }catch(PDOException...

0
Q: FPDF in Codeigniter give Network Error when it download

SermaHow to Generate FPDF file in codeigniter. I have tried below code it gives error. Controller function public function pdf() { // Generate PDF by saying hello to the world $this->load->library('pdf'); // Load library $this->pdf->fontpath = 'font/'; // Specify font folder $this->pdf-

1
Q: Why are some values ​​in my array undefined

XtremeI have a for loop in php that adds a number of checkboxes on my page that look like this <input type="checkbox" name="checkbox[]"> I want to use javascript to check which is checked and add value in an Array var cboxes = document.getElementsByName('checkbox[]'); var len = cboxes.lengt...

-4
Q: Get string having special character in an array in php

Mudit KumarI want to get all the names in an array that have special character like (@ , #) . There will be only two special character (@ , # ). Example $msg = "@john and #tom can you fetch the name that have @ and # character in an array"; The Output should be like $name = array('john','tom'); ...

0
Q: Why some var in $_SESSION are empty on my selenium running tests?

erwikSome of my selenium rc tests in php fail because of missing var in the session If I do the test by myself, everything is ok but early each time selenium rc launch the browser and do exactly the same thing, an object in session is NULLand the test fail , WHY????? Thanks

0
Q: PDO FullText Search - MySQL PHP

calamansi_grenadeI am having a problem in writing the query for a fulltext search. Here is my code: SELECT * FROM fruits WHERE MATCH (color) AGAINST (:term IN BOOLEAN MODE) I am getting no result when executing that query, but when I hardcoded the term like this, SELECT * FROM fruits WHERE MATCH (color) AGAIN...

-1
Q: Mysql query error -unknown coloum

aligarianmy query string is $chk_cookie="SELECT * FROM cookie_data_mst WHERE uniqid_client=5279f0addc835 AND cookie_data=3"; $chk_query=mysql_query($chk_cookie) or die(mysql_error()); this give the error unknown column. if i put ' in value '5279f0addc835' it gives check manual for syntax error. i...

0
Q: How to run UNION query on MySQL multiple connections

DeepakI want to run a query to UNION data from two tables but from different MySQL connections using PHP (Codeigniter framework) . Note that two tables have same schema but different data. I heard about using Federated Tables for this purpose but not sure how to proceed. Any help will be appreciated....

0
Q: PHP-AJAX: How to pass URL variable through Ajax

user2959620I have set an Ajax call for Pagination. I need to pass one more vaiable which is stored in the URL URL http://thisite.com/pagetitl/?id=12 **// where 'id=' is a variable I want to pass.** Ajax Call function page(page) { var dataString = '&page=' + page; // pagination with ajax pag.aj...

0
Q: content-security-policy allows ginger extension to load content

Tzook Bar Noywhen I install this ginger extension on chrome: https://chrome.google.com/webstore/detail/spell-and-grammar-checker/kdfieneakcjfaiglcfcgkidlkmlijjnh?utm_source=chrome-ntp-icon and I view my page: http://start.funmoods.com/results.php?q=hotel.com&a=undefined&category=web&start=1&fc=br as you can...

0
Q: how to populate dropdown list values from mysql and show it inside the td of html table

arokiaI am trying to populate dropdown list values from mysql and show it inside the td of html table,i tried with below code but it not populating values from mysql can any help me how to do that. <table id="CPH_GridView1" style="width:1452px"> <thead > <tr> <th style=" width:102px">Clien ID </th> <...

0
Q: Loop through and display results in PHP from SELECT WHERE in SQL

user2959719I have right now only 1 table, which contains people's names and addresses, and I wish to display data from the records where their country is GB. I currently have the following code which I'm stumped doesn't work: <?php $conn = mysql_connect('localhost', 'root', ''); mysql_select_db('amazondb'...

0
Q: Mysql Procedure goto infinite loop

Haresh KumarI have written a simple procedure this contains a loop which is executed infinite times Please Help me out of this problem..... below is my sample procedure code. begin DECLARE genid INT; DECLARE done INT DEFAULT FALSE; DECLARE curgenid cursor FOR select gen_id from item_gen_det where item_id=it...

0
Q: What is the meaning, purpose of php operator &=

Panagiotis George RaditsasHello I'm new in php and I came across this operator in some source code, I assume it's not the same as assign by reference =& operator? Or Am I mistaken? I tryed searching it on google but all results are about =&. What does &= operator do exactly? or provide a reference please. Thank you.

0
Q: CLI has stopped working wamp

Bong ThornI have an error message that CLI has stopped working when I start wamp server. Anyone please help! Please see snapshot bellow

0
Q: Is it possible to cancel function override in parent class and use function from top level parent

Anatoliy  Gusarovclass TopParent { protected function foo() { $this->bar(); } private function bar() { echo 'Bar'; } } class MidParent extends TopParent { protected function foo() { $this->midMethod(); parent::foo(); } public function midMe...

0
Q: Adding pagination in WordPress Football Pool

user1511766I'm using a wordpress plugin to make a football pool. A really nice plugin but there is nog pagination in the ranking. So when you have over 1000 participants you will get a very long list. The plugin author provided a class wich you can use to create pagination. My php knowledge is unfortunatel...

0
Q: Drop down list with scroll bar, including php

Sem AbrahamI'm making a drop down menu where you can select which customer you want to place a specific product or user under. However this list may become several hundred names long, so we need a scroll in it. Here's the code: <select name="new_customer_id" size="2" style="height:20px;">

0
Q: How to update MySQL column = columt-number

David LencesI have this mysql columns: points_on | points_off 0 1.36 And this SQL command: UPDATE table SET points_off = points_off-{$cash} WHERE ... $cash = "1.36" If I run this, the table update wrong like this: points_on | points_off 1.36 0.0000000143051 How to update this ...

0
Q: Advise for implementing a php image proxy

Joe HuangI need to implement a proxy in PHP for loading image files, I found something like this <?php header('Content-Type: image/png'); if (isset($_POST['remote_url'])) { echo file_get_contents($_POST['remote_url']); } ?> (1) Is there any better way to do this? or enhance this? (i...

0
Q: ZEND get email body

bvlBelow is a function (it's from Magento) and the simple thing is... I want to get the email in a string. But somehow things like: $mailer->getBodyText()->getRawContent() and $mail->getBodyHtml(); don't work... At the bottom of this piece of code you'll find: $SOMETHING_HERE that is where I would ...

0
Q: Cakephp removing cake from url

MarcI have the following site My domain As you can see if you click the link you will get an error!. Now if you instead add cake/users/login to the end of the url you will go to the correct site. Now my question is how do i remove cake from the url and how do set a default controller ? (so that if...

0
Q: How to create joomla class like JFactory

Karolis NarkevičiusI'm coding a website on joomla 2.5 and I need a class that I can access from anywhere, something like joomla's JFactory JApplication, mabie someone knows how to create such a thing and could lead me on to the road of creating it, cause I have been googling for two days now and nothing. Please hel...

-1
Q: Different api integrations in PHP (Perfect Money, OK Pay, EGO Pay, Money Booker for testing.)

Hunza AliI want to integrate some APIs to my website so that the visitors can make the payments to me. The APIs are: Perfect Money Ego Pay Ok Pay Money Booker Can I make the testing accounts with each Payment Processor and test these APIs on my website? Any idea how to achieve this? Thanks.

0
Q: Secure input field against mySQL injection

user2022298I have made an edit form for my users, now when I update it needs to be secure against MySQL injection. Right now I have this query $sqledit = mysql_query("UPDATE **** SET titel = '$title', content = '$content' WHERE `ID` = ".mysql_real_escape_string($_POST['ID']),mysql_real_escape_string($_POS...

0
Q: How can we return an associative array which uses php classes with PDO?

Krishnadas PC public function displayMember() { $statement=$this->db->query("SELECT user_name,user_email,user_gender,date_of_join,user_firstname FROM tbl_users"); while($row=$stmt->fetch(PDO::FETCH_ASSOC)) This is from a class file. How we can return the associative array in the page w...

0
Q: Session variable loses value after redirection

user2959649I have three files. File 1: index.php which redirects to second.php and sends id=$var to second.php. code: window.open('second.php?id=$var','name','width=1000,height=700,scrollbars=yes'); File 2: second.php In this file i have received $var, when i print it in logs it displays value of...

0
Q: global variable in laravel

Frozen SmileIn PHP, I used to define some variables in my header.php and use them in all my pages. How can I have something like above variable in Laravel. I am not talking about View::share('xx', 'xx' ); assume I want to have a variable which holds a number in it. and I need this number inside all my cont...

0
Q: Ajax return no result set when special characters exists in database

Patrick VogtWhen i tried to get data from a UTF-8 encoded database with ajax in json-format and the data contains special characters like Ä,Ö,Ü,ä,ö,ü,... then the result set is empty! $('.club-details').click(function() { var element = $(this); var data = { gid: $(this).parent().parent().par...

0
Q: wordpress Pagination In my own page on

user2767098I wrote in the root directory of a folder "360app"...Get all the articles on display here this is my code, But shows all pages...I want to have the effect of [1][2]..[5][6][next] the web www.qiqusp.com/360app the paged is by ?paged=id $paged =!empty( $_GET['paged'] ) && ( $paged = ab...

0
Q: Access Control List (ACL) for specific object

Bastien DI would like to use a ACL system with LARAVEL framework. I understand that I can control the rights to resources such as the entity "Comment". My "Moderator" role could "delete", "edit" any comment. However, how can I manage the rights for a specific "comment" ? which a user is the owner? I see...

0
Q: PHP class Heritage and Iteration on members when using private visibility

NovaeI just wanted to implement generic methods on all my classes ( wich represents data from a database ). I wasn't able to find a reason why this isn't working, any ideas ? (on php 5.3.1) class ActiveRecord { public function getAttr($attr_name) { foreach( $this as $key =

-1
Q: PHP - Comparing two multidimensional arrays with different key

user2959800Say I have two multidimensional array generated from .csv file, for example : Array named $Transaksi Array ( [1] => Array ( [0] => 202636 [1] => 15477 [2] => JSMI [3] => 2010030024277 ) [2] => Array ( [0] => 202637 [1] => 15477 ...

0
Q: Nginx and/or php5-fpm remembers symlinked root directory

Rob GordijnMy nginx site root points to a symlink. If I alter the symlink (aka deploy a new version of the website) the old version of the php script keeps showing up. That smells like cache, or a bug. First it looked like Nginx was caching the symlinked dir, but reloading/restarting/killing and starting n...

0
Q: Facebook login alters pe user session

Valentin DraganI have been successfully using Facebook connect on my website for a long time. Last night, without me doing any changes to my website, users couldn't login anymore - no matter of the loggin method used. I successfully isolated the point where $_SESSION['user'] becomes 0 (if not logged in on FB an...

0
Q: Wordpress Ordering (boolean?)

user2959832Hi I would like to order custom fields in wordpress. I've got it displaying the single project. But can't figure out how I can get it to display in order. I've created a field called project_order which works correctly on another page. But i'm not used to this sort of php with order by. This is...

0
Q: Getting word list from html page using php

stexasI found no good answers for parsing words from text thus I am asking this question. Actually, I have a html page and I need to extract words from it. I already used strip_tags function to remove any tags, and preg_replace('/&[a-z0-9#]{2,4};/i', '', $text) to remove spacialhtmlchars that could be ...

0
Q: php DateTime diff consider only Y-m-d format

Paolo RossiIn mysql db I've a timestamp field (dateexp) defined in my t1 table. with a query I consider only format Y-m-d of timestamp to find records. Use curdate() instead of now() SELECT * FROM t1 WHERE dateexp < currdate() I would like to do the same thing with php using DateTime class for find a nu...

0
Q: Change woo commerce product page

user2959865I'm not expert in developing but I would like to make some changes to the woo commerce product page. I would it to: -show variant and prices at the end of the page, after a long description. -don't show additional information tab -don't show featured image on the left but at the center. Is this...

0
Q: Performance issues in symfony 1.4

coderI have a web application that is built on symfony 1.4 framework. I'm making nearly 10 DB calls per http request. I found that to process the request, it takes nearly 600-800ms on the server itself. When I put log statements to track the time spent in making DB calls, I found that it is less than ...

0
Q: multidinensional array sorting in PHP

NoorHow can I sort this array with PHP. I tried different solutions but none of them working for this scenario. I tried usort and array_multisort. Array ( [0] => Array ( [0] => Array ( [sorder] => 1383632966 ...

0
Q: How to format an int int format U.S. in European format

mortipedI get an int format U.S. $UsInt = "67,450"; I need to convert in European format. $EuInt = "67450"; I can not use str_replace () to replace the virgule. Do not use str_replace () is a mandatory deposit. Would exist a PHP function to do this? Or someone has already had the problem and was a...

0
Q: HTTP Parameter Pollution

erandiIn a web site we are developing, after doing a security check, we've identified security issues. This report contains HTTP Parameter Pollution vulnerabilities too. In web i could find what is HPP? How it can inject & etc; Yet I couldn't find how to avoid this kind of issues. The server language ...

0
Q: Using Ajax on Magento prompt an error Control Access Origin

Wesley LachenalAs my follow up question on this link Location DOC TYPE and HTML tags in Magento I've been trying to use ajax on magento but unfortunately an error prompts saying XMLHttpRequest cannot load http://mysite.com/site/app/design/frontend/base/default/template/jscriptz/html/popup_product.php. Origi...

0
Q: Cannot get two SPAN elements in same line, no matter what

MagnanimityI have a table header where I have somewriting in the middle, and a previous and next button that I would like floated left and right. I have placed these in span elements. The Previous button floated left works fine, but the Next button floated right keeps going into the next row and I cannot ge...

0
Q: Delete the file which has spaces in PHP

www.sapnaedu.inI am not sure what the issue is, I am trying to delete a file in PHP. The file has spaces in the filename. So here, is what I am doing : $filename = "'" . "files/".$results["filename"] . "'"; if (file_exists($filename)) { $success = unlink($filename); } else { $echo "Could not Delete ...

0
Q: Different records on different pages

MithileshGiven is my php code to get 1 record per page.However I get same info even if I pass different action value in url? why is that so ? <?php if(!isset($_GET['action'])) $_GET['action'] = 'view'; switch($_GET['action']){ case 'prev': $q = "SELECT * FROM t...

0
Q: CI and HMVC structure

DimasI’ve to make a webapp with public and administrator parts and we are two different developer teams. I’ve searched the best way to do that and I found HMVC. I accomplished to install the codeigniter-modular-extensions-hmvc from wiredesignz and it’s working, but I think I haven’t understood the phi...

0
Q: Calling a method from object already instantiated

user1949366I need a simple debug class so I can add to it throughout the running of the app and output it and see a debug trail. class debug { public function __construct(){ $this->debug = ''; } public function set($addition) { $this->debug .= $addition .'<br\/>'; } pu...

0
Q: Writing global languages to MySQL using PDO

monamonaI am using PHP and MySQL innodb (PDO) below is structure of table. CREATE TABLE `articles` ( `id` int(11) NOT NULL, `feed_id` mediumint(8) unsigned NOT NULL, `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `link` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `description` text COLL...

0
Q: Programmatically duplicate a table row in a RTF file

Scott NettletonI need to duplicate a table row in a RTF file. I am struggling to understand the definition of what I need to copy and duplicate. My process at the moment is as follows. 1) I search in the RTF data for a string that I know is in a table cell. In this case <<[QL] 2) This row has two cell...

0
Q: Load Data Local infile - Most efficient way / quickest?

user2231688I was wondering which would be the most efficient way to use the Load Data Local infile. I have a number of php scripts that use this function, each of which puts date from each of my suppliers into my database. The files are located on my ftp server, which is in a seperate domain from where m...

0
Q: PHP Fix session_register() deprecated issue

Teris LOk so i have the below code and since the code is not mine i need to be certain that i did the changes right so that i know i'm ok on that part and not doing something else wrong. I keep getting wrong passwords so could someone clarify that the session_register -> $_SESSION is done right? Code ...

0
Q: Unable to pass value from from a row to another page in AJAX

SuralalI am having a table with 7 columns(Complaintid id,name,school name etc...) and also have button.when i click the button i need to pass the complaintid of that row to another page.the problem is that value is not passing in the ajax page pls help me. <html> <body> ?> <form action="" name="frmco...

0
Q: can not successfully set the cron. Laravel4

s0hnoIt's not long and I started using Laravel4, but it does not allow you to set the cron. Please tell us, such as site of reference something. I need your help.

0
Q: Send javascript array with strings to php action

nielsvI want to send an array with image strings to my php action. This is what I do so far: $('#savepdf').click(function() { var imagesarray = new Array(); var count = 4; var quizid = <?php echo json_encode($quizid); ?>; for (var i=0; i<count; i++) { var chart = Highcharts...

0
Q: Merge duplicate results in an array using php

Gireesh RajuI am having an array like this $a = Array ( [0] => Array ( [0] => Peter, [1] => Lois, [2] => Megan ), [1] => Array ( [0] => Peter, [1] => Lois, [2] => Megan ), [2] => Array ( [0] => Peter, [1] => Lois, ...

-2
Q: get php variable value in javascript function

user2959961i have a string variable $name in post.php file and I want to get $name value in javascript function in other page Is there any one know how to do this ?

-1
Q: How to play to 2 different videos at once

DeltaI am a PHP Developer. I want to implement a functionality on my website that: I have 2 videos and want to play these videos at once with a single play button and these videos will be stop with a single stop button. I don't know how to do it. whether it should be done with code or some plugin.

0
Q: IPN PayPal doesn't call my IPNListener

MattCfrom few months the PayPal IPN service calls my IPNListener file with a big delay. I'm using the PayPal Adaptive Payments SDK (sandbox) and everythings is set well, in fact in the first period all the tasks were succesfully executed, from the first call to IPN to the execution of the IPNListener....

0
Q: How to get all attachmenet of mails with EWS PHP

Parvez1487I am using 'jamesiarmes/php-ews' api to get all inbox folder/sub folder emails attachement. Please let me know , how to get mail list paging wise, because we are getting 'you have exceeded the maximum number of objects that can be returned for the find operation. Use paging to reduce the result ...

0
Q: get filterable attributes of current product

Roman ffI need to generate a table of filterable attributes with values of current product, something like color - 3 size - 5 x - y ... In my view.phtml Problem is: my shop will have many attribute sets, and attributes can change. So I can't get attributes value by name. I get an attribute sets code o...

0
Q: How tp have mulptiple search keys using a file name

user107020I have a database wherein the files are named abcd100.00b, abcd101.00b,..... i need a code where wen the user enters abcd separate then 100 to 110 . all the files with the name abcd and in the range 100 to 110 should get displayed now the following code can display pnly the first four characters ...

0
Q: How can one display different records on different pages?

MithileshFor eg I have 5 records of same user. What is the best way I can sort and display each one of them on a different page using next and previous links.For eg on clicking previous i must get previous record. Then i again click previous i must get previous to that record and so on.

0
Q: Displaying a loading bar and message whilst query is running?

Sean LimpensNow that my woes with running the big .sql file within PHP (Using a PHP session variable within a MySQL file run in PHP) are dealt with I want to display a loading bar (.gif) that I've made and a message displaying that the user data is being uploaded into the database because I don't want the us...

0
Q: PHP Long Polling Issues

Asim SiddiquiI have a web application which serves as the Admin Panel. It has a live chat option which connects with writers(employees) on the other end. The web application uses the following PHP code to check for online writers. $q = 0; $lasttime = isset($_POST['timestamp']) ? $_POST['timestamp'] : 0; whil...

0
Q: Concatenation of strings doesn't give expected result

babbaggeiiI'm trying to see if there's a "category" value in the URL, take that value and add it to hrefs, but what I get is, say, "4" added to the href, rather than "&category=4", which is what I'm after. Can anyone see what I'm doing wrong? // if so, add it to the query if ($...

0
Q: Cookie path is not set correctly

Azerhinni Mull NorI'm trying to set a cookie using: $expire = time() + 60 * 30; setcookie("beta", $code, $expire, '/', '.domain.com'); However, the path is set to '/netbeans/MVC/claim/goToShortcode/' instead of '/' as seen in the cookie dump below. beta=qqqq; expires=Wed, 06 Nov 2013 10:55:01 GMT; path=/netbea...

0
Q: Break the string up to certain level

mujasbelow is my sample string. $str = "Trainee web developer at Arthur C Clerk (August 2008 – February 2009).Projects Vehicle Information System Vehicle information store for entire vehicles used in whole division in the Institute to maintain the vehicle information, Driver profile, fuel consumption...

1
Q: Passing two values to the nested restful controller

Sagiruddin MondalIn my nested restful controller my show method should receives two values like this public function show($postId, $commentsId) { // code } the generated url should be like this http://localhost/posts/1/comments/1 Now my query is: I need to send those twu value through my route call I am...

0
Q: Using repeater to display Thumbnail images that link to full images

user2919416i'm using the Advanced Custom Fields plugin with the repeater field to display images in a masonry gallery, I want to be able to have the images in the gallery be displayed as thumbnails then when clicked they open into a lightbox, I have it all working other than the masonry images aren't showin...

0
Q: Parse JSON from PHP by Javascript and Push the values into array dynamically

AB Åttìtúðê Þêrfëçti got an array : var sampleitems =[]; i get json data from url which returns values WinJS.xhr({ type: "GET", url: "http://some_webpage.php", }).then(function (success) { // DYNAMICALLY PUSH CONTENTS TO ARRAY 'sampleitems' }, function (error) { document.get...

0
Q: Show html/php code in one sentence

user2022298I want to show this sentence: ?> <h2>Date <?php echo "$day"."/"."$month"."/"."$year"."<br>"; ?></h2> <?php I have tried: echo '<h2>Date '$day'.'/'.'$month'.'/'.'$year'.'<br>' </h2>'; echo '<h2>Date <?php echo \"$day/\".\"/\".\"$month\".\"/\".\"$year\".\"<br>\"; ?></h2>'; Without succes. Th...

1
Q: Should 3rd party bundles in Symfony2 be wrapped and How?

SongoIf I add a 3rd party bundle from Knp bundles for example, should I wrap it first or should I use it directly in my code? If I decide to wrap it, where do I put the wrapping code? In a separate new bundle? In my application bundle?

0
Q: moving attachments to google DOCs using PHP script

NaeemI have a requriemnt to read email from gmail ,save emails and attachments to google docs.Finally mark that email as read email. Till now I have connected to gmail and read email and find attachemts.Now how can I move email and attachements to google doc? /* connect to gmail */ $hostname = '{i...

0
Q: i have an iframe in which there is a form which needs to submitted in the same page

rahul In the firstpage i have the header. what i need is to anchor it to another page in the beginning. But its not working. Here is my code. pageone: header("location:itc-convention-confirm-form.php?REG_Id=$REG_Id{#anchor}"); pagetwo: But the bookmark is not according to th...

0
Q: How to Enable UTF-8 in PHP while displaying browser

monamonaI've enabled UT8 in the MySQL config, PHP config and Apache config. I can view the UT8 characters correctly in phpMyAdmin. The data is stored correctly in the MySQL db. However, when I call the data on a PHP page, PHP displays a? instead of the characters from the db. I've enabled UTf8 in the ...

0
Q: Instagram API pulling in 50 images which are public only?

green_arrowI am currently using PHP to pull in the latest images under a particular hashtag using the Instagram API. At first I thought it was ignoring the counter parameter but then I discovered that this feed pulls in both public and private images but obviously it hides the private images. Personally I w...

0
Q: how can i fatch data from database and fill <input type=“text”> when page opens

Nangu Hacii have a site that displays massages from users stored in a database. what i want is when i click the reply link beside each message a new page must load and the details from each message must be filled in the and how to i get the specific data for a particulate row after i loop through. <?php...

-1
Q: Function session_register() is deprecated

Billeh Sarkozyi really need help i use the below script as my check login and login : but i get the below error: Deprecated: Function session_register() is deprecated in /home/content/80/11429180/html/admin/logs/checklogin.php on line 35 Deprecated: Function session_register() is deprecated in /home/conten...

0
Q: Map localhost port 3306 to remote mysql server

user1762270I want that a request to localhost:3306 maps to a remote mysql server The real situation is: One local environment and two remote environments (Ubuntu for all) the local environment is for developing, one of the remote environments is for testing and the left one is for production, so I want t...

0
Q: Is it possible to extract RDFa from html page using EasyRdf?

lorussianI'm trying to extract RDFa data from an html page using this library: http://www.easyrdf.org/ But it doesn't seem to work. $work = new EasyRdf_Graph("http://example.com/"); $work->load(); echo $work; $title = $work->primaryTopic(); echo "Title: ".$title->get('dc:title')."\n";

0
Q: relative paths with mod_rewrite

Yasen SlavovI'm trying to run a small app locally (xampp). I'm running it from localhost/csf.local/ and I have the following in the .htaccess in that root dir: Options +FollowSymLinks IndexIgnore */* # Turn on the RewriteEngine RewriteEngine On # Rules RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQU...

0
Q: Sending mails twice to SOME recipients with swiftmailer

user2633128I'm developing an application that gets mail addresses from a database and then send an email to those addresses. In my script first I get the recipients, then save the messages into disk and after a while using CRON I send them. The number of messages in the spool directory matches the number of...

0
Q: php get_file_contents of json page unstring

BeardyI have a content.php file that uses the below $jsonurl = "http://domain.com/api/styles"; $json = file_get_contents($jsonurl,0,null,null); //$json_output = json_decode($json); print_r($json); js.js $.ajax({ url: 'content.php', dataType: 'json', success: function (data) { co...

0
Q: Updating via PDO and automatic function

MGEI'm preparing my own function due to hurry the updates automatically. I have that code: $allowededitablefields = array('mail'); $userid = $_GET['uid']; $query = 'UPDATE users SET '; foreach ($_POST as $key => $value) { if(!in_array($key,$allowededitablefields)) { unset($_POST[$key]); ...

0
Q: PHP/MySQL update, ignore empty/blank values

chrickisI'm quite new to PHP/MySQL and need help with an update form. I get the values from a form and in the update query i only want to update the fields that are not empty where id = $id. Example; $a = $_POST['a']; $b = $_POST['b']; $c = $_POST['c']; $1 = $_POST['number1']; $2 = $_POST['number2'...

0
Q: how to get value before and behind decimal point in string

user2543182My PHP file receives (via $_POST) strings (with constant prefix) like: (constant prefix in this example = 'astring'; figure before and after the decimal point can vary in size) astring1.1 astring1.2 .. astring23.2 astring23.6 How to get the value behind the decimal point? I know how to extra...

0
Q: PHP - rand() - random value from array of names

user2143475Task description is to use functions: count(), rand(), and strtoupper() to get random name printed out of my PHP array in all caps. Code: http://ideone.com/nwjyoa <?php // Create an array and push on the names $friends=array("Mike", "Ondrej", "Honza", "Danca", "Misa", "Verca"); array_push($fri...

0
Q: php table text align center

Shivesh JaiswalI want to align text in center under table but i dnt know how to do this Here is my code echo "<td>" . $row['Firstname'] ." ". $row['Lastname'] ."</td>"; echo "<td>" . $row['Marks'] . "</td>"; echo "<td>" . $row['percent'] . "</td>"; echo "<td>" . $row['Status'] . "</td>"; Kindly help m...

-1
Q: Getting errors on php 5.4.19

SonuI am using adaptiveaccount paypal api for validating paypal email id and getting "Strict Standards: Redefining already defined constructor for class XML_Parser" error on php 5.4.19 but it works perfectly on php 5.3.3. Any idea?

0
Q: PHP extension soap not loaded - Typo3

user2960187I have an error in my Typo3 Installation Tool: PHP extension soap not loaded I checked the phpinfo file but is says, that soap client and server are enabled. Is there a difference between "enabled" and "loaded"? How can I check whether the installation exists? Or do I have to ask my host? Tha...

0
Q: Displaying XML files with XSL-files in PHP

BTBHow to display all XML files in one folder? These files will be placed in a subfolder called "files" with the same structure and name, chapter-1.xml, chapter-2.xml e.g. I'm thinking a PHP loop to display the content of each file, but the files are styled with both XSL-document and a CSS-document...

0
Q: Modifying and sending an OFT in php

Programattreally looking for some advice I have an OFT file (outlook template file) that is used to send out notifications. I want to be able to modify it and send it using php. Can anyone offer some advice/solutions they would use to do this? Thanks

0
Q: Set PHP error_handler on server side

ArtWe are trying to secure a large application (including some third party applications) and we want to disable anything that would allow programmers or potential hackers to hide errors (that is because we are using some monitoring scripts to check the logs in real time and identify any security bre...

0
Q: Check if exist before insert/update

PHPnoobI want to check if somethign exist in the database before I update/insert. This is a two question in one but similar. This is how I do it. $p->main .= '<td><input type="text" name="value" id="value" size="12" maxlength="50" />'; $statement = $conn->prepare("SELECT year, month, name tabl...

0
Q: .htaccess url friendly in php

pc_ocI want to turn a url in the url friendly. my url: http://www.builtbydoctors.com/qrcode/index.php?id=93 and i want this url friendly: http://www.builtbydoctors.com/qrcode/**title**/93 the title changes depending on the id. my problem is in the htaccess file in the creation of the regular...

0
Q: Ajax PHP: Variable from page url

user2959620With the following AJAX call I set pagination for a webpage. It works. In my PHP file already have: $page= $_POST[page]; AJAX call: function pg2(page) { pag.ajax({ type: "POST", url: "file.php", data: { page: page }, success: function(ccc) { pa...

0
Q: NetBeans git subfolders as branch

Ing. Michal HudakI have project in NetBeans as this: I created GIT repository of test project as master branch. Question: How can I have each subfolder as branch of project test ? Note: I am using GIT in NetBeans and http://bitbucket.org as remote GIT. Thank you in advance.

0
Q: Edit locally and then upload a file by browser

user2960254I received a strange request from a client: they want the WebApp I'm developing to be able to open a Excel file (with Excel, not directly in the browser), edit it and then re-save it DIRECTLY upon the FTP... is that even possible? How could I do that? Thank you

0
Q: Is it safe to render unescaped user input if no other user would ever see it?

Emanuil RusevThere is a web page that has a <textarea>. You can type any text into that <textarea> and if you hit submit whatever you have typed get rendered on the screen. If you type <script>alert('hello')</script> and hit submit you would get that alert. The page doesn't store the typed text so your input...

0
Q: Mysql error - near '1' at line 1

ReverterWhen i update my record, i have this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc ='testfdsf', prezzo = 'test', img = 'upload/immagine_non_disponibile.jpg' W' at line 1 This is my query for up...

0
Q: PHP append variable to the END of a specific line in file

Marijn van GoolSo I got the following function: function searchWord($fileName, $str) { $addthis = “string”; $lines = file($fileName); foreach ($lines as $lineNumber => $line) { if (strpos($line, $str) !== false) { $test[$lineNumber] = $test[$lineNumber].$addthis ...

0
Q: How can I get this **2013-11-06T11:47:58.990Z** date format in PHP

user2960268How can I get this 2013-11-06T11:47:58.990Z date format in PHP. In JavaScript it possible with functions console.log(new Date().toJson())

0
Q: Cannot run shell_exec in cron'd PHP, $PATH is not visible as well

IonI'm trying to implement a testing integration solution in our environment. The simple workflow is like this: I have a CentOS EC2 instance in AWS where there is a MySQL DB with rows representing tests to be run (each one has a unique id, absolute file path, started time, completed time, etc). Thes...

0
Q: PHPMailer server Message

Smith DwayneI'm using php plugin for PHPMailer. Its version is PHPMailer_5.2.4. I have tested the sample code of PhpMailer site. <?php require_once('PHPMailer_5.2.4/class.phpmailer.php'); //include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded $mail ...

1
Q: PDO: Show table keys fails to bindparam properly

DejvI want to use this method to get array of keys (primary, foreign, ...) from specified table: public function getTableKeys($table){ //OBTAIN TABLE KEYS try { $conn = $this->db->_pdo; $conn->beginTransaction(); $query = $this->db->_pdo->prepare('SHOW KEYS FROM ...

0
Q: Login form, validating hashed+salt password

kocourPBIn my registration.php form I'm hashing passwords with this pastebin But when I try to validate correct password in login.php form pastebin2 it will evaluate the password as incorrect. Have you got any idea what is wrong in login validating password?

0
Q: Printing Google books api information using PHP

Alien2828I want to search book information by its isbn number and retrieve the information and display/store the result of the information. For example, I used this following url https://www.googleapis.com/books/v1/volumes?q=isbn:9789381141977 { "kind": "books#volumes", "totalItems": 1, "items": [ ...

0
Q: $_SESSION not working correctly

AnkurI have made a simple login script here. There are 3 files, 1 is functions.php(Containing the login function), then there is userdashboard.php, which contains some user functions and then another file users.php which processes the login. The problem is, whenever I login, the login in successful b...

0
Q: Twitter Api How to wrap the links in a post in an <a> tag

fr0s1yjackI am currently using Zend framework to display 5 tweets inside my twitter form, although I need to be able to display any links inside the tweet as hyper links, currently they are just rendered as plain text. I have managed to wrap any user tags inside hyper links when the post is a re-tweet but...

0
Q: Create a request Symfony2 Doctrine

antI'm using PgSQL and I'd like to execute this request on Symfony2 select au from (SELECT au, row_number() over (partition by au.activity_id order by au.date desc) as seqnum FROM activityupdate au INNER JOIN activity ac ON au.activity_id = ac.id INNER JOIN ...

0
Q: Set upload max file size - isp config

panthroI only have access to ISP Config. In Custom php.ini settings I have: post_max_size = 100M upload_max_filesize = 10M Is this correct? It is not working for me.

0
Q: Is php an efficient language to use for a web application where thousands of objects interact and are shared?

KrissI'm building a web application (in oo php) for a few thousand users, where each user needs to initialize thousands of instances for the application to work. There are about 25 unique objects that needs to hold data and most objects need to have direct access to all other objects. On top of this m...

0
Q: share sessions with memcached between ruby and php

user1522392I want to share sessions with memcached between ruby and php,the format store into the memcached is json,and now I can read the session infomation in memcached with ruby and it works very well,but in php there is a serious problem,I can't get the session created by ruby use get($key) function in ...

0
Q: PHP/Ajax-based chatroom, works perfectly singlesided but acts weird when live

user2960222The other day, my friend and I sat down and made this small website. Ideally, I wanted a login screen, which redirected to a chatroom when they logged in. I set up a database in phpmyadmin with members and the chat itself, storing the text you type in the chatbox, inside the database. JavaScript ...

0
Q: Web server blocking some words

ChathurakaI am using a shared hosting server my database is a mysql database. I tested the word "exit" to pass from my PHP form first. It doesn't work at all I could figured out that it is not an issue with my PHP script or my database server. This is purely with php installation or something else. I searc...

0
Q: Beginner MySQL form issues

Chris MartinHey hopefully someone can point me in the right direction. I'm going around in circles with this form I'm trying to submit to a db. This is my form code <form action="submission.php" method="post"> <ul> <li><input type="text" name="tips_title" placeholder="Title"></input></li> <

0
Q: To much escaping?

Dejo DekicI have a following code: <a href="<?php echo esc_url( esc_attr( get_month_link( get_the_time('Y'), get_the_time('m') ) ) ); ?>"><?php the_time( get_option( 'date_format' ) ); ?></a> My question is: am I doing to much unnecessary escaping because as you can see I am using esc_url() combined w...

0
Q: How to auto detect a remote IMAP/POP3 server given only a hostname in PHP

OualidI am using the function imap_open in PHP. $hostname = '{hostname.com:993/imap/ssl}INBOX'; $username = 'user@gmail.com'; $password = 'password'; $inbox = @imap_open($hostname,$username,$password); Is there a way to scan: Port number: 993Mail type: IMAPSSLPath prefix: INBOX By giving only ...

0
Q: How to add a delete button in custom table in yii

StreetCoderI have a form where I use ajaxSubmitButton to add product items in a HTML table. ajaxSubmitButton helps to use ajax to add item, ajax url take the values and update the table's body <tr>, <td>. In table, I want to keep a delete button in last column in every rows. When I click the delete button, ...

0
Q: how to get next record from database when wordpress schedule hook runs?

user2907541I am working on plugin which will work automatically via wordpress schedule hooks. But to do that I need a single record from database and process it and next schedule run, I want to get next single record from database to process. I am using custom table for my data, the table have a primary ke...

0
Q: MySQL uses last opened connection

DirkZzOn an older application of ours we see strange behaviour since a while. We have multiple pages which require the data of multiple databases, everything has worked fine until recently. If we need need multiple database we initialize them like so: $linkDatabaseOne = fConnectToDatabase( "Databas...

0
Q: Making Greyscale image in Silverstripe

handyfaceI'd like to be able to return an image in Black&white in a controller, so I can use it in a template. On this page I found that the GD class has a greyscale method. Unfortunately I don't understand the GD class and how I can use it. I tried doing $final = $image->getFormattedImage('greyscale',3...

0
Q: Uploading files on another sever / hosting

Elo PeriI have 2 shared linux hostings. One is on Hostgator, another is on BlueHost. My website hosted in Hostgator allows my users to upload files. I want the files my users upload to be uploaded on my BlueHost hosting. Is that possible?

0
Q: Is it possible to check that mp3 file is exactly mp3 file with php?

true ツWhen checking mime type, php sometimes fails to detect mimetype, and giving back "application/octet-stream". I've tried to check if getid3 php library could do this - but i can't understand to which data/option i can bind, audio data format parameter is also sometimes missing. Is it possible to ...

0
Q: How to preview live text render on image in Opencart?

user2959930I am trying to set up a business card design site in Opencart, and would like a feature where the customer can see the text they type in the text fields of the product option appear in an assigned position on the image. Does anyone know how to achieve this, or of any extension that could help ac...

0
Q: Cron PHP CLI grsec: Invalid alignment/Bus error occured at ... in /usr/bin/php

jadouxMy ubuntu server crontab always launch a lot of PHP CLI. I'm used to have some error in my syslog. I don't know what does it mean. In the /var/log/syslog, the cron send correctly the command : Nov 5 01:00:01 lynkoa CRON[25900]: (www-data) CMD (cd $DRUPAL_FOLDER/www/ && php -c /etc/php5/cli/ph...

0
Q: PHP parse Meta Tags of an aspx page failure

almalin my project i have a php function that parse an html page and retrive meta tags correctly. When i run my function for an aspx page this fail and don't create return data (even though the aspx page in question has correctly set the meta tags). The function is: function getUrlData($url) { $resul...

0
Q: Possible to include several pages in the == page_name check in PHP?

user54425I'm writing a simple menu in PHP. Its used to set class="active" in CSS. However, I have a dropdown menu, consisting of 2 menu-items. I would like this dropdown menu to get activated as long as pagename is either of the 2 menu items. As you see I have found a solution using 2 separate PHP func...

0
Q: Javascript alert when new row is added to database

user2960371I need to give a javascript alert to users browser when a new record is added to database. So far i have done this: PHP chatalert.php require("../system/config.php"); $result = mysql_query("SELECT * FROM chat"); $rows = mysql_num_rows($result); echo $rows; Javascript: test.php <?php define...

0
Q: Change Select/Option to UL LI on Wordpress page php

user2064285Im working on a WordPress real estate website. And I have a currency converter on the in the header. And its hard to style the select - optons box. I want to change it to UL LI list so I better can style it. Is there some one who can help my do get that done? I have have spenn hundred of hours ...

0
Q: Radiobutton not posting

user2960417im trying to post a radiobutton value, but i must have made a very dumb mistake. im using Kohana and Bootstrap as framework. this is my code; <div class="control-group"> <label class="control-label">Geslacht</label> <div class="controls"> <div ...

0
Q: php facebook login search and post comments

icegeti have tried with PHP curl to Login to Facebook (with my fb account), it doesnt works. now my question: i want open a new site (fansite), and read out the last comment, parse this, and auto answer to this comment.. currently i parse all with autoit, in Windows GUI, but i want do that via php + cr...

0
Q: Multiple layouts in codeigniter

user2454964I have referred to http://codeboxlabs.com/how-to-create-default-layout-on-codeigniter-using-hook/ for having default layout. Is it possible to have multiple layout designed in codeigniter? CASE : There is an select option in header for changing the layouts. On change of select I want to change t...

0
Q: move emails and attachments to google drive using php script

NaeemI have read gmail email using PHP(imap_open).I have to move emails and attachemts to google drive using php? Email body text and file name are saved with me in php variable.

0
Q: Select all records of a maximum column from codeigniter

user2733443I am using Oracle11g What I want to do is to select the field with the max update date. The code below is selecting the right field in Toad. How do I use this in my php script in CodeIgniter. select * from performance where UPDATE_DATE = (select max(UPDATE_DATE) from performance) I have this...

0
Q: Selecting multiple tables from database

user2594383I am trying to make my php code to read off of two tables in my database. Like if it does not exist in one table it will check the other and see. $mystyle = mysql_query("SELECT * FROM images WHERE `name` = '$name'"); How would I make it read from the table images and the table images_2 I tr...

0
Q: How to make a progress percentage bar circle in javascript?

AdrianI would like to make a progress percentage bar circle in Javascript based on server loading. Currently i have a simple javascript that loads on submit, smth like this: Javascript: function validatef() { var validatef = document.getElementById('url').value; var validaterror = document.getElem...

0
Q: How is this not equal? I dont get it

user2911924$days = $days_of_week[2]; if (date('d/m/Y') == $days) { $today = "Correct"; } else if (date('d/m/Y') != $days) { $today = '<br>Non correct<br>'; $today1 = date('d/m/Y'); $today2 = $days_of_week[2]; } } This returns when I echo the $today, $today1 and $today2. Non correct 06/11/2013 06/11/2...

0
Q: Create Grid from 2 mysql table records

MsKazzaI have two tables colours and sizes, i want to be able to display them in a grid with colours down one side, sizes across the top and then where each is available a box where user can input their quantities. Small ¦ Medium ¦ Large Red [__] [__] ...

-1
Q: Google maps V3 - loading last on page rather than first

DwairHow do I change the load order of my page so that GM displays before the rest of the page finishes loading? With V2, my GM script was in the head and called by a body onLoad= function which loaded and displayed the map and markers before the page moved on and started running a PHP script to popu...

0
Q: Getting 500 Internal server error when adding user to phpbb3 using php script

Omer EldanI'm trying to add new user to my phpbb3 forum, here is my code(insert_user.php): <?php define(‘IN_PHPBB’, true); require(dirname(__FILE__).'/forum/includes/functions_user.php'); $user_row = array( 'username' => $_GET['username'], 'user_password' => phpbb_hash($_GET['passw...

0
Q: MYSQL PHP Matching numerous comments to the correct status in social network activity feed

Daniel OrmerodI was wondering if any of you could help as I have been stuck on this for days. This is the first time I have tried writing a query on this scale. I am creating a social network and am doing the query for the activity feed which shows when people have liked something, commented on something etc...

0
Q: Php Form Validation Class displaying errors

Dan TempleI have the following php form Validation class, which allows me to specify which form inputs are required, the length, and whether the input should be unique. <?php class Validate { private $_passed = false, $_errors = array(), $_db = null; public function __construct() { $t...

 

« first day (260 days earlier)      last day (50 days later) »