« first day (259 days earlier)      last day (51 days later) » 

8:02 AM
0
Q: How to use document.write() into .html()?

Boris KuzevanovI know that question is a little stupid. But i have next problem: I do obfuscation of my HTML code by http://myobfuscate.com/ , as you can see this site do like this: he creat varriables and put on it JS code. Here is code like this: var lOOL = 'document.write()'; than it print on page by eval...

0
Q: MySQL database timezone isn't being set correctly - why?

Andrew PhillipsI have a MySQL database hosted via a Cloud service provider. The timezone is different to my local timezone. I'm trying to set the timezone correctly .. Here's my PHP code I'm using when I want to get a new connection to a MySQL database: static function get() { if (self::$instance!=null) ret...

0
Q: Deprecated: Function ereg_replace() is deprecated in line 114

saiyyedfardeen Deprecated: Function ereg_replace() is deprecated in /home/hjlhvqyy/public_html/fastseoindia/klib/k_functions_text.php on line 114 code is below: $value = ereg_replace("[ ]{2,}"," ",$value); // line 114 plz help and give me a real code.... i can't understand full code that's why i pos...

0
Q: URL specific encode

d.raevI try to recreate a URL but can not find the encoding function $input = "2/3*( ((word*888) )>(word2 AND ((word3*888))/word4>888"; $encoded = "2/3*(%20((word*888)%20)%3E(word2%20AND%20((word3*888))/word4%3E2888"; Tried with urlendode, rawurlencode but they replace the brackets and "*".. The ...

0
Q: How to maintain visitors history using cookies with php

Vky ArainI wants to find the visitors history with cookies untill cookies doesnot expires, if iam setting a cookie on my page and when visitor visits my page and coming back to site before cookies time period expires and visitors visits my inner pages and search anything, how i maintain visitors history w...

0
Q: Recursive SELECT query in Mysql

leo wongI got two following tables category:(one to many-----question) id name parentId 1 test1 0 2 test2 1 3 test3 1 4 test4 3 ..... question: id title category_id 1 question1 1 2 .... 1 3 .... 2 my question is : if i search category id = 1 ,there will be...

0
Q: Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource -- What do I do with this error?

user2955368Here's what the code states: Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/a3704125/public_html/home.php on line 117 Here is my entire PHP/HTML code: <?php define('INCLUDE_CHECK',true); require 'connect.php'; require 'functions.php'; // Those two file...

0
Q: td colspan not working for tr with ids

NitishI have a table structure similar to below: <tr> <td colspan="5"> TEST </td> </tr> <tr id="abcd_<?php echo $id; ?>" style="display: none"> <td colspan="5"> <span id="hidtb_<?php echo $id; ?>"></span> </td> </tr> The table is within a loop and the value of $id c...

-1
Q: How can i setup an online photo frame editor that produces photoshop file or compatible one for me to process?

user2955412I want to develop something like this website has: http://www.mycustomcase.com/iphone4/photo_case (select 1st option displayed on left and you will find an online case editor) I want to understand the mechanism used in it, i know it is a combination of lots of tools but i want to know how is th...

0
Q: CssEmbed generates exception on bootstrap_less file

KdgDevI'm currently following this tutorial: https://www.youtube.com/watch?v=5om81wXYIns It's about learning Symfony 2.3, and right now is demonstrating how to set up Twitter Bootstrap and also how to use assetic with cssembed, to compress all css and javascript code in to 1 file each. I'm working on...

0
Q: Selecting between 2 specific elements to get comments between closing and starting tag

Leo PflugI'm currently trying to fetch the data of a simple XML-Sheet which contains data for translation use it's structured like this: <string name="action_settings">Settings</string> <string name="action_error">Something went wrong.</string> Sometimes there are comments after to describe the conten...

0
Q: Magento - Store switch and cookie based redirect

user2955437I have a website with stores in english and italian. When we change the store, the product URL changes - 1 URL for english product page and 1 URL for italian product page. English store is the default store. The switch works but when I go directly to the italian product URL I'm redirected to a ...

0
Q: Installing phpunit via pear on Windows

ArfeenI have already setup pear on Windows and its working fine. I wanted to install phpunit but seems like the repository is returning 403 forbidden response(Channel discovery added already). Is there anything I need to do before installing phpunit ? c:\wamp\bin\php\php5.3.13>pear install --alldeps...

0
Q: Authenticate a PC before running my website

Qadir HussainWell, Let me describe some information about my work I m making an web application, its a kind of some online shop using PHP, jquery, ajax and JavaScript. My intention is may be strange , i.e I want to launch my site on only one PC on local host. How should i set my site so that it only run...

0
Q: How to use ajax to update database table?

Sumit RathoreI am showing a table on a webpage using php and mysql. I have added a chackbox in each row. Clicking on the checkbox will result in displaying two buttons in the row whose checkbox we clicked , one is delete and other is edit. For this purpose with the help of stack overflow i used jquery. Now wh...

-2
Q: Unexpected behaviour of mysql at different times

pradeeppsWhen i execute my program,arises an error exception 'PDOException' with message 'SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens', after few seconds i recreated the same situvation with out changing code..then it execute properly.What may be t...

0
Q: Best way to get output from another PHP file as a variable

IsaacLI need to include the output/result of a PHP file in another file. I found info online about using curl to do this, but it doesn't seem to work so well, and so efficiently. This is my current code: function curl_load($url){ curl_setopt($ch=curl_init(), CURLOPT_URL, $url); curl_setopt($...

0
Q: Write code to log in, auto populate fields and submit actions?

PomsterI need to write code to log onto a site with the username and password and then find all the fields that match and populate them with my data, then have this code submit this action and then log out. I have no idea what this type of coding is called or where to start looking how to preform these...

0
Q: handle with images in php

Zubair Haiderhow insert picture into DATABASE using PHP and then upload again on page from data base using PHP . recently I have inserted first name last name and know how to get again from database. but don't know how to handle with images in php

0
Q: Ajax POST and Return the data as json

yogamadnessHello I'm new on ajax i want to make some ajax post that will select data from mysql database based on what user input on ui and show the data as json object, this is my code that not work index.html ` </fieldset> <form id="search"> <fiel...

0
Q: How to secure a php script

