« first day (308 days earlier)      last day (2 days later) » 
00:00 - 18:0018:00 - 00:00

12:01 AM
0
Q: php logs random username and passwords in?

Joe Fish<?php //mysql connection $com=mysql_connect("localhost","root",""); mysql_select_db("usersystem"); if(isset($_POST['Submit'])){ $userName=$_POST['userName']; $passWord=$_POST['passWord']; mysql_query("select userID from tbl_users where userName='$userName' and passWord='$passWord' limit 1 "); i...

0
Q: PHP merge arrays coming from mysql_query

user2898075I am currently using a mysql_query with the UNION function. This is the array that I get: Array ( [0] => bob [added] => bob ) Array ( [0] => test1 [added] => test1 ) Is there a way that I can take this array, merge it, remove the added values, place the data in numerical order ...

0
Q: Infinite scroll jPlayer callback with php and post id?

TsybinHow i can call correct callback function for infinite scroll plugin on wordpress with variable <?php the_id() ?> ? I try connect jPlayer like this: $(document).ready(function(){ var stream = { title: "<?php the_title(); ?>", mp3: "<?php $my_meta = get_post_custom_values( 'radio', $...

0
Q: PHP - Session for holding variables between pages

teunwI'm making a logoquiz for my Computer Science class, and I'm busy with a page to register users with an account name and email address. After successfully registrering people will be redirected to index.php In the page the are redirected to, there is a green box which says that the registration ...

0
Q: I can't upload files to a web page through code igniter

user3131045I'm new in the use of code igniter, however I have been having a problem while trying to upload files to a certain directory. You see, I've tested the page in localhost, and I have no problem in uploading files in that situation, however, whenever I try to run that on server I keep getting the m...

0
Q: Why isn't my php contact form sending?

NolakatI have a simple contact form appearing on a modal in bootstrap. For some reason my form will not send. I've been looking at it for the last few hours and could use a fresh pair of eyes. It seems so simple but I'm at a total loss. I've put a non-displayed textfield in the form as a spam filter. S...

0
Q: php class cannot set public static var

salivanI'm having difficulty setting a public var in a class: function printCaptcha($formId = NULL, $type = NULL, $fieldName = NULL) { require_once(SITE_ROOT . '/visualCaptcha/inc/visualcaptcha.class.php'); $visualCaptcha = new \visualCaptcha\Captcha($formId, $type, $fieldName); $visualCapt...

0
Q: How to save data using JSON and PHP?

user3055639I need a hand with the below script, i am new at JSON and need to store some data to MYSQL database. How can i do this? Or if you can assist with the script and a detailed explanation on how to store the user login with Facebook Javascript SDK to MYSQL database. To store they Name and ID <?php ...

0
Q: Laravel ORM relationship method 'BelongsToMany' throwing error

ChrisSummary I am receiving the following error when trying to call the relationship: Object of class Illuminate\Database\Eloquent\Relations\BelongsToMany could not be converted to string My setup is very basic, and consists of two models, User and Role. User Model [User.php] <?php use Ill...

0
Q: Call to undefined function error PHP

CKvuzeI really need some help guys. A couple of years ago I hired a dev to build a website for me. It used to work fine when he installed it on the webserver and all. A couple of year passed by and now I'm trying to reinstall it, everything works fine but the admin login area. When go to the login pa...

 
12:43 AM
0
Q: Displaying the Alphabet in HTML Tables using PHP

user2584238I'll keep this as brief as possible. How would I go about displaying all 26 letters of the alphabet into a table (6 rows with 4 columns and the last row with 2 columns) using PHP? Each table block is supposed to contain a letter of the alphabet, so for example: A B C D E F G H I J K L M N ...

0
Q: foreach loop returns nothing

user3131000I am trying to pull user data from a Cart66 table I have and put it into a shortcode in wordpress. $account is an integer pulled from session data. The code below returns nothing. $account =Cart66Session::get(Cart66AccountId); global $wpdb; $fname=$wpdb->get_results("SELECT * FROM 'vfp_cart66_a...

0
Q: advanced search using query string php codeigniter

renaHello I am making an advanced search function in my website.. and I want to make a search which is show result per category.. and then when I click the category It will show the result per category.. For Now I am using codeigniter for my project I googling some source and find a similar website ...

0
Q: jQuery Calender - More than one event per day

mdub19I have a calendar on my site that uses javascript/jquery to place events in the calendar. All the events are stored in a MySQL database with the title and Unix timestamp. My problem is that this method (shown in the code below) only allows one event per day, and creating two rows with the same d...

0
Q: Code igniter upload file with others inputs

ChoubidouIn the documentation http://codeigniter.fr/user_guide/libraries/file_uploading.html, the exemple used contains in the form only one input file, but in the case where we have a lot of input, how can we use the Upload class ? Especially, if we use the upload in others controllers, I don't want rep...

0
Q: How to dynamically create a link from SQL results

user3116846I am trying to dynamically create a link from my SQL query output, but I am not sure how to uniquely get the values of the result that has been clicked. I used an anchor to call a method in my controller, but I don't know how to recognise what has been clicked. Heres my view code where I send da...

0
Q: POST data behaving strangely after jquery mobile form submit

user3131079When I submit my form and use PHP's var_dump on $date it shows the correct variable value in my web browser but it will NOT write the value into the source code and instead shows NULL. Here's my code and an image to help explain what I mean. <form name="newItemForm" id="newItemForm" method="POST...

 
1:09 AM
1
Q: Update Ignore if the updated value will be negative

YiseraIs there a way to check if the result of an update query will be negative, ignore the transaction? I have the following query: $queryWasUseless = sprintf("UPDATE solution set SOLUTION_HELPFUL = SOLUTION_HELPFUL - 1 WHERE ID_SOLUTION = '...

0
Q: Login problems using PHP and MySQL

user2837426I'm attempting to write a login script in PHP and MySQL with username and password fields. I also have a separate php page which checks the username and password against the database. The problem is, after inputing a username and a password, the data is not being stored into the database. I'm n...

0
Q: How to keep a cookie in a PHP cron job using cURL?

Jay WestI have a PHP file that uses cURL to Log into site Run Query Log Out When i run the file in command line using php /path/to/file.php it runs just fine, but when I try to run it from cron step 2 returns that I need to be logged in, so it must be losing the cookie.

 
1:21 AM
0
Q: PHP multiply values of a multidimensional array

scottphpnewbieI've tried searching for this as I don't think it's that unique that no one has tried to do it. I just can't figure out the right keywords to search for to find my answer! I have this array array( 0 => array( 'oranges'=> 4.00, 'apples' => 2.00, ), 1 => array( 'oranges' =

 
1:33 AM
0
Q: PDO if statment validation

user3121014What am I doing wrong here? All the data was subitting until I added the last part of the code, the IF(){} statement. I want to make it where if the information was submitted correctly, for it to say THANK YOU!, else, display the error i set. <form method="POST"> <input type="text" name="use...

0
Q: Ajax to php - javascript events not firing

tkcsamI'm sure this will be easy for you guys but I'm struggling with this one. Just trying to do a simple ajax post request to a php file here. I can see that the ajax request is working because I get valid data back from my php script (I verified this by echoing the result to the page). However, m...

0
Q: PHP preparing queries not working

Trevor WoodI've been trying to prepare a query before sending it to the database but it isn't taking anything out of the database. It tells me that the user/pass combo is incorrect. (when it is correct) which must mean that it has 0 rows in coming from the database. Can anybody possibly tell me how to fix t...

0
Q: PHP to Update MySQL Data

tycoonbobI'm very new to writing PHP code. I've made a good bit of progress today, but I'm stumped. So I have two tables in a MySQL DB, with index.php looking like this: <html> <head> <title>Inventory</title> </head> <body> <?php $con=mysqli_connect("localhost","user","password","db_name"); if (my...

0
Q: Save Dynamic Array To MySQL Database

Josan IrachetaI have a dynamic form that allows users to enter information and that form can be submitted multiple times and the page will show all of the inputted data thanks to $_SESSION. That information is sent to another page where it will be saved to a MySQL database after submission. I can't get it to...

 
1:51 AM
0
Q: Find all anagram words in a text file

AndySo I have a file of words. When a person enters a they should get back all anagrams of that word if any. Example: enter 'hat' check the file for anything 3 characters with h-a-t so this where I am at now.. $wordlist=file_get_contents('words.txt'); $word = $_POST['word']; $word_spl...

0
Q: I have to validate my form for radio buttons using javascript for my code given below

user3131121i have retrieve questions and answers from the sql table and represented them using this code. now, i have a problem that how to take the radio button name in javascript. for every question there must be a one option checked. i have to do this for all questions. <form action="answer.php?title=<?...

0
Q: PHP - replace a hover event of a class through a new added class

user1941083Im new at html and php and don't know the solution for the following problem, please can anyone help? If the class .menu-link is hovered the subsequent function is performed . . . <script> var $content= $('li.menuDescription'); var $links=$('.menu-link').hover(function(){ /* "this" is elemen...

0
Q: Links fail when http://domain in my website (causes #! in url) but link correctly when http://www.domain.

user3131178This is a wordpress question, after switching themes some of my inter page links are failing. when clicked the url updates to include the page I'm trying to link to preceeded by a /#!/. If I use the full url, including www the links work again. But I'm using a wordpress theme and can't get direct...

0
Q: Two step layout for multiple modules in php?

gGololicicI am creating website application in php. It is build with multiple independent modules. For sake of exmaple let's say there is email module and file explorer module. Each of them have physically seprate folders with different libraries etc. However in frontend they both have the same interface (...

0
Q: PHP: replace string with jolly char inside

user3131164I need help for reg_ex in php... "jolly char" in string replace. This is what I have now: $String = str_replace('<audio type="soundcloud">[soundcloud url="https://api.soundcloud.com/tracks/', '<audio type="soundcloud">', $String); $String = str_replace(' params="color=ff6600&auto_play=false&sh...

0
Q: checking for buddypress from theme

Victor AurélioHow can I check for buddypress from a theme ? I've found this page for BP Plugin development but this action gets never loaded if I hook from theme. why it not works ? P.S. I need call some BP's functions from theme. like shows "BP's Activity Stream" on specific places.

0
Q: Joomla JDatabase to "test" state of an item in an array

ranwilliI have made a query as follows: $user = JFactory::getUser(); $uid = $user->id; $db = JFactory::getDbo(); $query = $db->getQuery(true); $query = "SELECT a.id, a.menu_item_id, a.req_form FROM `team_form_lists` AS a LEFT JOIN #__comprofiler AS f ON f.cb_teamid = a.team_number WHERE f.user_id = ...

0
Q: which way would be faster? error suppressing @$_REQUEST['x'] or going thru isset($_REQUEST['x'])

Average JoeUsing the isset is an additional function call, but nevertheless is the recommended practice. In the following particular example, what would be faster? I sense that the first would be faster. Otherwise, could somebody shed some light as to why the second would be faster -if so? if (@$_REQUE...

 
2:21 AM
0
Q: Variable trouble in php

user3131179I am trying to make an automated function to make "Cards" on my website and for some reason It says I am not defining an array on line 18 even though it is defined on 3. Here is the error: Notice: Undefined variable: cardArray in E:\XAMPP\htdocs\Websites\website\pages\featured.php on line 18 ...

0
Q: Categorised Search in Drupal 7- Search Categorised by Content Type's Field

SteveI've one interesting requirement. Within my search results in Drupal 7, I want the search results to be shown in categories. For e.g. If I search John Doe on Drupal 7 site, my search results page should show following results. Search Results for John Doe Arts Department 3 results found. The...

0
Q: how to resize image proportionally in php

user3006683I would like to resize an image proportionally to 500px X 500px I found the below code from the net however the article didn't have an example of how to use the script, can someone just get me started on how to display the resized image? $filename = 'test.png'; list($width, $height, $type, $attr...

0
Q: Two sites on single domain

AndreI am migrating from my old site to my new site. So half the content is on the old site and half is on the new site. The problem is I need both to be served on the same domain without anyone knowing which site it is served from. How do I do this? Here is what I am doing so far: http://mydomain....

0
Q: PHP boolean in class being a fatal error

M4TRIXI was working with php Booleans in a class when I noticed everytime I tried to make one I got an error here is a smaller version of my code class my_class { public $hide_image == true; } thats the part of my code thats failing, without that boolean it works fine, but nothing on the page w...

0
Q: XCache issue with PHP5.3

Guilherme NascimentoI've downloaded the Wamp 32bit ( http://www.wampserver.com/en/#wampserver-32-bits-php5-3 ) I've downloaded the XCache-3.1.0-php-5.3.27-nts-Win32-VC9-x86.zip file, but return this error: 'c:/wamp/bin/php/php5.3.4/ext/php_xcache.dll' - %1 is not a valid Win32 application.\r\n in Unknown on lin...

0
Q: Check for valid token in order to update password

user3131209I've got two tables called 'members' and 'password_reset'. I've got a form where users are able to reset their password. When they fill in the form, a link with a token has been send to the user email. The tokens are stored in the 'password_reset' table and all the usersinfo in the table 'members...

0
Q: Can I find what files are using when a website page is ran?

Killer WhaleI just received a source from my customer (it's written by PHP Generally), I try to read it and glance at database. I realize that it's very mess, some webpage's content is also saved in database. So, I want to find files are using by browser and I mean that php files, I want to edit them. Can I ...

0
Q: preg_replace only goes for one ocurrence in a string

user111671I am using the following tool https://github.com/jmrware/LinkifyURL to detect urls in a text unit. Unfortunately, it only recognizes one url in the whole text. For example, if the text ought to be: (ignore the "-" in the urls, I had to do this to make my point) http-//www.guiageo-americas.co...

0
Q: invalid argument foreach() in PHP

user3011784I have a shopping cart with a foreach() to update the quantities. HTML <form method="post" > <?php while ($data2 = mysql_fetch_array( $data)) { ?> <tr> <td> <input name="quantity" type="text" class="form-field" size="3" value="<? echo $data2['quantity'];?>" /> <input type="hidden" nam...

0
Q: What are actually morse codes?

The ViperI don't know anything about Morse codes.Could someone please tell me about Morse codes ? Please tell me about encoding & decoding these codes.I have tried the same question with Wikipedia,but the answer i received was not enough to make me understand what are these Morse codes.

 
2:51 AM
0
Q: php foreach iteration over object property array not incrementing the value

eightArmCodePlease help! I have been staring at this for too long. I have a property of an object that is an array of objects. I want to pass in an object to a method of the parent object and search through that array property for a match, and if one is found return the index. Otherwise, I need it to return ...

 
3:16 AM
0
Q: PHP error - mysqli_query() expects parameter 1 to be mysqli, null given

AshHello I realise that a few have asked this question before me, but I can't seem to correct my php error having looked at their answers and corrections. This is the error I get when the page is refreshed on the internet - mysqli_query() expects parameter 1 to be mysqli, null given… Hope someone c...

0
Q: View user profiles - php

UKAWWI'm creating a php/sql login/registration user-profile based website. When you log-in to the website it does to the profile which displays your information in the appropriate places from the database. Problem: Currently the page is only a template unless you log-in, and then you can only view yo...

0
Q: Re: Joomla/PHP/Java/AJAX

user3131266I am a DBA, not a web developer. I am trying to build a complex website with Joomla. The user page needs to be interactive without refresh. I am not sure I am using the right words, but here goes. Assume a user is logged in and a session is started - and we have that data along with the users...

0
Q: Authorization in php

RanaI have done mvc web applications with asp.Now I am trying to do the same in php.For authorization process there are athorization attributes to be set above the Action in asp.Is there a similar technique for php? thank you

0
Q: Website printing out code

9903286The website: Website You can see the problem i'm having on the website above, i have no idea why this happens. I've got PDO, PhP, httpd, php-mysql and so on and it still doesn't work. I've tried reinstalling the whole thing. I've followed countless tutorials on how to fix the usual "printing ou...

0
Q: SQLSTATE[HY000] [2002] Not a directory when doctrine:schema:create

xanesis4I'm currently programming in Symfony2 (following this tutorial: tutorial.symblog.co.uk, and when I execute a: php app/console doctrine:schema:create I get: [PDOException] SQLSTATE[HY000] [2002] Not a directory Here is my parameters.yml file: parameters: database_driver: pdo_mysql d...

0
Q: Modify array php using array_map

Jeton RamadaniHow to modify the following array using array map. So far I couldn't achieve the wanted results so here is my question: Convert this: Array ( [Open+Sans:300,300italic,regular,italic,600,600italic,700,700italic,800,800italic] => Open Sans [Roboto:100,100italic,300,300italic,regular,itali...

0
Q: delete an Database row using JQuery

De Zéro ToxinI am using a PHP function to format any 2D PHP array to HTML table, In that table I need to add a delete button in each row, So when the user clicks the delete button jQuery should take particular fields ( 3 fields ) and submit in a php file and it should give the response without reloading the p...

0
Q: How to use Permalink structure on Custom Post types?

user3131280Good day! I have set custom Permalinks for my Wordpress blogsite as www.domain.com/slug/%post_id%/%post_name%/. This structure only works for posts not published to under a minisite (custom post type.) I'd really like to use the Permalink structure so I may submit posts to Google News. This is...

0
Q: Inserting to table where table name is a variable

user3131297I want to insert into a table where the table name is a variable. I can insert to the table just fine but when I try and make it a variable I get problems. I probably just don't know the syntax very well. Below is without the variable $query = $pdo->prepare('INSERT INTO test (item) VALUES (?)')...

0
Q: PHP If statement is too long, slow down the speed

Ben Wongif(strpos($search, "new york") !== FALSE){ //do something } else if(strpos($search, "Los Angeles") !== FALSE){ //do something }...//keep going I have use strpos to filter user's input text. If user have enter the match city, it will do something However there are going to have a lots o...

0
Q: Wordpress add_rewrite_tag(), add_rewrite_rule(), and post_link()

user3131308I am trying to do the following: Rewrite the URL structure of my WordPress installation so that a language field is in there. E.g. http://www.mydomain.com/lang/ I want to then take the input from /lang/ and use it to display the appropriate content. E.g. if lang is 'en' I will take custom field...

1
Q: Generate batch number in mysql?

HailwoodWe have a script that should function like so: Script inserts n rows into database inserting the same unique number into the batch column. Script puts a job on the AWS queue with the batch number. AWS worker does some processing and fires off another script on our server. Script on our server i...

1
Q: How do I check for a mysql database change without refresh?

user3131319I need to be able to have my main page (index.php) check every 10 seconds for a change in the mysql database table 'refresh'. If the 'refresh' value is 1 it needs to refresh the page in its entirety. If the value is zero it does nothing. I would use meta-refresh but I cannot have the page always ...

0
Q: Using form method POST to an existing PHP array

Sam WhiteheadUsing the following form to POST to the same page upon clicking submit: <form action="" method="post"><a class="buttonnohover"> Enter URL: </a><input type="text" name="term2" class="buttonnohover"/> <input type="submit" class="button" name="submit" value="Add URL" /> </form> Top of the code th...

0
Q: jQuery - loading form(s), submitting POST, retrieving result without refresh

LouisKFirst off, I have extensively researched this, and have been unable to successfully apply any of the answers I've found, at least in the way that I want. I think I'm close, but I may be way off... A similar question was asked here: Submit form in div with ajax, return php in div without refresh ...

0
Q: Can connect to database in php, but then it doesn't work in Wordpress?

GuyLeStackI'm not sure if I'm doing anything incorrectly. But here is my code for connecting to php and it seemingly works. Then I try to connect to Wordpress, and it says "Error establishing a database connection". I've been working on this problem for WAY too long. I appreciate any ideas anyone has. ind...

-1
Q: Creating friend system in android application

user1795094I am trying to create a social network-like app. I want to try to set up a request system to create "friends". I dont know where to start in terms of the php code or the android code itself. Anyone willing to help me out?

0
Q: Codeigniter + htaccess for index.php + subdomain not working

aBhijitI have directory structure on my production server as: public_html/www # www.digicreek.com public_html/educonnect # educonnect.digicreek.com public_html/.htaccess Locally my htaccess looks like this: RewriteEngine on RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %...

0
Q: How is can I export an HTML table into Excel using PHPExcel class?

MikeI have a reporting warehouse website and I would like to add a function to export a reports to an Excel file. I have been looking at the PHPExcel class to get his done but I am not sure how can I only export part of a page? I think there is a function in the PHPExcel class that will export the...

 
4:27 AM
0
Q: Creating an online ide, security risk

Joey Salac HipolitoI am on a personal project of creating a web-based ide, or lets say, just a text-editor, and the app would allow users to register and start their own javascript project. The backend language that would write the files is php. Questions. How do I safely write user-input files into server, hav...

 
4:39 AM
-1
Q: create a rule/ruleset in drupal 6 to trigger node unpublish

Sachin9create a rule/ruleset that: Is triggered when a node is unpublished Then redirect the user to a substitute page. i tried importing this component ..... but it says import failed { "rules_node_is_unpublished" : { "LABEL" : "Node is unpublished", "PLUGIN" : "and", "REQUIRES" : [ "rules" ], "USE...

0
Q: Why is website not full when browser window is in full screen, but when the browser is half the size of the screen, my divs are maxed out in length?

Mathew CroganThis may sound tricky at first, but take a look at this site Mess around with the browser window size for a little bit (I'm on Chrome and have not tried it with other browsers) and you will notice that my website takes up the entire page when the browser window is taking up only half of the mon...

0
Q: insert into with two variables php

Smart ManThe below inserts one variable just fine. But how do you do two? $query = $pdo->prepare("INSERT INTO `{$test}` (user_id) VALUES (?)"); $query->bindValue(1, $idv); I've tried $query = $pdo->prepare("INSERT INTO `{$test}` (user_id,another_id) VALUES (?,?)"); $query->bindValue(1, $idv); $query->...

-1
Q: How can I insert pagination in my search engine?

ERoquesHow can I insert pagination in my search engine search.php page? If there is 1 result, I do not want the Previous button and the Next button. If there are 2 pages and I am on the first page, I only want the Next button. If there are 2 pages and I am on the second page, I only want the Previous...

-3
Q: PDF creation using php

RekhaI am developing a freight management software.For that the goods are transported using a document called Goods consignment note.My customer has already printed consignment note.I have to get data and then print the datas in the fields in already having consignment note. I have been using fpdf for...

-4
Q: Visualization tool library in PHP

www.sapnaedu.inI am developing the PHP based web application. I need to display the land which is sold and unsold. I need to generate a visualization of the data something like this : Any idea how it can be done. Are there any visualization libraries, API's that I can make use of ? Thanks

 
5:02 AM
-4
Q: Connecting to a wireless network from PHP?

coderamaI want to write a simple script that can connect to wireless networks. I have some of the networks passwords, but not all. Is there a way to: scan the local network for wireless networks connect to them if they have a password specified connect to the unsecured networks scan through available f...

1
Q: When using JSON in Fragments the app is not responding in Android Development

Ruch1234I'm using navigation drawer in android. I have got the data from a URL through JSON. When I run the app when it loads the fragment there's an error saying "Unfortunately the App has not responded " I'm getting the JSON Data from a PHP file and it is taken from the INTERNET for now it is in...

0
Q: Best/Standard way to store email addresses for a mail list?

TheHarrisonCrafterI am working on adding a mail list to a website which is php enabled. I know how to create a form, pass the variables to a php file, and then use that php file to store the variables in the root directory for the website. However, this just seems to insecure. I tried saving all of the files to a ...

0
Q: Text with addslashes breaking when fetch in textfield

Code HunterRecord in Database looks like this: D\'Huison-Longueville When I echo this record in textfield it appears like this : D Here is my code: <input type="text" name="city" value="<?php echo stripslashes($query['city']); ?>" />

0
Q: Deploying PHP web app with Maven (It can't be this hard.)

user3131385So it's pretty clear to me that I just have a partial understanding of the tools at work here. In my mind I'm trying to do something pretty simple. I have a project that includes a php-based site, and my assumption is that I should be able to design my project in such a way that I can issue a sin...

0
Q: Getting the End Date given the Start Date and range

user3107399Suppose I having the current computer date which I have code below: //Current date declaration var d = new Date(); var month = d.getMonth()+1; var day = d.getDate(); var year = d.getFullYear(); var currentDate = ((''+day).length<2 ? '0' : '') + day + '/' + ((''+month).length<...

 
5:26 AM
-1
Q: How do I pause execution in php, save state and continue from same point later on?

Harish AnchuI have a php program which does some processing. I would like to stop the program during execution and save the current execution state and continue from some point later on. What is the best way to achieve this?

0
Q: how to show dynamic submenu on click of menu

Sushil BhardwajI have dynamic menu and submenu which is coming from database. All is going good. when I click on menu submenu opens, but when i click on these submenu, submenu hides. I want to show these submenu there when even when clicked on them

0
Q: am having data as ["1","2","3"] in one column of table and another table with id 1 and tip dont rub, how to fetch the data

user3121701tips as ["45","46","47","48","49","50","51","52","53","54","55","56"] and in another table am having the tips as id 45 tip wash your eyes, id 46 tip dont rub your eyes how to split the array and according to that i have to get particular tip and to be printed any suggestions please. how to search...

-1
Q: System.StackOverflowException in quickHull Algorithm

Morteza Asadihere is a php script for quickHull Algorithm. It's Work fine. I'm trying to convert QuickHull Algorithm from php to C#. Here is my class public struct point_distance { public Point point; public float distance; public point_distance(Point p1, float p2) { point = p1; ...

0
Q: order mysql query result in decreasing order

HungryDBI am trying to create a table for marks and rank team in decreasing order. i tried this. $q = $db_con-> prepare(" SELECT @s:=@s+1 serial_number, t_name,name,marks FROM team,user,(SELECT @s:=0) AS s WHERE user.u_id=team.u_id ORDER BY marks DESC"); Above query displays result in DESC order of ma...

0
Q: Print View file from controller for Ajax purpose in Codeigniter

atomaprchyaI am working on cart function in codeigniter. I have worked under module named 'bookings' where I have placed cart view file in modules/bookings/views/shop/cart.php When Something triggers, I have called update_cart function of bookings controller. All logic are ok, updating cart is also OK but,...

0
Q: not redirect me to form action

PHP_USER1 <div class="bottom"> <font class="ftxt"> <a href="javascript: void(0);" onclick="sin();" class="stxtcolor">&nbsp;&nbsp;&nbsp;Sign in</a> or</font> <a href="myaccount.php" class="regbg" />Register Now</a> </div> When user click ...

3
Q: Array sort by First Value

Google UserThis is my current Array Array ( [0] => [10,13], [1] => [11,15], [2] => [12,7], [3] => [1,0], [4] => [2,0], [5] => [3,0], [6] => [4,0], [7] => [5,0], [8] => [6,0], [9] => [7,0], [10] => [8,0], [11] => [9,0] ); I want to sort this array by the val...

0
Q: Converting file upload to binary, post to server and save file using PHP

blackpla9ueI am working with an app where I am unable to post the File to the server. Therefor I have chose to send it as a string to the server, and remake it to a file using PHP. Below is the code I am using to convert the image to a string. var file = document.getElementById("fileForUpload").files[0]; i...

0
Q: AES-256-CBC encrypted in ruby and decrypted in php

SeanI am encrypting a string in Ruby using the following: cipher = OpenSSL::Cipher::AES256.new(:CBC) cipher.encrypt cipher.key = 'I4LCrXyYDEYVFWB3F1jH5EFKZt6jhosx' cipher.iv = 'xKAmbEaWJvC1iO30' encrypted = cipher.update(string) + cipher.final encoded = Base64.urlsafe_encode64(ecrypted) Trying to ...

0
Q: Entity controll, configure and return other elements

Grek HmhmmI have entity (car) this entity have galleries (photos, videos)- can i add method - getGallery() in entity ? or this is not good way ? If not where i should connect car with gallery. In idea i get object car to template and can $car->getName() $car->getGallery() or $car->getGallery('photos') or ...

0
Q: How to get the first embed content of a post

azaI'm trying to get the first embed url from the post. I know wordpress auto-embeds them but can't find a method to just get the embeds. $urls = array(); $p = get_post(); preg_match('@https?://(www.)?(youtube|vimeo)\.com/(watch\?v=)?([a-zA-Z0-9]+...

0
Q: register through linkedin codeigniter

user3129830i have a registration page in code iginter with take email username and password and send a activation link to email and by that one can able to go through form fill steps like personal, business and other steps . so this same type of registration i should do with linked in is that can be possibl...

0
Q: PHP Zend - Hide public in URL

Dato' Mohammad NurdinI'm using PHP Zend as my project framework. How I can remove public from this URL? I want this kind of URL http://staging.revivalx.com/zeesbio/login Instead of this http://staging.revivalx.com/zeesbio/public/login http://staging.revivalx.com/zeesbio/public/login Thanks a lot in advance.

0
Q: How can get files list from folder in aws s3 bucket?

RajaramanI am working on AWS S3 ( Amazon S3 PHP class @version 0.5.1-dev ) , i can get all bucket list by this function $s3->listBuckets() Like this how can i get all files from folder ? Thanks

0
Q: Passing php variables on click without refresh

Alex DanieliThe problem: I have a series of 'accept' buttons, on click it opens a lightbox (a modal- using bootstrap), of course this is done without refreshing the page. On the lightbox I need to show information regarding what is being accepted (therefore I need to pass a PHP variable to the lightbox). S...

0
Q: AFTER GETTING NEW IP ADDRESS CURL STOPS WORKING AND IT THROWS NO ERRORS

unknownI have a php script which downloads all of the url content within the given url. like : function downloader ($given_url){ //download all the url's content in the $given_url. //if this $given_url contains 10 url inside it download all of their content. ...

0
Q: Extract flashvars from an object with PHP

user3131512I'm trying to extract the flashvars from an on a webpage using PHP. However, using a DOMDocument I cannot seem to even find the element. Can anyone help?

-1
Q: fetching data from url and saving in databas in our server

user2915895i want to fetch shopping product from amazon,ebay, http://www.watches.de/ and more around 50 sites.my project is in php.i also uses the concept or curlphp but it not work online on my server .help me to find a better solution for this or suggest any alternate.

-2
Q: Display data from SQL database in PHP when clicked on checkbox

user3129645I have arrays of check-box and I want to send value of check box to SQL query using PHP and display data from database on same page, when user clicks on check box. Redirect checkbox value to SQL query and display result dynamically. Please supply example code?

0
Q: PHP - stream_get_contents hangs, fflush doesn't work either

KenWhat I'm trying to do is simple: I want to connect to my server that I've written, and connect to it in PHP. (The server is written in Java, not in PHP.) <?php $client = stream_socket_client("tcp://myip:4812", $errno, $errorMessage); if($client === false) { throw new UnexpectedValueExceptio...

0
Q: permission denied format+en,default+en,i+en,corechart+en.i.js, line 83 character 16

Vijai2vijaiHi i am also facing the same issue on my site, In IE 8 the Google chart not displaying at all..while rendering the chart IE 8 rises the following error, permission denied format+en,default+en,ui+en,corechart+en.i.js at line 83 still i cant find why this is happening .please give me a solution f...

0
Q: About the PHP require_once

think123I recently came across this piece of weird functionality: index.php: <?php require_once("include/header.php"); ?> include/header.php: <?php require_once("./config.inc.php"); require_once("./func.inc.php"); ?> fooo! include/config.inc.php and include/func.inc.php are empty. When I tr...

-1
Q: i dont know how to combine my search engine with my pagination

user3089317i need some help here. i dont know how to combine my search engine and the pagination code.. can anyone help me? thanks a lot guys.. Here is my search.php code if(isset($_GET['tag'])) { $suffix = ""; $tag = mysql_escape_string(htmlentities(trim($_GET['tag']))); $errors = array(); if(empty($tag)...

-2
Q: How to isolate an HTML attribute?

ChunkerI have a website that I wan't to scrape every hour but that website is not even remotely organized, but i have found out that Everything i want is always located in a title="what-I-Want" So how do I get every instance of title="" on the page and dump it into an array?

0
Q: Pass a variable from JS to AJAX to PHP

Alex DanieliBelow is the code I have. The flow needs to be: -On button click, value is passed to JS -JS sets as variable -The variable needs to be sent to PHP without refreshing the page (AJAX?) -The variable needs to be output in php Can anyone show me how to do this? <a href="#modal-accept" data-to...

posted on December 24, 2013 by user3131548

I m a web designer and developer at fusion web technology in coimbatore. I have 6 month experience in this field. But they give three thousand salary only. It's not enough for my allowance. How they give to parents as a salary. So i call to chennai for Web development job. They told only 5 thousand salary. Chennai is a metro area. Defenetly not enough salary. At las

0
Q: Parse error: syntax error, unexpected T_STRING on line 29

Brian J KirkI am still pretty new at PHP and I am trying to incorporate html into my page, I keeping getting the following error and I cannot seem to figure it out. "Parse error: syntax error, unexpected T_STRING in D:\Hosting\11304243\html\cnghldb\cnghlplayerinfo.php on line 29" Line 29 is the second line ...

0
Q: C# to php cookie management recommendation?

snapplexI'm currently attempting to port an c# application to php and I'm have some problems when it comes to storing and retrieving the cookie data. C# allows me to retrieve and store all assigned and previously set cookies using the following lines of code below. From the research that I've done thus f...

0
Q: Url rewring using .htacess

Bhatt BhaskarHi I have url like below given How could I change url using url rewriting with help of .htaccess from http://www.test.xyz.com/ab/web/pds/dispall/web/web-design to http://www.web.test.xyz.com/ab/web/pds/dispall/web-design

0
Q: Half Grayscale by imagefilter()

Shivan RaptorI know PHP's GD library can apply grayscale filter to an image, for example: $img = imagecreatefrompng('test.png'); $img = imagefilter($img, IMG_FILTER_GRAYSCALE); imagepng($img, 'test_updated.png'); Is there any method that can apply half of the grayscale effects (which is similar to CSS3's f...

0
Q: can't log in after registration as a user in social network

preethi yogasundaramThis is my login.php page this is the code. i can successfully log in only at the time of register, but when i log in again after signing out i couldn't login again. i got the error that that the username is not correct. i don't know where the error is occurring. all the user info is stored in th...

0
Q: Post method working as get in zend

TuhinI am new to zend and I am trying to delete data from grid using post method but when I click on yes button it is working as get method. The url shows this [http://project.com/client/delete/id/10?id=10&del=Yes]. Here is my controller code. public function deleteAction() { if($this->getReque...

0
Q: CURL extension needs to be loaded for OpenCart to work! php-5.3.13 and WAMP

user3085661I am trying to install Opencart here I have get a warning that is CURL extension needs to be loaded for OpenCart to work!I have already download php_curl. and also replace it bin\php\php5.3.13\ext in here. Here in php extensions php_curl already on. But in install form showing me crul is off ...

0
Q: Cart is updated only once using Jquery and Codeigniter

atomaprchyaI am working on Updating Codeigntier Cart with Jquery using Ajaz call to update. Here is my jquery function $(function() { $('#booking_form_pick_up_method').on('change', function(ev) { var pickup_value = $(this).val(); var postData_updatecart = { 'pickup_value'...

0
Q: jqgrid custom function should return array

palPlease check following code snippet. When I enter future date through datepicker in jqgrid add form, then instead of showing validation message as 'Invalid Date Of Birth' other validation message is shown like-'custom function should return array!', please assist me.. function checkFamilyDOB(dob...

0
Q: Multiple insertion with same input name in php

user3131564I am just new in developing php using mysql as its database, i just want to ask how can i insert multiple data in which the input name or class name of my input are the same here is the look on my code: DateX Description 0 0 ...

0
Q: Redundant Database entry in fpdf table

user3131586I have a php page that fetches data from MySql database based on URL parameter sent from another page, and exports it as a pdf document. The problem i have is that the data is fetched properly (i have tested the query in dreamwever), it works fine, but when the data is displayed in a PDF table, i...

0
Q: Omnipay paypal integration with laravel 4

M. AwaisHello there pardon me for my stupidity because I am new. I want to integrate Omnipay paypal in laravel 4. I have gone through but I couldn't be able to understand how can I do it. I didn't find any documentation. I have gone through this, this and this. I have installed it using composer. Now ...

0
Q: How to build a search engine using PHP

user3131623There are a lot of pages on stack overflow that shows how to build a search engine using like query in sql.But this method becomes very slow when the database grows beyond 1 million.I am sure that search engines like google wont be using this method.Are there any tools to do this. Recently i came...

0
Q: URL Rewriting iand redirection issue

user3131633RewriteCond %{HTTP_HOST} ^seedscrew.org.crew$ [OR] RewriteCond %{HTTP_HOST} ^www.seedscrew.org.crew$ RewriteRule ^crew/([A-Za-z0-9-]+)/ "http\://www.seedscrew.org\crew/index.php\?mode=login&act=home" [R=301,L] I have written in in .htacess file. I want to redirect from hostpath/index.php?mode=...

-1
Q: Loading php content in div only

1994I have gone through this Link here at stackoverflow. Link but I cant seem to get the div loaded here is my code <div id="leftmenu" style="font-size:20px;position:absolute;top:12%;bottom:0;right:0;left:2%;"> <a href="#" id="details"> Form </a> </div> <div id="content" st...

-1
Q: How to get query result into an array in PHP

user3058736I have written a query on database the result is given in this form Apples-100 Grapes-200 Oranges-50 Bananas-30 now i need to store the data in an array like this [['Apples',100],['Grapes',200],['Oranges',50],['Bananas',30]] how can I acheive this i tried this while($row = mysql_fetch_ass...

0
Q: yii CGrid view in Yiistrap

user2492854In my web application for the TbGridview I need the records to be center aligned in the admin view page and also the layout should be stretched for the entire page .I tried making changes in the layout but its not working .Any body kindly help me how to proceed with this .

0
Q: PHP: Need to get a array from the another respected array list

user1669057Is there a possible to get an array as like #1 from #2. I tried many recursive loop to get this array but it make me so tough in this. Please guide me. #1: array([6] => array( [0] => array( [6]=> Light Motor vehicle [9] => Cars [10] => BMW ) ...

0
Q: Post tweet using twiterouath library

Desert Pi am tring post tweet using twitteroauth library. This is my code require("application/libraries/twitteroauth.php"); $twitteroauth = new TwitterOAuth(TW_KEY, TW_SECRET); $request_token = $twitteroauth->getRequestToken(); print_r($request_token); $tweet = new TwitterOAuth(TW_...

0
Q: How to share message on LINKEDIN from my site. But it should be display if site admin allows

user3131663I am using LINKEDIN message post api. In this if user allows then message post on LINKEDIN user's profile. But i want if user allows to share message on his profile then request should go on site admin(My Website) too and if he(site admin) allows to share message on user's profile then it should...

0
Q: Error in WordPress while moving site to new Domain

RahulI was trying to move my WordPress site to a new Domain. However When I imported my content I got the below error Message: Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2123623 bytes) in /home2/username/public_html/wp-includes/plugin.php on line 122 Could a...

0
Q: Array into mysql row

BEBOHello i have a dynamic form that can change field names upon user selection. i would like for the form result to be inserted into one mysql row.. i create an array as follows: <?php include_once 'dbconnect.php'; if (isset($_POST['item_name'])) { $table = $_POST['ItemTypeSelect']; ...

0
Q: Remove block area from dhtmlx scheduler

MahendraI am using DHTMLX Scheduler for booking an appointments. To avoid a double booking I have shown a block on a time slot which has already been selected by some other user but yet to be done with appointment process. I have set TimeInterval to check the status of appointment which is currently in ...

0
Q: PHP mailer Character encoding issue

Code HunterI m facing some character encoding issues like this: D\\\'Huison-Longueville Référence Original Text was : D'Huison-Longueville Référence Here is my PHP Mailer script: $mail = new PHPMailer(); $mail->CharSet = 'UTF-8'; $mail->IsMail();...

0
Q: how to get comments ,share and likes count of the post from linkedin using php

Kennedyhow to get comments ,share and likes count of the post from linkedin using php using below code i posted post in linkedin wall include 'simplelinkedin.class.php'; $ln = new SimpleLinkedIn('ket', 'secret'); $ln->addScope('rw_nus'); if($ln->authorize()){ echo "<pre>"; print_r ($ln-

0
Q: Read .DMS file and convert to pdf format in php

OzoneRead the file in folder with .DMS extension and convert to pdf format in php $path = "folder/1004.dms"; $content = file_get_contents($path); header('Content-type: application/pdf'); header('Content-Disposition: attachment; filename="test filename.pdf"'); echo $content; This code will gene...

0
Q: Return result from XMLHttpRequest in javascript

jQuerybeastI am sending a request on my server and trying to get the response. The response is either 0 or 1 from my PHP as such: $check = mysql_query(); if (!$check == "") { echo 1; } else { echo 0; } Now on the client side I am trying to get the response from a jquery function: function...

0
Q: zend framework 2 Db Select columns Grouping

James linI need a query to my database This is my database data CREATE TABLE IF NOT EXISTS `order_main` ( `om_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', `om_raren` varchar(20) NOT NULL COMMENT 'serial number', `om_total` int(11) NOT NULL COMMENT 'money', `om_freight` int(11) NOT NULL COMMENT 'fre...

0
Q: PHP mysql video uploading form check

Daniel Juhl SørensenHi i'm trying to make a video uploading site, where people can upload, and they can, but they can upload withoout choosing a file? This is my code :) <?php mysql_connect("IP","Username","password"); mysql_select_db("DB"); if(isset($_POST['submit']) && !empty($_FILES['file'])) { $nann = $...

 
7:25 AM
0
Q: Get string between strings and loop through content in PHP

user3111950The function below fetches only the first occurrence. In this case it returns: "John Smith jsmith@gmail.com", how do I get the other names with their corresponding Emails. I appreciate your help. <?php function get_string_between($string, $start, $end) { $string = " ".$string; $ini = s...

0
Q: Youtube Api retrieving data very slowly for some keywords

lalith458I am using youtube api data for retrieving youtube data using the below url link http://gdata.youtube.com/feeds/api/videos?q=hello&key=apikey&v=2&alt=json when i search for some specific keywords like 'songs hd' it is taking too much time to retrieve data, instead it takes less time to retrie...

 
7:37 AM
-1
Q: php mysql loop insert IP Address block

Santu RoyHow can i insert 256 IP based on /24 block. if IP block is 192.168.1.0/24 & network is 192.168.1.0 so i want to create a loop to insert 192.168.1.0 to 192.168.1.255 in mysql table . there will be a button when i press that it will insert 256 row 0 to 255.. Please help me to do it in php mysql ...

0
Q: create a component for joomla 3

adib16I am new to joomla. i create a component according to this docs from docs.joomla .this component install sucessfully on joomla 3. I go to this component by add this section in end of my url of my site. index.php?option=com_testup but I receive a 404 error. this is my file structure com_testu...

0
Q: Need a MySQL query that can filter the results

Manish ShresthaHere, the chapter_id can be two or more than two. I need to query in a way that every chapter give the output of equal no. of questions. i.e. If the total question is 50, and from 5 chapters, then each chapter should give 10 questions. SELECT id, chapter_id, question, answer FROM `questions` WH...

0
Q: creating optimized json from mysql table

rolodexid | name | title | tag ------------------------ 1 | matt | demo | a 1 | matt | demo | b 1 | matt | test | c 1 | matt | test | d 1 | john | demo | a 1 | john | demo | b 1 | john | test | c 1 | john | test | d given the table above is the result of JOIN-ing 3 table from ...

0
Q: Unable to find url requested account.php from server

user3048023I was new to yii-php-framework , i am making handshake function from mobile to php server , it is giving error as requested url was not found and showing my folder where code is diployed. can anyone help me pls..

0
Q: secure communication between two application

RudraI am just a fresher and being curious about the communication between two application. I know it can be done using API and by sending the get or post parameter to submit data from one application to another. but the question is, lets say there are two functions and 3 scenario.. all is in php. th...

0
Q: Before it works but now it does not work .SMTP Error: Could not connect to SMTP host

NAB<?php require_once('././php_mailer/class.phpmailer.php'); $mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch $mail->IsSMTP(); // telling the class to use SMTP try { $mail->Host = 'tls://mail.sipradi.com.np'; /...

 
8:00 AM
0
Q: Why doesnt variables with mathematical operations work?

Sai Krishna DeepI have a predefined array $ar . $num = count($ar) - 2; print $ar[$num]; I always get an error when I'm trying to do an opertaion like this. I have also tried print $ar[count($ar) - 2]; It gives me the same error yet again. I'm just frustrated.Tried so many ways.None of them work. How do i u...

0
Q: Exporting mysql html table to excel file

arokI am trying to query a mysql database and display data in a table.I now want to take the table and make a button that allows you to export it to an excel file.now you were able to export to excel,but its showing an error Notice: Undefined variable: data Below is my code: <?php $mysql_hostname ...

0
Q: yii cdbcriteria->with child table record not displayed in view

Maz IqbalIn yii based application Im working on a search query. query is performed on two tables customers and customerContacts // Customer can have one-to - many contacts in different countries Im using cdbcriteria as $criteria = new CDbCriteria; $criteria->alias = 't' ; $criteria->with= array("...

0
Q: Print a variable outside foreach loop

user3092049Hi friends i need to print a variable outside a foreach loop, but i don't know i can do it. There's someone how can help me?This is my code.Check it out if(is_array($arrayValues2) && array_key_exists(0, $arrayValues2) && is_array($arrayValues2[0])){ foreach($arrayValues2[0] as $aValue2) { ec...

 
8:30 AM
0
Q: How can I make my CodeIgniter instance a property of my PHP class?

ProdiklI've created a User database abstraction class in PHP which extends a base class I made called DBO (database object). The DBO object's job is just to hold $db as my codeigniter's $db reference. So ideally, in my User object, I could do $this->db->insert() and access my codeigniter's database obj...

0
Q: It is illegal to save ip address in database?

Jitu SinghI am running app on facebook. One user (from usa) complain me that its illegal to know ip address in his country. My app based on php and i just save ip address to determine double account or some cheating in my app. But now i am worried if its illegal. I use simple php code to get user ip. And...

0
Q: PHP/SQL Based File Manager

Tim BanonWith my latest project, I'm required to provide users a file manager for their private space on my server. Ive got the file manager to work as far as reading the SQL database for file info regarding location and ownership. My database has several tables for file management. • Files : id, usr, f...

0
Q: How to work with read more link from my own custom plugin

user3131904I have created a custom plugin in wordpress. With this plugin from admin we can upload product image,give a short description and give product details. Now with this plugin I want to show product image and short description and a more link in front page. Now when anyone click more link it will re...

0
Q: Use recurring payments with Paypal with "Paypal digital goods"?

Long NguyenI'm use "Paypal-digital-goods library" with PHP. i integrated for my website http://www.accessasia.tv/buy/buytmp/month_323761616E.html when i test with account sandbox then it work good, but have problem with it when i pick on is live site with account paypal and show error "Calling PayPal with a...

0
Q: reverse function of require/include

vivoconunxinoIs there any function that reverts a require/require_once/include/include_once? For instance in script A I need to require a script B wich has common functions witch other script C and I don't know if previously C was required or not. So I would like to "clean" script C from memory before loadin...

-3
Q: How to get "ipsum lorem ..." in PHP?

Manolo SalsasI'm looking for the function that gets (or echoes) the "Ipsum lorem ..." text, but I'm not able to find it. Anyone know what it is?

0
Q: Use many to many relationship for all models

randomUserWhat are the disadvantages of implementing many to many relationships for all models? I think it would be easy to manage if something that requires it happened in the future.

0
Q: Force restarting / alert CMD application if it stops working

ArfeenThis question is not directly related to PHP. The situation is, I have a scheduled PHP CLI task that runs every after 2 Mins (report generator). Sometimes, Windows encounters the error that CLI stopped working. When it is stopped, it does not execute the new task until we press "close" button on ...

-1
Q: Duration of mp3 file from URL in php

Mega4alikI know how to get mp3 file duration, if file is on my server. But What if I have URL? Ex: http://higgs.rghost.ru/download/action/49191165/mp3 What is the best way to do this on PHP? Thank you!

0
Q: Symfony2 Intl Exception

Aman Varshneyi deployed a symfony application on centos server but i am getting a error [Symfony\Component\Intl\Exception\RuntimeException] Could not load the resource bundle "/vendor/symfony/icu/Symfony/Component/Icu/Resourc...

0
Q: I cannot access cookie values in all php pages

Dmitri MendeleevI have a login page done in php and in that i am storing the username in cookie. But i cannot access this cookie variable in my home page which is also done in php, on thing i am doing all this in my localhost wamp server someone please help me to dothis login.php <html> <head> <lin...

0
Q: Change default function parametar

user2406735I have a function that saves images public function save($filename, $image_type=IMAGETYPE_JPEG, $compression=75, $permissions=null) { if( $image_type == IMAGETYPE_JPEG ) { imagejpeg($this->image, $filename, $compression); } elseif( $image_type == IMAGETYPE_GIF ) { imagegif($this->...

0
Q: if-query does not work PHP

Sebastian H.Why does it always insert something in the Mysql table, if i fill in nothing on the html website. My code: if($message =! ""){ $result = mysql_query("INSERT INTO Blog (Inhalt) VALUES ('$message')");}

0
Q: Dhtmlx Scheduler is not being update in TimeInterval

MahendraI've set setInterval to update my scheduler. I'm getting data from server in JSON format. But Scheduler is not getting update if I used json data, But if I put static values it works fine. Following is my code. // It doesn't work setInterval(function() { $.post('ajax_comet.php',{sectionIds:...

0
Q: Problems with spl_autoload_register()

CrasherI do have a problem with one of my php application. First of all my test environment is running on IIS with PHP installed. There I have the following code: <?php // define autoloader for all php classes $ps = PATH_SEPARATOR; // add default path seperator to a variable set_include_path(get_includ...

0
Q: Diagnosing bottlenecks when fetching data from API

user3010273I am running a dedicated server that fetches data from an API server. My machine runs on a Windows Server 2008 OS. I use PHP curl function to fetch the data via http requests ( and using proxy ). The function I've created for that: function get_http($url) { $proxy_file = file_get_contents("pr...

0
Q: form data not submitting

user3131961I tried to link my form to a php file but there was an error and data was not submitted. I dont understand how to fix it. help me fix it Form code: <form target="_blank" action="details.php" method="post"> <table> <tr> <td>First Name:</td>...

0
Q: From URL to PHP to MySQL, how to encode and decode UTF-8?

Russell HarperLet's say I want to send Unicode glyph U+CABC 쪼 via a web service to be saved in a database. For example, wget is being used to connect to a web service: shell_exec("wget 'http://doit.com/testing.php?glyph=.f(0xCABC)."'") Where f is the PHP function (or functions) to convert/encode/escape the ...

0
Q: What do I do with form data after I have validated and sanitized it?

user3066599(I found this but still dont understand) {HTML form PHP post to self to validate or submit to new page} I am sorry if this question is explained better in another place but I have been stuck for hours, have searched, and have just given up. I am going by the W3c website tutorial on how to valida...

0
Q: In PHP, using no output buffering, cannot write more than 400 lines in Chrome

kingleThis is a simple loop to print out 1000 lines. On my Windows 7 machine using Chrome and Zend Server, it shows only 400 lines and then stops without any error. If I change the time delay in usleep() to 200ms, it shows 600 lines and then stops. If I set the set_time_limit () to 20secs, it show...

-1
Q: Which of Omnipays payment processors allow for ACH debits

mhopkins321I really want to use Omnipay as it seems like they make it very very easy to process payments. However, I need to be able to do ACH debits and credit. Meaning, I need to be able to take from one bank account, and deposit into another. Of the big list that Omnipay integrates with, which of these o...

0
Q: Flash game screenshot generation

Roma  KliuchkoI'm working on web-site with flash games. And I need to generate some screenshots for each game. We have tried do that using Windows-extension COM: $Browser = new COM('InternetExplorer.Application'); $Browserhandle = $Browser->HWND; $Browser->Visible = true; $Browser->Fullscreen = true; $Bro...

0
Q: PHP Mysql CodeIgnitor Converting characters to symbols in very bizarre circumstances

KDawgPHP Mysql CodeIgnitor Converting characters to symbols in very bizarre circumstances Application Built on CodeIgniter. Has been running for over a year. No problems. Client fills in a form about a customer. A simple trim($_POST['notes']) captures textarea form field text and saves to MySQL no e...

-1
Q: PHP ini file Setup Linux

EnijarI've recently upgraded to a dedicated server; previously I was on a shared server, so I have no experience with the php.ini file. I've opened it and looked through it, searched Google and SO but nothing is clear to me. Can someone clear up, for me, the way to add/edit lines in an ini file and wh...

-4
Q: How to import a PHP function?

user3132024This is abc.php <?php function randimg() { $linez = "http://directurl.com/image1.png http://directurl.com/image2.png "; $ar = explode("\n",$linez); $num = count($ar) - 2; return $ar[mt_rand(0,$num)]; } ?> I want to import this function into into another file. new.php. Both the files are in sa...

0
Q: Magento : invoice print gives blank page on backend

NileshI have upgraded magento from 1.4 to 1.7.2, everything is working well,but when admin try to print invoice on backend , it gives a blank page, nothing in error logs I tried to change construct function to abstract public function __construct($filePath); in lib/zend/pdf/FileParserDataSource.p...

0
Q: MYSQL Select and Insert

snookianWhy wont this work! I have been pulling my hair out for days trying to get this to work $query2 = "SELECT * FROM temporders WHERE order_id=$id"; $result2 = mysql_query($query2); $row = mysql_fetch_assoc($result2); $osupplierid = $row['order_supplierid']; $odescription = $row['order_descript...

-1
Q: Include/require file inside a PHP function

user3132016I searched some topics but I did not find what I want. I want to use PHP mailer for send a mail who is register my website. I am adding my codes. I hope you can understand me and solve my problem. Thank you guys. public function register($username, $password, $email, $school, $gender){ global $b...

0
Q: Wordpress missing attachment link

jolenI have attached a pdf to a post under a custom post type - I've created a link for users to download but all that displays is Missing Attachment. I've checked the admin panel and I've definitely attached it to a post - I can't seem to get it to link to it. My Code is: $paged = ( get_query_var( ...

0
Q: Redirecting to other page with header

user3107003Here's my situation: Just a normal form: <form action="#" method="post" name="frm"> <input type="radio" name="building" value="studio" id="studio" checked/><label for="studio">Studio</label> <input type="radio" name="building" value="rijwoning" id="rijwoning"/><label for="rijwoning">Maison</l...

0
Q: CakePHP authentication

Tijs ProostI'm programming my own CakePHP authentication, is started out using an old script i used on another project. This error keeps occuring: Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /data/sites/web/ismartbe/subsites/cms.ismart.be/app/Controller/UsersController.ph...

0
Q: Find the last position occurence of each item in an array

SafwenI have an array like this : Array ( [0] => 2 [1] => 1 [2] => 3 [3] => 5 [4] => 1 [5] => 2 [6] => 1 [7] => 4 [8] => 2 ...) what i want to do is to find the last occurence of each item in this array in php so this exemple will output : Element|Position 2 | 8 1 | 6 3 | 2 ...

0
Q: Fill matrix word letters game

user3057111I want to develop a word puzzle game. I want to fill a matrix with letters. Some of these letters build words. the words are chososed randomly. So if we have a 4*4 matrix and we have like words "append", "event", "over","pow","efg","xx" we must have an algorithm that display results below: e|x...

0
Q: WordPress Tiny MCE Create Split Button

user3111124I need help creating a split button in WordPress TinyMCE (function() { tinymce.create('tinymce.plugins.Wptuts', { init : function(ed, url) { ed.addButton('dropcap', { title : 'DropCap', cmd : 'dropcap', image : url + '/dropc...

0
Q: array store in CodeIgniter sessions

SpookyMindzi am calling a controller with method setActiveId and store 1 array in session and display after storing by using var_dump($this->session->all_userdata()) it shows perfactly but in same controller when i print the session in other method say checkinkingPermission then the array in session is empt...

0
Q: Passing variable along Chtml button in Yii

anuIam trying to pass variable along with Chtml button in Yii using the following code echo CHtml::button('Update', array('submit' => array('serviceRequest/Update',array('id'=>$requestId)))); But it is showing 404 error due to the url problem. On clicking some dummy characters is getting added t...

0
Q: how to split the data of the form ["1","2","3"] and store in array as [1,2,3] in php

user3132041how to split the data of the form ["1","2","3"] and store in array as [1,2,3] in php. because i need this data inorder to get or fetch data from a mysql table which is having data as id 1 data red, id 2 data blue. so that i need the data to be coverted to 1 2 3 so that i can give it in query to ...

0
Q: Where to put the _DB_Prefix_ and the $id_manufacturer?

user203558I've the following code: $query = "UPDATE `'._DB_PREFIX_.'specific_price` sp SET sp.`from`=NOW(), sp.`to`=DATE_ADD(NOW(), INTERVAL 19 HOUR) INNER JOIN `'._DB_PREFIX_.'product` p ON (sp.id_product = p.id_product) WHERE p.`id_manufacturer` = '.(int)$id_manufacturer"; //Run the Query $resul...

0
Q: PHP Curl - Upload file to Sharepoint

Martin ShinksShould I be able to use PHP Curl to upload a file to Sharepoint. I have this logic that I am using at the moment to "try" and upload to "My Shared Document" for now. $the_file = file_get_contents('index.html'); $user = '&&&&&&&'; $pass = '&&&&&&&'; $ch = curl_init(); curl_setopt($ch, CURLOPT...

0
Q: Disable Submit Button and Enable Afterwards

MONZTAAAI have a form created with a submit button. What i`m trying to accomplish is that when the button is clicked and the form starts to submit I want the button to be temporarily disabled and after the form has finished submitting to be enabled again. Any clue on how to do this?

0
Q: running php switch based on ajax post

MathiasHello everyone and merry christmas :) I've been working on a little ajax script since yesterday, and now i've encountered a problem. I've got a submit form with a select input form, and i wish to load a php page through ajax when this form is being submitted. Now in my php page, i have a switch...

-1
Q: OOP GD Image Creation PHP

SideshowI am very new to oop php and need to create a class that will create a rectangle with a dynamically defined username embedded in it. Basically, a user_id is passed into the class which then gets the username. I then need to return the new image. At present I am not too bothered about the constru...

0
Q: Output Get Variables with multiple arrays in PHP

SteveI am perplexed in getting the GET Variables for the url of this specific page. The URL is :- http://thisthat.com/category/?field_issue_month_value%5Bvalue%5D%5Byear%5D=2013&field_issue_month_value%5Bvalue%5D%5Bmonth%5D=10 I am trying to output both of these GET variables. I tried following w...

0
Q: Created a delete button with delete php function but does not work

swissedI am creating a simple blog but I don't manage to make the delete button work. I think I am missing out on the button? I am well aware of SQL INJECTION and PREPARED STATEMENTS. I will be dealing with them later. There are no errors with connection. My delete query is in a function deleteArticle...

0
Q: Wordpress hooks and filters in form process

LeviColeSo I'm new to these hooks and filters in wordpress and what I'm trying to achieve is when a form processes it writes to the database in md5 and shows in the backend not in md5, but in its original state. I have form which writes to the database and also creates a custom post type containing the ...

0
Q: Storing credentials with Google Drive SDK

Nicolas BridotI'm working with the Google Drive SDK in php To allow my application to interact with my client Google Drive Account, I need at one point to store the credentials. These credentials has a Json structure that I guess can be stored as a String or something like this. My problem is that I don't re...

0
Q: How to get the list of friends in facebook for logged in user using PHP?

user3121733I am using the following code to get the list of friends for the given secret key , how to get the list of friends for logged in userid (irrespective of appid, and secret id). <?php $facebook = new Facebook(array( 'appId' => 'appId', 'secret' => 'secretKey', 'cookie' =>...

0
Q: PHP, Jquery, JS. 2 buttons on each other, how to click them by 1 mouse click?

Rimantė BaltiejūtėPossible to make, that by one mouse click 2 buttons will be clicked? I mean if buttons If are on each other. I've tried to hide (set opaticy to 0) one of them, but only one is clicked which one is in front. Maybe could I use pointer-events, but I don't know how to make It successfully? Or It...

0
Q: Login/Register system! Works good in the localhost but not on the server

HatefMy login/register system works good on the local host, which means user can register providing some credentials and then can login with them. But when I try it on the server although the "registration form" says "You have been registered successfully!" which is exactly the same as localhost but ...

0
Q: Is there any function in mediawiki to get thumbnail by image name?

RajaramanI want to show thumbnail of image in search results page. I can get image name in search results page, So using this how can i get thumbnail url. If there is any alter way please share with me. Thanks

0
Q: json string decoding for array

user123My code is as below. $code = json_decode($json,true); var_dump($code); echo "1"; echo "Numbers of tweets containing this link : $code->{'count'}"; //some issue here line (x) but var_dump($code); gives: array (size=2) 'count' => int 1602 'url' => string 'ht...

0
Q: Why is PHP typecasting behaving like this? (int) mis-rounding numbers?

EvanCould someone please explain what is going on here? echo (18.99 * 100); // output: 1899 echo (int)(18.99 * 100); // output: 1898 The only thing I can possibly think of is that the 1899 is actually 1898.999999999999 or something and PHP is converting it as part of echo somehow? If this is the ...

0
Q: Acces to an DOM attribute

Kargoli have an array of a DOM object, how can acces to the ["textContent"] attribute ?. object(DOMDocument)#3 (34) { ["doctype"]=> string(22) "(object value omitted)" ["implementation"]=> string(22) "(object value omitted)" ["documentElement"]=> string(22) "(object value omitted)" ["actual...

0
Q: Why and how is my PHP memory being exhausted?

KenI am getting the error PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 33292313 bytes) when i am running my pagination function and i don't know what is happening and/or why i'm getting the error. From what i've seen on the other questions here, most peopl...

0
Q: How should a View be structured in MVC?

JohnGiven a model layer as in the accepted answer on How should a model be structured in MVC? How do I structure the View? Currently I am simply rendering a Twig template in the Controller, but this seem to be the wrong approach according to the answer. <?php namespace Controller; class Home ext...

0
Q: Multiple Month PHP Calendar

user3129227I have a php calendar that works fine for THIS month but I'd like to create another 2 scripts that show the next 2 months. I want to use the same format as the one I already have but I'm not completely sure on what I need to change to get it to display the dates of months 2 & 3. Here is my code ...

0
Q: Can't separate Ascii symbol from hyperlink

EricI'm current displaying my recent posts in Wordpress with the below script, but I can't get the ascii symbol to be apart from the hyperlink. If I hover on a recent post then I see that the ascii symbol is also part of the hyperlink. <ul> <?php $args = array( 'numberposts' => '2' ); $rece...

0
Q: Sql query working in database but Using PDO its not working in YII

Rohit Kumar ChoudharyIt is very frustrating for me I am stuck in this query. I have a attribute table where there is code column exists. There is a mapper table which maps entity with attribute. Now when I run direct sql of this in database it returns me back data but using PDO it shows exception which I have given...

-1
Q: Timeago with PHP

user3047285I need to convert 2013-12-15 14:42:07 to something like 4 mins ago. My current code outputs Warning: Missing argument 1 for ago(), called in C:\wamp\www\exp\index.php on line 30 and defined in C:\wamp\www\exp\index.php on line 8 and ( ! ) Notice: Undefined variable: time in C:\wamp\www\exp\index...

1
Q: Include path confusion

Amy NevilleI'm a bit confused why this path doesn't work: include("../../WEBSITE/GAME/champion.php"); The file that it is running in is a cron file that executes every 24hrs it is located in ROOT/WEBSITE2/CRON_FOLDER/cronfile.php I wanted to go back to the http root and then work forward from there bu...

0
Q: Cannot execute JSON.parse() under 1.10.2/jquery.min.js

user3059850It is work if I use the JSON.parse() to parse the PHP array return if applying 1.3.2/jquery.min.js but not 1.10.2/jquery.min.js, do anyone have similar experience and solution? PHP array return $returnArray['vercode'] = FALSE; echo json_encode($returnArray); AJAX call $.ajax({ cache: ...

0
Q: create a session as error displayer for forms or functions error

user3132141I am developing a site and I am quite new to the subject. I had an idea of making a session variable that contains forms and functions errors or successful alerts. Instead of redirecting to the same page. Also, overcoming the problem of displaying success alerts in case of redirect to some php en...

0
Q: Change date/time settings on IIS 7 server

Jason LipoI have run into problems accessing APIs like Twitter and LinkedIn. I think that the problem with this is due to my server's date and time settings. I found this solution: - Open IIS 7 - Select your website - Open .NET GLOBALIZATION - From Culture tab, select required Culture and UI Culture. - Do...

0
Q: Split an array according to values

NeeksAssuming I have an array like this : Array ( [0] => Array ( [0] => SERVER1 [1] => 2013-02-09 [2] => 2 ) [1] => Array ( [0] => SERVER2 [1] => 2013-02-09 [2] => 2 ) ...

0
Q: What do the numbers in mySQL createTable methods mean?

expiredninjaI have the following php script that builds the tables I need for my site. include_once 'rcfunctions.php'; createTable('rcmembers', 'user VARCHAR(16), pass VARCHAR(16), INDEX(user(6))'); createTable('rcmessages', 'id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, ...

0
Q: phpexcel use variable for a dinamyc range area

user3092049i want create a dynamic range to scan value from an excel sheet.The code that i use is: $tipo2 = $col1= $objPHPExcel->getActiveSheet()->rangeToArray('C'.$i:'E'.$i) but rangeToArray('C'.$i:'E'.$i) give me back an error. Do you know i can use variable for a dinamyc range area?

0
Q: Single table relationship with two different tables

user2993220My database schema; LIKE PAGE ARTICLE id id id userid name text The question; How do I make a relationship between PAGE table and ARTICLE table with LIKE table? Normally; Like.php; /** * @ORM\ManyToMany(targetEntity="Page", inversedBy="likes") */ protected $...

0
Q: retrieving direct messages twitter api

user2183923I want to retrieve direct messages from twitter using TwitterAPIExchange.php. The settings in my application are: write/read and direct messages. What I am missing? Merry Christmas CODE: $getfield = '?count=5'; $requestMethod = 'GET'; $twitter = new TwitterAPIExchange($settings); $string = js...

0
Q: Facebook photogallery on my website

user3132254i have problem, when i try to include photogallery from facebook. I use this solution http://kevinp93.com/facebook-images-on-website-v2/ It works fine for these facebook pages: facebook.com/pages/RM-facility-s-r-o/177721112253368?ref=hl facebook.com/pages/Sokol-Klecany/112373465475972?ref=hl ...

0
Q: Backwards compatible PHP SOAP interface

Mart BleggerI've got a PHP webapplication that's connected with another application using SOAP. In order to maintain the connection when updated my application, the interface needs to be one version backwards compatible. Does anyone has an idea how to fix this, eg: Creating a different input for each versi...

0
Q: Adding images in prestashop products before you order

Toni OjsteršekWelcome I would like to do an online store that you could choose a product and add your picture could be edited (for example, trimming, zoom, ...) and when this file created you can order and I would get the order. Do you know a store or some plugin? I have an example here -> http://www.custom...

0
Q: converting twitter short url to original and getting numbers of tweets containing that url

user123Here I am getting url from tweets, converting that url to long url. And then getting count value for numbers of tweets containing that url. $reg_exUrl = "/(?<![\>https?:\/\/|href=\"'])(?<http>(https?:[\/][\/]|www\.)([a-z]|[A-Z]|[0-9]|[\/.]|[~])*)/"; // The Text you want to filter for urls $text...

0
Q: PHP Dynamic form( $_POST)

user3132286so.. I'm facing a problem with dynamic form/ $_POST... I need to echo the image i selected via radio button in the if(isset($_POST['Submit_bc3']))... But it's not working, I don't get it.. How can i make this problem go away? Code: <?php $image_url...

0
Q: curl post complains that a radio button has not been selected

mk_89I am trying to submit a form using curl, the problem is the form has a radio button and when I try to post the correct value of the radio button I get the error "An option has not been selected", this of course refers to the radio button. I'm not sure why this is happening but is there anywhere ...

-1
Q: I want to know a function can change charactere into Html Entities?

Abouduraniumi want to know a function can change charactere into html entities with php language. 1605;ُ ثَلاثَةِ أيّام&#1613

0
Q: i am new in dealing with php and getting one syntax error i.eunexpected T_VARIABLE in C:\wamp\www\happyminds\mail.php line

user3132242 Admissions Name : Mobile Number : Phone Number : Email *: Name of Organisation : Birth Date of Child : 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 January February March Ap...

0
Q: using multiple url parts in action in zf router

nvaneschI want to use 2 parts of the url in the action name with zend framework routing. $router->addRoute( 'user', new Zend_Controller_Router_Route('user/:actionpart1/:actionpart2/:userid/*', array('controller' => 'user', 'action' => '????')) ); Now when i go to the URI /user/Foo/Bar/12 I want...

0
Q: Yii Custom Form Field Id Ajax Validation CActiveForm

user3132270I'm making a system that stores Yii Forms in a database. I'm having troubles getting one thing to work. I have several Forms on the same page which are all called DynamicFormModel. To achieve validation on each field I had to use the 'id' and 'inputID' HtmlOptions on my fields and error message...

0
Q: Handle multiple form with dynamic HTML element ids through jQuery

NitinI have a situation where my php page generates multiple forms based on the data received through an rpc call. My requirement is to handle jQuery modal confirmation for these dynamically generated form elements but I'm at a loss since jQuery is unable to handle this in my case. I have tried JSFi...

0
Q: Error while accessing json key

Reccur NishanI have the following json data Merchant_stripe_response Object ( [_response:protected] => stdClass Object ( [object] => customer [created] => 1387883058 [id] => cus_3BFTkHufSbD1I9 [livemode] => [description] => Order #22 ...

0
Q: Filtering pivot table data with Laravel models

user1544110Let's say I have three tables (this is just an example): users user_id username roles role_id name user_roles user_id role_id primary (boolean) And the corresponding laravel models: class User extends Eloquent { public function roles() { retu...

0
Q: Magento rendering .php pages to html

user1758412From last 3 days i am reading about magento [eCommerce website development tool].Any body know about how it is work.Means when we deploy it on server,how the php pages are rendered into html format.Any dll or php interpreter or compiler who renders the php pages into html format before it sent as...

0
Q: Php scripts structure is corrupting When it is uploaded to Server

user3083067PHP scripts on ide looks reular before uplode to server.But When Its uploaded to server its structure Corrupts.Im using FileZilla for Uploading. Examle Before Upload <?php echo 'This is'; echo 'Regular'; echo 'Code'; ?> After Upload <?php echo 'This is';echo 'Corrupted';echo 'Code'; ?>...

0
Q: Laravel 4 - How to use 'offset' in stead of 'page' with Eloquent's ->paginate()?

Casper BakkerI am migrating an existing REST API to Laravel 4.1, and the API currently uses offset as querystring parameter to specify what the offset of the records needs to be. I would like to use the default Eloquent's paginate(), but these searches for the page querystring parameter. And of course it use...

0
Q: how to give dynamic data from database into wow slider in jquery mobile

user3132041at present am using some static data into slider in wow slider jquery mobile. But i need to fetch the data from db and place it in silder. Can someone suggest me to do that thanks. the code am having at present is <div id="wowslider-container1"> <div class="ws_images">

0
Q: Array of objects become object with objects after unset function

Djordje PetrovicI'm using Mongo DB and Slim PHP in my app. In mongo I have this array of objects "dashboards" : [ { "_id" : ObjectId("52b96365481b9c02091d8698"), "title" : "Default title", "subtitle" : "Default subtitle", "metric_views" : [ ] }, ...

0
Q: jquery ui autocomplete special characters

JesterI created a small jquery example with jquery UI autocomplete $(function() { //autocomplete $(".selector").autocomplete({ source: "getdata.php", minLength: 1 }); }) getdata.php: <?php if (isset($_GET['term'])){ $return_arr = array(); try { $connect...

-1
Q: 500 internal server error - php

user2850992I am running 1 website on my server. That website has search facility. When I search for category named "apple" at that time its showing 10 results and I am getting search result page fine and fast. [RECORDS ARE PAGINATED 10 records per page] Now, When I search for "orange" named category at th...

0
Q: ZipArchive is not creating an archive on Windows

MarwellnI'm trying to create an archive of a folder in Windows, but the archive is not created. $zip = new ZipArchive; if ($zip->open('archive.zip', ZipArchive::CREATE) !== true) die ("Could not open archive"); $iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator('H:/Binary...

0
Q: Apostrophe causes error

Jim RaymondHappy Holidays folks. I have come a long way with the help I have received here. Thank You. I have created an HTML form to enter data for my movie collection and it works fine as long as there are no apostrophes in the title or any actor's name. If there is I get an Error X. I can enter it d...

0
Q: Unexpected error launching Internet Explorer. IELaunchURL() returned 80070057

Michael KnollI have a Selenium Server as a standalone node running on a Windows Virtual Machine in VMWare Fusion on a Mac. My tests are triggered from within a Centos Vagrant box on the same machine. My tests are implemented in PHP using the php-webdriver API from Facebook. From time to time, IE seems not ...

0
Q: Returning the last two set of records mySQL

wa262well, i'm new to MySQL Database and i got a problem, i need to get the last two set of records from a table ( the records are automatically added to this table every week) i need to use to find the growth that an entity did during the last week. can any one help plz. here is what i wrote, i t...

0
Q: Get the dynamic category link for wordpress custom quary from specific category

facebook-100000574566979To get my requirement i used below code... <div class="home_single_item_headline"> <?php query_posts('post_type=post&category_name=Browser&post_status=publish&posts_per_page=6&paged='. get_query_var('paged')); ?> <a href="<?php bloginfo('url'); ?>/category/<?php $category = get_the_category();...

0
Q: Integrate a blog with node.js app on heroku

Bran AlgueI have a node.js app that's deployed on heroku. I use bootstrap in general and want to embed a blog into website. Wordpress offers help for php only that I can't use in junction with node on heroku. The solution is either to write another app in php (that I haven't dealt with), deploy it again an...

0
Q: Appserv PHP: Can't find the web page

user1557984I'm using Chrome. After installing Appserv 2.5.9, browser can't find the webpage. I looked into C:\AppServ\www there is a file name "index.php" in there. I've ever used ASP.NET before. So I opened IIS Manager and stopped its service. I also checked "services.msc" and saw that Apache has been st...

0
Q: How to add header location properly with something more?

sarmistha<?php session_start(); ob_start(); include("config.php"); $user=$_POST['fname']; $pass=$_POST['password']; $result=mysql_query("SELECT * FROM user_detail WHERE password='$pass' AND email='$user'") or die("Couldn't query the user-database."); $row=mysql_fetch_array($result); if(!$result) { ...

0
Q: How to reverse hashed and salted password ?

user3132112I am using vBulletin and the login uses this to cross-refer to the database. md5(md5($pass).$salt) How do i make a php script such that every password input will automatically be hashed and salted as well so that it is able to authenticate with the vBulletin database ?

0
Q: How can I pass an Id to a new page in ajax

user3051827I have getreviewid(id) which displays the review details shown below //get a review by id function Getreviewid(id){ $.ajax({ url: 'http://creative.coventry.ac.uk/~4078078/moviereviews/v1.0/index.php/review/reviewid/'+id, dataType: 'json', success: function(data) { ...

0
Q: not working sending array from php to javascript in joomla3.2

user3132240I am trying already this many days but somehow I cannot find the write answer neither in the formus nor bymyself. I have thousands of data in a table in SQL. I have an article from joomla, where I have some divs and inside one of them I used {jumi} to add a php file. Inside the php file I have c...

0
Q: Trouble with PHP GnuPG encryption

smclintockI'm trying to encrypt a string using the PHP GnuPG library on my Linux server hosted on Rackspace, however I keep getting an error message no matter what I try. Please see below: Fatal error: Uncaught exception 'Exception' with message 'no key for encryption set' in /var/www/vhosts/royal/faceboo...

0
Q: Redirect incoming url to a subdir [htaccess]

SimoneI'm struggling with this from hours... what i have is a domain with (virtual) subdir based on languages so domain.com/en for example. The point is that it is indexed in goggle and this structure is changers since few days so old links point to domain.com/postname I'm trying to do a redirect so...

0
Q: Undefined Index - Even with Isset If statement

user3115396Can anyone tell me why I am getting an Undefined Index error on my code here. I have used this setup using the if(isset) condition in other parts of my project after researching my original Undefined Index errors and ISSET fixed my problems. But it is not working here for some reason and I cannot...

0
Q: Cakephp Unit-testing and mock objects

user3099794I want help for cakephp unit-testing and mocking objects in below scenario: 1.] I have one vendor file for which i want to make mock - (mock object for that file/class) and stub one of it's method. i.e. my vendor file is Vendor/Twitter and i want to make mock object of it in Test/Controller/User...

-5
Q: how to convert string into an array in php

PuneetPlease get the string and let me know that how can I convert it into php array. $data = 'medicine[0][barcode]=44444444&medicine[0][name]=57&medicine[0][medicine_name]=sge&medicine[0][quantity]=5&medicine[0][cost]=135.00&medicine[0][subtotal]=675&medicine[0][tax]=0.00&medicine[0][discount]=0.00

0
Q: php code to comment on youtube video

user2995370I am using following code to add comment on youtube video. please can anyone tell me what is the problem. each time it says "Invalid token 401" error. I have checked access token is ok and other thing also i have checked out. and array values are : Array ( [0] => Content-Type: application/at...

0
Q: Php Calling the functions of same class one after another

Hilmi Erdem KERENI want to write something like (laravel uses): View::make('FooBarView')->with('foo', $foo) ->with('bar', $bar); My knowledge and imagination made me to use new self instances. But I don't think that this is the best idea around and I could not handle it. Google couldn'...

0
Q: how to display the alert when the iframe embedded video playing,pausing,buffering

lalith458I am replacing div content with the iframe when we click on it using jquery, How to display the alert when the video in the iframe is playing,pausing,buffreing. Can any one tell me how to fix this issue..

-5
Q: My Page Is hacked how can i recover?

user3131491My client website page is hacked and the hacker put the link of malware on the video please help me that how can i remove the malware script from my php code www.bigbankpookie.com/gift/ this is the site when you close the the website the pagesplash for the gift.the gift page is hacked pleas...

0
Q: How to handle javascript made inputs

user3132378I have a problem, i searched for the solution all over the internet, but i couldn't find it out :S The problem is: I'm creating file inputs on button click, but i can't handle these javascript made inputs because they aren't in my $_FILES array after i click on submit.. My code is: HTML: <fo...

0
Q: What is the sence of a mock object in PHPUnit?

Sjors van DongenI'm developing a intern app which send some emails in a view methods. Now I'm rebuilding this app TDD-style but I'm stuck at some point. I searched the web for how to test emails with PHPUnit and the solution was, use mock objects. I read some articles and tutorials about it and built a test with...

0
Q: mysqli::real_connect(): (HY000/2005): Unknown MySQL server host

Dvir LevyI have an SSH tunnel on my MySQL server that points to a another MySQL server. I am upgrading my database drivers in Codeigniter. This means that everything worked properly using the PHP MySQL divers. After updating my files and changing my connection config array From: $config['host...

0
Q: How to ignore/exclude folders with RecursiveDirectoryIterator?

MarwellnI'm using PharData to create a tar package. It works fine but it includes a folder i don't want. How can I exclude a folder in the archive? <?php $dir = "/foobar/dir"; $iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($dir) ); $phar = new PharData('/mytar.tar'); $phar->

0
Q: return number of contacts updated in google contacts through api

dipanshuwe have written code in cakephp to enter contacts in Google contacts through api, Contacts have added in Google through Google xml request , but how can we get total number of contacts added or updated in Google contacts after code successfully executed

0
Q: Slow location search

Matt MI have an issue with a search function, it works correctly but is taking between 14-18 second to load and that is causing me great pain. This is the search function I am using: $sql="select *, ( 3959 * acos( cos( radians( $lat ) ) * cos( radians( lat ) ) * cos( radians( lng ) - radians( $lng )...

0
Q: Accessing Object Properties (Drilling down without array conversion)

The Humble RatI have recently been working with tv_grab_uk_rt which generates a TV guide xml file. I have written a script to convert the XML into an object which I can the loop through and insert into a database. Whilst I have the script working, I came across an issue I was looking to get clarification for. ...

0
Q: PHP Count Showing 2 Elements in Array, For Loop Loops 4 Times

user3057706I have an array that I want to loop through. Using: echo count($places); I get a value of 2. Similar print_r the array gives 2 items. However, when i run a for loop it seems to go through 4 iterations. This can be seen by adding echo $i to the loop, which produces an output of 0,1,2,3. This...

0
Q: Not able to access array in ajax response in setInterval

MahendraI've function which send a request to server every 5 second. I have send two array variables in ajax request. to get result. How ever I'm not able to access second array in response. check my code. <script type="text/javascript"> sectionIds=<?php echo json_encode($blocksection);?>; currProcessing=

0
Q: symfony 1.4 form sfWidgetFormInputFile

user3123720I had probleme with sfWidgetFormInputFile symfony 1.4 when I uplaod my picto.png she change extension for my file picto.txt he work find in my local but in server prod I had this probleme. class ImageForm extends BaseImageForm { public function configure() { $this->widgetSchem...

0
Q: Cant get \n to work in php

Professor HaseebI'm trying to echo a string and the string contains "\n" and "\r" in it, but when it executes it still shows the "\n" and "\r". Here is what I'm doing. $url = 'http://whoiz.herokuapp.com/lookup.json?url=madithouse.com'; $response = file_get_contents($url); echo $response; It echos every thing...

0
Q: how to stop the redirection of login lightbox, if username password is wrong?

sarmisthalightbox <div class="modalBody"> <form method="post" action="login.php"> <table> <tr> <td>User Name*</td> <td> <input name="fname" type="text" class="input" value="" /></td> </tr> <tr> <td>Password</td> <td> <input name="password" type="password" class="input" /> </td> </tr> <...

0
Q: call to a member function execute() on

user3045295Having trouble with line 27, Don't quite know why as I am very new to PHP/MySQL. Was wondering if anybody can advise me why I am getting the error; "Fatal error: Call to a member function execute() on a non-object in C:\xampp\htdocs\testscripts\usercreate.php on line 27" in the following ...

-2
Q: what codes are needed for the following password changer?

usminuruThis is my HTML form contains the password texboxes. <html> <head> <title></title> </head> <body> <h2>Change Your Password</h2> <form name="passwd" action="passwd.php" method="POST"> E-Mil:<input type="text" name="email" ><br> Old Password:<input type="...

0
Q: Image upload to Temp Folder warning

onejedFrom the script below, can anyone tell me what I've done wrong to get the warning message on output of the script? The upload script is - Code: <?php // Access the $_FILES global variable for this specific file being uploaded // and create local PHP variables from the $_FILES array of informat...

0
Q: How to add Leads module's "description" field to global search of SugarcrmCE 6.5.14?

bcrajkumarI'm using sugarcrm 6.5.14 community edition, I know how to add a custom field to the module's basic & advanced search from the module builder. I've entered lot of key information at Leads "description" field. I'm unable to find a suitable solution to add it to the global search field that loca...

 
12:43 PM
0
Q: PHP routing explode

Alvaro Carvajal NakosmaiWell im trying to recreate a routing system currently I have this namespace libs; class Routing { public static $routes_get = array(); public static $routes_post = array(); public static function get($uri, $controller, $method, $filters = null) { $real = explode('/...

 
 
2 hours later…
2:19 PM
0
Q: how to override default elgg core action using custom plugin

prashantBelow is my code for extending the view and action using default plugin. my plugin name customregistration start.php file initialise necessary things. i want to handled the plugin code which effect without doing changes in core part of the elgg. Any help is appericiated.. thanks in advanced.... <...

0
Q: Symfony2 demo controller not rendering html

user3132561I am trying to test the demo bundle which come with symfony AcmeDemoBundle. I can reach config.php but when i click welcome page then i see the html source code not the html rendered output I am using symfony dev server not apache

0
Q: Disable HTTPS for particular ZF1 module

Kapil SharmaRequirement: I've an existing site in ZF1, running on HTTPS. Following is setting in virtual host for that: DocumentRoot /srv/sitename/public ... SSLEngine on SSLCertificateFile /etc/apache2/server.crt SSLCertificateKeyFile /etc/apache2/server.pem Now problem is, we want to add few pages (a ...

0
Q: (2014) Commands out of sync; you can't run this command now

Hari VaagHi I am a newbie to mysqli and SP Ive the below code in which i have to run 2 SP nested as below in the code I get the error "(2014) Commands out of sync; you can't run this command now" Anyone who can help me on this would be highly appreciated Thanks $mysqli = new mysqli("localhost", "root...

0
Q: APNS Connection failed. Working on mac, Not on server. Ports are open.

mialkanI have been trying to send push notification on my server but I get this error Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.push.apple.com:2195 (Connection timed out) in /home/mialkan/public_html/pushPro.php on line 15 Failed to connect: 110...

0
Q: wordpress Fatal error: Call-time pass-by-reference has been removed in /home/xxx/public_html/wp-content/themes/xxx/functions.php on line 202

Web8.ushi i have this error in my wordpress webpage: wordpress Fatal error: Call-time pass-by-reference has been removed in /home/xxx/public_html/wp-content/themes/xxx/functions.php on line 202 200 class pont_Walker extends Walker_Nav_Menu{ 201 function end_el(&$output, $category, $depth, $args){ 202 ...

-3
Q: rich snippets for cms products within template page

Rene RijnaarsI am having difficulties in adding rich snippets foor products within the template that shows up the products, get errors all of the time i try to add a snippet. maybe someone can help me

0
Q: php pdo select query doesn't work

Albeei'm new to php PDO, i've made a query to select users in db and display them in a html table but i get no result, and there is no error message. print_r($connexion) returns "PDO Object ( )" here is the code. thanks for your help! connexion to db //connexion.php function connexion(){ try { ...

-3
Q: Php: search categories and subcategories

S raju I have search category using ' Like ' in database . my doubt is ,if you search movies ,then movies will come..after with movies 27,28,29 has to be come that is the target .. how can we write login for that this is the database table..plesse help me

1
Q: why string is greater or less than the integer?

sidI am not able to get it that why the statement gets true both the times.? $hello="foo"; if($hello<=6){ echo "yes\n"; } if ($hello>=0) { echo "ohh yess!"; } it outputs yes ohh yess! I do know this is illegal comparison between integer and string,but why af...

0
Q: Curl Error :error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number

user2849371I have the following code which gives me "Curl Error :error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number" error. $url='https://mysite/login'; $clientcert = "C:\\client.crt"; $keyfile = "C:\\server.key"; $challenge = "passphrase"; $CAFile = "C...

0
Q: How to change file content upon Reading?

user3132024This is my requirement. I have a fixed file. "http://file.com/image.png". Upon opening this image everytime, there should be some random image instead. If not, how do I just change the contents of the file had it been ".txt" Thanks

-2
Q: Error in converting SOAP XML Respone to Json Array in php?

prakashWarning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 1: parser error : Start tag expected, '<' not found in /home/travelho/public_html/testapi/test.php on line 24 Warning: simplexml_load_string() [function.simplexml-load-string]: &lt;?xml version=&quot;1.0&quot; encoding=&

0
Q: How to get data from script and display in php form (dialog box)?

Sapthagiri I have a requirement where <div class="button" id="room_open" value="<?php echo $Records['room_id'];?>" onclick="tappedOnRoom(<?php echo $Records['room_id'].","."'".$Records['room_status']."'".","."'".$Records['block_num']."'";?>)"><?php echo $Records['block_num']."-".$Records['room_id'];?></div>...

0
Q: PhoneGap Client - Server game

user3132628I'm going to develop client-server game using PhoneGap. Using HTML, CSS, JS in client side and PHP, MySQL on server side. This is turn-based game multiplayer game. So the question is how can I better initiate (or emulate initiation) from server to clients, to let them now about opponent turns a...

0
Q: Sending pdf file from php to android

upakicI'm getting data from android and send them to php where's creating pdf and sending back to android. All i got is empty pdf file in root of sd card. Can anyone help me? public class MainActivity extends Activity { Button go; EditText name; EditText pass; Spinner date; String...

0
Q: displaying images from mysql in php in rows and cols

srinivasankannai need to display images from mysql in my gallery. i have a responsive template. i have around 40 images in my mysql i want to fetch images and display it in gallery view of 4 column per row and it should go to the next set here is my code for the html gallery <ul class="row box2"> <li ...

0
Q: Looking for tutorials on making a blog website

user3099450I have been googling for a bit and can't really find what I'm looking for. I was wondering if any of you could link me to some websites/tutorials that show you how to make a website that has dynamic updates either if it's a blog or just has an updates page where the admin user can update the sta...

0
Q: Elfinder filemanager

user2322791I am using laravel 4 and i want to use Elfinder filemanager but it does not work. I have tested Elfinder on my localhost first. Elfinder works seperately, but not in laravel: This are the includes in my master page. Could there be a problem there? {{HTML::style('filemanager1/css/elfinder.min.cs...

0
Q: Using AJAX to pass a generated image from PHP back to javascript

D. RattansinghI have a php file generating a diagram as an image - this is working fine This php file has to communicate with javascript (via ajax) to load this image in the html Initially I got it working by placing this in the javascript: document.getElementById("img3").src="ajax.php?area=" +encodeURICompo...

0
Q: Can't get mySQL to put in number as new column

HenrikI'm trying to get numbers from a form to become a new column in a mySQL database. Here is my form: <form action="henkehaxx.php" method="post"> Anvnamn: <input type="text" name="anvnamn"><br> Drinkid: <input type="number" name="drinkid"><br> Betyg: <input type="number" name="betyg">

0
Q: Search Box no result, PHP SQL

user3112117I am trying to put an if statement to get the search box working, but for some reason no data at all comes up: Can you help me to correct the if statement to get it working fine. <?php if (isset($_POST['submit'])) { //capture search term and remove spaces at its both ends if the is any $search...

-3
Q: mysql_fetch_assoc variable in while loop is not working

szumelWhy is working? while ($result = mysql_fetch_assoc($query)){...code... } Why is not working? $result = mysql_fetch_assoc($query); while ($result){...code... } Thanks.

0
Q: Split text into words with special characters

erdomesterI am using this code to split a text into an array: $wordArray = preg_split('#\PL+#u', $text, -1, PREG_SPLIT_NO_EMPTY); Altough this divides google.com into google and com, and what's into what and s. I have to admint preg_split is chinese to me, can you help with this? Example: $text = "Wha...

0
Q: Need to refresh Admin page twice to load it correctly in Magento 1.8.10

batmannavneetI am trying to install vanilla magento 1.8.1.0 on a fresh new server, but after installation, on every admin page I go, I have to refresh the page twice to load it correctly. When I just click on a link, only the header loads (without menubar) and the body is empty. If I refresh the page, it loo...

0
Q: Want to add multiple plugin types to a php program

Rodney GrumpI am currently rebuilding an outdated module for a CMS. The specific CMS is not relevant here but I am working with a minimum of PHP version 5.3.7. While a database is available I want to NOT use the database for the building of this plugin system. Because this module has a bunch of security fl...

0
Q: PHPmailer content from a php file

EvolutioI have Mail templates with Variables that I want to display in the email. I add the E-Mail to the Mailer with: $mail->Body = file_get_contents(INCLUDE_PATH."lib/mails/password_revover.php"); but I cant output date('Y'); in the email, how I can solve this?

0
Q: Buttons in while loop in php

user3001104I want when click on show details appear details for url detect ,but i can't find solution for this problem. i can show details to all urls because it in while loop but i want for one row??? please help me this code : <div class="content"> <a href="logout.php" class="a-btn">

0
Q: Select Only One Thread and Attachment

user2854563I'm working on a way to fetch 7 threads from threads table with one attachment (if more then one attachments posted in a thread). I'm using this query; QUERY : $query = $db->query(" SELECT a.thumbnail, t.tid, t.subject FROM ".TABLE_PREFIX."attachments a LEFT JOIN ".TABLE_PREFIX."pos...

0
Q: Select Multiple Ids from a table

Irene T.I want to select some id's based on url string but with my code it displays only the first. If i write manual the id's it works great. I have a url like this http://www.mydomain.com/myfile.php?theurl=1,2,3,4,5 (ids) Now in the myfile.php i have my sql connection and: $ids = $_GET['theurl']; (a...

-1
Q: $_POST variables not pulling over

tycoonbobStill working on a simple web app, but am running into an issue where $_POST variables aren't pulling over. edit.php: <html> <head> <link rel="stylesheet" type="text/css" href="includes/styles.css" media="screen" /> <title>Inventory</title> </head> <body> <?php include 'includes/dbconne...

1
Q: CHtml Link returns null for parent

user3048231I created a url using Chtml::Link like this: CHtml::link("Remove", '#', array('class' => 'delete'))) Now, when user clicks it i send a ajax request like this: $('.delete').click(function(e) { e.preventDefault(); $.ajax({ url:'" . $this->createUrl('//shop/shoppingCart/delete') . ...

0
Q: Php and XML for a newbie

Jacques Attalistill new to php (3 days) i'm facing a new problem, i have this simple xml file : <iPhone> <anEvent> <data1>some Data</data1> <data2>Some data here </data2> </anEvent> <anEvent> <data1>some Data</data1> <data2>Some data here </data2> </anEvent> </iPhone> What i want...

0
Q: PHP date to show 2 digits on pre-teen numbers

user3129227I have a php calendar which displays all of the dates perfectly on the page but I need the pre-teen dates to display as a 2 digit number ( 01, 02, 03, etc ) but they are not showing up like that - How can I do this as it's important for the end link, i.e. href="events.php?date=20131201" instead o...

0
Q: How to preg_replace html tag to allow only two of theese in a row

Aigars CibuļskisI watched other topics, but didn't found an answer. So I'm using CKeditor, and I need to limit the count user could make new lines. So if user makes 4 new lines, output for this would be: <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> I need to block this "feature" and after preg_repl...

0
Q: php login system with jquery mobile

hyphenI'm trying to incorporate my php login system into the mobile version of the site I'm building with jquery mobile. So at the beginning of my index.php page, I'm requiring init.php, in which session_start(); is called. I'm using the following code to block certain pages depending on whether th...

0
Q: Is this a good way to declare routes in php

Sreedev SBinclude('static/routefiles/router.php'); $hai=new Router3; $home=array( '' => array('ALL','title'=>'Home | Adhoks','inc'=>array( 'model/allposts.php', 'model/snapshots.php', 'view/header.php', 'view/rightbar.php', 'view/content/home.php'...

0
Q: Paypal Upload Command - How to encrypt/secure dynamically generated payment amounts?

stewbydooAlright so I saw a question similar to this but thought my situation was a little different and warranted a question. So I am working on a site that allows you to select from two dropdowns. I'm using jQuery to keep track of when these drop downs change. Then based off of the change I update the P...

0
Q: How to troubleshoot PHP assertion failed error in WooCommerce?

user3132724For a website I host I'm encountering the following error in my Apache error_log: PHP Warning: assert() [function.assert]: Assertion failed in <>/wp-content/plugins/woocommerce-cart-reports/models/AV8_Cart_Receipt.php on line 259 The site is running WordPress 3.6.1 with WooCommerce 2.0.14....

-5
Q: Regex PHP Javascript for names

Fábio LinharesI have been searching for a regex for names but i didn't find the one i want specifically for my situation. The regex that i'm searching should: Be 1 to 50 characters long Accept utf 8 Accept - and _ and ' only in the middle of text Have one or more names so it has to allow spaces Work in php a...

0
Q: display row numbers continuously in pagination

Anirban MukherjeeI am new in pagination. In my code the numbers are starting from 1 in 'next' page again and again. It should not start again with 1 and after 10 or user choice input, it should start from 11 and so on. here is my code.please help $aColumns = array( 'question', 'answer'); $sIndexColumn =...

-1
Q: Saving to DB from Ajax

user3132770So I basically want to save all interactions happening on a web canvas I built but something is going wrong. So I have the following code on my javascript: Tools.logInteraction=function(x){ var url = 'interaction.php'; $.ajax({ type: "POST", url: url, dataType: 'te...

0
Q: mysql query doesnt work by php | work by phpmyadmin

user3132766One of my PHP functions just not work. Mysql returns success but it doesnt UPDATE column that i want. I really no have idea why that problem exist. So here is the function that UPDATING it: function savePhone($phone) { dbConnect(); $q = "UPDATE site SET phone = '$phone' WHERE id = 0"; $r = ...

0
Q: mysql: 1 INSERT INTO query two result

user3098638I have a table user (id VARCHAR(5), name VARCHAR(30)) I used INSERT INTO query in two way: Directly: ... $sql="INSERT INTO user (id,name) VALUES ('00001','abcd'); ... ---> result: id(00001), name(abcd). That's the right result. By function: function insert($id,$name) { $sql="INSERT INTO us...

0
Q: Magento Image URL copy

MilthirI have to copy some image url in magento. The user uploads his products on the admin form, and uplouds a picture only for the smallest size. All type of products have a configurable product. Eg. Configurable: Nike short Simple: Nike short S - have picture Simple: Nike short L - don't have pictu...

0
Q: How to exact difference between 2 dates in php

SriI want to find difference between 2 dates in php.But I am not getting exact difference. please help me. The output I must get as "2 years 0 months 0 days". But I am getting as "1 years 12 months and 4 days". where I am wrong? $createddate="2015-12-24"; //find difference between the dates presen...

0
Q: Creating a container function for a PDO query in PHP

SteppingHatBecause I find PDO executions extremely hard to remember and find myself looking back at previous projects or other websites just to remember how to select rows from a database, I decided that I would try and create my own functions that contain the PDO executions and just plug in the data I need...

0
Q: wamp server cannot open Localhost

SajjadI am new in php and now i installed wampserver 2.2 application and when i click to Localhost option, the "Unable to connect" page shown in my Firefox browser. this is my www folder: And this is my index.php file: <html> <head> <title> Hello To PHP Learning! </title> </head> <body> <?php ...

0
Q: LocomotiveCMS alternative for PHP?

user3132485I really do like ruby and locomotivecms, but I need to implement PHP code in my sites and there is no way neither to insert ruby code or to rewrite the php code. Could you please recommend PHP framework + PHP content management system with the ability to easily create models in the cms (like in ...

0
Q: Created class will not run query

ConcreteEntreeI'm having issues running this code here: <?php include_once "global.php"; class Project{ //Variable declarations public $name; public $pm; public $members; public $details; //Not sure if dates are necessary yet //$startDate = $inStartDate; //$endDate = $inEndDate; ...

-1
Q: How to add in every img tag a rel attribute with the help of php?

anny32I have a variable $mydata (my code is in php) which includes text and some pictures. Every picture included is in this form : <img src="mypicture.jpg" alt="lala" title="lala" border="0" /> This variable $mydata which has text and images after is inserted into my database (mysql). What i want ...

0
Q: Get error when fetching image from picasa

user3106347I am getting following error when trying to fetch image from picassa in my php application Object of class Zend_Http_Response could not be converted to string in C:\wamp\www\test\example\list.php on line 49 Below is my code <?php // load library require_once 'Zend/Loader.php'; Zend_Loader::lo...

0
Q: holidays in mysql for multiple stores

user3132821it is a very simple question, but the solutions are soo many I'm having a hard time figuring out the different performance issues. Before checking if a shop is open following this method: Find next time business is open; mysql hours calculation I need to check whether the shop is on some holid...

-3
Q: Most secure web server and scripting language for tor

user245809Hello Stackoverflow members, I have a question split into three parts. First of all, what is the most secure web server for linux? I have heard of thttpd but I'm not sure if it is all that secure. What is the most secure server side scripting language? Again I have heard PHP is a mastermin...

0
Q: Create a rolling graph in SQL

user3132837I want to start with full disclosure. I am very very novice with SQL. I am working with an energy monitoring system that collects gas/water/electric usage data and stores it in a database on my computer (sql). We have set the database to query the system to help us find peak usage among other ...

0
Q: Wordpress thumnail issue

wizard86i have some issue with Featured Images on my wordpress template. I want to display the thumbnail image of the post in full size inside him and miniature in the blog homepage. where i did it wrong? Waiting for your help. Thanks In advice functions.php http://pastebin.com/XddnXGep page.p...

0
Q: Ajax call insert

user2827958I have 2 ajax calls one to insert data, one to get data. Together with the functions for select and insert. the console log of the ajax call select is empty. However, when i check phpmyadmin the correct value is there. If i start the game again, there will be 1 value (from previous game) but the ...

0
Q: PHP Using MD5 to secure a $_GET function

user3132865I'm using a $_GET function in php to perform functions for my Java server. The website is similar to this: http://api.somewebsite.com/perform/function.php?authkey1=randomMD5&authkey2=randomMD5&parameters=something Where the variables authkey1 and authkey2 represent a randomly generated MD5. The...

0
Q: login page, circular redirection+including a header

user3125917I have a problem with circular redirection on the page. I don't know how I can escape it. I have a header page with all the db connectivity and the session check for all the other pages. I need to include it into login page but I don't want the menu to be displayed on it, I only need the header f...

0
Q: How do I add HTML 5 type attribute to larval blade?

philly2013I have this line in blade format {{ Form::text('date', null, array('class' => 'form-control', 'type' => 'Date', 'placeholder' => 'Date' )) }} but when the page loads the type attribute does not get resolved to 'date', it goes to 'text'. How do I get this in blade? <input class="form-control"...

0
Q: ios :which way is better to send data by POST method?

PawriwesI am moving data from sqlite to webserver(mySql), from iphone to web and php will be landing site which insert data in mysql after getting data in POST format. I am using NSURLConnection in ios. I am confused how to move data, so I figured out that I should append all the data in string from a ta...

0
Q: Updating Div By Number Input

citizen_of_noobvilleI have a number input and I want this field to update a div each time I update the number input. By number input, I mean this: <input type="number" name="year" id="year" min="2013" value="2013"> I added this code piece, but it does not work. How can I achieve this? Thank you very much. <...

0
Q: cakePHP: Plugin or Component?

Скач отI want to build a plugin or component that would take my data array before save, see if there are files to be uploaded (I will check for fields named attachment, image, thumb and gallery), upload them, create thumbnails if needed, write entries in the appropriate tables and modify the data array ...

0
Q: INSERT query not working even though the syntax is correct

user3092687My insert query isnt adding anything to the database, i checked my syntax and it is correct $id = $_SESSION['id'];//the current book id $name = $_SESSION['username'] ; $rating = $_POST['rate']; $review = $_POST['review']; echo "<br>"; echo "$name"." -$rating"." -$review"; $insert = mysqli_query...

1
Q: Symfony2 Custom Authenticator, core cannot find file?

Ivan RisticI'm trying to create a custom authenticator and I followed the tutorial here: http://symfony.com/doc/current/cookbook/security/custom_password_authenticator.html But I'm getting this error: ServiceNotFoundException: The service "security.authentication.manager" has a dependency on a non-existe...

1
Q: Check if variable ends with

V.Donchevi have the variable $uid that always contain a number. I want to execute different actions depending on how the $uid ends. For example: if(&uid ENDS WITH 2,3 or 4) {echo "Some content"}; else if($uid ENDS WITH 1,5 or 6) {echo "Some other content"}; else if($uid ENDS WITH 7,8,9 or 0) {echo "Some...

0
Q: Sending 5000 push notifications at same time, keep the connection to apple open?

MarkRight now I'm using the following piece of code to send my push notifications function applePush($deviceToken,$sound,$message,$object,$thread = 0) { $passphrase = 'Secret'; $ctx = stream_context_create(); stream_context_set_option($ctx, 'ssl', 'local_cert', 'secret.pem'); ...

0
Q: My MySQL database was wiped and I think it was a SQL injection, where am I wrong?

user3053446So I have a test DB that is live, I was away for the holidays and come back and my MYSQL DB is wiped of data (only about 8 lines). It was all test data so I am not worried about it, my thoughts is that I was SQL injected through my PHP signup form but I don't see any vulnerabilities here. I am ...

0
Q: htaccess with RewriteEngine On slowing down page load

user3132858I have .htaccess enabled only for two rewrite URL tasks but I found that it is slowing down the website. Is there any alternative to using .htaccess? I don't have access to httpd.conf on the server as this is shared hosing service so I am looking for something else. This is the .htaccess code: R...

0
Q: Iterations in a while->fetch loop not working

KenI have a function that extracts the details of an item in a database, and adds it to an array before returning it. Currently, i am trying to query the filepath of any images related to the item and add it to the array.To do this, i run the query with PDO, fetch the filepaths using a WHILE->fetch ...

0
Q: Retrieving Specific MySQL Field Data in PHP Based on Primary Key Value using $_GET['ID']

user3132907I'm trying to find the correct way of pulling specific field data from a MySQL database. I am using the $_GET but it shows all the data and id. How can I get the data from a specific ID(primary keys). <?php mysql_connect('localhost', 'root', ''); mysql_select_db('leave'); $sql = "SELECT *...

1
Q: How to unit-test an abstract class, when its constructor executes its abstract method(-s)?

automatixI'm writing PHPUnit unit tests for this Zend Framework 2 class: <?php namespace MyNamespace\InputFilter; use Zend\InputFilter\Input as ZendInput; use Zend\InputFilter\Factory; use Zend\InputFilter\InputInterface; use MyNamespace\Exception\InvalidParameterException; abstract class AbstractInput...

1
Q: Type hinting - specify an array of objects

Yoav KadoshHow can I specify the argument type as an array? Say I have a class named 'Foo': class Foo {} and then I have a function that accepts that class type as an argument: function getFoo(Foo $f) {} When I pass in an array of 'Foo's I get an error, saying: Catchable fatal error: Argument 1 pa...

0
Q: PHP Authencation System Admin Panel Manual User Verifacation

user3132932is that I have already created a system but I am tweaking the admin panel for manual user verifacation. How the system works, Register for your site name iD but when you register you have to confirm your email address before your account to become active, but if for some reason the user can conf...

-2
Q: how to pass a php variable using form hidden input to another page using POST method?

user3004295This is page 2 $var= $_GET['var']; $id= $_GET['id']; echo "Book Title:<br>" .$var. "<br> Book id:".$id."<br>"; $result = mysqli_query($con,"SELECT * FROM books WHERE bookid='$id'"); while ($row = mysqli_fetch_array($result)) { echo "<br><br>Author:<br>".$row['author']...

 
4:32 PM
0
Q: Zend same template for different modules

Mattvb91I am developing a system which has mutliple user levels. However most of the time the views inside each modules should be the same. For example a user view should be 99% identical to the admin view however an admin can have some small extras like delete buttons on user posts etc. What is the be...

0
Q: Opencart: Automatically processing orders based on product model number...?

DeadlanceOk, I'm pretty sure I'm stretching Opencart beyond it's normal usage... but I'm trying to figure out the best method of performing this task. I have products in my shop that are software. I have a module that assigns a serial number to the order once it is placed. The serial number is based on w...

0
Q: PHP salt and hash SHA256 for login password

Simon_saysI've made encrypting of the password in my register script and in the database encrypted passwords are stored, and for login i have to use them to login, so I would want to use the unencrypted ones to login. I've read some of the threads in here but nothing is helping me, it just doesn't want to ...

0
Q: When is it appropriate to return a 305 Use Proxy in an API?

Andy NovocinThis is my first SO question please be kind. Every now and again when building an API you encounter a request which takes a while to process. A long API process can cause the request to timeout. (In my case a PUT or a POST method which involves uploading to and communicating with a third par...

0
Q: Starting point regarding CMS

user3132993I am currently reading up on a lot of HTML(5) and CSS and so far so good. I am at the point where I can create a -in my opinion- good looking webpage. That aside, I would like to be able to easily have content added to the websites I create, such as blog posts, images, etcetera. Scouting the we...

0
Q: PHP WebSockets with Ratchet - example doesn't work

jovanHere's some background first. 1) My aim is to use Ratchet WebSockets to create two-way client-server communication. 2) I have installed ratchet and accompanying software, as described here. 3) I have successfully created a Hello World application as described here 4) Now I am trying to create Pu...

0
Q: Loading a textfile in javascript / asynchronous nature

n asI need to read a text file into an array in Javascript. 1) I got this basic code off of stackoverflow: var myArray = []; $.get("../MyFile.txt", function(data){ myArray = data.split('\n'); }); 2) The code works great when called from the original loading of a php page. 3) The ...

0
Q: How to make search term stick in box after POST and after cliking after that

A.RDoes anyone know how to make a search term stick into the search after the POST is made, which is my current method. I need the search term to stick in the searchbox even after clicking on somthing else in the site. Here is my current code- <input type="text" name="searchterm" <?php if(isset($_...

0
Q: Why does this Wordpress loop only show the last image?

alliefaydenI'm new to Wordpress and I'm wondering why this loop is only displaying the last image instead of all of the images. Any reference? Here's the link, too: http://87cen.com/desmob/ <?php get_template_part('templates/page', 'header'); ?> <?php get_template_part('templates/content', 'page'); ?> <?p...

0
Q: Get Categories and Subcategories Codeigniter

DarioI have an issue getting the subcategories from the same table, the subcategories have a parentid that represent the main category. Where i'm wrong ? My structure is the next. Controller: $cats = $this->categories_model->getCategories(); foreach($cats as $ct){ $cat_id = $ct->id;...

1
Q: send notification to mobile and get feedback from user

user2965598i am working on a project, there is concept i dont know how to deal with it. I need to send notification to the user on their mobile device, to understand lets take an example :- like i want to ask to my friend weather he wants to go for movie or not. i need to send notification to his mobile de...

0
Q: Session expire is not functioning well

Wilsonhello friends this is a variable to automatically expire session <?php session_start(); $SESSION['expires_at'] = time() + (300); header("Refresh: 300; url=sessionexpire.com/Log-out.php"); ?> and in the Log-out.php, i destroy the session there and then redirect it to sessionexipre....

0
Q: Start typing in form on load of document?

lhoward96I'm trying to make an inventory management system for someone, and one of the goals of it is to just go down an aisle of boxes and go beep-beep-beep with a barcode scanner to log all of UPCs. What I'm trying to do is make it to where when the scanner scans something, the page automatically recogn...

0
Q: Symfony 2 Doctrine:Fixtures:Load Undefined Index

xanesis4I have been using Symfony2 lately, and I've been following this tutorial: tutorial.co.symblog.co.uk Unfortunately, since the tutorial was written a long time ago, many things are wrong. I've been able to fix most of them through the employment of common sense, but this one is tricky... I'm crea...

0
Q: PHP $_FILES superglobal only containing name

PwnageAtPwnI've checked all over, including links like: http://getluky.net/2004/10/04/apachephp-_files-array-mysteriously-empty/ PHP upload file - only $_FILES['name'] is populating Etc and tried all the suggestions but to no avail. I've even went the the extent of var_dumping the $_POST and $_FILES: arr...

0
Q: Trying to accomplish a 'slideshow' effect loading multiple pages

fergusonkwI'm fielding a request that someone essentially wants one master page with their logo at the top, and the remainder of the page will load a series of pages (populated by a static array) and then repeat itself. My intent is to have a page load in the 'content' div element, wait a period of time (...

0
Q: Display text based on SESSION in PHP

Rocco The TacoI have the following line of code that displays a user's first name once logged in. I had text that says Welcome, before the echo statement but it looks silly unless you are logged in. Is there a quick way to only display Welcome, if the session FirstName is not empty? <h2><?php echo "".$_SESS...

0
Q: php query result in html option

Nicola Cambarawhy i get a white row and not the value? $connessione = mysql_connect('localhost' , 'root', '') or die("Impossibile connettersi: " .mysql_error()); mysql_select_db("musica",$connessione); $query = mysql_query(...

1
Q: How to make an img tag valid according to w3c with str_replace or some other php function?

anny32Lets say we have an image tag but is not w3c valid beacause in the end is missing "/>" : <img src="myfile.png" alt="MyiMage" title="MyImage" border="0" > Then how we can replace this with str_replace par example or an other php function so that we can make this image valid like : <img src="my...

0
Q: Production PHP on a WAMP environment?

Abdullah HassanI am planning to run multiple applications in php, asp.net and some other languages in a single dedicated webhost, and have those apps fully available to the public. Some of the apps are now on a LAMP configuration and they are fine at handling ~100,000 users a day. I'm wondering about the down...

0
Q: PHP webservice request and response

NickFI'm using PHP 5.3, and trying to develop a simple web service that gets some parameters with POST method and has a response. function start(){ getAndValidateParams(); global $response; echo json_encode($response); } function getAndValidateParams(){ // token (mandatory) if(i...

0
Q: Downgrading PHP 5.5.6 to PHP 5.3.16 in XAMPP

user2954081Due to the need to match the client's environment, I need to downgrade current PHP 5.5.6 to PHP 5.3.16 in XAMPP. Just FYI, the Apache in the current XAMPP is version 2.4.7. Can someone please help me on this matter?

0
Q: Wordpress Widget "is_active_sidebar" always returns true

taitoI want to create a facebook-like-box widget in wordpress: <div class="widget-content"> <div class="fb-like-box" data-href="<?php echo $fbpageurl; ?>" data-width="260" data-colorscheme="<?php if ( is_active_sidebar('sidebar-1') ) { ec...

1
Q: The "SHOW COLUMNS" query in PHP doesn't show first row

Colorado_mynydd_dynHappy Holidays everyone I am new to PHP so any assistance would greatly appreciated. I am, like a lot of people, working on a web site with PHP and mysql access and I am seeking to write a page where I can set or adjust my site parameters and store them in a mysql table called "Unit_parameters"...

0
Q: Standard PHP File Includes

Jack TrowbridgeIs there any standard php files that should be included like bootstrap and a config file? These files are extremely useful, are there any other best practice files?

0
Q: Behat - Implement Step definitions

Tommy02I am having difficulties in setting Behat framework correctly. The test runs fine, however the step definitions are not being picked up from the FeatureContext file. Have tried out answers from other questions with no luck. The behat.yml file is currently stored in the root of the project: defa...

0
Q: Session variables not being posted

walkawazeI am using PHP 5.3.6 (Yahoo) and having issues with the saving/retrieving session variables using $_POST. I have recreated the issue in my development environment (PHP 5.5.6) by setting ENABLE_POST_DATA_READING=OFF. I am new to PHP and have struggled 1st figuring out the cause, and now with t...

0
Q: how to integrate the generated link by wunderground.com into my website

b. mounaimein fact I am a beginner in the field of API and this is the first time I registered on wunderground.com, and I follow the documentation to generate the key ID. later I found links and codes. Forecast in French http://api.wunderground.com/api/2ea138a9dd52eabe/forecast/lang:FR/q/France/Paris.json...

0
Q: Retrieve data from table with foreign key

user3116846I was wondering how can I retrieve data from table3 with the use of 2 foreign keys. I will show you my tables first then try to explain what I am trying to do and how I am doing it. Table1 ID Primary key Table2 ID Foreign key foodID Foreign Key Table3 foodID Primary key food So I would firs...

0
Q: MySQL Retrieve Weekly events stored with DAYOFWEEK

KaktusI have lessons stored in a table. Theses lessons are repeated every week, so I only store the index of the day (0: Sunday, 1: Monday, etc...) Here's an example: (My real table has much more columns) ID NAME DAY 1 English 1 2 Math 2 3 Physic 3 If I want to get the les...

0
Q: Collecting a password without hashing it?

MMcDonaldThis question is regarding the protection of a password that I can't hash/encrypt. In my web application I'm salting and encrypting account passwords with the use of BLOWFISH. I've come across a password I can't hash/encrypt as it's the applications external SMTP server. What should I do to secur...

0
Q: Notice: Undefined index, why?

user3024597I am trying to make a library system, everything is going well, but I faced with such a error Notice: Undefined index: user_log in C:\xampp\htdocs\e_library\top.php on line 23 and line 23 is here: <?php $user_log = $_SESSION['user_log']; if (isset($_SESSION['user_log']))...

0
Q: get end date automatically using specific days in php

user3132845When Start date is given it should get the end date by fetching only sunday or mon, tue, wed or ,mon to fri or tue, thurs, sat using php. pls anyone help me..... Here is my html code: <label>Start Date:</label><input type="text" id="txtStartDate" name="sd"></input> <td>days</td> <td> <s...

0
Q: SimpleXML inserting new line

user1487091Have this sample.xml: <FacturacionAR> <Factura xsi:type="FacturaAR"> <TipoNota>Boleta de Ventas y Servicios</TipoNota> <Agencia>LUIL</Agencia> <NroFactura>5040</NroFactura> <Cliente>JOHAO SMITH CART</Cliente> <Ciudad>NUNORK</Ciudad> <Direccion>CALLE VITAL DE MELLO</Dire...

0
Q: Undefined offset: 0 in C:\xampp\htdocs\Sites\ooplr\classes\DB.php on line 120?

user3119898I am trying to set permissions to users and when i put this in my database config code public function hasPermission($key) { $group = $this->_db->get('groups', array('id', '=', $this->data()->group)); print_r($group->first()); } with the combination of this code that is in in my my ho...

0
Q: Simple DataTable initialization with Ajax and PHP

SebastianI'm just having some trouble initializing a DataTable using Ajax and PHP. According to the inspector the error is: Uncaught TypeError: Cannot read property 'length' of undefined jquery.dataTables.js:2649 (anonymous function) jquery.dataTables.js:2649 oSettings.jqXHR.$.ajax.success jquery.dataTab...

0
Q: Difference betwwen CodeIgniter Site Url and base Url

NidheeshHello What is the difference between SiteUrl() and BaseUrl() ? In my previous project it is base url but now in my new project it is Siteurl.Why this happens? Is baseurl() is an outdated one

0
Q: uploading file via ftp using codeigniter

Muhammadi am trying to upload a file using ftp class of codeigniter for that i have written the following: $this->load->library('ftp'); $config['hostname'] = '127.0.0.1'; $config['username'] = 'localftp'; $config['password'] = ''; $config['debug'] = TRUE; ...

0
Q: how many default variables can I define in a php function definition?

marcnycI read somewhere that when you define a function you can define a default value for a variable that you might use or not use, like so: function test( $a, $b, $c=0 ) { if ( $c != 0 ) echo 'a + b + c = '.( $a + $b + $c); else echo 'a + b = '.( $a + $b ); } I was wondering...

0
Q: Timezone Day is Incorrect, Time is Fine

Michael CookiesNcreme Mackaydate_default_timezone_set('GMT'); $datetime = array( 'year' => date('Y', time()), 'month' => date('m', time()), 'day' => date('d', time()), 'hour' => date('G', time()), 'minute' => date('i', time()), 'second' => date('s', time()), ); I use this...

-2
Q: basic html menu links

jambulshey guys i just wanted to ask on the norm for making links. ok so basically i have the links on top of my page, home , about us and what not. now this menu is in common for all my pages, so id be super efficient and just load in the content in a div called content. so basically my question is...

0
Q: Xpath Select text

user3133118I have been playing with xpath and I can get it to work when I select paragraphs however this text doesn't seem to be working. Here is the html <span id="favorite_count" style="display: block;"> <span style="cursor:help; border-bottom: 1px dotted black;" title="Active members who have made you...

 
00:00 - 18:0018:00 - 00:00

« first day (308 days earlier)      last day (2 days later) »