« first day (218 days earlier)      last day (92 days later) » 
00:00 - 13:0013:00 - 00:00

12:01 AM
0
Q: Using PHP array loop incrementally and check if it has reached maximum

MikeI have 200 boxes of which to be named from an array. All names go sequentially and will restart from the first value in the array once previous Box has taken the last name (maximum value?) from the array. $BoxName = array (Name1, Name2, Name3, Name4, Name5); The name of first box is always de...

0
Q: Why does my bcrypt password hash always start with $2y$05$

Greg ValantineI'm creating a password hash using a salt and a cost of 5 and every time the hash Is created it starts with '$2y$05$' is there any reason for this?

0
Q: How can I redirect after verify a condition (if)? In php html or javascript

user2632603I got an error, i was using header location to redirect after verify a condition and with localhost it was great. But I uploaded the web and now I got an error. I know the problem its because I use header location a lot of times and not in head, but between html and php code. What can I use to r...

0
Q: Compare POST image with image in database to Login

Ifeanyi Omeata C.I am considering the possibility of comparing an image stored on my mysql database to an image that I intend to upload from a form. The idea is: if both are compared (based on Name, size, length, or whatever) the user is granted access to view a page called 'email.php'. However, I'm having an iss...

0
Q: PHP Function in wordpress not displaying an embeded YouTube video

Jonathan RussellThe php code is working and is displaying contact forms and galleries, however, the youtube video links are not embeding like they would in a normal Wordpress page. It just displays the address in the popup window. This was working when using html code on the page, but does not work once inside a...

0
Q: how to read the input values from inside the input elements of a selected radio-button tag?

Sachini have the following code, HTML: <form> <label>Form 1<input value="1" type="radio" name="formselector" onclick="displayForm(this)"></label> <label>Form 2<input value="2" type="radio" name="formselector" onclick="displayForm(this)"></label> </form> <...

0
Q: HTML More Than One Form With Same Name/ID

felix_xiaoI'm currently designing a website that reads information from a MySQL database in PHP and prints out a form for each row. This is done using a while loop, so the form is echoed out inside the loop. However, whenever I submit the form, a lot of the values aren't posted because there are forms with...

0
Q: clears password instead of updating password/reset password