Guus van Walstijun I have got a php script. In this script i will be connected to a ftp server, and show a file. What would be the best way to secure this script so can only log in 5 times in 1 hour or something like that? My script: <?php session_start(); $_SESSION["ftp_user"] = $_POST["user"]; $_SESSION["...

0
Q: Scrape longitude and latitude from this html using preg_match

Ben PatonI'm trying to use a regex to extract just the longitude and latitude coordinates from this html. This is just a snippet of the full html from http://www.bricodepot.fr/troyes/store/storeDetails.jsp?storeId=1753 so I need to be able to search through the whole targets page html and match the longit...

0
Q: How to delete an input type text?

user2901740How to delete the specific input text that is dynamically generated? I tried to used the remove() but not working. any idea? var txtLoop = 1; function add(type) { //Create an input type dynamically. var element = document.createElement("input"); //Assign diffe...

 
8:44 AM
-1
Q: Escaping JSON strings but stripping HTML attributes for saving to DB

ExtrakunThe project I am working on allows user to have simple config files which are stored as JSON strings inside a database. The issue now is I wish to escape HTML attributes, but leaving the quotes untouched. If I use htmlspecialchars, all the quotes will become &quot, and the JSON formatting will be...

1
Q: Unable to filter data from mysql

MahouI tried to read data of my MySQL database, I created the fullcalendar and show up the event on calendar. However, it is unable to retrieve the data from my MySQL database. The First php code : <?php require_once('conn.php'); ?> <?php $maxRows_RsCourse = 1000000; $pageNum_RsC...

0
Q: fix complicated mySQL query that fails on multiple users

salivanAll tables and query itself is replicated here: http://www.sqlfiddle.com/#!2/b25f8/7 I run this query: SELECT a.name_surname,GROUP_CONCAT(w.word) FROM words_en w INNER JOIN connections c ON c.word_id = w.id INNER JOIN ( SELECT f1.asked_user_id AS friend_id, f1.created, u.name_s...

0
Q: How to get extra json data from php using JQueryUI autocomplete after selecting an item?

user2944805After selecting an item on the returned results, how do I alert another item from php? Here is the plugin settings. And if there's a better way i can improve my controller, please suggest something with an example. $(function() { $( "#SearchInput").autocomplete({ source: '../Search/...

0
Q: Remove duplicates in a PHP array

user2955522i'm using the Google API to extract data from Analytics. But i can't seem to remove the duplicates in my array. I have checked the forum and array_unique seems to do the trick but i can't seem to get it working. Any ideas? Much appreciated! THE CODE: <?php $jsonurl = "URL"; $json = file_get_co...

0
Q: simplexml update xml file permission issue on ubuntu server

fefeI have a permission issue when I try to update an xml file with simplexml $xml->asXML('my.xml'); and I have been trying to change the permissions on file chmod 777 my.xml but doesn't seems to work. What other alternatives I have ?

0
Q: php getopt() function not giving correct answer

Muneem HabibFollowing is my command line arguments: php a.php -g UAMS ABC Now when I get command from command line using getopt then I am getting only first argument i.e UAMS. I want to get both arguments i.e UAMS and ABC. Following is my piece of code to get argument throug getopt() function. $options=...

0
Q: I want to change the dropdown.selectedIndex to "text" instead of what it currently is "value"

user2955503I have a javascript dropdown on website, here is the code- <?php function get_request_uri_without_page() { $pageURL = 'http'; if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} $pageURL .= "://"; if ($_SERVER["...

0
Q: FPDI class not starting

synan54i want to setup FPDI in my localhost but its gives me an error Fatal error: Class 'FPDF' not found in C:\wamp\www\book\fpdf_tpl.php on line 20 what i did i ust went to download page http://www.setasign.com/products/fpdi/downloads/#p-380 downloaded 2 packs FPDF_TPL and FPDI i unzip that files...

0
Q: GoogleMap getting all data need

user2955539I'm using a standard google map, with assigning the zoom, radius and the long latitude even the category of places, the only thing i want to know is: If it's possible to get all the data by assigning the "LongLat" by there within "500" RADIUS and if i can get all the "restaurant" names within th...

0
Q: Getting error from fdf_get_value()

Mehedee Rahman SetuI was trying to get field value from fdf file. I have used following code, but getting error. <?php $fdf = fdf_open("test1.fdf"); echo "Name: ",fdf_get_value($fdf,"first_name"); fdf_close($fdf); ?> Error message: Fatal error: Call to undefined function fdf_get_value() in C:\LocalServer\htdoc...

0
Q: Javascript username validation check in jqBootstrapValidation.js

Phil HarmonieI'm using jqBootstrapValidation.js ( http://reactiveraven.github.io/jqBootstrapValidation/ ) and I want to check if a username that I choose is already existing. I loaded all Usernames in an array: $array = array("User1","User2",...); and now I want to check if the username already exists whi...

0
Q: Replace Router or Controller in Zend2

bordeuxI want in my module replace mached route with my own, when request don't have specific GET parametr. For example: example.com/ControllerName/Action/?mode=ajax Is mached to ControllerName But when is example.com/ControllerName/Action/ is mached to my controller in my module. How can i do it...

0
Q: I need to fix a function that scan WordPress post for YouTube link and put the link on a single line

user2948145function the_content( $more_link_text = null, $strip_teaser = false) { $append = '&w=480&rel=0'; $content = get_the_content( $more_link_text, $strip_teaser ); $content = apply_filters( 'the_content', $content ); $content = str_replace( ']]>', ']]&gt;', $content ); $content = p...

0
Q: Corrupted File Returned PHP Header File returned from database?

Stevie GI have the following function that gets a blob from the database and should return the file to the browser, however it is returning a corrupt file: $file_data is an array with the returned row from the files table with the blob, the content type, last modified and other such things. $data is th...

0
Q: PHP: Applying multiplication factor to a broad number of values

MaxEvronI'm coding an audio amplifier in order to apply an envelop on an audio track. The audio comes from a file containing raw 44100 KHz 16-bit stereo samples. I coded something like below. In order to simplify the example, the amplification factor is constant but is varying in the real project. <?php...

0
Q: Two forms - one submit button?

michaelmcgurkI have TWO forms on my website. Is it possible when I submit one of these, it will take form data from a particular field in the other form? I am using the Recurly system with PHP. Thank you, Michael

0
Q: Retrieving mysql data on to one php page from multiple tables

N Mahmoud AmryI am developing website which database driven. It has two pages i.e index.php and subpage.php. On the index page there appears 14 links namely about_us,projects,services,partners and among others. And for the case of the subpage.php, it has "a blank body",the header, navigation and the footer. M...

0
Q: Can I use PHP SDK and JAVASCRIPT SDK at the same time?

Jben KayeI have a php program/app which asks for input, generate an image and post th image link to user's timeline (processor.php). I used PHP SDK in posting to timeline since I am more familiar with PHP. Now, in my gallery.php, i want to show like buttons for each generated image. I am aware that i have...

0
Q: GeoRedirection script not working properly

Learner Always I am developing a country specific website, for which I thought to have a geo redirection installed at my php server. The basic approach is to record the incoming IP address in $_SERVER['REMOTE_ADDR'] and then use a geolocation database to convert that into country information. I did go with Max...

0
Q: PHP - Not redirecting on successfull login

user2955598This is a strange problem When I go onto login.php and enter my login details on my testing server I get redirected to admin.php page as I should, However when I uploaded my files to my hosting server and I go to login.php and enter my login details NOTHING happens, I mean nothing the page just ...

0
Q: Step by step third party Google API Integration

user2955564I just want to know if anyone of you ever experience using google api login authentication in Symfony2? Right now I have downloaded the google client api but I really have no idea on how to integrate it in symfony2. I have been looking for a solution on the net and all the solution suggested of u...

0
Q: Dynamic images + geolocation (google maps API?)

IE-haterI'm thinking about a possiblity for showing a users geolocation in an email. Would it be possible to generate a dynamic image with PHP which tracks the users geolocation and gives back an image. Generating a dynamic image is no problem. But before I put too much effort in it, I try to find out i...

-2
Q: Unable to run query

user2955619when i run my php page this error show: Unable to run query:Unknown column 'NUM_OPTIONAL_COLLEGE_COURSE' in 'field list' $sql ="INSERT INTO MAJOR (`COL_NO`, `DEPT_NO`, `YEAR`, `NUM_OPTIONAL_UNI_COURSE`, `NUM_MANDATORY_UNI_COURSE`, `NUM_OPTIONAL_COLLEGE_COURSE`, `NUM_MANDATORY_COLL...

0
Q: Form filled BY a table

user2955526I'm new to PHP and MSQL and trying to build my first application. In this case i need a drop down form which is filled by a table. (MSQL = PHP MYADMIN) ______________ Input table: Table_Product ID, PRODUCTNAME. (There are more columns, but don't need them.) ______________ This table is used ...

0
Q: Removing a Cron

Emincan DemirkayaI've got a problem with a cron. This is the line: 09,39 * * * * root [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete When this line works i'm taking a mail from my server: PHP Warning: Module...

0
Q: Displaying the value (link) selected in a modal window with the index value

user2723949   Hi ,, I have a page with some values in a table which are read from a .csv file and displayed. The values changes with time ( dynamic ) , So I am using for loop in PHP with the size of the file as limit of loop and displaying the values and each values are links that displays a modal window ...

0
Q: You have an error in your MySQL Syntax - in a simple Query

user2802113So I am trying to replicate a simple blogging system I made a month back, But the query no longer works on my new site Here is the code <?php function BlogPosts() { $sql = 'SELECT * FROM "blog-posts" WHERE BlogDeleted = 0'; $value = mysql_query($sql); if(!$value){ die("<h1>QUERY ERROR IN B...

0
Q: Java Applet's URLConnection sent to PHP does nothing

starmandeluxeI've studied up on the Oracle documentation and examples and still can't get this to work. I have a Java Applet that is simply trying to send a text field to a PHP script via POST, using URLConnection and OutputStreamWriter. The Java side seems to work fine, no exceptions are thrown, but PHP is ...

0
Q: File upload issue in Yii/PHP

arun_phpI have a situation here, while uploading larger files(greater than 10mb) nothing happens, no file is uploading, no db entry, no error messages etc., I'am using Yii.. phpinfo says upload_max_filesize and post_max_size are 1G and max_execution_time is 3600 .After submitting the form, the page loads...

0
Q: php Find matching word from a string with array

user2568578i need to find 1 word from a string, like: $row['keyword'] = "hello my name is jon"; If the word "text" matches to one word from $row['keyword'] so do something.. i try this, but i think there is a better way: foreach($rows as $row) { if (strpos($row['keyword'],t...

0
Q: incrementing time value by 15 minutes

ashwinbhyI have value 10:00:00 in my mor_start which is of type time in mysql database i want it to increment by 15 minutes. $tim=$values['mor_start']; $date = date('H:i:s', strtotime($tim)); echo $date; the above code displays 10:00:00 but when i try to increment the time by the following code i get ...

0
Q: Getting error after deleting data

Mohamad Noor Qusyairi Manlanwell,this is my error, the data successfully deleted, but the error come out.. here is my search.php coding. The error at the line 30 <? mysql_connect("localhost","root",""); mysql_select_db("kuih2") or die("database could not connect "); ?> html code for search.php <html> <head> <met...

0
Q: TCPDF strange output

beingalexUsing TCPDF I am generating PDFs. The PDF's are one page with two PNG images inserted. This is all working fine on my local Ubuntu server but on a remote server the output is strange, see attachment. No errors are generated from TCPDF. Has anybody got any tips as to why this may be happening? ...

0
Q: Joomla parameter for template modul

PiTheNumberI have a template "ja_purity_ii_something" could be from joomlart.com. Anyway, this template contains modules like /html/mod_latestnews/default.php. In this file a parameter $list magically turns up. How can I change this parameter? Some code from default.php: <?php if (count($list)) : ?> <di...

0
Q: PHP display key => value array in order

AhmadhcI want to fill an html table from an array organized as Key => value, i use zend Framework, and my problem here that Php didn't respect the order of the value in the array when i have to print them in an html code and this is my controller: <?php class Dashboard_LogsController extends Dashboar...

0
Q: new user registration page writes to user info to .txt, sign in verifies user exists in .txt file to allow user to log in

wish i was good at phpI am new to php and trying to learn it. I am practicing by doing a php code to so that when a user is at the login screen and they sign in with a username and password, when they click the sign in button, the page will check the .txt file to see if the username and password exists on the .txt fi...

0
Q: How to trigger a PHP script after payment?

techLet's say person A has paid an virtual item that I am selling in a store. (Person A has paid using Paypal) Immediately after paying, how do I update my database to give person A the virtual item? I use PHP and MySQL. I am thinking of using a PHP to update MySQL database.

0
Q: Output specific location on IP

Michel VertongenI'm searching for a php script or javascript that outputs the correct city location based on the IP ADDRESS, something that does this. $IP_city = $_SERVER['REMOTE_ADDR']; $city = ''; if ($IP_city) { // Search to the $city of IP; echo 'Your current location =' $city; }

0
Q: Why is mysqli_query() sending empty strings to my database?

infectionslaughI'm making a register form in html and I can't make it save the data to the database, everything I send is an empty string! I don't know what's so bad with the code, I don't think the syntax is wrong, hope someone here can help me to see here I have gone wrong: <?php $con = mysqli_connect("loca...

0
Q: Merge two tables to a new table using php and mysql

user2955523Hello this is my first time i post but hopefully i won't mess up to much. Basically i'm trying to to copy two tables into a new table, the data in table 2 and 3 are temp data that i update with two csv files. It's just basic data that share the same ID so thats the Primary Key and i want these t...

0
Q: PHP/MYSQL Javascript - Insert row value pulled from database into textfield with a button

SiZaIm pulling out table information from a mysql db: I need the buttons to select the information shown into a textfield, the below code works perfectly for the mobile_number but does not work for serial_number. both field types are varchars. php to pull out info and html button <?php while ($row...

0
Q: PHP : how to insert data variable into table using postgreSQL

Beebrabiei get value from request variable this code $fname = $_REQUEST["first"]; $lname = $_REQUEST["last"]; require_once("Connection.php"); $sql = "INSERT INTO test(fname, lname)VALUES('".$fname."','".$lname."')"; if($sql) echo "Save Sucessfully"; else echo "FFFFUUUUUU"; pg_close($connect); ...

0
Q: Access config global in Zend Framework 2

Aurélien MaigretI would like to access to my global configs (config/{,*.}{global,local}.php) located in my personal libraries (in the vendor directory). But despite my search in the web, I did not succeed to achieve this. I know how to access the config file of a module : \MyModule\Module::getConfig() I know...

0
Q: Symfony2 upload file without form

Thibault MartinezUsing symfony2, I would like to upload some files only from their path on my PC. I read an excel file containing some path to pictures (like /home/thibault/pictures/*.jpg) and I want to upload them on my server. So, I do not want a form. All the documentation I have read deal with upload from a...

0
Q: Validating appReceiptStoreURL Returning 21002 Status

Infinity JamesI have created a class which handles the purchases on In-App Purchases and also the validating of receipts. A while ago I used to use the transactionReceipt property on an SKPaymentTransaction, but have updated my code a fair amount and now use appStoreReceiptURL on the [NSBundle mainBundle]. Ba...

0
Q: php query Select 10 players and 3 reserves for each one

custombrandstable players player1 player2 player3 player4 player5 ... player100 etc I need to select 10 unique random teams with 4 players as: 1 base and 3 pivots Currently trying to use: require_once "connect_to_mysql.php"; $sqlCommand = "SELECT id FROM players ORDER BY RAND() LIMIT 10";...

0
Q: mssql_query returns resourse, but mssql_num and mssql_fetch_row gives an error

LeneronI have a strange issue - I am calling a stored procedure with mssql_query, and it returns me "Resource ud #4". But when I try to work with mssql_fetch_row() it gives me an error; $res = mssql_query("query"); If ($row = mssql_fetch_row($res)){Die('ok');}else{die('bad');} //trying to fibd the mist...

0
Q: Adding images to groups in facebook graph api not working

user2955662I am having trouble getting the graph API to post images into a group. I have no trouble posting into a group feed, but as soon as I try and upload an image into the group I get the following not so helpful error message: An unknown error has occurred. I am using the php facebook toolkit. ...

0
Q: Load Data from db via javascript and php array

Levent KayaI want to get my data from mysql db with php and assign them to my javascript array. I have 200 records in my db and i will get 10 records randomly. $myQuery = mysql_query("select * from tblx where xyz=1 order by rand() limit 10"); What i want to do is take these records to assign them in to a...

0
Q: How to pass a function return value to php socket program in another page

Rincy RaphaelI wrote a client server socket program in php. Now i want pass function return value of page SearchURL.php to the Client.php SearchURL.php '; return $s; fclose($fp); } ?> the Client.php how can pass the $s value to the client.php? can i possible to run in ...

0
Q: SubQueries in yii

Naga shayanAm trying to code for a subquery select * from mob_reg where name in (select name from auth where parent ="naga"); I followed all these answer's [Sub-queries ActiveRecord Yii [How to set multiple condition on criteria for CActiveDataProvider? But am getting invalid arguments for foreach()....

0
Q: Listing a row in html table based on a condition

Harun ThuoI'm trying to list a record from the database based on its id..i have one script that lists all records from the database and displays the records in an html table.in the table, there's one row 'Campaigns' that is a link which when clicked displays only the record of one row..the idea is to list ...

0
Q: CSS effect inside PHP code

Programming_crazyI have written some HTML code inside PHP with echo as below: echo '<a class = "fragment" href = "'.$row['url'].'" target = "_blank" >'; echo '<div>'; echo "Title: $title"; echo '<br/>'; echo "URL:"; echo '<h4>' .$url. '</h4>'; echo "Pre...

0
Q: Double click an element using Selenium Webdriver - Facebook PHP library

Marcel ColombI need to double click an dom element using Selenium Webdriver - Facebook PHP library. There's no direct way to perform a double click on the element, but there's a way over WebDriverMouse this is how far I've got. $myElement = $myWebDriver->findElement(WebDriverBy::id('myElement')); $myWebDr...

0
Q: Distance between 2 gps points

joan16vI am using this function, but I need more accuracy. Any ideas? function distance($lat1, $lng1, $lat2, $lng2, $miles = true) { $pi80 = M_PI / 180; $lat1 *= $pi80; $lng1 *= $pi80; $lat2 *= $pi80; $lng2 *= $pi80; $r = 6372.797; // mean radius of Earth in km $dlat = $lat2...

0
Q: Grab days left in month past a date as array - PHP

Joey CadleHow would I grab the days of the month past a given date as an array. For instance: get_days_left('2013-11-20'); ... would return: array('2013-11-21', '2013-11-22', ...);

0
Q: Filter an array within a range when keys are timestamps

J CrowI have an array with the keys as timestamps - the actual keys are unix time, I have just formatted it here for simplicity. How can I filter this array so that it unsets all values and only keep the array between 2013-08-02 00:00:00 and 2013-08-02 00:02:00 ? 2013-08-01 23:58:30 ---->> 322 active ...

0
Q: Magento - SOAP API, Mass Update Product Visibility

Steve ChurchI want to refrain from using the import export, we have a LARGE amount of products (5,000) Basically, I have done some heavy configuration the the templates to display the catalogue in a very wholesale way for our client, if you want to look it is here (www.musclefinessewholesale.com) however, y...

0
Q: How to do ajax form post while page load after submit a form in symfony2

Mohan RajI have to retain drop down value and also some specific data according to the drop down selection. Normally its working fine for me but i need same thing after submit a form (save the data), after save i need to retain the same. Please advice about this or any other solution already having?

0
Q: Flex: How to pass parameters with prefix to my PHP HTTPService?

user2419604I have a PHP script to get data from a server. However I am having difficulty transposing the call function that has a prefix 'req= from a HTTPService in Flex. Here PHP example script that works to call the data from server: <? function sendPost($param){ $ch = curl_init(); $url='...

0
Q: force to download remote image immediately without HTML5

IgorChI trying to force to download a remote image, I failed to attempts do it on client (cannot use HTML5, thanks to IE8), so I'm trying to use server side (php). The only way how to do it I found thanks following answer, is using curl. Other way like readfile($file_url), always return an empty file....

0
Q: Youtube link string replace with get method

MezelderzTrying not to go to youtube for every video I find on some other site, and that is from youtube. If I right click and copy video URL, url will have this feature stuff inside the link, I am trying to get rid of that with str_replace. Link http://www.youtube.com/watch?feature=player_embedded&v=wq7...

0
Q: How can I find out the name of a variable inside a function?

rubo77I have a function function my_dump($a,$name){ echo '<pre>'.$name.":\n"; var_export($a); echo '</pre>'; } How can I achieve this with only one argument so the function recognizes the name of the called variable itself? for example: my_dump($cool_variable_name); will output: ...

0
Q: i am trying to get data from php and wamp server to my android.but it shows the error json parser- end of input at character 0

user2825588this is my json parser code. package com.example.sampletest; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.util.Lis...

0
Q: hide gridlines on a .doc generated by php

rispoli michelI'm generating .doc with php using this code below. <?php session_start(); header("Cache-Control: ");// leave blank to avoid IE errors header("Pragma: ");// leave blank to avoid IE errors header("Content-type: application/octet-stream"); header("content-disposition: attachmen...

0
Q: Cannot see wordpress widget without log in

user2834491My wordpress widget on single page isn't display to visitor ( no code on view source) <div class="secondaryColumn"></div>` ` It display normally on homepage. and when I log in I can see it on single page too. May you help me with it?

-1
Q: How to parse JSON string into Android as an Array?

mobilGelistiriciA very simple question, a lot of examples out there, but none of them worked for me. I need to parse the simplest form of a json string : {"id" : "5" , "name" : "John"} How do I turn this into an array, list, map whatever, so that I can get something like this ? myArray["id"] = 5

0
Q: store IPv6 to database after being converted to binary

wervaI have an ip table with varbinary fields: ip_start and ip_end Now I have a problem, $ip=('2001:255:ffff:ffff:ffff:ffff:ffff:ffff'); $binary=unpack("A16",inet_pton($ip)); var_dump($binary); Now, how to store $binary_start and $binary_end to ip table? Do I need any wrapping of data(such as bin2h...

-1
Q: Object not found! redirect link codeigniter

gabrielwhy i get the error : my code : <li><a href="<?php echo base_url(); ?>welcome/logout">Log Out</a></li> error : Object not found! The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error...

0
Q: How to to create groups of php arrays encoded as json and return each group by name

user2944805is this possible? i want to return name and type of a car, in one json element. The normal way is this, { $return = array ('label' => $row['name'], 'Type' => $row['Type'], ); } echo json_encode($return); But i want something like this so i can just call "NameType", $return = ar...

0
Q: Error when logging in using CakePHP's Auth component

harrygI've integrated Cake's Auth component into my app. It mostly seems to work ok but I quite often get an error when logging in looking something like this: Error: Call to undefined method Security::getDataSource() File: C:\xampp\htdocs\ips-mvc\lib\Cake\Model\Datasource\DboSource.php Line: 1...

-1
Q: How to access array in outside while loop in fgetcsv

snehali want to fetch all csv file contain into array so i used fgetcsv function.it is working correct. but when i want to return my array it is empty. problem is outside the while loop. here is my code: <?php $filepath='Data\'; $csvfile=array(); /* here i did declaration */ $csvfile=csvcontain($...

0
Q: How to install pthread on php 5.4 on an x64 windows architecture?

Hugo StartThe dll founded here : http://windows.php.net/downloads/pecl/releases/pthreads/ contain a x64 version only for php 5.5.

-6
Q: Telnet via PHP code

almoujtahedHi I want to make simple telnet via php script only to check weather the connected server if running or down Thanks

0
Q: How to run PHP's OCI8 extension on Mac OS X Mavericks?

user2955794I am trying to install OCI8 on default PHP that came with OS X Mavericks (PHP 5.4.17 (cli) (built: Aug 25 2013 02:03:38)). I have installed Oracle Instant Client (Version 11.2.0.3.0 (64-bit)) and I am able to run sqlplus and connect to oracle server. I have installed oci8 using pecl: pecl insta...

-1
Q: php pagination, wont echo pagination buttons

Casperso i have made this pagination following a tutorial on the internet and the pagination itself works fine if i change the url to be correct but for some reason it wont echo the button "1,2,3,4" etc $cykel_pr_page = 1; $current_page = 1; if (isset($_GET['pagenr']) && is_int($_...

-2
Q: Login script php mysql

RobinThis is my login script. And as you might have figured it is not working. the $check is always empty. And i cant seem to find the reason for it the query is good. And i have a valid database connection. session_start(); if(isset($_POST['username']) AND isset($_POST['password'])){ $username ...

0
Q: How to remove controller name from the URL in codeigniter?

Imran AhmedI have controller named “profile” and the URL for user profile is www.example.com/profile/user I am already using the rerouting of codeigniter in the routes file $route['profile/(:any)'] = "profile/index"; what I am looking is to remove the profile controller name from the URL so it will be ...

0
Q: PHP session is getting lost completely when embedded using iframe on safari web browser

user2955865I have a php application completely depend on sessions to carry data from one page to another. Users can embed it using iframe. My sessions are getting lost completely when user access it from safari web browser. This is only happening when my php application is embedded using iframe. Working fin...

0
Q: preg match if found exclude that string php

user930026I am stuck in a very simple PHP problem. I am having a string as $a = "123 text"; or it can also be $a="lorem ipsum 1234 dummy text"; I want that the output shall be $a="text"; or $a="lorem ipsum dummy text"; In short I want to exclude the number that can either be 123 or 12345 or anything els...

0
Q: Passing PHP variables to Livecode

kexxcreamProblem: I have a number of variables stored in $_SESSION in PHP and I am wondering if it is possible at all to transfer these to Livecode scripts (.lc)? Current solution: I use $_GET to move information but I would like to know a way where you can connect PHP with Livecode and transfer inform...

0
Q: set autoincremental serial number in php

user2942100I am working on PHP using Kohana 3.2.I am displaying large number of data from database.I want to set the serial no from 1,2 upto the n-numbers depend on the number of data i am showing.I want to show the data in sequence.How to handle it through program.I can echo the total number of data(count)...

0
Q: 1. Use table data to 2. a HTML form

user2955526I have an table with data (grootformaat): ID, PRODUCTNAAM, etc. I need to have the PRODUCTNAAM to show up in a html drop down form. <?PHP $con = mysql_connect("localhost","***","***"); $db = mysql_select_db("grootformaat",$con); $get=mysql_query("SELECT PRODUCTNAAM FROM rauw2 ORDER...

0
Q: how to block a specific link on the site for a specific ip range using htacces

Dam Forumsthere is a link for a video on my php page in our server.when particular user comes from a specific region.Assume Latin America. when user comes from Latin America and video link will be displayed. but once user clicks on the link, i have to redirect user to a forbidden page. can i do this using...

0
Q: How to Pass Array from Zend Dom Query Results to table

user2955921I am querying a URL for columns YEAR, RATING and I want to insert those two into a database. E.g. YEAR RATING 1992 9.2 2000 9 1999 8 . . . . . . . . So, I am writing script like: $url = 'BLA BLA '; $data = file_get_contents($url); $dom = new Zend_Dom_Query($data); $year = $dom->query('.secondar...

0
Q: Google Safe Browsing API - Download the data from the database

MusterknabeI want to use the Google Safe Browsing API to check certain websites if they got phishing/malware on them. The problem I encountered is, that I also check the backlinks on that site and I'm following the links on the sites. Which means, I need more than 10,000 requests a day. So it would be optim...

0
Q: Array with StdClass in it

Joran Den HoutingWhen I do a var_dump on $raw, I'm getting this: array(8) { ["products"]=> array(1) { [90303]=> array(1) { ["amount"]=> int(4) } } ["totalprice"]=> float(15.96) ["totalamount"]=> int(4) ["currency"]=> string(3) "EUR" ["totalprice_format"]=> string(5) ...

0
Q: Efficient way to fetch_array from n column

HakimSay I have a table as follow: +---------+------+------+---+-----+---+ | term | 1 | 2 | 3 | ... | n | +---------+------+------+---+-----+---+ | connect | 7 | 14 | 2 | ... | 8 | | finish | 1 | NULL | 9 | ... | 1 | | ... | | | | | | | net | NULL | | ...

0
Q: Need htaccess for dynmic subdomain

user2955900I want an htaccess code to redirect a folder named exactly as the subdomain. I have activated wildcard subdomain. For eg:- I want to redirect subdomain.example.com to subdomain.example.com/subdomain. But url should be displayed as subdomain.example.com itself. Please help!

0
Q: how to code in PDO

user2434677Hi guys im having problem converting the code onto PDO, I am new to PDO, is there a way we can recode the below code to PDO for a better code. heres my code: <?php include 'class/init.php'; include("config.php"); $ip=$_SERVER['REMOTE_ADDR']; if($_POST['id']) { $id=$_POST['id']; $id = mysql_rea...

0
Q: Uncaught ReferenceError: How to get PHP variables in $.get() Javascript?

Taha KirmaniI am writing a program in which, when a user clicks on the button, the information from the Page adds into the Database. I have written the following code, it is successfully taking the values from PHP and place the values in Javascript variable, if i alert() them it shows me the correct data, bu...

0
Q: Upload Image as BLOB to database through current form - Codeigniter

user197474I currently have a form that inputs information to the database from a php form, I want to add a field to the database table called profileimage which is uploaded within the current form but I am having problems getting the image to upload... View (profile_content.php): $this->load->helper('for...

0
Q: OpenSSL error - handshake failure

clarkkOn about every second request I make to an API I get this error!? The backend on the API is one of my own servers which I have setup myself with self-signed SSL certs What is happening here!? It can't be the SSL certs because it works in some cases Warning: fsockopen(): SSL operation failed w...

0
Q: how to calculate values from database stored formula in PHP?

Jobaer ShumanI have an application which is calculate ratings. Rating formula is stored in database. Formula can change from admin settings. Let me show an example: This is formula which is stored in database: +-------+-----------------------+ | ID | Formula | +-------+------------------...

0
Q: don't show hidden table

PHPnoobI have a problem I am trying to fix. http://i.stack.imgur.com/k47u2.png. Bascially I have a jqery which active the hidden form when you click on the "send" button. The quanity and "colour" and "size"(sorry miss this in the digram) as a both server and client side validation. My problem is that if...

0
Q: wp_schedule_event not firing

user1548981I'm trying to schedule an event inside a theme's functions.php but i cannot get it to "fire". I'm using the Cron View plugin and it shows the event scheduled correctly but nothing happend when is time to execute This is my code if ( ! wp_next_scheduled( 'prefix_hourly_event' ) ) { ...

0
Q: Use of single module multiple times

Ashwini AgarwalI have created Auth and Acl modules using zend-framework2, And these two are working good. Now I want to use these modules multiple times with different configuration. Basically, I have two sections in my project - User Section Admin Section And both have different session variables and d...

-2
Q: PHP unique url per account

CP2000i am making a subscription service using PHP where i would like every user to have their own URL and or subdomain on my server . For example if the domain name is stackoverflow.com i would like each user to have john.stackoverflow.com and/or stackoverflow.com/john Currently i have "loader" p...

0
Q: How to combine these two codes

TharinduluckyOK, here's the big deal, I've been trying to build my first WordPress theme. Which has a Tabbed settings page created by me. Actually, it's created according to this article. http://wp.smashingmagazine.com/2011/10/20/create-tabs-wordpress-settings-pages/ And I wanted to add images. So, I need...

0
Q: Displaying random product in a related product table of 5

user2946964I am creating a row of "product related table of x5" and using MYSQLcode RAND to generate RANDOM products and a exception clause using id!='$id' - where id is existing product that is being viewed currently. However the problem is that all the product images generated were all of the same simil...

0
Q: PHP $_POST array is empty for no apparent reason (XAMPP?)

user1794121I have a problem, my form opens another PHP script with post method, but it doesn't pass on any values. I tried fixes such as setting in php.ini: post_max_size = 8M variables_order = "EGPCS" and Didn't work. Here's the form code: <form enctype="text/plain" action="zalogujCheck.php" name="com...

0
Q: XAMPP 1.8.2-2 Apache Web Server won't start, always stops immediately

OnovarI'm running XAMPP 1.8.2-2 on my mac (OS X 10.9) and the Apache Web server won't start. It always get the status starting up.. or stopped. (never a green light.) I already tried to change the port to 8080 or 8888 but it still won't run. Can someone please help me? I show some images below to give...

0
Q: Throwing 404 response when should be throwing 403

Manolo SalsasI have the next rule: RewriteCond %{HTTP_REFERER} ^$ [OR] RewriteCond %{HTTP_REFERER} !^https?://itransformer.*$ [NC] RewriteRule \.(gif|jpe?g|png|wbmp)$ - [R=403,L] in the main .htaccess file. When anyone try to hotlink an image, he will get a 403 response. However, he's getting a 404 respons...

0
Q: Reverse a number inside a string in PHP

Itay GalI have a UTF8 string that contains letters and digits. For example: "Hello World 37. What? 24 last 6650" and I want to reverse only the digits but keep the numbers in the same place. The output should be: "Hello World 73. What? 42 last 0566"

0
Q: Programming Paradigms: Strongly Typed parameter with Inheritance

LarsWarning: might cause TL:DR I am working with PHP 5.3.10 and have the following problem. I do have an abstract class DataMapper, which is extended for the specific DataModel I want to persist. The following code does this trick: abstract class DataMapper { public abstract function findById($...

0
Q: Building a Twitter Composer Modal with URL Rewriting

iagdotmeI've built my own Twitter app in PHP with the front end using Twitter Bootstrap as the framework. I want to build a composer window to that my app can post a tweet (or a reply). Rather than reinvent the wheel, is there something I can use that preferably uses jQuery? Ideally it would... Have...

0
Q: PHP OOP with mySQLi fetch

user1949366I am relatively new to PHP OOP and i know that there are numerous questions here on SO, but none of them seam to be pointing me in the right direction. I have created the class user, and I am calling this in another file. I am trying to get the method 'reset' to call up 'connect', connect to th...

0
Q: Different location directives in ngnix

Oscar OteroI am new in ngnix and I don't understand very well the location directive. I have a website with the folloging configuration: location / { rewrite ^(.*)$ /index.php last; } #assets location /web/assets/ { rewrite ^(/web/assets/.*)$ $1 break; } location /web/assets/cache/ { if (!-f...

0
Q: Up vote and down vote in Laravel eloquent

Sagiruddin MondalI want to create an up vote and down vote system for my website. where uniqe user can give vote up/down for one post and next time he only allow to oposite to get off from database and after that he again can up or down vote. in this case i am having users table : id name debates table : ...

0
Q: Email Validation and Deletion from text file - PHP

Andrew Glassim trying to do an email validation. i've got an input text field which i write to a file when the user enters data into the input field. i would like to have a simple code which would check if the email is valid, and if the email isnt valid go back to the orignal page and dont add it to the .t...

0
Q: Remove specific entry from database with PHP by via id

CataneoI am trying to make a button for a manager to remove an employee from the list. I know I'm doing something wrong because it automatically removed all that manager's underlings. I actually want the remove button to only remove them when pressed. Here is my function: public function view_team($us...

0
Q: how to update a qunatity if itemname is same in mysql using php

user2938105when i got a item from company then i enter a all item detail in my PHP form and its save in MySQL and there are two table in MySQL one is receive and 2nd is stock so when i got a item its save in two table receive and stock but some time stock (table) item is same so i want to update if item ...

0
Q: How to define a static variable with runtime generated name

sunlight76in a php webapp I would like to some parameters from sql. App is growing so parameters could be added. At user login I would like load parameters to static variables to be used during the session. Actually I load them at every page change, but I'd like to improve performances. Actually i read a...

0
Q: Zend Framework 2: Database connection in view helper

StonerI found a few other posts relevant to this issue, however i wasn't able to achieve what i wanted so i decided to delete everything and start over with some help... This is my work so far, which does the job but the data are provided hard coded in an array and i need to create a database connecti...

0
Q: SELECT DISTINCT for email but also get another column

user2956072Trying to get only unique emails but also show the shipping name. $sql=mysql_query("SELECT DISTINCT(email) As email FROM tbl_order"); while($row = mysql_fetch_array($sql)) { echo " ".$row['shipping_name'].",".$row['email']." <br />"; } But it does not show the shipping name, any help would be ...

0
Q: How to combine PHP's DOMDocument with a JavaScript template

James LongI've got a bit of a strange question here, but it's stumped me completely. As much as anything, this is because I can't think of the correct terms to search for, so this question may well be answered on StackOverflow somewhere but I can't find it. We have a proofing system that allows us to take...

-7
Q: how to start with website development as a beginner?

Shakti saxenaI am new to website development. Can someone tell or guide me on how to start with basic website development. which technolgies should I use and all the basic information? Thank you.

0
Q: Converting from DOMNodeList to string in PHP extra characters

Colm MulhallI have converted results from a web scrape from DOMNodeLists to strings: $node = $the_sentence->item(0); $the_sentence = "{$node->nodeName} - {$node->nodeValue}"; However now when I print out the result it includes whatever tag the text had in the page as well as the &nbsp character: Before: ...

0
Q: How to select a relationship to be a correct Boolean JSON value?

CL SoThere are three tables hotel hotel_room_type room_type hotel and room_type is many-to-many Now I just search hotel_room_type and room_type by hotel ID, to find out the room type in that hotel, and I also want to select the room type not in the hotel. The expected result should be something ...

-2
Q: Bio metric finger print extraction

sMilbzFor my final project at university I want to store fingerprints in a database using a bio metric USB finger print scanner. There is not a lot of information out there about it so I am looking to the world of SO. So once I have purchased the hardware and use it to scan my finger, what format is i...

0
Q: spl_autoload_register searching in wrong directory/file

NathanI have placed the following code in my functions file (MyFunctions.php): spl_autoload_register ( function( $Class ) { $Class = str_replace ( "..", "", $Class ); include $_SERVER['DOCUMENT_ROOT'] . '/phpsb/class library/' . $Class . '.php'; ...

0
Q: Are constants as evil as global variables and singletons?

Your Common SenseI've heard many times on this forum that using global variable is a dead sin and implementing singleton is a crime. It just came to my mind that old good constants bear all the features of these dishonored practices: they are globally accessed and no doubt they introduce globallest state ever. ...

-1
Q: can't close a current window and open new window

RedSunProblem in closing a window. i am using 4 files. link.html userdetails.php ultrapro.php final.php upto ultrapro.php its working fine like opening and closing but ultrapro.php file is not closing and not opening final.html file In userdetails.php file Working $query = array( 'username' =>

0
Q: var_export() and static class properties

TiMESPLiNTERI played around with var_export() and I'm wondering why static class properties not getting exported by var_export(). class TestStatic { public static $FOO_BAR = 'foobar'; } $testStatic = new TestStatic(); var_export($testStatic); Results in TestStatic::__set_state(array( )) Is there ...

0
Q: Regex - Remove single whitespace

hgerdinI´ve got a string that looks like this: "T E S T R E N T A L A K T I E B O L A G" And I want it to look like this: "TEST RENTAL AKTIEBOLAG" But I can´t seem to find the right regex expression for my problem. I would like to remove one single whitespace between each character. Kind Regard...

0
Q: Issues accessing returned JSON in Javascript

AlcapwnI am trying to send a JQuery AJAX post to a PHP page, and return a variable back to the Javascript. Javascript var username = $("#regFormUsername").val(); $.post("ajax/registrationcheck.php",{username:username},function(result){ console.log(data); //I have also tried console.log(data.te...

0
Q: How to store and fetch a fingerprint to a database

sMilbzFor my final project at university I want to store fingerprints in a database using a bio metric USB finger print scanner. There is not a lot of information out there on how to do this using JavaScript and PHP so I am looking to the world of SO. Can someone help to get me started?

 
11:56 AM
0
Q: Is it possible to get country details from serialized data without unserialize?

Sanchuabacies AbaIs it possible to get country details from serialized content without unserialize ? a:11:{s:8:"newsFrom";s:0:"";s:7:"country";s:2:"IN";s:15:"state";s:0:"";s:16:"region";s:0:"";s:6:"awards";s:0:"";s:7:"website";s:0:"";s:8:"facebook";s:0:"";s:7:"twitter";s:0:"";s:8:"linkedin";s:0:"";s:10:"googlepl...

0
Q: PHP/MYSQL JavaScript - Insert values of multiple dynamic rows into textfields

SiZaAs you can see in the JsFiddle, I have a table (it's a static example, but in reality it's dynamic) and it pulls out rows of data from a table. I want to be able to create one button which will inserts all of the values of the mobile number and the serial number into textfields. so if there are ...

-1
Q: Create a PHP Poll with just one vote per IP

MerlinI have an Ajax Poll for my website users, but in our case a user can vote an unlimited number of times after he refreshes the page, and the results are being recorded. I would like to let users vote just one time from their IP and after they have voted, at page refresh just to show them the resu...

-1
Q: Php calling javascript function

Marcelo AymoneI can do that? Im trying to call a javascript function after conditional php "if" <script type="text\javascript"> functioncall = (function(id){ alert(id); }); </script> <?php if(isset($_get['id']){ echo "<script>functioncall({$_get['id']});</script>"; } ?>

0
Q: Windowsphone to PHP communication through Webclient

Frank ProvostI want to upload an Image i selected with the PhotoChooserTask. The Selection itself works fine and i can open the Image. I also already decoded it to Base64 (Works). Since I can't find any working example on how to work with httpwebrequest on windowsphone I tried it the following way. pri...

0
Q: PHP for loop not getting all posted values

charlieI have a HTML Form where i can add rows dynamically, every time a row is added the number in my input field goes up each time each row there are 4 input fields and each one has the number on the end of the name on my submit page i have this PHP for loop: for($x=1;$x<=$_POST["number"];$x++) { ...

0
Q: PHP/SQL date sorting outputs nothing

KojakIt seems I'm having problem sorting my output as date. The column is date_added, but it does not seem to work very good. Here is my queries and loop, but the script doesnt seem to output anything at all! $select_votes = mysql_query("select * from images count(*) as TotalOccu...

0
Q: How to create pagination when using data from xml file

chirag NandwaniI am creating a search result page using json/XML over a link. I successfully fetch the data using for each but as there is a loop i can not able to set a pagination. There is no database from which i can get data and use pagination. Thanks in advance for help

-4
Q: How can I read user input using php alone

puchuHow can I read user input using php alone. I'm using form tags for handling user inputs.How can I do the same with Php alone.

0
Q: Yii application and Mibew chat to be compatible with each other

abramsenI use Yii framework and in the framework i use 3rd part application which is Mibew Messenger (or chat ).The both application have their own databases (the both have user table). The problem is next, 1st when i log in into my "main" application with username and password i want to be able to log ...

0
Q: Android get data from MySql table

roshanpeterI am developing an android app... where I developed a table in MySql and table has certain results for values of 1-10 and all the values are entered seperately ... in my android application when a particular value is displayed the result of that value has to be taken from the table... but it is ...

0
Q: Trying to configure ArrestDB. Something I think is wrong with my Data Source Name.

Brandon WillbanksI am trying to configure ArrestDB to create an api for my site. https://github.com/alixaxel/ArrestDB As it says in the installation I need to change the $dsn to: MySQL: $dsn = 'mysql://[user[:pass]@]host[:port]/db/; Currently I have $dsn = 'mysql://user:password@localhost/database/'; I trie...

0
Q: Sort results alphabetically in a recursive function

AnibelI was obliged to use a recursive function to fill a drop down list, however, when I tried to display results in alphabetical order using ORDER BY it didn't work! Below is my recursive function: function tree($root) { global $conn; $n=0; $result = $conn->prepare("SELECT id, name FROM perso...

0
Q: is running a repeating sql event scheduler every 1 second too taxing?

mickerI cannot find any answers to this anywhere. Is running a repeating sql event scheduler every 1 second too taxing for the server?

0
Q: php - Declare a global variable once within a class as aposed to within every function

TheApptrackerI would like to assign a global variable within a method that is within a class. Currently I have this setup and it works perfectly, but as you can see I have to declare the global in every method within the class. class myclass { public function functionOne($SqlVal){ glob...

-1
Q: php print page with header and footer in all pages depend on no of rows

Shivesh JaiswalHi i have a sql statement with php code and this query results 72 rows now i want to print this report but i want header and footer in all pages and every page limits only 25 rows. how to do this. here is my code <?php echo $header; $con=mysqli_connect("162.9.9.9","root","","lotuserp"); if (my...

0
Q: Using PDO with MySqls Like %%

jmenezesI failed with this. Despite all the answers here, I just cannot get this right. How do I bind a search term when using like in mysql with php's pdo? $searchTerm = 'kfc'; $stmt = $conn->prepare("select name from table where name like CONCAT('%',:searchTerm,'%')"); $stmt->bindParam(':searchTerm', ...

0
Q: Is it possible to combine two Mongodb queries ? #php

SreenathActually I have to date ranges, one is actual date range and the other is comparison date range. For each date range I'm executing two different queries. I selected aggregation method. Code I wrote for each date range is .. $resultsetpre = $db_1->command(array( 'aggregate' => 'ACCOUNT_PERF...

-1
Q: You have an error in your SQL syntax - Update SQL

user2536680I have the following code mysql_query("UPDATE `stocks` (`price`, `open`, `high`, `low`, `chng`, `time`, `percent`)VALUES('$pricez', '$openz', '$highz', '$lowz', '$changez', '$times', '$percentz' ) WHERE `symbol`=$symbolname"); And, it keeps throwing the following error: You have an error in ...

0
Q: application/msword insead of application/vnd.ms-excel

piernikBoth functions (mime_content_type and finfo_file) returns wrong mime type (application/msword) of my xls file. Question is why? This tool http://mime.ritey.com/ returns proper mime type - application/vnd.ms-excel I use script for attachement management for webmail and it has to be very universa...

0
Q: filtering the data based on different Ids using php and ajax

user2956205Hi Friends I am Generating report based on different ID's.please give me the suggestion to write function using php.how to use the ajax responce for this. please some examples for this using ajax and php. for example redbus.in filtering.I want to use same functionlay for my report.please pleas...

3
Q: How do I get the last used variable in PHP?

rubo77in bash there is something like $_ which is a temporary variable that stores the last argument of previous command is there such a thing in PHP or how can I access the last used variable in the script? this would be very handy for simple debugging functions.

0
Q: PHP CSV upload checking and skipping headers line

Sabri if ($_FILES[csv][size] > 0) { //get the csv file $file = $_FILES[csv][tmp_name]; $handle = fopen($file,"r"); //loop through the csv file and insert into database do { if ($data[0]) { mysql_query("INSERT INTO PowerFlex (customerCode, postCode,Name,...

0
Q: Display an image before each tag in Wordpress

Camilla WestinI have made custom posts with custom taxonomies. I am now trying to display an image in front of every custom tag. With the code below I can only se an image in front of the first tag. I'd like the image to show before every tag. <?php the_terms( $post->ID, 'case_tags', '<img src="theimage" />','

0
Q: Value of Array is Sting not integer

MarkPI have a multi-dimensional array which I need to pass to Google Charts. The script is called via Ajax, runs three times and then passes back the array json_Encoded. I then needed to add headers to the array so I used array_unshift(). here is the script $dataArray = array(); $i = 0; ...

-1
Q: Can I run a CRON job for an hour

Peter StuartI am creating an app that requires a CRON job to be executed every 60 seconds. My host only allows a CRON job once an hour. I was wondering if I could create a script like this: $i = 0; while(1==1){ // update database code delay(10000); // $i is incremented once a minute/10000ms $i++; } //i...

0
Q: Magento indexer.php - Duplicate entry occasional errors

Raul SanchezWe have a customer with a huge catalog (around 100k references) synchronized every night with an external ERP The synchronization process does not anything strange, just set some data for products & then save() them, using Magento methods & try/catch checks, so we can be sure the saved data is a...

0
Q: change label html from within the page

user2865808hi i'm new at programimg web pages, but i have this question, i need to change several labels in a html page an i need the change to be permament, the thing its i want to change it when the page its already loaded in the web browser, so however visit the page can change the labels. some friend ga...

0
Q: Laravel 4 - Dinesh/Barcode - QRCode

SinpatogoI downloaded this package : http://registry.autopergamene.eu/package/dineshrabara-barcode and i don't understand how does it works. I would like to generate a QRCode. But there is no documents which explain us how to create a basic qrcode. Someone ever tried this package and can explain me ho...

-2
Q: Coin game in php

user2956240Basically my problem is the following, two friends are playing a game in where they put all coins on a board in three piles, they can take the coin from whichever pile they want and I need to know who has the chance of wining more. The player x will always start first.

-2
Q: How seperate one array to two array by php

NguyenI have this array: $array = array(1,2,2,11,1,3,1,4,3,1); I want to seperate it to two arrays: $arr1 = array(1,1,1,1); $arr2 = array(2,2,11,3,4,3); How can I do?

0
Q: MySql timestamp query and comparison in monthly and weekly

Christian Burgosi have a table where i enter entries for applicants. it has a column date_added where the type is timestamp and the default is current_timestamp. i want to make a weekly and monthly report but i can't decide what would be the best thing to do. i need an sql statement that return the number of ent...

0
Q: E-mail not getting sent in PHP

user2956287I have the following code in a PHP file. $to = $row['EmailID']; $subject = "XYZ"; $message = "yes!!!!"; $from = "pallav123goyal@gmail.com"; if(!mail($to,$subject,$message,"From:" . $from)) { echo "Confirmation E-mail couldn't be sent to " . $row['EmailID'] . "<br>"; } else { ...

0
Q: Parse Mongo Json object to android [Display hello world from mongo to android applcation

peterodoherty92I need to parse data from a mongodb collection to android application where i will its can be parsed by json and displayed in the android applcation. `database->collectionName; $document = $collection->findOne(); echo json_encode($document); ?>` this is the php code for my web service i conn...

-1
Q: how to update if two row is same in mysql

user2938105this code is select item name and update value and i want if item name and company name is same then update like that $result = mysql_query("UPDATE stock SET quantity=quantity - $quantity WHERE itemname='$itemname',company='$company'") but its not working it is showing this error You ...

0
Q: How to write the .htaccess file?

Billeh SarkozyAnyone to help me re write this http://halisi-kenya.com/articles.php?id=30 to http://halisi-kenya.com/articles/tile-of-the-article

0
Q: Yii Framework syntax error, unexpected end of file

KonterI know parse error and such things are programmers 101, but I cant find whats wrong with the file and the error "syntax error, unexpected end of file" Following the tutorial helps me a lot getting to know php and Yii, but maybe the error isnt in that file, maybe somewere els. Hoppyfully you can...

0
Q: Can´t set cookies | SET-cookie header correctly

idontevenI can´t set cookies with setcookie(). I thought it´s really easy to set cookies with this, but it won´t work... What I found was this: Something to add cookies in a header with "set-cookies". This should solve my problem (I guess, didn´t try by now). Set-Cookie Header With Multiple Cookies Th...

0
Q: MySQL to MySQLi Convert Samples

Nenad dvLIf someone could just show me how to replace / fix it for mysqli I'd appreciate. Here are two examples, so I can learn from them and go through to fix everything required. Sample 1: include dirname(__FILE__) . '/database.php'; mysql_select_db(databasename, mysql_connect(server, user, pass))...

0
Q: OOP PHP make separate classes or one

user2956219I'm studying OOP PHP and working on a small project but I have hard time grasping some concepts. Let's say I have a list of items, each item belongs to subcategory, and each subcategory belongs to category. So should I make separate classes for category (with methods to list all categories, add n...

0
Q: Sending a PHP response to specified webpage

ChronnieI got a tiny question about PHP responses. I tried the tutorial provided by W3C School about Ajax and PHP. Everything worked fine. But now I want to send the response to another webpage instead of the webpage that triggers the event. This is my AJAX Code: function remote_function(int) { ...

0
Q: Generate links from folder names and link to file within. PHP

user2956284I'm trying to recreate this in PHP but having some difficulty. Basically I'd like to open a blank page with a List of of all folder names within a given folder. These will be presented as links, linking to the same PHP file I made earlier. i.e. folderA folderB folderX folderY If these were th...

0
Q: Why does my PHP site alternate between two cookie values?

samejeansonI'm currently building an online shop where you have many options to configure your product before buying. All configuration data is stored in the PHP session on the server. Although we have a separate button for starting a new configuration, it turns out that when helping clients many of our emp...

1
Q: cake : how to update a specific field in HABT relation?

Moyed AnsariI have $hasAndBelongsToMany relation between projects and documents and they are linked with associative table projects_documents(id, project_id,document_id). Something likes that class Projects extends AppModel { var $name = 'Projects'; var $hasAndBelongsToMany = array( 'Documen...

0
Q: Get Meetup events data through meetup open events stream in php

Sheikh JamesI am trying to get meetup events data through meetup open event stream API. http://www.meetup.com/meetup_api/docs/stream/2/open_events/ i am using the following code for get data . // Open a stream in read-only mode if (!($stream = fopen("http://stream.meetup.com/2/open_events", 'r'))) { d...

0
Q: Uncaught SoapFault exception: [SOAP-ENV:Client] true in

Bhavin Ranai m using php soapclent, other calls are working good with this URL.here is the snap of the request to be passed. not getting what is the problem ? ( ! ) Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Client] true in C:\wamp\www\ginger\createEditProfile.php:8 Stack trace: #0 C:\w...

0
Q: Radio buttons not working as they should

user2956297I have these two codes. When i submit my form, it always default to a checked no <td><input type="radio" onclick="selbustbl(1)" name="rdo2" id="busyes" value="yes" <? if(isset($_POST['rdo2']) == 'yes') echo " checked"; ?> />Yes</td> <td><input type="radio" onclick="selbustbl(2)" name="rdo2" ...

0
Q: supplying 'id' to the child 'list'(li) of the unorder list (ul) in codeigniter

user2956239normally in HTML we supply ID and class to the li of the ul is as shown below <html> <head> </head> <body> <ul id="ul" class="ul_class"> <li id="list1"> List 1 </li> <li id="list2"> List 2 </li> <li id="list3"> List 3 </li> </ul> </body> </...

0
Q: MYSQL/PHP Try to calculate to columns if checkbox is check

user2956333i have in a table 5 columns 1. pret 2. avans 3. tax 4. withtax (checkbox) 5. total ia want to calculate total with 2 condition: A. IF withtax is Checked then use formula: $values['TOTAL'] = $values['PRET'] - $values['AVANS']; B. IF withtax is unchecket then use formula: $values['TOTAL'] = (...

0
Q: What does Add DROP SYNTAX in X-Cloner of Wordpress mean?

The Quantum PhysicistWhat does "Add DROP SYNTAX" in the XCloner plugin mean? I checked the manual and it says something I don't understand. Add MySQL Drop: Tick this checkbox if you want XCloner to add the DROP TABLE IF EXISTS statement to your generated SQL. This option is only for advanced users. Ho...

0
Q: Postgresql select people you may know orderded by number of mutual friends

user1026090I'm building a social network, and I want my members to be able to easily find new friends. Just like in Facebook, I want to suggest them some people they may know by the number of mutual friends they have. My PostgreSQL database structure for friendships is as following: > PROFILES_FRIENDSHIPS >...

1
Q: I want to insert multiple data into multiple rows when a submit button is clicked in codeigniter

user2733443I want to insert multiple data into multiple rows when a submit btn is clicked Below is my html form <?php echo form_open('daily_shop_performance/insert_missing_records');?> <table class="table" style=" width:100%; "> <thead> <tr> <th>Days</th> <th>Shop ID</th> <th>Date</th> <th>Takings</th> <th>...

0
Q: Strict Standards: Only variables error -

user2956374I developed a joomla site (3.1.5) on url http://www.develop.breede.co.za and on there I have a PHP script for a call rates calulator that worked perfectly. I then moved the moved to http://www.breede.co.za and no3w the script works perfectly, but I get the following error: Strict Standards: Onl...

0
Q: how to create a sandbox merchant account in American Express payment Gateway API

user2956371I like to integrate the american express payment gateway API in my website. Is there is any posibility to create sandbox user account in AMEX. Can anyone suggest me how to create API user credentials in AMEX?

0
Q: PHP DOMDocument: Can't read Facebook RSS feed?

lauthiamkokWhy can't I read the Facebook RSS feed with $xml = ("https://www.facebook.com/feeds/page.php?format=rss20&id=34468042582"); $xmlDoc = new DOMDocument(); var_dump($xmlDoc->load($xml)); result, boolean false But when you place this address below on your browser, you do see the RSS feed, ht...

0
Q: Best way to pass and handle multiple parameters to an API

MusterknabeI'm creating an API that handles user data via $_POST. The API works as it is. What I want to do know, is to accept multiple URLs as $_POST parameter. But how would I do that? I thought the best way is that the user passes the values like that $array = array ( 'id' => 'id', 'id' => 'id2' ); Af...

-2
Q: SELECT query having 3 tables

pascale abou abdohy all, i have 3 tables in which i use the following query: $getquery = mysql_query("SELECT u_fullname , p_name, grade FROM description, users, projects WHERE description.user_id = users.u_id AND description.project_id = projects.p_id GROUP BY u_fullname, p_name, grade LIMIT $start, $per_page");...

0
Q: Extract using php on google app engine

divyenduzHow can I extract a zip file using php running on google app engine. I tried the ZipArchive class but it gives a class not found exception on google app engine.

0
Q: PHPmailer sending 3 duplicate emails when submit is pressed on a form

user2956222I have an issue with phpmailer sending duplicate emails, the phpmailer versions is 5.1, the code is below but I cannot find the error. I get 3 emails from the same contact form with duplicate content. Does anyone have a fix or can see the issue? } if(!function_exists('ProcessFormr')) { functio...

0
Q: How to redirect to a new page from alert popup in jquery?

JSLoverI'm having a radio button group of three radio buttons with same name but different ids as follows: <p class="custom-form"> <input type="radio" name="generate_paper" id="generate_paper_manual" value="manual" checked="checked" onChange="change_paper_generate_type();" /> <label for="genera...

0
Q: HTTP authentication header character limit for basic authentication?

Daniel CarvalhoI've researched that there is an overall HTTP request size limit, and read this is normally a restriction set by Apache. But considering there's a bunch of other headers I could send through, that I'm not, I highly doubt I'm reaching the overall request size limit. All I'm doing, is HTTP Basic a...

0
Q: CURL get one specific array

Michel VertongenI found this code on internet and its works, but it outputs like this Array ( [IP Address] => xxx.xxx.xxx.xxx [Country] => Netherlands [Region] => Regoin [City] => City => provider ) I just want to get the city in table 4 ( maxmind ) and outputs only the city instead of all the other things H...

0
Q: Edit data from blog in Iframe

holienI'm currently building a blog from scratch and I'm using php, javascript + Iframe to add new posts to the blog, and this works perfect. The problem I'm having is my "Edit post" function. When I'm editing a post it should fetch the posted text, and it sort of does. However it's got a Not found hea...

0
Q: Where to put some view code in Cakely way

user2956391Hi everyone and thanks for answering. If i want to remove some code from a view for simplify it, what's the correct way? I've created an element in Elements/model/some_code.ctp and call it from the view.ctp but my colleague suggests me to create a file in View/Controller/some_code.php and call ...

0
Q: PHPVideoToolkit - Fatal error: Class 'PHPVideoToolkit\Trace' not found

behz4dI want to use the class PHPVideoToolkit, and I just downloaded the package from Github, and after copy pasting it to my localhost to see the examples, I'm getting: Fatal error: Class 'PHPVideoToolkit\Trace' not found in E:\xampp\htdocs\video\examples\includes\bootstrap.php on line 13 Not foun...

0
Q: PHP simple form validation - help needed

user2955356Ok, what I'm trying to achieve is a very simple form validation like the following. Name: [required, min length: 2, max length: 255] Email: [required, min length: 3, max length: 255, valid email format] Date of Birth: [optional, format: dd/mm/yyyy] However I'm getting the following error whe...

0
Q: Foreach with if/else outside it's function

jerryI'am creating a Joomla Template (Joomla 3) well some of you may have experience with this, and will recognize the problem I got. When you insert Modules in to you template and leave them empty, it's still uses some space. To prevent this i would like to add a variable CSS class. As solution used ...

0
Q: Select players as team and mark in db as selected

custombrandsi have one table named players with 2 columns: players and status I need to select unique random teams! Every team has X players as: Y base and Z pivots Y and Z its set due input form If in insert 3 for base and 2 for pivots The result should be like 3 teams or 3 players: team 1 Base 1 Pivot 1...

-2
Q: Notice: Undefined variable: ids in

user2956413i have a script that works fine for years and suddenly i face this problem : please check the code and mend any solutionplease. any kind of help willbe appreciated. Notice: Undefined variable: ids in /home/content/a/t/a/ataasaid1/html/category.php on line 4 Notice: Undefined variable: id in /...

0
Q: Passing PHP variable to JwPlayer

SylphI'm looping the video URL from database and each video has a certain frame that I would like to "seek" to. I'm using the "seek" function provided from JwPlayer. However, I can't seem to get it right on how to pass the variable to JwPlayer javascript. Below is my JS for JwPlayer $('.video').fan...

0
Q: Slider captions remain fixed while slides are looping correctly in wordpress

AdrianI have the following code in wordpress index.php <div id="sliderwrap"> <!-- Start Slider --> <div id="slider" class="nivoSlider"> <?php query_posts( 'category_name=Uncategorized&posts_per_page=3' ); while ( have_posts() ) : the_post(); ?> <?php the_post_thumbnail(array(...

-3
Q: PHP set a variables from $_GET['var']

jmenezesIs it possible to set a variables value from a $_GET['var'] doing somthing like this: if( $foo = isset($_GET['foo']) ) // Or something close to this. I.e if $_GET['foo'] is set assign it's value then and there instead of this like I currently do if( isset($_GET['foo']) ) $foo = $_GET['foo'];...

0
Q: PHP how to secure password in database

LodhartI'm using data from another server (not my server) and I need to login to this server. So I need to know password for every user account. I need to send this password to the server through HTTP request (no problem). But the server expect unsecure password. So if the password is '123456' I have ...

0
Q: Failed to load resource: the server responded with a status of 500 (Internal Server Error) - Testlink php

user2956452I have installed testlink in my ubuntu server. Some of the pages are showing empty. When I enable display errors on . I got the following error in my browser. Help me to get rid of this issue. Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/test...

0
Q: PHP arrays replacement

user2903728$data = Array ( ['key1'] => 1 , ['key2'] => 20 , ['key3'] => 11) $key1 = Array (1 => "a" , 2 => "b") $key2 = Array (1 => "a" , .... 20 => "y") $key3 = Array (1 => "a" , .... 11 => "n") what is the easiest way to replace all values in $data array to return: $data['key1'] = $key1[$data['key1']]...

0
Q: Error when using XHProf and XHGui

codecowboyI have installed and configured XHGui as per the instructions here: http://www.sitepoint.com/the-need-for-speed-profiling-with-xhprof-and-xhgui/ However, when I try to profile a page I see an error inserting into the details table (have truncated this as there is a large string of binary/compre...

0
Q: How to use sanitation with Wordpress Built-in functions?

Dejo DekicI am having an issue with understanding when to use (or not) Wordpress sanitation functions. For example according to Codex this is how we can use get_month_link() to create a "posted on link" (so when we click the link it will take us to list of posts published at that time). <?php $archive_yea...

0
Q: php index.php, add to cart issue

user2950085I am having trouble executing this code in my index.php. It says 'CartAction not set' I need your help php gurus. I can display any files you need to fix this error. Here is the code: // Handle AJAX requests if (isset ($_GET['AjaxRequest'])) { // Headers are sent to prevent browsers from c...

0
Q: CURL get specific arrray

Michel VertongenI found this code on internet and its works, what this script does is go to http://www.iplocation.net/index.php?query=223.196.190.40&submit=Query and get the information of country, city, ips etc. outputs it like ; Array ( [IP Address] => xxx.xxx.xxx.xxx [Country] => Netherlands [Region] => Rego...

0
Q: Google map is not update new geolocation when i moved the marker to new position

Alexthis is my google map code. I'm trying to update new latitude and longitude when i moved the existing marker to new position. But I don't understand why the following google map code is not updating the new latitude and longitude when i moved it to new position. Can you tell me what is the wrong ...

0
Q: How-to include if(isset inside a query

user2838753This little piece of code gives Notice: Undefined index: . I know it can be fixed by using if(isset()), but I have no idea how to place this on the correct matter in this $query line. Tried a lot, but can't get it right. <?php $query = mysql_query("SELECT `id` FROM `place` WHERE `placeno` = '...

0
Q: PHP Simplexml not showing id

user2956473I am trying to show the document id wich is show in this feed: http://www6.lexisnexis.com/publisher/DataFeed?Action=GenerateXml&orgId=102593&topicId=all Now this is my code: <?php $completeurl ="http://www6.lexisnexis.com/publisher/DataFeed?Action=GenerateXml&orgId=102593&topicId=all";...

0
Q: PHP/XML help google store locator tutorial

user2954486umm basically I'm relatively new to PHP, I've been trying out tutorial (see link below) and I keep on getting an error, I've googled it but nothing seems to work :S The error I get using Chrome is: This page contains the following errors: error on line 1 at column 3: xmlParsePI : no targ...

0
Q: JSON OUTPUT in spanish language

Sam KhannaI am working on an ios app and developing web services in PHP. This app is in spanish so I want all the json results should also be in spanish so that I can display them directly. All the third party api's like google and bing translator are paid. For example: I want to convert {"name" : "sa...

0
Q: Using a PHP session variable within a MySQL file run in PHP?

Sean LimpensIt might sound a bit confusing, and perhaps what I'm doing isn't right at all, but here goes. Our users can upload .csv files containing their school's data, exported from an external management system called SIMS. Once they upload that file I want to run a .sql script that updates our database ...

0
Q: CrossBrowser: File Upload Issue (HTML+PHP) - NOT TO UPLOAD IMMEDIATELY

E2BIs there a possibility to NOT upload a file IMMEDIATELY, but to store maybe in an array to upload it in a later step? I want to ensure is that the user can navigate freely between the form pages and then upload the files in the last step. The only way I know is to encode the files and store them...

0
Q: php / apache2 - shorthand if (bug - discussion, finding an explanation)

Markus SteindlThis is something very weird I could not explain, but probably some of you already found the same or a similar issue? Imagine the following pseudo PHP code: <?PHP mysql_connect("localhost", "mysql_user", "mysql_password"); mysql_select_db("mydb"); $result = mysql_query("SELECT id, my_nam...

0
Q: create a playlist using deezer

Stanislas PiotrowskiI'm trying to do a library using deezer Iframe So in database I store all the id of the the playlist I want to display And in front office I have that code <table style="width:100%"> <tr> <td>Nom de la Playlist</td> <td>Date</td> <td>Genre musical</td> <td>A...

-18
Q: Convert php to javascript

user2404977I have a problem writing AJAX. Can somebody convert this php to javascript. ASAP. <?php $a=file_get_contents('/cms/6700893/value_4the.txt', true); $number = 236+$a; $filename = "axh".$number.".txt"; $file = file_get_contents('/cms/6700893/'.$filename, true); ?> Thank you

-3
Q: PHP Simple Form Validation

user2955356Ok, what I'm trying to achieve is a very simple form validation like the following. Name: [required, min length: 2, max length: 255] Email: [required, min length: 3, max length: 255, valid email format] Date of Birth: [optional, format: dd/mm/yyyy] However, once i click submit (either if the...

0
Q: PayPal IPN e-mail not sent in Live mode, but works fine in sandbox mode

John Doe SmithI wanted to go live with a site today, but PayPal doesn’t work correctly in live mode! :( In sandbox mode everything worked fine: The user clicks a button on my site, is redirected to paypal and after payment he receives an e-mail with a download link via IPN and is redirected back (automaticall...

0
Q: Value is NULL Codeigniter

JohnSmithIm trying to create the following statement (which works): SELECT id, COUNT(*) AS item_count FROM message WHERE user_id_to = '1' AND read_date IS NULL GROUP BY message_id With Codeigniters Active Record. My code looks like this: $this->db->select('id'); $this->db->from('message'); $this->db->...

-1
Q: I want to be a programmer, work in corporate environment, earn well, learn fast and also become a great programmer.

Shin SanI'll try to keep this simple: I'm 29, been dabbling with computers for the past 10 years, had entry level jobs in tech support for different apps, been fixing computers for a while and now want to specialize in something. I'm not 100% stranger to programming but haven't gone past if/then/e...

0
Q: PHP PNG image creation outputting wrong colors

chaenselI am trying to put an png overlay over an underlying png file. The script works just fine, but instead of giving me the overlay colored as it should be, it is outputting it in gray color. But only the overlay image is gray (bg-color of the overlay, which is basically a border for the underlying ...

0
Q: Making form fields conditionally read only (PHP)

ChrisLet's say I have several series of form fields in table rows: f1, f2, f3; g1, g2, g3; h1, h2, h3 etc. Now let's say that I have a username stored in a PHP session variable that may match a field value in one of those series. Here, the field value that might be a match would be f1(echo $row['pers...

0
Q: Some help to factorize code base on permission

user2956550Morning, with this code (symfony mask builder) MASK_VIEW = 1; // 1 << 0 MASK_CREATE = 2; // 1 << 1 MASK_EDIT = 4; // 1 << 2 MASK_DELETE = 8; // 1 << 3 MASK_UNDELETE = 16; // 1 << 4 MASK_OPE...

0
Q: Getting the request headers send via file_get_contents()

Szerémi AttilaWhen using file_get_contents() to request an external URL, how can I find out what headers I've sent, or alternatively what headers I am about to send? I'm basically looking for a request counterpart for $http_response_header or anything else I can use to extract the same data. I know I get to s...

0
Q: PHP XMLreader to MySQL: put Id value in every insert

user2956549I'm currently working with XMLReader, which I'm using to try and parse certain elements into a MySQL query. test.xml <item> <id>100</id> <productdata> <g:material>paper</g:material> <g:size>25cm</g:size> <g:price>69 EUR</g:price> </productdata> <productdata> <g:material>paper</g:material>...

0
Q: Aarki PHP postback need help to make postback.php

user2956586http://i.stack.imgur.com/mBYxt.png Hello.I need some help about aarki postback.I will use Aarki SDK and need to Aarki postback files. Can anyone help me about how to make postback.

0
Q: Import file from one server to another

user2711135I am looking for the best way to save image located on the web( example: http://website.com/image.jpg) to my server(upload from the internet). I am lookign for a methos in php or JS. Thank you.

0
Q: php exec() syntax check

BorislavThis works in the command prompt(in one line) : cd C:\Program Files (x86)\LibreOffice 4\program && "C:\Program Files (x86)\LibreOffice 4\program\python.exe" unoconv -f pdf d:\class1.doc but when it comes to do the same in PHP's exec() nothing happens - neither message nor any file, probably ...

0
Q: How to make dynamic php divs for content instead of hard coding html

RobbieP14383I have written from a tutorial, the code below which gets the content from a table in the db but the divs that the content are in are hard coded into the html file. How can I turn this code into something that will create as many divs as necessary depending on the quantity of the content. I mean...

0
Q: php pdo construct mysql call extremely slow on drupal 7 site using nginx and php-fpm

williamelworthyI have a drupal website that is calling the static PDO __contruct for a mysql connection, on a remote server at first and then changed to a local server to remove network latency for sanity checking. On the local db call I am getting the following generated from xhprof and an extremely slow page...

0
Q: Nortel Baystack 5510 snmpwalk PHP

user2956620I have Nortel Baystack 5510, LAMP (PHP 5.5.5) and snmpwalk script (mac-adresses) <?php @Header('Content-type: text/plain; '); $a = snmpwalk("192.168.xxx.xxx", "public", ".1.3.6.1.2.1.17.4.3.1.1"); $keys = array(); $values = array(); $array = array(); foreach ($a as $key => $value) { $keys[$key]=...

0
Q: Read blob image from database

user2956642I am trying to display my images uploaded to my database on my PHP website. I have the following code. This only displays the blob binary value. I want it to be an image. If I add a content-type header is gives me a blank page with an broken image. include 'core/database/connect.php'; $q = "SEL...

0
Q: Why ajax call does not work on IE7

user1960170I am developing an app for a company i work for but this ajax call only works on IE9+, FF, Chrome . I've been reading around without much luck. Here is the code i have.It is pretty simple: var request_getShoppingCart = $.ajax({ url:"classes/sCart.php?action=getItems", cache: false, });...

-2
Q: incorrect if statement value returned

green green grassI have an apparently trival if statement that just won't work correctly. if (!empty ($_POST['interest']) && (float)$_POST['interest'] >= 0) { when $_POST['interest'] is 0 or positive it should return true. However when it is 0 it is currently returning false incorrectly. What is going on here?

0
Q: How to write custom url for users

user1477731I'm currently redirecting users to www.example.com/admin.php?id=shop1, but I want the url to look like www.example.com/shop1 . How can I use mod_rewrite? Thanks

0
Q: html and php form field and submission

user2647160I have a short html form and some php code on the same page so that when the form is submitted, the entries appear on the same page. This code works as far as posting the entered information from the form to the page, but I have 2 problems: The text box for some reason was only letting me enter...

0
Q: Are PHP frameworks needed in this specific situation?

henrehSearching finds a few specific questions about the value of PHP frameworks, and I'll go into why I don't think they apply here. Basically, I'm embarking on a PHP app with one, maybe two other developers. I've been wondering about doing it with a framework and have been extensively researching Ze...

0
Q: getCustomizationId operation: Netsuite API and PHP Toolkit

user2650211I am having exactly the same problem as here: Missing "getCustomizationId" in netsuite 2013.1? I just refused to give up on it. I have investigated further and by running the code in the post just pasted I get this error: Stack trace: 0 /home/netsuite/PHPToolkit_2013_1/PHPToolkit/NSPHPClient.p...

-1
Q: How to edit .htacccess file programatically

Mike0I am working on some kind of php MVC framework and i want only some files to be accessed on the users request. This files my vary so it is not a solution to hard code on the .htaccess file. So my question is how can i achieve this logic?

0
Q: php DateTime diff method behavior

Paolo RossiI have to find the days until an expiration date. I tried to use diff method of DateTime class. $dataexp = 2013-11-06 00:00:00 ; $now = 2013-11-05 13:00:00 ; $dtn = new DateTime('now'); $dte = new DateTime($dataexp); $diff = $dtn->diff($dte); $diff ---> display 1 My problem is if the dataex...

0
Q: codeigniter session Error was encountered

coderin my localhost it works perfectly but after uploading it to server i am seeing this error A PHP Error was encountered Severity: Warning Message: Cannot modify header information - headers already sent by (output started at /home/alpha/public_html/blog/application/controllers/h...

0
Q: mysql_num_rows returned with ajax

Christian Burgosi need to pass two dates to a mysql query through ajax. i have two date inputs. this is the index.php that has the input <div id="input"> <td><input type="date" name="date_start"></td> <td><input type="date" name="date_end"></td> <input type="button" class="button" value="Get Value"> </div> <d...

0
Q: Joomla3 component add additional registration fields

XavjerI am currently creating a shop-like component for Joomla 3. For this component, I will need some additional user-fields (Address) for the processing of the order. My question is as follows: What would in your opinion be the best way to achieve this: Edit the Joomla Login component and add the...

0
Q: Twitter does not authenticate new customers

dev-nullI have an application with approximately 200 users that sends status updates for them on a cron job that runs every minute. The users are checked each minute and if they're due to send a tweet then they are added to the queue. The users set a time interval for how often they'd like tweets to be s...

0
Q: Create file from JFIF data

Erik DolorI have a dump of our LDAP database, and i'm attempting to extract all images from it using PHP. The images seem to be stored in JFIF format (at least, according to http://tools.ietf.org/html/rfc2798#page-5). However, i can't figure out how to create a JPEG file from this; I attempted file_put_con...

0
Q: Web service AJAX Post on iOS getting error 400

ByteBackground: I wanted to create a hybrid application that can change form factor at will. This requires the app to embed a webView. This webView also should be able to talk back to the back end server. I host the back end on my Mac (localhost) with really small php code. API <?php function get...

-7
Q: What is the best language to develop a Project Management web application?

user2956697I have knowladge about Java, JSP, Servlet, php, html, css. Now I'm going to develop a project management web application. Can anyone tell me what is the best language for this project. And please help me to find resources.

-2
Q: My contact form isn't working

RicoI received this code from my host for my contact form <?php $request_method = $_SERVER["REQUEST_METHOD"]; if($request_method == "GET") { $query_vars = $_GET; } elseif ($request_method == "POST") { $query_vars = $_POST; } reset($query_vars); $t = date("U"); $file = $_SERVER['DOCUMENT_RO...

0
Q: Fetch array and Insert Into different database. Increment variable in Insert string?

PerdI have tried several different methods of implementation for this and can't seem to get the last little bit correct. The most efficient is obviously the best scenario but at this point it's second to getting it working. I'm attempting to pull data from the Syspro connection and inserting it into...

0
Q: Read image blob from database

user2956642I am trying to read my uploaded images on my PHP website. I used the following code: include 'core/database/connect.php'; $q = "SELECT * FROM uploadarchitect"; $r = mysql_query("$q"); if($r) { while($row=mysql_fetch_array($r)) { echo "<

1
Q: DOMDocument, get images AFTER first <h1>

PixarkI am trying to get all <img> tags after the first <h1> tag, but I can't quite figure how. Currently I am able to get all <img> tags from a page using this code: $html = file_get_contents($this->url); $this->doc = new DOMDocument(); @$this->doc->loadHTML($html); $tags = $this->doc->getElements...

0
Q: Joins in codeignigters datamapper

CiaranI have been unsuccessful in attempt to convert this join statement from Codeignigter's active record to codeignigter-datamapper Here it is ->join("table AS t", "p.another_column = t.id", "inner"); Unfortunately i have no idea how to perform a join using datamapper as the documentation is ver...

0
Q: Wordpress [gallery] Shortcode Modify

Rasel AhmedI am going to add a new gallery function in my wordpress theme. If I use gallery as file, it will hyperlink with its caption. Example foreach ( $attachments as $id => $attachment ) { if ( ! empty( $link ) && 'file' === $link ) $image_output = wp_get_attachment_link( $id, 'full', f...

-1
Q: MySQL Invalid parameter number: no parameters were bound

drhirnI'm trying to learn PHP and have this code: $rating=1; if (!empty($rating) && empty($cat)) { $sql = $sql ." WHERE ImgRating = :rating"; $stmt = $dbh->prepare($sql); $stmt->bindParam(':rating',$rating,PDO::PARAM_INT); } if (!empty($cat) && !empty($rating)){ $sql = $sql." WHERE FIND_IN_SET...

0
Q: Roundcube Stand alone version - logins

MrTechieOk, so I have a question and need some help. I have a stand alone roundcube installation that I have installed on the server. I have it setup for the most part - correctly. I can send and receive emails with it and such. I can even use an imap script to check the amount of inbox messages for that...

0
Q: Android my app crash with the httpclient.execute(httpost)

Dekel MamanI'm trying to send some string to some php file and get JSON variable back. Now I'm stuck on the send my strings to my php file, I tried a lot of combinations from many tutorials, all of them crush in the: httpclient.execute(httppost); I really don't have any idea why. P.S I gave the INTERNET ...

0
Q: What is this design pattern, and what are its disadvantages?

gh123manI have been working on a large project for about a year now and recently I have started using a new pattern for displaying data. Background I have many derived classes wrapping data in 1:1 linked sql tables with their appropriate base classes. My goal was to keep any and all display code unlin...

0
Q: Passing a php variable to a modal using AJAX

gbestardI'm trying to pass a variable to my modal using AJAX but it's not working. html code <img src="./images/see.png" class="open-modalPropietari" data-target="#modalPropietari" data-id="' . $id . '" > js code $(document).on('click', '.open-modalPropietari', function() { var id = ...

0
Q: php and javascript player base64_encode?

nriderSo I have a player that plays a video but shows the video url in page source which I would like to obscure with base64_encode. One player works with base64_encode and gets the item url with the following php code $filenew = substr($video->filename,$startIndex+1); ...

0
Q: Codeigniter storing session

NgaiI have a website using CodeIgniter as php framework. But there are problems on storing session either on local or database. For codeigniter, it provides two ways to store session, session_cookie (database) and session_native (local). Since my website is ready to clustering, the session cannot b...

0
Q: Create SOAP service with nusoap and provided WSDL file

GoranIs there a way to build a SOAP service using nusoap, with already provided WSDL file? I have to implement a SOAP service, and I was already provided with WSDL file. I achieved that with php_soap extension, but I'm struggling with implementing same thing with nusoap. php_soap example: $server ...

0
Q: In a wordpress post, display the list of posts that belong to the same category as the current post but exclude the current post itself

David BrossardOn my blog, I have a category called "TGIF XACML". At the end of each post, I want to display posts in the same category except for the current post using the wordpress short code [display-posts category="tgif-xacml"] I'm trying to figure out how to automatically exclude the current post. The ...

2
Q: is breaking up large MySql queries beneficial

khartnettI have a MySql table that has about 5.5 million rows of data. Every month I need to reload this data with a new data file. Since it takes a while to remove the old data, I'm adding limit 2000000 to split the job up into chunks. Example: DELETE FROM `list_content` WHERE list_id = 3 limit 2000000 ...

-1
Q: Execute query when button is clicked

PHPnoobI'm used to using POST method when doing this in a form, but this time I am using a table instead. Query: $delete = "UPDATE lmet_datacap_admin.md_lov SET MLOV_ACTIVE = 0 WHERE value='.$value.'"; PHP: echo '<table>' echo '<button type="submit" id="delete" value="'.$value.'">delete </button>...

-4
Q: PHP: Print relevant values from THREE different Arrays

user31066There would be Three different arrays, e.g. $arr1, $arr2, $arr3. I want to print the values of the relevant index of the arrays. Here is what the structure of the arrays would be: array( [0] => array( [0] => 'Roses' [1] => 'Grass' [2] => 'Sky' ...

0
Q: PHP Form Submission Missing Emails

Michael ClaypoolI can not get my form to send the email to me through my host server. I have run an error check using error_reporting( -1 ); ini_set( 'display_errors',1 ); and if($success){ print "EmailTo: $EmailTo<br>". "Subject: $Subject<br>". "Body: $Message<br>". "From: $EmailFrom"; } and...

0
Q: dropping image in dropzone sometimes image turms the other way

ScottI have dropzone working no a site but once in a while when I drop an image in it turns to landscape. This seems to happen more on larger images. I cannot find anyone with this problem so I was hoping someone here has dealt with this issue. Thanks

0
Q: tinymce 4 how to add event handler

Hendry H.In tinymce 3, it seems that we can do this with : // Adds a click handler to the current document tinymce.dom.Event.add(document, 'click', function(e) { console.debug(e.target); }); What is the syntax in tinymce 4 ? Need to do it after tinymce initialized.

0
Q: Parse error: syntax error, unexpected '}'

user2956799I wonder if somebody would spare a minute to look over a code and help me. I'm not php savy and I need a bit of help. i've this message error: Parse error: syntax error, unexpected '}' in /web/htdocs/www.martamagister.it/home/bdztset/modules/mod_captifyContent/tmpl/default.php on line 1 and th...

0
Q: Fetch search results from SoundCloud

Elo PeriCan I make a search query for a song from my site to SoundCloud and get back the data with song's name, artist and url (in JSON or any other format) ?. I checked the API ( http://developers.soundcloud.com/docs/api/guide#search ) but it's not working for me. Does anyone have a solution.?

0
Q: Custom url display same page

Jaskaran S.PMy application creates custom url's for its users. Eg: www.example.com/user1 Till here everything works fine. But the custom pages like www.example.com/about or www.example.com/terms show the same content as of custom URL's because according to my .htaccess file anything after 'example.com/' wil...

0
Q: Echo randomly named file name

TonalDevI have a jQuery/PHP signature module on my website, called 'HTML5 Signature Pad to Image' On iPad, a client signes the box with his finger/stylus and upon clicking 'Submit', PHP creates a random named file, and saves it on a designated folder. I need to have that file name echoed anywhere on th...

0
Q: php-login.net MVC login script gives a 500 error

twiggHello I've recently downloaded the login system from php-login.net from github. Just having a play at the moment I have set-up the code on my local dev using xampp and vhosts (mvclogin.dev). When I visit the address the home page loads as expected but when I move away to any other page it throws ...

0
Q: Form php/html send radio buttons into html email also not filled in items (radio buttons)

user2956852I want to fill in this form / but when filled in i want it to send me all the radio buttons (images) and also the not filled in buttons. for example i get options radio - no - yes - maybe clicked on maybe. When the mail has been send i get it as HTML. looks good. but now i want even th...

0
Q: Display Prestashop new product field on product-list.tpl and home featured modules

nynetsolutionsUsing this tutorial on this page Adding new tabs and fields to Prestashop products’ back office, I was able to add a new field for author for products in my Prestashop. I was also able to display it on product page by adding Product.php to override/classes/ and inserting this code below: class P...

0
Q: Can't install Laravel 4 Grunt

dasmikkoI'm getting this error when running this command: sudo php artisan grunt:setup I'm running Ubuntu 13.04 and using laravel 4. I have no idea what to do now... mikkel@mikkel-K53SV-Linux:/var/www/forum$ sudo php artisan grunt:setup A gruntfile.js or package.json file already exist and will be rep...

-3
Q: mysql 5.5 syntax error

user2956922I am using a custom php application. It worked without any problems on mysql 5.1, but its giving me syntax errors on mysql 5.5. I dont know mysql syntax much, but the errors are somewhere within this code: $Query = "SELECT ".$this->prefix."profiles.id_profile AS ip, ".$this->prefix."profiles.nam...

-1
Q: How to limit WordPress comment box to only accept specified code

user2539631I have modified the Wordpress comment form to just one field so users can post a soundcloud iframe in response to the post. The point of the site is to read the post, create a song, upload it to soundcloud and then submit it as a comment to the post. I need to limit the text box to only accept th...

0
Q: multiple simplexml_load_file in one variable

user2863494I need to load multiple XML files into a variable called $xml. I have an array ($all_urls) that contains the path to each XML file. To acheive this goal I used a method I found here on StackOverflow. foreach ($all_urls as $url) { $xml = simplexml_load_file($url); } However, using thi...

0
Q: php echo not displaying

charrisThis should be a simple problem but maybe it's me that simple instead. I have the following code: <?php $county = $_POST['county']; ?> <?php $cf_id = $_POST['cf_id']; ?> <h2><strong>County: <?php echo $county; ?><strong></h2> <input type="hidden" name="county" value="<?php echo $county; ?>" /> <

0
Q: php pthreads with Apache prefork MPM

Jake BI am trying to compile PHP with pthreads for efficiency purposes, but the way we use php is mod_php and apache prefork MPM. From what I have read, It is possible to compile mod_php with ZTS Enabled ( Thread Safety ). My question was will I run into any issues using Apache prefork MPM and compil...

0
Q: loop out comma separated array value into multi dimensional array

Sean LynchMy PHP app will upload a selected csv file into memory. It is then converted into an array using str_getcsv as shown below. //get file from session variable created in upload.php $uploadedfile = str_getcsv($_SESSION['uploadedfile'], "\n"); //remove first two rows as these contain headers unset...

1
Q: Implode starting from key 1

Joran Den HoutingI got an array like this: Array ( [0] => shop [1] => kids [2] => shorts ) Now I want all the values implode seperated with a slash /. BUT I want to pass the first key, [0]. Doing an implode() on the above will result in: shop/kids/shorts But I want this result: kids/shorts Is this possi...

0
Q: What is wrong with this solution? (Perm-Missing-Elem codility test)

user2956907I have started playing with codility and came across this problem: A zero-indexed array A consisting of N different integers is given. The array contains integers in the range [1..(N + 1)], which means that exactly one element is missing. Your goal is to find that missing element. ...

0
Q: WinXP Latest Chrome Update asks where to save file in link with multiple variables

RyeboflavenThis was just noticed with employees using WinXP machines on the latest Chrome update launched in mid-October. A user logs into the site and their employee ID is saved as $emid. The next variable, $pay_roll, is obviously their payroll information. There are two types of links that open up an MS...

0
Q: Wordpress thumbnail grid with expanding preview

AntoposseI am using this component http://tympanus.net/codrops/2013/03/19/thumbnail-grid-with-expanding-preview/ DEMO http://tympanus.net/Tutorials/ThumbnailGridExpandingPreview/ implemented in wordpress for my portfolio. looking at the html code <li> <a href="http://cargocollective.com/jaimemart...

0
Q: No errors but doesnt write to database

Moses Boltonthanks for taking the time to look at this. No errors pop up, but nothing writes to the database. Can someone help me out with what im doing wrong? <?php $subject = $_POST['subject']; $comment = $_POST['comment']; if(isset($_POST['submit'])) { $connect = mysql_connect(...

0
Q: PHP Code Not working after Upgrading Joomla

Shah GeeI am working on a joomla website. Some developer created a module that displays data on selection of a city. The code was working fine on joomla 1.5 but after upgrading joomla it displays all data without filtering. I am just working on solution. I did not code. Here is the code, is there anythi...

0
Q: Migrate my WAMP application to AWS

gusbeto37I am starting to look at AWS to implement a WAMP based application; I have a huge database, around 20 million data. Can somebody point me to a good place, tutorial or give me some tips as to how make the transition as smooth as possible? I am totally clueless as to using and programming AWS. The...

0
Q: AngularJS html5mode = true error when I access directly url with params

SchwertfischI have an application developed with Angularjs and Symfony 2, I enabled the html5 mode to get friendly urls. The application is integrated with Symfony 2.3 to response at services. app.js .config(['$routeProvider', '$locationProvider','$provide' , function($routeProvider, $locationProvider,$p...

1
Q: Create View from another view in php mysql

AnuI am trying to create a view from another view from php and im not getting any error but it simple does not create a view. I can manually create view from another in the mysql console but not from php. Any idea where I am going wrong? function createTransaction_file($db,$file_id){ $sql = ...

0
Q: can't create link pagination codeigniter

gabrieli can't creae link pagination in codeigniter... why? $config['total_rows'] = $tot_hal->num_rows(); $config['per_page'] = $limit; $config['uri_segment'] = 3; $config['first_link'] = 'Awal'; $config['last_link'] = 'Akhir'; $config['next_link'] = 'Selanjutny...

0
Q: Uploading data into two mysql tables

user2956943i have a problem where i have two tables in a database, one being categories (cat_id and cat name) and the other being jokes (joke_id and joke). I want a user to be able to chose a category and describe their joke, then this being entered into the database with the category of the joke being refe...

-4
Q: how to build a metasearch engine?

user2957017i have been trying to build a meta-search engine using java and php(to send data to google,yahoo,bing!).little help is available on net and what ever information i could find was not seeming correct. i had following queries : 1. is it illegal to display the results of other sites ?(though the en...

0
Q: Set checkbox state after ajax query

tatty27Depending on the value in the mysql database I would like a checkbox to be either checked or unchecked. Although the ajax query is getting the correct value the checkbox always remains checked The Jquery <script type="text/javascript"> $(document).ready(function() { $.ajax(...

0
Q: Any way to change server_addr using php

user2957023I am using cURL to access website but there is some issue. Instead of IP of User (on remote_addr) it is using server_addr Eg remote_addr (it suppose to be user ip) and server_addr are same. I know it is because the code is executed by server not user but any way to achive it. Thank you

-1
Q: My php files are not updating from aptana

user2957039My php files are not updating my website - the text is all black rather than the usual colours. I feel like it's not properly connected but can't figure out how to fix this...

0
Q: GET or import $var as input value to Form after the page is load by using onClick Button?

CyborgI have a FORM with 2 input fields $first_name and $last_name. <? $first_name = get_post_meta($post->ID, 'fname', true); $last_name = get_post_meta($post->ID, 'lname', true); $fname_tmp = 'Foo' ; // First Name TEMP $lname_tmp = 'Bar' ; // Last Name TEMP ?> <input type="text" value="<? echo $fi...

0
Q: Youtube get_video_info & url_encoded_fmt_stream_map

Gigi GamminoStarting from the YouTube API get_video_info, I'm retrieving from a PHP code the url_encoded_fmt_stream_map Everything was fine until this morning when suddenly the fmt_stream automagically decided to get only the following formats: mp4@hd720 x-flv@large webm@medium x-flv@medium mp4@medium x-fl...

0
Q: DRIVE API - Page break in converted HTML document

Alex SuchI'm trying to create a page break on an uploaded file created after a HTML document. When I download a Drive document as a HTML file, the page break is created with a <hr style="page-break-before:always;display:none;"> element. So I tried copying that but it is transformed into a simple <hr> whe...

-2
Q: mysql user defined variables as derived table

Om ShankerI have an array with containing elements myArr[1,2,3,4]. I want to use it as a derived table in select statement. Is it possible "SELECT * FROM myArr as table1"

0
Q: create new object in php

SyspectI understand that PHP doesn't allow me to create a new instance of ClassB inside my ClassA, if the creation is not inside the scope of a function. Or I just don't understand... class ClassA { const ASD = 0; protected $_asd = array(); //and so on protected $_myVar = new ClassB(); // here I get ...

0
Q: Work with windows service (WCF) in php

MajAfyMy boss give me a .net service link which said wrote with WCF. I think the service wrote in wrong method because the service programmer said we don't have problem with this service when we use in asp.net but when I trying to use this service in PHP I have problem. My code is : $url = "http://<s...

0
Q: Get first image only with preg_replace

otinanaiI'm not sure if this is possible only with preg_replace function but I would like to get only the first image and ignore all the other. This code excludes all images in the text I want to display, but I need to get only the first image. if (!$params->get('image')) { $item->introtext = preg_...

0
Q: Why do I get every title of each post when I filter them in single.php

user2957058I am just working on filter titles in pages and posts and everything works as expected but when I view the single.php whereas it shows the actual post as should be, the function hook filter i am working on inside functions.php of my plugin is filtering every title of each post of my blog, I was e...

0
Q: Login problems in linux, session not starting

Arvis AvensI have problem with login system, in windows it works, but in linux session has not start, after login they navigate to page, but page is clear becouse session is not started. <?php $con=mysql_connect("localhost", "root", "") or die("Cannot connect to databases!"); mysql_select_db("registered_us...

0
Q: Upload bitmap from android not complete

user2956957i trying to upload a picture to a server from android through php. But the problem is, that often pictures dont finish the upload. Here is a example: http://imageshack.us/a/img20/743/2ut6.jpg I really dont know where the problem is. Here is my Upload Code: Bitmap bitmap = bildchen; ByteArr...

 
5:11 PM
0
Q: Wordpress Object Values

bcedergrenI am using Custom Post Types with Advanced Custom Fields in Wordpress 3.7.1. Within one of my CPTs I am referencing another Custom Field as a Post Object. When retrieving the Post Object through WP_Query I am able to return the Post Object ID but need to get the text value of the object (the titl...

0
Q: Undefined variable: _SESSION

user2956927help me please, I have my principal page php with a $_SESSION. page1.php <?php session_start(); $consulta = "select t.num_ticketfrom sdg_ticket t where t.cod_tipo_incidente=2 and t.cod_usuario='".$_SESSION['sdg_usuario']."' "; ?> <html> <head> <script> var auto_refresh = setInterval(fun...

1
Q: How to determine if variables are set in an array where dependencies exist

unfrevI have an array of data which, amongst other elements, contains a start date field, an end date field and a duration field. During validation I need to check that at least two of them are set, as you can infer the third from the two you have. Currently my if clause is as follows: if ((!isset($...

0
Q: Symfony doesn't find routes

MatiI have the weirdest problem. Everything was doing just fine and suddenly symfony shows "No route found for "GET /" So i checked router and..none of the routes from my controller were in there. So i added routing to the routing.yml and right now it throws An exception has been thrown during...

-1
Q: JAVA Applet to php sending recursive data

user2554703Gentlemen, good night .. Pasoa explain .. I have a small applet that did .. and what makes it .. read a excel, php send their fields, and row by row recursively .. to perfect here .. but the problem is that I pulled down the apache server .. guess that is choking it with data. anyway .. in re...

0
Q: Get one array from output

user2957155Help with getting a specific array. What this script does is go to http://www.iplocation.net/index.php?query=223.196.190.40&submit=Query and get the information of country, city, ips etc. and outputs it like ; [IP Address] => xxx.xxx.xxx.xxx [Country] => Country [Region] => Reg...

0
Q: Embed FB contents in my website

Luke CageI've a PAGE on FB (not a profile) through which I make events. I want to embed the FB events on my site and I'd the calendar on my site looks like the one on FB, with all the events i created on FB. How?

0
Q: Add a class to every 4th div in loop

user2957151Here is my code: <? for($x = 0; $x < count($groupSmall); $x++){ ?> <div class="col-md-3 meeting-item"> <img src="images/image.jpg" /> </div> <? } ?> I would like to add a new class to every 4th div in this loop. I know it can be done with Modulus but I can't get it to work. T...

0
Q: Efficiently calculate correct price differences

user2842265Hi All I have an array structured as follows in a catalogue describing different price options 'opt254' 14682 => string '0' (length=1) 14683 => string '0' (length=1) 14684 => string '0' (length=1) 14685 => string '1' (length=1) 146...

0
Q: Unable to post array via ajax

nosizejoshI am trying to post an array created in js to a php page var newEventArray = new Array(); newEventArray["title"] = title; newEventArray["description"] = description; newEventArray["type"] = type; newEventArray["visibility"] = visibility; newEventArray["...

0
Q: How to get the first record with laravel 4 raw queries

iyad al aqelHow can i get the first record with laravel 4 raw queries. Something like DB::select('')->first(); is not working neither did DB::first('')

0
Q: pass a jQuery variable on load to mysql table

WickedJennHello all: i have a question regarding a jQuery function and a php variable I have 3 dropdowns that depends on each other to populate themselves from a mysql TABLE. When the window is loaded the Project dropdown has 3 options: 1 2 3, "Type" just A, B(default is A) and "User" dropdown has nothin...

-2
Q: Creating pagination to a framework ( need tips )

user2945583for few days im trying to connect the pagination with FileGator script. I don't really know how to solve this problem ( should it be in the class or on the output file ). Could you give me some advice? Im trying to customize this code - author doesn't have time he told me to ask around. If you ne...

-1
Q: Youtube API Ref codes for PHP?

TitusLooking for the object that allow to get the date of publication of a video. I read Google Youtube API Doc but can't find any in that mess :( I use V2 sentences : $v->getVideoTitle(); Seems like to be easy using $v->getVideoDate(); OR $v->getVideoPublished(); But not workin... Some1 could he...

0
Q: Create A PHP Variable Which Changes The Color Of The Background Weekly

Hamza Abd ElwahabI would like to create a PHP variable which I can echo to change the color of the background weekly. Here is what I had reached so far <?php // set the default timezone to use. Available since PHP 5.1 date_default_timezone_set('EST'); $today = date("l"); if($today == "Sunday"...

0
Q: phpList mails rejected (possibly caused by exchange server)

Stefan SurkampI used an old version of phpList until it stopped working (certainly due to some internal server updates) and thus updated to version 3.0.5 last week. Everything went fine and I was even able to send out a few test mails. Today, I tried to send a bigger amount of mails which caused bad headaches...

-4
Q: How to fill an array with random numbers using for loop in php

user2957160I am sorry if this question is pretty much stupid simple, I am still very new and impatient with php. I have the following question which I can't figure out how to answer. 20. Initialize an array containing 10 elements. Place a random value in each of the 10 elements (from 1 to 10) using a for ...

3
Q: Why do < and > need to be escaped in preg_*() patterns?

BenjaminI've run preg_quote('<>') to check if these characters need to be escaped in a regular expression, and to my surprise, they came back escaped: \<\>. Why do these characters need to be escaped? What is their meaning in a regular expression?

0
Q: PHP Transaction Manager across resources

Dan G.In our Symfony2 project, we would like to ensure that modifications across resources are transactional. For example, something like: namespace ...; use .../TransactionManager; class MyService { protected $tm; public function __construct(TransactionManager $tm) { $this->tm...

0
Q: Regex help for custom fields in emails

Ben SinclairI allow custom fields in emails sent out in my software. I use CKEditor so they can write and format their emails. And example of a HTML formatted email with a custom field is: <p>Hi %firstname%,</p> <p>Blah blah blah.....</p> I use the following code to detect and replace those fields...

2
Q: How can I recover a variable-length number of GET variables via PHP?

warrenIn many languages, you can have variable-length argument lists to functions (eg printf in c). In a current php application I am working on, I have a desire to process X-many variables coming-in via HTTP GET. I am wondering if I need to follow something like DuckDuckGo's GET query format (?q=find...

0
Q: Display Buddypress Profile Field

XarcellUsing the latest version of Wordpress & Buddypress, I am trying to display a certain custom profile field in the WP header.php. I'm terrible with PHP, but this is what I have: <?php global $bp; $the_user_id = $bp->loggedin_user->userdata->ID; if (function_exists('bp_get_profile_field_data')) { ...

0
Q: Symfony2 set user role default User and Role files

Jan KožušníkI have a problem with storing user role into database. I´m using original files written here: http://symfony.com/doc/current/book/security.html and here: http://symfony.com/doc/current/cookbook/security/entity_provider.html logging in a logging out is working. I can save user into database, bu...

3
Q: CakePHP: Error trying to generate a schema

EmersonI'm trying to start using CakePHP schema: app/Console/cake schema generate I get the following error: Welcome to CakePHP v2.3.0 Console --------------------------------------------------------------- App : app Path: /Applications/MAMP/htdocs/mysite/app/ -----------------------------------------...

0
Q: .htaccess Prettifying URLS for PHP

DonaldUrls by default /courses/category?cat=skills /courses/course?cat=skills&course=timekeeping I have been trying to get the above shortened down to be accessible at Desired /courses/skills /courses/skills/timekeeping Using the below works for when cat and course have variables RewriteRule ^c...

0
Q: How to Sync PHP and NodeJS with Redis and get data in order

ZenthI have a example code for make experiments trying to think "how to ""sync"" nodejs and php in a simple chat example. Here is my NodeJS server: var redis = require('redis'), subscriber = redis.createClient(), publisher = redis.createClient(); //var sckio = require('socket.io')....

0
Q: Next PHP page is not loading from form submit

user2957258My Below given code is not loading the php page specified in form tag. Please guide My Below given code is not loading the php page specified in form tag. Please guide I am calling another page but thats just not working as i will update the text input there, even if some function can be suggeste...

0
Q: In PHP How would you validate PKCS#7 padding?

lockdownI know that in Python you would do something along the lines of this to check the validation of the PKCS#7 padding: pad = ord(plaintext[-1]); all_padding = plaintext[-pad:]; /* get the last N bytes of the plaintext */ for byte in all_padding: assert byte == pad Is there a working example in P...

0
Q: Paypal IPN with empty post data

user2957270I'm using the Paypal IPN system with a listener script using ipnlistener.php. Since one day, Paypal hasn't sent any post data to my script. It can't be a problem with the code itself, because the $_POST variables are empty. So if there are no &_POST variables i cant handle anything. (tried it wi...

0
Q: PHP how to extract 3 digits from a string and output it

JoshcThis is a bit a strange issue. I am trying just to get sequential 3 digit interger from a string. Now I thought I was successfully doing it using this code below... preg_match_all('!\d+!', $image['title'], $integer); echo $integer[0][2]; But now it seems to be failing on some strings. It wor...

0
Q: In phpDoc, set a tag as a marker?

ChordsWhat I'd like to do is set a marker to be @todo, which is also a tag, such that I'll see todo items in the class/method reference as well as in a marker report. Is this possible? When I try, my marker report is empty.

0
Q: I want to add some detection to my website; are these good choices?

DylRichoAs I am recoding my entire website, I need to choose a couple of methods to detect both web browsers and mobile devices. From the lists below, could you please recommend the better option? Here are my choices; Browser Detection Use IE-specific comment arguments to target IE6 - IE8 CSS files; ...

0
Q: Get Dynatree marked items from $_POST in PHP

ReynierI'm using dynatree plugin but when I do: print_r($_POST); in the page where I receive the data I can't see Dynatree selected options? Why? How I can get this data in order to process it in my PHP script?

0
Q: how to send array value with jqyery to php

Hassan MostafaHi i want to send the values of the array to jquery, i try to do that but jquery return undefined, offcourse i still new to jquery and here the code : for ($i=1;$i<=$stars_settings['attachments']['max_number'];$i++) { $cls = ($i == 1 && in_array('attachments',$_SESSION['iserror'])) ? ' clas...

0
Q: Bind Input values to Model in Laravel

Syed Abdul Qadeeri am creating an API on laravel using the Resource Controller. this api will be accessed by the Windows Application i have a call say : UpdateProfile(User $user); i will send a POST request from the application with all the values filled in it and i want the laravel to automatically to map th...

0
Q: Detect Ajax in PHP

Dave CameronI am trying to make an ajax post to the same php page. Ajax: $("#loginForm").submit(function(e) { e.preventDefault(); var postData = $(this).serialize(); $.post("login.php", postData); }); The postData is correct and is in the following format: username=john&password=123123 PH...

-1
Q: PHP echoing variable but adding line breaks

Homer_JI have a variable a such $var: $var = "One, Two, Three"; I can echo the variable without any problems the output is: One, Two, Three Is it possible, when echoing the variable to add a line break where there is a ,, so it would look like this? One, Two, Three

0
Q: SQL LIKE and NOT LIKE in same query

Prabathi have 100 tables. so some of them contain table name as 'plan_2' and some of them 'temp'. so how can i select tables only 'plan_2' not containing 'temp' my query not working. $result=mysql_query("SHOW TABLES LIKE 'plan_2%' AND TABLES NOT LIKE '%temp%'"); thank you.

0
Q: Laravel vs. raw PHP for web application

blackpla9ueI'm planning to develop a web application for organizing notes. I recently started using Laravel and I have to say that I'm really in love with it. But what I came to realize is, even for a small operation for eg: database, it has to go through a lot of method calls to get it done. What I want ...

-1
Q: functions in PHP class didnt work

Doron Levii build a php class. why when i build fuctions (in PHP class) like this, it didnt work? and how could i fix this? the functions: (i delete the __construct becouse its didnt interesting right now) class c { public function a() { return b(); // line 131 } public functio...

1
Q: Having to Press 2 times submit button to actually submit - AJAX

SylarAs the title said... Some of my code: there is more inputs but i'll put this one just to simplify. <form name="frmCadastroPlano" id="frmCadastroPlano" class="form-horizontal" > <input class="input-xlarge" id="inputNome" name="inputNome" type="text" value="" style="height: 26;"> <button ty...

0
Q: Notice: Undefined index: in php 2d array

user2957322please help - when print_r($myarr) output is Array ( [component] => Array ( [content] => component content file .... ) ) but when I want get $myarr['component']['content'] in my code like this public function getnode($type = null, $name = null) { ...

0
Q: Filter count column Magento Customer Admin grid with filter_condition_callback

user1990912Hi I've modified the magento customer admin grid in "../app/code/local/Mage/Adminhtml/Block/Customer/Grid.php" to include total orders, but need to apply a filter, I've been working with filter_condition_callback but can't get it work. Any suggestions? Modified Collection: $collection->getS...

0
Q: SELECT + INSERT in the same query

Nelson Galdeman GrazianoThis is what I'm using now public function nuevaPlantilla(){ $query = $this->sql->prepare("SELECT max(did) as nuevodid FROM ".self::tabla_plantillas); $exc = $query->execute(); if (!$exc){ return false; } $resultado = $query->get_result(); $datos = $resultado->fet...

0
Q: Getting unicode values from SVG using DOMDocument

Michael IrigoyenI am attempting to retrieve the unicode values of glyphs in an icon font. The font is structured like this: <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > <svg xmlns="http://www.w3.org/2000/svg"> <defs> <f...

0
Q: PHP - Playing random twitch video 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. Any ideas? Here's the code: <div class="viewer"> <?php $channel = $_GET["channel"]; i...

0
Q: Can Not send Multiple Values with multiple checkbox in php

Rahi M.I have the following form where data are retrieved from the mysql DB. <?php $get_name = mysql_query("SELECT * from premises WHERE status = 0") or die(mysql_error()); while($motel = mysql_fetch_array($get_name)){ ?> <form method="post" action="includes/loanprocess.php"> <tr><td...

0
Q: English Lemmatizer in PHP

user2957386Is there any English lemmatization algorithm written in PHP? There are some lemmatization algorithms out there for Java but I am wondering whether there is any similar one for PHP. Thanks.

0
Q: Excluding folders with the word 'thumbs' in it

user2284703I'm trying to display a list of all folders inside of a directory. But I do not want any folders listed that contain the word "thumbs" in it. Can someone tell me how to do this... Here is the code I am using that doesn't seem to work. It displays all of the folders but it is not blocking the ...

0
Q: After movie clip redirect to subpage

user2041174I need to know how to do a page containing a fullscreen movie clip as a intro for the site, after the movie is finish it will redirect the visitors (without clicking) to a subpage. Is this possible to do? No flash, javascript or/and PHP only.

0
Q: PHP/Apache Rewrite for Subfolder

YazminI have the following rewrite setup: RewriteEngine on RewriteRule ^(.*)/$ $1.php RewriteCond %{ENV:REDIRECT_STATUS} !200 RewriteRule ^(\w+)\.php$ /$1 [R=301] RewriteRule ^(\w+)/?$ /$1.php I'm trying to any page under my /admin subdirectory (i.e. /admin/index.php, /admin/users.php, etc...) de...

0
Q: getting php/html form exactly the same in email on filled in

user2956852I have a form online php/html that has 74 entries. and there are 70 entries that have radio buttons with 3 options. When i fill it in and send it to my email. I get a 2 nice koloms with in 1 the questions and the other the answers or clicked radio buttons. Is it a simple task to get it in my em...

0
Q: Load denied by X-Frame-Options

AndresI have a pool of videos in my own server and another company is providing me the geoloc service in a video player that they developed. The problem is that I'm trying to load a simple iframe of my provider just like this: <iframe src="http://myvideoplayerprovider.com/videos/198" width="620px" he...

0
Q: How to convert a web folder into a single html file?

davidloubereI need to generate a full static HTML file from a web folder containing related assets (CSS styles and images). Styles would be embedded directly within html tags and images would be base64 encoded. Is there a way to achieve such a thing via PHP? via Symfony2 and assetic?

 

« first day (259 days earlier)      last day (51 days later) »