« first day (280 days earlier)      last day (30 days later) » 

9:05 PM
-3
Q: Error __construct() must be an instance of nterface, none given

bencarter78I'm developing a package for Laravel and I'm getting an error which I can't figure out how to fix: Argument 1 passed to Cartalini\Drayman\Drayman::__construct() must be an instance of Cartalini\Drayman\Repositories\UserRepositoryInterface, none given, called in /Applications/MAMP/htdocs/l4/ap...

0
Q: PHP array determined with JavaScript?

user3019672I have a problem with complicated JS determination of exact item: this PHP/SQL code: $prod = array(); $vys = mysqli_query($db,"SELECT * FROM produkty ORDER BY nazev"); while ($arr = mysqli_fetch_assoc($vys)) { $prod[$arr['id_typu']][] = "<option value='".$arr['id_produktu']."'>".$arr['nazev']."

-1
Q: Saving Valu in Variable

user3023297I am trying to save ['data'] in variable. ['data'] is column in database which shows result from my database. For example it is showing me code like 8 now I want to save this in variable so I can use it in any other thing or can multiply variable or plus Here is the actual code echo "<td><hr>" ....

0
Q: PHP repeats results on page 2?

user3010610I've been trying to add pages to a project I'm working on. It works okay so far, except when you go to the second page of threads it will repeat some threads from the first page. I'm new to php, and pretty stuck at the moment. Any help is appreciated, thanks! Heres the bit where it displays the ...

 
9:16 PM
0
Q: How to get file upload progress from the code igniter?

DattaI just want to get the file upload progress in code Igniter.Please don't recommend any j-query integration as it is not the matter right now. Just give me a plain solution that could be done to get file progress in code igniter. This is my code to uplaod pictures: $base=$this->config->item('bas...

0
Q: PHP Comparing a File to a Database

user2939503I'm trying to upload a file to compare to database, then return a .csv file with all of the lines which do not match. I'm a real newbie at php, so if you could be nice and point me in the right direction, that would be great. For example: File uploaded has the following in the first column: 1 2...

0
Q: .htaccess RewriteRule html and txt files

Zakithis is my htacces file RewriteEngine On RewriteBase / RewriteRule ^(.*)$ index.php?url=$1 [L,QSA] It's work ok but I have one question. If I add to my page files for google in example with .html or .txt i can't see it in browser... How I can change that rule that I could see files from google.

0
Q: how to have got the same google in my web site

pi-2ri'm looking for a tutorial or a web site who explaine how to make one google map like this site: https://www.codeclub.org.uk/ I would like to do the same google map for my web site. thanks you for your answer :)

0
Q: HttpRequest class not found php ubuntu

Iwan1993I am trying to use the HttpRequest class which should be in the PECL_HTTP extension of php. I have php5 and used the following to install pecl_http. sudo pecl install pecl_http pecl/pecl_http is already installed and is the same as the released version 2.0.1 install failed After that i enter i...

0
Q: modifying jomsocial code for code

user2513528i was wondering if someone could help me, i'm using jomsocial, and with the groups function of it, there is two options when creating a group, either public or private, when its set to public anyone can see all of the content on the group and join without approval, and the private option, only me...

0
Q: RSS Feed Time is an Hour Off when parsed through PHP?

Cody SThis is probably a super simple question - but I'm a little boggled. We're pulling in an RSS feed to list events on our site - but ever since DST they've been showing up as an hour behind (on the main, separate site they're showing up just fine). For simplicity's sake, lets whittle it down to...

0
Q: How to create a List of Videos based on user Input and extract and play the list of videos from mysql using php or javascript

user3038254I am a student and new to php. I have a homework where I need to get user input from a form using check boxes. The user will make a selection(s) from the list of available video titles, based on this information, I need to (1) Create a list of videos selected, (2) using php or javascript call up ...

0
Q: how to take data from a text file and create a simple web page using those data

user3038195how to take line by line data from a text file and create a simple web page using those data text file looks like: f1 f2 f3 f4 Now i want to create a php page where i can populate those data line by line with a yes no option

-1
Q: How to get past broadcasts (archive) from Twitch.TV

