« first day (281 days earlier)      last day (29 days later) » 

1:05 PM
-1
Q: How to pass variable from php file to ajax using json?

zjableI can't seem to get the variable to ajax success function. (there is only one variable and nothing more) var last_msg_id = $(this).attr("id"); $.ajax({//Make the Ajax Request type: "POST", url: "moredivid.php", datatype: 'json', data: "lastmsg="+ last_msg_id, success: function(data){//html = t...

0
Q: Trying to play youtube video after searching for videos

user2957949I am currently working with the YouTube API. I have got a search script in php working fairly well, but each video link is just pointing to the youtube website. I want to know how I could change this so when a user clicks on a link it either plays the video or sends them to another page to play t...

0
Q: joomla html module overriding doesn't work

user3016968My structure of overriding is: template_name/html/mod_menu/tmpl/default.php but joomla are still getting the core template, instead of this, why this happening? also maybe this error relates somehow: Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/home/targetco...

0
Q: How do I print data from database via php json without form?

user3033027I come again with a very boring doubts that I could not solve alone. Urgent need this system only that I'm not getting to do it. I'm needing to send a json via 2 text fields, one textfield contains the url that will be where the json to be sent and the other contains the json command. as shown ...

0
Q: Category path Magento

Jeroen WanningenCan someone help me with the following problem: I would like to change the URL of the categories. It is now as follows http://tuinbeursnederland.nl.testbyte.nl/blokhutten-tuinhuizen/blokhutten/op-maat/ And I want it like this way: http://tuinbeursnederland.nl.testbyte.nl/blokhutten/op-maat/ B...

0
Q: How to pass limit offset to the pod object

