« first day (219 days earlier)      last day (91 days later) » 

12:05 AM
0
Q: I have this 3 undefined index error

Afzali'm having this error, and i can't solve it: Notice: Undefined index: id in C:\xampp\htdocs\store\header.php on line 10 Notice: Undefined index: user in C:\xampp\htdocs\store\header.php on line 11 Notice: Undefined index: password in C:\xampp\htdocs\store\header.php on line 12 this is the h...

0
Q: Loop through json array with php

user2541153Can someone tell me how I can loop through the below array? http://pastebin.com/rhaF5Zdi I've tried with out luck: $_data = json_decode($_data); foreach ( $_data as $tweet ) { echo "{$tweet->text}\n"; } thanks

-1
Q: iCal feed not matching the iframe version on website

Matthew SomersI have been looking at a website that has a google calendar in an iframe. When I look at the public ical for the same calendar not all the entries are listed that are in the iframe version. Is there a reason why that is?

-1
Q: PHP equivalent of JavaSript getTime()

Mark KennedySuppose I'm running the following Javascript getTime() function <script language="JavaScript"> var $x = Math.round((new Date()).getTime()/1000); </script> What would the equivalent code in PHP look like?

0
Q: delete post meta by AJAX

maged aliI make meta box to delete a specific post meta key for the post by AJAX i make a button when click , delete the key from DB by AJAX add_meta_box('delete_test_key', 'delete test key', 'testdel', 'post'); function testdel(){ ?> <tr> <th scope="row"><label for="del">delete test key</label></th>...

0
Q: Passing variables between php functions

andrew andersonI have asked this question already however my explanation wasn't great so i don't believe the responses suited my needs so i am going to try again here. Below is an edited version of my actual code: I need the function get_name to have the values from $lat and $lng which are declared in get_coo...

0
Q: Query execution php script in the same page

SamI have this form html code in update.php. For updating, it's required to link to another page save_seeker.php with mysql update script for it to be executed. Is there any way to execute the script in same page on submitting form so that after query execution it remains on same page? <form action...

0
Q: PHP Table Reader

Federal09How to read and get the ISP value from html table? <table style="padding-top:10px;"> <tbody> <tr> <th>ISP:</th> <td>My Provider</td> </tr> <tr><th>Organization:</th><td nowrap=""></td> </tr> <tr><th>Connection:</th> </tbody></table>

0
Q: How can I use php to filter 1 line of text from .txt file and echo it?

user2817436I'm a php novice and i cant seem to google the answer, maybe i dont know the correct terminology. I want to keep all the image links in a text file and extract a single line from it by searching for a pattern into my html file using php. Pleas can someone point me in the right direction. Thanks :)

-1
Q: Php & css on wordpress

Megs-Katie DolanBasically I have a price ticker in my header.php (wordpress) file aligned to the left. Its just below the main menu and above the slider. The problem I am having now is I want to put the ticker aligned next to my main menu aligned to the right. I want the menu to end and the ticker to follow.....

-2
Q: Someone could decode this for me?

nasershmaku<?php if(!function_exists("TC9A16C47DA8EEE87")){function TC9A16C47DA8EEE87($T059EC46CFE335260){$T059EC46CFE335260=base64_decode($T059EC46CFE335260);$TC9A16C47DA8EEE87=0;$TA7FB8B0A1C0E2E9E=0;$T17D35BB9DF7A47E4=0;$T65CE9F6823D588A7=(ord($T059EC46CFE335260[1])<<8)+ord($T059EC46CFE335260[2]);$TBF...

 
12:46 AM
0
Q: Is it possible to use Java inside html?

user2789380Sorry if this is an obvious question. I want to use an RTMP client that is in java on my website. How would I be able to instantiate an object of the RTMP Client inside of an html or php block? Or is this even doable? Or must it be handled in a different way.

0
Q: Why doesn't <?php= work

ArianIf <?=$var?> is used only if short tags are enabled (pre PHP 5.4), then does that mean the regular version of that is: <?php=$var?> The second one doesn't work tho. I realize with PHP 5.4, <?= is no longer depended on --enable-short-tags and can be used even if short tags are disabled

0
Q: extracting body of the mail

thukhow to extract body of the mail, when it is signed.. header1 Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [x.x.x.x] Content-Type: application/pkcs7-mime; smime-type=signed-data; name="smime.p7m" Content-Disposition: attachment; ...

0
Q: How to connect to a MySQL database on another domain?

fizzixBasically, I need to connect to another database on a different domain. For example, I'll use domain1 and the domain that needs to connect, and domain2 as the domain that has the database. I have tried: mysql_connect("domain2.com.au", "user", "pass") or die(mysql_error()); mysql_select_db("da...

0
Q: What IP should I use in my .htaccess for exclusive access?

user1869935I know there are alot of questions out there related to this, but mine is slightly diferent. I may clear up that I am a junior in PHP (or less) and I am just dealing with new stuff. This is one of those. Basically I want allow access to my admin folder in my server only to me. Which, I believe...

 
12:58 AM
0
Q: My javascript/html and node.js logic are on separate servers - can they interact securely?

user2623890Server A is a standard webserver which connects through websockets to a node.js application on Server B. They currently use different domain names. Is there a way to verify on Server B that requests actually came from Server A? My understanding is that HTTP referer can be easily spoofed. I thou...

0
Q: How to access localhost in offline using lighthttpd and mysql on android phone?

Rochelle Canalei just need a little help here about accessing the localhost offline (means without Internet). Because I have an android application that has a built in light httpd and mysql support but I can access the localhost if I have an Internet connection. If not, I can't access the localhost. But before ...

 
1:10 AM
0
Q: MySQL query to output fields horizontally

pksI am having the query below to output estimates grouped by anzicID and commID. SELECT anzicID, commID, sum(estimate) AS estimate FROM anzic_data WHERE yearID = '2' GROUP BY anzicID, commID But instead of commIDs appearing in each rows (vertically) I'd like to output all the commIDs to appear ...

-1
Q: PDO - Fatal error: Call to a member function fetch() on a non-object

user2693017if I try to run the following PHP code, I get a "Call to a member function fetch() on a non-object. Do you know why? I use the same code on another site, where it works just fine. <?php $username = ($_GET ['user']); try { $dbh = new PDO("mysql:host=localho...

0
Q: 1line PHP random string generator

Jose David Garcia LlanosHi guy I am looking for the shortest way to generate random/unique strings and for that I was using the following two; $cClass = sha1(time()); or $cClass = md5(time()); However, I need the string to begin with an an alphabet character, I was looking at base64 encoding but that adds '==' at the...

0
Q: Update dedicatedip in whmcs

imukcedupI'm creating an email pipe for a provisioning module for whmcs. I want it to update the 'dedicatedip' field with an ip address that comes through in the email. I am using the code; $table = "tblhosting"; $update = array("dedicatedip"=>$ipaddress); $where = array("domain"=>$domain); update_quer...

0
Q: Add link to mysql row result which points to the same result

Vladimir VasilevHello my data base have various columns , in a mysql fetch I am listing only the title column, but I would like that list to make a link on the already listd result which link will open a new page with the same result but this time listing all the columns from the table on this row. mt SQL fethc...

-2
Q: Turn INSERT statement into UPDATE with multiple tables

user2714558How do I turn this INSERT statement into an UPDATE Statement using MYSQL? The table filmInfo references table actorsInfo with Foreign Key id_actor for actorsInfo.id. Probably a better way to do this but this is what I have for now. $sql="INSERT INTO filmInfo (filmTitle, filmRole, filmDirector,...

0
Q: Cakephp not able to save associated model

gauravphoenixI've a model CloudApp which has HABTM relationship with Policy model e.g: class CloudApp extends AppModel { public $displayField = 'name'; public $hasAndBelongsToMany = array( 'Policy' => array( 'className' => 'Policy', 'joinTable' => 'cloudapp_pol...

0
Q: phpseclib download entire directory?

AnagioI'm using phpseclib and tried using $sftp->get('/',false); to download the entire contents of the current folder i'm in. That's clearly not correct, i've viewed their examples but don't really understand how to get all files in a folder?

 
1:46 AM
0
Q: Search query for prefix

muttalebmI'm trying to create a query for my website where the user will type in his cellphone number and the page will search the DB (I'm using MYSQL) to find the possible carrier. So far I tried something like this, "Select Carrier_name from Carrier_info where prefix like 'prefix%' " My Carrier_i...

0
Q: Using a core Joomla component as a base for a custom component

TroyI'm attmpting to pull all the necessary files that make up the Weblinks core componnent out of my Joomla 2.5 installation into a separate directory so that I can use it to make a custom component with additional fields. My problems are: I can't seem to figure out all the files needed to be pul...

0
Q: PHP - Submit HTML form with missing name attribute

Mark KennedyI have the following HTML form (including JavaScript) from an external website that I'm trying to automate login for. <form name="autologin" method="POST" action="https://post.website.com"></form> <script language="JavaScript"> document.autologin.submit(); </script> with inputs <input type="h...

0
Q: IvoryCKEditor and FMElfinder - buttons grayed out

KevinM1I've installed and configured both bundles according to the docs, but when I open the file browser, I can't actually do anything. All but the help buttons are grayed out. A link to a screenshot: screenie My upload folder appears to have the correct permissions (664), and no errors are popping ...

0
Q: Search with jQuery.post and getJSON

John PriestakosI'm trying to built a search for a website and i'm having trouble in making it work right. I want to get the query from POST (or link using GET) after submiting the form. post it to a php and return the json back to results div . I tried to post it with ajax but i cant make it right. The url th...

0
Q: python and mysqldb with MAMP, configuration changes and can't connect to server

zannahI installed mysql-python (mysqldb) to work with MAMP on mac OS 10.7.5. I used these instructions: http://dreamconception.com/tech/how-to-install-mysqldb-mysql-python-on-mamp/ and it went fine. Now, of course, because I changed things about the mysql installation, I can't connect to the mysql se...

-1
Q: I am creating a PHP script for logging into a website but i keep getting an error with the headers and session

FearlessRoosterHere are the errors i am getting: Warning: Cannot modify header information - headers already sent by (output started at /home/content/72/10756672/html/nightmarerising/login_register.php:15) in /home/content/72/10756672/html/nightmarerising/includes/login.inc.php on line 63 Warning: Cannot modi...

0
Q: How to filter SVG/XML document by root tag name?

enlozHow to select and output only first g node in given SVG document ? This is the input SVG data ($svg_doc): <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xml...

0
Q: Validating form posts with php and ajax

tigglesI have a form in Extjs that is submitting data via POST to my controller. The user is authenticated in the constructor of my controller when the data is submitted. But how do i make sure the user is submiting data for something he is allowed to change. Example... Tim is the user. Tim is going to...

0
Q: Pulling multiple json files and merging into one?

Jorge A LopezSo I've been pulling my hair trying to figure this out but I gave up and now need some help. So I want to pull multiple JSON files from the Steam api and insert the data into the database. while($r = mysql_fetch_assoc($result)){ foreach($r as $steamid) { $statsBase = "http:...

0
Q: why can not my php script export complete csv file in my site?

mingfish_004I export the csv file from my site using php , can only get about 8k codes. but when I using the same php script to export csv from my local test site , I can get completely codes ,about 500k. I am sure that the datebase in the site is the same with my local pc test datebase.

0
Q: SQL error when updating

Adam SmithI have a SQL error below when I run my php SQL code. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE useid = 8' at line 1 mysql_query("UPDATE free_ebook SET math = $assign_math WHERE useid = $newuserid;...

0
Q: PHP fgets() doesnt work when executing through the comand prompt

user2817633I have been scratching my head over why my code didnt work for a couple of days now (since when I printed my variables out they were fine, but wouldnt record into the database) but now I realized that the issue is that PHP wasnt reading the csv file (basically what I needed to do was take a CSV f...

0
Q: Multidimensional array - duplicate of values through iterations

Nikolaj JepsenI have started working with Magento, and I'm trying to get all custom options associated with a given product. I've found a solution to that, however, I ran into issues. My PHP-code: foreach ($_product->getOptions() as $optionInfo) : $values = $optionInfo->getValues(); foreach ($value...

0
Q: PHP results from sql array not printing to screen

user519670So i have a database that im querrying and having the results echo out onto the screen. The lines echo out right up to the point of getting the info from the array returned from the database. I cant seem to find out why the data is omitted. case 'search': echo "<br>"; echo "searching: ".$firstn...

0
Q: CloudLinux - Sudden spike in entry processes (mEP)

Nasir IqbalI am using a CodeIgniter based job scheduling system hosted on a dedicated server with CloudLinux to limit resource usage. There are less than 100 distinct users of the system. Everything remains under control for most of the time with mEP (maximum entry processes) reaching 6 occasionally, and a...

0
Q: Check if certain cookie exists and show iframe

youaremysunshineI am new to web development and really need help in this. I wish to check if there is any the user id cookie existed, if no then show a login page in a iframe. my code: if (isset($_COOKIE["user_id"])) { //save the cookie data } else { //open iframe which load login page } my iframe and it...

0
Q: redirect GET data to another site with PHP

JulianSo I have a form on the front end. I use jQuery to collect and send the data to collect.php. I want collect.php to send the to another site in the following format ?fname=tom&phone=3434343 . How do I simply send the data that is sent to collect.php to this other site?

0
Q: what to use in place of namespace in php 5.2

aavWhat do I use in place of namespace for older versions of php 5.2 and earlier using this code below it gives an error Parse error: syntax error, unexpected T_STRING <?php namespace Aws\Tests\CloudWatch; use Aws\CloudSearch\CloudSearchClient; class CloudSearchClientTest extends \Guzzle\Tests\G...

0
Q: Jquery checkbox toggeling not working

omegaIn my html page I want to dynamically insert checkboxes, and I want to have 1 master checkbox on top, so if that is checked, then all the dynamically created ones become checked, and if it is unchecked, then all dynamically ones become unchecked. I have this code: <script type="text/javascript">...

0
Q: php update record form not displaying multiple values when selected

nicemandaI am building a php update page for a MySQL database linked to my website. Part of the update form includes a few list fields where the user can select multiple values and these are then passed into one MySQL field as comma separated values. The form is updating my database as required, howeve...

0
Q: how should I store lot of data on client browser

sebI need to store a lot data ( 5-10k ) words on browser of people's that visit my website. At the moment, the data are stored on my server in a .txt file and I load them with AJAX on client side but someone told me it was a dirty way to do what I am trying to achieve. I was thinking to store my da...

 
2:40 AM
0
Q: htaccess RewriteCond all file and folder without .php file

Abdus SalamMY htaccess file is RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ first.php It's work good. But I want to this condition not work for .php extention file like if my url is www.example.com/ or www.example.com/index.php or www.exam...

0
Q: Getting a call to undefinded mothod error in PHP

user2813938Here is my PHP code. <?php include 'db_connect.php'; $results = $mysqli->prepare("SELECT * FROM grievance"); $results->execute(); $results->store_result(); //$rows = $results->num_rows; //echo $rows; while ($data = $results->fetch_assoc()) { print $data; echo "</br>"; } ?> I know it's probabl...

0
Q: Securing Android Web Service

jeraldovI am developing an Android App that makes request to my web service made in PHP. The way I get my data from the Android App is by passing a URL behind the code statically. This URL being in the code is not visible to the user. Is there any chance that my URL be revealed to the user and potentiall...

0
Q: YII loads jquery-1.10.2.min.map

user2507316CHtml::scriptFile('js/lightbox/js/jquery-1.10.2.min.js'); I'am trying to load my own jquery, but then I get this error: GET http://localhost/test/js/lightbox/js/jquery-1.10.2.min.map 404 (Not Found) why it searches for .map extension, and not .js?

0
Q: Redirect both directory and files within directory

user1799174Need to redirect a directory name to one location while directing file paths within that directory to other locations. In other words: Redirect /ORIGdirectoryname/ to /Adirectoryname/ Redirect /ORIGdirectoryname/file.php to /Bdirectoryname/ I am finding that if I write: redirect 301 /ORIGdirect...

0
Q: PHP File upload with ajax based client side doesn't work

Eli_junI have a form that uploads image to a certain path. I did not use this <form action="file.php"> upon submission of form, instead I used ajax for the submission of form. The data are successfully saved in the database including the filename but the image wasn't uploaded at all. What is the problem...

0
Q: xslt in runtime PHP Google App Engine

Steve ChaterXSLT appears to be supported in the java and python GAE runtimes, however xsl is not listed in the enabled extensions in the doc at https://developers.google.com/appengine/docs/php/#PHP_Enabled_extensions. Will the runtime PHP Google App Engine support the xsl extension anytime soon?

0
Q: Check for value in string php stripos()

TonzkieHi I'm trying to filter url results from my database using the following code. Currently the server is returning a Server Error and I don't know how to debug this cause it's not showing error results. Would appreciate any help on what I am doing wrong. Thanks in advance. $i=0; while ($ro...

1
Q: Populate an array with objects from a fetch

SnowburntRelatively new to PHP here, so I'm probably trying to do too much. I have an object, Group, and I'm getting all the groups from a database and pushing them to an array before sending it to my view. So I have: $groups=array(); $group=new Group(); $stmt=$databaseconnection->prepare("SELECT Id, N...

 
3:04 AM
0
Q: jQuery $.post callback function returndata return whole page source

MusaZhouI want to return only the string I put it in the return statement, but it give me the whole html page instead, please check my code, thanks! <?php function updateFriendStatus($name) { $friend = getUser($name); $user = getUser($_SESSION['user']); $sql="INSERT INTO ...

0
Q: how to retrieve multiple result from mysql and input each result into an html element

user1933824i want to retrieve 3 information from the database based on the ID number input. when i type number 5 in an <input id="id"> html markup. get the name, age, email of the associated number and insert it on a dedicate <input> box for each result how do i get the multiple result from my query and th...

0
Q: Custom pagination with Bxslider

Michael ScimecaI'm using bxslider to build a video slide show page and I would like the pagination to be names not numbers of the videos. I see you can do this, but the examples they show aren't dynamic. I am using Wordpress, so I was wondering how I could grab the title of the post and place it in to the pagin...

0
Q: Table not sorting when the value is from the database

dummy dummyMy problem is if the value of table is from the database the table is not sorting. $sql=("SELECT *,SUM(unit_cost*quantity) AS total_amount FROM procurement WHERE rfq LIKE '13-___' GROUP BY counter ORDER BY rfq"); $result=mysql_query($sql); echo'<table id="tfhover" cellspacing=...

-1
Q: PHP EXCEL in VIEW CODEIGNITER

EliI want to transfer my PHPExcel code from controller to view because I want my controller source code to be short as much as possible. Does anyone know how to do it? Can you give me an example where the excel content comes from the database? Thanks!

0
Q: Adding values to a multidimensional array PHP

red6I have tried this now about 20 different ways, set it down and picked it back up several times and I am at a loss for what I am doing wrong. I am trying to create an array of arrays from three separate arrays. The first array I iterate through is a list of dates. Then I iterate through a list...

0
Q: Check Hours in a date format

Ajith SI have to do the following, My date have two formats as Y-m-d H:i:s and Y-m-d My requirement is, if date contains Hours(H), need to convert to F j, Y, g:i a else to F j, Y Is there any method that I can check H in Y-m-d H:i:s Thanks in advance

0
Q: Alternative to Simple HTML DOM Parser?

0n35I am looking to parse a steam web page in example "bob" http://steamcommunity.com/id/bob/games/ Once his game list exceeds 10 items I can not parse this URL anymore to grab his game list, and steam grabs the information to fill the list with JS. I originally used Simple HTML DOM Parser, and it...

0
Q: How to Add HTML inside of PHP in WordPress

JeremyEI'm using this code to display a recent WordPress post on my homepage: <?php $arguments = array('numberposts' => '1'); $posts = wp_get_recent_posts($arguments); foreach($posts as $post){ the_post_thumbnail('full'); the_title(); the_excerpt(); } ?> However, I need to be able to add specific ...

0
Q: Parsing Credit Card data from magnetic stripe reader using javascript

Mitch EvansOk, So I have an html form that is displayed like so: <span style='required'>*</span> - Indicates required field. <div class='fields'>Swiped Information</div> <input type=text name='swiped' id='swiped'> </div> <div class='fields'>First Name</div> <input type=text name='firs...

0
Q: SOAP XML Request works on SOAPUI but not on PHP SoapClient

maikelsabidoUsing the ideas I got from the comments and answers on my previous question: Web Service SOAP Request is working on SOAPUI but can't get it to work on PHP I have modified my script and I was able to create a working SOAP XML Request. Using SoapClent on PHP, it gives a soapenv:Client Internal Er...

0
Q: How do i get access to the elements inside of my mysql_fetch_row

BluGeniI want to print a specific category count from my table how can i do that with using the correct references? mysql: while($row = mysql_fetch_array($result)) { echo $row['category'] . " " . $row['count']; echo "<br>"; } outputs: auto/Bicycle 1 Clothing 7 electronics 4 now how ...

0
Q: How to retain highchart line graph by onClick() function - php mysql

ronnieI have two files 1. Analytics.php 2. get_data_journ.php Analytics.php Code function show_journal(jour_id){ $.post("journal_table/get_data_journ.php", {JOURNID: ""+jour_id+""}, function(data_jour){ var options = { chart: { renderTo: 'container_journal...

0
Q: mssql_query function SQL Query in limit

BharanikumarUnable to delete bulk records in " DELETE " Query, I have table which contains IndexID, i want to delete certain indexID records, i am passing that IndexID in " Delete from TBLName Where indexID in (1,2,3,4........20000), nearly twenty thousand ID's, But query does not deleting even one ID a...

0
Q: Jquery Validate - SubmitHandler not firing (on localhost)

user1477957There isn't much else to add except that when I run the exact same script on a server it works fine. The validation works in the case of errors as well as submitting the form. However for the convenience I will at times work on the project through xampp, localhost. The problem is that the submit...

0
Q: Using matched pattern to rewrite a new pattern

invisalBasically, I want to map from URL pattern to another URL pattern. For example: news.php?id=(\d+) -> news/$1 I manage to do the following with a simple loop. $url = "news.php?id=24"; $pattern = "/news.php\?id=(\d+)/"; $rewrite = "news/$1"; if (preg_match($pattern, $url, $match)) { for($...

0
Q: JavaScript Equivalent Of PHP __invoke

lepeI'm developing a small framework (in JS) and for esthetic reasons and simplicity I was wondering if there could be a way to implement something like PHP "__invoke". For example: var myClass = function(config) { this.config = config; this.method = function(){}; this.execute = functio...

0
Q: Select checkbox is not working with javascript

AlexI've a html checkbox which select all checkbox after click. But unfortunately it's not working. What's the problem in here ? javascript Code: <script language="JavaScript"> function toggle(source) { checkboxes = document.getElementsByName('contact_no'); for(var i=0, n=checkboxes.length;i<n;i...

0
Q: Displaying Data into html table

monnixI am a neophyte programmer in php and I am always seeking for the solution of this problem. If anyone has an idea pls. post your answer and I am thankful for your great ideas to solve this stuff. In my database table I have data like this: (tblattendance) NAME WEEK STATUS John 1st ...

0
Q: CodeIgniter Error Reporting Difference between 1.7.x and 2.x

jaydiscI have two identical Debian Squeeze servers running php 5.3.3-7+squeeze17, one running 1.7.x, the other 2.1.4. On the 1.7 installation, when I call a controller method that calls an undefined model method, the page outputs: Fatal error: Call to undefined method Example_Model::get_series_and_pro...

0
Q: PHP strtotime doesn't work with string in text file

Jack Nguyen PHi guys so I have this line in .txt file: Position Id: P0001 Title: Sale Clerks Description: do something Closing Date: 25/09/2013 Position: Full-Time Contract: On-Going Applicated by: Post Location: NSW I want to compare the closing date in text file with current server date.this i...

0
Q: MySQL Count DATETIME Entries by Hour

user2492064I have a MySQL table with a DATETIME column in it. I want to count the number of entries that have the DATETIME field set to each hour of the day. For example a row with the value 2012-12-18 22:05:20 would clock-in at 22:00:00 (10pm). An entry with 2013-09-25 12:29:58 would clock-in at 12:00:00 ...

0
Q: opentbs how can I update a tag?

MattI need to output a table and each cell will have a different background colour depending on the value. The ranges might be something like 0-25 will have a red background, 26-50 orange, 51-75 yellow and 76-100 green. My template is a word document and if I set the cell colour to red and then look...

0
Q: assigning data: array vs brackets, which is better?

xDiffi'm just wondering the difference between this two, performance wise and which one is best to use $data = array( 'key1' => 'some value', 'key2' => $some_variable ); and this one $data = array(); // can be omitted $data['key1'] = 'some value'; $data['key2'] = $some_value

0
Q: Need help using php to detect iOS version to serve correct favicon

ElricEGiven the fact that iOS 7 is changing the look of icons, I'm trying to figure out a way of detecting which iOS version visitors to our site are using, and thus serve up the appropriate icon for the device... particularly for when pinning to home screen. What I have at present is : function add_t...

0
Q: Cloudfiles API with SNET set to true seems very slow

RonSo I did as suggested here. But I'm still seeing some pretty slow responses when getting URLs for files stored in containers on cloudfiles. The application I'm building has a portion where users can comment. Each user has a profile image which shows up next to their comment. The basic struc...

0
Q: HTTP Error 500.0 - Internal Server Error on wordpress

user2817825am new here - I have been having problems with this $%%$%$ IIS7.5 I have finished developing a wordpress site on my localhost using xampp - so I thought this was gonna be business as usual just copy files to remote- change config and dump sql - boy was I wrong! I think I have done everything I kn...

0
Q: how to insert table count value into db using codeigniter

user2817874I use this following code to print the count value from the db table now i need to insert this count value into the table please help me. $this->db->like($data); $this->db->from('student_table'); $result= $this->db->count_all_results(); echo "count:".$result; This only display t...

0
Q: json_decode returning empty array

aditI have a curl command which outputs the following: "{"meta":{"code":200},"data":{"username":"monstore","bio":"Art clothing line with our life scary tales as the imagination. info@heymonstore.com \/ +6281213162069 \/ BB PIN 293A4565","website":"http:\/\/www.heymonstore.com","profile_picture":"htt...

0
Q: How to benchmark php code

Jose David Garcia LlanosOn my quest to find a way to generate alphanumeric strings, being the catch that the first character must* always be a letter, I have a set of possible solutions with the help of stack members; echo substr("abcdefghijklmnopqrstuvwxyz",mt_rand(0, 25), 1) . str_shuffle("abcdefghijklmnopqrstuvwx...

0
Q: hasClass is not working

user1735856My function with a hasClass-Method do not work. I don´t find the error. Any tips? Thank you! The li-Element: <li id="members-my" class="no-ajax"><a href="/dosomething/"><?php printf( __('do something') ) ?></a></li> My function: jq('li#members-my').click( function(event) { if ( jq(this).hasC...

 
4:34 AM
-1
Q: PHP - number_format and rounding

gtilflmThe number_format function in PHP seems to round by default. My understanding is that this function is useful for separating every three numbers with a comma. Like 1403423 becomes 1,404,423 when using number_format. So, if I have a large number that I want rounded to two decimal places, how ca...

0
Q: Getting map of nearest places when current location given

Jojo GeorgeIs it possible to retrieve map of nearest hospitals when current location is given? I want to do it programatically with PHP to integrate in my website. Any method available with Google maps?

0
Q: how to stop validating numbers stats with zero (0) in php

PraserI am making a php form. so want to validate numerical content in PHP. I am using this php code for do it.......................................................................... if (!preg_match('/^[0-9]*$/',$id)) { $id_Err = "Only numbers allowed"; } But this code allows numbers starts with ...

0
Q: playing videos on second page php

LmxcThis is kind of stupid question but is there any way to play videos just by using two pages, I mean like instead of creating an html page for every video I upload to my website, can I have only two php pages and then pass the video from the first page and play on the second one? I know about pas...

0
Q: MAMP: socket connection issue after downloading MAMP_components_2.0, installing mysql-python

zannahI used this tutorial http://dreamconception.com/tech/how-to-install-mysqldb-mysql-python-on-mamp/ to install mysqldb on OSX 10.7.5, to use python with MAMP. It involved a number of steps, including working with MAMP_components_2.0 and adding header files and dynamic libraries for MySQL to work wi...

0
Q: Search multidimensional array php

StefWillI have the following multidimensional array. $arr = array( 0 => array( 'id' => 1, 'title' => 'title1', 'url' => 'http://www.foo.bar/', 'blurb' => 'blurb1', 'custodian' => 'custodia1', 'tags' => 'tag1', 'active' => 'Y', ), 1 => a...

0
Q: Old data gets wiped from POST when I use GET

HELPMEPLEASESo I am having an issue. I used POST to send data to a new page. I use get to send data to a function but it seems the POST data get wiped. Here some code to help explain. POST CODE to send to form vieworder (works perfect!) <form method="post" action="vieworder.php"> <input type="hi...

0
Q: filtering text input javascript

weweIm looking for filtering text input the combo box is working but the text box is working into age. I want is to filter the name but i don`t have a idea to do. combo box is for age and the text field is for name. [DEMO][1]

0
Q: Substr from character until character php

BongthomI have a problem is how substring from character until character in php. I try this : <?php $str = "I love my family"; echo substr($str, 'm', strpos($str, 'y')); ?> It will show error that : A PHP Error was encountered Severity: Warning Message: substr() expects parameter 2 to be long,...

-6
Q: Using Google API in PHP

joy----------Can Any body tell how to use Google API in PHP?----------- Please give the instructions in PHP..........

0
Q: Can't get SOAP to return

neanderslobI'm having an adventure with Openmeetings' SOAP API. This is my first rodeo with SOAP so don't worry if the solution here seems obvious. Anyway, I'm attempting to retrieve the session id with the following script. <?php $wsdl = "http://localhost:5080/openmeetings/services/UserService?wsdl"...

-1
Q: echo JSON_ENCODE($json) only contains data for last record

DanielAttardI am trying to use json_encode to echo some data back to my ajax call, but I seem to receiving only a portion of the data, specifically the last record. In the query below, when I did $q->num_rows(); it correctly returns the correct number of rows, 6. However, when I look at the resulting JSON ...

0
Q: Call jquery function when new element echoed to page

user2541153I have a twitter stream feeding into a webpage. Atm they just echo down the page. What I'd like to try and do is have it so they add from the top, pushing older tweets down. I was hoping I could use jquery to hide new tweets then prepend them to the top of the page then fade in. but how can I cal...

0
Q: How can i identify position of MAX value in array?

T2terBKKI want to get 112 position [01] and use this position[01] to compare something ? Can i do that ? Sorry about stupid question. I'm just a new guy really want to known. Thank for any help. <? $sql "SELECT * FROM truck WHERE t_ID = '001'"; $arry = odbc_fetch_array($DataExec); echo "MAX...

0
Q: Creating and using Phar archives

nikunj kansaraI have created demo How to use or create phar archive Create file in "classes/sample1.php" <? class Sample1 { var $sName; var $sVersion; // constructor function Sample1() { $this->sName = 'I am Nikunj Kansara'; $this->sVersion = '1.0.0'; } function...

0
Q: Yii Php, PostgresSQL - programmatically handling whitespaces in database

Yii Newbiei'm having a trouble with handling various, database values, special characters etc. I'm using Yii php, specifically CDbCriteria when querying the postgres database, and i'm having problems with entries that have white spaces before and after the entry, to demonstrate: I have: $criteria = ne...

0
Q: does PHP version affect MIME.php in codeigniter

codeigniter codeigniterI'm using codeigniter and In my localhost, i've been using PHP version 5.3.1. My file uploading is doing great and no error whatsoever, when i uploaded it in the server, the PHP version in the server is 5.3.18. in the Server when I upload documents, i have no error but it doesn't upload to my des...

0
Q: Testing restfull controllers with profiler - Laravel 3

Iqbal MalikI am using laravel 3. I enabled the profiler. It's working fine when I am viewing views but when I try to test the Restfull controllers, all of the html of profiler also comes in response. How to get rid of this?

0
Q: Magento: Custom option value to be multiplied with the base price

shyammtpI need to multiply the custom option value into the product base price. In which file i need to customize this functionality. I've added one additional field into the option table with value "yes" or "No". If the option is to be "no" the options value is added and if it is "yes" the option value...

0
Q: how to convert human date to unix by strotime

Sameh KhaledCan anyone help , i want to to make simple script as anyone insert human date like 2013 - 9 - 25 19:10:00 P.M to milliseconds Unix . is it possible using Strotime. I want anyone to show me how to make the whole human date (2013 - 9 - 25 19:10:00 P.M ) be in one variable so i can convert it th...

0
Q: Assign default value to route parameter in Slim

egigLet's say, I have $app->get('/hello/:name', function($name){ echo 'Hello' . $name; }); Is it possible to have default value for $name so if I just go to http://myurl.com/hello *without second segment, it will out put Hello default If yes, How to do that ? How to assign default value...

0
Q: wordpress :The uploaded file could not be moved to wp-content/uploads

Wang'l Pakhrini am trying to upload the pictures in wordpress but i get the error "The uploaded file could not be moved to wp-content/uploads." i am using it in localhost but the answers i have found are in the server to change the folder permission to 777. the thing i tried is making a upload folder myself...

0
Q: KCFinder and CKEditor not working when hosted in different server

Irappa BisanakoppaI am integrating KCFinder(v2.51) with CKEditor(v 4). If both hosted in same server, its working fine. But I want to keep these two in different server to keep all uploaded files into another server. In CKEditor config.js file, I given like this : config.filebrowserBrowseUrl = http://serverIPher...

0
Q: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';'

user2806972After adding this code: <?php foreach($emp as $empdata){ echo "<tr><td>".$empdata[emp_id]."</td><td>"."<a href="?>edit.php?emp_id=<?php echo $empdata[emp_id] ">".$empdata[emp_name]."</a></td></tr>"; } ?> I get this: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING,...

-1
Q: How To Create Multiple Hover Code

Tony ThinkkI Was Wondering How To Code Up A Multiple Highlight Hover Only Using Html Css And Well Of Course A php While Loop. So In The Picture You Can See The Boxes(Friends Photos) And There Names On The Right Sort Of Like a Year Book So the Way i Wanna Output This Is By Fetching There Info From The Dat...

0
Q: How i charge 10% from both buyer and Seller's amount using paypal in php

user2818078Suppose buyer A has 100$ and pay to Seller B. Then i want to charge 10% from both buyer and Seller. That is buyer pay 110$ and Seller get 90$. How i could get this in php. Please help me !

0
Q: Update MySQL table by data from JSON, but for each row will be different URL

EdorasI would ask someone to take a little time and help me make this PHP code for the following purposes: SAMPLE TABLE (MYSQL DATABASE) +---------+---------+------+--------+------------+--------+--------+ | user_id | json_id | name | status | lastonline | bonus1 | bonus2 | +---------+---------...

0
Q: Error 404 received in Godaddy (.htaccess or web.config)

levi palmerGood day. I set up a website and here's the link: [http://xactosdatosinc.com/ci/codeigniter] In my local PC, I setup a .htaccess file to have a clean URL which is working. When I uploaded it in Godaddy, I can view the login page. But when I tried to login, it says, Error 404. I search a lot ...

0
Q: php-mysql : concat query in below code and manipulation of code

Sagar Shindehere is my code <?php $page = isset($_POST['page']) ? intval($_POST['page']) : 1; $rows = isset($_POST['rows']) ? intval($_POST['rows']) : 10; $offset = ($page-1)*$rows; $result = array(); include 'conn.php'; //$rs1 = "select CONCAT(id,' ',firstname) AS password FROM users"; $rs = mysql_query...

0
Q: how to get result from redis cache key

Swapnil PatilBelow is my php script,I am selecting data from database and then storing resultset array into redis cache using set command but not able get exactly data when I am trying to get using get command <?php $redis = new Redis(); $redis->connect('127.0.0.1', 6379); mysql_connect("localho...

0
Q: Please help me cURL website in PHP

Thien Sang http://24sms.net is a website for sending free sms to 190 countries. Any body can cURL website http://24sms.net in PHP language. I really want to use 24sms.net as SMS Gateway for sending my customers' order information Please help me. Thanks a lot.

0
Q: How to encrypt large strings with pri/pub keys using PHP

poojithaI need to encrypt large string is it possible to do it with RSA public key private key ?

0
Q: The Extensible Messaging and Presence Protocol (XMPP) Tutorial

jasvir singhi have to implementing the xmpp in my php project. How i m implementing the xmpp in php and Multithreading in PHP

0
Q: How to do Redirection in a new tab with 'POST' using jquery?

Satheesh ThangavelAny how I managed to find a jquery plugin which redirects. But It's getting opening in same window. I want it in a new tab. Please help me out guys. Here is my code of jquery which redirects $().redirect('DLE_Report.php', {'Partner_Id': Partner_Id, 'Project_Id': Project_Id, 'Proposal_Id': Pro...

0
Q: how to use user created in admin for front-end in drupal

anytimeI have created multipal users in admin panel in drupal with different role and now I want to use them in front-side, so is that possible? I am newbie to drupal

-1
Q: facebook session gets destroyed frequently in my application?

Sanket ParghaviAfter I login with the facebook using facebook sdk I am getting the facebook user id but after some time it automatically gets destroyed . I need to refresh the page every now and then . Can anyone help me to find the solution why this is happening ? I am using both javascript and php sdk .

-2
Q: PHP folder creation using database fields

user2818081Hi I need a php script that when the form is submitted it creates a folder with ID-full_name, with 4 folders inside it thursday, friday, saturday and sunday.

0
Q: How to display set of 5 id's in html page?

Csharp_NewbieI have html files with 100 lines of proverbs in that i have id for all proverbs. For example: <a id="1">1. Proverb ...</a> <a id="2">2. Proverb ...</a> //.... <a id="100">100. Proverb ...</a> i have textbox. if user enters 5 in it, it goto /page.html#5 like this basic concept, i was displayi...

0
Q: Hi Experts, I want to change category_level in $ cond_cat, if cond_cat is 1 than it should automatically take 2 in sub category instead of hard coding

user2816686Experts is there any option to automatically increase +1 in category_level for ex: $cond_cat=" where category_level='1' and ID='$sleads' "; than $cond_cat=" where category_level='2' and parent_id ='$sleads' "; my code is given below. <?php include('classes/global.php'); $CT=new Prod...

-1
Q: How to customize the process of creating an image in php

Ramaraju.dI am trying to create an image using php. Here is what i want to accomplish I have some chat messages in my database, so i want to get those database records and generate an image of that conversation. Example : I came across the following link image creation to create sample images. I ...

0
Q: how to pass a database connection like to a class

Ravindri want to pass connection link to a class. i try in such way but unable to get solution here dbconnect.php <?php global $con; $db_host="localhost"; $db_username="root"; $db_pass=""; $db_name="xxx"; $con= mysqli_connect("$db_host","$db_username","$db_pass") or die ("could not conne...

-2
Q: Find the number data in table in yii

JeevanI want to get the number of data present in the table but not to fetch them. In yii how to count the number of data present in table.

0
Q: PHP code is not submitting data from POST

HELPMEPLEASEIt was working until I tried adding this statement <?php echo "<input type=\"hidden\" name=\"hidden1\" value=\"$id\">" ?> I was able to get the indexnum from my form before but when I added that line nothing seems to load in the fields. Here is the full form: <form name="approveform" method...

0
Q: customise wp ecommerce admin notification email header to 'buyers email' as the reply address

user2818118i'm trying to customise the wp commerce admin email notification for transactions to have a header which is from the buyers email, so that I can reply to the notification email and it will send it to the buyer. At the moment the notification email is sent from the default admin email address, a...

0
Q: Getting Error Warning: imagejpeg() [function.imagejpeg]: gd-jpeg: JPEG library reports unrecoverable error

user1640432I am import the feeds data in our database by using API. But when i import the data getting error "Warning: imagejpeg() [function.imagejpeg]: gd-jpeg: JPEG library reports unrecoverable error: in /home/veebliss/public_html/wp-includes/class-wp-image-editor.php on line 337". Here is the code that...

0
Q: PHP mysql query for fetching datas from 2 tables

Ponraj PaulI have two tables users games My requirement [ { users:{ id: "1", user: "user1", games:[ { id : "1", game_names : "football" } { id : "2", game_names : "cricket" } { id : "3", game...

-2
Q: Moodle "You cannot add or remove questions because this quiz has been attempted."

Mayank SharmaI am using moodle Version: 2.2 (Build: 20111205) I want to add/remove question from the quiz running for last 3 months. Around 30+ students have already attempted this quiz. And thus, it is throwing following error "You cannot add or remove questions because this quiz has been attempted." Any he...

0
Q: how to remove first and last spaces in php

user2750450 $search=substr($search_string,0,-1); It is only removing last one space only .some times in last character after having 2 or more spaces how to remove all spaces after word last character and if some times end user entered first character space hoe to remove also first character.could you plea...

0
Q: Minimiz and Mzximiz Chat Room

user2781596it is my http://webus.pk website. I want to make minimiz and maximiz chat room without login. User just enter a name and start the chat and all data save in mysql database. how to make this form with jquery and php Please help me, Thanks in Advanced

0
Q: CSV file getting multiple records

JenzI am exporting result of a query in a csv file. The code is as shown below: $query = "SELECT DATE(punchdetails.punchin) as punchday,punchdetails.punchin,punchdetails.punchout,employeedetails.employeename FROM punchdetails join(employeedetails) ON punchdetails.employee...

1
Q: How to get DIVs with certain class and also without?

MannyI've got this HTML: <div class="hello top">some content</div> <div class="hello top">some content</div> <div class="hello">some content</div> <div class="hello">some content</div> <div class="hello">some content</div> ... and i am trying to get only those DIVs which has class "hello" but not c...

0
Q: how to fetch the phone number from mysql and send sms using API in php?

user2698545I'm using the Twilio API to send broadcast SMS messages based on an approved number. The problem in which I have encountered is not being able to successfully run a query pulling the phone information from a database and enter it into the API for each results that meet the query criteria to send ...

0
Q: PHP: $_SESSION[] click twice

RomanI have to create a wordpress website, which I've almost finished. Now I got some problems with the menu. I have to check which menu item is clicked (without page_id=""). So I found $_SESSION. I created 2 templates: Template 1: Products - This is what I've got in the products.php site: <?php /* ...

0
Q: oAuth 2 for authorization and automatic login

tomvoI've been trying to wrap my head around oAuth 2. We have a self-designed single sign on system in place for authenticating users using our domain to our customers' wordpress environments. It works but it is not the most scalable solution. So I've reading up on oAuth 2 in the hope it could repla...

0
Q: Weird character PHP \u00a3 instead of €

user2629419well I'm having a problem and this weird character is showing up '\u00a3' it's suppose to be a " € " symbol, but for some reason it's not doing that,anyone got any ideas why.

-1
Q: HOW TO GO LIVE A LOCALHOST WAMP SERVER USING PUBLIC IP ADDRESS

Histyaoa dear all, i am trying to go live my localhost wamp server without any hosting or purchase domain name just access directly http tranfic by my public/static ip address , which has(wamp server) installed on my machine. how to go live site directly(index),are we need to forward port in router...

0
Q: Issue with else statement

Adam SmithI have the code below to retrieve row from the database, but if I enter id that doesn't exist in the database in 'assign_id_input', it won't execute the else statement and display out 'Error'. $assign_id_input = $_POST['assign_id_input']; $search_assign_user_id = mysql_query("SELECT * FROM free...

posted on September 26, 2013 by Mark

My composer file looks like this: { "name": "mnbayazit/pdblog", "description": "A simple blog", "minimum-stability": "stable", "authors": [ { "name": "Mark Bayazit", "email": "mnbayazit@gmail.com" } ], "require": { "silex/silex": "1.*", "twig/twig": ">=1.13.2,<2.0-dev", "sy

0
Q: How to save a nested json in txt file with php

sirwilliamHow can I quick and easy save a JSON nested with php. What I mean with nested is this: nested json: { "key1":"value", "key2":"value", "key3":"value", "key4":{ "key1":"value", "key2":"value", "key3":"value" }, "key5":{ "key1":"value", ...

0
Q: Magento: How to remove a product/option by SKU from a bundle product programmatically?

Shane vdbI want to remove an option from my bundle product by their SKU, for instance if my bundle contains an option which contains XXX-XXXXX-x as SKU, it should remove that option from the bundle. So far I only got all the bundles(*ID's) listed which contain option with the SKU's I want to remove from ...

0
Q: Rendering events nicely on a day calendar view

TimI've built a small PHP MySQL web app that incorporates an event calendar. It's been pretty basic up till now in that it provided a simple year and month view. You can click on the day to then get the list of events for the day. At the moment, it's just that. A list of events. 10:00 am Meeting wi...

0
Q: Fetch users for a daily email PHP Heroku

user2656127So I'm looking at sending users a daily email for my application. Each user is part of an organisation, and an organisation has a TeamLeader who creates competitions, which users participate in. So, I can first, fetch all the active competitions, then find the organisation for each competition...

0
Q: apache-mod_auth_kerb; kerb_authenticate_user entered with user (NULL) and auth_type Kerberos; Client didn't delegate us their credential

rakkeshI am trying to setup Integrated Windows authentication with kerberos using ActiveDirectory in windows server 2008 and everything works well and I am able to get kerberos tickets on successful login. I am facing problem in forwarding this ticket to server where Apache is configured. When forwading...

0
Q: Convert string from mysql database in one run of while loop

Iain SimpsonI used explode to take an array of photo file names and put them into a string so that I can store them in a mysql database, they are stored in a field called 'imagesordered' like this : 329722360536.jpeg,278255684690.jpeg,813207971421.jpg so they are separated using commas. So far I have the f...

0
Q: How to fix: Parse error: syntax error, unexpected $end in /home/u940004575/public_html/index.php on line 152

Dragonfable517Can some one help me fix this " Parse error: syntax error, unexpected $end in /home/u940004575/public_html/index.php on line 152 " line 152 is the closing html tag i am using serversfree as my webhost my php was all fine and dandy until it gave me the error stated above please help, im not ve...

0
Q: how to remove two white spaces and first and last white spaces in php

user2798006Hi Friends I got recently trim($search_string, " "); function .it is removing last and first word spaces but word middle end user given two spaces or more spaces how to remove those spaces we will put in to single space in php .please help me friends . sorry for the my bad english

0
Q: Nominatim Reverse Geocode address in Thai Characters display incorrectly

user2518696I have these codes in PHP to do reverse geocode[get address from latitude, longtitude]: <?php $lon = 100.753; $lat = 13.69362; $addr = getAddress($lat,$lon); echo "Address: ".$addr; function getAddress($RG_Lat,$RG_Lon) { $json = "http://nominatim.openstreetmap.org/reverse?format=json&lat="...

1
Q: How to encrypt and decrypt data in php?

user2818254How to encrypt and decrypt data in php? My code so far is:- function encrypter($plaintext) { $plaintext = strtolower($plaintext); $crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256,FLENCKEY,$plaintext,MCRYPT_MODE_ECB); return trim(base64_encode($crypttext)); } function decrypter($...

0
Q: WooCommerce - excelling eCommerce widget not found showing

Dk-MacadamiaGreeting to all I have install WooCommerce - excelling eCommerce plugin for online web store on my blog, but the widgets of this plugin not showing...may be I have a little bit mistake but spent 2 hours and still at the same issue. for example I registered a widget in functions.php as: register...

0
Q: Should objects be created chronologically as class defined?

Ante OmnioI am having a strange error while creating objects. While I create an objects in chronological orders as classed defined, it is going on good. But when I change the order or object creation, it gives error. The classes I am using are as follows: <?php class dbClass{ private $dbHost, $dbUser, $d...

-5
Q: How to skip PHP call when javascript form validation return false

Datta DhondeI am doing both javascript validation and a call to php to on single form with the following piece of code. But when my validations go wrong I don't want to call php file. In this case the php file is getting called for both the cases.. <form method="post" action="http://localhost/investorForm....

0
Q: get Twitter user's all home timeline tweets dynamically and continuesly when online

user1673091i have a website , which has no of user's. what i want that , when i give them option to sink my website timeline with their twitter account timeline. so he/she should be able to see all tweets from his/her twitter account plus also tweets from my site. Is there any way to do that????

0
Q: Qn on jquery plugin (.scrollPagination)

LawrenceI've a piece of code here i got from GitHub. Its a Jquery scroll pagination plugin. https://github.com/andferminiano/jquery-scroll-pagination/tree/master JAVASCRIPT $(function(){ $('#existing_campaign').scrollPagination({ 'contentPage': '/cs_directory/helpers/campaigns_...

0
Q: How to merge data from 2 tables with MySQL

TijuanaKezI have 2 tables set up something like below, what MySQL querys do I need to use to return assoc arrays of each entry along with it's associated fields? I've tried various JOINs but they all return a result for every item in the second table. Ultimately I want a parent array with one child assoc ...

0
Q: Move next page after click on confirmation using smarty

kapilHello I am Working in smarty and i have question with java script. i have one array which name is {$waiting_list} which contain time id of user which is in waiting list. and i have display all those user in my page with like following. {foreach from=$waiting_list item=waiting name=waiting} <...

0
Q: ipad refresh the tab when clicked submit button

namrathaactually m using desktop and ipad..in desktop browser when i click on submit button the page in ipad browser should get refreshed... suppose in desktop browser i have created a file test1.php <input type="submit" value= "submit"/> when i click on submit button the page in ipad should get refr...

0
Q: php preg_match_all and preg_replace.

Parthi[caption id="attachment_1342" align="alignleft" width="300" caption="Cheers... "Forward" diversifying innovation to secure first place. "][/caption] A group of 35 students from... I'm reading this data from api. I want the text just start with A group of 35 students from.... Help me to replace ...

0
Q: Twitter api 1.1 is not loading all followers

cloudacdevI have a program to get followers details of a person. the code is working fine upto the follower count 3000. i tried with another person which have 200000 Followers. Unfortunately it is showing only 300 followers why this happen? is there any way to fix this? Thanks.

0
Q: Retain selected check box using ajax

KrishnaPlease help me with my code this is my snippet.. I am using ajax to get the data of my selected radio button after ill submit it I want my selected check box remain. Please help me how.. func.php <?php $sql = "SELECT * FROM tbl_func"; $res = mysql_query($sql) or die(mysql_error()); $row = my...

0
Q: How to create Views in VIews in a CMS(Wordpress)

ZenlayannI dont have any idea how to do it. My webpage is a self-made wordpress-theme SPA. I have 3 cols, the first one is static, the center col is updated with post and the right one is dynamic. So, if you click on a link in the center-col, the right col should reload the full post (it does, particular)...

0
Q: sending mail with php mail() in plesk control panel

KiyarashThis is my code: <?php if ( isset($_POST['send']) ) { $name = $_POST['name']; $to = 'kiarash@gmail.com'; $subject = 'Test Sending'; $message = 'This is Test for sending Mail'; $header = 'Content-type: text/plain; charset="utf-8"' . "\r\n" . 'From: test@site.ir' . "\r\n"...

0
Q: Php file executes 2 times with htaccess redirect and facebook login code

Emil FloreaHi I have this code in my .htaccess file: RewriteOptions inherit RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http\:\/\/www.%{HTTP_HOST}/$1 [R=301,L] Options +FollowSymLinks RewriteEngine on RewriteRule ([0-9]+)/([a-zA-Z]+)/ embed.php?video=$1 [QSA,L] RewriteRule ([0-9]+)...

0
Q: php script to inject emails to sendmail or mailx or powerMTA installed on server

abhinav dixiti would like to write one php code which will inject my clients emails to smtp relay software installed on linux server . i can directly use mailx to send text email to few specific email ids. but how could i make make it dynamic . for me dynamic means there will a gui panel by which ...

0
Q: Using proc_open() to run C executable in PHP

user2800050I am sorry (again) if you find this question noob. But I am really having a problem on proc_open. I have a C file and I want to run it using proc_open() and read the input from a textfile. I was able to fetch and feed the input to the executable. The problem is that I just hardcoded the "array o...

0
Q: Browser Back button redirect to 1st page while it should go to previous visited page while using Paging

HardCoderI have search menu option to search cities for meal when i enter city name and clicked on search button meal list are shown to me with 1,2,3,next option of pagination. But suppose i'm on page 2 and clicked on page 3 and open a Host for meal and if i clicked browser back button or backspace my pa...

0
Q: PHP inserting the type datetime into sql

lokoI have made a sql row as type: datetime. The input for datetime should be like: 2013-02-02 10:13:20 You get the drill like: 0000-00-00 00:00:00 Now In php I use date("Y-m-d H:i:s");(current date and time) to insert it into my database. There are other variables as well. Those variables get ins...

0
Q: PHP: How to check if a <p> has a child node of <iframe> with DOMDocument?

lauthiamkokHow can I check if a p has a child node of iframe with DOMDocument? For instance, <p><iframe ....></p> I want to print this only, <iframe ....> While, <p>bla bla bal</p> then do nothing or just print whatever inside the p, <p>bla bla bal</p> Or, <p>bla bla <b>bal</b></p> then do ...

0
Q: Unit Testing MongoDB repositories

David BarkerI've been trying to find some resources on unit testing repositories that use MongoDB but am not having much luck. With {x}SQL repositories I've always set up a mock SQLite database for running these tests. I can't do this with Mongo and am faced with the possibility of having 150+ unit tests th...

0
Q: Php save 4 data to mysql db instead of 2 in my sms gatway api

AlexI'm using a php sms API which sent sms (not email) to my registered user. So in my html form there is a option to send sms by uploading a file where all contact exist. After successfully sent sms I saved it to mysql db. Well, everything is ok now but in my .txt file (Sending sms by uploading ....

0
Q: Issue with SQL updating php variable to the database

Adam SmithI have the code below that UPDATE my database record. $assign_id_input = $_POST['assign_id_input']; // Get ID input from user, it is always an integer $assign_math = $_POST['input_math']; // Get the input from user mysql_query("UPDATE free_ebook SET math = $assign_math WHERE useid = $assign_id...

0
Q: Open Source PHP ticketing system suggestion

Danish FayazI've developed a front end of a Ticketing system for my project. Now I wish to integrate some flexible open source ticketing system with it so I can add more options like ticket fields to it etc. Can you suggest me a good one? Thanks all

0
Q: How can i match next line by preg_match in php

RajaramanHow can i match next line in string by preg_match. I have tried, the code is blow. $str = "== heading == strint1... strint2... strint3... strint4..."; preg_match_all("/==\sheading\s==((?:.|[\r\n])+)/i",$str,$res); Most of the time its working fine, But sometime its not working( th...

0
Q: Your own OpenID Connect provider (open source)

RGIIIOpenIP Connect is still a bit new and I'm currently looking for open source software to run my own OpenID Connect provider (OP server). It should be as simple as possible (Java or PHP) to be able to quickly set up a test environment. But it should also allow me to add custom plugins, e.g. to let ...

0
Q: Issue in converting vbscript to php

SubhenduWhile converting a asp vbscript to php I face an issue. The code looks like: While ((Repeat1__numRows <> 0) AND (NOT Rs_emp_cat.EOF)) wk_sum = 0 If ((NOT Rs_emp_work.EOF) AND (NOT Rs_emp_cat.EOF)) Then emp_cat_ecode = Trim(Rs_emp_cat.Fields.Item("ecode").Value) emp_work_e...

0
Q: PHP not posting form enteries to the same page

PaulieHere's a form I have. I want to post the form entries to the same page and then do something else with it. However, echoing the values doesn't seem to be working. What am I doing wrong? Here's the HTML part: <div class="well"> <form name="myform" class="form-horizontal" id="form" onsubm...

0
Q: What is the meaning of form action="/"?

MaDu_LKaction of a form normally refers to the script which runs after submittting. I saw a code with form action="/" and I am unable to find to where it goes. Someone please explain me.

0
Q: How to retrieve more than one data in email?

user2810332I have a table named 'laptop' and a column inside the table named 'Lap_War_Expiry'. I need to send an email to user when the warranty of the laptop is going to expire soon. For your information, there is more than one warranty that will expired in a day. But the code below is only send the same d...

0
Q: Confirm button before running deleting routine from website

Richard GriffithsI have a page on my website that is dynamically created with information from an SQL database. As well as the data being displayed a delete link is also created for each record which links to a php file called deleteRecord.php that deletes that record from the database. Is there any way I can ...

0
Q: Why is the following sql query in php not working?

poorvankbhatiaI am new to php and Sql. And i am trying to get data from a HTML form and insert it into database. My html code is as follows: <!DOCTYPE HTML> <html> <body> <form action="welcome.php" method="post"> Name: <input type="text" name="name"><br> E-mail: <input type="text" name="email"><br> <input ...

0
Q: Image uploading using ajax gives non-whitespace character after JSON data?

Irfan AhmedI am getting this error while uploading image using ajax, SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data I googled, but not found any appropriate answer, Here is my ajax function, $(document).ready(function(){ $('#image').on('change', function(){ ...

0
Q: What is the \Object in function() {\Object $object} in function parameters

xiankaiI recall having seen this syntax before, and it seems valid as well. function myFunction(\Object $object) { } While I vaguely recall it to be just a helpful naming scheme for an otherwise dynamically-typed variable, I could not find (or rather not knowing what to search for) any reference to t...

0
Q: Stock Quantity not Updated after Placing Order in magento

ShashiBelow code is working fine for me to place an order in magento but stock quantity is not updated its remain as it is, but when i place an order from frontend the order is placed and stock is updated but when i am using below code to place an order, stock quantity remain same. I also want to send...

0
Q: PHP: Cross domain access setting

mondaFrom my PHP website (running in XAMP--locally) i need to make a request to Java application do i make any specila setting in php.ini so any other file to enable cross domain ajax and other request.

0
Q: Getting some error while opening excel that is generated using PHP

Amit SinglaI am getting the below error while openning the excel generated using PHP code: "Excel cannot be open file "test.xls" becouse the file format or file extebnsion is not valid,verify that the file has not been corupted" And here is the error log for above: <?xml version="1.0" encoding="UTF-8" sta...

0
Q: The load event of an iframe isn't fired while Content-Disposition header is configured as attachment

bhavinFirst of all i just want the 'load' event to be fired only in Mozilla Firefox. I've already tried different ways, but all i came to know is that load event of an ifrmae will only gets fired while the 'Content-Disposition' header is configured as 'inline'. Is there any other event by which i cam...

0
Q: Laravel - how do I write a raw SQL parameterized query?

ericbae(Coming from CodeIgniter background).. In CodeIgniter, my raw query was written like so: $q = "SELECT * FROM my_table WHERE id=? AND name=?"; $query = $this->db->query($q, array($this->input->get('id'), $this->input->get('name'))); In Laravel, I'm currently trying to do something similar $d...

0
Q: Creating identical page in Wordpress shows no content

Konstantinos PapakonstantinouI am trying to understand the file structure of a Wordpress theme. I have a user page with a url http://mysite.com/user/username. I noticed that inside the active theme there is a user.php, which is probably serving this page, right? I create a new page, call it User2 using the same template as U...

0
Q: Drupal CTools access check

BastiI want to create a ctools access check for my panel selection rule. What I wanna do, is to check a field value in a content type. The field is named field_layout with the options 3,2,1. I created the access check and settings and the rule is showing up in the selection rule options. I can add it...

1
Q: writting to text file vs updating a database

piosoiqI would like to know if there is any way of measuring the overhead time difference, and resource consumption (memory) between overwriting a file vs updating a mysql database. Lets just assume that I am updating one row, BUT with two statements. Meaning I would have have to fetch the database for...

1
Q: How to extract substring from a String from specific String to Specific end?

NullVoidHow can I extract specific sub string from a Main String from specific string to specific end String. Like I have below path your path is D:///path/to/required/directory/sample/subdirectory/a/b/abc/sample.text from above path I want to extract sub string from /sample to abc. In detail /...

0
Q: Curl don't work with pagination for a specific website

henriI try to scrap some content from a website and I have a problem which maybe trivial but I can't find a solution. For the first page it works but when I browse (with curl) the following pages I still get the content for the page 1 which is strange. I guess the website have some scrapping protectio...

-1
Q: How to parse this complex array in PHP?

Alex VanniniI have this structure coming from an array dump: 0 => object(stdClass)[3] public 'start' => string '12:30:00' (length=8) public 'end' => string '12:45:00' (length=8) public 'structure' => object(stdClass)[5] public 'structure_id' => int 5 public 'structure_name' => string...

0
Q: SQL requests optimization using OO PHP

Yonn TrimoreauGood morning, I'd like to know if there's a way to fully optimize my SQL requests using OO PHP. Let's take an example, we have 3 object classes named like 3 tables : Product : id, name, price, color... Customer : id, name, surname, email... Cart : id, id_product, id_customer... All getters a...

0
Q: Facebook page tab is not loading my javascript plugin correctly in IE8

Bananam00nI am making a facebook page tab that uses a map plugin called Rockstar-map I know this plugin is mostly used in Wordpress, but you can also use it as standalone. Anyway, the whole thing works perfectly fine in all browsers, except IE8 (and probably lower, but we don't support that). Sometimes t...

0
Q: install SOAP Extension in apache from Remote System

talhamalik22I was trying to use soap services but i have been facing following error Fatal error: Class "SoapClient" not found I have determined one part that was the easy one that soap extension is not installed. So now i want to install it but i can only access to the server through terminal and root us...

0
Q: Update website(s) similar functionality as used by wordpress and others

John StanfordWe have developed a CMS based website builder. It is currently available only in asp/ms-sql. A php/mysql version is in production now. One critical thing that we are missing is a way to notify users of this software about an available update and a simple "one-click" solution to installing the ...

0
Q: Can I get the timestamp in specific time zone?

Basel ShbebI have a MySQL query that saves a comment in the database and save also the timestamp I want to save the timestamp in another time zone settings can i do it through the following query: INSERT INTO tahminler (comment, comment_text, match_id, user_id, timestamp) VALUES ('$comment','$comment_te...

1
Q: Google Maps remains gray on reload of child PHP page

HoriaI have a parent php page containing a DIV named "cola" in wich I load other PHP pages like this: $.post(page+".php", { ... }, function(output) {$('#cola').html(output).fadeIn(); }); Some of the child php pages contain a google map. Also eatch child php page comes with its own javascript file ...

0
Q: Highlight unvalid fields instead of prompting towards a Error Page at wordpress comments

ShawnWhiteI have a huge problem. I used the comments.php from "EmptyCanvas". Code of it can be seen here: http://pastebin.com/YHDy2q4a However, it prompts me towards an error page when I do not fill out the fields as required when posting a comment. I'd rather like a highlighting of fields, which I use wit...

0
Q: Doctrine2 Class Table Inheritance

bballer84I am a little bit confused by doctrine's documentation so maybe you can help me. I have following class inheritance: <?php class User { /** * @var int */ private $_id; /** * @var Role */ private $_role; } class Company extends User { } class Customer extends Us...

-1
Q: How to present the sql '.' in php

user2210819The sql I put in php $sql = 'select * from table_1 where (col_1, LOCATE('.',col_1))'; However the '.' the $sql would become select * from table_1 where (col_1, LOCATE(,col_1)) because of the '.' How to present '.' , when I put it in php

0
Q: Yii Cgridview Dynamic Columns

Jon Paul HI am looking at customising the yii cgridview. I want to be able to allow users to select which columns they wish to see. Currently I am selecting the exact columns which will be displayed. I have had a look for information on this but do not seem to be getting very far, maybe I am not looking f...

0
Q: Update my session variables

user2688737How do I upgrade my session variables without having to log out? I have this session array that has to be updated: $ data_for_analog_meter = $ _SESSION ['data_for_analog_meter']; Any idea is appreciated!

-2
Q: Error occuer in the Insert_id function in sql

user2795591I want to get last insertion id but error occurred in the function given below. $insert_id = $db->insert_id();

0
Q: MultiEmailValidator class not validation YII

Set outI am trying to validate multiple emails which is given as input from text area. If i give test@gmail.com it shows valid but if i try test@gmail.com,test1@gmail.com it shows not valid emails. EmailValidator class Downloaded class from here Downloaded and extracted in extension directory too. ...

0
Q: Send Multiple Text Fields in Array in PHP

dpDesignzI have the following code in my file: <table width="100%" class="friends"> <tr> <th width="50%">Friends Name</th> <th>Friends Email</th> </tr> <tr> <td><input type="text" name="friendname[]" id="friendname[]" class="validate[minSize[4]]" min="4" placeholder="John &amp; Jane Doe" styl...

0
Q: htaccess - include a file if query value is true

user007I want to override my PHP script with htaccess if my query string contain http://loaclhost/index.php?feed=true then I want to load feed.php file instead of default index.php And I want to keep this htaccess file with above rule inside a sub directory. Please help me.

0
Q: Yii: How to redirect and go to a specific element on page?

Ionut Flavius PogacianI am trying to redirect and go to a specific element on the new page like this: http://192.168.0.49/x/y/index.php/admin/user/update/id/3#certificate $this->redirect(array('update', 'id' => $certificate->user_id)); How can this be done?

-1
Q: Iteration with javascript array in PHP

TuLKaRiSfirst sorry for my poor English, I´ll try to explain my problem. I have an array in Javascript with a list of blocks. This array may change his length. I must to access it from PHP because I must to do some operations in my database. The problem is lenght of this array may change. This is the co...

0
Q: How to create radiobuttons from more than one column and make one active at a time

user2770039I have two columns 'ReviewedDate' and 'Approved' . Now, I need to create 4 radiobuttons in the search form where each column will have two radiobuttons.('ReviewedDate' has 'Reviewed' and 'Not Reviewed' radiobuttons) and ('Approved' will have 'Approved' and 'Rejected' radiobuttons). Suppose if I c...

0
Q: php and sql date-time help needed

user2701926Hello all i am rahul jha and i want to ask how to convert the date-time comming from sql server into other format .. the value comming from the sql database is like 2013-09-23 12:20:30 and i want it to be displayed like sept-23 12:30 pm .. i can send the date-time to server in this format by php ...

0
Q: Regex to match special characters-insensitive?

jlmmnsIs there a regular expression to match strings with and without special characters? Special characters-insensitive, so to speak. Like é will match e, and vice versa. Any ideas? Thanks.

0
Q: How can read data provided in $params after redirecting to given redirect uri from Facebook

Sajin M Aboobakkar$params = array('scope' => 'read_stream, friends_likes', 'redirect_uri' => 'http://www.mcommercials.com/', 'display' => 'popup' ); $loginUrl = $facebook->getLoginUrl($params);

0
Q: how to make data not in json value 0?

user2128405I'm really sorry for my bad title because I don't know how to shorten my question. I had a bit help earlier with the thing I'm trying at the moment but then now I'm stuck again and couldn't get out of my box again. Helpfully someone can give me a hand. the codes are a bit too long so hopefully ...

0
Q: What's the correct way of implementing MVC?

DasunI have been using MVC for the quite sometime. I have used CI, Joomla MVC, so on. What I'm used to is a request is grabbed from controller and controller coordinates with the model to get the data. Then data is passed to the view from the controller. Here view never contacts model directly. Pleas...

0
Q: How creating a separate html with the same item name for each item on an electronic marketing website?

Adel Wafaactually i spent about 1 week in searching a solution for these case but i couldn't get anything, i hope u help me. i have developed an e-marketing website, and in some page i displays my items using PHP , the required is i want each time the user click on item title or image the PHP go to a sep...

-1
Q: Remove new line space within html tags

Ravi SharmaGetting one html string like: <a href="http://www.travelallrussia.com"><img alt="www.travelallrussia.com" src="cid:part2.07090303.02090009@travelallrussia.com" height="43" width="250" align="right" border="0"></a> Want to remove its new line space and make l...

0
Q: Showing Custom Taxonomy Post Counts in Wordpress

user2798091I have created custom posts with custom taxonomy categories in wordpress. I have also created html link and i would like to show the custom post count related to the html next to it. Please help in regards to how I can show these? Thanks

1
Q: PHP dropdown default vlalue

CarterI have this code,How would you set a default selection in this dropdown menu. <tr><td class="tdt"> <?php te('Hypervisor');?>:</td> <td title='Add more from Hypervisor menu'> <select validate='required:true' class='mandatory' name='hyp'> <option value=''>Select</option> <?php ...

0
Q: php upload restriction for user

slash-bangI have searched on this site and google. I found a lot's of suggestion about php upload restriction for user upload. Such as, check extension, getimagesize() or read file data and check if it is legal image or not etc etc. But my thinking is: if i create a .htaccess to execute only img file a...

0
Q: Magento 1.7.0.2 List.phtml image hover

Dan DaviesMy questions is how do I assign a custom attribute as an image for the hover image in the list.phtml file. I have done my research and got the site to do what I want by using this code to call the image in the grid view on list.phtml <a href="<?php echo $_product->getProductUrl() ?>" title="<?p...

0
Q: jquery auto suggest in different input field

user2131695Hi i am new to Jquery and using an autosuggest plugin for my code. for one input box it is working fine but i have two input box and when i am selecting for one input box it is getting selected for both input box.Please help (function($){ $.fn.extend({ autoSuggest : function(options)...

0
Q: unable to insert values in table using loop

user2735598thanks in advance what i was doing is that i created a table in mysql with record details like (id , name, date, ) and another table with personal details like (id, name, address , batch , dob , gender and blood group, and so on ) what i want to do is that i want to fetch some details from per...

0
Q: comparing date with mongoDB ISODate format in php

veer7I am having a field in mongoDB, say birth_date which is in ISODate format like ISODate("2013-08-15T23:00:00Z") In php, I am getting dates in the string format "2013-08-10" I want all the data for which birth_date is greater than 2013-08-10 For this I have a code $inputDate = "2013-08-1...

0
Q: Mail not being sent with PHP

Pallavi Singhi am trying to send a mail from my PHP application. Below is my code. <?php error_reporting (E_ALL); ini_set ('SMTP', 'smtp.live.com'); ini_set ('smtp_port', '587'); ini_set ('sendmail_from', 'mymail@hotmail.com'); $to = "urmail@hotmail.com"; $subject = "Test mail";...

0
Q: html mailer in php images not displaying

Mohammad FaisalI'm writing a program to send html embedded mail. For this purpose I've used NicEdit - WYSIWYG editor. When I do send a mail, the images disappears in the mail. In php mail() I've used headers as: $header="From: no-reply@prithviassociates.org\r\nX-Mailer: PHP/".phpversion()."\r\n". "MIM...

0
Q: Flattening an array in PHP

ccdaviesI have gone through a selection of posts here on how to flatten a PHP array, but none of them have helped me to work out how to get the array down to the level I want. The array is currently outputting like this: array(4) { [0]=> array(1) { ["entry_id"]=> string(3) "342" } [1]=> array(1) { ["en...

0
Q: Echoing a count returns the word Array instead of the number

Craig MartinI have problem with the query below. It echos the word Array instead of a number. Am I not using the mysql_fetch_assoc correctly? The query works in phpmyadmin, without the variables of course. The variables do echo the right data when tested. Any thoughts? $uniquejuror = "SELECT COUNT(case_numb...

0
Q: Authorization control in redirected page in php

Ramazan GülerşenI have a simple controller which shows confirmations to be approved.When the users press register button confirmation page is shown. But when users enter url as ..../confirmation without registering , the page is shown. I dont want it to be shown without registering. in asp.net mvc4 this can b...

0
Q: large link when using $_get

sidi am processing a activation link.which looks like this. localhost/actvte/validate.php?type=activate&geo=define& value=227755RYQBENU5G8WE7RFPO6CD6Z#MJ1H1FA@G#IZWZ53903 &target=loaded&resrc=G6MYMI2R67727229911380184297841084713071U8VUYIGR &master=user@gmail.com but when i use $_get['value'] i g...

0
Q: Versatile format for date validations?

EJTHI am looking for a versatile method for validating dates. What I want, is some way of achieving validation rules such as: First monday of month monday or friday Fourth day of month Is there anything that can handle such requirements? Or does anyone have any pointers as to how i could achieve...

0
Q: HTML5 Web Storage Creating Variables

user2195574I'm looking to create quite a few variables in JavaScript for storing boolean variables in HTML5 Web Storage. I want the variables to be as follows: localStorage.title1 = '0'; localStorage.title2 = '0'; localStorage.title3 = '0'; And so on ... The problem I face is that I want to create these...

0
Q: simple table issue with columns

Ktech13ok so i am using readdir to snag file names from multiple directories. i was wondering if there is a way to arrange the data so that each time it starts a new directory it makes a new column i.e. ---| user1 | user2 | user3 | ---| file1a | file2a | file3a | ---| file1b | file2b | file3b | ---|...

0
Q: Static method to return the class and method it's actually used in

user2728706ere is what I want to do : i want to be able to debug my application nice and clean. I've got this static html::debug($var) that I would want to return the class and method it's used in plus the variable name and its contents, without knowing the name of the class it will be used in in advance. ...

0
Q: applying .on on dynamically added elements

LawrenceI've a snippet of code that runs a ajax request to another script and appending new <li>s everytime the more button is being clicked. I'm using the following code: $(function(){ $('.more').on("click",function(){ var ID = $(this).attr("id"); if(ID){ $("#more"+ID).html('<img src=...

0
Q: Shortcut to isset() and assigning values

NormanIs there a shortcut method to assigning $_GET['values'] to variables? I currently do like others do: if(isset($_GET['type'],$_GET['case']) $type = $_GET['type']; $case = $_GET['case']; Is there a cleaner method to do this instead of doing like below separately. $type = $_GET['type']; ...

0
Q: Looping XML Values

CharlieI exported the .kml file for a place list created on google maps, this looks like so: <Placemark> <name>Rigibore Ltd</name> <description><![CDATA[<div dir="ltr">5 Guildford Road, Industrial Estate, Hayle TR27 4BA <br>01736 755355 <br>www.rigibore.com</div>]]></description> <styleUrl>...

0
Q: purpose of the max number in php & mysql

user1884324What is the main purpose for the maximum limit for number in php and mysql? Does this means that we can/cannot process or store numbers that is larger than the limit?

0
Q: Data table 1.9.4 editable API how to add multiple input types on same table

Rupak DasPlease Help! I am using datatable 1.9.4 editable API.I am facing problem to add multiple input types on same table. In jquery.jeditable.js library we can only provide one input type as below. $.fn.editable.defaults = { name : 'value', id : 'id', type : 'text', width : 'auto', height : 'auto...

1
Q: Is this a PHP BUG???? function in ${$var};

Steven Scanlonin PHP ... var_dump(${'_GET'}); --> array(0) { } $var = '_GET'; var_dump(${$var}); --> array(0) { } function test() { var_dump(${'_GET'}); --> array(0) { } $var = '_GET'; var_dump(${$var}); --> NULL } test(); What happen?

0
Q: Search records on DB in Symfony2

Coyote UglyI'm building a page in Symfony2 that permits me to search a term (e.g. a name of a person) in my Database and show in the same page (even after a page reload) all matching records (e.g. all the person with this name). This is my anagrafica.html.twig {# src/Acme/MyBundle/Resources/views/Page/ana...

0
Q: Heroku causing issues uploading images with PHP & S3

user2656127I am using PHP and S3 to upload images, which works fine on my local. On Heroku, I am getting the following error: "PHP Fatal error: Call to undefined function imagejpeg() in /app/www/AmazonS3Handler.php on line 195" Line 195 contains the following: //build the jpeg imagejpeg($destinationI...

0
Q: PHP Regex - accept all positive numbers except for 1

ptheofanRegexes and I have a relationship of love and hate. I need to match (accept) all numbers except for number 1 and 0 103 => 103 013 => 013 201 => 201 340 => 340 001 => no match 010 => no match 100 => no match 1 => no match 000 => no match 00 => no match 0 => no match I've tried some variati...

0
Q: "Unauthorised" rest api in yii

Sreei have downloaded the code for rest api from the official site of yii http://www.yiiframework.com/wiki/175/how-to-create-a-rest-api/ , also i have implemented it in the blog demo. I have tried to run this url http://my_host/yii-blog-rest/index.php/api/ i got a response as [1,2,3] but ...

0
Q: How do I clear an SplStack?

Prof. FalkenThe SplStack has many functions for accessing its elements, but is there a way to clear it? Or should I replace my stack by replacing it with a new, empty stack?

0
Q: How to access operations for a particular role from database in Yii?

Raju.allenI am trying to develop a real-time enterprise application which has rich Role Based Access Control features so i chosen Yii, which is rich in RBAC Support. I have a use case where operations(Features) may differ with each users. A particular user may be allowed/requested to use particular featur...

0
Q: Jquery Datatables event handler not working with paging

Stefen WiranataSorry for troubling you again i have table with last column is an element to get entire row data, when i use paging, just first page that trigger my function , page 2 - 3 - 4 and so on not trigger my function. but when i disable paging all record trigger my function. initialisation and functio...

0
Q: Using AND statement in a pg_query() issue

MichaelPCurrently experiencing a weird difficulty with a PostgresSQL query I made to retrieve user credentials from a database. Please disregard the security-wise approach; for testing purposes only. Using the following query; $result = pg_query($dbconnection,"SELECT \"username\" AND \"password\" FROM ...

0
Q: mysql value to html form

user2818691on my website i got a firebase chat running with username + PIN authentication required after logging in to the site and opening the chat box, (here is the most important three tags in this post: <div id='messagesDiv'></div> <input type='hidden' id='nameInput' value=''> <input type='...

0
Q: How to add +1 value to an update_post_meta function

user2806378If this variable is dynamically set as $newsales_countday = 10. The below command will update the post meta key sales_countday, and give it a value of '10' update_post_meta ( $productId, 'sales_countday', $newsales_countday ) ; What I want to know is how can you just +1 to that value, so that...

0
Q: Update mysql with Sprintf function

JosephI tried to use this function built to update my table. it runs fine but no effect on the table. Any ideas from anyone would be appreciated. function update_member_info($id) { $sql=sprintf("UPDATE members_tbl SET email_address=%s, password=%s, first_name=%s, middle_name=%s, last_name=%s, ...

0
Q: PHP Photo to PDF

user2818788I am a beginner fumbling wiht PHP at this moment. Here is what I need to build. Let users upload photos from my website. Multiple photos of course, probably 10-20 or more in one shot. Store those photos in my web server Stitch those photos into a PDF document and let the user download the PDF f...

0
Q: Adding and editing values in array

anel_bI have a problem with merging two similar arrays. They both have a similar structure. $array1 = array( 'A' => array ( 'money_in' => 0, 'money_out' => 0 ), 'B' => array ( 'money_in' => 0, 'money_out' => 0 ), 'C' => array ( 'money_in' =>...

0
Q: Javascript code doesn't work when including externally from file

XufyanI have my complete php theme that I'm designing and there is another plugin that I am using for a Image Slideshow, This is the code for my image slideshow, <script type="text/javascript" src="plugins/stack/js/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="plugins/stack/...

0
Q: accessing SQL server 2008 data from php website

geetaI am trying to access SQL server 2008 data on my php website. I am able to access SQL server data from php site on my PC. But when I am importing that code on my domain I am unable to access SQL server data. I have tried the following code <?php $serverName = ".\SQLEXPRESS"; // this is work...

0
Q: Soap Request Header is not well-formatted

maikelsabidoThe header of my SOAP Request is in a wrong format. I need to have a header that looks like this: <soap-env:header> <wsse:security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss...

0
Q: PHP 'file_get_contents' does not work from server

mondaI have a website (PHP) hosted in Yahoo small business and application (Java) Hosted in Rackspace. I am making a file_get_contents from website to application. which works fine in my local. but when i try the same after deploying it in server does not work. Here i am making arequest which sends...

0
Q: call a class method, when access to the property is a class that is not defined

Michel Phelps __set() is run when writing data to inaccessible properties. __get() is utilized for reading data from inaccessible properties. __callStatic() is triggered when invoking inaccessible methods in a static context. How to call a class method, when access to the property is a class t...

0
Q: How to close a socket connection in script?

user2208704Im using SocketServer.class.php to do connection from a GPS tracking unit to my server. A quick example of whats happening. Unit connects to my server, connection is established and data/buffer is sent to server and the unit disconnects and this tells the socket to close. But on some versions of...

0
Q: how to pass json or class object to command line php script

Vivek MuthalI have $client = new Google_Client(); And it's token in json. Now I want to pass this client object as well as json token to another script via shell_exec(). Let's assume command as php myscript.php var1 var2 $client $token Now as command line takes all argument as string I am not able to...

-2
Q: How to synchronize slideshow with one location to all other location

TorettoI have a scenario, Where I have slideshow in the website(Tutorial) and It has command button like play, pause, next, previous. What I want is those command button will only show to administrator and admin will only have the access (This part will be done by PHP script) and when admin change the s...

-1
Q: Why do I need the Symfony formbuilder? Whats the benefit?

user2818822My Question is, for what do I need this formbuilder. Is it not enough for programmers like me, who has written the last years plain php code with simple css and html, that I have to learn twig and to went into the symfony system with all the learning stuff. Now I can't use twig vor forms. Ok, I ...

0
Q: PHP echo the css stylesheet into header

user2798413i want to have a dropdown list with different stylesheets, and echo them into the header section. Is it possible? How do i go about doing it?

0
Q: Removing items from a string

ccdaviesI have the following array called $submissions: Array ( [0] => 342 [1] => 343 [2] => 344 [3] => 345 ) I then have a string: $in_both = 342,344; I then am using this code to remove any number thats in $in_both from $submissions: if(($key = array_search($in_both, $submissions)) !== false) { ...

0
Q: ISpVoice::Speak() access denied

ArthurNThis question is related to my previous question: Running Windows Speech SDK application in PHP. I checked the value of hr after this line: hr = cpVoice->Speak(L"Hello World", SPF_DEFAULT, NULL); If I run the program in a console, I get hr = 0 (S_OK). But if I call the program from a browser ...

0
Q: HTML page load time

user1900980Hi guys I got a small problem. I got some site which get displayed on handheld computers. Those computers are SLOW. Even though they cost 4 figures they have Windows CE5/CE6 and 300-800 MHz CPUs. Those handhelds are running a php based database application. We already minimized the javascript to...

0
Q: HTML DOM Parser : how to get the url only from one domain?

Jhohannes Purbafunction get_link_and_anchor($url_awal) { $html = file_get_html($url_awal); $dom = new DOMDocument(); @$dom->loadHTML($html); $anchors = $dom->getElementsByTagName('a'); foreach ($anchors as $anchor) { $url_dari_konten = $anchor->getAttribute('href'); $urltext = $anchor->nodeValue; $...

-2
Q: Server-side GTD software

mvillarI'm seeking for a GTD software for my bussiness, this software might be server-side (accesible via web app or desktop/mobile app), but, very important. Hosted in a local server, not in the cloud. Resume: local GTD server. Someone knows one (if exists) Regards

0
Q: $.ajaxFileUpload successfully uploads file to a folder but wasn't able to pass values to be saved in the database

Eli_junI have used ajaxfileupload upon form submission of my form. This is also for uploading purposes for image files. The image was successfully uploaded, however other data to be saved to database wasn't been included? Because it leaves my table fields blank, so I was thinking the values wasn't been ...

0
Q: codeigniter session working on local host but not working on server and also sit

user2798006Hi Friends I am struggling session in codeigniter everything working fine my system but server or sit machine not working session public function voting() { //like and dislike controller $deal_id = $this->input->post('voteId'); $upOrDown = $this->input->post('upOrDown'); ...

0
Q: Why does $_SERVER['REMOTE_ADDR'] return the gateway ip rather than the remote ip with a fortigate router?

derekdreeryI have a server connected to the internet through a Fortigate 40C. When my php code calls $_SERVER['REMOTE_ADDR'], it returns the ip address of the router (the fortigate) rather than the remote IP accessing the php script. Why is this?

0
Q: Getting uploded file thumbnail image in mediawiki

rajeshkumarIn mediawiki. using api i just upload the video file . Th file is uploaded to the correct path but i cannot get thumbnail of the uploaded video image.

0
Q: How to remove spaces ( new lines) from string?

AviAtionmy string is: $str = "[php]\r\n complete once A lot of text and other staffs! but \n \r\n \r\n \n[/php]"; $str = preg_replace("/\[php\]\s*(.*?)\s*\[\/php]/is","<pre>\\1</pre>",$str); echo $str; on out: <pre>complete once A lot of text and other staffs! but</pre> It works in a san...

0
Q: Weird error when executing MSSQL prepared query

Phil CrossI've got an issue with odbc_* functions. This is the first query I've had the issues with. I have the following code: $conn = odbc_connect('DSN', 'USERNAME', 'PASSWORD'); $stmt = odbc_prepare($conn, " SELECT * FROM Table1 AS a INNER JOIN Table2 AS c ON c.StudentId = a.StudentI...

0
Q: PHP Assign variables to multiple dynamic form rows

kala233I am having a little trouble getting my head around a script that pulls info from a form and saves to a csv on the server. The issue is, I have a form with multiple tables, in these tables there is a "+" button to add another row. Which I am using jquery to do so. This works fine and also saves t...

0
Q: PHP: Unset session JUST on update

TrepsI have a HTML form with information. If the submitted data is incorrect an error message will appear with a back button. A session with the submitted data is stored and filled in the form field when the user press the back button. But I want the session to unset if the user update the site (like...

0
Q: Database design to store image color pattern in MySQL for searching Image by color

user1225296I am building a image galley using PHP and MySQL where I want to implement Image search by it's color. By following Imagick::getImageHistogram i got the most presented colors from the images. <?php $image = new Imagick("thing.png"); $pixels=$image->getImageHistogram(); foreach($pixels as $p){ ...

0
Q: Upload image from EC2 to S3

Florian Mac LangladePlease excuse my English, i'm French :) So, I've to upload images from ec2 to s3. I'm using the php library but I find it very, very loooong ! So, I've made some search and I've find the s3cmd tool. But it doesn't work with exec php function : exec("/usr/bin/s3cmd put –acl-public –guess-mime-t...

0
Q: Strange error, website loads only once on any PC

ankur625I am helping friend of mine on a very strange error. His website loads only once on any computer. I've 2 computers and 2 separate internet connections. first I opened his website on first computer and it opened fine. then, no other web pages or home page loads. Then I tested it on another compute...

0
Q: Values not inserting into database table

PandoraI am trying to insert the values from drop-down and text box throug web page. first there will be one drop down box that has numbers from 1 to 25.. when i select the number from the dropdown, the corresponding textboxes and dropdown boxes are created. But when i enter the data and click the su...

0
Q: Showing alert box when we select an option in dropdownlist

Mounika91Here is the fiddle which i got when i surfed in google.... http://jsfiddle.net/Xtreu/162/ I this fiddle alert box is shown when we clicked on button but what i need is it have to show alert when i select an option in dropdown list... i tried by placing the below code in place of button code in...

0
Q: PHP - strlen returning incorrect string length caused by quote

richwolI have the following string coming from a database: Let's Get Functional If I run this through strlen it returns 25 characters instead of the expected 20. A var dump shows that the string looks like the above (no html references etc). If I remove the single quote strlen returns 19 characters. ...

0
Q: PHP - Fileuploads, ['tmp_name'] doesn't exists physically

TorxedThis is some very basic stuff. For a unknown reason i can't upload files via a standard HTML+PHP upload form. php.ini ;;;;;;;;;;;;;;;; ; File Uploads ; ;;;;;;;;;;;;;;;; ; Whether to allow HTTP file uploads. ; http://php.net/file-uploads file_uploads = On ; Temporary directory for HTTP uploade...

0
Q: Magento - PHP Pagenation

NareshI've got this problem that I can't solve. Partly because I can't explain it with the right terms. I'm new to this so sorry for this clumsy question. Below you can see an overview of my goal. form :- <form action="<?php echo $this->getUrl('marketplace/products/form1') ?>" enctype="multipart/for...

0
Q: Get value of the last record in a record set when using MySql and PHP

NormanWhen selecting an displaying data using PHP and MySql, how can I get value of the last row in a record set? Is there a built in function in MySql or Php to do this? For Eg (using PDO): select id from table limit 5; Output: 1 2 3 4 5 while( $row = $stmt->fetch() ) { echo $row['id']; } //...

0
Q: How to call callback method for class?

Michel PhelpsHelp me please: class xam{ public static function __callStatic($name, $arguments) { self::$name(); } static protected function mycallback(){ echo 'mycallback'; } } function doIt($callback) { $callback(); } I am trying: doIt(xam...

1
Q: preg_replace and preg_match_all to move img from wordpress $content

Matoeili am using preg_replace to delete from $content certain : $content=preg_replace('/(?!<img.+?id="img_menu".*?\/>)(?!<img.+?id="featured_img".*?\/>)<img.+?\/>/','',$content); when i am now displaying the content using wordpress the_content function , i did indeed removed the s from $content...

0
Q: start new column when readdir moves to new dir

TechLifeForgottenok so i am using readdir to snag file names from multiple directories. i was wondering if there is a way to arrange the data so that each time it starts a new directory it makes a new column i.e. ---| user1 | user2 | user3 | ---| file1a | file2a | file3a | ---| file1b | file2b | file3b | ---|...

0
Q: Codeigniter function delete not working online only on localhost

lancelotdesignI have a problem with delete function online. On localhost everything works perfect. Maybe is something wrong I don't know. Model code function delete($id) { $this->db->where('id', $id); $this->db->delete('formular'); redirect('/site/cautare/'); } Control...

0
Q: php –multidimensional array and looping

nb.agI have a site with the collection of books; each book have a its own information page (like http://mybookscollection.com/book.php?iditem=2). <html> <body> <div class="book"> <div id="author">Author</div> <div id="title">Title</div> <div id="date">Date</div> </div> </body> </html> I want to ext...

0
Q: Setting data in Symfony2 forms

svprdgaI have a list of users on my website, the list is displayed in pages; and there are a few filters which are submitted via form. In order to preserve the filters through pages I save the form->getData() object in session; then in each page I try to obtain that data, and do form->setData(dataFromS...

0
Q: How to remove specific html tags from a line in string?

Dalius$find = '{<p>something</p>}'; $str1 = "<p>$find</p>\r\ntext<p>something else</p>"; // or $str2 = "<p>something</p>\r\n{$find}aa<p>t</p>\r\ntext<p>something else</p>"; Basically, $find can be anywhere in the string. New lines delimiter is "\r\n". I need to find $find in the $str and remove spec...

0
Q: Is there any restriction in defining constants in PHP?

TomPHPShould I define constant and use it? OR Can I use Magic numbers? I am working in project where I am using Magic number in many places do I want to change it? because I am using more that 1000 Magic number? Is this rite way or I should use constant? Is there any restriction in the number of co...

0
Q: Get date, hour and minute as separate variables from a datetimestamp in PHP

u2sonderzugIn PHP if I have a variable ($getTimeStamp) that follows the format 0000-00-00 00:00:00 (i.e. 2013-09-26 13:06:00). What is the easiest way to get the date ($getDate), hour ($getHour) and minute ($getMinute) as separate variables?

0
Q: Call different type of questions from database as per their category

ShriI am developing Multiple Choice Questions (M.C.Q.) web application in which I want to ask random questions from three different category. suppose I want to ask 15 question in test in that test there must be 5 questions from cat-1, then 5, 5 from cat-2, cat-3 respectively. I tried it but I am able...

0
Q: code igniter - sending search term and getting mysql results as json from php using jquery

Manjunath Hegdei'm new to CI, working on a small search engine, i'll send data from client side using Jquery $.post <script> var term=$('#search_term').val(); $.post(search_url,{term:term},function(data){ $("#ajax_response").append( JSON.stringify(data)); }); </script> and this is how i'm ...

0
Q: PHP convert a string array list to Array

Việt Hùng Từ $str = 'answers[0] = "Love it"; answers[1] = "Hate it."; answers[2] = "Doesnt care"; answers[3] = "Like it";' How can i convert it to an array Thanks!

0
Q: how to save as a variable in preg_replace the content selected by the regex pattern?

MatoeilIn $Content = preg_replace($regex, $replace, $Content); How i can set in a variable the difference between the $content before and after the action of preg_replace ?

0
Q: column issue with table data arrangement

TechLifeForgottenok so i am using readdir to snag file names from multiple directories. i was wondering if there is a way to arrange the data so that each time it starts a new directory it makes a new column i.e. The coding that i have so far is: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ...

0
Q: Codeigniter Flasdata Not displaying on web server

user1933068My codeigniter application works perfectly on localhost. What should happen is that when a form gets sent correctly a success flash message is returned. Like I said this works perfectly on my localhost but if I upload the site, it just doesn't populate the message. In my contact form for exampl...

1
Q: POST file upload Connection Reset

JamesI'm working on a file upload script and I'm completely failing to get anything to upload. When trying to upload a file I receive the following error code: Error 101 (net::ERR_CONNECTION_RESET): The connection was reset. I've tried with multiple browsers and I've even grabbed a couple of super...

0
Q: dotmailer: UpdateContact doesn't update custom fields

Oleksandr KhavdiyI am trying to update dotmailer contact http://www.dotmailer.co.uk/api/contacts/update_contact.aspx. Here is function code function update_contact($email, $datafields = "") { $contact_data = $this->get_contact($email); $AudienceType = "B2C"; $OptInType = "Single"; $EmailType =...

0
Q: What the best way to determine if a string is present in one of 5 array?

x_vi_rI got a marker with a category, say : "luggage" i would like to know what parent categories is luggage to set a specific marker on a map. I created a top categories list of each category i need to display. Something like : $education = [ "adultedu", "collegecounseling", "collegeuniv", "educati...

-1
Q: Substracting birthday year with the current year

user2819002I've started learning PHP, and just can't figure out how to accomplish this. The basic question is to how to calculate age from current year.. I have to do it with a submit button, and that's the problem for me. I tried this: <form name="form2" action="16.1.php" method="POST"> Birthday year: <i...

0
Q: How can I use multiple WHERE statements when using IN with array

Tim HallmanI have the following code: function av_connections_search($string){ global $wpdb; // remove url parameter from string $string = trim($string,'s='); $search = explode('%20',$string); // query the wp_connections database table according to search entry $sql = " SELE...

0
Q: Can replace record, but cannot insert record in php / mysql

Iain SimpsonI am having a really odd problem here, in that I can replace a record but cant create new ones for some reason. If I create an album with id = 2hdfhh4 and then submit an album with the same id the details get updated. If I try posting a new album nothing happens, I don't even get any errors eithe...

0
Q: mysql special characters - incorrect string value '\xE1n'

Conn WarwickerWe are running a cron script which takes new users from a csv and inserts them into our database. It is failing whenever it comes across a user with a special character in their name, but I can't see why, as far as I can see everything is set so that it should work. Here is an example of a name ...

0
Q: How do you turn error logging off for specific file in php?

AdrianHow do you turn error logging off for specific file in php? I know that for not displaying the error you do <? error_reporting(0); // dont report/show errors don't log errors; - // how to do that. ?>

0
Q: How to return an array that has been sorted against a specific value

user2818986Below is my code $gamePrice = 1350; $arr = array(1233, 4445, 1100, 9008, 900, 1320, 1390, 1320, 1400); function getClosest($gamePrice, $arr){ $closestAnswer = null; foreach($arr as $guess){ if($closestAnswer == null || abs($gamePrice - $closestAnswer)>(...

0
Q: htaccess redirect rule with URL Parameter

user1667556I need to redirect rule for the following condition, http://domain.com/go/usid/1/testeracc/newacc to http://domain.com/trk/link.php?uid=usid&page=1&test=testeracc&new=newacc I have directory created - domain.com/go/ I don't have any further directories /usid/1/testeracc/newacc (those will...

0
Q: Creating store in Facebook Via App

Tech QCreating store in Facebook Via App Creating A Facebook App Store for e-commerce similar to the f-Commerce Go, appthastore Any help can be greatly appreciated. I have found the action code in Facebook Developer But could not able to start from it, any good example can help to get to build app i...

0
Q: CSS not displaying HTML file on localhost server

AndrewI have a fairly simple HTML file that i'm running on a local server, as it's soon to be turned into a php file. When I run it from the server however, the CSS doesn't display on the page. Opening the index.html file in a web browser shows it just fine.

0
Q: Mysql database select methode

CosminI have a database i output some rows and the header to show how it looks: id date ip pack type set 114879 Sep 20 19:27:18 4.2.2.2 317032 flows/s 1 114880 Sep 20 19:32:22 4.2.2.2 446906 flows/s 1 114881 Sep 20 19:32:2...

0
Q: AFNetworking and uploading images with PHP site

Green ReeI send image to my local server (to ftp folder). Build project, choose image, post, send nsdata and ... sometimes it works and sometimes it crashes in - (BOOL)hasBytesAvailable { if (_phase == AFFinalBoundaryPhase) { return YES; } switch (self.inputStream.streamStatus) { case NSStream...

0
Q: PDO database browser for php (like phpmyadmin)

hamboy75I would like to know if there is a php application able to browse any database supported by PDO. Something like phpmysqladmin but for PDO. I have tried google and I didnt found any, checked http://alternativeto.net/software/phpmyadmin/ too, and nothings...

0
Q: How to display results from search below the form

Добромир Стояновi would like to ask if someone could help me with a search query and displaying of the results. Here is the code... <?php // Change the fields below as per the requirements $db_host="localhost"; $db_username="dasi"; $db_password="**************"; $db_name="dasi"; $db_tb_name="test"; $db_tb_atr_...

0
Q: Saving an image to a folder in php

user2553381What I tried : $url = str_replace(' ', '%20', trim($url)); $percent = 1.0; $imagethumbsize = 200; header('Content-type: image/jpeg'); list($width, $height) = getimagesize($url); $new_width = $width * $percent; $new_height = $height * $percent; $image_p = imagec...

0
Q: Mustache PHP - is it possible to iterate over two arrays

emeraldjavaI have a scenario where i want to shows the hours that various employees worked in a given week in a summary table. The structure of the sample data is shown below $days = {'Mon','Tues','Wed','Thurs','Fri','Sat'}; // list of working days $employees = { // the hours for each employee and day ...

0
Q: flot ,and mysql jquery

alexandaI have a problem using flot to plot data from a database. using json_encode in php I have tried to get the plot data but I have been unsuccessful. Below is my code ,kindly assist <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html>`enter c...

0
Q: Bringing information to a 2nd php file, but SESSION isn't the answer

lokoI've got file1.php and file1.php. I want an ID(stored in a database) from file1.php to file2.php, but I link to the 2nd page via an <a href= And what ID number that has to go to file2.php depends on what link I click. So SESSIONS probably wont do. I tried it with SESSIONS but it only remembers 1 ...

0
Q: SonataNewsBundle - comments - add status to filters

charlesnashDefault in SonataNewsBundle CommentAdmin is: protected function configureDatagridFilters(DatagridMapper $datagridMapper) { $datagridMapper ->add('name') ->add('email') ->add('message') ; } In protected function configureFormFields(FormMapper $formMapper) is: ...

0
Q: Parsing pdf form using PHP or JavaScript to get field position

FootnikoHow can I parse Pdf file with form to get fields position and page # of it on my web server? For example, there are some pdf with structure like this: <</AcroForm 23 0 R/Metadata 2 0 R/Outlines 6 0 R/Pages 9 0 R/Type/Catalog>> endobj 19 0 obj <</DA(/ZaDb 0 Tf 0 g)/FT/Btn/Ff 49152/Kids[18 0 R 20 ...

0
Q: Prevent PHP scripts from running concurrently

KoffeehausI have a cron script that would spider a website for new content and save the entries I need into the database. Entries are md5 hashed and validated, to prevent dupes. However I have noticed that there are sometimes two occurrences running at the same time, and the hashing method is failing at th...

-2
Q: how to fix Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/u940004575/public_html/index.php on line 114

Lochlan Kennedyhow do i fix this problem? Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/u940004575/public_html/index.php on line 114 i have changed and fiddled with this code too long someone please help <? mysql_connect("XXXXX","XXXXX","XXXXX") or die(...

0
Q: need help in Regular Expression

Dipesh KcI am in a weird scenerio where I need to show the content in multiple columns. I am using css3 column-cont and jquery plugin columnizer for older versions of IE. The problem is that I do not have complete control over the data as it is served by an external webservice. In most cases the content...

0
Q: CSS not displaying in HTML file on local server

AndrewI have a fairly simple HTML file that i'm running on a local server, as it's soon to be turned into a php file. When I run it from the server however, the CSS doesn't display on the page. Opening the index.html file in a web browser shows it just fine. HTML File: <!DOCTYPE html> <html lang="en"> <

0
Q: cakephp session flashes not working across controlelrs

user456465I have a controller called students. whenever I go to students/edit, make a change, save it and redirect to the view then the session flash appears on student/view as expected. However if I can to targets/edit, make a change, save it and redirect to students/view then there is no session flash. ...

-1
Q: join two table in mysql with php code

user2814918I have two table 1. film_name(id,fname) 2. film_song(id,film_id,song_name); I want to show on list.php fname from film_name,song_name from film_song where id=film_id please tell me how to join both table

0
Q: PHP Check if firefox doesn't work

cyber.pandaI have a php code with options of embed_method and I need add special options for firefox. Here is original: function kgvid_video_embed_enqueue_scripts() { $options = get_option('kgvid_video_embed_options'); if ( $options['embed_method'] == "Strobe Media Playback" ) { wp_enqueue_script( 'sw...

0
Q: User Tracking to my website

elangoI need to know how to get the user visit to my website coming from a social media site or google search or anyother methods .How can I track this in php?

0
Q: PHP Unlink Not working

user2806222I am trying to delete photo in php using unlink. I have used it earlier on other server but this time it is not working. I have used absolute path for a test but still does not works: I have used it as: unlink('img1.jpg'); and : unlink('http://www.mysite.com/img1.jpg'); Please anyone hav...

0
Q: imagejpeg(): Unable to open

Abhishek kadadiPHP Warning: imagejpeg(): Unable to open '.Project/events/timepass.jpg' for writing: No such file or directory in ./Project/upload/thumbnal.php on line 35 code.. <?php // open the directory $pathToImages="./Project/upload/original/"; $dir = opendir($pathToImages); // loop through it, looking f...

0
Q: generate breadcrumb from given array. PHP

Semicolonbased on this array mentioned here : I am trying to generate breadcrumb like this main>link1>link2>link3 main>link1>link2 main>link1 this is i am going function GenerateBreadcrumbHTML($nav) { $html = ''; foreach ($nav as $page) { $html .= ''; $html .= '<a href="' . $page['link'] . '">...

0
Q: Retrieving file from Dropbox using PHP returns 403 Invalid Signature

TurgsI'm trying to download all files from a specific directory in my Dropbox to a directory on my web server, if a file of the same name doesn't already. I'm using this SitePoint Tutorial as the guide. The problem I'm having is that the Dropbox API returns an Invalid Signature error when it gets to...

0
Q: Which option I need to compile php code with HHVM

Luavishhvm --hphp -thhbc -o some_dir file1.php file2.php This is pre-compile option which is example in hiphop for php github wiki. I would like to output PHP code to C++ code with hiphop VM. Can anyone tell me how to get it done? Thanks.

0
Q: Code is running 5 times. It should only run once. (php, mysql)

user2819164This code should display images from a database. It also creates a random background-color which works fine. The code is a function, the function is posted in index.php which is basically html. When I put the code directly in index.html witch the function and the first while loop it runs just fin...

1
Q: Posting data from database at regular time intervals automatically in php

user2625007I have questions stored in my database. I want to regularly post one question on my website from the database at a 24 hr interval automatically. Is there a way I can do that ?

0
Q: how to logout facebook in codeigniter framework

user2798006How to Logout action performed in my website who are login via facebook my controller: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Main extends CI_Controller { public function Main(){ parent::__construct(); parse_str( $_SERVER['QUERY_ST...

0
Q: Criteria mentioned in model class not executing from search form

user2770039I have two fields in the advanced search form(approved, reviewdate) for which I created the radiobuttons. <div class="row"> <?php echo $form->labelEx($model,''); ?> <?php echo $form->radioButtonList($model,'ReviewedDate', array('1' => 'Reviewed', '' => 'Not Reviewed'), array( ...

0
Q: MySQL query Select data

user2819219Trying to make query for 4 hours. For example i have such data: did title number_link ltitle 35 about.html 1 NULL <- this 35 about.html 2 NULL <- this 36 about.html 1 NULL 35 contact.php 1 NULL <- this 35 co...

0
Q: Generating html pages as data gets saved in db.

Taaran ChananaI frankly dont know the right word for it but I'll explain my situation.. So I'm current developing a website in which my db takes data from user like some sort of story, it is getting saved in db and i even know how to display it but I do, all the stories(data in db) gets displayed on one page a...

0
Q: printing a barcode image from a webpage on to a label reducing size when printing

srikanth sswe have created a barcode image with size 380 width and 120 height.It is fine when display on a web page.Barcode scanner also scanning fine.when printed on a A4 desktop printer which prints minimum 300 dpi,the a4 barcode scans fine.But when I tried to print the entire web page with bar code image...

0
Q: Symfony2: Fill some fields of a form with post data

user2794692I have a contact form that works fine. But I want to fill some of this fields when an user click in one link. I receipt the information of some fields in the form controller, but I don't know how can I show this form with this fields with these datas. Thanks!

0
Q: .htaccess file is not working in my server using yii platform

user2711066I'm working in yii framework. Now we are migrating to new server with .htaccess file.But the .htaccess file is not working in my new hosting. I was uploaded the files are same rooting structure but it does not working in new server but old server is working. my .htacess file code is : <IfModule...

0
Q: Get JSON response In Codeigniter

IMJ4UI am passing the Object from fiddler to the service written in codeigniter. My Object is something look like this : My Response : { "GetResponse":{ "OrgName":"adfasd", "OrgAdr1":"asdf", "OrgAdr2":"NA", "ProductList":[ { "ProductID":8724, ...

-1
Q: how to solve the error when mail pdf file using tcpdf and php

MD. ABDUL HalimThis is the pdf mail code $filename = $pdf_name.'.pdf'; $fileloc = 'pdf/'.$filename; $pdf->Output($fileloc, 'F'); $filehandle = fopen($fileloc, 'rb'); $data = fread($filehandle, filesize($fileloc)); fclose($filehandle); $attachment = chunk_split(base64_encode($data)); ...

0
Q: Hello,I need to show products in dropdown menu in Advance Search of magento

user2819274I have tried this code in my templete/catalogsearch/advance/form.phtml <?php foreach ($this->getSearchableAttributes() as $_attribute): ?> <?php $_code = $_attribute->getAttributeCode() ?> <li> <label for="<?php echo $_code ?>"><?php echo $this->getAttributeLabel($_at...

0
Q: php - Change curdate format

oliverbjAs far as I can understand the curdate() mysql function returns a date like this: 'YYYY-MM-DD' How can I do so it select it like this instead: 'YYYY/MM/DD' I have this query: $sql = mysql_query("SELECT SUM(value) from xeon_stats_clicks WHERE typ='4' AND curdate() - interval 7 day >= data "...

0
Q: How to send data correctly from php to android via json?

Marco SeizAfter houres of trying to find a ways I like to ask how I can send data from PHP correctly to an Android application via JSON? In my application I have a custom dialog, where I enter a E-Mail adress. This would be sent via JSONParser.makeHttpRequest to the php file. -> This is working! When I tr...

1
Q: Error when importing sql database from phpmyadmin

George KourouleasSo, I export an SQL database from another pc that hosts my website(sucessfully appearing the tab of the site that is responsible for the sql table). But on my pc, I cannot get it to work. So it got to be a configurations error, something to do with privileges, or the sql database file. When I i...

0
Q: Creating a PHP session from jQuery script that's on a different URL?

AndrewHere's my setup: I have a jQuery/ajax script to login a user. This script is hosted on URL A and POSTs the data to URL B where a PHP page validates the information. It looks something like this: $.ajax({ type: "POST", url: 'http://URLB', data: $(e.target).serialize(), dataType: "text", ...

0
Q: Retrieving multiple data with mysql json, ajax

Alex GoranssonI am Posting my values from database here, code: <?php $host = "localhost"; $user = "root"; $pass = ""; $databaseName = "ani"; $tableName = "balls"; //-------------------------------------------------------------------------- // 1) Connect to mysql database //-----------------...

0
Q: PHP curl - web scrapping of page which requires login

Wakan TankaI have following simple web form called login.php which contains: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta name="robots" content="noindex,nofollow"> <meta http-equiv="x-dns-prefetch-control" content="off"> </head> <form action="action.php" method="...

0
Q: Displaying column data by splitting it seperately

user2669924I am trying to export my data to excel and it is working fine. But i want to change the format or display in php so that i can get the same table format in excel also. Here is my code while ($row = mysql_fetch_assoc($result)) { echo "<table width='100%' id='ReportTable'>"; echo "<tr>"; ec...

0
Q: Rotate between videos

user1295552So I had an initial code that rotated between 30 images that worked perfectly. I'm trying to adapt the code to rotate between 30 videos now but haven't been able to make it work. Am I missing something that I have to change? Code below. Thanks <?php $folder = './videos'; $extList = a...

0
Q: session_destroy() does not destroy $_SESSION datas?

user2401175I am really confused about session_destroy() function in PHP. I read in the php manual that it destroys all data registered to a session. NOW WHAT THAT EXACTLY MEANS!! When I tried to echo a result that I stored in $_SESSION after session_destroy() , it still gets PRINTED!! I just thought results...

 

« first day (219 days earlier)      last day (91 days later) »