user3038281Welcome. I want to get past broadcast (archive) via api from Twitch.TV channel - reziplaygames I tried to use this: https://api.twitch.tv/kraken/channels/reziplaygames/videos But this return only Hightlights, not archive. I tried to use Justin.TV API too. http://api.justin.tv/api/channel/archive...

0
Q: need to change htaccess rewrite code

Perkin5I have just had a problem with a Codeigniter site where, after the hosting company had migrated files to a new server, I could no longer navigate away from the home page. I Googled a forum with a similar issue and the answer was my htacess file. It was previously like this: Options FollowSymLi...

0
Q: 'bindparam' in php for form validation

beginnerI am new to php in terms of validation and authorization. I have the following code which is able to do the basic stuff - check if username/ password is alpha numeric and checking if the input is of desired length. I also understand and know how to input value to a database. However i do not unde...

0
Q: Sort new products magento

JuvawaI'm developing a magento webshop. On my homepage I display the newly added products. I want to sort those, preferably by colour. home xml: <block type="catalog/product_new" name="home.catalog.product.new" alias="product_new" template="catalog/product/new.phtml" after="cms_page"> <action...

0
Q: Php Timezone +/- Issue

Darkaaja <?php $ctime = time(); print date("d-m-Y, g:i A", $ctime) . " (+0)<br>"; date_default_timezone_set('Etc/GMT+8'); print date("d-m-Y, g:i A", $ctime) . " (+8)<br>"; date_default_timezone_set('Etc/GMT-8'); print date("d-m-Y, g:i A", $ctime) . " (-8)<br>"; ?> So as you...

0
Q: Building a reset password

cookSomewhere in my ajax layer, I'm having major problems because i keep getting the same error message. alert("Login Failed -- Please try again."); I'm sure it has something to do with my fields but I'm confused, the only two inputs I have on the page are new password twice. I'm new to ajax. here...

0
Q: Call to a member function query() on a non-object