Oleksandr KhavdiySeems limit option doesn't work when I pass it in params to pod object. So I do $selector = ' hide=0 AND opening_soon=0'; $params = array( 'limit' => 10, 'where' => ''.$selector.'' ); $bar = pods( 'bars', $params ); but seems that doesn't work and loop while ( $bar->fetch() ) {.. goes throu...

0
Q: Exporting large quantities of data and memory issues

unskaI'm not having a specific problem. I would like to hear ideas and techniques concerning memory issues. Let's say I have: 100 000 products on products table 100 000 product names on product names table 100 000 product descriptions on product descriptions table 200 000 product pictures on produc...

0
Q: Post values encoding issue. £ turning into £

CoultonI'm trying to solve an issue with my website. If I submit a form containing the £ symbol to the same page, it comes back as £ even before it hits my database. I have the following in my tag: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> and <meta charset="utf-8"> ...

0
Q: Sending php form information via gmail smtp using pear mail.php package but I get an error

user2995165I am trying to send data from a form to an email. I did the following: Browsed to : http://pear.php.net/package/Mail/download/1.2.0b5 Downloaded the beta file 1.2.0b5 Unziped the file and placed in XAMPP htdocs folder Created the following code: <?php // Pear Mail Library req...

0
Q: Create the same hash in PHP as OracleMembershipProvider

AzoroI want to compare hash created with OracleMembershipProvider method: CreateUser(username, password, e-mail) with hash manually created in php and compared with hash in db. I must add that passwords also have different salt values. I dont know th pattern that OracleMembershipProvider is using...

-4
Q: When php compress some large files, my server can't be visited

user3041766I have too many large file (images and musics) on my server. User can download some specified files, and my server will compress this files, then user can download those files. But when server compress files, other users always waiting for response. So i login my vps server, and type this foll...

0
Q: OpenCart - Remove specific category from URL

Ionut LaurentiuI am trying to remove a specific category from URL. I have created one category named Products, where I have multiple sub-categories. I am using SEO URL on Opencart 1.5.6 . At this moment the URL is looking like this: http://www.mywebsite.com/products/cheese/ (for sub-categories) or http://ww...

0
Q: Creating array in specified format looping through existing array of dates

user982124I need to create an array of dates to feed to a calendar function in this format: array("year" => array("month" => array(days))); For example the variable might look like this: $linked_days = array ("2013" => array("1" => array(1,3,5,6), "2" => array(9,11,13,15), "3" => array(11,13,15,16), "4" =

0
Q: MySQLi + remote server + php cli = No such file or directory

Latheesan KanesI have two separate KVM virtual machines. One VM is acting as my web server. Another VM is acting as my database server. Look at the following script on my web server VM: test.php require 'config.php'; $mysqli = new mysqli( $_config->DatabaseHost, $_config->DatabaseUser, $_co...

-5
Q: I need to print out some data from a select query , anyone help? PHP

Jon JamesThis is my code: $arr = array( 'cust_id' => "{$_SESSION['cust_id']}" ); $query = $sql->select_query("code",$arr); //echo $query; ...

0
Q: Phonegap Android upload to remote database fails

Sean FUsing phonegap / android I have successfully downloaded data from Db using jsonp from remote server (using localhost) Now trying to upload data using jquery/ajax. Process appears to be working but no data being uploaded (ie data not appearing in MySql Db) I'm using localhost as Db for test purpos...

0
Q: how to match links ended with port number

Jack BenHow to match the following link structure that ended with port number Links like https://www.some_thing.com:13306 http://www.some_thing.com:13306 www.some_thing.com:13306 some_thing.com:13306 Example $link1 = "http://www.some_thing.com:13306"; // will be true $link2 = "http://www.some_thing...

0
Q: Different Sidebar with WP-Ecommerce

user3041983I have a blog with wp-ecommerce, now what i would like to do is use a seperate sidebar to the shop pages but WP-Ecommerce seems to pull your template sidebar and can't find how to specify the sidebar to use. I have created a new sidebar in my functions.php just don't know where to call it... An...

0
Q: PHP error reporting is of, but neither if and else check works

user3041970So, problem issue is: Error reporting is not enabled in php.ini file, but when i developing something i use simple if and else checks. But as i was unable completely to even setup some session, i come down to basics, and wrote: <?php if (require_once('classes/sessionHandler.class.php')) { ...

0
Q: CodeIgniter MVC Structure Query

StanyerI am using CodeIgniter as the framework for a commercial project. The company deals with a lot of data and offers a lot of different reports. Up until now we have been using jqGrid (PHPGrid as the server-side layer) to display the reports, and to generate the data for the reports the controller ...

0
Q: Requesting Username & Password In PHP Session

user3041902i tried to put username & password dynamically but It doesnt work with stored username & password in DB and stays on same page.... really depressed. <?php session_start(); $username = $_POST['txt_username']; $pwd =$_POST["txt_pwd"]; if(empty($username) || $username == ""){ header("location:in...

0
Q: Execute Query with Where Condition For ResultSet Zend Framework 2?

chiragI have one tabel 'cms' which include cms page with 3 separate parent category(type) . when i call fetchAll() function which fetch all data but i want to only fetch data which parent category(type)='1' means i want to pass where condition and orderby condition in fetchAll() function. My Cms.php p...

0
Q: Several MySQL users in Joomla 1.5 configuration.php

morkovniIn order to solve MySQL 1226 error i follow this recomendation, but it doesn't work. I'm getting an error: Parse error: syntax error, unexpected T_VARIABLE in configuration.php on line 38 configuration.php content: 37:public $users = array("root", "boot", "foot"); 38:public $user = $users[array...

0
Q: global variables scope in php

user3021621I didn't understand this sentence from php.net: Note: Using global keyword outside a function is not an error. It can be used if the file is included from inside a function. what does it mean? can anyone demonstrate briefly?

0
Q: How to redirect magento admin page to different controller action?

karthikI'm having an custom module which will generate coupon code base on limited conditions. Now coupon code is saving perfectly in salesrule, now if i click on edit like in my module page should redirect to default sales coupon edit page. Example: My current url:http://localhost/magento2/index.php/c...

0
Q: jQuery Basic Authentication not sending headers

dickturnipI am querying an XML file with PHP to generate a thumbnail gallery, when the user clicks the thumbnail the browser should pull the image from the link and display it in a preview area. The problem I am having is when I click the thumbnail image the pop up box is displaying asking to be authentica...

0
Q: How to print data stored in session from php?

phpnoobAfter a user logs in they are redirected to their profile page. Where in that profile page they'll be able to see their username, and email that is asociated with that account printed out on screen so if other people visit their profile they can see that contact info. public function Login($user...

-1
Q: Changing mysql_result to MySQLi

FrKI use the following code to store every visitor on my site inside a database and delete it after 1 hour. I use this to count the amount of visitors that visit my site in the last hour. <?php include "database.php"; $s_aantal = mysql_query("Select Count(id) From bezonline Where ip ='".$_SERVE...

-1
Q: Add finish publishing function to a div joomla

user3013196How dio i make a div in joomla 3.0 stop pulishing after a specifik date ? My code shows how i want to make my function to work. <?php if (div class isset (MyDiv)) { stop publish after 2013-12-12 } ?> <html> <div class="MyDiv"> </div> </html>

0
Q: Clueless on how to use fsockopen()

ClarklightI am very new to php, and i am trying to connect to ftp and post a form, which has a few text fields, and 3 image upload, the images will be uploaded to the server. I am using godaddy, and they dont allow ftp_connect, only fsocketopen(),and only available on ports 80 (http) and 443(https). Can i ...

0
Q: Join the 3 tables of database to get one table full and one column from table 2

sheikhfunction account_summary($userId, $acId) { $this->db->select('customer_account.*,company_commission.commission'); $this->db->from('customer_account'); $this->db->join('company_commission', 'customer_account.customerID = company_comession.customer_id','inner'); ...

0
Q: PHP - Windows background commands working but still waiting on background process to finish

Charlotte TeagueI have tried NUMEROUS methods to start a background php script from another php script. I need to create a zip file of database files for download. I have it set up to download instantly for single files, but if the files need to be zipped, I want a background process to start that will email a l...

1
Q: Codeigniter HMVC + datamapper ORM

DannyI'm facing a problem when I'm using datamapper with codegniter and HMVC module. It didnt work for MX_CONTROLLER .. c I have followed these steps: http://stensi.com/datamapper/pages/installation.html I have created two modules. Albums_model <?php class albums_model extends DataMapper { var...

0
Q: Json request to another domain

Leon van der VeenIm trying to make a request from one server to another with json and php. my html page: $.ajax({ type: "POST", url: "https://api.domain.com/gateway/partners/create_account.ajax.php", dataType: 'jsonp', crossDomain: true, data: { "name"...

0
Q: PHP Login error:

DanishcjIm trying to make a login script with php and mysql. everything is fine except i get this error when trying to login: Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/deadmin1/public_html/login/index.php on line 10 the relevant code is: <?php require("config...

0
Q: PHP Contact Form doesn't call value in dropdown options

Terry CronjeI am new to PHP and I have a contact form on my website where the last field is a dropdown menu from which you need to select an option. The form gets returned with all the info except the option selected in the dropdown menu. My coding: HTML <select id="Product Enquiry" name="productenquiry"> <

0
Q: Resizing Images with SimpleImage Class

user3042018I'm trying to write a script to automatically resize images in a folder using the "SimpleImage" class found here: https://gist.github.com/miguelxt/908143 My code is here (please note I'm a newbie!) <html> <head> <?php //Include SimpleImage class include('SimpleImage.php'); //Iterate through...

0
Q: How can I trace file in folder already found in .gitignore

Ahmed el-GendyIn file .gitignore there are folder name item....Now I want to trace only one file and ignore the reset of the folder.

0
Q: CakePHP: hasMany association not recognized

EmersonAttempts belong to Users (Users have many Attempts). In User.php (model) public $hasMany = array ( 'Attempt' => array( 'classname' => 'Attempt', 'order' => 'modified DESC' ), ); In Attempt.php (model) public $belongsTo = array ( 'Test' => array ('...

1
Q: Break attribute using jQuery

Rawrrr1337I'm using PHP to generate some <input type="text" class="date" name="date'.$i.'"> fields where $i increments through the foreach function I'm using. So I will have something like this: <input type="text" class="date" name="date1"> <input type="text" class="date" name="date2"> <input type="text"...

0
Q: Laravel 4 - Fpdf Header and Footer

chiantaI've install on Laravel 4 FPDF. I use this code to try FPDF but the functions Header() and Footer() don't work class PDF extends Fpdf { // Page header function Header() { // Logo $this->Image('logo.png',10,6,30); // Arial bold 15 $this->SetFont('Arial'...

0
Q: joomla 2.5 module retrive data from database

user3009655i want to retrive data from database in my module page.for that my helloworld.php put the code // Get a database object $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('id, description'); $query->from('#__banners'); // sets up a database query for later execution $db->se...

0
Q: Making plugin for aplication forrm on the press of button to create aditional form in order to insert more people

user3042036PHP-Wordpress- Plugin, I am making plugin for aplication form, I need on the press of button to create aditional form , in order to insert more people. I have ` <div id="firstpart" > <form action="<?php echo site_url('wp_asaplication.php') ?>" method="post"> <table id=firstpart border=1> <tr

0
Q: Adding field to Customer Address and showing it in the admin panel?

David SarmientoI just created an attribute (lastname2) for customer addressess, however I'm not beeing able to show it in the edit address field of the admin panel. As you can see below I'm setting used_in_forms so that it contains 'adminhtml_customer_address' and 'adminhtml_customer', but the field still refu...

0
Q: PHP. Enter password to click button

Rimantė BaltiejūtėSo in my website is table which contains data from database. After button is clicked It truncate database table. I need to make that button will be clickable after password is entered. But I can't to It successfully. Here are 2 fields "Username" and "Password". After button is clicked I don't get...

0
Q: How to get the stock quantity of an article from woocommerce?

Bill Bronsoni got a little problem with displaying the stock quantity correctly. heres the loop: <?php /** * Loop Price * * @author WooThemes * @package WooCommerce/Templates * @version 1.6.4 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly global $product; ?> <?p...

0
Q: How to make a custom builder in eclipse

ac7webI want to copy my files from my source code directory to my local WAMP http directory for testing and I want to do it for each individual file when it is changed in Eclipse (css, php, etc). I think the way to do this in Eclipse is to use a 'customer builder'. I've set one up that runs a batch fi...

0
Q: WCF Web service from PHP through SOAP Client

user3042055How to access WCF Web service from PHP through SOAP Client with following things in mind: Binding should be wsHttpbinding Should bypass Security Certificate Well i am using the following code $contextoptions = stream_context_create(array( 'ssl' => array( 'verify_peer' =>

0
Q: PDO Update Query

user2646612i've searched everywhere but i couldn't find out what i'm doing wrong. Here's the code: public function useKey($betacode='1337') { $q = $this->pdo->prepare("UPDATE `ba_keys` SET `times_used` = ':used' WHERE `betacode` = ':beta' "); $q->bindValue(':used', 90); $q->bindValue(':b...

-2
Q: PHP Validation with SQL

user3042047Hi I'm brand new to PHP and I'm just doing a simple form to learn. It just contains an email address, I want to Validate the information and send it to the database. My problem is connecting it to a database. I've done a few tutorials but just leave myself confused. Right now this is my homepag...

0
Q: Form won't display using php

user2970528I am creating a delete page. The delete page deletes data that is in my database. The data that the user can delete is displayed using php however when I load this page I get nothing. $query = "SELECT * FROM match"; $resultset = $conn->query($query); while ($row = $resultset->fetch()) { echo "<

0
Q: Virtuemart Multilanguage Manufacturers Double

WNR DesignWe use the manufacturer layout for displaying the logo's. Also the webpage is multilanguage. But on the english version of the page it shows the image twice. This is my code:

-1
Q: How to evaluate the variable within href

user2849702I want $var and $key to be evaluated to their values in this statement: echo "<a href='/home.php?id=$var'>$key</a>"; so far only $key evaluates. I know that within single quotes a variable is not evaluated and that it is in double quotes but how can I make the above work?

0
Q: Defining authentication for PHP files in web.config on IIS 6.0

TekneekI am able to add authentication to any file in an 'admin' folder by using the following code in my web.config: <location path="Admin"> <system.web> <authorization> <deny users="?"/> </authorization> </system.web> This will protect all my .net files like .aspx, but it will not protect...

0
Q: how to match links that has extension

Jack BenHow to match the following link structure that ended with port number Links like http://www.mysite.com/bbbbbbb.flv?something https://www.mysite.com/bbbbbbb.flv?something www.mysite.com/bbbbbbb.flv?something mysite.com/bbbbbbb.flv?something Example $link1 = "http://www.mysite....

-3
Q: mysql column out of order

Eddie D.i have my table like this is it normal or any bug? when it happens the code doesn't save the data on db the ID column is auto_increment id | clomn2 | -------------------- 1 | xx | -------------------- 2 | xx | -------------------- 3 | xx | -------------------- 5 | x...

0
Q: creating a custom function and call it in a view file in cakephp

user2993939I have a php variable in a view file and I want to call a custom function which pass argument as that variable and I want to display the result in the same view file. How is it possible? How can I create a custom function in controller and I how I will call it in the view file? I am new to cakeph...

0
Q: PHP how to separate DOM element and display it with php

ilikehow to separate DOM element and display it with php i have a file target.php i want to take all div element from it and store it in variable $div to display it later i want to store the rest of element in variable $rest and display it later i already goggling but i still don't have idea what...

0
Q: PHP Traffic accounting

Jürgen Ladstätterwe're calculating the traffic usage of customers with access logs of NGINX / apache. Now a big question came to my mind. What if I do this: <?php file_get_contents( "http://www.speedtest.qsc.de/1GB.qsc" ); ?> The call itself would be a simple GET with just a few bytes / kilobytes, but ass...

0
Q: TextBox Properties Like AcceptsReturn or AcceptsTab in PHP

jp2codeVisual Studio has made me lazy with all of their rich features, but now I need to code some functionality into PHP. We have a PHP web page that people are submitting before it is complete because they want to enter a new line in a multiline input control. The easiest way to fix this, were it Vi...

0
Q: PHP Division results in automatically rounded up number

user1684241I have a simple division: 72 / 193 Excel is giving me result of 0.373056994818653 While PHP round it up to 0.373056994819 My question is - how can I make PHP to give me the exact number instead of a rounded up one?

0
Q: Joomla module banner not displaying

user3016968I got this in my template: <jdoc:include type="module" name="banner" /> in my xml file of the template, I got a position named banner and that position is displayed in the admin positions, I've setted the position to "banner", but isn't displaying, I've added some banners to the banner compo...

0
Q: JavaScript - Select row is checked but not checking values in row

Charlotte TeagueI wrote a script to select values in a row. When you select the checkbox at the beginning of the row, the checkboxes of the values in the row are not selected(if the user hits 'submit' from here, it will process the values, but this is confusing to the user). If you unselect the checkbox at the...

0
Q: XMLReader::readOuterXml(), Input is not proper UTF-8, indicate encoding

DrahcirI'm using XMLReader to parse a large XML file from a third party, file size is 1GB+. The XML file specifies the encoding as UTF8 (<?xml version="1.0" encoding="utf-8" ?>), although it isn't. XMLReader throws an error because of the unknown encoding type, but not until it's already processed most...

1
Q: Does MVC design means you have to separate mysql from php code?

ProDrazDoes MVC really means you have to separate => View aka design (html css) => controler (php code), model (mysql code into classes etc.)??? Are there not alternatives? Wondering because I would really like to avoid separating php code and mysqli as right now it's sooo easy to work on it (got used ...

0
Q: Object Oriented PHP & AJAX

mhtI'm working on a text-based game project. Game goes on in a single php page and player answering question to continue his/her journey. I have a class called "Character" and it looks like this: class character { public $name; public $is_alive = true; public $health = 1...

0
Q: Laravel 4 validate array of files

VictorI use laravel's validator class for validating pictures upload. The problem is when I don't select any files validator thinks that it's ok and doesn't fail. Actually the array of files is passed to php, but it's empty, like "pictures[]". But still it's empty. Validator usage: $validator = Valid...

0
Q: Send email from a specific IP choosen randomly

Dipak Kumar PustiI have 10 or more sites running on a web server, problem is the the SMTP sending the mails for these sites uses a single IP, as a result the spamming issue arises. I want to make a Primary IP and more than 20 secondary IP, so that I can handle each mail request assigned to SMTP, assign a random ...

0
Q: Php sort objects in array based on two values

Niels SønderbækI have an array of objects, I would like to sort. I would like to sort the array on two values for each object: E.g Array ( [0] => "TeamName time (Id) - CoachName", [1] => "TeamName time (Id) - CoachName" ... ) I would like first sort on the CoachName and then on time such that Before sort...

-2
Q: Check if field exists in for function PHP

Rawrrr1337I have this PHP script: for ($desc=1; $_POST['ddata'.$desc]; $desc++) { if($_POST['ddata'.$desc]){ if ($desc == 1){ $ddata = $_POST['ddata'.$desc]; $dlocatie = $_POST['dlocatie'.$desc]; } else { $ddata = $ddata.' / '.$_POST['ddata'.$desc]...

-1
Q: The FastCGI process exited unexpectedly?

Srb1313711When trying to view php pages i was getting mime type errors. To fix this I downloaded php-cgi.exe and made a module mapping in iis handler mappings to point to this. After this I am now getting the error in question? Does anyone know why and/or how to fix this?

0
Q: php native query to codeigniter query

Marty MiroHi im confuse about this. How well i be able to make this query into the codeigniter model query?? here's my php native query below $query = "SELECT seminars.id, seminars.thumb, seminars_category.category, seminars_category.url, ...

0
Q: Displaying Slider in Front Page (home) using Customizr Theme

lozadaOmrI am using Customizr Theme on my website, and rendering its' front page, using a Static Page. Also I have two sidebars (left and right). I used the static page, because when I put the slider it will appear above the sidebars. And I'm trying to put it in between the sidebars. I added a PHP snipp...

0
Q: PHP Compress large file make server can not respond

user3041766My site have much music and picture resource. User can login my site and download those resource. When user click 'download' button , PHP will compress those selected files, then users will download the compressed file(zip). The problem is: When PHP compress files, Other users visit to my ...

-1
Q: How can i get a variable in another page?

user3032860Its not just a variable, the situation's like this: mysql_connect("localhost", "root", "") or die (mysql_error ()); mysql_select_db("tHofbrouwerijke") or die(mysql_error()); $strSQL = "SELECT * FROM bieren"; $rs = mysql_query($strSQL); while($row = mysql_f...

-3
Q: Want similar page like this i used this code but not working on chrome

ubaid5i want similar page like this link one side i submit code and other side result should display i tried similar thing that not worked in chrome <table> <tr><td><a href="input.php">Source</a></td><td><a href="output.php">Output Result</a></td><tr> <tr><td><iframe name="source" width="500px" heig...

-1
Q: executing an included code

user2855308I have a problem with running my code. I just had my code working and since I want it to run on multiple pages i figured i could just copy and paste it to another file and include it to the place where i copied it from. sadly that doesnt work.. any ideas? included code setup <head> <...

0
Q: PHP - What is the difference between a class and a function?

Me123What is the difference between a PHP class and a function? Because I saw this code: The class: $scclass = new SystemControl(); The function: $scfunction = SystemControl(); The only difference I can see is the the class has the word "new" in front of it.

0
Q: Hide table columns in php

ebrahimi want hide table rows with id For Example: If the user requested this address: http://*.com/index.php?show=1,3 Information is displayed in columns 1 and 3 <table> <tr> <td> 1 </td> <td> hidden </td> </tr> <tr> <td> 2 </td> <td> shown </td> </tr> <tr> <td> 3 </td> <td> s...

0
Q: Executing ANT from PHP

kcstrongI have an HTML form which I am submitting to a PHP script. I am using PHP to write an XML file based on the form input, and then I would like to have PHP execute an ANT buildfile that will use the XML as input for an XSLT task. All of this is part of a much larger application, none of which is ex...

-2
Q: PHP guess file size required to save a string

crazy_PHP_MANI have a string in PHP which is appended with new content from a foreach loop. Inside the foreach I need to detect whether the string has reached a point where if saved it will only occupy 9MB of disk space. Is this possible in PHP, if so how do I go about creating such a script. There will be no...

-1
Q: how to show 2 PDF in popups?

user1851673I'm trying to show 2 PDF's on the same file. Since one is more recent than PDF 1.4, the compression can't be managed by FPDF and FPDI libraries I actually use. It should be managed by the commercial FPDI extension but I don't know if it will works and I'm trying to find a workaround. My question...

-1
Q: Adding a hyperlink into a PHP search script that is echo'ing results

user2965329I have the below search script, and I need to have the COMPANY section of the results link to each companies website (stored in column WEBSITE in my database). Can anyone help? if(isset($_POST['completedsearch'])) { $term = $_POST['query']; $mysql = mysql_connect("ldb504.securepod.com","...

0
Q: How cast the ImagickPixel::getColorAsString to a Color HEX format

mcuadrosI am working with imagick extension from PHP, and i want get to the HEX Code from a ImagickPixel object, if i use getColorAsString the result is a srgb format color. echo $pixel->getColorAsString(); //return srgb(62.128633554589150378%,78.681620508125433844%,74.308384832532240694%) Any built-i...

0
Q: Wordpress Programmatically create subpages when a certain page template is used

KortschotI've been fiddling for quite some time now but can't seem to figure this out. What I am looking for is this: One creates a page and set it to use a certain page template, say: "Shop Owner" WP automatically creates a few subpages with the same page template The hierarchy would look like this: ...

1
Q: PDO Insert Session Values to Database

OmniPotensI am working on a Session based shopping cart. I want to save the Cart items in the session to my Database. Please I need help on how to go about it. I have read around but haven't found any clues to solving my problem. Below are 2 images, one is a sample DB table while the other is an assumed S...

0
Q: How to insert multiple values into a table in php

Bob MarksI have learnt and been taught how to insert a single value into a column in a table but i cant get my head around inserting multiple values into multiple columns in the same table I want to be able to add an id, first name, second name and email, can anyone help? please. I have a php file to co...

0
Q: PHP MySql query: Split into parts with regex

Stefan VogtI have: SELECT col1, col2, col3 FROM mytable WHERE col1 = :col1 Or I have: SELECT col1, col2, col3 FROM mytable WHERE col1 = :col1 ORDER BY col2 LIMIT 0, 25 Or I have: SELECT col1, col2, col3 FROM mytable GROUP BY col1 An so on... How do I split this into a first part (SELECT-Part, F...

0
Q: How to define an action as separate class in codeigniter

fuzionproIn Yii we have CAction to define a action Similarly can some tell how we can define an action as a separate class in codeigniter?

-3
Q: Extract all values from column to variable

user2964048I have a TABLE with 4 rows. I tried a lot of time but I cannot do it EXPENS ID EXP 1 789 2 593 3 342 4 345 I want define 4 variables on PHP $var1 = ? (789) $var2 = ? (593) $var3 = ? (342) $var4 = ? (345)

0
Q: Calling a PHP method from an Object the proper way

LiamI am still learning OOP PHP and I keep swapping and changing between the following way of calling methods within an object $obj = new Model(); $obj->method($param); against Model::method($params); I understand the difference when I within the method as I can use $this in the first example, ...

0
Q: Collision variables php

cheksI have some file, which includes a lot of files. How i can avoid the collision variables?? I'm searched for a solution and find namespaces, but i`m not sure that namespaces solves the problem. for example: require($pach.'/get_124345.php'); require($pach.'/get_321223.php'); ...

0
Q: I cant post my textbox value to another page

user2751773Hi this is my first aplication .It is self explained code. I think I have missed out something I am trying to change some chars to other but I think I couldnt .because I am just getting a blank page this is control.php <?php function donustur($karakter){ $tk=array("ç","ş","ö"); ...

0
Q: how to show all data from joomla table?

user3009655recently i learned how to get data from database by this method public static function getdb($params) { // Get a database object $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('*'); $query->from('#__categories'); // sets up a database query for later execution $db->setQ...

0
Q: How can I put own png image in vtiger pdf template?

user2953012How can I put here own png image? https://github.com/vikas-saklecha/vtigercrm/blob/master/vtlib/Vtiger/PDF/inventory/HeaderViewer.php This is file with PDF template (invoice etc.)

-3
Q: Redirect with DNS

SamulI need to make a transparent redirect (without the user seeing the address change in the address bar). When the user types example.com he/she should be redirected to 123.123.123.123:9090 (IP:PORT). I cannot use CNAME or A cause it does not accept the PORT. How can I do that? I know that using SRV...

0
Q: PHP Simple HTML DOM Parser: Get all posts

Sergey YakovlevI have a simple task. Get all articles from the page, as well as get all pictures for each article. Today I decided to use PHP Simple HTML DOM Parse As an example, I used the following code: <?php include("simple_html_dom.php"); $sitesToCheck = array( array( 'url' => 'http://goog...

0
Q: Getting PHP mail() to show sender like it's sent through Outlook

MhystiqueI'm using the mail function to send some mails to specific users from a intranetsite. It is working, but I want to finetune it if possible. When I set in yyy@domain.com as from address, in Outlook it doesn't show up as a normal mail sent through Outlook from the same sender. It just shows the s...

0
Q: Insert CURRENT_TIMESTAMP with prepared statement

GeekGirlI´m inserting data with prepared statements. How can I assign a variable to CURRENT_TIMESTAMP and bind the value? I have a database table with the columns "name, lastfed, lastdoc and id". The 2 columns called lastfed and lastdoc are of type timestamp. I have a function and once I run it I want ...

0
Q: Changing postgresql to mysql?

user2954486basically my teacher has given me an example of an dynamic php dropdown using postgresql, however I want to modify it using mysql, how difficult would this be?

0
Q: SVG to CDR converter

ZsonyoI have an SVG file which contains rotated, semi-transparent, clipped (clip-path) elements (e.g polygons, images). This file is perfectly working in Inkscape but for further image processing I would like to use it in CorelDraw, too. But opening in CorelDraw the result is a mess (X6 actually, but e...

-1
Q: Display Username At Top Of the Admin Panel in PHP

Hubbak Khani dont knw how to put username logged in at top of the admin panel in PHP I'm trying to show an users username after he or she has logged in but I just can't get it to work... Here are the codes I am using: First off, an user has to log in. After using the form, this sript will load ? wat will i...

0
Q: Sort by using drop down and variable in MySQL statement (PHP)

Alex WI am trying to sort my results by using a drop down menu. I want to get a value from the drop down and enter it into a MySQL statement by assigning it to a variable. I have tried a few things with no success. Any ideas? Thank you.Before I could pull the data from the table and it displayed correc...

0
Q: Error in query for writing to database

antoon100Anyone have any idea why this error and how to solve it? $sql = "INSERT INTO gastenboek ( naam, email, bericht, datum ) ...

0
Q: opencart get the product seo url from within admin

John MagnoliaI am extending the newsletter area so that I can send out an email with a list of products but I can't find out how to get the seo url for each product? When I do this I actually end up with the admin URL. $this->url->link('product/product', 'product_id=' . $row['product_id']) This same code ...

0
Q: How to display price without decimal in Woocommerce Shop?

Bill BronsonI got a woocommerce shop and like the title says I only want to display the numbers in front of the "." without the 2 decimals. I dont got any strange prices like 123,45€ in my shop. I want it to display like: right: 120 € wrong: 120,00€ How can I do this? Is there an option in the backend? T...

0
Q: How To Count children for binary tree using PHPCodigniter

user2988211I have built a binary tree using PHP Codigniter but i want function that can Count the left child and right child for every parent. print a message when balanced happened on the tree like if the number of the left children equal to right children send message (balanced happened ) . MY tree ...

0
Q: Laravel can't find the 64bit SQL Server drivers

user2890027We've had to install these unofficial 64bit Sql Server drivers (our sysadmin had a long explaination why, but it's over my head): http://social.technet.microsoft.com/Forums/sqlserver/en-US/73a97526-8aa9-4281-8a9a-0eb396e1350c/sql-driver-for-php-55-64bit-windows-server-2012-iis8?forum=sqldriverfo...

0
Q: Separate mysql code from php code, any tips?

ProDrazWe have decided to separate mysql code from php code. Basicaly we will put each table to class (we have 121 tables aprox atm), and some tables have a dozen of rows. Meaning quite complex MySQL Database. How do we do it? Where to start? What to pay attention to? Is it enough to call class (table)...

0
Q: posting the wrong form values when jquery ajax posts

BradI am using twitter bootstrap's v3 modal window to display a star rating form and textarea box form to review a recipe. When I enter a review in the textarea and select the submit button, it posts the values from the form#rate form and not from the form#form-review form. If I just click on the st...

0
Q: Warning: ftp_login(): supplied resource is not a valid FTP Buffer resource in

ClarklightI am pretty new to php, trying to connect to server via ftp to upload images, but i am only allowed to use fsockopen thru port 80(http) and 443(https), but i am getting this error Warning: ftp_login(): supplied resource is not a valid FTP Buffer resource in Can anyone help? THanks! The error is c...

0
Q: concatenate function name symfony2

un_utilisateurso i have a bunch of functions depending on the variable, i want to be able to do something like this : ( it returns an error hence the problem i'm unable to solve ) function($x){ fetch.$x.() // if x=Name i would like it to execute fetchName()...and so on } and something like this funct...

-2
Q: mail() function doesn't appear to be working

JackI am using the following code to try and send an email - I can't see any problem with it - but it's not working, it displays the message "email sent" but I don't receive anything. <?php $to = "email@address.com"; $subject = "Query"; $message_body.="Name: ".$_POST["name"]."<br>\n"; $message_body....

0
Q: how to remove some empty space from inside of html

PooyaI don't know how to describe my question because I don't even know this is an error or not! In most of my works there are some empty space inside html. I know some space or other special characters are skip from rendering of browsers but this one never skips! in my php file I have one includ...

0
Q: Issue with COM object and Plesk Permissions: Uncaught exception 'com_exception'

Ben CareyI am trying to initiate a COM object from PHP but keep running into the same problem. Whenever I call new COM('Something.Here'), I get the following message: Fatal error: Uncaught exception 'com_exception' with message 'Source: CrystalDecisions.CrystalReports.Engine Description: The type ...

0
Q: .htacess SEO urls and redirecting urls

KendallI am a php programmer but not really an expert with apache server related stuff. I have to re do a project where I need to have SEO urls which would be done in a separate directory structure different from the current one. I would also have to convert existing urls from the current directory stru...

0
Q: php enquiry form sending mail to gmail but not sending to personal domain email

user3039921// The below script working fine to send gmail, but i'm not able to receive personal company mail. "; echo $error.""; echo "Please go back and fix these errors."; die(); } // validation expected data exists if(!isset($_POST['first_name']) || ...

0
Q: mySQL error when I go to login in admin panel

user3042335in my site when I go to login in my Admin panel its getting me error like this.. `Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home3/dftboxco/public_html/laptopmela/managecpanel/php/login_query.php on line 14 Warning: Cannot modify header information...

-4
Q: page can't load with ajax

user3042248I have 4 files: pesan.php carirumah.php detail_rumah.php booking.php in the file carirumah, I load detail_rumah with ajax. This is working fine, but when I want to load the file booking through detail_rumah.php using ajax, file can not work. Is there anything wrong? But when I type the url...

0
Q: Getting https headers using curl in php

JokeSparrowHow to get https headers And save it into array then use this header to send post using curl Can somebody help me? Im searching 2 days to make this work but i can't I need to get headers Using curl and save it to array Then i use this header to send post using curl The header have cookies and ...

-1
Q: PHP Email form, can somebody please help me fix this code?

user3042325http://pastebin.com/717zuKHg Okay, so I have this problem with my mail form, that it only shows the name errormsg, and not the rest. And then it doesn't "send". So please go look at it! Thanks!

0
Q: Mail message with foreach loop isn't working in PHP

Frank KluytmansI want to mail the details of a web shop order and therefore need to use a foreach loop to construct my message. I thought the message below would work, but it doesn't. How can I make this work? '<table> <tr> <td class="column-product"><strong>Pr...

1
Q: Updating to Mac OS 10.9 broke my Apache Virtual Hosts

fraxtureWhen I updated to my OS 10.9, my apache virtual host setup broke. I first discovered that the include line for the extra/httpd-vhost.conf file had been commented out, like so: # Virtual hosts #Include /private/etc/apache2/extra/httpd-vhosts.conf So I uncommented. Now, the virutal hosts seemed ...

0
Q: Sorting data in array without changing the sort order

steepedI am grabbing data from the database, and sorting it in an array. The data from the query (which is displayed in the proper order): id task_id note date_created user_name document_name document_type 238 131 3g 1385563455 Admin doc3 jpg 238...

0
Q: add row and colums to table with jquery

user3042307i have a problem with a table to add a row and colums and can remove them, this table show what i need exaclty, and i have create one but not good at all. my table is 3x4 and can add new colums before the last one and a row before last one too, and need a button at last to remove the ea...

0
Q: Joomla how to make 2 html overrides for menu

user3016968I've overrided the html menu in joomla, but now I need to render the same menu in the footer of the site, but the template there is different, is possible to make 2 overrides of a modules template?

-3
Q: PDO::fetch(PDO::FETCH_ASSOC) returns false only on Safari & Firefox

GGioThis is strange, when query is ran on Google Chrome or IE it returns correct results, when it is ran on Firefox and Safari it returns false. I've been trying to fix this for long time and cant figure out why. Here is the query: $userid = 1; $date = '2013-11-27 10:18:35'; $type = 'call'; $...

0
Q: How get a link from another page with php or jquery

Someone33I have an link generator on page download.php which is generating an unique link each time the page's reloaded for downloading some files. How to $_GET (or $.get) this link from another page, e.g. example.php, so the link would be always the same and the user can't generate infinite download lin...

0
Q: How to improve security for php session cookies, use a changing key?

user2070436I have sort of a best practice question on Session cookies in PHP. I am using way too many of them at a time, but I still need to track a uid between pages. There needs to be some second session variable that also goes with the uid, some type of security key thats different from user to user. ...

0
Q: 2 versions of PHP installed Mac OS X causing xdebug fail

RobertoMac OS X 10.8.5. I am trying to get Netbeans running using xdebug. To date I have tried XAMPP and MAMP without success. Apparently there is a native PHP on the Mac that I can't figure out how to remove: sh-3.2# which php /usr/bin/php sh-3.2# php -v PHP 5.3.26 (cli) (built: Jul 7 2013 19:05:0...

0
Q: RabbitMq closes connection abruptly

ep0I installed celery on my machine and have the tasks.py from tutorial. It works from python interactive console, but I am trying to call add from php. $c = new AMQPConnection(); $c->setLogin('guest') $c->setPassword('guest') $c->setHost('localhost') $c->setVhost('/') if ($c->connect()) { echo...

0
Q: Finding Quarter of the year for current day and next four quarter

JakeNsmithHow to construct an array having elements current Quarter as first element and next four quarters as next elements. Consider for the year 27-Nov-13, array should contain elements as follows $ac_quarters = array (AC4-13,AC1-14,AC2-14,AC3-14,AC4-14); Please see me as novice to PHP programming.

0
Q: Persistent login with Google oauth2 and php

Carson PUsing Google's oauth2 example code, I have a test site setup and working, for the most part. Here is the general flow as it currently stands: User clicks the login with Google button. User receives the Google pop-up and authorizes my web app's request for information. User is directed back to m...

-3
Q: PHP URL Compare

user3042351I need to compare URL paths. Example: I got a array with 2 URLs path's in it like: array('/products/typeone/', '/products/typetwo//*') Now I got also the needed URL Snippet of the Url: Example: '/products/typetwo/test1/test2' What I need is to compare the URLs in the array but the '*' have t...

0
Q: Google Chart with table giving "[object Object] does not fit the Control specification" Error

noobie-phpi am trying to implement Google Dashboard with graph connected to dataTable, This is my script <script type="text/javascript"> function drawVisualization(dataArray) { // function drawVisualization() { // Prepare the data ...

0
Q: I need a wildcard to use for PHP strings to test for a string at the beginning of a string and how to make case use multiple conditions

freddydoggieSo, I have this PHP code for a dynamic menu bar: switch($location): case "/": echo ' <li class="active"><a href="/">' . $name . '</a></li> <li><a href="/parents">Parents</a></li> <li><a href="//staugi...

-5
Q: <br> is called while it shouldn't be

Erwin SaasenI'm having a problem with my code of my site. I am trying to echo a <br> only when some variable is set. The variable isn't set, still the <br> is shown on my website. this is the code I use: if(isset($_SESSION['wwerror'])){ $wwerror = $_SESSION['wwerror']; echo "$wwerror"; $wwerror = ''; ...

0
Q: Is this good management of the Encryption Key

user1252336Environment: php mySQL The site is to be hosted on a shared internet server, to store non-commercial data and it will be clearly labelled as not for sensitive information. I wish to offer a credible solution to the risks of any server admin simply being able to read the plain text fields in the...

0
Q: Trying to read a float value from MySQL database and encode to JSON to be used with a Google chart

cstuI have done a few examples like this where i read data from a database and then encode it to JSON so that I can use it in google charts. I know that the PDO always returns a string and up until now I have been able to cast it as an int which worked fine but now I have a column that is a float an...

0
Q: Using PHP to find any external devices plugged in

Martyn Lee BallI need a way to find any devices that are currently plugged into a machine using PHP, the web application is ONLY run locally for a business. I was thinking of maybe checking to see if a folder exists in a directory (for example: E:/DCIM/) and if there is an error the. It wouldn't exist, so chec...

0
Q: Unlink Function Error in Image Uploading

Hubbak Khani use this script to upload images for particular products but onece its done, again i use similar image to upload, it updates the information in it but does not show the same image but when i change the name of image it renders..... no idea what to do with unlink function??????? please help? <?...

0
Q: PHP checkbox is checked take textbox value

user3017729Hi im trying to make a mail system that takes the value of textbox that have checkedtextboxes but i cant seem to get it working and have no idea left how to do it so i have no code at all. I know you need to make an foreach array loop but i just cant seem to get it working. here is the table i w...

0
Q: php: how to count with while loop and prevent undefined offset without knowing how much elements to count?

user2718671When counting with a while loop (within a 'for loop') I use not a length-parameter but this function: function endsWith($haystack, $needle) { return $needle === "" || substr($haystack, -strlen($needle)) === $needle; } With the help of that I loop through an array of preview thumbnails and ...

1
Q: Set the initial "current" time in PHP

Koi FishI'm having an application in PHP which I want to foresight how it works in certain situations which I need to rewind the time to the future. Is there any ways to do this? I could only find timezone function which let me change the time zone but what I want us to change it to the future like......

0
Q: Php mysql routine for calculating in one table and place results in another table

user3042384I need a php routine for my mysql database. I have made an example to illustrate the problem: Lets say I have a table that registrates customers and how much money they spend. A customer can have more registrations: Table1: Name - Amount Jane - 3 Mark - 4 Sara - 5 Jane - 5 Jane - 6 Sara - 2 ...

0
Q: PHP MVC Frameworks Speeds

CR41G14It seems apparent that late models of the PHP MVC model frameworks differ greatly with regards to their speeds and performance. I have done some research and it seems as if the Zend 2.0 is looking as the best solution, however I have now stumbled across Phalcon PHP. It seems to be promoting som...

0
Q: joomla 2.5 module: how to foreach loop put in tmpl/default.php

user3009655in joomla module to get data from database we use the code public static function getdb($params) { // Get a database object $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('*'); $query->from('#__categories'); // sets up a database query for later execution $db->setQuery(...

-3
Q: How to make a script that can make subdomains of a website?

user2976239How to create a php script to allow users to create sub domains, is it possible?If it is possible then can you tell me how to make a script such like that?

0
Q: redirect to URL if x days passed wordpress

AlecsLet's say I have this URL: www.mywebsite.com/myCPT/post, here I want to check if 3 days has passed since the post was created to redirect to www.mywebsite.com/myCPT/post/stats. In this 3 days time frame the user should not be able to access www.mywebsite.com/myCPT/post/stats. But this needs to ...

0
Q: PHP + MongoDB - Fetch entry from array inside collection with $elemMatch not working

taxicalaI have the following object: { users: { _id: "users", entries: [ { _id: 1, username: "taxicala", password: "password" }, { _id: 2, username: "guest", ...

0
Q: Artistdata.com RSS Feed parsing works locally but not on production server

R1RacerI've been trying for the past couple of days to figure out why my code works perfectly locally but fails when deployed on a production server. My local testing environment is the latest MAMP on a 10.7.2 Lion iMac. Basically I need to fetch certain XML RSS data from Artistdata.com in order to i...

0
Q: How to add a space after every character in a string in php?

Himanshu ChawlaI have a string in php named $password="1bsdf4"; I want output "1 b s d f 4" How is it possible. I was trying implode function but i was not able to do.. $password="1bsdf4"; $formatted = implode(' ',$password); echo $formatted; I tried this code: $str=array("Hello","User"); $for...

0
Q: Mouse over effect in a php include menu file

user3042254the page in question is nashvillechefs.org I moved the menu to a PHP file; Internet Explorer and dream weaver live code show the effect of the image change as I expect it to. On mouse over the image changes to red. However Chrome doesn't work at all and the initial load of the page in firefox th...

0
Q: extract variable from mysql to use in php

user2964048I write correct table, but i'd like to define one variable for each loop value. all "conversion rate" value should be single variable for use again.. $query99 = "SELECT iso_code, conversion_rate FROM ps_currency"; $result99 = mysql_query($query99) or die(mysql_error()); echo ' <table border="0"...

0
Q: Get WordPress variables in AJAX PHP file

AndreI've written a form and trying to send the data via AJAX to my own PHP script within the theme folder. There are different kinds of operations within this file. Everything works fine, but now I need to access some variables (e.g. bloginfo('url')) and trying to write them in an email for example....

0
Q: Contact Form won't send email on localhost

Bjorn SeigersI'm trying to create a contactform which is placed under a sticky button on the right hand side. It seems my form isn't submitting at all. I tried to put the code on seperate files using action="contactus.php" without any result. I also tried it on the same page, but still no luck. Can someone g...

0
Q: uploading image not working with running querys using foreach

user2996371i am strcuked in a unexpected problem..i am having many queries of creating and insert. eg: if (isset($_POST['install'])) { $install_queries[] = "CREATE TABLE.............."; $install_queries[] = "CREATE TABLE.............."; $install_queries[] = "CREATE TABLE.............."; $allowedExtss...

0
Q: Redirection inside system command is not working?

Messi L I have a php code in which I am trying to redirect the output of a command to a file My code is <?php shell_exec("ls >txt.txt"); ?> But when I checked the file, nothing was inside!.This was working when I tried this command line, what might be the issue?

0
Q: Purpose of <meta http-equiv="refresh"> with recursive URL in a separate file

user3042249Google has been visiting a site file, 'test3.php', many, many times. I'm wondering if this could have any effect on our SEO, if it shows a fault in the coding, or if it part of the design for this site -- simply a way to refresh pages using a separate file. And if so, is this a good practice? ...

0
Q: Magento - PayPal not redirecting to mobile site

DutchTechOn my Magento store I have a problem with PayPal. Magento is not redirecting PayPal payments to the mobile PayPal template if the customer is using a mobile phone or tablet. I contacted PayPal and they let me know that the variable "discount_amount_cart" should be removed in order to redirect cus...

0
Q: Is it possible to manage permissions only on specific entries in a table with FOS User / Sonata / Symfony?

Secular KidI'm actually making a small application that aim to show the capacity of the Admin Generator Sonata. For the moment, I can show tables from PostGIS using Doctrine, edit them, filter them. I also added FOS User into my Admin Bundle, so that I can handle roles. For example, I have three tables in ...

0
Q: Three way many to many with propel ins symfony2

Jim OuwerkerkIs it possible to create a three way many to many relationship with propel? What i want to do is the following: There is a Todo table, Project table and a Checklist table. You can assign multiple Todos to a Checklist and you can assign multiple Checklists to a Project. When you assigned one o...

0
Q: Joomla how to build a horizontal table menu and a vertical dropdown menu

user3016968<?php /** * @package Joomla.Site * @subpackage mod_menu * * @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; // Note. It is important to rem...

1
Q: Doctrine2 how to deal with updating entities after rollback? ("The EntityManager is closed")

Adam ZielińskiI am trying to do some processing within a transaction and save information about potential failure, much like this: $conn->beginTransaction(); try { $report = $reportRepository->find($id); $user = $report->getUser(); $specification = new Specification(); $entityManager->persist...

0
Q: Aptana Function Hinting – Optional Arguments Missing

Terry HarveyI've been messing around with IDEs lately and just downloaded Aptana Studio for Mac. I'm loving the method hinting – problem is, it doesn't hint the optional arguments. My code is this: public function ban($userId, $period = 86400, $reason = null) { // ... } But Aptana only autocompletes t...

0
Q: got error message when i trying to use php, thrift and cassandra

user3042491i try to write a class to connect to cassandra using php but i have an error!! Fatal error: Class 'Thrift\Exception\TException' not found in /usr/share/php/Thrift/packages/cassandra/Types.php on line 709 everybody can help me? tnx

-1
Q: the difference about PHP on 32 and 64 architecture?

user2257958i want to know the internal impliment of php, for example , the int length, the CRC method, or the Memory Managment.... when i write php, i do not know the difference ,but in fact it is difference on 32 and 64 architecture. Some one can tell me ? or for example?

0
Q: PHP, X-SendFile: Sending file together with outputting text to the browser (via echo)

Bunkai.SatoriI use X-SendFile Apache Module to download large files from the server. Downloads work well. However, when the download starts, I need to output some text to the browser, such as: "Thanks for downloading the file...." My problem is, that I can not do both in one script. I can either download the...

0
Q: Cannot view https pages in easyphp

RywekI'm running a copy of a website locally with easyphp but it happens to have many https links and I can't open them in my browser. I can get around that by entering the page manually without the "https" before, but I was wondering if there was a way to not have to do that and be able to browse nor...

0
Q: Joomla 3.2 installation file/directory ownership issues

p3trisI am trying to install Joomla 3.2 using the host provided by my university. So, I have available one mysql database with the username and pass and the ftp username and pass to transfer data, only. That is, no Cpanel installed or ssh available. If I extract the file Joomla_3.2.0-Stable-Full_Packa...

0
Q: Find available time slots with SQL

StefanoI found an answer here on SO about the common problem of finding the available time slots in a database. The query works like a charm but it starts failing if I add a new event which starts before the alredy added events. In that case the order of the output is wrong. There is alredy a jsFiddle e...

0
Q: Setting Up an Email Drop Box that Posts Notes in an Application

MLcodeIm creating a web app that will give users a dynamic email like: 897987987@domain.com (This can be reset on the page) This will enable users to send email (CC, BCC) email with attachements to this address which will in turn, post the content of the email and files to the web application. I h...

-1
Q: Mysqli fetch_assoc first result

JaydenI have a fetch_assoc query that will grab 14 rows, but I want the FIRST result displayed so it is differnet to the others, then the rest are just ordinary. $site_events = $db->query("SELECT * FROM site_events ORDER BY time ASC limit 14"); while($events = $site_events->fetch_assoc()) ...

0
Q: OpenCart 1.5.6 - span colour box with each colour in of the drop down menu tab

Ali AzizI am using super mega menu module in Opencart 1.5.6 I have a drop downd category called Colours - I want each colour in the drop down to span a its colour in a small 20 x 20 box to the left - how can I acheive this via php?

0
Q: Appending get variable to URL already containing get variables

Matthew PeckhamI have a sub-navigation menu on my page that opens up whenever ?n=review is appended to the URL. I also have languages changing and session variables being set whenever ?language=xx is appended. However, if I am on a page with the sub-nav open, and I wish to change language from there, the ?n=r...

0
Q: PHP: How to get both key and value from an associative array?

StephenI have this associative array structure: $multiArray = array( 'key1' => array(1, 2, 3, 4), 'key2' => array(5, 6, 7, 8), 'key3' => array(9, 10, 11, 12) ); When I call $multiArray['key1'], I get the value (which is ...

0
Q: Please help me to customize my php echo code

NewUseri echo some data in the Author Box of my Wordpress Theme with: <?php echo $user_info->new_user_blond; ?> <?php echo $user_info->new_user_brown; ?> <?php echo $user_info->new_user_red; ?> The users can check one ore more checkboxes. If a user checks all 3 Checkboxes for example the result shows...

0
Q: Batch request Google Calendar php API

JasperVI'm working on a google Calendar sync with my application. I'm using the latest google-api-php-client Now I want to update all my event, so i want to use the batch operation. The example code of the php client api is: $client = new Google_Client(); $plus = new Google_PlusService($client); $...

0
Q: CSV to JSON. Some values are null

user2799097I build a CSV to JSON PHP File. But it won't work correctly. The value "faktor" is allways null. The value question is sometimes null. I hope you can help me. Thank you! The PHP File <?php $row = 0; $filename = "launeImTeam.csv"; $questions = array(); if (($handle = fopen($filename, "r")) ...

0
Q: Preg_replace_callback regex doesnt work correctly

Donatas Vileita $input = array("3.45Lt", "1.00€"); function kazkas($match){ if($match[3]==="LTL"){ $match[3] = "EUR"; } elseif($match[3]==="Lt" | $match[3]==="LT" | $match[3]==="lT" |$match[3] === "lt"){ $match[3] = "€"; }else{ $match[3]=$match[3]; } $changer...

1
Q: PHP Regex: removing whitespace after specific pattern

RhoVisionsSo I have a regex that finds bb style quote and replaces them with a blockquote. $text = preg_replace('/\[quote(?:="(\w+?)")?](.*)\[\/quote\]/ms', '<blockquote class="quote"><div class="quotee">\1 says:</div>\2</blockquote>', $text); It works just fine (its in a while loop to get recursive quo...

0
Q: server ignoring the file posted in Codeigniter for upload proccess

1linecodeI have 4 file inputs which I want to upload photos from them in codeigniter. every file input's value that's changed, the upload proccess is triggered(jquery form plugin). The problem is when this happens my logs from the server shows that codeigniter triggers an error and say "You haven't select...

0
Q: Error: options page not found in Wordpress Plugin

Guilherme ViebigWhen developing a plugin, using the Settings API do create an options page many developers get this message after saving the options and posting to "options.php" Error: options page not found in Wordpress Plugin Even adding a function to register this settings like: function pg_register_sett...

0
Q: Symfony2 compound form, associate errors with fields

eMeRiKaI have an embedded form with the compound and inherit_data options set to true. public function buildForm(FormBuilderInterface $builder, array $options) { $builder->setErrorBubbling(false); $builder->add('date_start', 'date', array( 'label' => 'form.date_start.label'...

0
Q: String Convention Proble in PHP and javascript

user3042645echo "<fieldset data-role='controlgroup'> <input type='radio' name='radio-choice-1' id='radio-choice-1' **value='$val' onclick='hello($s)'**/> <label for='radio-choice-1'>$val</label> How can I pass $s as a string like 'sdd' to a javasc...

0
Q: WordPress Dividing posts over colums dynamically

KlaasMI've been building a WordPress template based on inuitcss to get a responsive page. In this template, I'm attempting to get the WP posts from a certain category, and divide them over a predefined amount of columns. To achieve this I'm counting the amount of posts from category and compute the ne...

0
Q: Display Portfolio/Work Posts Only From A Certain Category As Default

user3042640I am using a theme that has a Portfolio/Work isotope template file. The portfolio currently displays all categories listed, but what I need is it to only display a specific category by default. This is the code that's in the file: <div class="row-fluid"> <div class="work-filter ro...

0
Q: Fail to load an xml via and API.

Bastien BastiensI would like to use an API, but my code fails : <? if (file_exists(rawurlencode('http://api.hostip.info/?ip=12.215.42.19'.urlencode('b&c')))) { $xml = simplexml_load_file(rawurlencode('http://api.hostip.info/?ip=12.215.42.19'.urlencode('b&c'))); print_r($xml); } else { exit('Failed to open the ...

0
Q: Measure area polygon and distance with google map

Alexander Ti have an issue with the passage of value with a maps. The code create a polygon, and measure the area (in mq), and the distance (in mt). And, in html i would what when the user draw the polygon, the code will give in output both area and distance. This code allows to the user of choice if to see...

0
Q: php get css with regexp

JordanI'm trying to get css selector + styles with a regexp but there is always a problem... So do you have an idea (exemple ?) of a regexp do get this: array( [0] => "div { background: red; color: blue; }", [1] => "section { /* comment with bad idea } <- this break regexp [^}]+ */ ba...

0
Q: propel not recognizing array

Tom MacdonaldI have a custom function in one of my query classes (simplified): public function applyStandardFilters($currentState) { return $this->useIdbAdsQuery() ->filterByCurrentState($currentState) ->endUse(); } when I pass it an array currentState: Array ( ...

0
Q: AJAX Wordpress theme SEO

user3042644I've recently updated my self hosted Wordpress site to an AJAX theme. I didn't realize until after i updated the theme that AJAX does not play well with the google crawler. My site is not being indexed correctly and im in need of some help and or advise. I have read googles tips and workarounds i...

0
Q: How does the Facebook-Login in PHP work?

michl_sofI have a question about the PHP-SDK from Facebook, that allows you to login / register for your own website: Basically the script starts with: <?php include 'includes/php/facebook.php'; $app_id = "APP_ID"; $app_secret = "SECRET_KEY"; $facebook = new Facebook(array( 'appId' => $app_id, ...

0
Q: Parse config files

AdamSmithWhat is best way to parse text(config files) where are diffirent "styles" to set variable: var_name = "Content" // comment var_name2 = Content // comment set var_name3 "Content" // comment Var_name4=Content // comment I need only var_name and content, ignore "set" and "// ..."

0
Q: Vimeo - How to check if a video exists and playable?

user44082My client has a video uploaded in vimeo.com that does not play. When I access the url with https://vimeo.com/videoid, it gives the response "Video conversion failed". How can I get this response ? I have gone through the API in developer.vimeo.com and am not able to find one. Tried the followi...

0
Q: Short HTML Content to a Tag with Class

user3005380I want to short a HTML Content to a Tag (ex. < p >) which has a specified CSS Class. The Content should not have more than 20 Words and it should be closed with the Tag. Which function can I use for it? truncate or substr?

0
Q: PHP: Outputting the system / Shell_exec command output in web browser

user2723949I tried to output a simple ping command on a web page in a similar way( and same time) as it is displaying in terminal, using shell_exec; But it is displaying only after the complete execution, while I needed it to display whenever it is displaying on terminal, My code is <?php $i= shell_exec(...

0
Q: fetch email ids from mysql db and send a mail to those email ids using php

user3038195Can anyone help to to the below code? I want to take few values from mysql database and then want to send a mail to those ids using php. In message body I want to populate few values which is taken from the mysql DB..

0
Q: Add two hours to the current time stamp

user689017I have the following syntax : $today = date("Y-m-d H:i:s"); $modtime = date( "Y-m-d H:i:s", strtotime( $today ) + (2*60 * 60)); I want to add two hours to the current time stamp , but I keep on getting the current time stamp from the above syntax. How can I make it pick the timestamp + 2...

1
Q: Return array values the match or don't match

paulie.jvenuezI have an array with both website addresses and words for example... $data_arr = array('www.quotes.com', 'www.google.com', 'www.yahoo.com', 'gmail.com', 'example.net', 'example.org', 'mail.com', 'quotes', 'google', 'yahoo', 'gmail', 'mail', ...

0
Q: In this case which is better in matching regular expression or parse_url

Jack BenSuppose we have the following link $link = "http://www.mysite.com/bbbbbbb.flv?something"; And we want to matching it. Upon this question how to match links that has extension @Thanks to all@ We have two ways regular expression and parse_url So my question which is better in your point of vie...

0
Q: Composer not installing or updating package

TheWebsI create a package and pushed it to github, My composer.json for that package looks like such: { "name": "adam.balan/AisisAjax", "description": "This is a component for AisisCore, that is - it should be installed to the Components section of the web based framework for wordpress....

0
Q: Wordpress,how can I convert textareas to use a wysiwyg editor?

Mike2414I have a question about wordpress. I am creating a web form for branch managers to enter data into a database, one of the fields can contain bullet points so I need to use an editor that will allow the user to use bullets and then convert it to html like the way wordpress handles posts. Is there ...

0
Q: PHP routing: display flash messages in View (Klein)

Jay RizziI am using Klein php routing for a simple app the documentation is ok for using the library, however it is not good at how to implement the views for instance I want to display a flash message on success/error/warning etc i understand how klein can store the flash like this error message in do...

0
Q: php shopping cart not displaying items in cart?

user3042765I'm trying to implement a php shopping cart on my site. I currently have the products page correctly reading from my database. When the cart is empty, the "There are no items in your cart," text displays, however when the cart has something in it, it displays the headers to this table, but no pro...

-1
Q: Php passing variable names

NerdsRaisedHandCan someone please explain to me what this piece of php code means. echo "<a href='product.php?product_id".$product_id."'> Is it saying that the link is taken from a variable from the product.php page and its named $product_id?

0
Q: Convert a string with numbers to pure integers

christopheI am a PHP noob. I couldn't work out how to convert a list of numbers in a string to pure integers. That is the exact(!) string I got: " 70, 51, 53, " That's what it should look like after conversion: 70, 51, 53 Thank you very much for your help in advance!

0
Q: PhpExcel setCellValue don't write anything

Vincent LITURI want to show an Excel file with some database variables. So I use PhpExcel, and I write this : $row = 5; $excel->setCellValueByColumnAndRow(0, $row, 'TEST'); And it not works ! But.. I use : $excel->setCellValueByColumnAndRow(0, 5, 'TEST'); It works ! I really can't understand the problem...

0
Q: PHP delete bulk mail from gmail

EugeneI would like to write a PHP script that will authorize into my gmail account and delete all messages with multiple recipients. I am able to authorize into gmail using imap_open but I don't know how to extract recipients from headers.

0
Q: Setting variable value if empty (PHP)

Alex WI am trying to set a variable value if a form is not submitted (where the value comes from). Below I have: if (empty($order)) { $order = 'ORDER BY product_name DESC'; } else { $order=$_POST['order']; } This always sets the value to 'ORDER BY product_name DESC' and ignores the form. Like...

0
Q: PHP values update from $_POST

mariusI'm trying to make a shopping cart. I have this sample form: <form action="./post.php" method="POST"> product id: <input type="text" name="prod" /><br /> <input type="submit" value="submit" /> I've done the field visible to test the script. If I enter a first value to I save it in a new $_P...

0
Q: Error when sending GET request using nodejs to apache

mohamed.alsumi am using nodejs to make request to apache server in certain condition then execute a php function related to this request GET request in nodejs (server.js) var options = { host: 'localhost', port: 80, path: '/myapp/users/logout', method: 'GET', head...

0
Q: How can INSERT and UPDATE query works on UUID[] type attribute in database table?

user3042753I am facing problem to INSERT and UPDATE data into database table which have two UUID type attributes. One is holding UUID and another is with UUID[]. For testing purchase I want to insert one row into database table then update inserted row again. How can it will generate "trips_id" and "pla...

-1
Q: What's wrong with my PHP Form

We Are All ConnectedI don't understand what's wrong with my form code. I've checked many sites or even answers on this forum but I can't find the right answer. When I fill in the form and submit, nothing happens. I also don't receive an email from the form. This is the HTML5 code: <form id="reservation" name="res...

1
Q: cURL Download of image isn't an image

randomdevI'm downloading an image via curl from filepicker.io. Here's the downloading code: $url= $row['loc']; $path = 'tmp/'; $path .= rand(100,999); $path .= $row['name']; $fp = fopen($path, 'w'); $ch = curl_init($url); curl_setopt($ch, CURLOPT_FILE, $fp); $data = curl_exec($ch); curl_close($...

0
Q: Searching and retrieving the data from multidimensional array

DharmeshI have a multidimensional array (of Google Analytics data), like the below: Array ( [0] => gapiReportEntry Object ( [metrics:gapiReportEntry:private] => Array ( [uniquePageviews] => 1 [visitors] => 1 [pageviews] => 1 ...

0
Q: Joomla 3.0 ReCaptcha zoo comments gives 303 error

lee murphyFrom the following URL http://radian.co.uk/have-your-say-committee-blog/item/alan-s-first-blog-october-2013 There a ReCaptcha for the zoo comments. However when filling this out it gives a 303, and doesn't notify you the comment gone through. The public and private keys are correct. Thanks in ...

0
Q: How can I switch templates for the "attachment" page my images are displayed on?

user1738825Problem is, my images are showing up in search engines and the attachment page they're showing up on looks horrible. I messed it up when I used CSS to build the page templates that my regular content displays on. Since my other pages look fine, I really don't want to rebuild whatever template ...

1
Q: Unexpected end of mysql in easyphp 13.1

VickelAfter a power cut and being forced to reboot my win7 PC I couldn't use mySQL on EasyPHP-DevServer 13.1 anymore, the message: “Unexpected end of mysql”: I've found this post. Tried all answers and found @Jessiiem answer to work. As I cannot comment (not enough privileges), I want to put here a ...

0
Q: Unknown Error in Yii Framework

gultomicroI have this code in my Yii Music Store Application, but I didn't know the error(s). My idea is to show/browse the category/criteria of album, artist, and genre. But it always show "the else condition". I have tried to fix it but I can't find the error(s). The code is below. Hope anyone can fix it...

1
Q: WooCommerce Show Cart Items on Checkout Page

YazminI'm working on this website: http://whiteheadperformance.com I was asked to add a list of the cart items to the checkout page. I decided to add the [woocommerce_cart] shortcode to the checkout page, above the [woocommerce_checkout] shortcode and simply use CSS to hide the "Proceed to Ch...

0
Q: How can I put CakePHP templates (CTP files) into HTML?

user3042784Whilst I am familiar with HTML, CSS, SQL and some Javascript, I know nothing about PHP and my hours of searching on the Internet just takes me to tutorials which show me how to build PHP scripts from scratch, which is not helping me. I am not sure I entirely understand the concepts I am dealing w...

0
Q: create webservice to get values by json in serverside

Waldhoma AnaI try to create webservice to get values by json in serverside. Make the job easy in client side. Is there any possiblity to receive/manipulate data from a foreign server used aspx with method get? Sample : url:http://www.oncf.ma/Pages/ResultatsHoraire.aspx Request Method:GET Parameters: depa...

0
Q: PHP Google App Engine with SESSION,COOKIES

ventsi.slavI`m just starting a project with google app engine using PHP. Something very strange appears today.. Simple code: session_start(); if ($_COOKIE['test'] == 1) { setcookie('test', 2); } elseif ($_COOKIE['test'] == 2) { setcookie('test', 3); } elseif ($_COOKIE['test'] == 3) { setc...

0
Q: PhP Exception message shown despite been caught by the exception handler

SamirI have set an exception handler in my PhP program using set_exception_handler() and it actually works fine. In the sense, it does catch exceptions not otherwise handled by me, and as provided in the handler, logs the exception details. So, why am I complaining? Problem is that in addition to logg...

0
Q: Catch the login_chek on symfony2

user3033361I need that at the momento that the user make login y catch his username and save an historial of logins, but i dont know how to cacth that information. I wait that someon here can help me please that is a little urgent. really tanks.

0
Q: Showing a dynamically built div

Jen MasonI have a dropdown menu built from entries in a database. What I need to do is to show certain content based on the selected entry in the menu. So, if I choose "Apples" in the menu, I can write a query to pull "Apple" info out of the database and the content div will show this information. "Orange...

0
Q: Yii ActiveRecord cannot define static variable

LiamI am trying to delcare a static variable within my model in Yii. Like this class ActiveServices extends MyActiveRecord { public static $periodStr = array(1=>"1 WEEK", 2=>"4 WEEK", 3=>"1 MONTH", ...

0
Q: How to compute a unique hash for a callable

MarkI'm trying to write a memoization function, and I just realized this solution does not work when the callback is not a simple string. For example, PHP can accept a callback in the form array($this,'memberFunc'), which is not amenable to serialization. Then I realized that we don't really want to...

0
Q: Different ways to create a Connect Function in a Class?

user2701687Okay so I have some what of a dumb question, I've seen tuts and different things on making a CMS and I want to make an oop CMS, and I was wondering if someone could explain to me what the difference was between using one of the two examples? Ex 1 - class myClass { var $username; ...

0
Q: Script continues execution after "504 Gateway Time-out"

grimv01kI'm running this script under nginx+apache. It sends large data packages (split into portions) to a remote server, calling cURL execution in cycle. Strange thing to me is, that after timeout I receive 504 error into browser (captain), but script continues to run anyway! I've tested it - and scri...

0
Q: Bringing up Data from a postgreSQL database

georginaI was just wondering how do I bring up data from a postgreSQL database into a table? I've tried this: $query = "SELECT * FROM ref, manufacturer, model, os, colour, screen, pirce, description, enteredby"; $result = pg_query($query); echo "<table>"; while ($row = pg_fetch_array($result)) e...

0
Q: Proper insert statements

sharfI have recently gone through the process of normalizing my database, and now I'm not sure what the proper insert statements would be. Here is the structure: Size Table: size_id size_type size_value Item Table: item_id item_details item_price ... Then I have a linking table for all the siz...

0
Q: Show database content in right side

user3035776i have i problem, i want to show 'navn' in the left side of the page, and 'average' in the right but i dont know how? echo $i . ". " . $info['Navn']." ". number_format((float)$info['Average'], 1). "<br/><hr>"; i've tryed the code below, and it shows the navn in the left, and the average in t...

0
Q: undefined index, variabele, fatal error: fetch_assoc()

averrokenI have some problems and succeed, but not to find me. Here is the code: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title></title> <script> function verwijder(naam,voornaam,i...

-2
Q: Escape ( ) % [ ] from string php

Vincenzo Lo PaloWith this code I can remove all special characters from string in php: function noSpeCha($string) { return preg_replace('/[^a-zA-Z0-9_ %\[\]\.\(\)%&-]/s', '', $string); } But I need remove those characters too: ( ) % [ ] I dont know how proceed.

-4
Q: Unexpected <br> tag appearing on my page

user3042931I am having a problem in PHP files.In between my page i see <p> and <br> tag.I am new to PHP can u please help me remove these. i have not put these tags, they seem to appear from no where and are spoiling my alignment of div or tables.

0
Q: Why isnt my values being deleted in my table in php?

Bob MarksHello im trying to delete which ever value is selected in a drop down list. I cant seem to understand what is going on I have 2 pages 1 with my connection and functions to view the table in a drop down (which works) and a delete function (which doesn't seem to work) and another to call the func...

-1
Q: Need Urgent Help about Android programming

user2975582I want to pass the user current location and a phone number to mysql database via php..but since i am new to android. however i made the user application. Theoretically i know how to do but i am poor in programming..Just want help how to pass it to mysql database on a click..i want help to modify...

0
Q: Converting JSON to HTML Table

user1472266What is the best way for me to convert a json file to a html output I have a script that outputs some json. My json looks like: [ { "description" : "desc 1 test", "image" : "Http://test.com/gram.png", "money" : null, "title" : "title2" }, { "description" : "desc 2 test", "im...

0
Q: Facebook Object API create a place with PHP SDK

Gil BirmanI'm trying to create a new app object using the Object API. Here's my code... $facebook->api('/app/objects/place', 'post', [ 'access_token' => getFacebookAppToken(), 'object' => json_encode([ "title" => $row['title'], "image" => "http://www.mydomain.com/images/$id.jpg", ...

0
Q: generating random string which is collision free

user3006683I am using the below code to generate random string which I then insert to the database, and I would like to know if it is collision free? Is there a better way that is collision free? function generate_random_name() { $length = 12; $charactersa = "mRdxIU2r3dxa1B2c3D4e5F6g7H8i9Jqk1L2m13N1oF5P6q...

0
Q: unable to Create Complete Pie Chart using Google Charts

noobie-phpi have been trying to implement the google Graph and Dashboard, Here is the snippet for my code, <script type="text/javascript"> function drawVisualization(dataArray) { // function drawVisualization() { // Prepare the data ...

0
Q: Many to many relationship - Mysql&PHP

user3042959Let' say I Have 2 tables, webpage table, and a keywords table. It's a many to many relationshiop, right? One webpage can contain more than one keyword, and one keyword can be part of more than one webpage. Webpage table contain id field as PK, and few other fields. Keywords table contain id as ...

0
Q: Basic Bar coding scanner and Wordpress

WarlordI am in the process for creating a simple Barcoding scan and storing information in a database. The work is for a Non-Profit who scan books and then sell it on their website. This is what i am looking for - 1) Scan a book using a USB Barcode Scanner(Cheap to find online, flexible i can use an A...

0
Q: How to get a RESTful response with sub-resource represented as uri using FOS Rest Bundle and Symfony2?

user3042620I am using Symfony2 with Doctrine and FOS Rest Bundle (which uses JMS serializer). There are two entities Father and Child: <?php namespace Acme\Bundle\CoreBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * Father * * @ORM\Table() * @ORM\Entity */ class Father { /** * @ORM\Co...

0
Q: Error with getting data field from database

user3009010I am using this code in my model to get "user_id" of logged-in user from register table function get_user_id() { $this->db->select('user_id'); $this->db->from('register'); $this->db->where('username', $this->session->userdata('username')); $query = $this->db->get(); } and ...

0
Q: How to make a list of permalinks in wordpress, including all languages?

user2843307Background: Export list of pretty permalinks and post title The PHP file solution provided in the question above seems to work well for all of our English links. Can anyone provide guidance on how to create a list of WordPress permalinks that includes multi-lingual URLs? For example, the site ...

0
Q: Array of years, months and weeks working but week 01 of year showing incorrecltly

user794846I have an array of years, months and weeks. //Returns an array containing the years, months and week numbers between two dates function year_month($start_date, $end_date) { $begin = new DateTime( $start_date ); $end = new DateTime( $end_date); $end->add(new DateInterval('P1W')); //A...

1
Q: CodeIgniter Custom Library Not Loading

Mike DeMilleI'm somewhat new to CodeIgniter, so please excuse any of my ignorance. I've also researched this for an entire day without any success. I'm developing a fairly simple application with CodeIgniter - it's just a form to process the registration for employees wanting a recreation center pass. I'm...

0
Q: upload a photo in IE with jquery form plugin

1linecodeI want to upload a photo with jquery form plugin by malsup. it works in all browsers except the IE. nothing happens when the upload proccess begins. my version is 9.I'm using codeigniter serverside so far I've done: PHP : $name = $this->input->post('name'); if (!$this->upload->do_upload($name)...

0
Q: num_rows() returns 1 even when there are rows

Fahid Mohammad$this->db->select_sum('score_0') ->select_sum('score_1') ->select_sum('score_2') ->select_sum('score_3') ->select_sum('score_4') ->select_sum('score_5') ->select_sum('score_6') ->select_sum('score_7') ->select_sum('score_8') ->select_sum('score_9') ->select...

0
Q: Keep process active from PHP

markoubI have a OpenCV program that I need to contact from PHP script in order to run some face recognition procedures. So, whenever new image comes to system I have to contact it and send it for processing. However, what takes longest in my c++ program (OpenCV) is loading a facerecognition model. I.E....

-1
Q: Posting and retrieving data HELP required

Shahlin IbrahimI just want to know the logic on how this could be done : The Posting part : There's a posting section, where users can post text, image, or both (both text & image inputs are in the same form). If at all, a user is posting, I want any one of them to be a required field (Either they have to pos...

0
Q: Session get HTTP_HOST (and don't throw error in testing mode)

edi9999I would like to use $_SERVER["HTTP_HOST"] in my code, without the code breaking when I use PHPUnit. I'm using Laravel, but not sure If the solution is to: create my own getHttpHost Method that returns "" if the $_SERVER Array doesn't have a key called HTTP_HOST use another existing php function...

0
Q: Am I using these global variables correctly?

KodeSeekerI'm a newbie to php, and I'm in the process of hacking through some moodle code for a prototype. Anyhows I have some data Id like passed from file1.php to file2.php, for which Im using global variables. The values are intialized in file2 and I need them for use in file1. Here's how I go about ...

0
Q: About phpmyadmin localhost control data/ storage

user3033564I am new to phpmyadmin and run it on my localhost on my remote server. I am wondering how the phpmyadmin control the storage in the database. I am getting data every ten min from some devices and stored it into database. But I do not know how much data can appache server stored. Or it depends on...

0
Q: HandlerSocket: I cannot delete single row using a two columns

shranetMy english is not very good. I have a table CREATE TABLE IF NOT EXISTS `user_friends` ( `id_user1` bigint(20) unsigned NOT NULL, `id_user2` bigint(20) unsigned NOT NULL, `status` tinyint(1) unsigned NOT NULL DEFAULT '0', KEY `USER_ID` (`id_user1`,`id_user2`) ) ENGINE=InnoDB DEFAULT CHAR...

-2
Q: Student assignment: generating an comparing password with md5 hash?

user3043058Passwords were allocated to all users and the method of choice was to create a password which was built on two parts - a lowercase letter "m" and a number between 1 and 10000. An md5 hash was then created to form a 32 digit string. e.g the user with password "m1234" is represented in the database...

1
Q: Checking my code in Virtual Machine (VirtualBox)

CRONUSI'm totally new to servers and VirtualBox. Tried to search, but couldn't find what I need (maybe didn't know what to search). So I'll try to explain what I want. I want to code like I used to on Windows with my PHP IDE and to test the code instantly - best is to be able to test it on some VM. Le...

0
Q: wordpress wp_signon hang when i call this function but i already use same code and function on other site

user3037728function new_login(){ echo $username = $_POST['log']; echo $password = $_POST['pwd']; $remember = "false"; $login_data = array(); $login_data['user_login'] = $username; $login_data['user_password'] = $password; $login_data['remember'] = true; $user_verify = w...

0
Q: Simple SPA with Angular and Laravel API

Szántó ÁdámI want to create a really simple SPA with Angularjs and Laravel 4 as an API in the background. I'll have some simple posts and categories (a blog actually) with some static pages. I want to call laravel API inside angular to get the information I want. How can I organize the code to do it properl...

-1
Q: Creating a User based Web page

Dino PrašoI need to create a web page that has a login form in the main page. After Logging in, the users should be redirected to another web page inside a folder. There should be three different web pages (folders) and they should be restricted to certain users only, so that if a user can access one, h...

0
Q: Code to populate HTML form using AJAX not working? What's the deal?

user2925352Okay, so I am working on a website which has a dropdown menu for a user to select a school name. Once they select the school name, the address, zip, county, and district fields should automatically be populated. Sadly, I actually had this working just a few hours ago, but then being who I am,...

0
Q: xpath not grabbing contents

jkushnerI have the following xpath query: //div[@class="row"]//div[@class="post-container"]//div[contains(@class,"post-content")]//p I'm trying to grab the article contents from the following URL: http://gawker.com/u-s-pulls-ahead-in-taylor-swift-education-continues-t-1445261687 It doesn't seem to b...

0
Q: Creating WordPress plugin with text fields that save to wp database

robotturtleI'm trying to create a WordPress plugin that would output textfields to the website (ex. name, age, location...) and have that information save to the WordPress database when people fill out the fields. I read about the add_post_meta() function but that deals with input forms that are in the actu...

0
Q: long alphabetical strjng to short strings compression

MirI have a form that has dynamically loadded elements. These elements will increase in future. My concern is if IE 7 and 8 will not support very long GET urls. I could do a post, but GET is much faster. What I am looking for is a compressor that can take alphabetical strings and turn them into nu...

0
Q: Cannot install symfony eclipse plugin

Akash PaulI am getting this error message whilst trying to install the symfony2 plugin on eclipse: cannot find : http://p2.dubture.com it seems to not access the symfony repository. Any help would be much appreciated.

0
Q: wordpress archive.php pages (categories, tags, etc) not showing menus

user2579872Ive done a lot of searching up to this point for a solution and this is my last resort. I haven't found any other posts anywhere with my specific question, so maybe you guys can help me. Here goes. I have a pre-made theme for wordpress, that was working fine but now suddenly does not display the...

0
Q: No of entries of array in multidimensional array

Mukesh VaidyaI am new to php. Please let me know how do I count number of array entry in under array 80cb936e55e5225cd2af. array 'status' => int 1 'msg' => string '2 out of 1 Transactions Fetched Successfully' (length=44) 'transaction_details' => array '80cb936e55e5225cd2af' => array 0 =>...

0
Q: Jquery not executing when content added after the document has loaded

user3038421I use the following script to make likes on posts on a blog $('.like-unlike').on('click',function() { if ($(this).html() == "&nbsp;Like&nbsp;") { postID = this.id.replace('post_', ''); $.ajax({ url: 'auth/classes/comments.php', type: 'GET', ...

0
Q: displaying ckeditor 4.3 data in the same format when inserted

Attis BarrosI'm using ckeditor to insert the content to MySQL, the data inserts corectly but I am unable to retrieve the data in the same format when it was uplodaded. If I try to echo the information from the database echo htmlentities($article_content); I also have tried with just echo $article_content; ...

-5
Q: I want a php script to invite linked friends through my website, I am using linkedin connect

user3032564I want a php script to invite linked friends through my website, I am using linkedin connect, please help me if anybody have one.

0
Q: WORDPRESS - Bullet List of Sticky Posts only, hyperlinked to relevant post

Mr BurbleI found a post which helped me create a list of a specified number of sticky posts onto my homepage: <?php query_posts('showposts=4'); if (have_posts()) { while (have_posts()) : the_post(); if ( is_sticky() ) : the_title('<li><a href="">','</a></li>'); endif; endwhile; }...

0
Q: php login issue reported in chrome

RJcreativesI am writing a simple login script in php however it is reporting that there is an error on line 40. Personally, as an absolute beginner, I cant spot it. As far as I know everything else should be working fine but if there is anything else wrong please let me know. Any help? <?php if(isset($_PO...

0
Q: Ajax, Php- Postback only works on Firefox

user3021575Im using ajax postback to post all fields of a form to a php page, that sets some sessions. It all works fine when im working with firefox, but when i tried chrome and IE, it just does nothing.. Here is my ajax: $.ajax({ type: 'POST', url: '../client_controller/teste', data: { ...

0
Q: Append Var to URL in PHP

user2697262I can't seem to get this to work...what I have is a link being auto-generated to send out in an email, and I need to be able to append the user's email address to the URL, but I can't seem to get it formatted correctly. Here's what I have: href=\"http://example.com/unsubscribe/\" . $email . \"\...

0
Q: CURL,JSON and PHP

Prateek KathalI am working to connect with an API using curl and PHP I have this CURL statement curl -i --user api:YXBpOmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1 --data-binary @test.png https://api.blahblah.com/blah where YXBpOmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1 is the api key and @test.png is th...

0
Q: How to execute a sql file completly in codeigniter for creating(restoring) database?

Eldhose T JCurrently i am working on a codeigniter project, In order to execute a database file(.sql file 777kb size) directly via php code what i will do.Is any possible method? Thank you in advance.

0
Q: Nginx + PHP: stop process at canceled request

eKrajnakI have Nginx 1.4.4 and PHP 5.5.6. I'm making long-polling requests. Problem is, that if I cancel HTTP request sended via Ajax, requests are still processing (they don't stopped). I tested it with PHP mail() function at end of file, and mail is still coming (it mean that file didn't stop). I'm w...

0
Q: Changing Site Title, Description & Logo Dynamically in PHP

Hubbak Khani tried this code to change my site title, description & logo, it does once but again it does not replace the title, description & logo, really feeling very bad, need help please............................... <?php include "../db/db_connection.php"; if($_POST){ if($_POST['txt_site_title'] == "" &

0
Q: List of files into multidimensional menu on php

user3043178I need to create a nested menu from a list of files. The list looks like: [0] => /Unit 10/Lesson 1/.jpg [1] => /Unit 10/Lesson 2/.jpg [2] => /Unit 10/Lesson 3/Homework/.jpg [3] => /Unit 10/Lesson 4/.jpg [4] => /Unit 10/Lesson 5/5/.jpg [5] => /Unit 10/Lesson 5/6/.jpg [6] => /Unit 10/Lesson 5/7/.j...

0
Q: How to get current page's isset

user2267175Firstly, I havent been able to find anything useful on the subject, anywhere really. I'm trying to make something somewhat simular to a forum, A small explanation, (And yes, I know its not seo, but I'm only looking for functionality atm.) Lets say you go to example.com/?1, Then the database ent...

0
Q: Get Facebook closed group feed

Marek JavůrekI can easy access public group feed like this (dont need to login user): $this->fb->api("/" . $group_id . "/feed","GET"); But how to get feed of CLOSED group (on backend -> CRON PHP script)? Do I need to login, use my permissions and store it for backgroud-working script? Thank you very much

0
Q: PHP Echo Query Strings with multiple values

user1636949I have a page and I am able to send an iframe the query string. For Example: http;//myURL/store?iframe=https;//storeurl iframe source is: php echo $_GET['iframe'] Then ?iframe is set to https;//storeurl (This works, but) I want to be able to do. https;//myURL/store?iframe=store store ...

0
Q: I am not able to pass variables from a dynamic list to a php page for processing. Is this a logic issue that I am not understanding?

Michelle EllingtonI am very new to PHP and am just an knitter of javascript at this point. I am creating a call log where the users are entering information regarding call they receive. The reason and issue fields need to be dynamic is because of the amount of information that needs to be processed regarding the t...

0
Q: PHP-Regular expression to only match words in a string without a specific character

Me123I have the following PHP regex to match a word starting with the letter 'Z'. /^Z/ How could I extend this regex to only match words starting with 'Z', but without a 'h' letter. My code is if(preg_match('/^z/','Zoe, Zoey, Zoho, Zander, Zap',$matches)){ echo $matches[0]; }

0
Q: Confirmation email from PHP form

KingI have a php form that works great. The confirmation email go to user but I want it to post there name before the message. It wont post the name right now. Just posts the message. I want it to say something like., Thank you FULL_Name (Then message) Any help would rock. // Subject of confirmation...

0
Q: Can't get form submit to pass variable to pdo query... PHP

pwnethSo here is my code: <?php include_once('../includes/connection.php'); include_once('header.php'); if (isset($_SESSION['logged_in'])) { $tableToDeleteFrom = $_GET["table"]; class Image { public function fetch_all() { global $pdo; $tableToDeleteFrom ...

0
Q: prepared INSERT statement return error when post variable from ajax

Chenquiz.php public function addQ($user){ $sth = $this->dbh->prepare("INSERT INTO eq_question(qCatID, qTypID, questTitle, questDesc) VALUES (?, ?, ?, ?)"); $sth->execute(array($user->qcategory, $user->qtype, $user->qtitle, $user->qdesc)); echo $errorRep; ...

0
Q: Taking a variable altering it then sending it back tot he form

user3043247I am trying to use AJAX to send a variable to a php page so it can be used and altered then the result is posted back into a text box. If I have a value in a inputbox <form> <input name="dual" id="box" readonly> </form> I want to get a variable from this, and have it sent to a php page c...

0
Q: Pass parameters to router's controller method

php_nub_qqIt was kind of hard for me to form this as a title. Basically what I have is a simple laravel-like router that saves allowed locations in an array. My question is if I could supply some arguements dynamically through that array's elements. I think I did even worse in the body of the question so l...

0
Q: Installing PHP APC in Windows

user3043248I can not find the correct version of php_apc.dll for my setup System Windows Server 2008 Compiler MSVC9 (Visual C++ 2008) Architecture x86 PHP Extension Build API20100525,TS,VC9 PHP Version 5.4.4 Thread Safety enabled Apac...

0
Q: converting url sperators with slash

THORI have a category named like this: $name = 'Construction / Real Estate'; Those are two different categories, and I am displaying results from database for each of them. But I before that I have to send a user to url just for that category. Here is the problem, if I did something like this....

0
Q: returning a json encode on an api layer i'm getting the following errors

cookapi layer (move_shopping_list.php): if (!isset($_GET['i_sign_in_token']) && $_GET['i_sign_in_token'] != ''){ die(json_encode('Must pass in the i_sign_in_token into the url')); } if (!isset($_GET['itm_cd']) && $_GET['itm_cd'] != ''){ die(json_encode('Must pass in itm_cd into the URL')); ...

0
Q: How do I load the Paypal SDK into Silex?

PeteI'm having some trouble. I'm using Silex, and I'm trying to load the Paypal SDK into it. I think my issue is related to my understanding of Silex, which is why I'm posting it here. My Setup Paypal's developer website says to add a few lines to the composer file (PHP tab). So, I've done that. My...

1
Q: Symfony 2 Get original data of entity from entity manager

user3023209I am using Sonata admin bundle for my application all works well,In my application i have users and admin,admin can add/edit/delete the users when i am trying to update a user there is a problem the password data is overrided from user table. i have overrided the preUpdate method of admin control...

0
Q: Deleting part of string in php using str_replace

user3043260I have a little issue with deleting a part of string using php. Let me get you a little bit into problem, I have vlariable "column1text" in which is text string endered into < textarea >, but that does not matter. I want to remove all HTML tags from this string since they are doing problems somet...

-1
Q: Check if files were selected on multiupload

PeanutOk.. so their is a gallery I'm trying to implement. However, the gallery is NOT OPTIONAL. So I have to check to see if a file was even selected upon upload. However, this is an array of files. I know, with one file, you would check like so: if($file['error'] !== 4) { // file was selected so u...

0
Q: Correct way of querying related tables on Yii

jeancI am using yii-user module in my Yii project for user authentication/authorization. It provides methods for handling superusers. In particular I use the function isAdmin(): public static function isAdmin() { if(Yii::app()->user->isGuest) return false; ... } In my project I have...

0
Q: Message: Object of class stdClass could not be converted to string in codeigniter

nihirusWhen I run the code below $data = array( 'name' => $this->input->post('name'), 'recipe' => $this->input->post('recipe'), 'category_id' => $category_id, 'recipe_elements' => $this->input->post('recipe_elements'), ...

0
Q: Create Hidden Association in PHP/MySQLi

MizAkitaI have a MYSQL Db that has a PROFILE-TABLE as well as a KEYWORD-TABLE which holds profiles and the other holds keywords associated with those categories. Profile-Table UserID UserName UserDept UserPhoto UserKeyword > indexes KeywordName (from Keyword-Table) UserAssociations Keyword-...

0
Q: How to use CoinURL API php function

user3043294I am New to php so please excuse the simplicity but i just can not get my head around how to use this API service its a php function function getCoinUrl($url) { $uuid = "517f7e8ef008d442883002"; $url = rawurlencode($url); $result = file_get_contents("https://coinurl.com/api.php?uuid...

0
Q: How to find out why a PHP Class doesn't support underscore variables?

Radical_ActivityI have quite a weird question. I'm currently new to OOP in PHP, so please do not blame me for this question. I have created a file and a class, called: Animals. class Animals { protected $_snake; } I have also created another file with another class, called: Nature. I would wanted to use...

0
Q: Login Does Nothing in Yii

gultomicroguys I am a noob in Yii. I am working in a project now using Yii. The login action does nothing, I really confused. I don't know what to do. So here's my codes. Can anyone fix it for me? I really thank to you all. This is the UserIdentity.php class UserIdentity extends CUserIdentity { privat...

0
Q: Use of undefined constant App - assumed 'App' in Laravel

Naing Lin AungI am trying to create application with laravel 4. I created Answer Model with the following code. <?php namespace App\Models; class Answer extends Eloquent { protected $guarded = array(); public static $rules = array(); } and I already seeded with sample data. But while I tried with...

0
Q: php script to increment values of cell associated with name?

prismspecsMaking a game that asks the user to choose between two words. One is "correct" and the other is "incorrect." If the user chooses the wrong word, I'd like that wrong word to get a +1 on it's neighboring column. It would end up looking like this: word1 124 word2 80 word3 14 Also, if the word ...

0
Q: How to Create Automatic Page using PHP Uplaod script

user3023297I want a script of automatic page creation. Actually I want if someone upload image using below form it automatically create a page with showing that image collecting data from mysql database Here is Upload Form <!DOCTYPE html> <html lang="en" > <head> <meta charset="utf-8" />

0
Q: Uploading zip file to PHP upload site doesn't work, but works for mac

eveoI have two of the exact same files. Test.zip, both the same size. This file was created on my mac, and works with my upload script just fine. I made a second Test.zip on my Windows machine and tried uploading, nothing. Why is this? All file types are listed correctly in the index and upload, an...

0
Q: Why is twig iterating only on two events in an array and not in the correct order?

Nicola Peluchettii have the following array. $tabs = array( 'viewing-events' => array( 'name' => Ai1ec_I18n::__( 'Advanced' ), 'items' => array( 'advanced' => Ai1ec_I18n::__( 'Advanced Settings' ), 'email' => Ai1ec_I18n::__( 'E-mail Templates' )...

0
Q: php preg_split regular expression split by space

Stefano RadaelliI'm definetively a neubie and I have a problem with php & regular expression. My goal is to split a string such this category=E code=1795 alarmFlg=0 text=DUT 27 is CONTINUOUS FAIL CHECK ERROR !! operator=Stefano into an array like this array ( "category=E", "code=1795", "alarmFlg...

0
Q: Why is PHP echo statement never being run?

user2644350I am using a form to send a name key using the POST method to another PHP file but name was never displaying? Here is sample1.php with form <form method="post" action="sample2.php"> Name: <input type="text" name="name"/><br/> <input type="submit" value="Enter"/> <...

0
Q: want to display results in horizontal table using php mysql

CDubYaaI am using the following code to get results and want to have it displayed in two rows horizontially. echo "<table border='0' width='700px' align='center'>"; echo "<tr>"; while($number = mysqli_fetch_array($result2)) { echo "<td class='ball_p'>" . $number['number'] . "</td>"; **echo "</tr>

0
Q: Why doesn't HTML generated dynamically with PHP respond to JavaScript?

EustatiaHTML on the body works, but one coming from PHP doesn't respond at all, why? How do i solve this? Here's how i'm generating the HTML. <?php echo '<div id="TestClick">Click me</div>' ?> and JavaScript. $('#TestClick').click(function(e){ alert ('working') }); But the works. <body> <div ...

0
Q: Send html form to MySQL database with php

DepenzI need help / instructions how to send data from a Html form to a database. I am using xampp and I have created a database with PhpMyAdmin. The database is called salesinformation and the table sales with contains the Username attribute. This is the relevant piece of the html/css in register.php...

-1
Q: PHP file_get_contents - constant refresh

PredatorI had a script that would use file_get_contents to fetch the content of a page but it's not working anymore. Now when I get the contents of the page I get this back. <html><head><title>loading</title></head><body><p>Please wait...</p> <script>document.cookie="a=21a09267fe0dc0231181ceb168cf7736;p...

0
Q: Parsing text file for certain content

Samit PatelI am trying to parse a dynamic html page where the content of "price" will be changing. How can I parse the page and get the price value? I will be running the script every 30 seconds to see if there is a change in price. "*className*" : "DealService.model.Price", "price" : "93.52...

0
Q: Get clicked link, display product in another page

user2620338I populate a product catalog from mysql in a php while loop.. I am trying to make it so that when i click on a product that products information is displayed on another page. So far im trying to use sessions, but it always sends the last product regardless of which one is clicked. I need help!! ...

0
Q: Is this PHP login code improvable?

sulmanpucitI am trying to improvise a piece of code. Best is to get reviews from experts. So I am here. Can you guys have a look. What you think of it? Any suggestions? Basically this code connects to database, sets login success and failure pages, query database for user details, check if user is active, s...

0
Q: Trying to use a user-definied php variable in a MySQL query

user2943358$SQL="SELECT * FROM stats ORDER BY $teamval"; $result=mysql_query($SQL); $num_results=mysql_num_rows($result); $teamval is a value defined by a user, which is defined by selecting it in a dropdown list (The selections are all from a database) What I'm getting is "Warning: mysql_num_rows() ex...

0
Q: Connect to ASP webservice through PHP client

user3038710They gave me this C# functio but I don't know how to convert it to php, well what I don't know how to do is send the tokens and when sending the param I get an error message at the end of the message: //Code in C#.NET public string ConsumirObtenerMarcas(string xmlIn) { string strXMLOut =...

0
Q: Form doesn't work when query involves a variable for the table name -- PHP -- MYSQL

pwnethI have a few tables with image urls and image ids and I want to be able to delete from each of these tables using one php page and query. The $tableToDeleteFrom is set as a variable in the url (ex delete.php?table=whatever) $tableToDeleteFrom = $_GET['table']; here is my query / php -- it app...

0
Q: Mysql Stored Proceedure: DEFINER=`root`@`%` is not working in localhost

user3043360I have searched on this problem a lot but could not find solution. I am using stored procedure: DELIMITER $$ CREATE DEFINER=`root`@`%` PROCEDURE `GetImages`( in search Varchar(80) ) BEGIN select image_path from check_images where checkNumber=search; END It is not working in localhost and ...

0
Q: Live App-ID PayPal not working - what to pass

DiegoWhich credentials and app ID do I have to pass to the live API of PayPal? I'm sending userid and password from this page: https://www.paypal.com/us/cgi-bin/webscr?cmd=_profile-api-signature And the AppId is the ID I use in my android app to create payments: https://apps.paypal.com/user/my-accou...

0
Q: Installing laravel4 public in httpdocs subfolder, not root

HybrideMuch like this question, with a different folder structure, how would I be able to move the public laravel 4 under a subfolder in httpdocs? My current structure is: domain.com | /other folder |_httpdocs |_laravel4core |_ app |_ bootstrap |_ / rest of the install ...

0
Q: Composer error the eclipse

Akash PaulI am getting another error with composer this time and i dont know what to do the error is: the error message is Composer should be invoked via the CLI version of PHP, not the cgi-fcgi SAPI and i have checked in a dos prompt my version of php and it has been invoked via the CLI. please help?

0
Q: php fputcsv error while running a Twitter Script - No able to understand

Vikram RaoI am trying to use a twitter script to get some data and put it in a csv file locally: I get the following errors: Warning: fputcsv() expects parameter 1 to be resource, string given in E:\xampp\htdocs\followers.php on line 27 Warning: fprintf() expects parameter 1 to be resource, string given...

0
Q: Visit url with curl like user

ahmad solimanI have a shopping cart and i want a curl function to add the products to the cart, it's added when the user click to the link "Add to cart" but i try many curl function and the cart still empty: My code: $url = 'The href of the add to cart button when click on it the product added to the cart';...

0
Q: PHP regex second occurance

user1857612I have some code like below and I am using regex to pull certain content out: Content [vc_row][vc_column width="1/1"][vc_column_text] [dt_divider style="thin"/] size 18" x 18" [dt_divider style="thin"/] £70 [/vc_column_text] I have used the following to get the size: preg_match_all("#\[dt_...

0
Q: PHP - Diffrentiating between GET and POST request

user2417731The way I have PHP set up is that everything goes to a central file called Router. the router gets a parameter action and calls that method. In Node.js, you can have get and post versions of the same method. I was wondering, is something like this possbile in PHP? Basically I would like this to...

0
Q: How do you reference a file from outside wordpress directory?

ShaI have a php file inside my wordpress directory i.e. in localhost/wp-content/themes/mytheme/file1.php. I have another php (could be html) file in root of my xampp i.g. in localhost/file2.php. My question is how do I make a call to file1 from file2 using JS. Problem is I can't get the path to file...

0
Q: CSV not encoding when trying to send as attachment using php

user3043375I am trying to create a csv file on the fly and email it. Unfortunately, the file is not being created but the data is being encrypted. Could someone point me in the right direction please? This is the output I receive via email.. ' This is a multi-part message in MIME format. --NextPart_001 ...

0
Q: Form image submit nopt working in Internet Explorer, submit redirects to index.php without passing elements

Lorenzo Federico PascucciI have the following form to upload images of my products, this works great in Firefox and Chrome, but in Internet Explorer it redirects me to my www.myhomepage.com/index.php instead of submitting the form elements and remaining in the same url which in Chrome is something like: /index.php?option...

0
Q: Get to leaf in multidimension array

setiI have array structure where i must get leaf. Example First type of array [name] => long_desc [values] => Array ( [0] => Array ( [values] => xxx ) ) ) or ( [name] => long_desc [values] => Array ...

0
Q: PHP fgetcsv() with french characters

h_a86I have been using fgetcsv() for reading a csv file which contains some french text, but php is not reading text in right manner. for example if french text is "Accessoires pour téléphone mobile" it reads this text as "Ac" only. I have set the locale at the top of script setlocale(LC_ALL, 'fr_F...

0
Q: Read a comma seperated txt file for specific value

Shenir McknightI have the following txt file called bank1: 20131127,131368.64,"CR","" And the following phpcode reads and displays all the contents of the text file: $file=fopen("bank1.txt", 'r'); $data = fgets($file); fclose($file); echo $data; While I am able to read and display all of the contents...

0
Q: Class ZMQContext not found even though ZMQ is installed

jovanFirst of all, yes I am aware that there is a very similar question out there, but the answer given there doesn't apply to my situation, and there's no indication that it fixed the other person's problem either. I have ZMQ installed on my Apache server, according to the tutorial found in the Ract...

0
Q: Wordpress Plugin Not Loading Javascript File

AdamI am creating/learning about wordpress plugins and I have created one that adds a meta box to the edit post page. However, I can't seem to get the plugin to load my .js file. <?php /* Plugin Name: Adams The The Plugin Plugin URI: http://adamthings.com Description: Plugin attempt... ...

0
Q: error "can't open file" with Lamp ubuntu

yehudahsI'm on Ubuntu 13.10 with LAMP setup. I copied a subdirectory which has project files (php, html, css) from xampp/htdocs/mydir on my Windows PC into /var/www/mydir of my ubuntu. However, when I access localhost/mydir from browser I get "can't open file" error. Any advise ? I have read and tried ht...

0
Q: I want to show 3 rows from database, but it doesent work?

user3035776the code below works fine, but i want to show one more. echo $i . ". " . $info['Navn']. "".number_format((float)$info['Average'], 1). ". "; i have tryed to incert one more in the code below, put then the page just turn white?, anyone who can see what the problem is? echo $i . ". " . $info['Na...

0
Q: Upload multiple forms to database

PurebloodI thought my code was correct but for some reason nothing is going to the database. I think nothing is getting stored into the array and I'm not sure why. Here is my form. <form method="post" enctype="multipart/form-data" action="process.php"> <div id="filediv"> <div id="imagefiles"> <input ty...

posted on November 27, 2013 by Homer_J

I have a for loop accessing two seperate arrays for ($p=1; $p<=37; $p++){ echo $m[$p]; echo $mz[$p]; } The above echoes two sets of numbers, correctly. I have some additional code further down the for loop: $resp = $m[$p]; $tot = $mz[$p]; $perc = number_format(($resp/$tot)*100,0); echo $perc; However, when I add this code into the mix, $perc is alwa

0
Q: Assigning php variable values to html element

KodeSeekerIm trying to assign the value of a php variable to a hidden element. But cant get it to work Here's what Ive tried so far Attempt 1: echo '<input type="hidden" maxlength="100" name="value" id="val" value= "${myOb->content}"/>'; Attempt 2: echo '<input type="hidden" maxlength="100" name="...

0
Q: Create array using foreach while grouping every 2 items into key

Sagive SEOi got a string which i want to explode into an array but the issuse is that i need every couple of item to be group. Example string: http://www.example.com, example, http://www.example2.com, example2, http://www.example3.com, example3, http://www.example.com4, example4, http://www.example5...

0
Q: Find word in string, and make the int after it ++

user3025333it's for my contact system. Subject of mail could be: Hello Friend. and RE^2 Hello Friend. I need code to find if the subject have RE^{int} {subject}, if it have than make it RE^{++int} {subject}. If not: than make it RE^2 {subject}.

-3
Q: Testing a PHP framework security and performance

SmootQIt took me 5 months to create the base of a PHP Framework, Containing components like autoloader, registry, forms, validators, abstract and front controller... etc. The framework structure itself looks like Zend Framework, but it's more simplified. The problem is that I don't know if this framew...

 
9:08 PM
1
Q: multiple addeventlistener javascript

user2511140I use this script to show php execution progress bar.it works fine but i need run more task and show progress bars in index.html how to use multiple addeventlistener.I use multi source pages(like: task.php , task_1.php , task_2.php , ...) <html> <head> <meta charset="utf-8" /> <

0
Q: PDO, Server Error?

i_me_mineI have recently moved a project from an XAMPP server to live server. The live server is running PHP 5.4.x and it's not processing my PDO queries if I bind params, if I don't it works fine. It gives me the following error when I try and bind params into my PDO. Failed to load resource: the server...

-1
Q: Laravel 4 website

RachidI understand the basics of laravel 4. Now I want to build a real world application. Is there a book or a video you guys can direct me to that shows how to build a website with laravel 4? I searched online and I only found tutorials of installing laravel, build authentication... Thank you

-2
Q: REST API and localhost:9000

user1968073I am doing an application (or try to do) which uses AngularJS to get data from a server via a REST API. I succeeded on the MAMP localhost:8888 to do this with the help of several tutorials on the web. Now I want to use Yeoman and get my workflow a little cleaner. Here the localhost is on port 90...

0
Q: mySQL with php function - inputting data that uses php loop

boxI've created a php function then used a loop to recreate the radio buttons, but now what im struggling with is the function only has one name, but it loops for several different topics. How do i differentiate each answer from one another..? (if that made any sense) For example; the first two que...

0
Q: get a jpeg using file_get_content from form a URL with no jpeg in it syntax.

zefrankI am trying to use file_get_content to get a jpeg from an remote URL and then copy it on my server. the url is : http://mediaserver.centris.ca/media.ashx?id=ADD242BD121361ADDBF9EDBDBB&t=pi&sm=c&w=640&h=480 if pasted in a browser it will produces a jpeg (save as will show it named media.jpeg) ...

0
Q: Check which form fields were updated in PHP/jQuery

AndrewI have a form with ~20 fields to update a record. When a user submits the form, I would like to log which fields were updated (changed) in my update_log table along with the updated value, the username, and time. (Ex: "Andrew updated 'Supplier' to 'Acme Inc.' on November 22nd at 3:00 pm) Previou...

0
Q: jQuery form plugin doesn't work in IE

1linecodeI'm using jQuery form plugin to upload files via ajax. I've tested the scripts and it works in all browsers except IE. I'm working for hours, still no luck. PHP: echo $this->input->post('name');//this is a debuging statement which shows the data sent by client JS: $("input[type=file]").on('c...

0
Q: How to redirect to login page in Symfony2 after logout and prevent browser from opening cache pages?

pregmatchOnce I logged out from my Symfony2 app I can press back button and I can still see password protected pages pulled from browser cache. I have simple: $session = $request->getSession(); $session->clear(); in my logoutAction. Any idea how to do prevent this?

-1
Q: PHP Foreach Loop Practical Application Logic

Tyler WilliamsI just started learning PHP today and I have some conceptual questions regarding how I should use the language and accomplish specific tasks. My question: Let's say I'm using PHP to build a CMS for a blog. On the home page I would like to have three articles show up that I have marked as "FEATUR...

0
Q: Good PHP Library To Add Text To Images (jpg, png, etc)

user2844415I was recently hired by a school that provides distance (online) education to young children. They want to be able to generate and send certificates (jpg or png images) via email once a child has completed certain tests, assignments, etc. Obviously they won't get all of their teachers to re-creat...

0
Q: how to implement custom php function on wordpress

posicionamiento webI was searched a lot in stackoverflow and google and I found some possible manuals but any of these was working for me, so I come here to search an solution, also this could help to other to see how to implement custom functions on wordpress.. I have a webpage where in the top body of it I call ...

0
Q: get_template_part function and add thumbnail on Wordpress

Slaythern AareonnaAdded this function in any page: get_template_part('recent', 'posts'); And: if(have_posts()){ while(have_posts()){ the_post(); ?> <div class="site-content clearfix"><?php the_content(); ?></div> <?php } } It's working, show 5 blog post on my page. But it's have only title and publish da...

0
Q: Bi-Directional References are always fetched Doctrine MongoDB

alex.dominteSymfony2 Project with Doctrine MongoDB ODM: I have the following documents: User referenceOne: my_buddy: targetDocument: Buddiness #(just an example) mappedBy: from_user simple: true buddy_with_me: targetDocument: Buddiness mappedBy: to_user ...

0
Q: Kohana ORM; Howto join query

KevinHIm as u can see in my history kinda new into kohana, but learning quick.. I am struggling on a weird problem that worked before in Kohana 3.3 I want to create a join query between two databases. i created the Model_Veiligen en Model_Veilingvoorkeur models, and put this as ORM call: This is the ...

0
Q: hiding an id variable using cakephp

crazy sarahI'm a bit new so sorry for the probably stupid question, I have an app which lists users of my site. Other users of the site can click on the name of another user that brings them to a contact page where they can then contact the user they clicked on. I want to be able to keep the user_id's of t...

0
Q: subtracting array values from another unequal array

user1871949I have the following which works just fine when the arrays are of an equal length: (example) $highNums = array(10,20,30,40,50,60); $lowNums = array(0,1,2,3,4,5); $result = array(); for($i=0;$i<count($highNums);$i++) { $result[$i] = $highNums[$i]-$lowNums[$i]; } The problem lies in that t...

-2
Q: correct code for a preg-replace?

freddydoggieI have a page with a title: <title>Home - The website info</title> and I want to have a function that takes the parameter of the title as a parameter. <?php require('/init.php'); function head($title = "untitled"){ //echo gen_menu($title); $side[1] = file_get_contents("c_1"); ...

-3
Q: Web/server programming what language and how to drive it?

Saad AttiehI am just getting into server programming and am wondering what are the best tools to use/learn? I am thinking in two categories: should I use java servlets (already know a little of servlets and an very familiar with java) or should I invest in PHP? I have been told that PHP is more common but...

0
Q: Included youtube video not working

Dieter GijsenI am including a Youtube video in my webpage, this is the code: <div id="content"> <iframe class="aftermovie" width="800" height="450" src="//www.youtube.com/ embed/vjFA_UNSl9c?rel=0" frameborder="0" allowfullscreen></iframe> </div> The site is running in localhost, when I use Chr...

0
Q: Python equivalent of PHP curl request

Jaskaran RanaI'm using Rauth for my queries to the Beatport API. I'm using this working example in PHP as reference. This PHP code below uses a request token to log in and authenticate for 3-legged auth ini_set('max_execution_time', 500); $submit = "Login"; $url = $auth_submiturl; $curl_connection_bp = cur...

0
Q: MAMP unable to update php.ini file

squeakerI'm having great trouble including an extension within MAMP. No matter which php.ini files I edit following a MAMP restart they have no affect? the phpinfo tells me it is using these: Configuration File (php.ini) Path /Applications/MAMP/bin/php/php5.4.10/conf Loaded Configuration File /Libr...

0
Q: asynchronous email php + jquery

CalZoneI need to send email asynchronously. For that I have a jQuery ajax client and PHP backend to actually send eMail, still AJAX's success method is not being called. I understand it is simple, but yet doesn't seem to be working. Can somebody please take a look at my code and see what I'm doing wro...

0
Q: What is more resource intensive? storing or readin everytime

MazzyIf I have a user model and a sessions thingy, 1. Is it better to store an object of the user model in the sessions thingy and use that or 2. just store the ID of the user in sessions and create a new user model instance everytime I need user data. In option 2 you'd query the db quite a lot I t...

0
Q: I want load multi url in a window browser with php

user2940501Url 1: http://google.com Url 2: http://youtube.com How to create a file php auto load url 1, after 30s will auto load url 2. I use cURL in php but i can't do it. Help me! Thanks!

0
Q: Deleting SQL entry if current date has passed a user entered date

user3043617I have a form that allows users to enter date ranges for their property availability (in the future). These entries are stored in a MySQL database along with the date in m/d/y format. I am trying to make it so that when the current day supersedes the end date of availability of the property, the ...

0
Q: issiues with the value of the multidropdown php

user3043618This is my multidropdown <select style="width:250px"name="locatie[]"id="contact" data- placeholder="contactpersoon" class="chosen-select" id="e9"multiple tabindex="4"> <option value=""></option> <option value="United States, aaa, bbb, ccc">United States</option> <

0
Q: Can't "Browse" with phpMyAdmin, password error?

prismspecs1045 - Access denied for user 'root'@'localhost' (using password: YES) This strange error pops up when I attempt to "browse" a table. I have my password, it's "root" So why doesn't it simply ask me to enter my password? This is utterly frustrating. Any help is greatly appreciated.

 

« first day (281 days earlier)      last day (29 days later) »