user2307970Iam trying to allow a user to change their password however instead of replacing the old password with new it removes/clears password field . Iam juste testing interaction with the db therefore Iam not yet using a model. Controller <?php class My_account extends CI_Controller{ public function...

-1
Q: Create a php web service with a wsdl file

Eric EvansI would like to create a web service in php that makes use of a wsdl file. Could someone get me started in the right direction. I've heard people talk about soapclient. Is this a class that connects to a web service or can I use this class to create a web service. I just need to be pointed in the...

 
12:37 AM
0
Q: Insert parameter and value in var for query-string

Matthias MüllerThats my code: <?php $data = array('marke'=> $_GET["marke"], 'farbe'=> $_GET["farbe"], 'sort'=> $_GET["sort"]); $parameter = http_build_query($data); ?> I need to insert "farbe=blau" after marke and before sort when farbe is not set

0
Q: Replacing link with plain text with php simple html dom

Gary HillersonI have a program that removes certain pages from a web; i want to then traverse the remaining pages and "unlink" any links to those removed pages. I'm using simplehtmldom. My function takes a source page ($source) and an array of pages ($skipList). It finds the links, and I'd like to then manipul...

 
12:49 AM
0
Q: My CI model class with static method is failing

Wind DwellerOK...first I read this article.. http://net.tutsplus.com/tutorials/php/6-codeigniter-hacks-for-the-masters/ In the first hack, it says if I include these in my config.php file: function __autoload($class) { if (file_exists(APPPATH."models/".strtolower($class).EXT)) { include_on...

0
Q: get the last auto incremented id with medoo

user1572796I am posting a new row to the database but wanted to return the new auto incremented id in the response using medoo. This seems to be generating a new blank row and returning that id. <?php // Independent configuration require 'medoo.php'; $database = new medoo(array( // required ...

0
Q: Increment MySQL field using datamapper orm

MohammadI'm using datamapper orm with Codeigniter framework to build my system. I want to increase "views" field of article table using datamapper orm: $article=new article(1); ++$article->views; $article->save(); But there is something weird, the views increment by 2 or 3 and sometimes w...

0
Q: Call PHP free-function as member-function

nyan-catConsider this code example: class foo { $bar = 'Hello'; } $dump = function() { var_dump($this); }; $foo = new foo(); $bound = $dump->bindTo($foo); $bound(); // Calls $dump which is bound to $foo instance of foo class This works fine. The question is - can I do the same for free-function,...

0
Q: joomla migration from 2.5.8 to 3.1.5 datebase error 1062

cw.primeI have recently upgraded my joomla site using the joomla upgrade option from my old 2.5.8 admin area. when i try to access my site now i get this error. Duplicate entry '' for key 'PRIMARY' SQL=INSERT INTO `j25_autotweet_automator` (`lastexec`) VALUES ('2013-09-24 23:54:32') Im not sure how to...

-1
Q: Does Stackoverflow make use of an Open Source Gamification System?

Greg LCurious, I love all the features. I would like to code something similar. Especially the badges, and the point system that controls a users ability to perform different actions.

0
Q: Ways to pass information from PHP to JQUERY?

MaxwellI'm having a hard time figuring out what is the best way to transfer information from PHP to Jquery. I know putting PHP in Javascript is a really bad alternative (my JS and PHP files are seperated anyway), so what I usually do is print the info with PHP in the HTML with a input type hidden and re...

-2
Q: How to learn about javascript uploading and progressing status of uploading or loading content?

Sha BeerHey guys i just want to learn javascript which deals with loading and progressing particular process... like showing loading icon when something is loading up.. there is any way to learn this kind of things in javascript or jquery..?

0
Q: Coinbase button creation and callback

First LastIm trying to create a button and assign a callback URL with coinbase. I'm getting some CAPTCHA data returned when trying to post to coinbase API. I think my webhost is getting blocked by CloudFlare, disabling my code. Here's what I have: <a class="coinbase-button" data-code="<?php $data = ar...

0
Q: php mysql search textbox

Jayhsonhi everyone im newbie here i have a problem regarding my search textbox i have a table with a data on that that table i put an textbox button which is the value is the partyid, i want that textbox to be search the value from other table, my problem is only one textbox searching the value, i want ...

0
Q: Iterate through directory's CodeIgniter

Brandon JohnsonI'm currently using the CI Directory Helper to list directories and files. My problem is well... Listing them correctly. Once I pass the array into my view I recieve an array to string conversion error. I figured I could always encode it in json, but then how would I be able to read it as a pr...

0
Q: Eclipse "aptana plugin" vs. jsdt (Javascript Debug Toolkit); where can I find a comparison chart?

KrissI have just started using 'Eclipse Kepler' IDE for PHP programming and I'm now looking to use the same IDE for JavaScript, but I'm not sure which plugin to install? I'm new to JavaScript so I'm not sure what is good to have; when I look at the Aptana and the JSDT plugin descriptions separately I...

-2
Q: PHP: Change CSS attribute at specific time of day

KevenSo, I'm trying to write a simple function that changes the background at a specific time of day, but something isn't working right. When I run the query, the background color is blank, which means it isn't reaching the text inside my if clause. Any ideas? PHP: <?php function backgroundColor()...

0
Q: Creating a PHSql Tool, is this current method viable?

Sophie MackeralI'm in the process of creating a MySQL Tool from PHP, I currently have a few Basic Pages. Login.php <form method="post" action="ConnectSQL.php"> Connect To SQL<Br> Username:<br><input type="text" name="Username" type="text"> <br> Password:<br><input t...

0
Q: Sendmail sending slowly and hanging php scripts on FreeBSD 9.1-RELEASE

Periscope PeteI have been working on debugging a php script that was taking 10 seconds to load and finally isolated the problem to the mail() function. The php mail() function is using sendmail as the default mailer. Further tests revealed that command line sendmail me@mydomain.com hangs for 5-6 seconds. ...

1
Q: li Class of 'active' not targetable by CSS

Jonathan GeorgeI've done this 1000 times, and this may be because I'm frustrated that I can't figure it out, but I am having so much trouble changing the appearance of my nag bar links based on the active page. I'm using Codeigniter, so here is my navbar code: <div id="wrapper"> <div class="nav"> ...

0
Q: SQL encoding issue: When Updating data in the DB(UPDATE) charchters become gibrish

user2803295Hello Im using pdo via php to update my sql. When I put primary values in the DB the encoding seems to be fine. but for some or other reason when I use sql UPDATE command to change the data im getting gibrish. to be sure nothing is wrong with the way im passing the data I changed the query im sen...

-4
Q: a-z A-Z 0-9 dot & dash & underscore Regex

Nguyễn Trọng Bằnga-z A-Z 0-9 dot & dash & underscore length 4 ~ 60 How to make regex from these conditions above? Thank you.

-2
Q: How to open website and save session id

Ali HasanzadeI want to open website and save token session into file with php for example When I open a page with curl,my application save token session into file How can I ...?

-1
Q: How do I prevent form resubmission after php mail form?

Liam TarpeyI have this snippet of php that runs in my index.php page where my contact form is located: <?php if (isset($_POST['submit'])) { $message = trim($_POST['message']);; $header = trim($_POST['name']); $mail_from = trim($_POST['email']); $to ...

0
Q: Select MySQL rows regardless of a column's data

Dany PI have a function that selects either males, females, or both sex from my database. Function looks like: function getMembers($sex = null) { if (is_null($sex)) { $sex = (0 || 1); } $query = $conn->prepare("SELECT username FROM users WHERE sex = :sex"); $query->execute(a...

-4
Q: Which programming language to learn next coming from PHP

iBrazilianAs many of you know, many programmers at a young age get's into programming by creating small web apps and at a later point decides to expand their knowledge (in a way) career wise. I'm 19 years old, at this point I've decided that I'd like to get deeper into programming and follow it as a career...

-1
Q: Newbie - Add rel=nofollow tag to PHP

BiancaIs there a generic way to add rel=nofollow tag to PHP? I downloaded a Wordpress coupon plugin, which lets you create coupons and add a shortcode to your blog post. Each coupon has a destination url, which I noticed aren't nofollow. I wasn't sure if it was possible to add the rel=nofollow tag to t...

-1
Q: Reloading grid JSON

Victor NavarroI have a JSON file with lots of information. It changes automatically every minute. I have a Grid in a web page that loads the JSON with javascript and fills the rows with the data. I would like to change this JSON automatically every minute in my web. Would this be possible with JQuery?

0
Q: Update image path

nikito2003I'm fairly new to PHP programming and I've looked around but I'm still confused. I'm trying to update the image path in my users table and I'm not quite sure how to do it. This is the code I have for putting the image into the database and it works to insert it in, but I'm not sure how to UPDATE...

0
Q: Add SHA1 to '$_POST[password]'

Josh WilsonHi i'm creating a register form and i'm trying to get the password to make a SHA1 hash encryption upon submitting the form. I have the code below if you would like to help me out $sql = "INSERT INTO users (FirstName,LastName,Email,Password) VALUES ('$_POST[fname]','$_POST[lname]','$_POST[email...

0
Q: How to comment class for code completion in phpstorm

polyhedronSuppose I have a class class Class1 { public function method1(){ return "hello world"; } } and I have another class that uses this in a class class Class2 { /** @var $firstClass Class1 */ private $firstClass; public function __construct($firstClass) { ...

0
Q: Update MySQL using HTML Form and PHP

user2052849I've been looking through dozens of threads on here about this but have yet to find a solution. I've created a form that is supposed to show database table contents in input boxes, and when the content of the input boxes are changed and submitted the database is supposed to update. <html> <head> <

0
Q: Best practice to update the records with php and mysql

spotlightsnapCurrently I am working on the standings (table) of football league such as English Premiere League, Italian Series A, etc (e.g, http://www.premierleague.com/en-gb/matchday/league-table.html) My current logic to calculate the ranking is when we adding the final results of the match. For example,...

0
Q: jQuery/AJAX execution of PHP not working

John RobertsI am trying to use jQuery/AJAX to run a PHP file on a server. This PHP simply adds a row with some constants to a database. Here is my code: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Submit Application</title> <...

0
Q: Notice: Undefined index/isset makes values return wrong

C TSo I looked around a bit trying to find people who had similar problems but couldn't find EXACTLY what I was looking for. I'm working on creating a register page to learn some basic PHP and at first I was getting the error "Notice: Undefined index" but I solved that by using "isset();" but that g...

0
Q: IMPORT DATA EXCEL TO DATABASE mysql USING PHP

allyI already view the .xls file but i dont want to us this $excel->read('sampleupload.xls'); i want this $excel->read('DATA FROM DATABASE THAT I UPLOADED '); a .xls file from database I dont want to call it inside my file htdocs since I'll be calling specific files which the user choose to s...

0
Q: how set another folder in phpfileuploader

barnameha.neti downloaded phpfileuploader script from > http://phpfileuploader.com/ but when i set this code not worked $uploader->SaveDirectory="http://localhost/phpfileuploader/savefiles/"; and when i change to : $uploader->SaveDirectory="savefiles"; worked . i need use another url for set dir...

 
2:26 AM
0
Q: OneToOne relationship in Doctrine2 ORM and Symfony

aditI have two entity called PictureTag and Tag, here's the relationship: /** * @ORM\Entity * @ORM\Table(name="picture_tag") * @ORM\HasLifecycleCallbacks() */ class PictureTag { /** * @var integer $id * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\Gener...

0
Q: Basic Form using HTML and Php

CluelessI am trying to create just a basic form using Php and HTML. When I type into the fields and click submit nothing appears on the page except for "Hi," This is what I have for the HTML document <!DOCTYPE html> <html> <head> <title>Php Form</title> </head> <body> <form method="post" action="P...

0
Q: jquery - get the value of a selected option in a select input

Paco CarI'm quite a newbie when it comes to jquery. I'm using cakePHP and I have a form to register orders for a selected user, the select input for selecting the user looks like this in cakePHP: echo $this->Form->input('user_id'); and that renders a form with an input like this: <label for="OrderUse...

0
Q: php + javascript file upload tracking

JanaHere is the archive file i upload to sever. http://arashistudio.net/upload.rar It worked fine on local 127.0.0.1 However, when I upload it to server, it didn't work. The progressing always stops on 1.7KB and turns out uploading complete when done. ( The file did be uploaded to sever ) I have...

0
Q: Using last_insert_id();

ViacheslavI did SQL request: INSERT INTO a_schedule (par_smal_meet) VALUES (20150277); SET @E=last_insert_id(); If I just use PHPmyadmin interface it is OK, but if I put it in PHP code like this $query = "INSERT INTO a_schedule (par_smal_meet) VALUES (20150277); SET @E=last_insert_id();"; ...

0
Q: Check box information throught Ajax and php

Kuroi NekoI am trying to send an e-mail with the information in a form, the thing is I am not doing correctly the part of the checkbox (without it works perfectly). I am doing this: HTML: <label for="rimg">Request images</label>//display:none; for this <span>Request Images</span><input type="checkbox" na...

0
Q: internal server error attachment joomla

user2006224I am trying to attach a file in my joomla article and when i try to upload it shows an error. "Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@pallottisch...

0
Q: php delete file server through link

DespotarsI am listing the text files that I have on my server, and I want to add a link to download that file and delete it. I works perfectly, but the problem is that when I press the delete button, I open a new page, and what I want is that when you press the delete button will delete the file and refr...

0
Q: Yii Php, displaying widgets in mPDF

Yii NewbieI've made an application in Yii; Basically i want to export a view in a pdf, to generate some sort of Summary Report. I have in my controller: public function actionGenerateReport($id){ $model = $this->loadModel($id); $attributes = array( //define attributes to be displayed in widget here...

0
Q: PayPal IPN email not working

Staunton AllenWhen I send the IPN, it says it was sent successfully. However, I never receive an email at my test email. What is wrong with my code to cause it to not send? Also, when I am ready for it to be open to the public, how would I change the ToEmail from xxx@myemail.com to the email of the individual ...

0
Q: Whats wrong with my php code for a registration form

Riong RiongCheck my code, everytime I press submit it tells me... Parse error: syntax error, unexpected T_STRING in /1111111111/2222222222222222222/33333333/444444444444444444444444444 on line 21 Its frustrating. I thought I had everthing right. Here's my php file: <?php $email = $_POST['email']; ...

0
Q: Dynamic PHP Archived posts

Chris SextonOk so I have looked around and cant seem to find exactly what I want to do on the web, maybe Im using the wrong terms but here is my problem. I am new at using php, but have quite a bit of experience in coding in MATLAB, so I am able to pick it up relatively easily. I am building a website and I...

0
Q: NullPointerException in connecting to mysql using php and in android

Miguel RiveraI am trying to get a data from URL using some tutorials in connecting to mysql using php. However, I get a nullpointerexception when I run the code. Database_demo.java package com.database_demo; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; ...

0
Q: Strip Incomplete HTML Tags using PHP / HTMLPurifier

Noah GoodrichGiven the following html: <p>I am a paragraph</p> <ul> <li>Item</li> <li>Item 2</li> </ul> <div class="special_div_from_email_client"> <span>Some text I need to strip out the tag that is not complete. What we are trying to do is parse email messages by placing a custom string in the origi...

0
Q: PDO Fetch statement only retrieves first column

0n35As the title states, I am only able to grab the id column, I am getting an Undefined index error for the others. My code: if(isset($_SESSION['id'])) { $presh = $_SESSION['id']; $stmt = $pdo->prepare("SELECT id FROM users WHERE id = :id ...

0
Q: How to show all days from an dates interval HTML PHP

user2813397i am facing a problem when i want to show day by day from an interval of dates. What i mean is that i have a simple form: <form method="post" action=""> From Date1: <input type="text" name="date1" value="<!--10 days ago date (2013-09-14)-->"/> <br> To Date2: <input type="text" name="date2" value="

0
Q: How to view doc files in php?

dummy dummyHow to use this code below to view doc files in browser using PHP? Can you give a sample script on how I can use this code to view doc files in browser? $content = shell_exec('/usr/local/bin/antiword '.$filename);

0
Q: How to convert a PHP date string to another format

Aritra HazraI've a string like "2013-05-07" and I want to convert it in "7 May 2013" via any functional way (if available) or in short method as possible

0
Q: Multi dimensional Array Codeigniter PHP - Undefined index

trunks175I am working on a site in CI. This is the array which is $data['index'] in the controller and $index in the view. array 'note_id' => string '30' (length=2) 'show' => string '0' (length=1) 'note_title' => string 'abhpeetam' (length=9) 'note_body' => string 'asldkfjasldkjalsdk' (length...

0
Q: math: need help collating part numbers

JaseCHere are two sample part numbers from a very large array of part numbers: APXE-N-300-025-A0-12-ET-OO APXE-N-300-050-A0-12-ET-OO Each part number is broken into segments like: 0-1-2-3-4-5-6 Here is the logic for the part numbers: $segment[0] = array('APXE'); $segment[1] = array('N','P',"S...

 
3:08 AM
0
Q: PHP User Admin System

user2263547Hi I have never done an admin setup before. I am trying to make it so when a school administrator logs in, they can only view and edit the students at their school. All students have an access level of 2, all admins have an access level of 1 in a MySQL database column titled level_access. When ...

-1
Q: need help mysql delete via PHP is not working

Edmund Valen Jr.Everything else is working except the 'Delete'. i dont see any error on it. i hope you can help me guys. i really dont see the error on this one. i really need this to be up and running. thanks in advance! here is my code: <table border="0" align="center"> <form method="post"> <tr> ...

0
Q: Knockout Mapping not updating self.users

ChrisTrying to display all users from a MySQL database in Knockout and CodeIgniter. I'm getting a json response back from the server but Knockout isn't displaying the Json data. I keep getting: Uncaught ReferenceError: Unable to parse bindings. Bindings value: text: id Message: id is not defi...

0
Q: strip tags acting strange PHP HTML

Guillermo VillaI do have this code: {if $image_present[cart_item] == TRUE} {if $set_store_type == '11'} <textarea name="usage_text[cart_item]" rows="3" class="text width-4">{$cart_item_usage_text[cart_item]|strip_tags}</textarea> {else} {$cart_item_usage_text[cart_ite...

0
Q: What would be the best way to sync/replicate databases for a local to remote database set-up?

letscodeHere's the situation in detail: What I'm trying to create is a tracking system. Where an applicant goes online and check for the status of his/her application. But the data is only available locally within the office. How could I sync (some of the data/tables in the database) so that applicants...

0
Q: How to count the values inside the array

user2813458i have exploded the line: $e_line = explode(" ", $lineDetails2[0]); and when i use this code: ' print_r($e_line); ' this will display this: Array ( [0] => S1 [1] => T5000 [2] => IR [3] => 0.110796 [4] => V [5] => 0.000 [6] => 5.000 ) 7 and the other one is: Array ( [0] => TestInfo ) 1 . ...

0
Q: Have the following array merged

Sophie MackeralI have the following array: Array ( [0] => Array ( [Vendor_ID] => 1 [Quantity] => 55 ) [1] => Array ( [Vendor_ID] => 1 [Quantity] => 55 ) [2] => Array ( [Vendor_ID] => 1 ...

0
Q: Displaying table vertically using FPDF, PHP and MYSQL

DaroathI have a real estate project that need to be printed as PDF files. I'm using FPDF to generate that file, but I have no answer how to print those data as vertical table. As a result I get only one table correct. Appreciate for your help. Below is my code class PDF extends FPDF { public funct...

0
Q: Web Service SOAP Request is working on SOAPUI but can't get it to work on PHP

maikelsabidoI've tried almost all the possible solutions I could find but I can't seem to get this script working. Here are some of my previous attempts: How to use wse-php library to connect to secured webservices via SOAP [PHP] SOAP-ERROR: Encoding: object has no 'createLead' property [PHP] How to solve...

0
Q: Unable to import wordpress xml file in Wordpress

kidonchuThis is first time developing website using Wordpress. While importing pages and posts on localhost using wordpress import plugin, I encountered following error. Unable to create directory uploads. Is its parent directory writable by the server? I tried changing wp-content folder's permission t...

0
Q: MySQL query returns null from PHP code but works fine in terminal

Shadow_When I run this code in PHP, the result is null, but when I run it in mysql terminal or phpmyadmin, I get what I want. PHP if ($_GET["action"] == "list") { //Get records from database $mainQuery = mysql_query(" SET SQL_BIG_SELECTS=1; SELECT ci.id AS item_id, ar.title...

0
Q: Retrieving JSON data from ajax request in Wordpress media uploader

gregzI'm having some problems getting my JSON data that's being passed via an ajax request. I'm trying to implement the media uploader into a plugins settings page in Wordpress. I've got it functioning properly using this method as far as the media uploader functionality is concerned. I'd like to be ...

0
Q: I cant get through these CakePHP errors

Czar Panganibani have these codes in my controller and it returns an error. move_uploaded_file($this->request->data['FileUpload']['photo']['tmp_name'], WWW_ROOT.'/pictures/sample.jpg'); errors: Undefined property: FileUploadsController::$request Trying to get property of non-object I dont know what to do w...

0
Q: CSS not loading when using AJAX in IE

user2425110I am trying to load a php file using ajax and all is working perfectly in chrome. but when using IE, the CSS in the php file is not working. here are my codes for the AJAX: function showUser() { var skill = document.getElementById("skill").value if (skill=="") { document.getElementByI...

 
3:44 AM
0
Q: Comet - PHP error showing

rameshI am new to comet and doing a simple application. My html file looks like <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>testing comet</title> <meta http-equiv="Content-Type" c...

0
Q: How to get Dynamic HTML code by PHP or JS

user2813533I want to get contents from a website, but when I use file_get_contents() function, I get the HTML code, but some of them lost, I check the site code, I know some parts generate by Ajax, I don't know how to get them, does someone have any suggestions? I may get some examples, Site: http://www.drb...

0
Q: Using one menu in multiple views of a component in Joomla 2.5

josh21I wrote a component in Joomla 2.5 and I use this JSubMenuHelper::addEntry('Alpha', 'index.php?option=com_teams&task=showA'); JSubMenuHelper::addEntry('Beta', 'index.php?option=com_teams&task=showB',true); JSubMenuHelper::addEntry('Gamma', 'index.php?option=com_teams&task=showC'); ... in each ...

-2
Q: How can I check feed update?

crepy1234I want to check update feed from url.when feed update I want to show notification and feed not update I don't want show notification. Everyone understand my question ? I use php language. Thanks for help.

0
Q: Loop for automatic form fill and execution?

RaduSThe code bellow is taken from my website, from this page: http://review.radusolomon.com/ It is the code from the form. The form does a very simple thing. You just write a website and then press enter. it will analyze the website. My question is how can i create a simple loop that would: take o...

0
Q: Consult UP time of the remote computer with PHP

Davi MatosI have a computer that is not on the same network as mine, but is connected to the Internet, running a local Apache server. I need to know the time that this computer is connected using PHP. How can I do this?

0
Q: PHP mail function not sending mail, due to possible error in message

William HaywardI'm trying to implement a validation code email into my website, but when I use the mail() function it doesn't send the email. Of the four parameters (Email, Subject, Message, Headers) I've narrowed it down to being the Message that is causing the issue. This is my code for the Message: $EmailM...

0
Q: php's mail() is overriding the 'from' email address

CFHcoderI'm using PHP's mail() -- my emails from our site get sent and received successfully. User "theArtist" puts a painting up for sale on our site. User "RichGuy" sees it, and our site has a form where RichGuy types his email address and a message to "theArtist." When "RichGuy" fills out this form...

 
4:14 AM
0
Q: How to call javascript function in wordpress using inline function call?

Eli_junI have been setting up my plugin in the wordpress admin area. I have a form that stores information from the user. In my file input type, I have javascript function call to my custom javascript that I link to it. This is the line: <li>Category Image:<input type="file" name="category[image]" id="c...

0
Q: Disable Varnish headers (and other headers)?

DanReduxI'm trying to minimize the headers my server sends. Ideally, it would only send the absolute minimum (<4 headers). Right now it's sending these: HTTP/1.1 200 OK Server: Apache Cache-Control: no-cache Pragma: no-cache disablevcache: true Content-Type: Content-Length: 5 Accept-Ranges: bytes Date...

0
Q: Set Facebook Profile Picture in mobile browser

Shivan RaptorTo set Facebook Profile Picture, I know that Facebook PHP SDK has no direct method to do so. As a workaround, I forward to the user to the Photo URL with &makeprofile=1 parameter, such as: header('Location: https://www.facebook.com/photo.php?fbid=1015159XXXXXXXX&set=a.YYYYYYYYYYY.ZZZZZZZ.TTTTTTTT

0
Q: Advantages of Smarty over MVC's like Cake and Symfony?

user1852176I'm pretty comfortable with CakePHP and I've dabbled with Symfony, but I've never touched Smarty.I know Smarty can be used in conjunction with an MVC's, but was it originally made to be stand-alone, or is it more of an all-purpose tool? I did some searching and I found this post that cleared up ...

0
Q: Return location of uploaded file on php server back to android

tomjungI have followed a simple tutorial here on how to upload an image to mysql via php server from an android app. That is all good and well. I'm new to this, and need to figure out what to do next. I need to pass additional information and save the additional information along with the location of...

-1
Q: verifying the username and password using pdo in php

user2582340i'm trying to verify the login form whether the username and password is correct or not i tried this code but it not working require_once('conn.php'); $username=$_GET['username']; $pass=$_GET['password']; try { $dbh = new PDO("mysql:host=$hostname;dbname=$db", $dbuser, $pa...

0
Q: Split a string into an array and set the delimiter as the key

davipilotI have a string of data as such. abc/text text def/long amount of text ghi/some text I have an array of my delimiters $arr = array('abc/', 'def/', 'ghi'); What can I do to get this output? Array ( [abc/] => text text [def/] => long amount of text [ghi/] => some text )

0
Q: magento - Add more options to Email Template dropdown list

alumiI created a module, and I want to add some of my custom email template as option for the Email Template dropdown, say, "Create New Account" in Admin > System > Configuration > Customers > Customer Configuration. I tried to add a node in my custom module, like <global> <template> <email

 
4:51 AM
0
Q: Fatal error: Call to undefined function wp_initial_constants() in /home/site/public_html/wp-settings.php on line 26

rajWhile Updating Wordpress 3.6.1 on my site i have facing the following error and the site had ben crashed can anyone tell the reason how it happen to my site and how can i overcome those problems. Following Error arises:- Fatal error: Call to undefined function wp_initial_constants() in /home/a...

0
Q: How to limit orders to cart in Opencart?

balajimcaI want to limit customers to buy only three products, and the total quantity should be three only. Conditions: 1st condition: product1-> 1 product2-> 1 product3-> 1 total qty is 3 here. 2nd condition: product1-> 2 product3->1 total qty is 3 here. 3rd condition: product1-> 3 total q...

-1
Q: How can I put into javascript function on .js file a php value from a php file?

Christian MagroI'm trying to use the Maps API with random coordinates but I don't know and I need some information how can I put into javascript function on .js file a php value from a php file?. For example if we have the several codes: 1) API code to generate a route between 2 coordinates(order2.js): (funct...

0
Q: paypal activate IPN for expresscheckout

Daniel DzussaI am using Paypal's express Checkout for recurring payments How can I activate an IPN URL for my recurring ExpressCheckout payment ? I found it can be set on the Paypal account's profile page, but what if I have 2 websites and I have set two IPN urls ? Is there any way to set the IPN URl on th...

0
Q: How do I get my contact form to call the PHP file correctly?

Mojoman317717I'm hosting my website on my personal Ubuntu LAMP server. Everything is working but the contact form. I have Postfix configured to relay emails through my gmail smtp and it's working brilliantly. I know my server is sending emails. I've verified this with the following code several times to a var...

0
Q: PHP contact form won't send

user2813676I cannot get my PHP contact form to work correctly. I am trying to complete it in one page and would appreciate any help. I would like to keep it in a table format. I have searched but have not been able to find the correct formatting for POST/if isset. Any help would be greatly appreciated. PHP...

0
Q: How to scrap products data from a website?

AashiI am using curl_init() function to scrap products from a website. Here is my code: <?php $curl_connection = curl_init(); $url = "https://www.registrar.usf.edu/ssearch/search.php"; curl_setopt($curl_connection, CURLOPT_URL, $url); curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30); curl_se...

0
Q: Options for localizing web app

ffzI'm working on an international website (PHP, custom lightweight MVC framework) which needs to show content in the user's native language. Content will primarily be text, but may be images as well. Our current solution is one giant file, with separate functions for every piece of text to be tra...

-2
Q: Multiple Where clause SQL

user2813700 SELECT matri_id, firstname, lastname, gender, photo1, photo1_approve, photo_protect, birthdate, height, weight, caste, religion, m_tongue, occupation, city, country_id, state_id, education, edu_detail FROM register WHERE caste='$caste' AND matri_...

0
Q: PHP Parsing a Date Time String smartly

Tim BI'm trying to parse a date time string combination to Date and Time and wanted to know if there a smarter way Sample Data 9/3/2013 8:50:05 AM 9/4/2013 1:42:28 PM 9/11/2013 12:01:21 PM .... Here's what I'm doing..Looking thru the list of Date Time string <?php $x = "9/3/2013 8:50:05 A...

0
Q: MySQL Access Denied #1045

Jewemie Ricaydos BayyedoyCan anyone please help me with this. I cannot access phpMyAdmin. I am using WAMPSERVER 2.4 and running Windows 7 32-bit OS. Everytime I try to access phpMyAdmin it gives an error like this: Error MySQL said: Documentation 1045 - Access denied for user 'root'@'localhost' (using password: NO) p...

-1
Q: Codeignitor Hooks not working properly

Nidheesh N NamboodhiriMy Hook Folder enter code here <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); class Layout extends CI_Hooks { function show_layout() { global $OUT; $this->CI =& get_instance(); $output = $this->CI->output->get_output(); if ($this->CI->layout == "Ye...

0
Q: php - extracting body of the mail

thukhow to extract body of the mail, when there is content disposition.. 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-Dispositi...

-2
Q: Php Login via face book button integration

Ayyanan NagarajanI have one problem, i am very try to facebook login via php buti have one reeor pls any body solve this problem. This is my error, "Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL Canv...

0
Q: how to create entity without duplicates

aditI have the following code in my controller: foreach ($image->tags as $tag) { $existingTag = $em->getRepository('AppMainBundle:InstagramTag')->findOneByTag($tag); if ($existingTag) { ladybug_dump('existing tag'); } else { lad...

0
Q: Javascript/PHP Custom math formula

IRvanFauziEcan we use math formula from other variable/database? example: var x = 7; var formula = '+'; var y = 10; I mean that variables will output = 17 (7 + 10); but how to implement this formula using Javascript/PHP?

-1
Q: I've Notified in My Wordpress Blog's mywebsite.com/wp-admin/admin-ajax.php file Has Highest Traffic is it hack try or anything How Can I prevent it

Yuvaraj JeganathanI've Notified in My Wordpress Blog's eg. mywebsite.com/wp-admin/admin-ajax.php file Has Highest Traffic is it hack try or anything How Can I prevent it. In my website traffic in other Pages will be not comparable with this because other page visits 1800 in month but admin-ajax.php visit is 5300 ...

0
Q: Simplemodal popup display once per session?

Tony NguyenI am new to javascript and jQuery. I am using SimpleModal basic to display a popup onload when a user visits my site. It's working great, but each time visitors go to homepage, the popup displays. For example: Visitor A goes to my homepage, the popup displays for the first time - it's great ...

 
5:33 AM
0
Q: jQuery Re-run script on ajax loaded content

SBMI am using the Advanced Ajax Page Loader plugin for wordpress to load content via ajax, and I am having an issue with my custom jquery scripts not running on content when they are loaded via ajax. The scripts run fine if I load said pages directly from their url, but navigating to them via ajax l...

0
Q: Nested ajax call in multple php page

user2129623I have index.php which call url.php on button click with ajax to load without page reload. Now on 'url.php' there's another button which call data.php through ajax. Right now what happens: When open index.php first and click button on index.php it load url.php without page load. but when I clic...

0
Q: How to include an external PHP file into a Joomla article?

fizzixSo basically, I have a single article that I would like to load a PHP file into. This PHP file has a bunch of PHP and Javascript, along with HTML. I need to include this full PHP file into my article since it contains an application form that I need on my website. I have tried the following: ...

0
Q: Implementation of MVC Framework with PHP

aguasI want to study the MVC Framework to be implemented in PHP and I decided to go here first before searching in Google. I just have some few inquiries about it. 1) Where can I study the MVC Framework with PHP? 2) Can someone give a very simple implementation of MVC Framework with PHP/HTML/Javascr...

 
5:51 AM
0
Q: How to convert dynamic JSON string to javascript array

user1511958I have a php web page returning json string. json string is like this . { "employees": [ { "fname": "sdsdsd", "lname": "sdsd", "phone": "sdsd", "gender": "female", "dob": "1990-03-11", "address": "03", "nic": "erer", "email": "erererer", "empid": "ererere", "designat...

0
Q: avi video file upload MIME type issue. The connection was reset.

rezam10I have trouble uploading an AVI file to AMAZON S3 via a webpage. I'm using PHP PEAR to perform the upload with a very simple script. require_once 'Services/Amazon/S3.php'; $key = 'my-key'; $secret = 'my-secrete-key'; $s3 = Services_Amazon_S3::getAccount($key, $secret); $bucket = $s3->getBuc...

0
Q: checkbox values are not getting displayed

user2669924I am trying to export selected names to excel. But before exporting , when i select the values through checkbox, its not getting selected. I am doing like this <form action="select.php" method="post" > {listing_dataset} <div class="listing result_row_{row_num_even_odd}"> <div class="listi...

0
Q: mediawiki move upload path error

rajeshkumarIn localsettings.php, I just defined the upload directory as $wgUploadDirectory = "/uploads"; .The file will be uploaded in this folder. but the problem is it will automatically create a folder like uploads/4/4a.so we cant retrieve the file path correctly. plz suggest me any solution to define t...

0
Q: How to handle htaccess?

Mary.HansenFolks, I am newbie to SSL certificates. We just put SSL for our website, which developed PHP codeigniter framework. My site is under https protocol. If I call the other url from that website's page, it also showing in https prefixed.. That child url is third party url, which needs to call fro...

0
Q: auto login not working wordpress after signup

VickeyI am registering one after payment i able to create user and by manual login able to login by same credential but the problum is that when i complete the registration process for user i unable to ge auto login i put the condition here for is_user_logged_in() its passing the conditio...

0
Q: Group php array by date

user889349I have an array: Array ( [0] => Array ( [id] => 81 [placed] => 2013-09-19 16:32:53 [sub_total] => 786 ) [1] => Array ( [id] => 80 [placed] => 2013-09-19 16:32:06 [sub_total] => 780 ) ...

0
Q: CamanJS and img tag in iframe

user2813792Here is my code snippet: <form id="form_jpeg_load" name="form_jpeg_load" action="/modules/jpg_to_iframe.php" method="post" enctype="multipart/form-data" target="jpg"> <input type="file" style="border: 1px solid silver;" name="file_bif" id="file_bif"> <input type="submit" name="search" value="OK"> <

0
Q: In CMS magento html editor, how to add "div tag" inside "a tag"?

vinothavnI added "div tag" inside "a tag" in Magento CMS editor.. Later it disappeared.. somebody solve this.... In CMS magento html editor, how to add "div tag" inside "a tag" ???.. But that shouldn`t disapper and must produce proper output.

0
Q: PHP Pagination Limit

user2773365In my controller I have the following code: if($action=='shipping_list'){ $numrows=inquire_row(); //Get number of rows in query $pages= new Paginator('10', 'p'); //create object $pages->set_total($numrows); $shipping=shipping_list(); //Goes to model include('shipping_list.ph...

1
Q: OAuth error code 400 on yahoo.co.jp get token request

Nathan SriviI am using Oauth2.0 for signing yahoo.co.jp account. I am trying this following code but its returned error code 400 with error description Unsupported_grant_type' (400) : grant_type unsupported My Reference URL : http://developer.yahoo.co.jp/yconnect/server_app/explicit/token.html My code is g...

0
Q: AJAX: add new row to table or remove using AJAX

Angga MovicThis is the logic: I input something to form, and the form is AJAX live search. after I found value, I click on add button and it creates new row in existing table / tbody. here sample code <table class="standard"> <thead> <tr> ...

0
Q: Display uploaded image - Drupal 7 Form API

valenHere is my form field for users to upload their company logo: $form['company_logo'] = array( '#type' => 'managed_file', '#title' => t('Company Logo'), '#description' => t('Allowed extensions: gif png jpg jpeg'), '#upload_location' => 'public://uploads/', '#default_value' => $row['comp...

0
Q: preg_replace_callback regex issue, match with (.*?) returns array

IntredastingGiven the string {{esc}}"Content"{{/esc}} ... {{esc}}"More content"{{/esc}} I would like to output \"Content\" ... \"More content\" e.g., I am trying to escape the quotes inside a string. (This is a contrived example, though, so an answer with something like 'just use this library to do it' would...

0
Q: retrieve data from database with column name "name_en-GB"

user2083041I have a table in my database I need to retrieve data from it all things works fine but i am having a column name as name_en-GB when i tried to retrieve the data from it, it is giving error select * from table where name_en-GB='Name'; The error is: Unknown column 'name_en' in 'where clause' ...

0
Q: How can I create a form post that will take a name some one posted and forward to a url ie http://chat.playio.net/index.php?autojoin=Usercreateddata

Steve RohrI was trying to make a simple form where some one can enter a chatroom name they wanted and hit create button and it will forward them to a url. Exp. I wanted to create a chatroom called music. I type in music and hit the create button. The page then forwards me to http://chat.playio.net/index.ph...

0
Q: How do i get data from db after select html select tag

AlexI'v a following html select tag which get group name from mysql db. But I want to get all contact number of selected group name from same db table. Html select tag <tr> <td>Group name</td> <td> <select name="group_name" class="td"> <option value="">--Select Group--</option> <?php $class...

0
Q: Skipping a word that start with # in PHP

neversaintI have the following list of words (myfile.txt) which I want to display using PHP: word1 #word2 word3 What I want to do is to skip those lines that start with # above. Below is the PHP code I used to display the words. But I don't know how to skip the # word. <?php $fp = fopen('myfile.tx...

0
Q: Yii - How can I filter the rows in a gridview by using radiobuttons in search-form

user2770039I'm new to Yii Framework. I created radiobuttonlist out of two fields in search form-(Approval,ReviewedDate). <div class="row"> <?php #echo $form->label($model,'ReviewedDate'); ?> <?php echo $form->radioButtonList($model, 'ReviewedDate', array('1' => 'Review...

-1
Q: how display radio button in php

Daniel RajI want to retrieve data(question) from database and display it a windows. It should contain options. mysql_select_db('online'); $retval = mysql_query( $sql, $conn ); if(! $retval ) { die('Could not get data: ' . mysql_error()); } while($row = mysql_fetc...

0
Q: adding three submit buttons inside a modal dialg box?

user2723949And my second question ,, I have a simple modal box opening when I click on 'add users' . The modal box contains 3 submit buttons ( add, delete, and submit) . I have done this with the help of a javascript. The html code is <div id="overlay"> <div> <form action="" method="POST"> <table>

0
Q: User is loggin outted when the config parameter changed?

AviAtionI have name parameter in my config main file: // CWebApplication properties can be configured here. return array( 'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..', 'name'=>'Test Site', but when I'm trying to change it the user is loggin outted, why? //Yii::app()->name = 'Site'; ...

0
Q: Insert id from from one table and insert it into another one. Mysql + PHP

Michael JoselevichI am working on a register user form and I have two tables in mysql. What I want to do is when a new user has registered, take the id (which primary key) of that user and insert it into another table. What is the best way to do that? Thanks in advance.

0
Q: How to access files in data folder in zend framework?

g v s vinayakcurrently i am working on zf2. Right now i have to give download option to download pdf files.i have stored all the pdf files in data directory.How can i specify link to that pdf files from .phtml file? thanks in advance.

0
Q: Changing float VALUES to decimal point with MYSQL Array-based query

Ray LightI'm having the trouble of assigning decimal points, when i want to display the price of my product in the table in one of my php pages. Using number_format solves the problem when i want to display in the normal version, but when i want to display in a numeric array type, i don't know how to make...

0
Q: add draggable sections in wordpress plugin page

wordpresserwant to make draggable and sortable sections in plugin page of wordpress, like we see on dashboard. i tried finding but dint get exactly what I want. Here is the piece of code though it add two divs with interface similar to draggable interface in dashboard, but i am unable to drag. <div class=...

0
Q: Codeigniter checking checkbox value

conmenI using CI and have a form with checkbox to allow user to checked and remove their uploaded photo, in my controller, I use if(isset($checked) == 1) to check if user want to remove photo, $photo_to_table will set empty and pass to $this->tank_auth->update_user() to perform db update, and set photo...

0
Q: JSON in PHP is slow?

kazaf UsApparently something is making this code in php is very slow, I have tried many options and call $ JD3-> data-> game-> teamtwo-> array [$ x] -> summonerName in 4 array gets very slow . What I can do? This is my code. <?php require_once './lib/Unirest.php'; $username = "https://api.com/pla...

0
Q: Flight/Hotel Reservation system

BurhanI am making a Flight/Hotel reservation system like farecompare.com in php. I want to know from where farecompare takes data. I found expedia api for hotel reservation but they don't support flight reservation now. Anybody tell me from where i get free flight/hotel api. Also if anybody knows about...

0
Q: Adding page content into description of mailto via php

Jordan GagneI tried looking, but couldn't find a solution anywhere. What I am trying to do is create a button on my website which will email the entire website content. What I have right now for the button is <a href="mailto:?Subject=Check Out This&body=<?php echo $content;?>" id="share" data-icon="custom">

0
Q: Parser tokens like those in PHP in other languages?

Potherca Short version Is there something similar to PHP parser tokens in other scripted languages (python, ruby, etc.) and compiled languages (the C family, java, scala, etc.)? Long Version On the CPP Rocks website there is an article showing a visual comparison of language complexity by means of a ...

0
Q: How to call a custom widget in a single.php page of wordpress

user734081Basically I want a custom widget to show only inside the post details view page. The concept is that I want to first check the category of the post then next if that category is matched that what I want, it will show that above mentioned custom widget in the sidebar. That widget will be dynamic i...

0
Q: how to add scraped website data in database

AashiI want to store : 1. Product Name 2. Categoty 3. Subcategory 4. Price 5. Product Company. in my table named products_data with filds name as PID, product_name, category, subcategory, product_price and product_company. I am using curl_init() function in php to first scrap website url next i want ...

0
Q: Remove/update cached image while update/delete record with liipImagineBundle

Hardeep PandyaI am new to symfony2. I am using liipImagineBundle to manage image thumbnail. I have a product entity class which uses Lifecycle Callbacks to manage product image Product.php <?php namespace Svipl\AdminBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as GEDMO; use S...

0
Q: Get the tag link in wordpress post

NisI am writing an article about Football and it contains word such as FIFA, Football etc. Similarly, I would add FIFA, Football tag as well. Once done, i will publish the article. At the front end of the post, I want to see the word like FIFA and Football linked with the link like domain.com/tag/...

0
Q: How can I store my Google Drive Service to avoid recreat it in each call?

Enio CarvalhoI'm using the code above, from https://developers.google.com/drive/delegation, to get access to a specific Google Drive account: function buildService($userEmail) { global $DRIVE_SCOPE, $SERVICE_ACCOUNT_EMAIL, $SERVICE_ACCOUNT_PKCS12_FILE_PATH; $key = file_get_contents($SERVICE_ACCOUNT_P...

0
Q: With PHP is this method of referencing database info secure?

William HaywardIn any file wherein I connect to my database, I have this line at the start of the document: include ('database/data.php'); which consists entirely of $database = mysqli_connect(host,Username,Password,Table); And then in the 'database' folder, I have a .htaccess file with this: <files data...

0
Q: jQuery Circular Content Carousel "ca-content-item" width

user2813951So I found this useful jQuery Content Carousel(http://tympanus.net/Development/CircularContentCarousel/), which I have been looking for for ages. I have modified the codes to show from three boxes to five box: http://helpmyedu.com/test/ However when I click "more", I have no idea where to modif...

0
Q: Checking model to see if a record exists in Yii-PHP

Mark WinterbottomI am trying to check if a record already exists in the database table using yii. Reading the documentation it says there is a method exists() that can be used instead of finding the recording using findByAttributes() or find(). The benefit being less memory is used because it doesn't have to retr...

0
Q: How to Authenticate google api programmatically using php?

user1134475I've just tried "Hello Analytics API" and before getting the data, user is redirected to authentication page. Is it possible to authenticate programmatically ? thanks in advance

0
Q: jquery validation error while checking department name

Rohit GaikwadI have used the jquery validation for checking the department name is already exist in the specific organization. But its not returning the correct result. Please someone help me. Here is my Jquery: $(document).ready(function(){ var validator = $("#frmAddDepartment").validate({ errorElement...

0
Q: uploading a pic from computer with single button in php

PHP_USER1<html> <head> <title>File Upload Form</title> </head> <body> This form allows you to upload a file to the server.<br> <form action="getfile.php" method="post"><br> Type (or select) Filename: <input type="file" name="uploadFile"> <input type="submit" value="Upload File"> </form> </body> </html> ...

1
Q: Input Signature converted to Brushed Signature

SoumyaIs there any way to convert a signature into Brushed signature to any document by PHP/Javascript or jquery. If that so then please any one care to help me with that

0
Q: .htaccess 301 redirect for domain root level

user2122657I have written a php website, and used 301 redirects to redirect old urls in old website to new urls in new website. The general presentation of the 301 redirect is like this:- RewriteRule ^chs/hong-kong/brand.php$ /cn/our-company? [L,R=301] Even though there are more than 100 such rule...

0
Q: php auto generate number from my sql db

Great GhazalI need help in the following query in php. I want to create auto number like 0001, 0002. I am using this query $query = "SELECT MAX(cast(registration_code as decimal)) id FROM accounts "; if($result = mysql_query($query)) { $row = mysql_fetch_assoc($result); $count = ...

0
Q: Code to read each row of date in database table

user2810332My snippet code below can run without a problem. If the date is less than 45, then an email will send automatically to me. $days = (strtotime("2013-9-23") - strtotime(date("Y-m-d"))) / (60 * 60 * 24); if ($days<45) include 'sendmail.php'; else { echo "Problem!"; } For now,I want the system to ...

0
Q: Magento: Need to get product collection on catalog price rule applied

shyammtpI've create a product collection with the special price applied but i dont know how to get the product collection when catalog price rule is applied. Below is the code to get special price products, public function getSpecialPriceProducts() { $categoryID = $this->getCategoryId(); ...

0
Q: php : how to show only the keyword matched column value in autocompleter

user2732367i am selecting multiple column for keyword search in JQUERY auto-completer. The following code is returning all the selected column, but i want only the keyword matched column value to show in auto completer. How to do this ? please help $skeyword = $_GET["term"]; $req = "SELECT p.prm_titl...

 
7:27 AM
1
Q: Function that only returns false returns nothing

user2264061function return_true () { return true; } function return_false () { return false; } echo return_true(); //outputs 1 echo return_false(); //outputs nothing why can't I echo out return_false and get 0 ? Apologies if this has been asked before but I didn't find anything that answers this...

0
Q: Structure of logic in Symfony app

Jake NireI am quiet new to the symfony framework and for a new project, I want to make sure I got a correct setup. The project itself will have a frontend and backend and will contain several modules like Blog, Forum, News articles etc. Every module will become a bundle. That looks like the best solution...

0
Q: Type error : e is undefined

AjitI am getting a type error: e undefined in this code. I am trying to populate a dropdown list here using a php script. This is what I've tried $(document).ready(function(){// This script uses jquery and ajax it is used to set the values in $("#day").change(function(){// the time field whenever a ...

-1
Q: How to set future/old date to post?

lightdsI am new in php and wordpress. I have posts in wordpress which belong to category 13, I want to replace the date of the post to future or old date. example I have post news which create in 31/12/2012 I want to replace this date to 01/01/2014 how can I do that ? what function wordpress can hel...

0
Q: Displaying CSS from database based on selector and declaration (key => value)

user2071225I'm storing basic CSS settings in a database so they can be configurable by a client using some sort of web form, then these can be echoed out within the style tag and override any existing settings. Basic settings like font family, background color, font color etc. Table: Rather than setting...

0
Q: $.fn.yiiListView.update not updating the CListView

user2814051I am trying to use ajaxLink to delete record from from CListView. Here is my CListView. <?php $this->widget('zii.widgets.CListView', array( 'id'=>'loc_list', 'dataProvider'=>$dataProvider, 'itemView'=>'_view', 'enablePagination' => false, 'enableSorting'=>false, 'summaryText'=>'', )); ?> Here ...

0
Q: dynamic chained drop down

Yasithaneed your help to do this i have some number of rows in a mysql table. those are branch names of a organization. what i want to do is, make a chained drop down like this in first drop down user must select the range that matches his branch code. and in the second one he must select the bran...

0
Q: Insert data from textbox and checkbox into database

Jane DimiI have a checkbox of titles of products and a text box for each to fill in with quantity. I'm trying to insert into my database the data given in checkbox and textbox for each entry. This below seems to work but it worked well the first time I run it, namely only during the first order the result...

0
Q: Codeigniter with datamapper save error

nainySo I was trying to make a CRUD for my app. I have setup a controller, like this: class Clients extends CI_Controller { public function __construct() { parent::__construct(); session_start(); $this->c = new Client(); $this->u = new User(); } function index() { $data['curren...

0
Q: Is PHP suitable to built a Single Page Application?

TerrenceI'm considering few technology to built a Single Page Application(SPA). 1) .Net 2) PHP 3) JAVA 4) Node.js PHP will be my first choice for now, because I'm more comfortable wit it. But I'm not sure whether it is a good choice for SPA. What is the advantage and disadvantage compare to the other op...

-1
Q: How too use inner join

user2691782i want to fetch data from 2 diiff table how can in i fetch it ... $wpdb->prepare ( "select * from " .serviceTable(). " innerjoin " .jointable(). " on " .serviceTable().".TestId = ".jointable().".TestId" ,"" ) ); serviceTable and jointable are tables name and TestId is p...

0
Q: ORACLE ROWNUM Function (Using Pagination Page)

user2806837I still confused with the ROWNUM oracle function. Last time I using LIMIT in MySQL function worked like this : $page -= 1; $per_page = 3; $previous_btn = true; $next_btn = true; $first_btn = true; $last_btn = true; $start = $page * $per_page; $sql = ... WHERE ... LIMIT $start, $per_page; But...

0
Q: How to switch tabs in button click after saving data in mysql database in php?

Nagesh KumarI am new to PHP, i started developing application using php, please look into my code index.php <?php require_once('./config.php'); ?> <?php /* * Following code will get single product details * A product is identified by product id (pid) */ // array for JSON response $response = array(); //...

-1
Q: How to extract data-url from given string?

intekhab khanI have this string in php. $string = ''; I want to extract the data-url parameter in PHP. Thanks

0
Q: how to echo variable outside of class, passing from function within class

Durgaprasadmy code is like this class Connection {function connect(){$link = 'Connected'; } } $con = new Connection(); $con -> connect(); echo $con->link;//connected here i want to echo the variable but it is not getting Help me

0
Q: php: unable to iterate for each loop

user2732367I am facing the follow error from the below code: Error: Warning: Invalid argument supplied for foreach() Code: //--------This is the code for jquery UI autocompleter------------- include "inc/connect.php"; $skeyword = $_GET["term"]; $req = "SELECT p.prm_title ,a.am_name, c.cm_name ,l.l...

0
Q: getting pure xml detail from soap xml response

Eno Basseyi have a .net service i am consuming from php and the result comes in the format below. i wish to have only the contents without the soap:envelope. How do i achieve this? <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="h...

0
Q: Open mailclient with prefilled fields and HTML body

Robby IvenI'm working with scriptcase on a self-written cms run in a browser. When a button is clicked, I need to open a new mail window with the to, subject and body field prefilled. I am able to achieve this with mailto, but this method doesn't allow HTML bodies. function prepareMail(to, cc, subject, m...

0
Q: PHP Spreadsheet Excel Reader - Date Read

tamerkirci$data = new Spreadsheet_Excel_Reader(); $data->setUTFEncoder('iconv'); $data->setOutputEncoding('ISO-8859-9'); $data->read('demo.xls'); $satir = $data->sheets[0]['numRows']; $sutun = $data->sheets[0]['numCols']; The output of date : ThuThu/DecDec/20122012

0
Q: Editing user's preferences in the same PHP page

user1263375I have a page home.php. In this page, I have added one column in the left, which uses include_once() function to add the user's common profile from a file profile.php. Its like this: <div class='userprofile'> <?php include_once('profile.php') ?> </div> Now I want to edit this...

0
Q: Edit specific record from a line in text file and PHP

AlirezaI'm trying to make a simple news hit counter with PHP and text file. i wrote a simple code to check and read the file: Text File: //Data in Source File //Info: News-ID|Hits|Date 1|32|2013-9-25 2|241|2013-9-26 3|57|2013-9-27 PHP File: //Get Source $Source = ENGINE_DIR . '/data/top.txt'; $Read...

0
Q: Session information only updating after refresh

nzleetI've just added logins to my site. I've adapted this script. My main header file contains the following php: <?php session_start(); if (isset($_SESSION['user_name'])) { $link = "loginform.php?logout"; $text = "Log Out"; echo '<a href="' . $link . ' "><div id="login">' . $text . '</div><

0
Q: Send parameters with ajax call from jquery datatables

nielsvI want to load data into a jquery datatable with ajax. Also I want to send parameters to the function that pulls the data from the database. So what I want to do: $('#datatables').dataTable( { "bProcessing": true, "bServerSide": true, "sAjaxSource": "/results/load-results", "fn...

0
Q: Video recorded on android device doesn't play on web browser

rohitI have recorded video through my app (android application) and those videos doesn't plays on any of the web browser. Required encoding for web browser is : Video encoding(H264) Audio encoding(AAC) the video being recorded through device camera is : Video encoding (MPEG_4_SP) Audio encoding (AMR_...

0
Q: why function strlen get error?

user2784600My php code looks like this if (isset($_POST['bahan']) && isset($_POST['parent'])) { if (strlen($_POST['bahan']) <= 6 ) { if(strlen($_POST['parent'] < 4)){ exit('it works'); }else{ var_dump($_POST['parent']); exit('error no. 0006');...

0
Q: Moving from md5 to PBKDF2 how to?

sakhunzaiI need to upgrade md5 based simple authentication module to PBKDF2 ,and I am looking for possible schema and extra steps and flow of operation and required changes for following: a. New user account creation Old one is simplest one : password=md5(password) b. Password Reset curently: u...

0
Q: Jplayer - Create a dynamic playlist from Mysql results

anto0522I have a list of songs generated by a mysql search, I can get the song to play when I click on the play image (play_overlay.png). When the song has finished playing I would like Jplayer to play the next song in the the mysql result array. I can't get that to work ... Thank you for your help ! ...

0
Q: removes password instead of reset password

user2307970Morning all , may someone please assist me I have one small error that Iam failing to grasp. I would like to update/change password where users email = for example 123@gmail. however when i input the new password it removes the old and leaves the field blank. **Controller** <?php class...

0
Q: How to filter the gridview with radiobutton based on a sql query

user2770039I'm using two radiobuttons in advanced search form, they are approved and rejected. When I click on approved it should filter for multiple search box in Gridview and display the result. There are other three fields 'Updated date','reviewed date' and 'created date' also. Suppose, I click on the ap...

0
Q: Using x-www-from-urlencoded content-type returns wrong int

user2814188I have such problem: Here is one file: test_info.php <?php var_dump(strlen(file_get_contents('php://input')), $_SERVER['CONTENT_LENGTH']); ?> Here is POST'ing file: <?php echo file_get_contents('http://localhost/test_info.php', false, stream_context_create(array('http' => array('method' =

0
Q: explode key in json with php

Morten HaghI have this SQL statement in my list_user_ads() function that will find an adverts and images for a specific user $row = $this->db->dbh->prepare('SELECT ad.*, (SELECT GROUP_CONCAT(img.image) FROM '.$this->config->db_prefix.'_images AS img WHERE img.aid = ad.aid) AS img FROM '.$this->config->db_p...

0
Q: PHP Cookie does not work after MySQL result?

Milad Ahmadipourwhy i can't set cookie in this code ? i have no output or anything else befor setcookie, i just want to set user id cookie after found in database, i can see 1 after set my user and password stored in database, but i can't set cookie <?php include('db_conector.php'); $InternalUser=$_GET['uid']; ...

0
Q: Logging using redis

VeNaToRAm working on a web application using codeigniter and monggodb,i need to log some user events like online,offline etc dynamically using redis.I need to fetch these events and display in a webpage ( like google analytics do).Is it possible to do this using redis?How can i do this? Thanks

-2
Q: Array convertion in php

Saswati have a variable $twitter_data having format like this {"id":1897279429,"id_str":"1897279429","name":"Saswat Routroy"} i want to convert it into array like this Array ( [id] => 1897279429 [id_str] => "1897279429" [name] => "Saswat Routroy" ); how can i do that

-2
Q: php mysql issue about inserting

RiKoI am trying firsly check the name. If name not exists, inserting will start. Or not will give an error. $name=$_POST['name']; $sql= mysql_query('INSERT INTO users (user_id, name) VALUES ('.$id.', '.$name.') WHERE name NOT LIKE '.$name.''); if(!sql) { $errorcode=1; } else { $errorcode=0...

0
Q: PHP login session and logout timeout

mahdi pishguyi have 2 field such as login_session and logout_timeout. login_session means after this minute session must be destroy and logout_timeout means if user don't use web administrator session must be destroy. below code don't work correctly. //$_SESSION['timeout'] = time(); //$_SESSION['login_sessio...

0
Q: Wikipedia API gives me disambiguation page

unskaThis page: http://en.wikipedia.org/w/api.php?format=json&action=parse&page=Albert_Einstein Gives me the disambiguation page always (http://en.wikipedia.org/wiki/Einstein_%28disambiguation%29). How can I get the real Albert_Einstein page? Like this: http://en.wikipedia.org/wiki/Albert_Einstein ...

0
Q: How to create PHP serialized object in android?

user842624i'm working on mobile project that communicates with an API. I want to store to database through API, a PHP serialized array. So i'm wondering if there is any way to serialize my values inside my android code and sent this to API in order to save it as API gets it. As example, i have three value...

0
Q: How to convert WKT to SVG

Jetson JohnI have some Well-known text (WKT) for representing geometry object such as Point, MultiPoint, LineString, Polygon, MultiPolygon etc. I have a multipolygon with in total 40000 Points. I have found this plugin which convert svg to wkt https://github.com/davidmcclure/svg-to-wkt Is there any javasc...

0
Q: Updating MySql DB with Dropdown values

fr0s1yjackMy update statement isn't working correctly, I am attempting to pull the data from the database, populate a dropdown with either "Y" or "N" inside it, on submit the values are entered into the database and the page refreshes. so far I have my list of items, each with correctly populated dropdown,...

0
Q: OAuth remembering the session

CMCDragonkaiI am currently implementing an OAuth authentication 3 legged strategy using 2.0. I have come across a problem: What's the best way to remember the client's session when logging in using Oauth. Currently what I'm doing is setting a cookie on the client that matches my session ID on the server. T...

0
Q: Illegal string offset codeigniter

user2814214Hi been trying to retrieve records from my database, but I keep getting this error "Severity: Warning Message: Illegal string offset " in several fields. Here's my controller view_logs.php <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class View_Logs extends CI_Con...

0
Q: I need formula to calculate the position of planets for date of birth in Vedic Astrology.

user2814249I am building a website to cast a horoscope. So instead of using a ephemeris table it would be better if I could get a formula. Or are there any alternatives ? Or how can I refere the ephimeris Data. Is there any Database available?

-2
Q: PHP strstr equivalent in MySQL

AdamI have one simple table "localization" with two fields (city , street). I want to get only one column "place" but I can't find strstr equivalent in MySQL. My Query should do something like this: SELECT IF(stristr($city, 'earth'),city,street) as place FROM `localization` WHERE city LIKE ('...

0
Q: How to check javascript is enable/disable in Joomla2.5.14

RajnikanthI am using Joomla latest version 2.5.14 and I want to apply some condition so I want to check is JavaScript is enable/disable. Note: I want to check server side side. What I want: if($sub_menu == "find" and $user->guest){ if(){ // if javascript is enable }else{ ...

0
Q: ldap server should be reached by the hosting

Rami Kelleslywhen I'm testing ldap_bind it's worked on my test machine because it's on the same domain with my ldap server but when i move the code to web hosting Warning: ldap_bind() [function.ldap-bind]: Unable to bind to server: Can't contact LDAP server in /home and i'm access it from browser in the same ...

0
Q: Ajax filtering not working in CGridView in Yii (also the advanced search form does not open on clicking 'Advanced Search')

LeoI have just started to work on Yii and facing some issues on CGridView.. the ajax filter is not working in the grid view.. when i chceked the console i see that no ajax request is sent. this is my view (admin.php) Yii::app()->clientScript->registerScript('search', " $('.search-button').click(f...

0
Q: PHP try-catch some problems

dmitriHello. Is it possible to use such code in PHP? try { throw new InternalException('Internal'); } catch (InternalException $e) { throw new Exception('Internal To global'); } catch (Exception $e){ print $e->getMessage(); } class InternalException extends Exception { // some code here }

0
Q: Sql sytnax error about `` in MySql

saidOnderI have never see this problem. I want to make a mysql query (insert, update, select) but mysql gives an error. My query: SELECT * FROM option and error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use ne...

0
Q: In magento language translation is not working

Hithence i need inline language translate in magento but it's not working. I Want to translate custom content, which is added from product tab's at admin side and displayed at fronted side. Thanks...

0
Q: PayPal's CallPaymentDetails function

oshirowanenI downloaded paypalplatform.php, can't remember where from, but it gives me a nice little function which allows me to check the state of a payment: CallPaymentDetails( $payKey, $transactionId, $trackingId ); This returns lots of useful data like status and paymentInfoList.paymentInfo(0).transa...

0
Q: Regex - find everything between <td> tags

user68621I am trying to get everything between (and ) tags using regex. I am new to this, but I have tried the following $html = file_get_contents($inputUrl); preg_match_all('<td>([^"]*)</td>/', $html, $result); foreach ($result as $val) { print $val."<br>"; } I think the syntax of my regex is wro...

0
Q: Cascading grid layout library

Oleg  Kazbanthere is pretty library for grid layout - Masonry (Cascading grid layout library) and there is one website which use this - thereason.us i want to know how tiles are made different sizes? i mean that i know that there are different styles - portrait cropped, portrait real, large, medium, landsca...

-1
Q: Use session or cookie for shopping cart?

Killer WhaleShould I use session or cookie for shopping cart? How to use one of them to provide unique code for each user? Assum that I have three classes: Product.php (1.14 KB), ShoppingCartItem.php (902 Bytes), ShoppingCart.php (774 Bytes, ShoppingCartItem include Product and ShoppingCart include ShoppingC...

0
Q: Installing magento on local virtual host windows 7

SKVI am trying to install magento on a virtual host in my system running with XAMPP I have done following till now : Added lines in the hosts file under windows/system32/driver/host 192.168.1.69 magento2.hue 192.168.1.69 www.magento2.hue Then added code in httpd-vhosts.conf in XAMPP...

0
Q: filtering with combobox category and textbox javascript

wewethe text input filtering is working but i don`t know how to implement with category using combo box. the category is using by there age. please help my to this task:( this is my sample code this is my view <select> <option>all age</option> <option>16</option> <option>18</option>

-1
Q: How to create a heatmap from custom data?

Joeri JacobsI want to create a heatmap from weatherstation data. I have allready a script to get the data from a txt that the weatherstation has produced. <?php // in het bestand weerstation.php class Weerstation { const Brugge = "http://weerstation-brugge.be/customtextout10.txt"; function LeesBericht...

1
Q: PHP: destroy $_COOKIES only but not $_SESSION?

lauthiamkokI just want to destroy all $_COOKIES info but not the info/ data in $_SESSION, so I use this code below, but it destroy all my $_SESSION data as well which is not what I want, // Destroy all cookies. foreach ( $_COOKIE as $key => $value ){ setcookie( $key, "", time()-1800, '/' ); } But the...

0
Q: Compile a DLL to Adapt to new PHP

PedramI have a DLL library that only works with PHP 5.2.8, but I really need this DLL to work with PHP 5.4.16. Most of the how-tos I've found so far look very intriguing. Is there a simpler way of doing it?

0
Q: Hacked Joomla 3.1 administrator login page

Akmal DirgantaraMy website was hacked, and i can see login page on my joomla administrator login page here is the url of login page: http://societ.us/administrator/index.php the hacker was add code (at line 13-15): <style type="text/css"> html { display:none } </style> Do you know how to remove that c...

 
9:04 AM
0
Q: How to upload image to a plugin image folder with file input type in wordpress?

Eli_junI have been working to create my own plugin in wordpress. I have a file input in my form that uploads images. But all I can store in the database is the basename of the file I have chosen whenever I click the submit button. The real image was not actually uploaded. I want it to be uploaded in thi...

0
Q: Adwords Test Account: [QuotaCheckError.INCOMPLETE_SIGNUP @ ; trigger:'<null>']

user2814432Trying to connect to the Google AdWords API and when running addCampaigns.php from the PHP API examples, I get the following error: An error has occurred: [QuotaCheckError.INCOMPLETE_SIGNUP @ ; trigger:''] Which is the problem? Can anyone help me? Thank you

0
Q: Drupal - ajax API weird behaviour

SupFrigi get a weird bug using the drupal 7 ajax API, i made an ajax processed form that worked fine on development and production environment, but since a few times (i don't know exactly when), the form submit at step 1 instead of calling the ajax callback function. I can't spot any Javascript errors ...

0
Q: An array within an array of object

PonceI have this object returned: Array ( [0] => SimpleXMLElement Object ( [@attributes] => Array ( [Desc] => Amount should be numeric. ) ) [1] => SimpleXMLElement Object ( [@attributes] => Array ( [Desc] => Please enter your Reference Number. ) ...

0
Q: silverstripe searchable_fields not working

Aravindastatic $has_one = array( 'Purchaser' => 'Member', 'Staff' => 'Member', ); i have a object with above relations,, both Purchaser and Staff using a Member Object public static $searchable_fields = array ( 'Purchaser.FirstName', ); this is my searchable...

0
Q: writing arabic data from my database to pdf?

user1376376I have a PDF dummy file with text fields on that what I do is fetching data from my database and write into the PDFs input field through python..and then create a new PDF with filled values problem I face is when the data is in Arabic it does write on the PDFs text field it gives blank value.. w...

0
Q: PHP curl_setopt Not Working Properly?

DeveloperThis is my url when i run that url directly to browser that work properly. http://domainname.com/helloworld/dimond/add?name=abcd&price=1860 this url is run properly but i send request using curl_setopt that is not working. my code like. $data="?name=$products_name&price=$fltPrice"; $url = 'ht...

0
Q: PHP Oracle Pagination Cant Load Data In Next Page

user2806837This question is continue from my last question. I have jQuery Table Pagination using ORACLE database. The code like this : $cur_page = $page; $page -= 1; $per_page = 14; $previous_btn = true; $next_btn = true; $first_btn = true; $last_btn = true; $start = $page * $per_page; $query_pag_data =...

0
Q: opening two folders and displaying images php

Rob MorrisI've got the problem of trying to display two albums of photos from a db using php. Currently the following code works but for just one album. Basically I need it to display photos from 'mount-everest-part-2' aswell. <?php $path = "images/galleries/"; $album = 'mount-everest-part-1'; if ($hand...

0
Q: how to sort multiD array with sube value

user1080247i have array which contains hotels arrays, every (hotel) array have (rooms) array that contain rooms data like the price for this room and room number. i want to get the five hotels with the lowest rooms price that called (price_str) important notes : Number of arrays for hotels unexpected ...

-1
Q: add or remove input fields in jquery and php

user2720205I have been trying to get a function working with JQuery to add or remove form input text fields. I have been using an example I found as a starting point. Here is what I have so far., <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org /TR/xhtml1/DTD/xhtml`ent...

0
Q: php-mode suddenly indents differently

fekleeAfter upgrading to EMACS 24.3 (I think from 24.2) and also upgrading the MELPA php-mode package to version 20130920.1850, php-mode now indents as follows: array('a' => 1, 'b' => 2); What it did previously: array('a' => 1, 'b' => 2); How do I get back the previous behavior?

0
Q: I want to show same ID data

LevyI can't get the logic to my problem. i have a database like this. ID | Offense | Remarks 003 No Id Community service 020 No Id Community service 012 No Id Community service 003 No Id ...

0
Q: got error during the Apply Patch.sql upgrade Authorize.net CIM Payment Method Getway..?

user2794814I have Download and Perches Authorize.net - CIM Payment Get-way Modules. URL:- http://www.bcsengineering.com/ Also, Put the ALL ( authorizenet_cim-45x-1.0.9 ) code as per install.html files. But, Still We can not show Modules for Admin side and can not Enable this modules. As per BCS - Autho...

0
Q: Soundcloud HTML5 widget on some Android devices

MikeI am having some problem with the Soundcloud widget player embedded on the website I'm working on (www.RHYTHMALISM.com). The website is built in HTML5 and CSS3 and the HTML5 widget from Soundcloud is embedded with the php include method. Everything works perfectly fine (i.e. music does play) on a...

0
Q: Only time picker in ejuidatetimepicker

ungalnanbanI'm using ejuidatetimepicker in my Yii application. Its giving date and time picker. I want only time picker, I have tried with two options mode => 'time' and timeOnly=>true. its not working. Please find my below code. $this->widget( 'application.extensions.timepicker.EJuiDateTimePicker', ar...

0
Q: Ordered combinations without repetition in php?

Scalaxi have the following array: Array("one", "two", "three", "four"); and i need a function that outputs all the ordered combinations of the array elements without repetition. The output should be one one two one two three one two three four two two three two three four three three four four The...

0
Q: Can I load a Twig template based on the request language?

nietonfirIn a recent multi-language project I use Twig to store email templates for different languages. Currently I name the templates with their respective language in the filename (e.g. example_body_en.txt.twig and load those by concatenation in my controller: $body = $this->render( "AcmeDemoBundle:...

0
Q: how to have a page extension with ?page= behind

Adam Smithhow to have a php page with the link below. www.example.com/example/?page=user I wanna create a page with the URL above. I'm using Wordpress as my CMS, all the pages that I create will be like www.example.com/example/, without the extension. I wanna have lot's of page under www.example.com/ex...

0
Q: Get a List of array from webservice in android

NetStarterI have an array of object coming from a PHP web service which has contents like : anyType[ objectname1{element1=1234567890; element2=test; element3=1110; element3=72.824043; }, objectname1{element1=11090999; element2=test; element3=2292; element3=72.824043; }] I am using ksoap2 to get the webs...

0
Q: Storing funky URL's in MySQL database

chillersI'm trying to store URL's that are kinda funky, example below. http://example.com/page/❤-rantext-1-❤/blah but when I go to echo it out it comes out all funny. I tried using urlencode to store it and to echo it out from the db it used urldecode but it comes out as http://example.com/page/%E2%...

0
Q: redirect to new page is user is already logged in fb

user2129623I want to perform three actions. 1. If user alread logged in; redirect to new page 'url.php' without inserting interested movies into db 2. If logged in but not authorized with my app then tell him to do 3. If not logged in view login button. I have kept functioncall onload() show that when pa...

0
Q: Results from the table and link

Mantykora 7I do not know how to add a link to the results of table. wants to change <a href="#">#</a> to this <a href="photo_update.php?id=<?php echo $row['id']; ?>">edit</a> thank you in advance for your help foreach($results as $row) { $table = '<tr>'; $ta...

0
Q: Wordpress - share buttons for every picture in post

Tigran MuradyanI'm looking for share buttons for every picture in posts. Is there any plugin around? Or how can i do that? Thanks

0
Q: Pass Multiple arguments onMouseover event handler in HTML

www.sapnaedu.inI would like to know how to pass multiple arguments to the the function with onmouseover event handler in HTML. Here is the following code in PHP , <a href='Page2.php?user=" . $userid . "' target='_blank' onMouseOver=\"writetxt('" . $info "')\" onMouseOut=\"writetxt(0)\">" I would like to p...

0
Q: Fix closing try catch in php mode in Emacs

jcubicIn php mode I have try catch (when it's global - no function) try { throw new Exception("Hello"); } catch(Exception $e) { } the indentation put two spaces (even indent is 4 spaces), I have a function that fix it using this: (defun unident-closure () (message "%s" c-syntactic-context)...

0
Q: redirect url gives warning

user2814485Warning: file_get_contents(http://graph.facebook.com/) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request in /hermes/fb_youtube_downloader/redirect_url.php on line 5 Warning: Cannot modify header information - headers already sent by (output starte...

0
Q: &nbsp; is showing as  and inline css is removed in hotmail while I sent newsletter using php mail()

user2814483I sent the newsletter using php mail(). In gmail it is rendering fine but in hotmail it removed some inline css like float:left or right; is removed from html and also it is showing &nbsp; as Â.

0
Q: UPDATE php function not working

user2598619I am working on a customized CMS to try to learn some stuff on PHP. I am basing my experience in some tutorials I see/read. So, I have this table called page_hem where all the data is saved. Then I have it echoing on text fields all over the page that is for the time being my index.php. All work...

0
Q: how do i access youtube videos from database in jquery.I am using JQuery youtube player with multiple playlist

shreeI am using JQuery youtube player with multiple playlist.This is my jquery code i want to access youtube url from database and assign them to playlist songs.Please help me var playlists = { 'playlist-1': { title: 'Random videos', videos: [ ...

0
Q: convert string into integer when number over than 2147483647

Ben Wong$_GET[id]; $id=(int)$_GET['id']; mysql store - int I have a question about convert string into integer. (Convert post id to make sure user don't send string) and mysql store type - int ////////////////////////////////////////////////////////////////////////////////////////// I notice if t...

0
Q: Php mysqli extention and timestamp index

Olga KrasheninnikovaI've got a problem with php mysqli extention and timestamp index. I've got a Mysql table like this: CREATE TABLE Test ( id int(10) unsigned NOT NULL AUTO_INCREMENT, user_id int(10) unsigned NOT NULL DEFAULT '0', created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 'accepted', ...

0
Q: Wordpress Pagination - Too many pages for number of posts

rossautomaticaI've added pagination for a custom post type within my Wordpress theme. It works great, apart from it shows too many pages in the pagination menu for the number of posts: http://www.electrickiwi.co.uk/testimonials/ There should currently be 7 pages, but it's showing 12. The code below is what I ...

1
Q: How to detect multi page PDF through PHP or imagemagick?

user782104For instance, when I uploaded a file to the temp folder on server, are there any way to scan through the folder and check whether a specific file is multi page or not? Some code like: $files = scandir ('$tempSrc'); foreach ($files as $pdf) { $isMulti = //exec some command or call php funct...

0
Q: Server "wait" time is too much on web domain

user2743239Well i have been working on my client-server app locally and everything was ok. Yesterday i've tried to upload it on a web domain and i realized that when a request is sent it lasts more or less 5 seconds to receive an answer from the server. Using the google chrome console i checked that this ...

0
Q: htaccess redirect to a different folder in same domain

Deepak Ranjan JenaI have a website abc.com were i have kept all my files and folders. Now I have created a folder called "newsite" and moved all the files over to there. Now i want if my user type abc.com in browser it will automatically redirect them to abc.com/newsite I am using a linux server with godaddy host...

0
Q: Storing Google credentials

dottyI'm writing an application that needs to log into a given Google Analytics account and using the Google Analytics API perform various calls. Obviously storing details inside a MySQL database is a bad idea. How would I get around this? Any ideas or considerations I need to take into account?

0
Q: Use of session.use_cookies in php

Praveen DeshmukhI have searched around to find the impact on php session if I change the value of session.use_cookies to true or false but there seems to be no impact on how it works. What is the use of session.use_cookies in php and why it is required?

0
Q: Mysql search example Paul's Ricore

meandmeI have in my table some name having ' in them example Paul's Ricore when performing a search example http://www.website.com?s=paul's ricore i get a page with mysql error mysql_fetch_assoc() expects parameter 1 to be resource, but if i just place \ all is ok. example http://www.website.com?s=paul...

-4
Q: How to make a beginner backend (programming language)

Tommy FierensSoon i Will start on my frist backend. I have my hosting and subdomain in place but have no idea wich way to go from here. Time is limited and i need to learn fast. I have almost zero knowledge of html... What language would be the most easy to learn ? The project needs : - a user login (only on...

0
Q: getting JSON data from php page

user1511958my php web page is returning a JSON string. i wrote following function to get those data and display them on jquery mobile listview. function LoadJsonDataFunction() { $.getJSON("my_web_page.php", function(obj) { $.each(obj, function(key, value) { ...

0
Q: How to get website to remember choices to be inputed in to a form

user2607105I'm looking for a way to create a page with items on it where each item has a button which can be clicked to "like" or "choose" the item. The website would then remember the choices and input them to a form on another page. Is there anyway of doing this?

0
Q: highlight datatable search string

Vasanthan.R.PI have used datatables to display database table records. Here i have to highlight the search string. I google it and found the following link. jQuery plugin DataTables: How to highlight the current search text? In my case it is not working. May be because i use ajax method to load the data. ...

0
Q: Mysql Delete between two dates

PrinceI want to delete details between two dates My code is given below Delete from emp_leave_details where emp_id='$id' and from_date BETWEEN '$f_date' AND '$t_date' The problem is that it deleted all record between $f_date and $t_date but didn't delete the record of $t_date .I want to delete th...

0
Q: PHP Mockery not calling mocked method from within mock

AdamI've been trying to use Mockery to assert that a method is called from within another method, when an exception is thrown. So as an example: public function testOtherMethodIsCalled() { $client = m::mock('Client'); $client ->shouldReceive('getFoo') ->andThrow(new FooNotAv...

0
Q: unable to maintain attendence record

user2735598I was trying to make an attendence system with daily attendence filled and submited by some authorised person what i was unable to sort out was the attendence at the back end in the database?? Can u help me and explain the working on backend attendence record as i want to fill attendence on regu...

0
Q: Created PHP Extension not working in LINUX

KumarI have created one simple PHP Extension using the following link: Sample Hello World PHP extension on Ubuntu I have created a PHP Extension successfully as hello.so. I have used XAMPP package, in this I have moved this hello.so to /opt/lampp/modules/ and I have included the line: extension=hel...

0
Q: PHP -Parsing and echo a file and change line whether detect a specific string(e.g \t:\t)

Antreas Apostolouhello i have i problem echo content from a file. What i want is parse and echo a file and change line whether detect a specific string(e.g \t:\t) in it. Here is my current code $full_file_name_exif_txt = "downloaded2/PisaTower/$entry.exif.txt"; if (file_exists($full_file_name_exif_txt) ) ...

0
Q: Bootstrap programatical navbar documentation

user1875438I have in my Symfony application bootstrap navbar included as a service and generated programatically and a lot of problems when I have to put there something less common. On example I needed to include some custom html in it. After quite a lot of searching I found a solution: public function to...

0
Q: Creating menu of sqlite content

Ellinor BergmanI'm trying to create a menu of the content in my SQLite. I want the links to open each article. I want the links to open underneath the menu, but at the moment I can´t get them to open at all. I'm very much a beginner at this so I imagine I'm far off what it´s supposed to be coded. Because, now,...

0
Q: Testing that variables are both not empty and also an appropriate length

Steve73NIIm creating a form for editing customer bank details, account number, sortcode etc If the customer leaves a necessary field blank the form is displayed with an error that they need to complete the appropriate fields if ($bankname == '' || $accname == ''||$sortcode==''||$accnum==''||$balance==''...

0
Q: PHP loading extensions error

Phil CrossI'm trying to get PHP to load some extensions (sqlsrv driver for PHP PDO). I'm using a wamp server, With PHP 5.4, Apache 2.4.4. In my PHP.ini file, i've entered the following line: extension_dir = C:\wamp\bin\php\php5.4.16\ext ... extension=php_pdo_sqlsrv_54.nts.dll However in the apache err...

2
Q: Fetching few records from mysql database having million entries

Tirthankar KunduI have a table which has million rows. It has user id as its primary key. I have an array having 500 user ids in it. I want to select all the records from the table whose user ids are in the array. I know one method to do this is to change the array into a string and run IN query by passing the...

0
Q: Adding multiple timestamp to MySQL database

JenzI am developing an attendance management system in which I want to store punch in time and punch out time as timestamp in database. The query for the table is as shown: CREATE TABLE IF NOT EXISTS `punchdetails` ( `id` int(11) NOT NULL AUTO_INCREMENT, `employeeid` int(11) NOT NULL, `punchin` tim...

0
Q: How to use SQL to avoid queries within loops

RoyI currently have two related tables, one for 'groups' and another for 'items'. Items are stored in groups by an associated group ID. Very basic table relations but unfortunately my SQL is not very good so I'm unsure what is the best way to loop through all groups and, within them, loop through al...

0
Q: mysqli Login System "expects parameter 1 to be mysqli_result"

Lior Elenbymy code: <?php define("DB_HOST","localhost"); define("DB_USER","elenbyin_vadim"); define("DB_PASS","pass123"); define("DB_NAME","elenbyin_vadim"); // CONNECT TO MYSQLI $sqli = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME) or die(mysqli_errno()); // FETCH DATA FROM FORM USING METHOD POST /...

0
Q: Detect first zero from string in php

Ben Wongfunction number_check($int){ if($int>0 && !is_float($int)){return TRUE;} else{return FALSE;} } $var="025"; if(number_check($var)){echo "pass";}else{echo "fail";} I have make a function to check the number for post id. post_id should always > 0 and no decimal. but I have a problem wh...

0
Q: Call to a member function prepare() on a non-object at PDO

asdasd asdaI am trying to use some remember me class , now the problem is i get Call to a member function prepare() on a non-object and i dont get any error's : index.php : try { $connection = new PDO('mysql:host=localhost;dbname=ibids', 'root', ''); } catch (PDOException $e) { ...

0
Q: Combine Array Elements in PHP

ViralI am trying to get an required output from an array. I am getting data array from a for loop like this: Array ( [TIMESLOTID] => 27 [DATE] => za 05-04-2014 15:00 [ProductID] => 196 [VariantID] => 1079 ) Array ( [TIMESLOTID] => 27 [DATE] => za 12-04-2014 15:00 [ProductID] => 196 [VariantID] => 107...

0
Q: How to restart apache server automatically on window server?

user2814751i have a big system and query load on my apache server so crash when more query fire on mysql how can i restart my apache server automatically when it stop?

0
Q: Get ID of twodimensional PHP array

doonotHow do I get the ID of a twodimensional PHP array? Array ( [4] => Test [6] => This is a test [9] => 19 [15] => Bla Bla Bla [appid] => 19746 ) This is how I create the array from the string: $str = '4=Test&6=This is a test&9=19&15=Bla Bla Bla&appid=19746'; $result = array()...

0
Q: php bytes to kilobytes

Mantykora 7I have something like this <td><?php echo $row_rsPhoto['size']; ?></td> and displays the file size in bytes, can do that in kilobytes, I'm trying to do this - function public function size_as_kb() { if($this->size < 1024) { return "{$this->size} bytes"; } elseif($this->size < ...

-8
Q: How to add HTML elements dynamically using jquery on button click event

PradnyaOn Click of Button , I want to add 3 input boxes, one file upload control and html table. The control should be editable and should be delete selected control.

0
Q: Char £ conversion to =A3 using Zend/Mail/ on Ibmi

gz_gsanetits now two days working on a project for getting a data code from an email body content. i found a problem regarding get chars like !"$%&/()=?^. Solved all of them by encoding to UTF-8, but with the £ char still remain on the mail content like '=A3'. Sample code here for understand at best th...

0
Q: Error in converting a MOV video into MP4 using ffmpeg

user2767347I want to convert a mov video into mp4 using ffmpef library of php. I am using given code: $cmd='ffmpeg -i sample.mov -sameq output.mp4'; echo exec($cmd); It is not working at all. Even I didn't get any error. Could anyone tell me the proper steps to do this conversion. I have tried a lot of c...

1
Q: How can I add New List to my MailChimp Account By programming in PHP?

AshwinPI have mailchimp account, I would like to add new list to my mailchimp account using PHP Library for MailChimp. I have coded the following for add new Group to the given list. $mailChimp = new MCAPI($api_key); $mailChimp->listInterestGroupAdd($mylistId, $group_name); above code is use for Add...

0
Q: How to use external css in tcpdf pdf generation

user1559230I am trying to create a pdf of a web page with tcpdf. But it's not working. The page is a php with external css and javascript files. http://www.pathaila.com/admin-panel/contract.php this is page I need to generate pdf. Can anyone help me with this. Thanks,

0
Q: Looking for "Stock Alert system and expiry date" in Pharmacy system- PHP

user2625119I am planning to develop an Pharmachy System with Stock alerting mechanism and as well as the expiry date scheme. So that I am looking for any open source project in PHP so that I can customize according to that. Please provide some suggestions.

0
Q: Ask if element has class with Twig

Sebastian RushI have this simple loop with Twig: {% for image in product.images %} {% if loop.index0 <= 3 %} <li> <a href="javascript: void(0);"> <img src="{{ image.src | image(200) }}" alt="{{ image.alt }}" rel="img{{ product....

0
Q: i'm getting the weird output in php array_reverse() functions

Nambii'm getting the weird output <?php $a = array('1000'=>1,2,3,4,'1001'=>5); var_dump(array_reverse($a)); ?> and i'm getting the output like this array (size=4) 0 => int 1 => int 3 2 => int 5 3 => int 1 can anyone explain the code

0
Q: How to perform an action in a PC browser from an Android phone?

keybeeI'll try to explain what I want to do. So, I have a PC, and I open a JavaScript-driven URL in the browser. Then, I want to control the web-page with an Android application. For example, I press a button on the phone and a Javascript animation is executed on the web page. I hope that the explanati...

0
Q: Display a uploaded images from a folder

Navnee PrakashI want to display the images which i were uploaded in a folder.But while scanning that particular folder it displays the name of the image ...anyone help me .. <?php $path = "C:\wamp32\www\photos/"; $dir_handle = @opendir($path) or die("Unable to open folder"); echo "<table>"; wh...

0
Q: validation in entity classes

MuatikLet's say I have an entity class like this: class car { private $price; private $color; public __get($name){ ... } public __set($name, $value){ ... } ... } and a manager class like this: class CarDealer { private $db; public __construct(IDatabase $db) {...} public sell(Car $...

0
Q: web services using php and soap library

user2814843" Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\calculator\lib\nusoap.php on line 7384 " what is this error meant ? and how to resolve it ?

0
Q: PHP/MySQL - Storing of dates for use with date selection reports across timezones

user2810432currently debating the best way to proceed with regard to storing dates and would appreciate experienced comments - looking for the 'why' rather than the 'how'. strong text*Scenario:*strong text We are developing a system that allows clients (across multiple timezones) to create transactional d...

0
Q: How to properly pass data with Ajax with CodeIgniter?

x_vi_rI want to create a dynamic map with checkbox to customize the marker on the map. Of course i use Ajax for that, well i would like to use it :) My ajax call is ok, i pass the data from the view to the controller with : $( "input[type=checkbox]" ).click(function() { var data = $(this).val(); ...

0
Q: Split a string into smaller Chunks

RashmiI have a string of length 50k approx. example of string hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl OR hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl OR hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl hdjhjdhjdhdhjdhjhdldkklkdklkll...

0
Q: paypal account api differences

matpolWe have a site that uses paypal. When we use the clients paypal account and use the api we get an 'Invalid profile ID' error. When testing with a different 'live' paypal account we do not get this error. Also when we use the paypal sandbox we do not get this error. 11552 on the page below: ...

0
Q: Drop down listed based on previous selection

Karina McGourtyI have a form and i want a drop down list that is populated based on the users previous selection, here is a fiddle showing my basic form, i want the dropdown country to be populated based on the system selector dropdown. How would i go about doing this?

0
Q: How can I format input fields to form time of day using PHP date() function?

crmI want the user to select a time of day which I then want to convert using the date() function so it can be inserted into a Mysql database datetime table field. <select name="event-start-time-hours" class="event-time"> <option value="1">1</option> ...

0
Q: Using "runas" command from PHP

ArthurNThis question is related to: Using "runas" command for a program that writes a file (Windows Server 2008) I tried to run the runas command from PHP to run that console program: <?php exec("runas /savecred /user:User1 writeTxt.exe"); ?> But it doesn't work when called from a browser. However, ...

0
Q: If statemen in the wrong place

user2792990Please you help? I run a query via search form and output results, although, it is not displaying as it should? Still new to php so please excuse if my code is.... the result needed. If te search returns I want one of 2 things. To either show Employed by: xxx or Not currently employed: <?php i...

1
Q: My .gif animation doesnt show in google chrome? Any ideas why?

user2350143var loadUrl = "winners.php"; var ajax_load = '<div class="preloaders"><img src="img/preloader.gif" alt="Loadig..."></div>'; $(".page").click(function(){ $(".main").html(ajax_load).load(loadUrl); }); I want to display my .gif animation in a web page, but it doesn't work in Google Chrome. Wi...

0
Q: check the manual that corresponds to your mysql server version for the right syntax to use near

Mohammad AlkhdourIm trying to insert into database but it giving me an error (check the manual that corresponds to your mysql server version for the right syntax to use near (Long,Lat,name,ReturnAddress, Division) im using php,mysql. I need to success result, //Insert new row with user data $query = ...

0
Q: Access external page with Server IP via PHP

John BrunnerOn a website I have to implement a user section. When a user is logged in, he should be able to access a Journal on another site. This Journal on the (external) site just could be accessed if the external site knows the IP address (which I have to register manually). I can't enter every IP addre...

-1
Q: Where is cookies stored?

Eddyfrom what i know, cookies can be deleted from the history of a web browser. However, where does it really stored in? Is it stored in my computer hard disc? And also, for the same as phone, where is cookies stored in a phone device? Thanks in advance! :D

0
Q: SimpleXML node casting to string not working

ArthurFromLatviaI am trying to get a currency rate from this XML file: http://www.bank.lv/vk/xml.xml I am getting a currency ID from a HTML form, after that I have to find the according currency rate. I am using SimpleXML and XPath. My selection: $current_rate = $rates->xpath("/CRates/Currencies/Currency[ID='...

0
Q: Move the div and set possition of scrollbar

Vivek BalachandranI have many divs placed vertically and the page scrolls horizontally.I need to push some div among these to the most left of the page , and after that scroll start from next to the moved div. Thanks in advance

0
Q: My GET type form is displaying a POST type form in cakephp

XerolanamI am trying to create a multiple search query using GET but it show differently. below is my view code: echo $this->form->create('Place', array('type' => 'get', 'class' => 'form-inline', 'url' => array_merge(array('action' => 'admin_index')))); echo $this->Form->input('province...

1
Q: When trying to create array from excel using phpexcel, it adds random spaces between array values

Danelso I'm trying to create an array from excel list using php my excel has these values between A1:A3 - value1, value2, value3 My code is this: <?php require_once dirname(__FILE__) . '/includes/libraries/classes/PHPExcel.php'; $objPHPExcel = new PHPExcel(); $objReader = new PHPExcel_Reader_E...

0
Q: How can I get the previous/next row when doing a MySQL query

JohnMalliI have this fictive MySQL 5.1 database content (ignore the <--'s): id, data, set 1, "xyz21", 0 2, "xyz31", 0 <-- 3, "xyz71", 1 <-- 4, "xyz8", 1 <-- 5, "xyz7", 1 <-- 6, "xyz6", 1 <-- 7, "xyzA", 1 <-- 8, "xyzB", 0 <-- 9, "xyz9", 0 I need to get the rows with id 2-8 (both included) as I want the ...

1
Q: PHP SOAP is not buildung a correct request

Florian Drechsleri am trying to build a specific SOAP Request in PHP with the standard SOAP-Class. That's the Request i want to build in PHP: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.autoscout24.com/webapi/" xmlns:data="http://www.autoscout24.com/weba...

0
Q: Flash response text breaks, missing letters.

Martin MetsaluI've got a banner where I have a contact form. If some fields are empty and the user tries to submit it the banner will come back with a response. But for some reason the response text breaks or it's missing letters. /*ActionScript 3.0 */ name_txt.addEventListener(MouseEvent.CLICK, fl_Mouse...

0
Q: Migrating a web store error

Любомир ФотевI recently changed my hosting provider and now that I uploaded the website to the new FTP I get these two errors . I have no idea where to look as I am a pretty unexperienced with coding. My web store is based on opencart's final version . Many thanks Lubomir Warning: require_once(/users/bhr...

-1
Q: png image to string conversion in any language

PrakashI have a problem regarding reading of png image. For eg. I have created an png image containing my name "prakash parwani" using photoshop and now I want to read this data from any of the language. so is there any why to read png image data that is "prakash parwani"? Thanks in advance.

0
Q: Screen resolution detection

Rotari RaduI know that similar questions were asked but this is different. Intro: i'm triyng to make an website with adaptive designs (3 templates for 3 widths intervals as follows: 1200+px, 600-1200px, 600-px). Problem: i have a really hard time with user screen width detection. I' know that only js can...

0
Q: How to sort an array of array elements based on values in another array in PHP 5.3?

SidI have an array which holds around 5000 array elements, each in the following format: Array ( [keywordid] => 98 [keyword] => sample keyword 34 [type] => NATURAL [longname] => UK ) I have a second array which holds numerical values...

0
Q: CDbCriteria for a command

Devwhat is CDbCriteria for this command? "select count(*) count from (select id, player_id, goals_scored, if(goals_scored>0,@counter:=@counter+1,@counter:=0) count from player_stats, (select @counter:=1) b where player_id='playr0000000000000...

1
Q: YII scenario: how to?

NEWBIEWhat If I have an input field for example: UserEmail: UserPhoneNumber: UserOldPasword: UserNewPassword: UserRetypePassword: And on my action update I will only require UserNewPassword if UserOldPassword is not empty else the only thing that needs to be updated is either UserEmail or UserPhone...

0
Q: Search for specific value in multidimensional array

DelsI need some help, Here an array $a = array ( array('fruit' => 'banana', 'color' => 'yellow'), array('fruit' => 'apple', 'color' => 'red'), array('fruit' => 'melon', 'color' => 'green') ); $key = array_search('apple', $a, true); echo $a[$key]['color']; I already tried to retrieve ...

0
Q: Get archives by specific date Wordpress

sohanmax02I want to get the archives for particular year in months format, so that when JANAURY is clicked, archives for JANAURY 2013 will be listed. I googled it, found some code, customized it and was able to list the months, but not as it is required. I was able to list the name of the months like JANAU...

 
11:47 AM
0
Q: MY SQL insert syntax error

DrDebugI know what a syntax error is but i cant find the problem in my syntax. I did the sql in phpmyadmin first and not ive just copied and put variables in. Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use n...

0
Q: Jquery Simple Modal passing values from html form to php and display in popup jquery

Vijay VijitizerCreated a basic form with two text box, on button click i have to pass this text box values to php to read some file and get the data. Once data is fetched display data in a jquery simple modal popup. Below is the code please help in sending the data to php and retrieving it in jquery modal box. ...

0
Q: php String from user input and from database

SnippetI have a problem about this strings currently i save some strings into the database with simple insert query and cleaning the data by this code mysql_real_escape_string($data) i get the data from the database using a simple query sample input $saveString = "You're great"; saving... Inser...

0
Q: Write text on image as display as image

BSThakrarI have one image in php like this Now I want to write Number on white textfield at a run time. And then I want to display it as a single image. How I can do this ? I tried to search over and found different result but none of them worked for me. I tried http://blog.doh.ms/2008/02/12/adding-...

0
Q: pathinfo() working on localhost but not on the live server

Abhishek kadadi$name = pathinfo($num)['filename']; this is line 15. The error: [25-Sep-2013 05:32:00] PHP Parse error: syntax error, unexpected '[' in /xxxx/xxxxxxxxx/xxxxx/xxxxxxx/xxxxxxxx/Project/mainpage.php on line 15. The same code works perfectly on localhost with XAMP! Any other way which I sho...

-1
Q: using AJAX value in IF(statement)... animation

HildosI need some advice how to save or use my AJAX output in my if(statement). This is how the code looks like, so I hope you understand what I am seeking. setInterval("yourAjaxCall()",1000); function yourAjaxCall() { $.ajax({ ur...

0
Q: Curl and posting base64 data to a php uploading script

user2815026I'm looking to make a script to upload images from my server to an imagehost, which has a php API. I'm supposed to send the following html request to the API: http://example.com/api?upload=myImg&key=apiKey&format=xml myImg and apiKey respectively are the the image and the key, but you probabl...

0
Q: PHP POST data in ASCII instead of UTF8

MarekI have got problem with coding after sending data by POST from form. When I am using special characters like ą, á, ę, é etc. I am getting ? instead of proper character. I am struggling with it already third day and cannot find the problem. Website is using UTF8 and all files are in UTF8. The fo...

0
Q: Reject sites with alexa rank smaller than x in input field

AdrianPHP - alexa.php <? $url = filter_var($_GET['url'], FILTER_SANITIZE_URL); $xml = simplexml_load_file('http://data.alexa.com/data?cli=10&dat=snbamz&url='.$url); $rank=isset($xml->SD[1]->POPULARITY)?$xml->SD[1]->POPULARITY->attributes()->TEXT:0; web == (string)$xml->SD[0]->attributes()->HOST; echo ...

-5
Q: how to connect with sqlserver 2012 using html5

Gaurav Parmarplease help me, i am working in a php website which is need to be connected to server 2012 via JavaScript or html so please provide a working script or guide me how to do it.

-7
Q: Create a dynamic html table using jquery & it should be editable

Pradnya create multiple dynamic html table using no. of rows and columns using jquery

0
Q: Parsing inline tags with SimpleXML

KoenI'm using SimpleXML & PHP to parse an XML element in the following form: <element> here is a random text with <inlinetag source="link">inline</inlinetag> XML </element> I know I can reach inlinetag using $element->inlinetag, but I don't know how to reach it in such a way that I can basically r...

0
Q: how to send an array as xml response in php

user2809576i want to send xml response. I tried following code. but does not print array element but only print "array". Please tell me where i am wrong? ` try { $query = "select * from upload_video"; $result = mysql_query($query); } catch(Exception $ex) { $response = '<?xml version="1.0...

0
Q: How to transfer data from ASP.net to php plateform securly?

ghulamjafarI am on edge to develop a system which communicate cross the plate to share the data. Please can you help to select best meduim to do this. I want to know what is best practice to do this. I already know about JSON and WSDL beginner. If you have best example, please share. Thanks.

0
Q: XForms and communicating between and php-server

user2301515I've question about communicating between chiba-3.0.0b2's xforms and php-server There is a server.php like: <?php $var1 = isset($_POST['var1']) && is_numeric($_POST['var1']) ? $_POST['var1'] : 0; $var2 = isset($_POST['var2']) && is_numeric($_POST['var2']) ? $_POST['var2'] : 0; $sum = $var1 + $va...

0
Q: How can i get the `GPS` (Latitude,longitude ) properties if they exist of a picture?

ShnageI want latitude and longitude information from picture on my desktop . I googling very much to get any Idea about how to get this information. I am still trying... If anybody Have idea about this...then please guide me..or provide any solution if possible..

-2
Q: Hiding field data passed in php URL

Richard GriffithsI have a number of php pages that create pdfs based on data passed to them in the URL such as: http://www.website.co.uk/reporting/makeIssuePDF.php?officeName=surrey&issueID=23 Is there any way of hiding the detail in the address bar so that all the user sees is: http://www.website.co.uk

-2
Q: Want to merge custom post type in normal post catagory WP

Vineet RaiActually I am changing the theme of my site now I want to keep all my custom post type in a single post. something like this... post catagory=custom post type post sub catogery= custom post textnomy I am also using advance custom feilds(plugins) so I also need help on setting fetured image fo...

0
Q: has_many relationship with subquery in active record spark codeigniter

user1048123I am using spark activerecords with codeigniter and build the relationship with user and userpost like following user class have has many option like static $has_many = array( array('userpost', 'conditions' => array(('SELECT friend_id FROM userfriends WHERE user_id = $this->id') AND id ...

0
Q: PHP page hangs on openMySQLConnection()

AdiaI have a php page and the page is connected to a database. I moved the pages from one server to another. Now it is throwing 500 Internal Server Error. When I comment out the openMySQLConnection() line from the php code, the page loads and when remove the comment, the error appears again. On the...

-2
Q: How to add functionality to DELETE, UPDATE and RESET buttons while trying to access MySql Database through HTML form (PHP)

user2815059This is going to be simple address book which has to be accessible through HTML form. My ADD and FIND buttons are working no problem. Tried everything for DELETE, UPDATE and RESET but nothing works. Im totally new to PHP and MySql so please dont mind if my code is pure mess. Can you guys try to h...

-1
Q: ajax request while scrolling

rexhin$(window).scroll(function() { if( $(window).scrollTop() == $(document).height() - $(window).height()) { $.ajax({ type: "GET", url: "not_data.php", data: dataString, success: function my_func () { // display 10 new names. } });...

0
Q: Running PHP exec() in IIS 7.0

ArthurNIf I run this PHP script on a browser (the server is IIS 7.0): <?php exec("someProg.exe"); ?> Which user does the process (someProg.exe) belong to? Is it IUSR? Another question: if someProg.exe needs some .DLLs from system32 folder, will I be able to run it if the process belongs to IUSR?

0
Q: "Undefined offset" in PHP array after using explode(...)

GichoCan u tell me why show me tons of notice ? I am new in php and don't understand where is my mistake, notices from line: <td>'.$columns[1].'</td> To line: $sum+=$columns[2]; Here is my code: <?php if(file_exists('data.txt')) { $result= file('data.txt'); ...

0
Q: YII framework how to run a sqlite schema?

user2507316I've edited a schema.sqlite.sql file, but how can I run it in YII framework to update the tables? Because if I create a model in the gii tool, I get an error that there are no table created, thats why I need to run the schema.sqlite.sql, to update the file testdrive.db

-1
Q: Diferentiate Device, SmartTV, Tablet and PC request

Antonio AcevedoI would need to differentiate when a request comes from a device, tablet or PC for managing sessions (the user could have the same firefox version open at the same time in tablet and PC but this would be 2 different sessions). I have seen the javascript user-agent approach but this way I can't d...

0
Q: How to get a `background-color` effect when clicking on a `url#header4` link

blade19899How to get a background-color effect when clicking on a url#header4 link like for instance here on stackoverflow. if you would select this on: How to shutdown my system via a php site using LAMP server? That is a link with an id and when u click it you would go to that link, to that header, a...

1
Q: Any security issue with sending login data with jQuery?

denlauA short answer - is there any security issues in sending e-mail + password through ajax to another page? :) My thought is, that the information could maybe be grabbed in the sending, which may be a flaw compared to doing it "the conventional way" with just a form-action with a "link" to the logi...

0
Q: Using selecting data from database in PHP Dynamic image

KirilasI have been working on a dynamic image script.The main reason I was searching for it is I want to show user info from a database.Here's my problem: <?php header("Content-type:image/png"); $array=array("I am a monument to all your sins", "Currently making pizza","Best before 12/7/09", "Fa...

0
Q: Reading JSON POST using PHP

Steve MatthewsI looked around a lot before posting this question so my apologies if it is on another post and this is only my second quesiton on here so apologies if I don't format this question correctly. I have a really simple web service that I have created that needs to take post values and return a JSON ...

0
Q: Get the GooglePlus-+1-Count on the Website

devShubaI have the following problem: I have successfully wrote a code snippet, that gets the +1 Count from a Google+ Page of a company. Example I pass this site to the function: https://plus.google.com/105896688842033278729/posts 354. But what I do now is to get the plus-Count on a website, for exampl...

0
Q: copying tables to another tables

RiKotable1 id letter 11 a 12 b 13 c 14 a 15 c 16 c The letter a belongs to table 2 The letter b belongs to table 3 The letter c belongs to table 4 table 2 id letter_id text1 1 11 hello 2 14 hello table 3 id letter_id text1 text2 number ...

1
Q: using phpword to download an attachment word file

user2790300my problem is I want to be able to download the text area content as word file -the code is work if I stop at saving to server code (the content are exactly as written in the text area) -but when I added the download code the downloaded file will contain the programed page format please help me ...

0
Q: Foreach using to draw a html table

user2815020I just trying to do a invoice table. I am using Fusion Invoice. So this is the code to take and display items to table. http://s24.postimg.org/ujlv43f9x/code.png <-- the code. I want to do a non changing table. Look to picture. http://s11.postimg.org/j574iy5sz/Invoice_PG0005_9_page_001.jpg You se...

0
Q: need help setting up bootstrap with codeigniter?

eoini want to set up a view in codeigniter that uses the bootstrap framework. iam following along with a youtube tutorial for bootstrap and attempting to create a "naigation bar" or navbar at the top of the page. just to see if i can get the thing running but it doesnt seem to be getting created whic...

0
Q: Special chars getting lost in $_POST

BrainfeederIn a project we have a form with some input fields and a textarea. It is a multilangual project and if some text is translated in German the use of chars like ü and ö are very common. In the past we never had problems saving and retrieving these from a database. We use the utf8_general_ci colla...

-1
Q: how to read html source code by passing url

user2515169how to read html source code by passing URL and find data of a class. like I am find a class data by passing URL URL is external

0
Q: Facebook Comments - Synchronization between website and fan page

elmrWhat's the best way to synchronize facebook comments between website articles and fan page. What I would like to achieve is : publish articles on website with fb comments as comments system users can comment this article through website users can comment this article through facebook fan page (...

0
Q: Merge 2 images into 1, with blur

feesHow can I merge 2 images in PHP and have a blur effect? I need to make something like this http://www.bildites.lv/images/yzgc1puaci0nk1qeo0v.jpg (this image was created using photoshop).

0
Q: ckeditor - not setting html data inside textarea

AuxiliaryI am trying to use ckeditor with cakephp and I've written a helper. The problem is when I enter some line breaks or add checkboxes (or other html elements) with CKeditor, the editor crashes the next time I edit the content. Firefox returns the following error: SyntaxError: unterminated string li...

0
Q: How to classify entries in a database via php/mysql and issues with undefined index

SuspiciusI hope that I describe my problem properly. I have created a database for a cafeteria. This has the following tables: orders, members ISA manager and servers, products and categories. In the table orders I should insert features such as title,quantity,datetime,sum and username of the correspondin...

0
Q: Determine all stores for a CMS page in Magento?

Keenora FluffballI do have the problem, that I want to list the CMS pages on a site for a store. When I get my collection like this: $collection = Mage::getModel('cms/page')->getCollection()->addStoreFilter($storeId)->addFieldToFilter('is_active',1); I get all the pages, which have "All StoreViews" as set stor...

0
Q: CodeIgniter , how to get single element instead of array of size 1?

Cengiz FrostclawI'm new to CodeIgniter. I love it, it's great, but one issue cannot resolve for days. I'm trying to get a single row, by its id, like this : $query = $this->db->get_where('content', array('id' => $id)); $the_content = $query->result_array(); However, it results in an array of size 1, like thi...

posted on September 25, 2013 by Developer

Hello Friends This is my encoded String how to convert that string into image using php please help. -- SNIP BINARY DATA --

0
Q: persisting request String to Database in symfony2 fails?

Michael MöhlihsHey this is my first post and i hope i can make my problem clear. First the basic problem: i have a form that submits some strings to my controller. this controller first access the corresponding entity in the database and then tries to update those strings for that entity. i retrieve the para...

0
Q: Want to generate MAP key for PHP application

linux_primei am maintaining an old MAP based Web application written in PHP. Somehow it's Map key expires. when i have generated new Key it looks very different in size, and it's not working. previous key": ABQIAAAAH97iKOQ_8y9DN0H9FfYCUhRiOZYK68FL-ce9qG_lfib2BSFj1RRMsxtkwMFN066Xtiwy-rV3-U6wbA current key...

0
Q: How to Print double side's in Html,Jquery

orofa efei am creating a an an online ID Card Software using HTML5,PHP, JQUERY AND MYSQL where the data's will be fetched from the database. i have two Main div called Front_Div and Back_Div, though i have other div's which are in thesame webpage. i want to print Front_div and the front of the id card and...

0
Q: Implementing multiple interfaces in php

user1169526Im currently designing my system in php and have a lot of entities that share common attributes now i was thinking that i could make interfaces in order to abstract things out. I have for example the following entities: Category(name, parent, modification_date, creation_date, state, lang, en_id,...

-1
Q: how to add edit contact fom with additional blocks like head office detail, branch office detail

Vijay Raii have simple contact form where i use ajax to add more contact detail block like head office contact detial , branch office contact detail and so now i want add and edit through php in CI how

0
Q: Facebook Chat API - Messages are marked as spam

Davide ArrigoI'm developing a smartphone application that allows the user to login with facebook and then send a message to his friends using the Facebook Chat API. To achieve that I send the facebook access token to my server and then use it in a PHP script using the API to send the message on the user beha...

0
Q: Loading animation on php include div container

user2743057Say I have something like this: <div> <? require_once('include.php'); ?> </div> Is there any way to have a loading animation until an included php script loads? Thanks

0
Q: Access a model method from another model in Cake

harrygI'm not sure if I'm using the MVC architecture correctly so go easy on me if I'm going wrong. I have a model Account that grabs a load of valuations from a Holding model. These 2 models are linked as Account hasMany Holdings. In my Account model I have a function that retrieves the sum of the h...

0
Q: Blackberry Push Notification Implementation in CodeIgniter

Harsh ReddyIs there any codeigniter library to implement push notification for Blackberry apps (version 5-7). Or can anybody help out with the process of implementing blackberry's push notification service in codeigniter.?

-1
Q: php - title of the file being uploaded in the table

Caio KawasakiI have the code below, there is a form to upload an image and two camps, one camp for an id and another name camp with the same image name that is being uploaded, I wonder if it is possible to make the code put the image name in the table automatically, without me having to keep writing on the fo...

1
Q: Tables in MSSQL contain "$" char - issue with mssql_query in PHP

user2815233I would like to ask you for help with mssql_query function in PHP. I need to SELECT data from MS SQL from MS Dynamics NAV. The problem is that tables contain prefix with "$" char i.e. "dbo.prefix$table_name". The SELECT QUERY below works with tables without "$", but if table contains "$" i.e. ...

0
Q: Furlough system build as a plugin or just build it in the theme

BasFor my course I have to build a Furlough system in Wordpress. But I don't know if I should build this as a plug-in or should I build it in the theme files? Any thoughts on this? Thanks in advance

0
Q: centering a div even if the contents is wider than the screen

Zaphod BeeblebroxThis is similar to other questions asked, but with one extra issue and I can't find anyone with the same problem as me. I have an image which is 1400px wide and which I want to be centred in the middle of the page even if the user is looking through a browser with a 800px resolution. I can't us...

0
Q: PHP Date range array for the last 40 sundays

ismaelwIs there a way to put the last 40 sundays into an array with php? I don't get it right now.

0
Q: Using generic getters and setters with php

inControlThere's thousands of examples of php __get and __set out there, unfortunately nobody actually tells you how to use them. So my question is: how do I actually call the __get and __set method from within the class and when using an object. Example code: class User{ public $id, $usename, $passwor...

-1
Q: Learning Drupal form the start

user2815308I am beginner of drupal.Where I can find the documents and PDF files to learn drupal.is there any web sites available to learn drupal. I am beginner of drupal.Where I can find the documents and PDF files to learn drupal.is there any web sites available to learn drupal.

0
Q: Disable header overwriting of Zend Framework

BenjIs there a way to tell Zend that it shouldn't overwrite my set headers. I am using a external library which sets an own header, and Zend is always overwriting it.

0
Q: PHP Arrays from HTML Forms to UPDATE MySQL

user2052849I've got a page showing the contents of my DB in form inputboxes like this: <?php while($row = mysql_fetch_array($result)) { $namn = $row['namn']; $mandag = $row['mandag']; $tisdag = $row['tisdag']; $onsdag = $row['onsdag']; $torsdag = $row['torsdag']; $fredag = $row['fredag']; ?> <

0
Q: A foreach loop in a while loop

Lars KerffI'm trying to convert wordpress tags (and other input) to html classes. First I query the posts, set them in a while loop and in this while loop I convert the tags to usefull classes. I've got this right now: <?php while ($query->have_posts()) : $query->the_post(); $posttags = get_the_ta...

0
Q: Change LIMIT in MySQL without refreshing

ReplaySo basically what I want is when you click on a link, the $limit variable in my MySQL Query should be increased by 10 without refreshing the page. I know there are many similar questions, but I just couldn't work it out. index.php <?php $limit = 10; mysql_connect("localhost", "root", "...

 
00:00 - 13:0013:00 - 00:00

« first day (218 days earlier)      last day (92 days later) »