« first day (310 days earlier)   

12:01 AM
0
Q: How to validate for null condition using isset in POST

user3004356In my controller I'm trying to validate my radiobutton status. But, I'm not successful in this. Below is the code public function actionUpdate($id) { $model_al=new AuditLogin; //$model_apt=new Apartment; //$model=$this->loadModel($id); ...

-1
Q: Convert a column to rows.. complicated stuff for me.. just a beginner

user3114385This is my table in/out emp_id td_id status timestamp remarks 35 1 in 2013-12-19 10:15:09 late 35 2 out 2013-12-19 12:00:23 example 36 3 in 2013-12-19 10:15:09 36 4 out 2013-12-19 12:00:23 ex...

0
Q: PM SYSTEM - i can't open the specific message

petersimon93I'am new in the php language. Can somebody help me? I made an personal message system, with one mysql tablet. the mysql is working. my inbox is working, i can see my messages. but when i click to one message, always the first message contest come on. how can i open the specific message? These a...

0
Q: How to programmatically check if running on HHVM?

marcioAlmadaI need to run a given package on both HHVM runtime and traditional PHP runtime. My question: is there a way to check programmatically if current environment is HHVM? Something like this: <?php if(running_on_hhvm()) { // do hhvm compatible routine } else { // do normal routine }

0
Q: Status aint right PHP

dipshitOk so first of all, Hello Michael. I yet can't change my username, so just love me since it's christmas. Second of all, the status shows the wrong status. It keeps saying I'm offline, while I'm clearly active within' the 1 test minute. What am I doing wrong? if(isset($_SESSION['user_id'])) { $s...

0
Q: Web scraping technology with support for Javascript

dorothyi am doing a web scraping app and am choosing between the libraries that support normal HTML scraping as well as support for client side technology such as javascript (not the code, but actually simulation user clicking) , ajax and others. I have search a bit, with Java, there is HTMLUnit, Perl t...

0
Q: Removing index.php with php without editing .htacces

user3070011I am trying to use my url to create a variable, to do so I am getting the directory as such: $dir = basename($_SERVER['REQUEST_URI'], "/index.php"); from my understanding this was supposed to remove the /index.php aspect but then i discovered it is just for removing the extension and thus fails. ...

0
Q: how to display table columns and rows from MySQL database in iframe

bright_wI am try to display the columns and rows of a particular table from MySQL in iframe so that whenever I click on each table only the columns and rows of that particular table will be displayed in the iframe. I am trying to avoid displaying the columns and row of all tables from the database at th...

0
Q: MySql Delete NOT IN - but compare entire rows

JoeThis should be relatively simple. I dug around the MySql docs and couldn't find relevant infos. The scenario is simple. I have a table with 3 columns. All are composite unique keys, in that, all keys together must be unique to be a valid row. How can I use DELETE NOT IN with this setup? I trie...

-1
Q: Sum up total amount of money in a colum

A.RI have three columns that are gathered from my database using php, they all involve money and I want it to add up each column and give the total amount of money(sum) of the single column, of which there are three I need it to do it for. Here is a screenshot of the columns.

0
Q: javascript not validating form: no error thrown by it

user3131961I tried to validate this form by using javascript but even if I don't enter any values the form will be submitted and the file will be created. I tried running it on normal html file still javascript is not validating the form. <!DOCTYPE html> <html> <head> <title>Home</title> <link href...

0
Q: UploadFormat and annotations

cocogguNow that the UploadFormat class is available, I have one question about it : Is the Upload format compatible with Restler annotations ? If yes : how to use it ? "@param file $file" ? If no : So I don't understand the meaning of this class. How to handle files if we can't receive them in the AP...

0
Q: How to save DIV content to MySql

user3055639How can i save the content of a DIV in MySql ? I have the scripts that connect the index.php with mydata_post.php where i call the data to be saved in MySql. Now the problem is where i try to save the data after getting displayed in a DIV i get empty content in MySql Table. The script works if...

0
Q: woocommerce - How do I get the most top level category of the current product category

GmanI have a Woocommerce product and I need to display on that page the Most top level category of a category assigned to the product - Main Product Category -- Sub Product Category --- Category Assigned to product I need to get the ID or name of "Main Product Category" so that I can display it in...

0
Q: PHP Instantiating a Class that Extends an Abstract Class

user2395608 So I am using an abstract class for the first time in PHP and am struggling to get it working. It is probably simple (as ever!). When I try to instantiate the class B, PHP throws this error Fatal error: Class 'B' not found in /var/www/test/class/B.class.php on line 12 Abstract Class A abstra...

-1
Q: Adding Form to SQL Database and Emailing

fwgunI am trying to make a form that not only adds that values to an SQL Database using PHP but also emails the same information when it is created, not sure exactly how to go about doing this... Looking for ideas on how to make it happen... I fields are... name, problem, start_time, reporter, time_s...

0
Q: Uploaded but not moved. Why? Where is the uploaded file?

user3135394Here is my php code trying to upload and move an image. I am running it on my laptop. The image seems to be loading (i get "exists and was uploaded successfully."). But the move_uploaded_file() is not moving the file, i cannot even find it. I have changed directory permissions ... without posi...

0
Q: How do i put dynamic values inside Highchart.js data?

mmrI am using codeigniter, I use below code to query dynamic values based on the selection in the dropdown box. $("#month").change(function(){ $.ajax({ type : 'post', data : 'month='+ $(this).val() + '&year...

0
Q: Broken Nested Table

surnameI have mysql hidden nested table. When the yellow arrow click, the nested table show/hide. The problem is my table row got broken. Just like the image above, the other table row had been broken. What is the problem with this? <?php echo'<table id="tfhover" cellspacing="0" class="t...

-2
Q: Free Email Reminder PHP Script

user3135461I search a PHP Script that Send automaticly Emails at special Dates, Email Reminder? Do you guys know a opensource free Script in PHP, i can't find anything? Thanks in advance

0
Q: php query inside a <script>

Aljiei have a project that i need a confirmation from the user first before the porgram executes fully. Here's the scenario: The user will pick a date from a datepicker and then the program will automatically fetch/ detect if that date already existing in the database. And if it's existing then it wi...

0
Q: SQLite for ubuntu 13.10

user3135455First of all I want to say: Yes I know that there's a SQLite3 exists ans it's "better" to use; Yes I know that I can type "sudo apt-get install php5-sqlite" (or smth) Yes I know all the truth about my english -.-'' sorry for mistakes. So... I am a new to ubuntu. I was installed php5, apache2,...

 
1:24 AM
0
Q: Getting rows inserted in the last x days with CodeIgniter

dabadabaI am trying to retrieve the rows from a table where the date is between the moment and x days ago. I have tried to use sql DATEADD but it doesn't work. I have also tried with php date, no success... This is my code: $this->db->select('row'); $this->db->from('table'); $this->db->where('date', ?)...

0
Q: Symfony2 Exception Thrown During Rendering

xanesis4everyone! I've been following this tutorial: tutorial.symblog.co.uk on Symfony2 for a while now... The only problem is that the tutorial is very old and includes many deprecated, and even removed functions that I have to fix myself. Anyways, I guess it "builds character". ;-) I recently came ac...

0
Q: Executing PHPUnit_Selenium

TransformBinaryI Installed PHPUnit_Selenium and Phpunit , I'm currently using Laravel. If i include Require Once, it cant be found , if i don't i get Class not found. I tried to locate Selenium2TestCase and it's found under /usr/share/PHPUnit/Extensions Question 1 How do i direct the code to The file i need....

0
Q: How do I use a Codeigniter method within my own function?

Colin HuI use Codeigniter as my PHP framework, and in one of my controllers, I want to include a Codeingiter method within a function I created myself. The CodeIgniter method that I want to include in my function is "$this->db->escape($var);", which is an escaping query for Codeigniter. My PHP code is th...

 
1:42 AM
0
Q: How to linkify a hash-tagged word in a text (e.g. This is a #RandomWord) using TWIG?

lokiloqHere is what my HTML code looks like: <div class="post-content"> <p> {{post.content}} </p> </div> I there any filter I can use to linkify any hash-tagged word in the post content using TWIG? Or I have to use JavaScript to that job?

0
Q: Javascript json_encode > JSON.parse() array

tcxbalageI the following PHP code: echo "<img src='../images/edit.png' onclick='showEditDiv(" . json_encode($row) . ");'>"; Here is the HTML result: <img src='../images/edit.png' onclick='showEditDiv({"ID":"2","NAME":"John Smith","EMAIL":"johnsmith@domain.com"});'> And here is the Javascript code: ...

 
1:54 AM
0
Q: Json decode with array

MiChAeLoKGBIm not sure how to exactly get values from JSON output. This is print of JSON return I get (1, 2 ......... 89): stdClass Object ( [status] => ok [count] => 1 [data] => stdClass Object ( [503066565] => Array ( [0] => stdClass Ob...

0
Q: Get image from database and append into slider of bxslider

SoklyI am using jquery.bxslider.js for sliding my images. In my html code, I use like this: <ul class="slide"> <li> <a href="#"> <img src="../img/pic1.png" id="1" /> </a> </li> <li> <a href="#"> <img src="../img/fish.png" id="2" /> </a> </li> <li> <a href="#"> <img src="../...

0
Q: Is there a way for "view:source" on Safari?

user2488971Deas Stackoverflow Community, my question is simple. To show a Source Code in a Browser (FireFox) you just need to typ view:source before the URL. Is there a way to do the same just with an URL on a safari browser? And how? Thanks :)

0
Q: pdo update statement - save and update value in same statement?

user756659I am storing the users last and current IP address / datetime in the database. On successful login of a user I am running these two prepared statements. Out of curiosity is there any way to perform this in one statement? Would something like lastIP = currIP, currIP = ?, dtLastLogin = dtCurrLog...

0
Q: how to handle this: Get all rows with the same email address, operate on ids, email them once

user1824371Honestly, I do not even know how to ask this question since I also do not have any plan on where to start. Say I have the following in mySQL: id | URL | email | ---|------------|---------| 1 | google.com | a@a.com | 2 | bing.com | a@a.com | 3 | yahoo.com | b@a.com | My original...

-1
Q: Read excel file and store it to mysql database

bzbzI have the following code which is giving an error on execution. <?php require_once 'Excel/reader.php'; $data = new Spreadsheet_Excel_Reader(); $data->setOutputEncoding('CP1251'); $data->read('exceltestsheet.xlsx'); $conn = mysql_connect("localhost","root",""); mysql_select_db("exceltest",$conn...

0
Q: Add & remove active class from a navigation link via php?

Davie SteadyI have a php-navigation in index.php and include in this index.php different contents depending on the clicked navigation-tag. i have now the problem that i want to add/remove "class="active"" when a page is included. maybe there is a non-javascript-solution, but also with javascript, i can't man...

-1
Q: REST API Convert cURL command to PHP

user3135525This is the command line. This is from the documentation of some API I am using. curl -i -X POST -u user:password -H 'Accept: application/xml' -H 'Content-Type: application/xml' https://myname.mydomain.com/submit.xml -d @data.xml and here is my php version for the command above: array( CURLOP...

0
Q: How can i add the remarks column with comma separated? select query mess

user3117337I have 3 pairs of in/out employee records existing code.. but from the my table I need the remarks on each and every input be seen in one cell with comma separated. Please see my fiddle.. http://sqlfiddle.com/#!2/afe72/1/0 My table will be like this.. create table overallrec( td_id int auto...

-2
Q: ORDER BY RAND in Javascript?

user2488971Can someone write a short js example? I want a loop, which uses always a new value out of a row every time when it goes from the top to the bottom. Thanks

0
Q: DateTime class returning incorrect timezone_type and timezone?

AntilogicalI'm building a project which is creating countdowns to various events, and I'm trying to keep it as timezone-agnostic as possible by just using UTC globally to avoid errors and issues, almost exactly similar to the one I'm getting now. The basic process is this: Input Date/Time into database (s...

 
2:42 AM
0
Q: mysql_query says error in sql syntax but the same query works fine in mysql client

user3135539When I try to send the following query: SET @attempts=0; SELECT mt1.TimeStamp, mt1.ReadAttempts - @attempts AS delta, @attempts := mt1.ReadAttempts ReadAttempts FROM OneWireStats mt1 WHERE SensorIndex=1 ORDER BY mt1.TimeStamp; to fetch delta values between rows in table OneWireStats I receive ...

0
Q: Use Command Line or PHP to download a Remote File that is behind a link

MaazSo i'm wondering if this is possible... Going to this link http://www.mp4upload.com/7xj00e8na3a6 has a button for download once clicked it will generate a download link for your IP for 1 hour. I can't click the download button on my browser and then copy the link into command line using wget sin...

-1
Q: Wordpress send notification email upon new post

Carlos RiosSo I've created a plugin that creates a new post from the front-end every time a user submits a form, now I'm trying to send an email to the admin when the post has been created. I'm doing this inside of a Class, so I'm sure thats where I'm having the problems. For some reason it isn't doing anyt...

0
Q: Overriding <base> URL in PHP

ajdeguzmanI have a base URL which placed in my header for all the pages. But I have a page which must be link to just '#' for smooth scrolling to an anchor. But the URL concatenates the base URL. Instead of just the '#' for the href attribute, it shows http://localhost/Sample/# Here is the code for the ba...

0
Q: What is the opposite of success function in javascript?

user3053234 accounts.where({ id : userId }).read({ success: function(results) { The code above there is a function for successful return I'm assuming but how do I do something if success was not returned?

0
Q: How to access a class method in browser or AJAX call

user3000457I am sorry if I am asking a simple question: I have a helper php file which is the following: class helper { public function testPrint(){ echo 'Hello'; } } I tried to access my testPrint funcytion in browser, but no success: My attempt on browser: http://localhost/test1/he...

 
3:01 AM
-1
Q: Add file attachment field in joomla contact form v3.1.5

user3135368Please Help me i am using joomla v 3 i am trying to add field in in contact form i have set all code in joomla files but attached files not receiving? please see code below. defined('_JEXEC') or die; /** * @package Joomla.Site * @subpackage com_contact */ class ContactControllerContac...

0
Q: PHP mail form problems

Jacob BullerI'm creating a simple mail form with checkboxes, a couple of input tabs, and a text input section. It uses PHP to retrieve the information then email it to a specific email. Right now I have it emailing to my own yahoo email just for testing. When I test the site on my hosting account jacobbuller...

0
Q: PHP - how to output a MySQL average store rating in a loop

Michael FalcigliaI have a table with ratings for every store in a directory. I want to display the average rating from each store on a business directory list page. I have the directory business listing page finished without the average rating. I believe I have figured out how to create an average rating, but I ...

 
3:24 AM
0
Q: PDO fetching information from database

user3117992I've tried everything, the data that I am echoing out display directly after I hit submit, but once i refresh the page, it is gone. How can I echo out the data that is already stored in my database correctly? Here is my current code! <h1>News Blog</h1> <form method="POST"> username: <input t...

0
Q: round float numbers but not interger ones in mysql

Alvaro Parrai have this data number 1 2 3 7.215115151215 2.5545158432 0 2 i would like it to be like this number 1 2 3 7.21 2.55 0 2 I have tried to use number format and round 2 but it always change things like this number 1.00 2.00 3.00 7.21 2.55 0 2 Help me please or give me ideas, i am workin...

0
Q: Laravel oAuth2 server get access token data

madziikoyMy code: $user = Auth::user(); $access_token = AuthorizationServer::performAccessTokenFlow(); var_dump($access_token); return Response::json(array( 'id' => $user->uid, 'first_name' => $user->first_name, 'last_name' => $user->l...

 
3:36 AM
0
Q: Get return value from ajax call inside a function

user3135626Below is the code that I am working on. As you can see, I created a variable called 'my_string', as a default, I want to call the get_result_data() function and store any return data on the variable 'my_string'. Then, once the user click the $('#button'), I want to display the stored data. But th...

0
Q: php fail url encoder

user2910974i have link http://localhost:8081/intranet/slipgaji/2013/1-2013/2013.05.1557.pdf i will mask url in address bar with put the code if ($file==$profile->profile['nip'].'.pdf') { $url_gaji = sprintf($path."/".$file); $search = array('1-', '2-', '3-', '4-', '5', '6', '7', '8', '9', '10', '11...

0
Q: Print raw mustache template from server side

vijiI've the mustache template in my server side which also contains a partial. Now, I want to access the template from client side. For this, the only idea I've got is just read the template file and print it, but I'm using partial here. So, I just want to print the complete template instead of rea...

0
Q: Google App Engine Won't Save Wordpress Theme Settings on Localhost or Production Server

CatalyxI'm running Apache and MySQL via XAMPP v1.8.2 to support a WordPress site for Google App Engine (GAE) local development and cloud deployment using GAE SDK v1.8.8. Changing settings or stylings of the theme, which uses AJAX, does not save on the local server or the production server. The theme's...

0
Q: codeigniter pagination links exceeded

billy croganHi i have this pagination in my website my problem is the links below exceeded to much like it goes to page 228, and there is no data in there anymore. here's my controller code below public function index(){ $this->data['title'] = 'Programs | Spring Rain Global Consultancy Inc'; $this->...

0
Q: how to get base url in smarty codeigniter

Syed Haider Hassani am trying to use smarty with codeigniter, the thing is i worked with codeigniter but never did worked with smarty, but trying learning it.. :) right now a little issue is that in codeigniter when i need baseurl i use this <?php echo base_url('styles/bootstrap/css/bootstrap-theme.min.css'); ?>...

0
Q: Compare Two Tables, Get Value From Table and Multiply It - PHP MySQL

user3099626I'm newbie and need help about PHP MySQL. I have two tables: Table1: Home        | Work    | Sport    |Buy YES|  BUY NO_____________________ Television | Laptop  | shoes   |             | DVD          |desk      |ball        |             | Table2: Items         ...

0
Q: PHP Two Tailed Z-Score to P (Probability) Calculator

MoeI've been searching all over and cannot find anything about this. I'm looking for a function that will convert a Z-Score to a Probability using a two tailed table, preferably in PHP. (Like this one: http://www.sjsu.edu/faculty/gerstman/StatPrimer/z-two-tails.pdf) My only other option is to make...

0
Q: Generate Booking number in codeigniter

atomaprchyaI have date format like 2012-10-12, I want to generate the booking number in the format like HK121012 with auto increment number like 001, 002 then 009, 010, 011..... 099, 100, 101 Here, in HK121012 means HK is the region, 12 is the year 10 is month and 12 is day. How to generate the sequence li...

0
Q: Remove unnecessary comma separator.. 1 comma per word

user3117337This is my remarks column remarks ,jsedfedf,, , late,, , example example2, ,, example4 Im just new to mysql.. how could I remove unnecessary comma?.. and make it like this? remarks jsedfedf late, example example2, example4

0
Q: How to get data from a different database and save it to another database

CecilI don't know if this problem of mine is possible. Is it? I have a library system. I add and edit new books in the Catalog Database. In other words, the Catalog Database is for adding/editing books only. I have another Database (not table) for Borrowing Books. I want to store these books, which ar...

 
4:24 AM
0
Q: Insert pagination code in my search engine?

ERoquesHow can I insert the page number 1, 2 and the next button if I have 2 pages of results? I don't know how to make the pagination code work well for my search engine. I just need a normal pagination code. How can I do this? I really a newbie so I need your guidance and help. This is my current c...

-1
Q: Add a <p></p> tag to html body in a php while loop?

user2996892NEVERMIND! Figured this out! I can't delete the question. I am trying add <p>*something from database*</p> to the end of the HTML body every time I run through a while loop in a block of php code. This is the php code I am using: <?php $query="SELECT * FROM though...

0
Q: Session remains intact even after closing browser

Abdullah FahimThe problem I am facing is my session remains intact if I close the browser without logging out, if I set to restore pages (option "Continue where I left off" in Chrome). I have seen some mainly concern Firefox (link 1, link 2, link 3, but I am facing same in Chrome as well. So basically here wh...

0
Q: undefindex index, mysqli_query, no result spit back

user3135691I'm following a tutorial to build a calendar. Originally, it was build with mysql, I rewrote it a little to mysqli to follow php recommendations. I'm stuck at the very final step, I'm trying to get the description for an event/day out of a database. I'm getting no/emtpy results. My table for th...

-1
Q: Twitter API s using php

Abhijath BenhurHow is twitter API's called using php?If input is to provide a username can PHP be used to retrieve the user picture and the re tweeters of his statuses,along with their user pictures.

0
Q: How to blocking url redirect file on folder

user2910974ia have file to open in web browser in folder and sub folder 'slipgaji', i can show all my file on latest sub folder just put link below : http://localhost:8081/intranet/slipgaji/2013/1-2013/2013.05.1556.pdf or http://localhost:8081/intranet/slipgaji/2013/1-2013/2013.05.1557.pdf or http://lo...

0
Q: How to get php session value into mysql trigger

CaribeSoftHow can I get a field value from php session (userid) to use it in mysql triggers My Trigger : BEGIN IF NEW.nombre <> OLD.nombre THEN INSERT INTO socios_history (socio_id,tabla,campo, old_value, new_value,lstuser,updated) VALUES (old.socio_id,'usuarios','nombre',old.nombre,new.nombre,...

0
Q: Set condition in a loop if the array key value already exist?

user2901740Im trying to displaying letters of the word in a table with random letters. just like in a wordsearch. But the problem is the letters overlapsed. How can you make sure that the letters will not overlapsed each other? hmm.. anyidea? I was thinking of if the array key value already exist I will res...

0
Q: Not able to upload and save image in PHP

KrishI'm trying to upload a image in PHP but the image is not getting saved in the directory on the server. However I'm able to save the path of the image in the database. Please help. Here is the piece of code. I'm not getting any error in the web page. <?php error_reporting(E_ALL);ini_set('display...

0
Q: codeigniter and tank auth error

user3113124Hi I am having trouble with my log in for my user menu. I am trying to get it so on the right side. When user is_logged_in can see there user name and the log out and on the left side still display the home, forum, and contact. But for some reason when user is logged in still displays the registe...

0
Q: Output By Month With Only One Header

user3135730I've been trying to take this from my current output to a 'by month' output. I'm about to pull all of my hair out on this one. What I'm trying to do is group the games in months. So January, feb march ect would have each games underneath it. Right now I have to do this for every team and create a...

0
Q: Drag & copy in Yii framwork

Balapls help to do this concept. I need to drag Fields from listBox & copy to CTabView in Yii framework. I displayed listBox that contains database values, in-which the values get draggable & copy to one tab (i displayed tab using CTabView). Is this possible using Yii framework or other tools?

0
Q: How to insert multiple data of same name from single form in multiple row of same column of table

user3135189I have <form action="entry.php" method="post" > <table> <tr> <td> <input type="text" name="searchid[]" id="searchid" placeholder="Data 1" ><br /> <input type="text" name="searchid[]" id="searchid" placeholder="Data 2" ><br /> <input type="text" name="searchid[]" id="s...

0
Q: In Graph databse how do i assign more than one properties to a relationships between two nodes

waseem ahmadI am working on some travelling social network in php using neo4j graph database . i need to add some properties to paths between two nodes. Each node represents a city and relationship between nodes is representing road i have given that path type "road".now what i need is to assign that relatio...

0
Q: PHP Windows CLI and a "realtime statistics gui"

CycloneI'm attempting to make a sort of realtime display for a project of mine which runs as a PHP CLI application, and I'm having some difficulty clearing the console and making that happen. Essentially, my end goal is something like this: -------------------------------------------------------------...

0
Q: PHP Page: Dropdown always selects the first value

M. CoutinhoI have multiple dropdown lists on my PHP page and all are created like this: <?php //Select values from MySQL Database $query = "SELECT name FROM Player"; $result = mysql_query($query); //Show DropDownList echo '<select name="players" onclick="sortlist(this)">'; while($row = mysql_fetch_assoc( ...

0
Q: returning soap xml response for a soap server php

Shikhar SubediI am trying to create a soap service in php using native php soap server. I have already prepared the wsdl file. There are basically four methods that can be called with the soap service. The input soap request for one of the request ShowRemittanceDetail is shown below. <soap-env:body> <ns1...

1
Q: PHP function name starting with ONE underscore

LocoNeko73I am writing a huge PHP class and starting to realise that I lack some knowledge of a few PHP coding conventions that could help me organise a bit. My question is about using ONE underscore before a PHP function's name (not two, I know what two underscores do) : Is it actually a PHP convention...

0
Q: how to get mysql num rows for users online?

user2281190i am having problem getting the number of users who are online.what i am doing is that i am first updating last activity of the user everytime he logs in or refreshes the page. after that i use the following code to see the logged in users. <? $early = time()-30; $res = mysql_query("SELECT usern...

0
Q: Can someone find the error in my php code

BenDI have been looking for a mistake in my php and mysql for the past 5 hours. I have no clue what I have done wrong or if there is just a problem with my mamp. I think it may be a problem with my mamp. This is where I believe the problem would be taking place. But the problem is that now every page...

-1
Q: php glob() is not working on server but working in localhost

deepakwhen i am running this code on server its not working.but in localhost its works fine.count function is returns 0 on server but in localhost returns valid count $result = mysql_query($qry) or die ("Query failed"); // loop to create rows while ($friendList = mysql_fetch_array($result)) { $_...

0
Q: form validation for a text box to enter a number between 0-100 in codeigniter

user3135796$this->form_validation->set_rules('calls_abandoned', 'Calls abandoned', 'required|integer|greater_than_or_equal_to[0]|less_than[101]|decimal');

0
Q: mysql query for Export CSV file in php

user3030270i write simple Query in php for export data in CSV file but something is wrong with my Query of Syntex Error, can anyone tell me how to solve this? sorry for this liitle question, i m new in PHP. $CSVQuery= "SELECT * FROM table INTO OUTFILE '/tmp/orders.csv' FIELDS TERMINATED BY ',' ENCLOSED BY...

0
Q: I have them logged in, what can I do next?

AlanI have been working on creating an application for the last few months. I have managed to get the registration, account activation, login, logout. Everything works fine. Now the next step is to try to extract the row of data from this logged user and have it echo on the next page and give the ...

0
Q: How can I set url rule for a single controller in Yii?

HarikrishnanI'm using a url rule in my main.php.But it affects all controllers.How can I set a url rule for a particular controller only ? 'rules' => array( // custom rule array( 'class' => 'application.components.MyUrlRule', 'connec...

-7
Q: Which language has a better future scope in India. PHP, .Net, Java, Python or Ruby

Akash KumarI am confused as to which language will be a better choice in India. The scenario in India is a lot different from other countries. People are underpaid. There are loads of jobs for PHP and .Net for a fresher but for a salary of as low as 6k/mo. I was wondering which is a better choice in terms ...

0
Q: Reflection class is not found but no exception is thrown

J.KoskelaOkay, situation is quite simple: I have class (named Edam) from where I want create new reflection instances, like this: public static function getClass($className) { try { $refl = new \ReflectionClass("classes\\$className"); return $refl->newInstance(); } catch (\Excepti...

0
Q: structuring the array in required way while using jqplots

user3058736i am using jqplot to show data in a graph i am able to fetch data in the array but i am having a small problem to plot data the format is [["Pens",10],["Pencils",30],["Erasers",40],["Charts",3]] i am getting data in the following format [["Pens"],["10"],["Pencils"],["30"],["Erasers"],["40"]...

0
Q: PHP Code don't show anything after the data input

user3124687I´ve tried a lot of times running the following Code, but, even working well, always leaves the same error ( error message appears at the same time I open the PHP Code ) = " Notice: Undefined index: enviar in C:\wamp\www\290.php on line 2 " ( The only thing that I've tried was " try t...

0
Q: validation error '&' did not start a character reference. (& probably should have been escaped as &amp;.) : PHP

rajmathanAm using php file as my source. While validating in w3c validator it is showing like "& probably should have been escaped as &amp ;" . I have gone through some portals and found that needs to change & to &amp ; In my site & is coming more than 100+ times. Please help me out of this. Thanks in a...

0
Q: FB change the application cover photo while redirecting from web page to FB

Sam Hanson Here i want to change this unknown image(first icon) with my application photo. I uploaded my custom image in application >> edit settings >> Page Tab section (Page Tab Image). But it is not applied in the fb connect screen. What i am doing wrong. Please help me. Thanks

-1
Q: i am trying to call a webservice form server, so it will send otp to mobile but i am getting error

user3048023 The system is unable to find the requested action "SendOTP4AnyPhNo". This is the service i am calling "SendOTP4AnyPhNo&quot" This is web service i made.. /** * Send OTP * @param [string] $token * @param [string] $mobile * @param [string] $shared * @return [bool] */ protected func...

0
Q: PHP create a text file - difficulty in creating a text file

tech-17busy studying php with a book called "php and mysql web development 4th edition". i have trouble with the following code. i am trying to create a text file. i'm testing all code on a live server i get the following errors: Warning: fopen(/home/truevvky/public_html/../orders/orders.txt): failed ...

0
Q: How to send Batch messaging in yii using Clickatell SMS gateway

user3093894Am using Yii Framework. single and group sent SMS now working fine. but now I want to sent Batch messaging using Clickatell. This is single SMS API's link Yii::app()->sms->send(array('to'=>'407xxxxxxxx', 'message'=>'Hello world!')); how to send Batch messaging? pls help me.-:)

0
Q: Find out number of array occurrences in php

Nukerthis answer maybe on google but i couldnt find it because i dont know the exact keywords for this. The situation is as follows. I have an array called $value that contains 2 types of arrays: [12] => Array ( [id] => phone [class] => phone [config] => Array ( [disabled] => 1 [value] => 1)) [46] =>...

-5
Q: PHP VS .NET for a desktop application

user957309I have requirement of developing a mini-ERP application. At present , it would be a desktop application while in future, it is planned to be rolled out as a cloud-based application as well. I have two choices, either develop it in PHP or do it in dot net. Which one should I choose and why ?

0
Q: Trouble with Facebook Api login $user is not returning properly

JRizzlyWhen I run this code, and my cookies have been cleared and I am not logged into facebook. It directs me to facebook and I log in but when it brings me back to my page it is the same, where as it should be show me profile pic and so on... I seem to have narrowed down the problem of the return st...

0
Q: Find div that has no class and no id in PHP Simple HTML DOM Parser

ParsI am using PHP Simple HTML DOM Parser, It works well, but I have problem selecting divs that does not have any ID or Class. $html->find( 'div[!class]' ) will return all divs that has no class, but can have ID. I tried this one but didnt work. $html->find( 'div[!class][!id]' ) thanks in adv...

-2
Q: Converting this PHP code into javascript

Aldi UnantoI have this PHP code to get the result of reduction between 2 dates. (Year only) $str = ''; $date = '2012-12-26'; $now = new DateTime(now()); $ref = new DateTime($date); $diff = $now->diff($ref); $date1 = strtotime(now()); //now() is my function which return date today. $date2 = strtotime($da...

-1
Q: Automatic mysql table creation

MIEHow to make a php script (that uses mysql table) generate the table if it doesn't exist? If this is the case the script won't need manual mysql table creation (right?).

0
Q: Requiring only an email or phone number to complete form

user3135868With a contact form I have, I am trying to only require an email OR a phone number to be entered to validate a form. I saw a similar post here Php Contact Form - Optional Fields (trim), however it isn't applicable code-wise to the ajax form I'm working off of. Here is my code define( "RECIPIENT_...

 
6:44 AM
0
Q: swiping the slides with dynamic data with dots at the bottom in jquery mobile

user3132041swiping the slides with dynamic data with dots at the bottom in jquery mobile. please someone help me to find a correct solution to my problem . i have to swipe so that the content along with background should move and show another one . here the content gets from database. there should be dots i...

-1
Q: Email not working in Codeigniter

atomaprchyaI am working on booking app in codeigniter. I am stuck in email sending from localhost. I am using gmail smtp for sending email. I am using email/booking_email.php view file as email template. But, When I run website page that contains email sending script in localhost, it keeps loading but email...

0
Q: Who's timezone do I set - user's or mine?

Mohammed ZameerI'm developing web app in codeigniter which has a heavy usage of date and time. What i need to know is who's timezone we need to set (i use configuration autoload to do it)? Mine or each user needs to set theirs?...

0
Q: Processing form generated with CHtml

user2982989Since I don't want to (can't) use model in generation of a form and therefore since I can't take advantages of using CForm, CActiveForm or Form Builder, I wrote a simple form with using CHtml: echo(CHtml::beginForm()); echo(CHtml::label('Name', 'name')); echo(CHtml::textField('name', 'test')); ...

0
Q: Ajax just opens PHP file

VaMooseI have a form I am trying to submit via ajax from PHPAcademy's tutorial found here Basically the form needs to submit via ajax, simple enough. But when I try do that, it just opens the PHP file in the browser. PLEASE HELP! here is the ajax code: $('form.login_settings').submit(function(){ var...

0
Q: How to hide directory name from URL using .htaccess

user1491022Here is my site url structure as follows: http://www.sitename.com/new/about-us . What I really want to do now is hide the directory name 'new' from the above url, but the admin url should remain unchanged. The admin url would be like : http://www.sitename.com/new/admin . My previous .htacc...

0
Q: How to add tinyMCE Editor to custom field in woocommerce product add page

BhoomiI am using woo-commerce for my application. Now on the page where i m adding new products I want to add tinyMCE Editor for custom field. function admin_add_wysiwyg_custom_field_textarea() { ?> <script type="text/javascript">/* <![CDATA[ */ jQuery(function($){...

0
Q: php mail function error on windows hosting

user3135973Mail function now not working my server. i cannot find out the solution for that. i am getting bellow this error when i submitting the contact form. ""Warning: mail() [function.mail]: SMTP server response: 550 Sender is not allowed. in E:\HostingSpace\abayamtranslations.com\httpdocs\contact-form...

0
Q: Want to validate form in jquery and ajax using framework

jassiI am trying to develop a HTML5 form, and want to validate with jQuery / AJAX. <script> $('#editable-sample a.edit').live('click', function (e) { e.preventDefault(); }); </script>

0
Q: To round a value to one decimal place in codeigniter

user3135796$E15 = $objWorksheet->getCell('E15')->getCalculatedValue(); $asa_impact = round(($E15*100),1); when I use the above code I get answer for ex:-6.6 $E16 = $objWorksheet->getCell('E16')->getCalculatedValue(); $abandon_impact = round(($E16*100),1); But when I use the above code I get the answe...

0
Q: how to change the contents of 2nd select box based on value of first select box. no jquery but only javascript

user3135972 how to change the contents of 2nd select box based on value of first select box. no jquery but only javascript enable second seleect box based on various inputs from 1st select box(div2) only javascript no jquery no inner html if switch used. <script> //javascript function showHide(e...

-3
Q: Need a world wide tide API

user2801426Is there a world wide tide api available. I need to know the timings for high tide and low tide worldwide. I have had a tough time searching around but no results :( Or is there any alternate way to calculate the tides across the globe through some algorithm or something in php or javascript. T...

-1
Q: my ajax file is not working in internet explore8.what should i do now?

user3099171I have a HTML form. Here,I put the state and district select box. The data is stored in MySQL .Now my problem is when I select the state and then show the district details. These are working fine in FireFox and Chrome not working in IE. Below is my AJX code: function getCity(stateId,divId){ $.p...

-4
Q: Can we sell wordpress theme in themeforest.com developed by artisteer or any software

user3136008Hi I want to develop wordpress theme by softwares like artisteer, wp generator and etc etc. So I just want to know that, theme i develop with the help of softwares can sell online themeforest.com etc ???????? or should i code myself to develop wordpress theme to sell online like this should i try...

0
Q: How to get image of graph from highchart in web page only?

heenaI am currently using HighChart for my project. It's working fine, but i want that chart as output in the "image format". Currently it is giving as in "div" & "svg" tag. I want user can able to save that in image format by right clicking -> "save as image". I have do search so many for this thi...

0
Q: getting memory allocation error in codeigniter HMVC

user3128717Description: I created simple login page with session and mysql database using PHP,MySQL Database,CodeIgniter(HMVC) and XAMPP Server in local system. Problem: I am getting following error: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 65488 bytes) in C:\xampp\...

-3
Q: Website is not opening?

Debakant MohantyI have a website http://financialjapan.jp/ developed using wordpress. My problem is that some times the site is not opening. Some times it throws the "internal server error". But contacting upon the server team they says the error is "Premature end of script headers" Can anyone here pleas...

0
Q: Stripe Webhooks Not Working

SaswatI have implemented a stripe test gateway in an application... The integration page is using the jquery mode for sending data. Its built in the MVC structure using Codeigniter... Now, here my controller: <?php class stripe_connect extends CI_Controller{ public function __construct() { ...

0
Q: How to get date from week number & day number and year?

VineetAs question is self explanatory? Can anyone please help me to get the date in php: For eg: week number = 52 day number = 4 (of week 52) year = 2013 So date should be 26-12-2013 Thanks in advance for helper :)

0
Q: Display specific value from PHP foreach loop

sHAms uL aRiFeEnI have a simple foreach loop in PHP. I want to get specific value from that loop. I can get the 1st value with the below code but is it possible to get only 2nd or 3rd value from the same loop. My code to get first value is below, $i = 0; $colors = array("red","green","blue","yellow"); foreach ...

0
Q: Retreive Data From 3 Tables in YII Framework

if412010i have 3 tables on my database accounts(id) authitem(account_id,itemname) members(id,account_id) how can i retreive date from these tables ?, but i also want to make condition like "where authitem.itemname not like 'staff'" so there will a resultset that contain all data except the account wit...

0
Q: remove Default Header:"CakePHP: the rapid..." from my "index.ctp"

cbpatelFolloeing header is added to my index.ctp in CAKEPHP 2.XXX .... How can i remove it ? here you go: <div id="header"> <h1><a href="http://cakephp.org">CakePHP: the rapid development php framework</a></h1> </div> here is my index.ctp file <h1>Blog posts</h1> <p><?php echo $...

0
Q: Run codeigniter application on LAN

SermaI have developed a web application in codeigniter. My server is XAMPP. I have my application in server so i am running application in server browser with the url of localhost/app_name. My Question is how to run my application in server client machine in with IP address do i have to do any setup ...

0
Q: Uncaught Exception error

Yamaha32088I am getting the following error message: Fatal error: Uncaught exception 'Exception' with message 'Controller' in /var/www/PHP/newNess/application/models/front.php:49 Stack trace: #0 /var/www/PHP/newNess/index.php(11): FrontController->route() #1 {main} thrown in /var/www/PHP/newNess/applicatio...

0
Q: Javascript validation not working if i have more than one rows

IndianHere i'm trying to update the status through combo box. Javascript function statusvalidate() { if(document.status.voucherstatus.value == "empty") { alert("Voucher status field should not be empty."); document.status.voucherstatus.focus(); return false; } ...

0
Q: Script timeout how to fix?

user3125898This php script hashes the values in a text file and uploads them directly to the database: <?php $dict = $_POST["dict"]; if (!isset($_POST['submit'])){ echo "<form method=\"post\" action=\"\">"; echo "Wordlist: <input type=\"text\" name=\"dict\"><br>"; echo "<input type=\"submit\" value=\"GET D...

0
Q: funtion return content as string from a require

Cindy93Is there a way I can return the require as a string.? the view_users contains an html and php code and it is likely being parse then I want to return the parse version of it as a string. Class Users class Users{ public function viewUsers(){ $userData; require ...

0
Q: Best practice for storing files

DanI am building an application which need to handle stored files uploaded by its users (mostly images and pdf files). sort of an archive app. in order to store the files in most efficent way, i am looking some best practices guidelines in terms of storing files on server. I've tried to research th...

0
Q: free hosting of a website created in php

Niharika SrivastavaI have created a simple website using php, html, css, javascript and mysql. I can easily access it on my localhost. But I want to host it on internet. I have seen tutorial on you tube that how to host a website for free on lockernerd.co.uk. But someone told me that it has limitation on php acces...

0
Q: How to find the folder from which a PHP command line script was launched?

LaurentLet's say I have the following folder structure on my hard-drive: /some/dir/ . scripts/ myfile.php Then from '/some/dir/', I run the following command: /some/dir/$ php scripts/myfile.php Then, in PHP, how can I find the folder from which the command was launched (i.e. '/some...

0
Q: benefit of using the expression like this rather than using normal expression

Anand kumarwhat is the difference between these two expressions if(false == $flag) if($flag == false) what is the benefit of this expression rather than normal initiation like this :

0
Q: PDO foreach isn't displaying data being fetched

user3117992So here I have a blog system. My problem is that when I try to pull out data from the database, it is not displaying. Here is my current code, thanks! index.php <h1>News Blog</h1> <form action="blog.php" method="POST"> username: <input type="name" name="name" placeholder="name"><br /> <...

0
Q: PHP - Application with multiple databases

Kamran AhmedI am currently working on a large application that will be used by many people each having a large amount of data. I thought to manage these multiple users through a single database but I am asked to create a separate database for each new user that is registered. Now what I am wondering is : is ...

-1
Q: [Doctrine\Common\Annotations\AnnotationException]

user3109712Here is my entity class. <?php // src/Acme/WebsiteBundle/Entity/W_user.php namespace Acme\WebsiteBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity * @ORM\Table(name="w_user") */ class W_user { /** * @ORM\Column(type="string") * @ORM\firstname * @ORM\Gen...

0
Q: Uncaught ReferenceError: ga is not defined

Simbad K MohdI got an error while trying to implement google analytics using ganalytics module in prestashop "Uncaught ReferenceError: ga is not defined" Can Any one help me with this.plz

0
Q: PHP redirect to previous page pop-up form

ronI saw here alot of Q&A about redirection but none that describes my question --> inside index.php i have pop-up login form. The server-side validation is done on a different file, login_validation.php. Now say validation failed - I want to return to the pop-up login form in the previous page, wi...

0
Q: Terms & conditions with codeigniter

BarryIm using Codeigniter to create a login system. Im new to CI. How can I block the direct access to signup. I want to make sure anonymous have to accept the terms before go up to signup view. view controller <?php $attr_form = array('class' => 'form-horizontal'); echo form_open('login/accept', ...

0
Q: PHP Using heartbeat to keep track of online friends, bad practice?

MathiasI'm thinking about implementing a feature that shows currently online friends on my website. Before doing so, i wish to be absolutely sure, that it wont affect my users with remarkable worse load times. Because of that, i would like to ask you brainiacs, what the best practice of keeping track o...

0
Q: Display list of images in symfony2 twig

hizbul25I have already uploaded several images in the directory BundleVoteBundle/web/uploads/images/nominee/ Image name is unique. Now my question is how can i display that images in twig using for loop.

0
Q: translit autocomplete field of wp plugin

user3004919I need to translit input data rus->lat. I Have this class. class Sabai_Addon_Taxonomy_Controller_Autocomplete extends Sabai_Controller { protected function _doExecute(Sabai_Context $context) { if (!$context->getRequest()->isAjax()) { $context->setBadRequestError(...

0
Q: How to use hebrew in HTML2PDF lib php?

user2498233There are somebody who succeed to generate "HTML with hebrew text to pdf" with this library? I got ???? instead of hebrew fonts Didn't found any solution in web Is there any solution for this issue?

0
Q: Cant include .js file in my php?

henry4343I use <a href=Common/php/VideoPlayer.php> to jump to the other php file and in that php I want to include a .js file if I use this <script src="Common/scripts/video.js"></script> it will fail to load But if I use this, it will load <script src="http://localhost/website/Common/scripts/jquery.js"

0
Q: schedule a cron job with no traffic and no server access

user21005I would like to know if its possible to write a code in php similar to a cron script to run at a particular time when there is no traffic on site, that means i want the code to run without loading the site. Also I do not want to create a cron job on the server.

0
Q: I am trying to create malayalam pdfs using FPDF. font using meera.ttf It is working but is not working

deeps I am trying to create malayalam pdfs using FPDF. font using meera.ttf It is working but is not working correctly. result is like this ഇഗലീഷ് i want the result ഇംഗ്ലീഷ് anybody help me codes*** AddPage(); // Add a Unicode font (uses UTF-8) $pdf->AddFont('meera','','me...

0
Q: how to compare two field with same value with different effect in one table in mysql?

Scientisti need to compare two fields value with one textbox value. i have one table called CITY. name and zip is two fields are from this table. Now my problem is that i want to compare with zip as well as city name but its comparing only with city name. My query is: SELECT id,CONCAT(name, ' - '...

0
Q: The if...else function don't work

user3136113It echo "login not successful;}?>" with or without the userid and pwd being null and also when login with id:johntan, password niceday. It was suppose to be echo "login not successful" when userid and password is empty and also redirect it to another page when login with id:johntan, password nice...

0
Q: front-page.php not working properly in wordpress

user3136105I am new to web development and not really sure how to fix this issue: I am running into an issue for a site in wordpress and added following lines in the header.php: <link rel="stylesheet" type="text/css" href="includes/marquee.css" /> <script type="text/javascript" src="/includes/jquery-1.6....

0
Q: Paypal Payment Data Transfer(PDT) Error 4002

user3136109I'm working on integrating my website with paypal and getting it to work in sandbox mode. I am working in Codeigniter (PHP). I have gotten IPN notifications working perfectly but can't seem to figure out where I'm going wrong with PDT(need this to show a proper confirmation page and return). I ha...

0
Q: Android/PHP/MYSQL pull data from the web

DunkeyHello I want to pull something from the web. This is basically what I want to achieve: I'm going to select records from the web server's database where a certain field is equal to a record that is stored on my local db which is sqlite. This is the SQL: SELECT field1, field2 FROM table WHE...

0
Q: How to avoid duplication during the matching process?

user3136084How do we match the students with the company by looking at the student's choice of jobscope keeping in mind the no of vacancy available and to avoid duplication? For example, if the student chose IT as their preferred jobscope and the company's jobscope is IT, how do we come up with the queries...

0
Q: Take number input from browser

Pawan MudeI want to take number input from user by clicking display mentioned below ( along with ability to enter numbers using keyboard). Can you please suggest, If there is any good library for same?

0
Q: AngularJS, Apache and URL Rewriting

uBlankTextRecently i started to study AngularJS, Until now my apache server was configured with Options -Indexes But with AngularJS it's a bit annoying, So i decided to use Options +MultiViews, My question is should i use Options +MultiViews?, And if i do what risks i exposed?, Is it possible to work with ...

0
Q: Create Meeting Getting empty with data returned Not Showing any thing except sent Please suggest solution

user3136147 // sample GoToMeeting API call: create meeting // docs: https://developer.citrixonline.com/api/gotomeeting-rest-api/apimethod/create-meeting // display all errors ini_set ('display_errors', 1); error_reporting (E_ALL); // set valid access_token from OAuth flow $access_token = '578416695349a57...

0
Q: PHP “Could Not Access File:”

user3136152I am using this code in career.php pageWarning: file_get_contents(/home/eigeny6s/public_html/text.txt) [function.file-get-contents]: failed to open stream: No such file or directory in /home/eigeny6s/public_html/career.php also i had set permission to 0777 of public.html in ftp. Please do help me...

0
Q: Separating Multidimensional Array in Php

user3136128$types = array( array("student" => "Peter","email"=>"peter@email.com","mark" => 100,"level" => 'junior'), array("student" => "Peter","email"=>"peter@email.com","mark" => 100,"level" => 'senior'), array("student" => "Victoria","email"=>"victor@email.com","mark" => 300,"level" => 'junio...

0
Q: Decrement the advertisement impression count

Kiren SivaI want to avoid unwanted reduction of advertisement-impression-count for a particular session. If a user continuously refreshes the page, impression will get reduced. So I planned to detect the frequent refresh and shows a captcha form.If user enters the captcha correctly impression will get redu...

0
Q: To write to another text file by appending the data in codeigniter

user3135796$myFile = APPPATH.'/../log.txt'; $fh = fopen($myFile, 'a') or die("can't open file"); $stringData = "New Stuff 1\n"; fwrite($fh, $stringData); $stringData = "New Stuff 2\n"; fwrite($fh, $stringData); fclose($fh); Above shown is my code. output : New Stuff 1New Stuff 2 I need New Stuff 2 in...

0
Q: How to refresh a KendoUI chart with php javascript

mannouI want to refresh a line chart /dateaxis when I select another date

0
Q: Get first day or previous month at 00:00:00 using DateTime?

user1282407How do I get first day of previous month with start time? I am currently using this : $date = new DateTime('first day of last month'); It gives me the first day of last month but with respect to my current time. What I'm actually trying to do is get the start with respect to timezone too.. Fo...

 
8:49 AM
0
Q: sending data from non-secure to secure server

user3136190We have a site hosted in two different sever named A and B with different database. Here is my question when I update something on the certain page of sever A it must be automatically update on the other sever B even, is there any possibility to update in much manner ?

0
Q: Relational database not showing properly

user3098046Im working on an assignment and i created a database. The main database part works fine but the relational database isnt working. It doesnt seem to parse in the subject_id in <?php //2. Perform database query $query = "SELECT * "; $query .= "FROM pages "; $query .= "AND subject_id = {$subject[...

-1
Q: error- require(PPAutoloader.php) [function.require]: failed to open stream paypal

devjohnI want to pay money to users when they click on a button. So i have two options adaptive payments and masspay. However, when i used both's SDK based on php, it will give us an error equire(PPAutoloader.php) [function.require]: failed to open stream paypal. I know this was due to missing vendor fo...

0
Q: Call to a member function xxxx on a non-object

patriquesIm trying to get data from an ajax call by creating an json object and parsing the object in my javascript. The javascript function: function confirm_unavailable_table(form) { event.preventDefault(); var id = form.table_id.value; console.log(id); $.ajax({ type: "GET", cache: fa...

0
Q: query results from comma seperated values and query for each value to display

user3136074I have a table with ID, date, and a comma separated field. e.g. values like: id date options 1 2013-12-26 3006,3009,4010 2 2013-12-25 3002,3001,5090 3 2013-12-24 2909,1012,6089 4 2013-12-23 3001,4009,5008 After querying for a particular date e.g. 2013-12-26 ...

0
Q: How to change link of images in iis manager?

Sanjay Rathodi had create a magento website.when i had create this site locally localhost link is - http://localhost:3115 Now i had change this to http://www.localhost.com But now image and other links are goes to old url - http://localhost:3115/ How to tackle this issue. please help

0
Q: Clear form Text boxes on Button Click PHP

Droid BeginnerI would like to clear all the texts boxes on register button click. Below is my attempt. When I click on the button, the texts still remains. Please advise. Thanks <form action="#" class="signup" method="post" onsubmit="return signup();"> <input type="text" id="signup-email" class="text-input" ...

0
Q: Did you enable the php_fileinfo extension? php5.3.27

Sudhakar KMy symfony2 project works good on local system. using php 5.4.7. But not in production system while file upload. The error thrown in production server is : request.CRITICAL: Uncaught PHP Exception LogicException: "Unable to guess the mime type as no guessers are available (Did you enable the...

0
Q: php-cgi throws error of gateway time out

unknowni made a php program which downloads html pages using CURL it works correctly but when the program downloads many pages like say 1000 php-cgi throws this error: Gateway Time-out The gateway did not receive a timely response from the upstream server or application. And all of this doesn't invol...

0
Q: How to Implement "seen" in my website

SriIn my website which I am developing I want to implement stackoverflow's userprofile "seen" in visits section which says when we were last seen.This is giving me the date.But I want like "2h ago".How to do that? I tried this: <?php if(isset($_COOKIE['AboutVisit'])) { $last = $_COOKIE['Abo...

0
Q: To use partials, does it need to be done server side

and0rskIs there any way to make partial html without using a server side language. What I mean by this, lets say I make some reusable code (a header for example). I want the header to be on all of my webpages. To integrate it into a website, do I need to use something like php or can I somehow include i...

0
Q: array function in_array() not working as expected

RonakHere is my code, $start = strtotime("2013-12-01"); $end = strtotime("2013-12-31"); $saturday = strtotime("saturday", $start); $sunday = strtotime("sunday", $start); for ($index = 0; $saturday <= $end; $index++) { $array1[$index] = date("Y-m-d", $saturday)." "; ...

0
Q: Extending TCPDF class in Laravel

ladislav_pragueI'm starting with Laravel 4 and I'd like to use TCPDF to create documents with custom header and footer, like in this example. To do it, I need to extend the original class somewhere and then use extended class in service provider. I also use https://github.com/maxxscho/laravel-tcpdf as service p...

0
Q: Fatal error when calling PHP function error_message()

Amit Soni <?php if(isset($_POST['Submit'])) { /*here i am getting variable from form*/ $Post = $_POST["Post"]; $Fname = $_POST["Fname"]; $Lname = $_POST["Lname"]; $Sex = $_POST["Sex"]; $Marital = $_POST["Mstatus"]; $Father = $_POST["Father"]; $Mother = $_POST["Mother"]; $Husba...

0
Q: php/mysql how to select items by date in multiple date fileds?

e-energyPost fields: in, out my table: id, title, in1, out1, price1, in2, out2, price2, in3, out3, price3 I have 3 periods with 3 prices, is for hotel booking, I try to select item by date, but have 3 periods. If it hits the beginning date chosen in the first period and end in the 3rd period, how t...

0
Q: Display div list of products when click of 1 products category (and close other div)

user3031054I have a list of products category that I take from mysql dbb with unique id. When I click on one product category, I would like to display the list of products for this category and close the other (if one div was open before). But I don't know how can I do that. Html : <?php echo "<sc...

-1
Q: htaccess url rewriting sending all links to index.php

h_a86I have an htaccess url rewriting functionality on my web, but at the moment it is redirecting all links to index.php. Here is the file. RewriteRule ^demo/contactus\.html$ /demo/contactus.php [L] RewriteRule ^demo/stocklist\.html$ /demo/stocklist.php [L] #goto category 01 RewriteRule ^(.*)?01_(....

0
Q: IPv6 conversion by prefix in PHP

user3111525My input data, for example: $ip = '2001:db8::1428:54ab'; $prefix = 64; // 64 bits for addresses, 0 bits in addr ip first step, i use inet_pton($ip) to convert to bin representation then i need to erase last 64 bits, how can i do this ? when i echo inet_pton($ip) i get unreadable gibberish aft...

0
Q: MySQL UPDATE query - dealing with empty inputs

AtiehThis is my first UPDATE query, I have checked using jQuery for any empty fields. I want the user to input at least one field and then update the field(s). Doing a query with all the $_POST names might generate empty or undefined input fields in my database which doesn't work.. here is my query: ...

0
Q: what is the proper way of figuring out weather an sql statement returns true or false?

DcHerreraSo what i am trying to do is filter my apps that are in a folder through a permissions DB Table to decide weather or not the current user is able to access that app. In the beginning of this file i print the sessions id to make sure its set and it returns my id. but when i reach my if statement i...

0
Q: example.com is working but www.example.com it not

user3136257I have pointed my domain name to a site hosted elsewhere. But the problem is after the redirection the domain name is not working properly. Meaning, example.com is opening in browser, but www.example.com is showing error page not found.

-2
Q: How do i activate a for loop from php using javascript?

user3121403My codes are really long and complicated but the basic concept I do not know how to do is this. <?php for ($i = 0; $i < $numOfQuestion; $i++) { echo "Chocolate Rain"; } ?> This prints chocolate rain once. So how do i activate the loop again to print chocolate again if i clicked a button?...

0
Q: Php exec python script 'weakness'/downside

leonneoWhat are the bad points when you execute a python script with php? Also, how is it different from executing python through the cgi method I found an this interesting method from Running python script from php and i thought it will be great to just use the exec("python ../cgi-bin/form.py"); ...

-1
Q: how to validate drop box and text box alternativly?

user2881770I have four dropdown and four textbox and i want to add some validation on it. When button clicked it check for the dropdown and textbox from that dropdown or textbox must have a value.And From this two any one must have a value for post the page.

0
Q: Reset password lime survey

Sunartoi have a problem with lime survey. i forgot admin password. and I tried to update via mysql with md5 encryption. but not successfully login. update lime_users set password=md5('password'); i want to ask, how to reset password in limesurvey.

0
Q: Executing 1000s of mysql queries using php and maintaining queue to avoid data failure

Django AnonymousI have a PHP MYSQL application which I have tested with few hundreds of users, now recently I got the opportunity to run my application live with around 8 thousand users.... So its kind of quiz with time boundation, so I am expecting that if everyone hit finish quiz button at a same time, the se...

0
Q: query post with custom field value in Array

moabimy custom field vardump() for a post with a good value (12 ) is : Custom_field = array(1) { [0]=> int(12) } and my args for my query is : $artistArg = array( 'numberposts' => -1, 'category_name' => 'oeuvres', 'meta_query' => array( array( ...

0
Q: How to mask the URL with htaccess in zend framework 1.10

KiranHi I Have to create the URL something like "http://www.contract.com/user/profileview/index/MQ==" to "http://www.contract.com/profile/india/MQ==". We have tried the masking with codeignitor and succeeded. But coming to the Zend it is throwing the error "Invalid controller specified (india)". We h...

-4
Q: What is Model view controller ?

AmanSi want to know about MVC but doesn't found any understandable tutorial. what are the advantages if someone prefer MVC over the normal structure? please give a practical example. solve it without MVC with MVC so that it would explains me the practical use of MVC and i shall understand ad...

0
Q: Multiple Checkboxes array with checked and unchecked values

AlexSo i have this line of code that will repeat different times in a form. <input type="checkbox" name="checkbox[]" /> !checked <input type="checkbox" name="checkbox[]" /> !unchecked <input type="checkbox" name="checkbox[]" /> !checked <input type="checkbox" name="checkbox[]" /> !unchecked How ca...

0
Q: Decoding Json string in PHP

Alien2828My Json encoded output is like the below one {"msg_id":"14789","message":"dummy+message","msgType":"TEXT","sendondate":"2013-12-26 13:19:49","seq_id":{"1":{"valid":"true","credit":"1.00","linecount":1,"billcredit":1,"id_provider":"18","providerkey":"TI","regionKey":"CH","originalnumber":"11","va...

 
9:54 AM
0
Q: Behat Mink mail

TibI'm trying to use Behat to test my mails on my Symfony2 app, following this doc http://docs.behat.org/cookbook/using_the_profiler_with_minkbundle.html I think the doc isn't up to date and I'm stuck. I followed all the steps and get this scenario: @mink:symfony2 Scenario: Registration Succe...

-1
Q: Attendance for Employees with Checkboxes in php

SapthagiriI am building an application, wherein the Manager takes attendance of his employees. And the design is something like in a table there would be two columns, one having list of "Employees" and the other having "checkboxes". The manager, would just select date from the datepicker, and provide att...

0
Q: PHP how to select already selected dropdown value

Newbie3PHP, how to select already selected dropdown value like in shops for sorting. For example click on Price and page sorts by price ASC, then click again on Price and it sorts DESC. Now when i click on dropdown item i cant click again on same item.

0
Q: PHP multiple scripts/requests

Cihad Turhanwe have the system like the following: Client: A regular client P Server: An apache server which basically runs like a proxy (forwards queries to M Server) M Server: Main server. All the work is done here. and Query Q1 is not equal to query Q1' because P Server adds some more variables (li...

0
Q: PHP Form with CSS and HTML fields to populate an iFRAME

user3136345Here is a responsive test platform I developed: http://goo.gl/io3cb1 To test a page/email, I need to paste the code into layout-all.html which is then called into an iFRAME on this page (index.html). This is not very convenient for non-developers so I want to create a dynamic PHP form but I have...

0
Q: Get characters in url with php

Ali MunandarI want to get the characters "Wv3cS8F3" in an url like http://www.4shared.com/file/Wv3cS8F3/xxxxxxx.html How do I do with php? thanks

0
Q: How to retrieve nifty index from yahoo finance

user3129102Right now, I am developing my website in PHP and in that I want to show the live data or price changes in NIFTY. so, is there any PHP code that retrieve nifty data from yahoo finance in php???? thank you ...

0
Q: How to check image is vector or not in PDF file?

user2943773I am new to pdf document processing with PHP. I have a two questions Is it possible to search PDF pages has images or not? If it has images then i need to check the image type (I mean whether it vector or some other types) ? can you anybody suggest me how to do this? thank you...

0
Q: Using PHP to parse multiple xml files

TeamStarI'm working on Mac and using Code Runner to do my PHP coding. I need to load multiple XMLs simultaneously with these: <?php error_reporting(E_ALL); ini_set('display_errors', 1); /* //to convert $a into $file after code is working proper $type = 'syll'; $level = 'P1'; $file = ...

0
Q: Big database vs multiple databases

Ahmad SamiloI have new produces about 9 products every product have something shared with another on database for example : 1- users databases content : users information table(email,username,...etc) users groups table(groups permissions ) users images table ... etc 2- for example news database cont...

0
Q: how to integrate paypal with codeigniter?

Pankaj SinghI'm trying to integrate PayPal payment with my codeigniter project. My project is about a dating site, in which two different users interact with each other. So I'm selling plans, on the based of which users will be provided access to send messages to to other for the that period of time. For tha...

0
Q: How to change my mysql table prefix via htaccess file?

user2688251I ma having a website in php mysql. I have updated the table prefix in mysql. Here I need to change all table names with prefix code with out changing the source code in php. How can we do this via htaccess file?

0
Q: Mysqli Select statement to count total orders and display all ordered products

user3136377With the select statement below I'm getting a nice view of all my orders. But what I'm trying to achieve is to get all the totals and the individual ordered products in one select statement. Maybe the ordered products can be placed in an Array? If this is possible, I also would like to know the w...

0
Q: improving MySQL related articles query

user3134526For a related topic list I use a query using tags. It displays a list of 5 articles that have 1 or more tags in common and that are older than the viewed one. Is it possible to write a query that produce more relevant results by giving more weight to articles that have 2,3,4... tags in common? I...

-1
Q: Undefined variable: $sameday at somthing.php

I'm Rajnikanti m write this code on something.php for featured event $day_start = date("j", mktime(0,0,0,$event_start_month, $event_start_day, $event_start_year)); $day_end = date("j", mktime(0,0,0, $event_end_month, $event_end_day, $event_end_year)); if (($day_start == $day_end)) { $same_day =...

0
Q: Javascript/PHP: upload resized images first, large files later

user3136378I'm writing this design application where the user needs to upload images. It would be great if the client-side could upload thumbnails of the images first, allowing the user to get working before the real images have been uploaded. (They are only needed later, when exporting the design.) I've...

0
Q: Insert pagination features in my search engine for navigation?

ERoquesHow can I: Insert page number 1, 2 & ... and the Next button if I have 2 or more pages of results and if I am on the first page. Insert page number 1, 2 & ... and the Previous button if I have 2 or more pages and if I am on the second page. Insert the First button on every page except the first...

0
Q: What I should I give to url in the ajax function call

AshokaI am using Codeigniter framework and MVC structure . My problem is I don't what is to be given to the url in ajax call. This is my ajax call $.ajax({ url://--what is to be given here?-- // type: "GET", data: { 'leftData': leftData, 'rigthData': rigthData, 'func':'editsuccess' } ...

-1
Q: In need of someone who can host sendjs.php file and discount calculator file for my blogger store

user3136419Pls how do I get in contact with Chikitsak Gupta. I need his help with activating my order email

0
Q: Ajax call skips some PHP code

VaMooseI have a form I am trying to submit via Ajax. The code works if it is only done through PHP, but as soon as I run it through ajax, it just seems to skip the update method? Here is the ajax call: $('.notifications_settings_form').submit(function(e){ e.preventDefault(); var that = $(this), ...

0
Q: how to create models iteratively?

jailed abroadas a beginner in Yii i have a question that I want to create models in iteration. For example I want to create result model for 30 students. How to create these models in iteration? I cant hardcode becaue number students may vary from class to class. In this approach i need to use tabular input ...

0
Q: submit on checkbox input depending on confirmation dialog

patriquesI have multiple rows, where each row is a form with a a checkbox. Im trying to sumbmit the form depending on some data regarding the id of the object mapped in the row. every form looks like this: <?php foreach ($tables as $table): ?> <tr> <td><?php echo $table->get_id(); ?></td> <...

0
Q: Login popup stay on incorrect login

user3136411I have created a login popup using jquery and confirming login through php used in the page. When the user inputs corrects credentials the page is redirected where I want but when incorrect credentials are given the popup disappears and then again login link is pressed to see the message on the f...

0
Q: How to Implement Scrolldown using Php Selenium Remote Webdriver?

user3017937$host = 'http://localhost:4444/wd/hub'; // this is the default $capabilities = array(WebDriverCapabilityType::BROWSER_NAME => 'GOOGLECHROME'); $driver = RemoteWebDriver::create($host, $capabilities,1000); $driver->get('http://www.groopdealz.com/'); sleep(rand(5,7)); $random_gmail = 'rakesh.bitlin...

0
Q: STAT Relation in a related model's STAT relation without joins in Yii

ManquerA similar question has been asked before: STAT Relation on a related model's STAT relation, Yii Like the earlier poster basically I am looking to build STAT relations on top other models STAT relations. Consider I have 3 models, and Model A is related by a HAS_MANY relation Model B and model i...

0
Q: How to print html using echo php function

galexyIn my wordpress template HTML: <li style="background-image: url(<?php bloginfo("template_url"); ?>/images/icon/facebook.png); background-repeat:no-repeat;"> <a>facebook</a> </li> I want to echo this using php I tried above html in php using echo '' ; <?php echo '<li style="backgr...

0
Q: Call individually the output on foreach() to query in the database (codeigniter)

user3136367My Controller public function notification() { $id = $this->session->userdata('userID'); $data['results'] = $this->lawmodel->notificationModel($id); $data['content'] ='contact_form'; $this->load->view('includes/template2',$da...

0
Q: zend_cache absolue expiration time

AbadisI am using php with zend framework and zend_cache. I have these lines of code for this :` $frontendOptions = array ('lifetime' => 12 * 3600, 'automatic_serialization' => true ); $backendOptions = array ('cache_dir' => APPLICATION_PATH . '/../tmp'); $cache = Zend_Cache::factory...

0
Q: Error while fetching data from cross domain using ajax

user3136190when i try to fetch the data using Jason from cross domain i am getting this kind of error "Error: jQuery1910031708905171111246_1388038501367 was not called" i am using ajax callback functionality and my jQuery version is 1.9.1. $.ajax({ type: "GET", ur...

0
Q: QuickForm2 folder not found

user2714362I have installed HTML_QuickForm2-2.0.0 via command line "pear installed HTML_QuickForm2-2.0.0" and it says successful, but I cannot locate the QuickForm2 folder but the old, depreciated QuickForm under 'html' folder in pear directory in XAMPP. Hence, I am not sure it has been installed. Any sugge...

-2
Q: Parse error: syntax error, unexpected 'function' (T_FUNCTION), expecting on line 319

user3136440I keep getting the error below.. Parse error: syntax error, unexpected 'function' (T_FUNCTION), expecting on line 319 for the theme-woocommerce.php file. I have tried using numerous code checkers and none have found a problem on line 319 of the code. This is frustrating as I have not ed...

1
Q: passing array as javascript function argument from php

essI need to pass an array as a function argument from php to js.I need a way to pass them to the function.Can anyone please help me with this. Thanks a lot..

-3
Q: PHP Fatal error alert

YEN SARUNI am developing a Document Management System in PHP & MySQL. I am testing in the local machine which has Capacity : RAM : 3GB CPU Core 2 DUO 2.9GHz My Records needed is over 1 millions : when i run my localhost : it send me the message : Fatal error: Out of memory (allocated 2097152) (tried...

0
Q: Extracting URL from tweets and getting numbers of tweets containing that url

user3121782Here I am getting url from tweets, converting that url to long url. And then getting count value for numbers of tweets containing that url. if(preg_match($reg_exUrl, $tweet, $url)) { preg_match_all($reg_exUrl, $tweet, $urls); foreach ($urls[0] as $url) { ...

0
Q: PHP SOAP Server method receive a set of parameters

dskanthI have setup a SOAP Server with php. The problem is that, as per the WSDL, the client which calls the server method, is supposed to pass a set of parameters (more than 50). But how do i handle all those parameters in my Server method? Should i go on and declare each and every parameter for my S...

-1
Q: mysql_fetch_array() expects parameter 1 to be resource, boolean given

sanjisanjy<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <?php $con ...

1
Q: Does directory made inside writable directory always writable?

AceI have a directory that is writable.If i make another directory inside it using mkdir("test", 0777); Does this make test directory writable ?or it doesn't inherit the writable property from its parent dir?

0
Q: Invalid method Mage_Checkout_Block_Cart_Sidebar::canApplyMsrp(Array ( ) )

supalI am facing a serious error in magento version 1.5.1.0 while checkout. can somebody help me? the error occurs When i enable display shopping cart sidebar, Invalid method Mage_Checkout_Block_Cart_Sidebar::canApplyMsrp(Array ( ) ) Trace: #0 /home5/bunnygla/public_html/app/design/frontend/...

0
Q: php script appears as a blank screen

NicI'm trying to run a php script on my website through my file manager but it just shows a white blank screen. I ran a couple of test php scripts on my file manager and runs well. The php script that runs a blank screen has been tested offline with WAMP and works fine, The php script involves conne...

0
Q: xgettext doesn't generate a .pot file

Omar AbidI have a PHP file and I want to generate the POT file using xgettext. For some reason this is not working and xgettext is not returning any message. Here is the command I'm using xgettext plugin.php Any insights?

0
Q: How to make Twitter Typeahead autosearch with php and mysql with template?

kostI am try to use twitter's TypeAhead with a php file instead of a json file. With the json file approach the data are fetched from a single json file called repos.json $('.example-twitter-oss .typeahead').typeahead({ name: 'twitter-oss', prefetch: 'http://localhost/type5/repos.json', ...

0
Q: Laravel best practice for navigation menus

simonI'm currently using laravel 4.1 and im relatively new to laravel. By now laravel is great and helps me very much. Creating a navigation menu seems by now a bit tricky. I dont' know where to put the logic for the menu so i can use it in a template file. Sure, i found an example (https://github.co...

0
Q: I am not able to create contact in gmail using php

SohelIs there any one who can give me the full code of create a contact in gmail using oauth 2 in php. I try it and spent lots of time. I also find some example in this forum but yet no luck. Please someone help me. Thanks in advance

0
Q: how to send array as function argument from php to javascript

user3136464I need to pass an array as a function argument from php to js.i am getting the values from database. while ($rows = pg_fetch_array($qry)) { ?> <option value="<?php echo $rows['relation_name_local']?>"> <?php echo $rows['relation_name_local']?> ...

0
Q: Laravel - Checking passwords before manually logging in

Aigars CibuļskisI'm getting problem with manually logging in users using Auth::loginUsingId . Before I do that I need to check if password matches and there is my problem. Password comparision is always returning false; That's how I save password to DB: $user = User::create([ 'password' => Hash::ma...

0
Q: find price difference for different date

YasirPoongadanhow find difference of price for two selected day. my table as shown --------------------------------------- id price date product --------------------------------------- 1 10 15-12-2013 pen 2 40 15-12-2013 book 3 15 16-12-2013 pen 4 ...

0
Q: Every 500 times do a Sleep()

Patrick Akkersmy database has 25000 rows. Using a While-loop i get the data. Now i want to use SLEEP() everytime 500 rows are picked up. I created the script below, but this script only works one time at 500 rows. <?php $i=0; while($value = mysql_fetch_assoc($result)) { if($i == 500) { // sleep for 10 se...

-1
Q: pdo couldnt find the driver but its included

user3090649i'm using openserver and trying to connect to db. php.ini extension=php_pdo_mysql.dll extension=php_pdo_pgsql.dll extension=php_pdo_sqlite.dll These are uncommented.. It displays exception - couldnt find the driver

0
Q: Show ppt in online without using thirdparty tool

SankarI need to show PPT file as slide show in my online server. I don't know how to show using PHP or HTML or JQUERY code . Please help me if anyone know to do this. Still when the PPT files clicked it's going to download. I need to slide show here.

0
Q: soap client access stdclass object php

Editme HereI have following soap client class $client = new SoapClient('api_url?wsdl'); $queryAllCategories = $client->queryCategories(array('params' => array('usertoken' => 'my-user-token'))); print_r($queryAllCategories); The above peice of code returns the following output stdClass Object ( [o...

0
Q: Latitude & Longitude computation in PHP

www.sapnaedu.inI have the Latitude and Logitude of a point and I would like to compute the new coordinates which is say 10m South of the previous coordinates. Here is the following code for doing the same : //Earth Radius $radius=6378137; //Offset from the previous point in meters $offset = 10; // 10m - Sout...

0
Q: error when i call function that contain mysql connection

user3136540---------------conn.php----------------- <?php session_start(); function conn{ $hostname = "localhost"; $userDB = "root"; $password = ""; $databaseName = "forum"; $con = mysql_connect($hostname, $userDB, $password) or die("failed to connect"); mysql_...

0
Q: cURL command line to send a file to a website directory

FarahI have a website hosted in localhost. I'm using as a web server "EasyPHP". I need to use a command line by cURL to send a file to a directory of the website. Let's suppose that the URL of the website is : localhost/testing_curl And that "some_package.zip" is under the local directory : C:\...

0
Q: How to output the function into a File

user3132024I have this function: function permGen($a,$b,$c,$d,$e,$f,$g) { foreach ($a as $key1 => $value1){ foreach($b as $key2 => $value2){ foreach($c as $key3 => $value3) { print trim($d[rand(0,count($d)-1)]).trim($value1).trim($e[rand(0,count($e)-1)]).trim($value2).t...

0
Q: Obfuscate IDs [pages, users ...] with a static number of digits

DazentsI was searching for a way to obfuscate the IDs that are show to the end user. But with a static number of digits Like the md5() function, with the ability of reversing back to the original ID. e.x: 1 => N9VRD7QB4SG2 e.x: 999999999 => RC401BALV74W

0
Q: PHP Websocket server for just push data from server to all clients

user2899763I am new to PHP websockets and I have requirement of pushing data to all the clients, that are connected via websocket, based on some event happended on Sever. I would like to prepare a simple websocket server in PHP. In my research I have found so many websocket servers for chat applications, wh...

-4
Q: How can i get job information from hotmail using api

SohelHow can i get the job information from hotmail using hotmail API. I tried it to set the scope wl.contacts_job_profile but gives error of invalid scope. Its urgent please give some suggestion. Thanks in advance

0
Q: can I use same products slider twice on Home page in Magento

Saurabh SinghI have installed and using feature products slider in magento 1.7.0. When I'm using it only ones one home page its working fine but when I'm trying to use it twice or more remaining slider is not working except first one. please help me ..Any such help would be great appreciate !!

0
Q: how to exactly get the slide which is clicked in list view in swipe using wow slider in jquery mobile

user3132041if I click on one of the list items, it has to show the slides in swipe functionality. I am able to do up to here but whenever I click any of the list item the swipe functionality, it is showing from the first slide what i have to get is the swipe functionality has to show the slide (i.e., the li...

0
Q: Retrieving number of emails in each folder IMAP

user2183923I am trying to retrieve the number of emails in each folder of Gmail (IMAP). I can do it one by one, but I would like to iterate. I have doubts about how to assign the folders in the iteration. $mbox = imap_open("{imap.gmail.com:993/imap/ssl}", "user@gmail.com", "pass") or die("error: " . im...

0
Q: Uploading images using Form Collections and Doctrine in ZF2

supernachoI'm looking like do with form collection, image uploads with ZF2 and Doctrine2. The form is injected EntityManager DoctrineORM. The closest thing I've found has been in Symfony2: Uploading images using Form Collections and Doctrine in Symfony2

0
Q: Wordpress wp_editor() not working properly?

Rock Developeri used wordpress 3.8 and i create plugin and i displayed the wp_editor. but it look like this. this is my code. $content = ""; $edit_id = "slider_text_editor"; wp_editor( $content, $edit_id ); please help thank you.

0
Q: how to get file listing using jquery ajax

user182196I want to get files list (from a folder named uploads. get_files.php <?php $dir = 'uploads/'; $a = scandir($dir); $b=count($a); for($x=2;$x<$b;$x++) { echo"<div class='filePass'>"; echo $a[$x]; echo "</div>"; } ?> get_files works well as alone, i.e. it properly lists the...

-1
Q: mysql_real_escape_string() access denied for user ''@'localhost' (using password no)errors shown in uploading php scrip

Shinto Josephmy code is given below it works fine in my computer but when uploading it to server it shows error like mysql_real_escape_string() access denied for user ''@'localhost' (using password no)errors shown in uploading php scrip <?php if(isset($_POST['upload'])&&$_FILES['userfile']['size']>0) { ...

-1
Q: Can't Update passcode in MySQL

Luís AssunçãoI'm trying to do some code for the user to retrieve his passcode. But, since the passcode is md5 codified, my option is to send a new passcode for the person's email and changing automatically in the data base, staying in md5 too. But... when i try to do that, the passcode never changes, instea...

0
Q: Select duplicate records by IN() caluse of mysql

ParixitI am having issue with IN() caluse in mysql. Query: SELECT doctors.* from doctors where 1=1 AND doctors.doctor_id IN (36,36) ORDER BY find_in_set(doctors.doctor_id, '36,36') Here 36 is my primary key of the table. Now if I run this query then it gives only 1 record. I want 2 records even if t...

0
Q: How do I pass xquery result, a DOMNodelist object, to another php page?

Luke ChenThe entire intent is to divide my search result content into several pages. My search result is a DOMNodelist from $nodes = $xpath->query($queryStr); and I pass this $nodes with $_SESSION $_SESSION['srchRsltNodes']=$nodes; where the $nodes contains two nodes in my example, but in the othe...

0
Q: WordPress protected page with menu button and own login

David KreglI have a big issue and would like to ask you for help. I've migrated my Minecraft server's website under WordPress administration. Before I moved it under Wordpress it had login page to access GUI which contained few thing for communicating between website & server by rcon. I need to use own lo...

0
Q: placeholder attribute in zf2

user3119746How could insert the value of a field's db in the plcaholder in zf2 //muestro datos public function modificaAlumnoAction() { //get the db values $procesa=new Querys(); $data=$this->params()->fromRoute("id"); $datosAlumnos=$procesa->getDatosAlumnosM($data); //send the form }

-5
Q: How to use ajax to get data from php?

user3108220Excuse me, who can tell me. How to use ajax to get data from php and control the result? I have seen an example, but I still don't know how to use it. please help me...!

0
Q: How can I access an array dimension, based on another array?

timofeyUsing the following code: <?php $array = array( array( array('a','b'), array('c') ) ); $location = array('0','1'); $text = 'd'; ?> How can I achieve the following, if the number of elements in $location[] is unknown? $array[$location[0]][$location[1]][] = $text; ...

-2
Q: Wordpress issue. PHP function require_once() is not working

Deepak SinghI want to include a file using require_once. File exist and path is correct.. still not including that file. Please resolve issue ASAP as i am working on a live project. I have tried every trick but not successful. I am using wordpress. Here is my code

0
Q: Get (file) size, dimensions and mime type from data URI image?

Virus721I have a wallpaper upload form which automatically generates a thumb out of the visitor selected wallpaper he wishes to upload. This thumb is generated using the canvas and saved as data URI into a text input. I would like to extract the size that the output file would have if i decoded the data...

-1
Q: PHP CSV export more than 20000 records

Karthick VGiving Fatal Error in memory allocation for query reading more than 20000 records from the database and also its taking too much of time to load So please help us good suggestion to export more than 20000 records.

0
Q: How safe am i with Mod_security

KatyoshahI am making a website , i didn't learn mysqli or how to make prepared statements, so my MYsql functions go like this $query=mysql_query("SELECT * FROM news where categori_id=1"); am i safe from mysql injections since the server has mod_security installed?

0
Q: how to get the functionality work for every list items in jquery mobile for changing image on click

user3132041how to get the functionality work for every list items in jquery mobile for changing image on click. this functionality is working for only the first item in the list. can i know what was the wrong am doing please. thanks. as i need to store the value depending on that tip and tipid, please thank...

-1
Q: how to debug my website?

libertaireI recently changed some stuff on my website and i have just realised that an ajax script stopped working. I paid someone to code it so i really don't know how to debug it. First here's how it's SUPPOSED to look: https://www.ni-dieu-ni-maitre.com/A-5870700/t-shirt-antifa-anti-raciste-anti-nazi If...

-3
Q: How do I include php file in page using Javascript

user3136349How do I include php link in page using Javascript Using only Javascript I had a code but forgotten it

0
Q: How to return not matching string in given strings in php

Bala KrishnanHow to return not matching string in given strings in php for example if(strpos(One two Three, One two) != false) the above example matching words One and Two but Three is not matching. how do i get value of Three using php?

0
Q: yii urlExpression in CGridView:: is not working

Selim RezaI am using CLinkColumn in CGridView. I am getting some error like as:: "Error 400 Your request is invalid." OR "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'PORD00000047'". I am trying to view some other from other table by attribute $pp_purordnum. in both table has id and pp_purordnu...

0
Q: Trouble when passing a php variable as an argument in mysql query

user3112067I'm trying to use a php variable as a search term when querying a mysql database, first I get the variables from the HTML form: <?php //Create variables $vals = array($_POST["id_number"], $_POST["id_name"], $_POST["id_submitname"]); $keys = array('idno_1', 'name_2', 'subname_3'); //combine keys ...

0
Q: How do I create an object with custom attributes in PHP?

StaleI am using PHP and MySQL. My database have two tables: product and product_attr Each product may have different attributes. Like this: PRODUCT ID name 1 Table 2 Car PRODUCT_ATTR ID productID attr value 1 1 Color Black 2 1 Height 35 4 2 Color Red 5 2 Doors 4...

0
Q: MySQL to HyperTable

Martin BariakI am working on search engine written in PHP, using MySQL database. I have highly optimized OOP code, but is time to remake database. I want to replace MySQL with HyperTable, but I can't find any documentation/guide, which can help me. Is there someone, who can help me or give me a right link ? ...

0
Q: check on return value from jquery fails

AtroXI use jquery to validate the form, check the math-captcha and finally, send a mail. The validation works fine and the mail works fine. There is only one problem. When my ajax returns false, the bool validCaptcha keeps always true... $(document).ready(function() { $("#confirm").on("click", f...

0
Q: CodeIgniter PDF operations

iravulI need PDF Library for CodeIgniter or any PHP Upload Class. Users will upload PDF files and system or library get page count of PDF. Also system can split first two pages for preview. Maybe system will add watermark to PDF. Thanks for help or any suggestion.

0
Q: google plus generated comment id

Narendra VermaI have small piece of parameter which is posting comment from Google plus. below parameter '["xxxxxxxxxxxx","os:xxxxxxxxxxxxxx:1388057844981","xxxxxx ",1388057849783,null,2,null,null,[1,null,null,null,null,null,null,null,null,null,null,null,null,[],null,[0,360,520]]]' In this parameter i got ...

0
Q: Customizing model-stored validation rules in Laravel

arnisritinsLet's say, I have a User model in Laravel like this: class User extends Eloquent implements UserInterface, RemindableInterface { public static $rules = array( 'email' => 'required|email', 'password' => 'required|min:8|confirmed', 'password_confirmation' => 'required|...

0
Q: Reading PHP array using key value

OussamaLordI have an array that I'm creating inside my PHP script, the var_dump function gives me this value :var_dump($arrayOfValues); array(3) { [0]=> array(2) { [0]=> string(12) "BusinessName" [1]=> string(13) "ITCompany" } [1]=> array(2) { [0]=> string(7) "Add...

0
Q: add code in joomla contact form

user3135368Please Help me I am trying to setup attached file in send mail Joomla v3.1.5 I have set all but attached file not receiving in mail. $strSid = md5(uniqid(time())); $strHeader = ""; //$strHeader .= "From: ".$_POST["contact_name"]." <".$_POST["contact_email"].">\nReply-To: ".$_POST["contact_emai...

0
Q: How to find the nearest parent element attribute value using Jquery

Vinoth BabuI am facing a problem on getting the nearest parent element attribute value using Jquery. Can anyone help me on this. My element structure is as below, <ul class="Someclass"> <li><span id=3 class="heading"></span> <ul> <li> <ul> <li><span ><button onclick= "redirect()"></button></span<...

0
Q: php date function returning wrong answer?

A.MDate function does not print the correct day even after changing the day to first day. //Current date $dat=date("Y-m-d H:i:s"); //date with same month and year but first day of month in the above date $d=date("Y-M-01",strtotime($dat)); //date with first day of month printed co...

0
Q: Yii TbThumbnails and ajaxUpdate

Carlos AdriánI had this problem with Bootstrap TbThumbnails in Yii: Pagination shows well when the page is initially loaded, but if we click in the last page link then it shows all the records instead of just one page of records. The Link Pager buttons are initially shown under the records, like we set in t...

0
Q: PHP table of current month with date on each row

Michael Häne(See screenshot:) I wanna make a table, where people can choose, on which days of the month they can work. They can choose between 3 shifts each day (also more than one each day possible). col: day & date of the current month (don't show Mondays & Tuesdays) 2.–4.col: checkboxes for each shift (...

-1
Q: order by rank , priority and date in php mysql

user3104387i am using the following query for sorting the rows according tot he rank defined select properties.id, properties.agency_id, properties.created, IF(@prev <> properties.agency_id, @cnt := 1, @cnt := @cnt + 1) AS rank, @prev := properties.agency_id, properties.refno FROM p...

0
Q: How to update add/replace an entire database using Doctrine or Mysql

FlorentI'm working on a web-app project, for a trading company, which would like to have an offline access to the web App and possibility to update when connected to the net again. The interface is easy to use offline - any php server will do with a local clone of the web app. The problem is the databa...

0
Q: create a registration page in opencart for different group user

DevelopmentBucketi am trying to create a registration page in opencart. i have just copied the registration files from controller/account and view/account files and rename both files and change some codes inside and uploaded them now form working fine as other normal form working. I also changed the form action...

0
Q: Parse website and save a specific DIV using 'PHP Simple HTML DOM Parser'

SabreI am trying to using 'PHP Simple HTML DOM Parser' to parse a website and save a specific 'div' as a 'HTM' file. I have tried some things but I'm unable to save the div. Below is the 'PHP' code I have tried but get an error as $div->save('site/test.htm'); is not correct. include( 'site/simple_ht...

0
Q: PHP and NGINX on CentOS

Poonam BhattI am using NGINX with PHP 5.4.23 on CentOS I am facing very wired issue on it. when i see phpinfo(), it says Loaded Configuration File: /etc/php.ini but when i do changes in this file, it don't shows in phpinfo(). I also restarted nginx and check it. but not changes reflected.

2
Q: Series of AJAX calls

tvamsisaiConsider the following setting: PageA.html - Does an AJAX call to PageB.html PageB.html - Does multiple ajax calls to multiple pages. At the end of all ajax calls PageA.html shall refresh itself to update to new content. My code: // PageA.html <script> $(document).ready(function () {...

0
Q: Change Database connection at runtime in Codeigniter

DesireI want to connect to a different database based on the sub domain, Currently I've this code, but it not looking a decent solution to the problem. Please guide in right direction what is the best way to achieve this in code igniter. class DBConnection extends CI_Model { public function __con...

0
Q: find closest location with lat and long based on db data

user3130599I want to find nearest location based on requested lat and lon from my database data. I am confused my code result that it's distance is right or wrong? $lat= mysql_real_escape_string($_REQUEST['lat']); $lng= mysql_real_escape_string($_REQUEST['lon']); SELECT beach.id,county.title,mun...

0
Q: Mediawiki memory exhausing at 12MB while limit is at 2GB

Bart PelleI have tried numerous times to install MediaWiki on my website. Using the latest version (1.22.0) with manual installation I have not achieved any success. It installs fine, and everything during the installation is reported with 'OK'. There are no errors regarding memory usage at that point, an...

0
Q: Cakephp Form cannot create file type input

Mehreen Jamilmy Form is <?php echo $this->Form->create('User', array('type' => 'file')); ?> . . . . <?php echo $this->Form->input('Profile-Picture', array('type' => 'file','name' => 'data[User][profileimg]')); ?> <?php echo $this->Form->end(('Submit')); ?> On Controller function it display data arra...

-4
Q: Ajax code the auto refresh a php file and updates it's vaules

iSaumyaFirst I want admit that I have no knowledge in ajax. I'm building a small application, where I have a load.php file and within it, I have echoed 3 variables, i.e $loadout[0]; $loadout[1]; $loadout[2]; The PHP file is working fine and showing up the values. Now I have another html page index.html ...

0
Q: Parse HTML with Zend Parser after Ajax request is complete

user1952854I want to ask if there is a way to parse a html with Zend PHP parsers after some jquery ajax request is finished. Because when I try to parse it nothing appears with the correct selector. I know that javascript is a browser lenguage and PHP is a server language, but is there a way to do the opera...

0
Q: How to insert data in a dropdown list

AngelicaWe managed to get the drop down list menu however, we are having difficulties getting the data from sql. So far, this is what we got. <?php $con=mysqli_connect("host","user","password","database"); if (mysqli_connect_errno()) { echo "Failed to connect to MySQ...

-2
Q: Browser to browser video chat code in php and node.js

Android learnerAnyone integrated browser to browser video chat application in php. Actually i am new to php and node.js i just searching for video chat application in js.if anyone known good example for that please share with me. Thanks in advance.

0
Q: Magento: Setting custom shipping method programmatically

Matt FlammI'm pretty new to Magento, and having problems trying to set a custom shipping method programmatically. I'm converting an xml from a thrid party into an order, and everything else (that I've worked on so far) is working fine. Also I'm having problems spelling "programmatically" but I won't ask f...

0
Q: Write file from GAE (PHP) to blob/datastore/gcs? can't write to local fs

user3136727I've deployed WordPress according to Google's guide - https://developers.google.com/appengine/articles/wordpress. I'm looking to add a sitemap.xml in the form of 'example.appspot.com/sitemap.xml'. Naturally, GAE doesn't not allow writing to its file-system, so I cannot just place the empty file i...

0
Q: WordPress: 2 Action Hooks for 1 Function: How to tell which action called the function?

adminI have the following: add_action('customize_preview_init', 'my_function'); add_action('init', 'my_function'); function my_function() { // How to tell which action hook called me? echo "Test"; } How can I tell, from within the function, which of the action hooks called the function? T...

0
Q: Laravel validation exists where NOT

user3134069Based on the documentations. Exists can have 4 parameters: exists:table,id,where,0 The question is, What if I wanted it to be where is not. Like where is not 0. $validator = Validator::make( array( 'groups' => $groups ), array( 'groups' => 'required|exists:groups,...

 
1:18 PM
room mode changed to Public: anyone may enter and talk
room mode changed to Gallery: anyone may enter, but only approved users can talk
 

« first day (310 days earlier)