user1561046In find_by_id() method the first line has this error ( Call to a member function query() on a non-object in C:\wamp\www\product.php on line 14 ) include_once('database.php'); class Product{ private $database; public function _construct (){ $this->database = new Database(); }...

0
Q: PHP memory_limit Won't Increase on CLI

Kohjah BreeseEvening, I am try to run a script that need a lot of memory from the command line. System is Linux LinuxMint 3.2.0-23-generic w/ PHP Version => 5.3.10-1ubuntu3.6 I have memory_limit -1 in php.ini for CLI and am also setting ini_set( 'memory_limit', '-1' ); but if I run phpinfo() via the comman...

0
Q: FuelPHP and Mustache Partials

user3038249I am building a CMS using FuelPHP and want to use Mustache. I have a theme that I purchased from wrapbootstrap that includes mustaches files as a reference. Mustache installed fine and I can get regullar mustache tags to work i.e. {{title}} However I cannot seem to figure out how to get partial...

0
Q: Set csrf token in post java

ValeraI have a piece of code in php, that makes post request to server, using csrf token: $curl = curl_init($place_url); curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($curl, CURLOPT_POSTFIELDS, $data); // Set POST data curl_setopt($curl, CURLOPT_HEADER, FALSE); // Ask to not return He...

0
Q: Get javascript calulations to post as form data and display in php page

KABWI am somewhat familiar with JavaScript and php and very familiar with HTML but have limited experience in getting them to work together. I have looked at many examples and am either not understanding or other posts do not specifically address my situation. I am trying to accomplish two things at ...

0
Q: questions and radio buttons loop

user3018797I'm trying to create a form where people can leave feedback about the product. There are around 10 question... and maybe increase.. I want to use loop which for the radio buttons. Instead of creating 6 new radio buttons for each question. Kind stuck. here the code... also any help with how i cou...

0
Q: How to avoid stream_select

user2532835I'm trying to make PHP script with stream_select function which is disabled on my hosting as well as socket_select. <?php $hosts = array("host1.sample.com", "host2.sample.com"); foreach ($hosts as $id => $host) { $s = stream_socket_client("$host:80", $errno, $errstr, $timeout, STREAM...

0
Q: Create object from text

user3038167I have javascript text: var textObject = ' { news: [ { "title":"aaa", "desc":"bbb" }, { "title":"ccc", ...

-1
Q: What data should I store in a PHP session?

Peter StuartI am building a small application that users can log into using CodeIgniter My question is, when a user logs in, is it advisable to store a lot of the users personal information in the session (like their user id, name, email and telephone number). Or should I try leave personal information out ...

0
Q: Save Database data in variable

user3023297Hi I want to save my data in variable so if data changes I will put that variable any where so I don't have to change value again and again Please see this picture carefully to see what I want: Here is the code: <?php if(!isset($_COOKIE['loggedin'])){ header("location:index.php");...

0
Q: Wordpress: one page template with loop vs separate templates (with advanced custom fields)

Danielle ZarcaroI am using the WordPress Advanced Custom Fields plugin. For each page, the user selects the layout type from a group of radio buttons, and the corresponding ACF inputs are displayed. Since each page shares multiple options (usually checkboxes), and multiple layout types share fields (left column,...

0
Q: Update multiple records at once with the selected checkbox

user3038150Welcome. Below the script that updates the field 'clearing', when I check checbox. I want to update the field activties 'prow'. The 'prow' updates when I check all checkbox and where each field 'prow' has a different value. When I want to update such field 'prow' in line 3 and 4, they take the v...

0
Q: How do I prevent repetition in my Laravel app?

RobertI am currently working on a new large app and I am trying to ensure I implement best practices from the start. I am new to Laraval so one question I have is how can I limit repetition throughout my app. As an example I currently have a resource controller for an admin section that makes a view l...

0
Q: Yii Dataprovider ASC order with reverse output

jackhaoI'm using Yii's dataprovider + listview now. I'm using this for a mailbox like Facebook. However, I noticed that facebook's mailbox order is neither regular ASC or DESC, it's actually ASC with an inverse order. Like all the conversation is in ASC order but when it comes to page view, you see the ...

-1
Q: How to find latitude & longitude given distance from one latitude & longitude in php

fineTuneForkHow to I find calculate the range of latitudes and longitudes given one latitude and longitude and the distance from it? Also, if I get an equation, how do I feed it to mysql?

0
Q: PHP templating javascript best practices?

jostenWhat are some of the best practices for templates in PHP (Twig, etc) with JavaScript? Is it good/bad practice to include JavaScript within these templates? How should JavaScript be handled? For example; a current setup that I have is something.php something.thtml // includes all templating and ...

0
Q: Twitter Api 1.1 GET followers/ids count doesnt work

user3038357$cursor = -1; $limit = 5; while($cursor != 0){ $parameters = array('screen_name' => $q, 'cursor' => $cursor , 'count' => $limit); $method = "followers/ids"; $response2 = $connection->get($method, $parameters); $followerlist = array_merge($followerlist,$response2->ids); $cursor...

0
Q: how can someone detect the CMS of a website?

user3038351how can someone detect the CMS of a website? is there anothe way except seeing ? I need to know is a site with joomla or not.

0
Q: PHP-FPM: don't process multiple requests in one moment

eKrajnakI had VPS with CentOS 6.4 64bit. There is running Nginx 1.4.4 and PHP-FPM 5.5.6. I'm trying to make long-polling requests. However, if server is already processing one request, he doesn't respond to other. This mean, that if I have script with: sleep(60); PHP doesn't process other request. I m...

0
Q: How do I launch a php script with a button click?

CodeManiakI have a blog system that allows me to create and display blog posts. I am now trying to add buttons to the blog posts for delete and edit. I don't want to use a form because that would require you to do two clicks to do anything, one for the selection of delete or edit and one for the submit. I...

0
Q: App request/Invite through Facebook API using PHP

jesusbetI'm building an app and the client wants the following logic: User logs in to the app. User selects a Friend. User selects a gift that the User will send to his Friend. User writes a message to his Friend. Friend receives a SECRET notification about the gift. With "SECRET" I mean that Friend ...

0
Q: What is wrong my mySQL query?

user2892875I am trying to get my query to work and I can't seem to find what is wrong with it. It is for a from btw. //Connection $dbhandle = mysql_connect($hostname, $username, $password) or die("Unable to connect."); $selected = mysql_select_db("fblaWebsite",$dbhandle) or die("Could not select the databa...

0
Q: How to copy content of a single table to another in a different database?

Simo389Ok, so what I need to do is copy the contents of a table from database a into a different table in database b. I don't really want to use sql dumps or anything like that, as this table will have a max of 100 rows at any one time. Currently this is what I have: //Connect to both databases $mysq...

0
Q: Pagination PHP script works on wamp but not on live server

user1832681I used a code for pagination of the search result. It works fine on the wamp but when i run it on the live server, only page one shows the result and nothing comes up for page two. I think something is wrong with the get functions that I am using. Anybody can guess the error or suggest me a solut...

0
Q: Wordpress displaying user registration date as 1970

Toni RomeroI can't figure out where WordPress is grabbing the registration date for one of the bloggers on their site - http://www.redbarninc.com/author/redbarnpp/ What's weird is that it displays the correct date (March 2012) when I'm logged in as as admin. Here's the code I'm adding to the author.php f...

0
Q: Sessions variables as an array

hfish85I have a multi-page form which I am using session variables to store the data entered by the user on each page, which I am then recording in hidden inputs. On the last page, I am outputting the values of the session variables. For example: Page one <?php //Start the session session_start(...

0
Q: delete only certain things from database

user2993729I got this php script from w3schools and I was wondering if its possible to only delete the last name and leave the first name which is peter? <?php $con=mysqli_connect("example.com","peter","abc123","my_db"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL:...

0
Q: Make PHP code block more elegant

marianstefi20Hy!I would like a simple advice on how to make my code more elegant.The code works great, but it lacks some elegancy. I have no idea how to make it more elegant, more straightforward, but some advices woud be simply great. Ok...so here's the code: <?php if(isset($_POST['retrieve_posts'])) { $p...

0
Q: MySQL Query Function Seems to Prevent PHP Variable from Being Used in Table Name

PrestoI have a custom query() function as shown here: $link = mysqli_connect("localhost","username","password"); mysqli_select_db($link, "database_table"); //executes a given sql query with the params and returns an array as result function query() { global $link; $debug = false; //get the sql query...

0
Q: Best alternative for password_hash in php 5.3.27

BaspetersnlI've been searching around the internet for the best option to encrypt passwords for databases. I've found that password_hash() is the best option, but then i saw that it is only for php 5.5+. Apparently my host has version 5.3.27. And i've been searching for the best alternative but couldn't fin...

-2
Q: Creating a webserver?

DepenzSo I have done a basic site with the help of the bootstrap css from twitter. Its a clean easy site. It's going to be used as a marketplace for worthless stuff for my friends (just for fun) and learning webdev. So I have some textfields that describes the item thats going to be sold, basiclly it...

0
Q: Ajax empty file with form data jquery file upload

user3038421I use the following form to send file uploads along with additional form data. I used the blueimp file upload script. It submits only if a file has been attached. How can I modify this to submit the form data even with no files attached ? <form id="fileupload" method="POST" action="server/php" n...

0
Q: Donwload private objects amazon s3 api

antI'm using amazon S3 php to upload and download files. for exemple to get a private file from amazon s3 I'm using: // Cast the body to a primitive string $bodyAsString = (string) $object['Body']; and public function getResponse($content, $filename, $length, $contentType) { $response = ne...

0
Q: How to conditional JQUERY questionaire function in Joomla 3.0

user3038430Migrating to Joomla 3.0 but unsure how to create custom questionaire in query that is on the current home page. http://www.parkmed.com/

0
Q: PHP Add two hours to a date within given hours using function

user1233875How would I structure the conditions to add two hours only to dates between 08:30 in the morning until 18:30 of the evening, excluding Saturday and Sunday? In the case that a time near the border (e.g. 17:30 on Tuesday) is given, the left over time should be added to the beginning of the next "v...

0
Q: get content of .txt file which generated by php page

user3001517Ok, let's say we have this page http://example.com/test/download/?rq=84121212 When someone press the link, (.txt) file will be auto generated to download it. Its working exactly like this: Generate a .txt and then force download Now, what i'm trying to do is read this .txt file by using curl...

0
Q: How do you add_filter to this apply_filter (plain HTML in function)

user28240I'm trying edit WordPress Buddypress and found this code: function bp_core_get_userlink( $user_id, $no_anchor = false, $just_link = false ) { $display_name = bp_core_get_user_displayname( $user_id ); if ( empty( $display_name ) ) return false; if ( $no_anchor ) ret...

1
Q: How should I build a control array using html, jQuery

Arius007I've little more than basic knowledge of the html-php-jquery-ajax combination but I'm a long time at VB. I can best describe what I'm attempting to do in VB terms but I need to do it with in a html/php page that already uses jQuery, ajax and interfaces with php. I'm querying a db and returning id &

0
Q: What does ./ do for a source in html?

user3038467Reading through some code I recently was signed on to (I'm an intern). I'm supposed to change out some logos and links. Problem is that none of the images show because they all have ./images instead of ../images. What is ./ used for? I really don't feel like changing everything to ../ . The files...

0
Q: Changing php created input to another type

tokyodriftI am working on a website which is generating the 'Quantity' dropdown menu via PHP. I would like to change this to an input field instead so people can manually type in how many products they'd like to buy. The original developer has the input field being made with PHP etc. I've pasted the code ...

0
Q: Click Event Works, but not Window.onunload as a function

Will CaseSo, this code fully works if I switch from the window.onunload and uncomment the #driver click event. I can see it writing to the SQL Database, and I have debugged it prior to making it work on window close. Debugged and reliant on a click event, it goes through the full form and submits the info...

0
Q: Joining multiple tables with one producing more results

Bastianb314I've got three tables: Info: | article_id | title | author | rating | num_comments | |------------|----------------|---------------------|------------|--------------| | 1 | a title | an author | 3.5 | 2 | | 2 | anothe...

0
Q: Magento Check if Success page conditional

aidinI need to place code in the section but it has to only appear on the checkout success page. I cannot place this code in success.phtml What is the conditional I need to use?

0
Q: php regex - stop after first match

user2979757I am trying to write regex that will catch this phrase: background: url("../images/btn-send.png") no-repeat scroll -70px center rgba(0, 0, 0, 0); but not this: background: url("../images/btn-send.png") no-repeat scroll -70px 10px rgba(0, 0, 0, 0); so I should get match only on ..<number>px <some...

-1
Q: What is wrong with my variables?

stevenHave you ever seen this before? var_dump($data['total_in']); var_dump($data['total_out']); var_dump($data['total_in']+$data['total_out']); Output: float(1657.91) float(-1660.42) float(-2.5099999999998) Why is the 3rd output != 2.51? I got the values from mysql database fieldtype decimal(1...

0
Q: How do I delete a MySQL record using Ajax and Jquery?

CodeManiakI'm not sure how to get the post title into the jquery .ajax call. I am able to create and display my blog posts, now I'm trying to add functionality to delete and edit. I'm starting with delete since it's obviously the easier of the two. I can't seem to get the jquery syntax quite right on the ....

0
Q: Form is not sending all parameters on POST in Firefox

user2375263I have a simple html form that sends info to my mail using PHP. When I use chorme, all parameters are send correctly, but when I try sending the form with Firefox, the value from select tag is not send to my mail. If I check the header with LiveHeaders, I can see that the paramater is not in he...

0
Q: Can't fgets() a 1 gig file?

BranndonCode: $filename = 'Master_List_DeDuped.csv'; $fp = fopen($filename, "r"); while (false !== ($line = fgets($fp))) { echo $line; die(); // For Debugging only } fclose($fp); The resulting error: Warning: fgets(): 3 is not a valid stream resource in /home3/public_html/index.php on ...

0
Q: Symfony2 - Doctrine exception: class used in the discriminator map does not exist

Lander MartinezI am using Symfony2 with Doctrine and when I query from my controller the next error appears: Entity class 'Bdreamers\SuenoBundle\Entity\Sueno_video' used in the discriminator map of class 'Bdreamers\SuenoBundle\Entity\Sueno' does not exist. I have one entity(superclass) called "Sueno" and two...

0
Q: How to json_encode() an object of arrays using PDO?

jennyIm trying to encode records fetch from my DB in a particular way . The result I get is different from what I need: Here is my code $stmt = $this->pdo->prepare('EXEC mystoredprocedure :id'); $stmt->bindValue(':id', $id); $stmt->execute(); $results=$stmt->fetchAll(PDO::FETCH_NAMED); echo json_en...

-1
Q: How to repeat radio buttons using PHP

boxIm wanting to repeat radio buttons using php. Below is the html form <input type="radio" name="RadioGroup1" value="1">1 <input type="radio" name="RadioGroup1" value="1">1 <input type="radio" name="RadioGroup1" value="1">1 ...

0
Q: Bigcommerce SSL issue

ZetaphorI've got the following code: <?php error_reporting(E_ALL); ini_set('display_errors', True); require 'bigcommerce.php'; use Bigcommerce\Api\Client as Bigcommerce; Bigcommerce::configure(array( 'store_url' => 'Our URL is here and valid', 'username' => 'Our username is here and v...

0
Q: How to populate a "select" form with flickr photoset titles? (with PHP)

Designer 17I'm in the process of creating a photo uploader that uploads photos directly to a personal flickr account... right now I'm trying to call all my photosets (by title) and populate my select dropdown with them. Unfortunately everything I've been trying hasn't worked... so I'm here for some help fro...

0
Q: Problems with a SQL statement including a WHERE, AND, OR clause codeigniter

Chitowns24I am having trouble figuring out how to fix this query. Here is my CodeIgniter code return $this->db ->select('vehVin, vehMake, vehModel, seller, dealership, buyer, logistics.warehouseName, transportDate, car_tracking.keys, car_tracking.window') ->where('transportDate <', $y...

0
Q: How can i detect duplicate values multidimensional array

Anderson B. FurlanI have this array: Array ( [0] => Array ( [0] => 1 [1] => 1 [2] => 1 ) [1] => Array ( [0] => 1 [1] => 1 [2] => 2 ) [2] => Array ( [0] => 1 [1] => 1 [2] => 3 ) [3] => Array ( [0] => 1 [1] => 1 [2] => 4 ) [4] => Array ( [0] => 1 [1] => 1 [2] => 1 ) ) How can I...

0
Q: PHP Registration Form Not Showing Users in The Database

user2848575I created a form with HTML and then a form which is supposed to send the information to a mySQL database. The information doesn't show up in the database though. What am I doing wrong? This is my HTML: <form action="#" method="post"> <input type="text" name="fnam...

0
Q: how do i pull Facebook page fans ?

user1750543currently i can only pull 100 fans, how do I go beyond that ? my code opens fan.php plugin which allows up to 100 fans, anyone can help ? $curl = curl_init("https://www.facebook.com/plugins/fan.php?connections=100&id=".$pageId.""); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($cu...

0
Q: Print website order packing slip on remote printer

Robbert de PobbertI was wondering; i have a webshop (on a webserver) where customers can order things, somewhere else (at the customers company) I have a printer which needs to instantly print an packing slip whenever the website receives an order. 1) I have read things about VPN but that's too difficult to set u...

-2
Q: prevent viewing more than one page

user3038548I've website that is like cms content with multi-pages such as my_site.com/page.php?id=1 my_site.com/page.php?id=2 my_site.com/page.php?id=3 my_site.com/page.php?id=4 my_site.com/page.php?id=5 . . . etc How to prevent user from opening two pages in same time either on different tabs or on diff...

0
Q: Generating table of IP addresses with PHP

user2970202I'm currently trying to generate a table of every IP address with PHP. Here's the code I'm using: <?php // How many adjacent pages should be shown on each side? $adjacents = 5; $total_pages = 254745764; /* Setup vars for query. */ $targetpage = "ip.php"; //your file name...

0
Q: date() converts timestamp to the same result in PHP 5 for different timezones

user3038511I am trying to convert a human-readable time of 7am into a timestamp in PHP for calculation and manipulation purposes. The timestamp gets created correctly as 25200, but the date() function strangely converts the timestamp back to 08:00 when I use London as the timezone, 08:00 (correctly) when us...

0
Q: MySQL UPDATE syntax error - Everything is ok?

Héctor SalazarI've got an error with my update query in PHP... I've seen other people's mistakes, and I'm almost certain I'm not making the same old mistakes, but I may be ignoring one. This is my code: $sQuery = "UPDATE clientes SET Nombre = '$_POST[Nombre]', Apellidos = '$_POS...

0
Q: MySQLi Singleton

user2044390Is this enought to make singleton in php? public static function getInstance() { if (!isset(self::$intance)) { self::$instance = new mysqli(DB_HOST, DB_USER, DB_PWD, DB_NAME); } return self::$instance; } I found it easiest way, more easy than anything I saw here. Can there be an...

0
Q: PHP JSON add array

mreynoli need some assistance with properly generating JSON. I almost have it, but I need to have each category and its related item in its own array. I have multiple categories each with many items under them. My JSON looks good, i just need the categories as an array along with its items. Any help is ...

0
Q: SQL query from Android App to hosted web Server

user985644I am trying to figure out why i am getting no returns from my query, I am hosting an online SQL database using a bluehost.com server. The SQL database is set up - and i am using the following php to try and que <?php mysql_connect("127.0.0.1","username","password"); mysql_sel...

0
Q: jQuery fadeIn div after page reload

user2921557i have a form that stores user data via an ajax call. On success i normally have a div fade in with a success message. However i want to reload the page so that the page is updated, and then fade in the success message. I was using a .load() to update the div, and then toggle the form to hide i...

-1
Q: Calling a PHP Function from Javascript

Angel Gabriel Moreno PaezI want to call a PHP function from javascript, I know that´s impossible by natural ways, because PHP runs in the server and javascript in the client. I have heard that AJAX is used for this sort of function, and I wanna know if somebody could help me with the syntax. For example I wanna call the ...

0
Q: Magento 1.8 order product quantity per 0.1 decimals

Gert-Jan Van Den HeuvelI'm using Magento 1.8 and I am amazed that I cannot get the system to allow orders of 0.1 quantity. I'm building this stor to sell fabrics, per 10cm's. So that would be 0.1meters and I do not want the quantity to represent centimeters. I've tried the qty_increment field in the Admin > System > C...

0
Q: Creating a PDO connection string from PHP class and DBMS techniques

Prashant GhimireHere is my program description. I tried to create a Database connection class that has different method which differ in the way the pull the records from the database. What I'm trying to do is : setting the class attributes to the PDO connection parameters and creating a default constructor wit...

0
Q: How can I enable anti-aliasing in this PHP GD class

Jeff ReedHere I found this awesome class that neatly turns my pictures into circles. http://pastebin.com/jULhsU8P But how would I enable anti-aliasing in it? The edges are really sharp as of now: I'm not very experienced with the PHP GD library (needless to say). But I tried adding it myself by follo...

0
Q: Woocommerce share catelogue of products on another website?

GT22Is it possible to share my products listed on www.websiteA.com on a page on www.websiteB.com ? I can add an iframe on websiteb.com but I'd rather have the products copied from websiteA and appear as if they are a part of websiteB. I need the sale to go to websiteA, even though they are listed o...

0
Q: Query statement stored in field. Echo just prints it instead of making it part of the page code

user3038568I've been searching these forums all day. I have a query statement stored in a database field. First query grabs random entries. $sql1 = "select * from regquestions ORDER BY RAND() LIMIT 0,5"; $query = mysql_query($sql1); while ($rows = mysql_fetch_array($query)) { echo $rows['questioncod...

0
Q: php boolean opperation causing 500 error

user3023421I am using Codeigniter Framework I am in a controller with the following code: if(isset($_POST['field']) && !empty($_POST['field']) && isset($_POST['field2']) && !empty($_POST['field2'])) { if(isset($_POST['field3']) && !empty($_POST['field3'])) //whatever else //whatever } els...

2
Q: PHP pthreads Stop all threads if at least 1 thread did the job

user3027324Hello i am building a PHP application with the pthreads extension. The application opens X amount of threads to do a fast file search on a computer to find a file. I want all the threads to stop if at least 1 of my threads found the file i wanted. How can i handle this situation? Thank you

0
Q: Yii 1.1.14 with Composer autoload

Jonathan BenderI have my composer.json file at the root, which looks like this (after following this guide): { "repositories": [{ "type":"composer", "url": "http://packages.phundament.com" }], "require": { "php": ">=5.3.2", "yiisoft/yii": "1.1.*", "yiiext/migrate-command": "0.7.2", ...

0
Q: PHP mysql_query update always return true

user2965590$result always return true, even though there is no parameter passed to the SQL query. I can not find out the reason. Everything else is all right and I have tested it in the database. Please help me. <?php require('dbConnection.php'); $lon = $_POST['lon']; $lat = $_POST['la...

0
Q: HTML form and PHP function to save form data to mysql in same file/page

Arringar1I won't purport to know exactly what I am doing with this because I don't and that's probably painfully obvious. I am trying to keep the form and the function to update the database in the same file. What am I doing wrong? Here are the important bits: HTML: PHP: "") print mys...

0
Q: Joomla front end not displaying

user3038612I am quite new to joomla. I installed joomla 3.0 trough c-panel and the backend seems to work fine. Default templates are displaying. The problem occur when I try to switch to another template, namely: Ja_Lens for 3.x. I only installed the basic template, but it does not seem to work. All I get ...

0
Q: php array and insert

user2946111I want to insert database Urunler[]. But it does not get it working. <select name="urunler[1]"> <option selected="" value="DF-12">DF-5</option></select> <select name="urunler[2]"> <option selected="" value="DF-5">DF-5</option></select> <select name="urunler[3]"> <option selected="" value="DF-15">

-2
Q: dynamic html - get value

user3038636example HTML paragraph: <p class=Default><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> this is my sentence and I need XYZ that needs to be placed here.</span></p> I need to get the "XYZ" string or value from mentioned in the above paragraph from another txt file saved in t...

0
Q: retrieve webmail via php for use on a website

Youngnate DaGreatFirst Let me start by saying im a total noob at email and email servers and how they work. what i would like to do is retrieve my emails from my hosting server (hostgator) and display inside my sites admin panel via php. I'm building a site for a couple partners of mines whom want the ui as simpl...

0
Q: Trouble overriding function the right way

user28240I'm using Wordpress Buddypress and I am trying to override a function the right way (by using the filters and adding it to my functions.php). This is the function: function bp_core_get_userlink( $user_id, $no_anchor = false, $just_link = false ) { $display_name = bp_core_get_user_displaynam...

0
Q: Wordpress Featured Image as a background

TravisI am trying to echo out the featured image of a post as a background image. I have seen a few places this should be possible but i cant seem to make it work for my self. //Here i get the image as a thumbnail <?php if ( has_post_thumbnail()) { $image = the_post_thumbnail('thumbnail'); } ?>

0
Q: Trouble installing Omnipay library with Composer

user2036607I'm trying to use the Omnipay API with the Pin gateway but having issues. I've run composer.phar locally with this in the composer.json file: { "require": { "omnipay/omnipay": "~2.0" } } The composer "vendor" folder now resides at "classes/libs/vendor" on my site. I h...

0
Q: Symfony2 mongodb installation

No_nameI've been following this with a fresh install of symfony2 and everything goes fine until I hit the step where it says php app/console generate:bundle --namespace=Acme/StoreBundle which then gets me the error Bundle AcmeStoreBundle does not contain any mapped documents. Did you maybe forget to...

0
Q: PayPal IPN Insert Data Into Database Table

Josan IrachetaMy PayPal IPN script is not inserting data from new orders as intended. It's also not logging any errors so I have no way to see what's wrong. My browser isn't detecting any syntax errors either so it seems like the IPN listener should work. I would be really grateful for anyone's help. <?php...

0
Q: file_get_contents from php://input with mismatched content length

LukeI'm reading POST data from php://input with file_get_contents but I have noticed situations that some of my clients don't send proper header information, i.e. the Content-Length header is longer than the actual length of the content send. This caused file_get_contents to wait taking up precious A...

 

« first day (280 days earlier)      last day (30 days later) »