« first day (294 days earlier)      last day (16 days later) » 

12:02 AM
0
Q: Wordpress post from SQL row

GivenyDoes a plugin (or a pack of complimentary plugins, or just a method) exist wherein I can have a Wordpress post created for every new row that is created in my non-wordpress mySQL database? Take this as the specific example: I have a script that simply takes new stories from an RSS feed and crea...

0
Q: Internal Server Error 500 when Installing phpBB3 Forum Software

user3073029I'm trying to install phpbb3 forum software on my personal web server, but it keeps failing at the very end of the automatic installation. The logs folder has a file called "cgi.txt" and the error appears to be "could not acccess install.php because the process is already in use". I have no ide...

 
12:14 AM
2
Q: If the input is empty, how do I display something else with PHP?

Michelle CantinMy WordPress options panel has a section where the user can paste their logo's URL to show up in the header. If the input is blank, I want the Blog's title to show up instead on my header. The ID of the input is "nl_logo", so I added an if statement in my header. <?php if ("nl_logo") { ?> <...

0
Q: Wordpress E Commerce-Please help. How to customize what details customers get to review before making payment.

user1351880I just have a very simple question. I am using Wordpress as the CMS for my site. I am using an ecommerce plug in called WP E Commerce and using Paypal Express Checkout. So basically, you add/drop an item in the cart on my site, go to the checkout page, you enter your contact/billing details and t...

0
Q: General development issue saving files with file id in filename (Applied in Symfony2)

PezI have a Symfony2 application with a Person entity, and photo entity. People can have many photos. The photos entity has, among other properties, an ID property, a Person property (stored as person id), and a filename property. My preferred naming convention for photo files is [person_id]_[photo...

 
12:32 AM
0
Q: AngularJS + json + split

Spigatlhow i make .split(',') on ALBUM, for i use in angular? because I'm not getting on the internet to find any example or demo how to make this work if someone able to help me would be grateful. [JSON] ALBUM: "01.jpg,02.jpg,03.jpg" DESCRICAO: "HAuuaHUAHuahuAHiuHUAHuuAHuHUAhuHUahuiHU" ID: "...

0
Q: Display MySQL data when linking to new page

PixelCheeseI have a php script that connects to my database and returns results: name, and price, however, now I am trying to also create a link - that opens a new php page "more_info.php" and displays the correct description that corresponds to correct name. I have been trying to accomplish this, but I ha...

-1
Q: Strip out a tab space in HTML pre tags

Daryl GillWith my code structure, I HAVE to include correct tabbing (which includes one space to begin with) (example follows) The code exampled is irrellevant to the purpose of the question, more of a visual demonstration of how I prefer my code structure to look. Now, the problem arises within the f...

0
Q: MAMP PHPize Command

RanaI am trying to run mamp's phpize command on a source code as below: /Applications/MAMP/bin/php/php5.3.14/bin/phpize But this is giving me error as below output: grep: /Applications/MAMP/bin/php/php5.3.14/include/php/main/php.h: No such file or directory grep: /Applications/MAMP/bin/php/php5.3...

0
Q: Symfony2 on Ubuntu ContextError Default Timezome

shotdsherrifBuilding an Symfony2 app on an Ubuntu 13.10 machine. And getting an error leading me to the date.timezone value in my php.ini file. This value was not set in the default build so got the following ContextErrorException: Warning: date_default_timezone_get(): It is not safe to rely on the syste...

0
Q: PregMatch on 3 digits with a dot

zeflexI have numbers like theses: 1.80 2.75 @1.55 Theses numbers are in strings and I'm trying to get them throught preg_match. At this time I have this: $pattern = '/ [0-9]{1}\.[0-9]{2}/'; $result = preg_match($pattern, $feed, $matches); This works pretty well but I need more precision ...

0
Q: Error genrate crud :CLass XX is not a valid entity or mapped super class

marwenetHello I'm working with sympfony 2,after that i create my database , i wished to create my crud , using command ( generate crud ) but i had this eroor : [Doctrine\ORM\Mapping\MappingException] Class "MyApp\SmfBundle\Entity\Client" is not a valid entity or mapped super class. My class is na...

 
12:56 AM
0
Q: Php script doesn't check the username value in mysql table

msuyaI'm just new in PHP, I have the project which I'm still constructing and now Am working on Administrator area. For now I'm writing the script which Update the password in the table by looking two criteria "username and fname" if the same with the entered one the password should change, And It d...

0
Q: Moved site with custom CMS into subdirectory and now all media / ability to upload images not functioning

user2705547Let me see how well I can explain this: I was hired to build a new site for a company who's current site was Flash based on a custom CMS. I had no involvement in creating this original CMS so the code is all foreign to me. I built a new site in Wordpress and moved their old Flash site to a /flas...

1
Q: Drag and Drop and Upload Files to Server using HTML, JS, PHP

user3084996This is my first post! I want to be able to drag and drop multiple files onto a page and upload them to my server, and the code I have isent working. I'm using Javascript and PHP and HTML, and am not the best at those languages. I don't know how to fix the problem if anyone has any tips that wou...

0
Q: php - mysqli loop adding word "array"

Davidat a loss with this......i have the following code to loop through a array (obtained using get_terms in wordpress) $con= mysqli_connect($home_url,$dbuser, $dbpass, $dbname); $terms = get_terms("location", $args); $count= count($terms); if ( $count > 0 ) { foreach...

0
Q: adding to database inside a foreach loop based on a specific variable in php

McCoyI have a shopping cart that has a text box to update the quantity of each item. When a user clicks the update button I loop through each of the items and update their quantities in the database table holding the cart information. Now I am adding a gift card feature and I am running into a problem...

0
Q: sending email message using php

user3085023I am trying to send email from my website form but it keeps on displaying this error Parse error: syntax error, unexpected T_VARIABLE in /home/u892828859/public_html/message.php on line 5 this is my php: Email : $email Subject: $subject Message : $message EOD; $headers = "from : $email...

1
Q: Does SJCL content need to be json_encode(d) when it is read from a database?

PizzafaceOverview I am attempting to encrypt data, send it to a database, then decrypt the data using the Stanford Javascript Crypto Library (SJCL). Problem Whenever I attempt to call the data from the database, I get a "CORRUPT: ccm: tag doesn't match" error. I have looked this up and it seems as if ...

-3
Q: One liner to find maximum from array in php for associative array

DirghI looked at the question for maximum from associative array but I am looking for one liner. I have array like following, $studenRsults=array( array( 'roll'=>1, 'name'=>'jack Smit', 'marks'=>70 ), array( 'roll'=>4, 'name'=>'Sita', 'marks'=>50 ), ...

-1
Q: how to get sessions to work in wordpress

user2998532I have two separate websites on the same server, in one sessions work as normal and the other session do not work from header.php, the two sites are the same code, I have read Wordpress does not use sessions, if so how does the one site that sessions work get configured, I did not build the site ...

-6
Q: HTML for user posting text to a site

user3085053hey guys I am trying to create a site where a user can post text so it gets posted on the site so everyone can see it. Does anyone have a code for that

0
Q: CodeIgniter form only posting hidden fields

kirkarachaI have a CodeIgniter form that is only submitting hidden form fields, not text inputs and textareas. The form: <label for="greeting_caption">Your caption:</label> <textarea id="greeting_caption" rows="3" cols="40" name="greeting_caption"></textarea> <label for="greeting_name">...

0
Q: php date difference correction

NateI have a function that will calculate time between two date / time but I am having a small issue with the return. Here is the way I collect the information. Start Date Start Time Ending Date Ending Time Hours And Here is the function that calculates the dates and times function calculate...

0
Q: qTranslate translations not appearing on front-end

Brad AdamsThis is for a propery site: http:// vetro mar.com/beta (remove spaces) At first I couldn't modify all the custom taxonomy's, but after reading: http://wordpress.org/support/topic/plugin-qtranslate-translating-custom-taxonomy-names And adding this to my functions.php file: //Qtranslate function...

-1
Q: Why does date() seem to be returning a cached value?

Rob KovacsI'm writing a block in the concrete5 CMS that uses an array called $events. Here's a var_dump: array (size=3) 0 => array (size=4) 'weekday' => string '0' (length=1) 'start_time' => string '2013-12-09 12:00:00' (length=19) 'name' => string 'Lunch' (length=5) 'locat...

0
Q: Easiest way to load BBYOpen product catalog into Magento?

Mark BennettAlthough the Magento LAMP stack does offer some sample data, I'd really like to experiment with a larger set of data. Best Buy offers their data archives, including their product catalog in various formats. So I'd like to load the BBYOpen data into a Magento product catalog. To me this seems l...

 
1:44 AM
0
Q: Making a button unclickable after clicked once

Steve PriceI have got a code segment that i need to modify so that the button can only be clicked once. I've tried various methods and not managed to succeed so far. I believe i need to use javascript, but it's really not my strong point and i'm a bit lost. Any help would be gratefully received. Code s...

0
Q: Implode the string using the integer location

asdfme123My output is this: 1. Admin, Administrator,3. Visor, Super,4. Team, Super User,5. lastname, employee how can I have the following output using implode? array( [0] => Array ( [0] => 1 [1] => Admin [2] => Administrator) [1] => Array ( [0] => 3 [1] => Visor [2] => Super) [2] => Arra...

0
Q: Data from GravityForm in Wordpress to LimeDB

Sanel BajricI have form similar to this FORM LINK which I created in Wordpress using Gravity Forms, and that is ok :). But now, client wants that every time when datas are entered goes directly into LimeDB CRM. Nobody from LimeDB does not want to help me. They only sent me files which everyone who is int...

1
Q: Loosing Session in IE 8

DaniI have run into an issue where session is being dropped only in IE 8 (Works in IE 9), and it only happens after a single page is loaded. I don't have any place in the code where i clear the session. I'm using Kohana 2 and i have tried setting the Kohana setting: $config['sess_match_useragent']...

0
Q: AWS Elastic Beanstalk: PhpRedis Auto Install and Configure on deploy with .ebextensions

Zachary MelamedI was having some trouble myself with getting Elastic Beanstalk to download, install and configure phpredis module Amazon AMI when a new server spun up, but eventually found out how to make it happen and thought I'd share for other: If you haven't created a .ebextensions folder in your applicati...

0
Q: PHP Use $_FILES['myfile']['name'] from a enctype="multipart/form-data"> form in a variable

PacaMamaThe code from the user input form: <html> <body> <!--Content of screen--> <form action="UploadFunction.php" method="post" enctype="multipart/form-data"> <p>Formulaire de téléchargement</p> <p> <input type="file" name="myfile" /><br><br /> <input type="text" name="vartest"/><br><br /> ...

0
Q: PHP Contact form to email

andyramzI have the following form on my website, and it works and forwards to my e-mail correctly. However, when I receive the e-mail, the field lines do not have any tags. Would like to receive the e-mail as such: Full Name: Joe Brown / Address: 123 Main Street Instead I am only receiving: Joe Brown ...

0
Q: Architecture for site with clients with different needs

mung_nzI'm not sure this post won't break some rules of this site, I simply don't even know how to search for such a question (I did try). I've created a site for my company (PHP/MySQL) that produces business cards for a client of ours. They get a little form, choose a few variables and order the card,...

0
Q: Including extensions when rolling out a site?

Tai M.How would one go about setting up using extensions in a live site? My site is coded in PHP and within it, I use the NumberFormatter function - my question is, how would I "bundle" this in with the actual site so that when I upload it to a live server, I don't get an error telling me that it can't...

-1
Q: SMTP server for Dreamhost Account

user1792476I would love to activate a form on a website I am designing for a client. Their site is hosted by Dreamhost. I don't have access to your control panel so I can't see what their smtp server is. I am using the PHPMalier plugin; however when I plugin the server information I get this error when the ...

0
Q: How to put a php variable into an HTML form

user3038431I have code that queries an SQL database and displays all of the users in a table, that all works fine, from there you are able to click any user and it displays another table that contains all of their information, that also works fine. The problem I am running into here is on the page that dis...

0
Q: Laravel 4 Redirect::back() not going to previous page (refreshing current page)

LynxI have a simple Lavel 4 project and I am trying to do a simple redirect to the previous page after the information has been submitted. However, when inserting Redirect::back() it's only refreshing the current page. How can I get it to redirect properly to the previous page it was on? Controller ...

0
Q: cURL Not Working through Proxy with Login Server

OrcaI have the following code which checks whether or not the Minecraft user can login to it's services and the output of the cURL requests seems to be "boolean false" for every request when I did my debugging, which is strange because if you enter the URL with the proper values of course into your b...

0
Q: Modifying PHP using JS/JQuery to communicate with MSQL

ivoilicSo my goal was trying to allow a dynamic element on my page to determine the sql sent to my database. This first bit is JS that is included in my main HTML document: var sub_condition = " AND artist=\'ivoilic\' ";//$(".current_filter").attr("condition"); $("<?php $conditions = 'WHERE ow...

0
Q: ajax call to php file which creates temporary table

gepexI have a form with two options, when onclick AJAX call to a php file which creates a temporary table with all possible results. So if the users select another option again it would load faster. The problem is that the ajax call to the php file always creates and inserts the elements all over aga...

0
Q: Facebook API posting photos/status updates very slow

Papa De BeauI have users stored in a data base. I call them with a these functions in a loop but it takes like 5 to 15 seconds for each post. Its not the database code but only the posting functions that make it slow. This is not all the code but what seems to me to be the most important. Now that I look a...

0
Q: PHP Protobuf - Failed Tests

asyadiqinI managed to install PHP Protobuf and the required extension. Tested by running the compiler with the following command php protoc-php.php foo.proto The above command executed fine with no errors and created a file called pb_proto_test.php. Next, I tried running the following command: php ru...

 
2:32 AM
0
Q: how to redirect using jeasyui

user3064086i have inbox.php with script like this <?php include("conn.inc.php"); $id = isset($_GET['id']) ? $_GET['id'] : ''; ?> <table border='1'> <tr> <td></td> <td>Request ID</td> <td>Quantity</td> <td>Cabang</td> <td>Tanggal</td> <td>Status</td> </tr> <tr> <td><?php echo $no ?>

1
Q: how can i use two mysql query with user defined variable in php

subzeroselect @min_price:=min(prd_sale_price),@max_price:=max(prd_sale_price) from ct_product; select * from ct_product where prd_sale_price=@min_price or prd_sale_price=@max_price; this query is work in mysql console but $query = " select @min_price:=min(prd_sale_price),@max_price:=max(prd_sale_pri...

0
Q: error with curl on post

Gatiko06this is my index <body> <form id="form1" method="post" name="entrar" action="procesar.php"> <p>Usuario <label for="username">:</label> <input type="text" name="username" id="username"> </p> <p> <label for="pass">Clave:</label> <input type="password" name="pass" id="pass"> </p> <p> <input type=...

0
Q: codeigniter session lost when refresh (F5)

reefmanFirst of all i'm new for codeigniter. All i want to ask is, why every refresh my session data is lost. i redirect to login. Here is my code. login controller <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Login extends CI_Controller { function __construct(...

0
Q: Creating html tables using PHP

user3085177I am working on creating HTML tables using PHO. I have created my database and tables but can not figure out how to actually create the tables. There is a disconnect that I am missing somewhere, could someone please help me? How would I convert this into code used to create an HTML database/ta...

0
Q: These code always prompt invalid path file. I dont have any idea why :/

Keeboi Tarranza<?php if(isset($_POST['sportname'])){ include("connect.php"); $name = $_POST['sportname']; $sql = "Select docs From tbl_sport WHERE sprt_name= '".$name."'"; $result = mysql_query($sql); $row=mysql_fetch_object($result); $file = $row->docs; ini_set("allow-url-fopen...

0
Q: Apache with FCGI, 2 php versions - one spawning, other ok

user3085197I'm running 2 virtual hosts on an Ubuntu Apache2 server running FCGI. Both virtual servers require different php versions - the default version is 5.4.9 used by server1, and I've setup 5.3.22 using by server2 using phpfarm. I'm using FCGI wrappers to select the version: eg #!/bin/bash PH...

-6
Q: How to remove int (1) sudden display

user3085214The website i am working on has a bug showing up after adding to cart and when viewing the cart : int(1) 1 refers to how many items added to cart. Anyone ?

0
Q: Errors not written to Apache error log

user1429981I've had a problem with some Apache web server error logs. I have a virtually hosted website scotthermmann.loc on my computer. After I manually clear an error log, using sudo cat /dev/null > scotthermmann.loc-error_log or by opening the file in emacs & deleting all content, errors no lon...

0
Q: multiple for each loop and insert into database

user3085178hi there im having a hard time inserting into the database the location and the categories of my program here is the code <?php $study = $_SESSION['study']; for($x=1;$x<=$sites;$x++) { ?> </table> <br/> <table border=0> <tr><td> <input type="text" name ="textbox[]" > <?php $sql = "SELEC...

0
Q: Google analytics API connect to any account

Jared EitnierThe only documentation I can find on using the analytics API is to get info for my account. I want to access info for our clients. They've supplied their usernames and passwords. I want to get and display info such as their visits, unique visits, page views, bounce rate, etc. I'll be using php. ...

0
Q: Bootsrap design is not showing when my netbeans project run?

DiliniIn netbeans when I'm running the PHP project which used bootsrap right click the project ==> Run in my browser's window it shows like this. And browser's address bar shows like And When I change that address to (lh means localhost) by adding a '/ ' it appears like this. I saved my pr...

0
Q: Call to a member function fetch_assoc() on non-object. mysql

user3006683I have the below code to check if a row exists then do something. However, I am getting Call to a member function fetch_assoc() I have found out that if I put $check->get_result(); before $check->store_result(); This error goes away but when I do that and echo $check->num_rows; I get empty res...

0
Q: Can't insert new record to mysql db with PHP and JQuery Ajax

Maya SyalalaI have this database : Table User : username, password Table Product : productID, productName In my admin.php, if I click button with id btn, I want to display insert.php in a div with id show admin.php : <?php session_start(); include("connection.php"); ?> <html> <head> <

0
Q: Upgrade Mysql old password to new version

andresg3This probably has been asked before. Some passwords for the users are stored in 16 bit format. Mysql has been upgraded to 5.5, but the passwords in the table remained in a 16 bit format. A way to tell what password scheme your MySQL is using is to run this query below, it will list each user’s p...

0
Q: Wordpress, Render Categories HTML in particular format

gutierrezalexI am trying to render categories in this Wordpress theme: <ul> <li> <a href="#">Categories</a> <ul> <li><a href="#">Sub Categories</a></li> <li>...</li> </ul> <ul> <li><a href="#">Sub-sub Categories</a></li> <li>...

 
3:21 AM
0
Q: php sql data/ table works with smaller sample txt file but not full 50mb txt file?

David Salazari have a php/sql program that functions correctly with the SQL.txt file below.. however sql.txt is only a few sets of data for test purposes .. the real txt file is same format but 50mb. when i use the small test my code works and outputs the table.. but when i try the 50 mb file it does not co...

0
Q: How to store function's returned value instead of function itself?

WordpressorImagine this exemplary code: $the_url = the_variable(); // this function returns "www.site.com/post123" here $items = generate_array(); foreach($items as $item) { echo $the_url; // this function returns "www.site.com" here } Now, is it possible to store returned value of the_variable() as...

0
Q: How to update multiple rows of forms in MYSQL per button click?

user3085240I am developing a php site to sort data for the exporting of terrestrial laser scanning data in a electrical design company. When one row of data is present the forms update in MYSQL fine, but as soon as I display 2 or more rows of data the multiple rows conflict with each other when the submit ...

 
3:33 AM
-3
Q: php contact form is sent but not received

yami_wpI am not sure what is missing or wrong in my code that the form is sent but not received in my gmail account. Once the submit button is clicked, I get msg that email is sent, but i do not receive anything, not even in the spam. Please help. Php code is: <?php /* * Contact Form Class */ heade...

0
Q: PHP cURL - ASP.NET login issue

JoshGI am trying to automate a login process to fetch some password protected files. I am trying for a long time but I am getting error page. Its a ASP.NET site. If I login via the browser then it redirects to a slightly different url. So I enabled FOLLOWLOCATION. Does my code have errors? $url = "h...

0
Q: how to continue searching file after code is run php

user1547410Basically i have something like this Hand #1 First row always has the same info, if the text matches what im looking for ill find the keyword in the first line. Bunch of text, bunch more text bla bla bla Hand #2 And this is my code that prints out all the text between Hand #1 and Hand#2 $...

0
Q: Magento - custom column in AdminHtml product grid which contains custom output/logic?

WackGetI want to add a new column to the "Catalog Products" grid in Magento's admin area. The new column will be called Currently Discounted? or Sale Item? and will display "Yes" when a product's price is more than its special_price (i.e. the product is in a sale). So far I've been able to add the sp...

0
Q: unset array indexs from value of another array?

oecPrashantI want to unset array indexs using unset in php. <?php $a=array('a','b','c','d','e'); $b=array(0,1);//0,1 are indexs which I have to unset from array a. print_r($a); unset($a,$b);//how can I do it. print_r($a); ?> I want output like: With out Iterate over $b and unset($a[$b_value]); Array ( [...

0
Q: dynamic colspan for dynamic table

Willardis there a way to show my table <tr> <th>date</th> <th>fuel</th> <th>route</th> <th>destination</th> </tr> <tr> do{ <td><?php echo $PKFD['date']?></td> <td><?php echo $PKFD['fuel']?></td> do{ <td><?php echo $PKDD['route']?></td> <td><?php echo $PKDD['destination']?></td> </tr> }while(PKDD) }whil...

0
Q: Dynamic decimal places

inBlackAndWhiteI was using the function number_format() to manage my decimal places, but I'm not getting the result I want. I wish to have up to 6 decimal places, but i don't want every number to display them. For example if my output is 27.54, number_format is gonna give me 27.540000. Is there function or a wa...

0
Q: How to add quotes around each word in a string from simplehtmldom

gtehI am trying to grab the contents of specific tags by class from a web page, turn to plain text, and wrap each word with double quotes. include_once('simple_html_dom.php'); $html = file_get_html('http://linktosite.com'); foreach ( $html->find('.table tr td.span8') as $element ) { echo $element-

0
Q: Textarea on jquery ajax isn't sending to mysql, just input field

user3085269I'm having problems trying to send the value of a textarea to mysql. The value of the input "postusername" is successfully sent, but not the value of the textarea. And when it was working (I don't know why it stopped), the value was sent in the first time, but if I tried to send another value wi...

0
Q: php/sql ...how am i supposed to use data from a 50mb file?

David Salazarmy code so far is below. am i on the right track? i was able to read in a 1mb file but 50mb gets crazy and slow. perhaps i shouldnt be trying to output the entire data? but am i atleast reading it in correctly? below are guidelines and my code that works on 1mb file but not 50 mb. Write a PHP...

0
Q: sql one queries from 2 databases

user2875727I am trying to pull data from 2 databases in one queyr, and I tried inner join and didn't work. please have a look: $banlist2 = mssql_query("SELECT character_name,wLevel,byPCClass,wMapIndex,wPosX,wPosY,ip FROM character.dbo.user_character WHERE user_no = '".$banlistrow1[0]."' ORDER BY login_tim...

0
Q: Regex for Comma Seperated list

Sriram VenkateshCurrently I am writing a behat regex expression. I would like to make the Line as Human Readable as possible. Given I have a user with "$10 Text", "$20 Call" and "Something" I want to write a behat step similar to this. What would the regex be for the text after the with. I,e a list of "$10 Te...

0
Q: PHP DateTime::createFromFormat not working with time format with timezone

jCloudI want to check if submitted datetime from user is the same as my datetime format with DateTime::createFromFormat($format, $date) It was working fine until I changed my time format from Y-m-d H:i:s to Y-m-d\TH:i:s.ZP I want to get timedate like this 2011-11-09T17:11:57.430+05:00 What format sh...

0
Q: how to use html format into csv file?

user3085354I want to add html format like into csv file and then get the result from the csv file.I have added content into csv file using html format. But it does not show bold and italic words.

0
Q: Wordpress Orderby conditions

user2517788I am working on displaying a list of posts returned by a filter set, and I am trying to order the list by 2 conditions in DESC order. 1st Condition: I'd like to orderby the custom field 'date_study_was_published' (date format is yyyymmdd). 2nd Condition: If there is more than one post with the...

0
Q: refresh a page without reload in php?

user3084297My webaddress localhost/DS/abc.php?id=1 1-280-12/09/2013-er-0-delete 2-280-12/09/2013-edr-0-delete ..... So when i delete it goes to page with blank id and ofcourse that id is deleted.I want that it should reload or stay on same page with reload to same Pid.Here id=serial no in column which is ...

0
Q: What? Parse error: syntax error, unexpected T_STRING

user3085351I am getting this error for the following line: \Codebird\Codebird::setConsumerKey( $auth_args['consumer_key'], $auth_args['consumer_secret'] ); This is a wordpress template i just installed on a server. It works on my WAMP home server but not on the non self hosted server. Not sure if differ...

0
Q: jquery validation engine - validate against json list

awmI have a text input field that is set to auto complete for the user using ajax/php. Although the user is allowed to enter any entry, I would like to warn the user if they try to enter a value that is not pre-existing. <input type="text" id="customerName" size="50" class="validate[required]" /> <...

0
Q: SQL missing first value when there is more than 1 value in table

user3058831I have a function in php that allows the user to input information and add it into a database of sql. It seems that my very first value is always missing when more of the data is added. The very last value seems to be shifted down so that there isn't even any values there. Here is the code: $fi...

0
Q: How to change variable names inside array php

user3085306Ok so I have been struggling with this for hours now and I cannot seem to figure out what I'm trying to do. I have an array with many percent values placed inside and I'm printing out the first 5 of them. The $percent variables are acquired through similar_text $array=array($percent12, $percent...

1
Q: Loop Include Statements

user3038568The problem is it won't loop. There are multiple results and I just echo the results I get all of them. When I use include, it only displays the first record. Can this be done. I've tried for each, I've tried with array, I've tried just rolling through the results because I'm only grabbing one...

0
Q: Warning: Header may not contain more than a single header, new line detected

Bryan K.I have a question about PHP error. I went through other similar questions, and apply it, but I still have a problem like this, so I am asking it. Situation is like this. There is an text box called special instruction; if I put just one line it is fine to work, but if I put more than one line i...

0
Q: In virtuemart 2.0 How to block the insertion of values to invoice table

Sino ThomasI am using Joomla 2.5.6 and Virtuemart 2.0. I need to block the insertion of values to the invoices DB table until the successful payment of order.Please give the details of code and file which used to insert values to invoices table.

0
Q: How to use gridview in yii

FarhadMaybe a very newbie question. Anyway i wrote this in the view/tbluser/index.php <?php $dataProvider=new CActiveDataProvider('Tbluser'); $this->widget('zii.widgets.grid.CGridView', array( 'id'=>'tbluser-grid', 'dataProvider'=>$dataProvider, 'filter'=>$dataProvider, 'columns'=>array( ...

0
Q: android error "Window Manager Error"

user3085308What is this error, and why does it happen? Please explain and solve. This is sample from "androidhive". I need help for my thesis because of my thesis android app is to store data at web server. 12-10 10:08:09.556: W/System.err(401): org.apache.http.conn.HttpHostConnectException: Connection to ...

0
Q: Generate image from a form

Samrat MazumdarI want to extract a details from the form and want to generate a image from it. I want to find some tutorial about the same. Example: http://www.infiniteskills.com/certificate/externalcert.html?action=check

0
Q: Jquery datepicker different behavior in mobile

Rakesh Sharmai am using jquery datepicker plugin for my wordpress site it's ok in normal browser. but in mobile it's shows some title with date. please guide me how to make it work with mobile. please see screenshot for details:

0
Q: substring query in codeigniter

AsurayaI want a write following query. SELECT SUBSTRING(zsmonth, 5, 2) as month FROM (`tblsales_month`) So i wrote following code. $this->db->select('SUBSTRING(zsmonth, 5, 2) as month') ->from('tblsales_month'); But it generate following query with unnecessary back quote. SELECT SUBST...

0
Q: Class 'COM' not found error in Webserver

PuthuvannamI have used below the code for converting PPT to IMG <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <?php $ppApp = new COM("PowerPoint.Application"); $ppApp->Visible = True; $strPath = realpath(basename(getenv($_SERVER["SCRIPT_NAME"]))); $FileName = "MyPP"; ...

0
Q: Unable to make a email thread with Laravel 4 and Swift Mailer

Jean-Nicolas Boulay DesjardinsI have a page where users can send feedbacks. The feedback sends two emails. One for the admin and the other for the user. Mail::send($view_name, $params, function($m) use ($webmasterEmail, $senderEmail, $subjectTranslation) { $m->to( $webmasterEmail ) ->subject( $subjectTran...

 
4:49 AM
0
Q: How do you update your meta when using PJAX

goetzsI am using pjax on my site, and it is working great, but I can not seem to get my meta tags to update in the . I am using a flat file CMS named Kirby, so the data would be loaded in via PHP into the head, but since the head doesn't reload it never gets called to update. I saw this link but am...

0
Q: Check if variable used to trigger popup

js111Hello I'm working on a wordpress site and I currently have a popup set to display if an arrtibute in the shortcode is set to "popup="register")... I added another lightbox that I want to display if the attribute is set to "popup="apply") My question is how to add another variable to the followin...

0
Q: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate XX bytes)

user2873909Initially, it was stated in the settings of 128MB, then I got this error, I thought that maybe did not have enough memory, then I increased to 256MB, but the error continues. String in code with this error: function clean($str) { **$clean_str = stripslashes (trim($str));** return $clean_str; ...

0
Q: Prevent duplicate entry in php

user2870941I want to prevent duplicate entry. It will work when I enter same name that is already exist but if I change it in to small letter it will not work. For example Already exist data is: Developer.If I enter Developer it give message already exist but I enter developer it will insert into database. ...

0
Q: Passing errors to view

DefyleitiI'm using kohana 3.3 and kostache. Please help me on this one. How do you pass errors to a view. Controller public function action_add() { $renderer = Kostache_Layout::factory(); $view = new View_Pages_Album_List(); try { $album = ORM::factory('...

0
Q: how to really include html codes inside php

nosthertustheres something i would like to try and has to do with including html on php, my code would be like this. <?php foreach($element as $data) { <div class="view"> echo $data; </div> } ?> that would be just an example, of course it will give me error like not expected error. i just...

0
Q: Generate random number without duplicates

VidhuI want to generate 6 digit random number and check whether it is in table, if it exists generate another 6 digit random number and check again and so on .. the code wriiten is following, $querySel1=mysqli_query($connect, "select dynamic_email_id from logis_contacts"); while($row = mysqli_fetch_r...

0
Q: Wordpress PHP If statement inside assignment

sl133Quick simple question, is it possible to do an if statement inside of a php assignment statement so that you can switch what would be assigned? IE: Inside of a wordpress PHP function that already works $example.=' <div id="test-'.$num.'"> <a href="http://google.com">Google</a> </div>'; T...

0
Q: Audio cutter in PHP?

user1887195Is it possible to create an audio cutter in php? want these things... Click on the button "Browse" Select the mp3 file Select the beginning and the end of the ringtone. Listen to what created (Play) Click on the button "Create" and save the file on your PC.

0
Q: Inserting multiple checkboxes values to MySQL

user3064038I'm coding a back-end of a blog which the poster should choose which category the post should be. I don't know what to do next, I only have this piece of code which gets all the checkbox(checked) value(es) php code if(isset($_POST['category'])){ $category = $_POST['category']; foreach ...

0
Q: How to Clear this Error

PuthuvannamI have used below the code for converting PPT to IMG <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <?php $ppApp = new COM("PowerPoint.Application"); $ppApp->Visible = True; $strPath = realpath(basename(getenv($_SERVER["SCRIPT_NAME"]))); $FileName = "MyPP"; ...

0
Q: merge two images using gd library and class in php

SermaThis is my php class to merge to images mergepic.php class mergepic{ public function merge_barchart_drawing($object,$obj) { $src = imagecreatefrompng($obj->barchart()); $dest = imagecreatefrompng($object->drawing()); //$src = imagecreatefrompng('http://localhost/gra...

0
Q: table dynamic auto colspan

Willard <table border="1"> <tr> <th>PO</th> <th>Fuel Details ID</th> <th>Date</th> <th>Price</th> <th>Liters</th> <th>Previous Balance</th> <th>Hobo</th> <th>Truck ID</th> <th>Fuel Source<...

0
Q: Protect PHP files from Direct Access in WebMatrix

Jeffrey GoinesI have a html page that uses ajax for user login/logout. And the server-side script is PHP. Everything works fine but now I want to protect server scripts from direct access. By adding the following to web.config I can prevent direct access to all files in directory ./server_scripts/ but it als...

-3
Q: Relational Algebra in Mysql

user3085363User Say to Admin ,please Post Advertisement only this Categories(this Categories mean post the advertisement only this country or only male, only less than 18 years old....etc ). Person and Post have many to many relationship. so,I make Mapping Table(PersonPost)Between Person and post. that time...

-1
Q: Portable Web Server as XAMPP

Pavan KumarHow to run the xampp as a portable web server. I already used Server2Go like web servers. I tried to use xampp zip version but it is showing errors when installed in folder having spaces.

0
Q: How can I show 4 products in each row in woocommerce?

Debakant MohantyWell I am using a custom theme for woocomerce! Currently I am using the below code to fetch the products! It currently displays 5 products in a row. I want to display 4 products in each row? How can I do that? <?php if ( have_posts() ) : ?> <?php woocommerce_content(); ?> <?php end...

0
Q: You have an error in your SQL syntax that i cannot seem to resolve

user3085498I am an expirienced PHP programmer, but this time I just can't fix it. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group, name, domain, status) VALUES ('19', 'Minecraft', 'Bukkit', 'Bukkit Basic'' at li...

0
Q: How to set cron in linux server?

ChinmayHi i have created a birthday notification. My Cron URL is http://dev.raddyx.in/bday/birthday.php I want to set cron run in every 24 hour but i am unable to run in the Linux server. Check my command:- 50 10 * * * curl -s -o /dev/null http://dev.raddyx.in/bday/birthday.php Please help ...

0
Q: How to use variable with LOAD DATA INFILE MYSQL, PHP

user2897963I have the following code, which correctly inserts data into the mysql database, however when I upload the file, that particular file will never contain a certain column called 'date' which exists in the mysql table. I would like to put it in with each row... So Basically, how do I make the last ...

0
Q: Issues with PHP file posting variables to itself multiple times

user3085488I have a .php page that calls itself via a form multiple times. The user has 9 input choices that are represented by images. Let's say the .php file is called quiz.php: <?php ...blah blah php session start variable stuff $client_answer = $_POST['input_from_test_1'] ; $true_answer = $_SESSION...

-1
Q: Declare each value in foreach loop and use it on another loop or outside loop

user3073578I need to make the value in my foreach loop to be declare each variable and be use outside its for loop for checking $checklist = $_POST['checkbox']; foreach($checklist as $value) { //I want is declare each value. } For example Checklist value is hospital1 and hospital2 I want ...

-1
Q: Magento add to cart not working on product view page

Rajat KamrajThis website of mine is in development mode - http://dnuvo.com/laceups/bolzanovaresebrown.html Could someone please let me know why the add to cart button is not adding the product to cart? Thanks.

0
Q: Yii application migrating to linux server

B L PraveenProblem in accessing the load modules,when migrated to Linux servers. It does not show any errors but failed to fetech the results. Works fine in windows os. Initial problem was the table names case sensitive in Linux and window non-case sensitive. I renamed the table names RENAME TABLE main...

 
5:42 AM
1
Q: Script Runs on Homepage but not other pages?

user2751023Head scratcher here. I have a script issue where the script is present on all pages but doesn't seem to execute if it's not the homepage. If you go to : www.foulplayornot.com and click on Donate Now, the totals and prices change correctly. (apart from styling but that's not important just now)....

-1
Q: Full Message is not showing in mobile phone using php sms api

AlexWell, I just bought a sms api which is created by php. They provide me this 2 lines: http://fahimit.com/smsapi.php? user=username&pass=pass&phone=mobile_numer&senderid=sender_name&message=my_message \well now i'm using a html form to send sms. But after message send it's not showing full send...

0
Q: Is this asterisk character in my switch the reason I'm having a paradox in the output?

User2013In a PHP script I have this code: $route = new Route($url); echo var_dump($route->getRouteIDs()); echo "<br/>"; $isValid = $route->isValid($url); echo var_dump($isValid); echo "<br/>"; switch($isValid) { case '*': echo "wildcard route"; break; case true: ...

0
Q: User-Agent header injection?

Tyler OlsonI'm looking for help on an ethical hacking assignment that I have no idea how to hack. The code is a very simple page which runs some php script that detects your browser and displays a short message stating what browser you use. I have Burp proxy installed and running and I noticed that this pa...

0
Q: 4th category showing wrong url - wordpress. how can I solve this?

Newbie StarrI am using my own theme for a blog. It's working fine with some minor issues. When I click the posts from a category it's redirected to the proper post under the correct url except 4th category post. If I click any post from 4th category it's redirected to the proper post but under the wrong UR...

0
Q: PHP GD Library cannot Merge to image using function

SermaThis is my php class to merge to images mergepic.php class mergepic{ public function merge_barchart_drawing($object,$obj) { $src = imagecreatefrompng($obj->barchart()); $dest = imagecreatefrompng($object->drawing()); //$src = imagecreatefrompng('http://localhost/gra...

-1
Q: PHP - unexpected end of file

redber2009I added the error reporting...still doesn't show up what the problem was. This is the code in my index.php As you can see, I added some sort of alert if the user_ok returns...which does... <?php error_reporting(E_ALL); ?> <html> <head> <script language="javascript" type="text/javascript" src="....

0
Q: Display mysql records in table

user3081207I want to display all 000004 when I $_get['po']. But it's echo only 1 record. Purchase_order counter | id | .....etc 000004 | 1 | ..... 000004 | 2 | ..... 000007 | 3 | ..... 000005 | 4 | ..... APP counter | item_name | 000004 | ball | 000004 | ball | 000007 | ...

0
Q: CakePHP Find on CakeSession Failing

tgurskeI would like to read from the sessions table and display on a page in CakePHP. I can load the CakeSession model easy enough and even do a read on it, which works. But when I do a find: $sessions = $this->CakeSession->find('all'); I get this error: Error: Call to undefined method CakeSession:...

0
Q: Facebook improved oauth dialog

ProgrammerI have searched all over web but couldn't get the topic about facebook improved oauth dialog. How can I integrate new improved oauth dialog into my app. What are the different settings to do in developers facebook app?

-1
Q: Notice: Undefined index: emailseaech in C:\xampp\htdocs\erp\RecruitingProcess\manageuser\pages\defaultresume.php on line 6

user3085477when i am using my code in wamp(old php 3.2 may be) there is no warning or note but when i run the same code it giving me warning or note Notice: Undefined index: emailseaech in C:\xampp\htdocs\employee\RecruitingProcess\manageuser\pages\defaultresume.php on line 6 for this $emailseaec...

0
Q: How to create custom filter in register_post_type list page

hinaI am using register_post_type to create post_meta. So in its listing page by default it is showing date filter. I want remove all default filter and i want to create my new custom filter. My code to create post_type is - //Manage news Feed add_action('init', 'manage_news_feed'); function manag...

-2
Q: Magento:How to auto tranfer money from admin bank account to cutomers bank account in magento?

user3085576I have created a custom module for admin to add customers bank account details. Now i need to know how to make auto tranfer money from admin bank account to cutomers bank account in Magento?

-1
Q: Which tool is good for PHP debugging?

Bit_hunterMay be this question is not new,but I have want to ask. I am working on one PHP based chatting website. I am using open source code. Now I am not able to understand the code deeply as its more than 4000 LOC. Is there any specific debugger or tool that can give the proper flow from one page to ...

0
Q: Installing fusion charts plugin in Kreporter module in SugarCRM

masadwinI got my hands on fusion charts enterprise and I don’t know how to install it in the plugins in kreporter (which uses google charts by default and it requires internet access to work). I somehow got the php file and js file inside the folder i created 'fusion charts', in the plugins\visualizatio...

0
Q: Display Real-Time Values

Modify YouSay I have the following: for ($i = 0; $i < 10; $i++) { echo $i; sleep(1); } Now, this will display: 0123456789 However, it will take 9 seconds to load, and will not display real-time. How would I display it so it would be: 0(1 second)2(1 second)3(...) My second question involves...

0
Q: Joomla 1.5 : How to find number of concurrent / active users in my joomla based intranet system

ursitesionI have a Joomla 1.5.10 based Intranet system. Sometimes we see that number of DB threads are too high and performance become down. When I checked through Administrator section, I can see the number of logged-in users only. These number is between 1000-5000 only. is it correct to execute below que...

0
Q: Angularjs - File upload with php

Persistent NewbieI have spent days looking for a fairly simple integration of angularjs file upload method that includes a basic php server side script.. I need a simple form with two fields and an image upload. All examples I find are either heavily relying of jQuery or if they seem like something I could use ...

-5
Q: What is the role of function.php,single.php and content.php in wordpress?

user3060132I am new in WORDPRESS.I am apologies that i am asking this in-relevant Question.I searched on GOOGLE.but unable to find the role of some template files.can anyone suggest me that how to use WORDPRESS template files.What are the actually do in theme.What is the structure of WORDPRESS back-end wo...

0
Q: Magento special for all children of a configurable product when they are in cart

user3085566I have some configurable products in my shop. They have tier price for example: qty 20 will decrease 10%, also 50 -> 20%... Then I add a product with color yellow and qty 10 to cart, after that add this product with another attribute color blue and qty 10 to cart. Now in cart I have a configur...

0
Q: How to retrieve jquery ajax response to php variable?

asikHow to pass an jquery ajax response after success into a php variable. this is my code : process.php $start = ""; $end = ""; if(isset($_POST['tampStart'])) { $start = $_POST['tampStart']; } if(isset($_POST['tampEnd'])) { $end = $_POST['tampEnd']; ...

0
Q: Call function throught another file

user3078542View/Invoice/View.ctp <?php if ( $payments == NULL ) { echo '<tr><td> -- No Payments Are Associated With This Invoice -- </td> <td></td> <td></td></tr>'; } ?> <? foreach ($payments as $payment): ?> <tr id="payment_row_<?= $payment['id'] ?>"> <td ...

0
Q: Laravel : Project loading error

NapsterI am very new to laravel (PHP Framework). Up to now I have downloaded test code from HERE Then I simply extract & put into wamp/www/ directory, but it throws error like this snap What it is? Help me!!

0
Q: AWS Rest Get Object Version

user2176499How do I apply key to a AWS REST Api call? I am getting a SignatureDoesNotMatch error. I am trying to filter out a resource from a versions API call but it seems that only /?versions is working. function run() { $accessKeyId = "PPPPP"; $secretKey = "XXXX"; $bucket = "NoSuchBucket"; ...

0
Q: store all possibles of a checkbox in mysql database using php

reddy![holidays][1] ![1]: http://i.stack.imgur.com/bdRnV.png my form is like this it is developed by using php and pdo mysql. if i selected three checkboxes those names(ex|| first quarter, second quarter, mid..), start date and end date also stored into database. I have tried with following code to in...

0
Q: Simple ON DUPLICATE KEY UPDATE?

tr3onlineI'm trying to store a one-to-many relationship in my mySQL database and I want to avoid duplicate entries if at all possible. I read on the internet and saw that 'ON DUPLICATE KEY UPDATE' is an option. Would this work for my situation? Code: function insert_options($uid, $array) { if(!is_a...

-1
Q: i can not send mail using smtp

user2981939I have my personal domain abcd.com and my email-id is " info@abcd.com " i use the phpmailclass for send mail. My Code : $mail->SMTPDebug = 1; $mail->SMTPAuth = true; $mail->SMTPSecure = 'ssl'; $mail->Host = "smtp.abcd.com"; $mail->Port = 25; $mail->Username = "info@abcd.com"; $mail->Password ...

-1
Q: remove alternate values from array

Logical cloudsHi I want to remove alternate values from an array Array ( [0] => 6 [1] => 9 [2] => 7 [3] => 211 [4] => 8 [5] => 295 ) In this array I want to remove 9,211,295

0
Q: Two SSL Certificate on one domain in PHP site?

chiragI am little confused in applying SSL Certificate to my website because i already applied one SSL to it. So it is possible to apply another SSL certificate to it? I used wordpress framework of PHP.

0
Q: Apache error log many "File does not exist"

user2873909[Tue Dec 10 11:08:20 2013] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/--my_path--/view, referer: http://sitename.com/view/262 [Tue Dec 10 11:08:21 2013] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/--my_path--/view, referer: http://sitename.com/view/262 [Tue ...

0
Q: What is the difference between $band $$b?

user3085676I have doubt regrading '$' usage in PHP. In php is their any difference between between $b and $$b? What will be the output then for $b and $$b?

0
Q: STRTOTIME to find current week, date for Monday and Saturday, PHP

atomappsI have these lines: $staticstart = date('Y-m-d',strtotime('last Monday')); $staticfinish = date('Y-m-d',strtotime('next Saturday')); And I am using them to select the monday and saturday of the current week, But when it is actually Monday, it choses the monday of the previous week, thus showi...

0
Q: cURL 'Content-length required' error... 3 days of searching, no luck

Kyle the KoderBefore you ask: I have already checked every similar question that already had an answer, and none of the proposed solutions work. So I'm hoping someone may be able to notice a mistake in my code. When submitting a cURL post to Google, I am returned with a 411 error, "POST requests require a Co...

2
Q: .htacces /?p=test changed into /test

Ray DavisThis is the URL http://www.example.com/main/?p=test I want it to become this http://www.example.com/test My current .htaccess looks like this RewriteEngine On<br> RewriteRule ^/(.*)$ index.php/?p=$1 With these rules i only get this at the end /main/ I have tried many other Rewrite Rules b...

0
Q: php: combo box value not inserting while using javascript

fredriklindi got a problem where one of two combo box value failed to insert into database, the combo boxes (named category and item) is dynamically changing (for example: when i select 'fruit' on the category box, the item box will show corresponding item such as 'apple', 'banana' and so on). the problem i...

0
Q: How to use in PHP variables enclosed in double percent(%%variable%%) inside of html

CrowstormI'm modifying an html file that gets sent to emails, I need to create some checks via PHP to the variables but I don't know what the double percentages are, I tried searching the net but the results I see does not even relate to programming. I need to be sure when sending another mail since I ca...

0
Q: SMTP Mail Server sending mail not work

Mark Richardsi am trying to send mail via smtp from gmail my php code is <?php $body = 'test body'; $to = "test_useremail@example.org"; $from = 'mytestmail@gmail.com'; $fName = 'first name'; $lName = 'last name'; $subject = 'my subject'; $mail = new PHPMailer(); $mail->IsSMTP(); $mail->CharSet ...

0
Q: Create and write excel file using PHP

Rajhritafputcsv($fp, $fields[0]); It returns : fputcsv() expects parameter 2 to be array, string given in .... Where as my array is : Array ( [0] => Murshidabad [value] => Murshidabad ) .... My question is in PHP how to write values in excel row wise(ie new row but same column entry is rqrd). My code...

0
Q: comparing the fields from two tables and geting the required values in cakephp

saimuraliselect * from posts where p_id in (select distinct p_id from tabs); $sub=$this->tab->find('all',array('fields'=>array('Distinct (tabs.p_id)'))); $sub1=$this->post->find('all',array('conditions'=>array('post.p_id' IN (' .$sub.')'))); $this->set('mov',$sub1); can any one help me in this pls

-5
Q: PHP Convert HTML to image with PHP

user3085576In php i have a site to where an html form is generated from database.Now my client requires that this list should be converted to image and should be downloaded in client system.So i need a method to convert HTML page form to image with help of basic PHP.

0
Q: How do I enqueue retina.js in a Wordpress child theme functions.php properly?

djolivermso I'm just discovering the world of Wordpress child themes, and it's especially promising for me since I'm editing more than just CSS (some php and js files.) I know my child theme is working properly because I copied over a 404.php page and made a few changes to the content and tried forcing a ...

0
Q: Can't calculate values

user3078542$invoiceTotal = $settings['Setting']['currency'] . $thisInvoice['Invoice']['invoice_total']; $bedrag = $settings['Setting']['currency'] . number_format($thisInvoice['Payment']['0']['amount'], 2, '.', ','); $openbedrag = $invoiceTotal - $bedrag; //$invoiceTotal = 2 //$bedrag = 1 Why is $open...

0
Q: How to block/allow specific countries from visiting a website by latitude/longitude using .htaccess?

Ajith QTLI need a support from you wizards. I have an idea about blocking specific users to our website via .htaccess based on their geographical values, to be exact, with Latitude and longitude! I know accomplishing the same by restricting IP address with htaccess but thinking this will be rather grea...

0
Q: how to create pagintaion by category ID - wordpress

Newbie StarrI am displaying 3 posts on my home page. Those posts from a category ID number 4. I am using this arguments to get those posts. $args = array('cat'=> 4, 'posts_per_page' => 3, 'paged' => $paged ); now I want to add pagination for the home page based on those category ID. like this: NEXT 1...

1
Q: MVC submit form with AJAX and method POST

Papa CharlieI have a difficulty in implementing an MVC system. I have a simple comment system, which makes the record when sent via POST or via AJAX. a) Should I separate the 2 controllers in Comment_Ajax and Comment_Post b) or should I just keep a controller and and check the sent method (is_ajax()) to per...

0
Q: Date function that will determine early discount option

user2969739Is there a php date/time function that will accomplish this: If "Event 12-02434" has a begin date of 7/25/2014 and an end date of 7/28/2014. Those who purchase seats between 7/1/2014 - 7/7/2014 will get an early pricing discount So what I want is a function that will Look at the event date, ...

0
Q: How do I get activated plugin list in wordpress plugin development?

SarwarCSEIs there any way to get all activated plugin list in wordpress.

0
Q: simplesamlphp IDP Initiated authentication using existing session

TechgyaniI have a Zend project where users login through a login page backed by a database. I have implemented IdP initiated SSO functionality using simplesamlphp. Current flow of the events is :- User login into my website. Clicks on the IDP initiated SSO link. User is redirected to the login page I ...

0
Q: php mysql : mysql_fetch_array() expects parameter 1 to be resource, boolean given

Widuwhy i get error in my program.. the code is $q = mysql_query("SELECT * FROM rpard WHERE grup='12' "); $r = mysql_fetch_array($q); $nil = ($r['nilai']); { while($data = mysql_fetch_array($q)){ echo "<option value='".trim($data['nilai'])."'>".$data['nilai']."</option>"; } echo "$q"; } ?>...

0
Q: Reddit Clone script in PHP

Mahmudur Rahman ShiblyIs there any reddit clone script available made with php ? I've checked cmsonfire. It is lacking most the features that are available in the live server.

0
Q: php-regex pattern for matching mm <sup>3<sup>

user3064914I’m trying to write php-regex code to change mm3 to mL <?php $match='mm<sup>3</sup>'; if(preg_match('/\b(mm<sup>3</sup>)\b/',$match)) { $replacement='ML'; $replac=preg_replace('/\b(mm<sup>3</sup>)\b/',$replacement,$match); echo $replac; } ?> help me out to find error.thanks

0
Q: Address in variable - Get latlng PHP/JavaScript

TylerI'm using Google Maps Geocoding function. I got some addresses which I load into a PHP variable. The addresses are defined by a textbox which the user can type in a zip code. I give an example: A user types in the textbox a postal code (12345 for example). Now it loads addresse from the system (...

0
Q: PHP SOAP Second request doesn't throw an exception

kursati am trying to connect to a webservice. My webserviceHelper is: class webserviceHelper { public function __construct($params) { $this->service_url = $params['service_url']; try { $this->soap = new SoapClient($this->service_url, ...

-2
Q: I want to open my site for each domain like www.affiliatevote.com/blog

user3085800affiliatevote.com is my site and in this I have used 6 sub domains and each are opened with new domain like www.blog.affiliatevote.com but my problem is that I have to do SEO for each sub domain. So can you help me regarding this how I can solve that problem and also each sub domain has its own d...

0
Q: Completely remove a Doctrine entity

BryanI deleted a .php file which contained a Doctrine mapped class, let's call him Entity.php. Now, I want that same model to be removed from my mapping in doctrine. But all my attempts to generate a migration using the migration bundle or recreating a schema fail somehow. I can't simply update my ORM...

0
Q: FACEBOOK api get photos from album only in my accuont

user2964372when im trying to get photos from facebook to my website i get some problem when my account conected its works perfect but if im login to other account the script show blank page, why? (sorry for my poor lang') <?php include 'facebook.php'; $app_id = "4390--------7646"; $app_secret = "deed-...

0
Q: Yii list of subdomains with CHtml link

Yaakov SwissaHow can i get a list of subdomain links with this code? <?php echo CHtml::link($language, $this->getOwner()->createAbsoluteUrl('', $params)) ?> this output is: mydomain.com/page/blabla what i need is: blabla.mydomain.com/page thanx

0
Q: Assets on ZF2 project

TineoI try to use Assets on my ZF2 project. I found this module. RWOverdijk / AssetManager But I notice this: $response->setStatusCode(200); Is there any way to return 304 too?

0
Q: Multidimensional Array Not Looping Correctly

user3085808I have been trying to figure this out all afternoon. First, here is an abbreviated version of the array I am working with: Array ( [rotation] => Array ( [2013-11-01] => Array ( [0] => 21 ..... ) [2013-10-01] => Array ...

0
Q: Issue in updating multiple rows in MS sql server from php

user2129794I am trying to update multiple rows of a table via php using the below code : $sql ="update [TableName] set status = 1 where producturl in (?)"; $param = array($purl); $response = sqlsrv_query($conn,$sql,$param); where $purl = ('h','a','b','c','d') The above code is not updating anything.

0
Q: How can I extend a class after instantiation?

JazzaI'm experimenting with the MVC concept with my own PHP library and I'd like to see what I can do. I have a generic "app" PHP class. I have several different "controller" (I've called them views, although I realise now that's the wrong term) PHP classes in their own files for each of the differen...

0
Q: Still requiring a file extension for php

Douglas HardingI've been checking through docs, SO, and google for a few hours now. Also, dipped in and out of a few irc channels. I'm a pretty big newbie when it comes to editing these documents, so bare with me on this. So, I switched over to a new OS. (Kali) from (Ubuntu), I've been developing a website,...

0
Q: how to connect the withingsscale to the website

user2485785How i connect to my website and withing api.I need send weight value to withing api and get body measurement value.And where i will get withing api code using php.i have got sample code from <? //Oauth Consumer part /* * Include the Oauth Library */ require_once("OAuth.php"...

0
Q: Facebook (#200) User cannot access this application

shyamkarthickwe are working in php facebook project , we post datas from mobile app using open graph apis. first we are testing in demo site and create an app for the demo site using the demo site urls and added objects for the app. after migrate to live server , we changed the fb app site url to live one but...

-1
Q: PHP error encoding button modify

user3083985I created a site web: www.dreamworld-pvp.fr. Yeah i'm french :p My problem is: when we create an account we have the button to change the password but the button doesn't make anything... I give you my script: file:///C:/Users/dylan/Desktop/index.php Thank for you help

1
Q: PHP Session issue on browser close

chandresh_coolHere running into problem where I have requirement to clear user session when closing the browser. I have tried all the various option like setting session.cookie_lifetime=0 or session_destroy on browser close using onunload function. But nothing seems to destroy session when I open the browser n...

0
Q: how to make android login with php and mysql

Juraganerkai'm new in android development. in this situation i try to make login with php and sqlserver. i try to make connection with JSON and Asycn,but my project is failed when i try to run it. so little tutorial that i find about login with asyc that i learned before. so please can i anyone help me with...

0
Q: Infinite pagination : sends ajax request if we scroll towards top also

Jeet SinghHere is my infinte scrolling code: I use below code for sending ajax request to get more products on scorll down event. Issue: on scroll up, the below code sends ajax request too. I want only to send request on scroll down not on scroll up. Please let me know how can i achieve to send only ...

0
Q: Restler always returns 404: Not found

ShadowBrokerI have installed Restler on my local server to test and make some APIs for my project. Api requests are handled via http://localhost/myproject/api/. The problem is that everytime i try to make a request i get the following error: { "error": { "code": 404, "message": "Not Fo...

0
Q: PHP: Define constant for user group

pixelngrainThis may be a very basic or stupid question, but I have tried to find the answer here and on google but with no luck. May be I don't know the exact term. I am creating a function for navigation where by defining array as below array( 'home' => array( "dashboard", ...

0
Q: extract values found in array from string

user626342I am stuck. What I would like to do: In the $description string I would like to check if any of the values in the different arrays can be found. If any of the values match, I need to know which one per array. I am thinking that I need to do a function for each $a, $b and $c, but how, I don't kno...

0
Q: Is it still possible to use cookies or sessionStorage if sessions has been disabled on the server

BenjenI am a little confused by the relationship between server-side sessions and client side cookies or sessionStorage. I am working on a project in which server-side sessions have been disabled. Does this mean that I cannot use cookies or DOM storage (e.g. sessionStorage)? I get the impression th...

-4
Q: How to check string contain A-Z or a-z or 0-9 in a string?(php)

user2837851How to identify if a string contain a-z or A-Z? or contain 0-9? I need an function to judge a string belong to alphabet type or number type. Many thanks!!

0
Q: Error can't get value from mutiple selector when using jquery submit form

haitruonginfotechI have a sample code: <form name="update_form" id="update_form" enctype="multipart/form-data"> <input type="hidden" name="update_form_id" id="update_form_id" value="10" /> <select size="8" multiple="multiple" id="categories" name="categories[]"> <option value="1">A</option> <option value="11"

0
Q: Yii - Remove default controller from url

user3085904I'm very new in Yii. My question is in the subject. I have three modules, they all have a default Controller I have the following URL : www.xxx.com/module/default/action And I would like to have this : www.xxx.com/module/action Please help me I can't figure it out, althought I have read a lot...

0
Q: factory design pattern with dynamic class name

Danny Valariolai'm trying to create a factory design pattern that will generate classes with a dynamic class name. my code: namespace FOO; class MyFactory { public static function create($name) { return new \FOO\$name"; } } I get a parsing syntax error (as netbeans indicated). is that poss...

0
Q: Blog Posting SQL Join issue

ShoI'm working on a blog at the moment in CI (CodeIgniter Framework). I have two tables: Blog_Post table Blog_Banners table The relationships is one Blog_Post has many Blog_Banners. I'm trying to retrieve all of the blog banners for a particular blog post using this: SELECT * FROM 'blog_posts...

-2
Q: Webcam Image upload in PHP

user3085883I have downloaded Webcam Image upload code from (http://code.google.com/p/jpegcam).However my webcam.js page is showing error. Click to any of the options in the HTML is showing TypeError: _snap is not a function

0
Q: CakePHP mask integer to text

Dot BatchI am building a CRM, and when an "opportunity" is at a certain stage, it represents a probability. For example. At stage "won" the probability is at "100" Right now I have it so that in the controller, add form and edit form view it is as follows: '0'=>'Lost' , '5' => 'Customer Contacted' , '10' =

0
Q: docx template processor inserting image

incredible_titanI wrote own docx template processor on PHP. I work with docx file as archive and change "document.xml" file in the word directory of the archive. Everything had worked well until I inserted image. In word file I write templates like this "{(SOME_TEMPLATE)}" and in XML file it looks like : "som...

0
Q: how to cache static html elements in a web page?

mazraaraI would like to know how to configure a website to cache static elements of html pages? I have heard this is automatically done by the browser/server but thinking is it a good practice to use tags to do the caching <meta http-equiv="cache-control" content="max-age=0" /> <meta http-equiv="cache...

0
Q: How to get latest record date in MySQL?

fanaThis is my MySQL table: p_id product_name description added_date ----------------------------------------------------------------------- 1 headphone headphone 2012-06-23 10:20:11 2 cdplayer cdplayer 2012-06-23 12:03:...

0
Q: Importing products issues from xml in woocommerce

Mithun SenI have exported all products from a WordPress site to a xml file (tools > export > product) and trying to import in other site. I have installed woocommerce in both. But which option to choose in import section to import the xml? I dont know if any import plugin is available for that or its in...

0
Q: How to equate an echo value to a variable and access that variable somewhere else

EustatiaI want to echo a value, but hold it as a variable to access that value later. What's the right syntax for the following? if (!empty($row['A'])){ $Test = echo '<span>sale</span>'; } How do i prevent the above PHP block from printing and only print when that variable when is called somewher...

0
Q: how to remove 5gbfree's ad in the php response

Luke ChenI have a 5gbfree host and when I send a POST, I always get an ad div attached to the information I intend to response. for example, my php is: <? echo "foo"; ?> what I get is: foo <div style="text-align:center;"> <a href="http://www.nethosting.com/content/exclusive-offer-5gbfree?ad=600...

0
Q: Print Function not working not working correctly in Chrome

Aasim GoriyaI am using windows.print(); for print specific part on web page, its working on firefox browser but not working not working correctly in Chrome

0
Q: Generate playlist from files recursive

akunI have multiple folders with small videos and i need to make a rss feed from them. Structure of the files is like this: MainFolder -> -> File.Summer-> file.summer.p01f1.mp4, file.summer.p01f2.mp4......,file.summer.p02f1.mp4 ,file.summer.p02f2.mp4.... and so on. -> File.Winter-> file.wint...

0
Q: php contact form validation which stops showing form on no errors and success

Bîlål Çhådhårmy code is : if ($_SERVER["REQUEST_METHOD"] == "POST") { if (empty($_POST["yourname"])) {$yournameErr = "Name is required"; } else {$yourname = test_input($_POST["yourname"]);} if (empty($_POST["email"])) {$emailErr = "Email is required";} else ...

0
Q: Facebook API - How to invite user to group?

King GoeksI create a simple app to try invite a user to a group using facebook api. Here is my html : <form action="testinvite.php" method="post"> <input type="text" name="ids" id="aidi"/> <button type="submit">submit</button> </form> testinvite.php include("facebookdata.php"); $id = $_POST...

0
Q: codeigniter displaying logo in mail

Arpitha ShettyI have created an HTML page with inline css and provided logo as inline css background <div id="logo_image" style='background: url("<?=base_url();?>assets/images/img2.png") no-repeat scroll 0 0 / 150px auto rgba(0, 0, 0, 0);height: 73px;margin: -15px 0 0;position: absolute; width: 160px;'></div>...

0
Q: Object Serialization error

user2267462I am getting this error when I serialize an object in PHP and write the contents to a cookie an then read the contents of the same cookie on another page and unserialize it: Notice: unserialize(): Error at offset 43 of 1633 bytes in..... I know this may have been answered elsewhere but those so...

0
Q: Fatal error in joomla component

Takisi just installed a new component in my site but when i click on component settings button in the backend i am getting this message: Fatal error: Call to a member function loadByOption() on a non-object in /mysite.com/administrator/components/com_sigpro/models/settings.php on line 32 the file co...

1
Q: i want to save multi records from a form

maryamI am trying save batch record from form and save to database. I got sample from Advanced Example it is a widgets. this. example only add record without save it I add a save bottom under widget and form top of widget. add code for add or update ,I add id filed in widget . records read from dat...

0
Q: Mysql not listed in phpinfo.php, only mysqlnd

John KulovaI have installed apache2, php54 and Mysql 5.6. I have enabled php to work with apache but mysql is not responsding. I have tried a mysql_connect() function in a sample file but I get this error: Call to undefined function mysql_connect() I have added to mysql.sock on the mysql.default section...

0
Q: how to save custom product tab data to database in magento admin?

AnuI have followed http://fishpig.co.uk/magento/tutorials/custom-tabs-magento-product-admin/ to create custom product tab. As per the blog i have given $product->save(); to save the custom tab field datas. But its not getting saved.When i click save its showing One or more of the Cache Types are inv...

0
Q: Adding together values from all returned rowsz

Benedict LewisI am creating a very basic quote website for my college, where students can submit quotes and then vote on them. Votes are stored in a votes table, which contains the id, quoteid ,value and IP (to try to prevent spam voting). When someone votes it inserts a new row, containing the quoteid, and a ...

0
Q: echo clicks count on php button click counter

fafchookI found this script in php which counts button clicks and saves them to a txt file. <?php if( isset($_POST['clicks']) ) { clickInc(); } function clickInc() { $count = ("clickcount.txt"); $clicks = file($count); $clicks[0]++; $fp = fopen($count, "w") or die("Can't open file"); fputs($fp, "$cli...

0
Q: Datatable not calling javascript function

user2861106Hi i have a problem here in my datatable (http://www.datatables.net/) here's my code. enter code here <table id="example" width="100%" border="0" class="display" > <thead> <tr align="center"> <th>Function</th> <th>Location Name</th> <th>Route Id</th> ...

0
Q: virtuemart 2 related products

be wellI have an issue with adding related products. Every time I add product-A as related to product-B and product-B as related to product-A my virtuemart2 component stop working on frontend and in backend I can't reach this product no more, getting an error: "Fatal error: Maximum function nesting le...

0
Q: Having trouble with mysql Select Query

Md. Sahadat HossainI have a table named batch batch_id unit_size product_id 2 100000 c001 3 30000 t008 another table named batch_process batch_id process_id status 2 100000 0 2 100000 1 2 100000...

0
Q: mysqli connection error (in root folder works, in subfolder not)

user3036031i have a file my_api.php with the following content: require_once('./api/api_helper.php'); require_once('./includes/db_config.php'); $db = mysqli_connect($dbinfo['host'], $dbinfo['user'], $dbinfo['pass'], $dbinfo['dbname']); if(mysqli_connect_errno()){ echo 'MySQLi Error: ' . mysqli_connect_...

0
Q: Do we need both PHP and database user input validation?

dev9When developing a webapplication we usually implement data validation both in PHP scripts and in our database (as constraints and triggers). Do we really need to repeat this task twice? What is the point of that? Client-side validation ensures that most user input is correct, so in most cases s...

0
Q: How to get only 1 tag using new DOMDocument

VincentI only want to get the first iframe. how should I do that? here is my code: $url = "http://www.flixxy.com/10-famous-movie-scenes.htm"; $page = new DOMDocument; $page->loadHTML(file_get_contents($url)); foreach ($page->getElementsByTagName('iframe') as $node) { echo $node->getAttribute('...

0
Q: How do I test if my MySQL update query was successful when there is no update in Code Igniter?

user1273587I know it is a frequently asked question, but let me explain a bit why I need to ask that again. Most answers out there suggests using $this->db->affected_rows() This is not working in my situation as I may have situation that the update data is the same as the data in the database, so it wil...

0
Q: how to refresh or redirect to the main page which contains three frames in two frame sets

user3079462i am a beginner in java script i searched and found that top.location.href returns the location of the topmost window in the window hierarchy that will do what i need because i tried <meta http-equiv="Refresh" content="0; url=index.php"> put the problem is now i can see the home page in one of th...

0
Q: Inserting the select box ,textbox values to database which is getting appended multiple times on button click

user3080971I am able to display the select and textboxes multiple times now.Now how can I insert those values to database now.Iam little confused about getting the names for insertion.Can you please help me. Here is the code. JS code- function showverlauf(){ $.ajax({ type: "GET", u...

3
Q: Cakephp CsvHelper is not generating download pop-up in online but works in localhost

Ganesh YoganandI am using Cakephp CsvHelper class to download the .csv excel file. I followed the following link to achive it - cakephp excel/csv export component Everything works fine in localhost but when I try online I wont get the download pop up rather I get the output in the browser itself. Can any one p...

0
Q: Is it possible to create a custom product view page in magento

rajeevktomyplease help me to trigger out this issue. I am new in magento and hence really need your help. I need to have two product view pages in magento. One for local products and another for international products. I have customized the default product view page in order to display local products.Inter...

0
Q: MySQL Select Multiple latest Values

Johan PretoriusI have a table with user stats and need to select only the latest values for each user: Im using php timestamp to enter the date/lastlogin. stat_id: auto increment stat_user: The user that logged in stat_count: The amount of times he logged in stat_lastlogin: The last time he logged in tabl...

0
Q: treeview not working on sidebar in mediawiki

Shachar Hamuzim RajuanI’m having a problem with the treeview on the sidebar, And I was wondering if you can help me. I’ve installed CatTreeMAp and the DPL but I still can’t see treeview on the side bar, Can you tell me what I need to do for it to work? (I’m using the ‘vector’ skin) this is the relevant part of m...

0
Q: Check SQL constraint value

Marcel BalzerIs it possible to check a specific value of an existing constraint? For example I want to check if a FOREIGN KEY Constraint is ON DELETE SET NULL or ON DELETE NO ACTION. I only found solutions if a constraint is existing at all, but not for a specific value.

0
Q: steps for ecommerce tracking on GA from server side using php

Abhijitsteps for ecommerce tracking on GA from server side using php i am added event tracking like //event $event = new GoogleAnalytics\Event(); $event->setCategory('Mobile_Sales'); //string, required $event->setAction($venue);...

0
Q: Can I draw a class diagram without having classes in my source code

MeeI have an assignment creating a small website. I chosen PHP, despite of being a beginner, I finished my work by reading some basic tutorial and searching on the internet. It has been done without declaring, using class, so I don't even care having it or not. But now my teacher tell me to draw cla...

0
Q: SQL Count rows and display in order

user2959441Let's say i have a table named animals with with columns named "id" and "name" and "type". The last column is filled with cow, chicken, horse, pig, elephant, hippo etc. What i want is a query that counts the number of types and displays them in order like this... chicken 45 cows 40 horse 5 etc....

0
Q: Insert data into mysql from changable numbers of forms

IznogudFrom input page I have changeable number of forms sending me data. I made so that each new form have next number. name2 date3 name4 date5 name6 date7 etc... The problem begins when I tried to capture them in in my Db in table with two columns "name" and "date". This is the code Im using: $i ...

0
Q: Regular Expression to match a closing tag to an element

Me123Is there a Regular Expression to match a closing tag to an element. So it must match the beginning tag and then check if it has an end tag and if the end tag is the same as the beginning tag. So for example <a href="/home">Home Must end with </a> And <div id="paragraph-block"><p id="paragr...

0
Q: PDO with MSSQL driver how to get output parameters?

misterionWhen you are using PDO with MSSQL driver you actually use FreeTDS as low level driver. There is some different ways to execute stored procedures - language queries and RPC call. FreeTDS also supports TDS protocol version 4.2 and 7.x. The one of main difference between them is a behaviour of stor...

0
Q: send form data to two pages php in same format

now-r-neverI need form data to be sent to two different pages(a0.php & a1.php). I cant use session because I dont have access to (a1.php) page. So now i want some intermediate page where i can access the form data and redirect to another page as form post itself. existing //front end <form action="a1.php">

-2
Q: what to use for this website project?

user3086125i am about to develop a simple music membership website where i will be charging people each time they download an mp3 file on the website ,the user will be having credits that diminishes when he download something ,so i want you guys to help me and tell me how i can proceed with php language to ...

0
Q: How to enable mcrypt in php on Mac OSX 10.9?

kramer65Since I want to start learning Laravel, I need to install mcrypt in php. I'm on Mac OSX 10.9 and I installed apache and php manually (no mamp or anything like it) so I followed this guide to install mcrypt. The whole procedure works as expected (no errors), but after restarting the server using s...

0
Q: HTML form reply not working

user3086136can someone reply why i am not able to get my html form reply working.i had taken it from a website but couldnt find a solution to it from thereits a small form which we put in our contact section.but when i click on the submit button it redirect me to the php page. HTML CODE <form name="htmlfo...

0
Q: Sitemap generator script for photos

user3086172I'm working on a sitemap script but now I need to know how I can scan all my photo's since they are in different folders (I'm working with albums) All my images that I want to get into the sitemap are in this directory: public_html/Albums/{Albumname}/{photo name} How can I do this?

0
Q: Need edit profile link in the menu for logged in users wordpress?

NaveenI have a page called edit profile, i have installed the profile builder plugin,so the users can edit their profile from front end, if the user is logged in i wants to show the edit profile and logout links in the menu else it is login. how can i achieve that? i am using wp-bootstrap responsive th...

0
Q: Authantication returning false Laravel 4

Bart MoonsI'm writing a simple authentication form with laravel. After trying two different tutorials, it's still returning false. Register is working fine, but my login isn't. Here is the LoginController: public function getLogin() { $this->layout->content = View::make('user.login'); ...

0
Q: MySql Workbench not connected with my php file

NamoI want to use mysql workbench instead of xampp mysql but i am getting errror. Error Log is Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock' (2) in /Users/jeetulives/Sites/hello.php on l...

-1
Q: how to remove double quotes from json array

jamesI'm trying to pass an array to jquery flot. But when I encode it to json the string part will wind up with double quotes. The jquery flot is not accepting double quoted string. JSON [["November(2013)",8.3333333333333],["December(2013)",0]] I tried with this preg_replace('/"([^"]+)"\s*:\s*/',...

0
Q: Can some explain this conf for me,it's about the rewrite in nginx

ricky_hustI use wordpress over nginx.in order to have a more friendly url,i use the plugin Permalinks.At first,this plugin doesn't work,so i search on the google,and have a method.i add this in the nginx.conf,it works. location / { if (-f $request_filename/index.html){ rewrite (.*) $1/inde...

0
Q: wordpress: make first post (2 cloumns theme) span over 2 columns?

user3086182So basically my website shows 2 post columns on the home page, I want to make the first post span over 2 columns so the image would be to the left of it but I don't know php (yet). can someone help me? Here's my Content.php code: if ( is_singular() && is_main_query() ) { ?> <?php // Get, re...

1
Q: Backbone: Feed JSON in a variable instead of fetching through URL

OmarWe are trying to modify an existing script which uses backbone.js to fetch JSON from a URL and render it in a defined way on screen. Earlier the script was pointing to an external PHP file to fetch the JSON from it. url: function () { var ajaxValue = document.getElementById('ajax'...

0
Q: Declaring each variable before insert / update or placing each variable in the insert / update in quotes?

user2871179I have included error_reporting(E_ALL) in my system - I want to write good code. I am wondering between this two options. Should I declare absolutely all variables before insert/update (I have a lot of it)? $s_id = isset($_POST['s_id']) ? $_POST['s_id'] : ''; ... $insert = $dbh->prepare('INSER...

0
Q: How to change password and sent mail to customer group programmatically Magento 1.7?

kostHi Developpers around the world!!! I have just imported a new customer group of 700 Customers from a another CMS in Magento Eshop 1.7.02 So I need to sent to this Customer Group an email to inform them that they have a login with their email in my site but automatically to send them a new pas...

0
Q: run php script background to dowload a file

namrathai have a php script to download as xls file..but if the file contains huge data it is taking long time..so what i want is to run php script background and to give alert as soon as download is finihed. my php code to download as xls file is as follows and below code works fine <? include 'dbConne...

0
Q: Drupal - how to create private session between Buyers and sellers

user2964239Basically I am looking to create a website for online Trading. Everything happens here LIVE .All Buyers and sellers are online on website! When the sellers wants to buy something from the buyer. A Transaction is started as soon as the seller confirms his availability (Probably a request should b...

0
Q: How to write jquery code within php code

user3030853I have checking PHP code with checking id from database. if I get that id from database then I want to append div with image. Is this possible. The Code is - <?php $chkgreenmark="select * from itinerarydaywisetraveldetails where ItineraryDayDetailsId ='$ItineraryDayDetailsIdDel'"; $sqlchkgree...

0
Q: write a large csv file using php

biomanI wrote a csv file using php.In that file width of each column ranges from 150 to 12000.I have 6 columns.The problem is I am not getting the proper alignment of values in each field that is values of row 1 spreads upto row5.The file size is 240MB.But if I view the output in browser it is in prop...

0
Q: node.js socket.io & memcached - using PHP Session ID as Socket.IO Nickname

AdamI understand if this is a silly questions. I have a site that is delivered by PHP and every user has a userid stored in a memcached SESSION. I'm also using node.js to deliver socket.io and using a nickname to know who the user is. (eg: it passes the userid over when the connection is initially ...

0
Q: img src PHP request won't execute

Dragon5689I am trying to make a get request from an html img src attribute, looking like this: <img alt="" src="getImage.php?id=<?php echo $id; ?>"> where $id is a MongoDB ObjectID. The problem is that all I get when the page is rendered is: <img alt="" src="getImage.php?id=52a6d8101dc38f3c36002057"> ...

-1
Q: In CodeIgniter how can i pass an array type argument to a controller from url

user1891480//let my controller be C and method be: function X($array){} //And my url to call it is: localhost/mysite/C/X/array Well i tried it but it returns 400-Bad Request response. Does anyone know how to do it? Quick response will help me a lot//Thanx

0
Q: catch always get called

DefyleitiI'm having problem saving data to the database since catch exception is always being called. try always get ignored. I don't really know what's happening. I've been working for this for hours and I can't get it to work. I'm using kohana 3.3 and kostache. So here's the controller. Controller AP...

0
Q: Wordpress Custom Query Doesnot return result

Mohamed AkramThe following query doesnot return any result even though there is a publish date and expiry date in the database SELECT wposts.* FROM qit_posts wposts INNER JOIN qit_postmeta wpostmeta ON wposts.ID = wpostmeta.post_id WHERE wposts.post_type IN ('ad_listing') AND wpostmeta.meta_key ='cp_publis...

0
Q: encode and decode text to reduce application file size

EkramI am developing a dictionary. Where there is huge file of more than 2.5 million words and it's translation. Let's consider this Google translator http://translate.google.com/#auto/ar/people Where you can see below noun, verb. In those noun and verb you will find some repeating words. So what I a...

0
Q: Create a class for Merging two image using php GD Library

SermaDo any one have an idea for creating two barchart image using PHP GD library and Merge it using class object with GD Library?

0
Q: cakephp Encrypted Files

user2342231I have got new client and site I am working on is developed in cakephp with previous developer. I have found that all core files of cakephp are somehow encrypted. Sample code of one file app_controller.php is listed below. <?php //003ab if(!extension_loaded('ionCube Loader')){$__oc=strtolow...

0
Q: Downgrade to PHP 5.4 on Arch Linux

Claus ConradI am running a fully updated Manjaro (Arch Linux derivative) distribution with PHP 5.5.6 installed using pacman. Some scripts I am forced to develop with are not fully compatible with PHP 5.5 yet. Is there an easy way to downgrade to PHP 5.4 or do I have to compile it from source?

0
Q: Phonegap caching

Guus van WalstijnI am new to PhoneGap and I had a few questions about it: I currently have a working app that connects to the server and asks a password to be able to see the files in there. Now I need a way to find out how I can make it so when you have no internet you can see the files securely. I heard it's p...

0
Q: Form submit to iframe - strange x-browser issue

Björn VermaerenI am having some strange issues with my code as it only works in Internet Explorer 11 (only tested in 11) and it is NOT working in Firefox 25.0.1 or Chrome 31.. I want my form to submit in the iframe so I can handle image uploads in the background.. But I'm not getting far thanks to this issue. ...

0
Q: Storing Paypal Details in database

user3077217I am making a sample website for online shoping but i got stucked here. while i am inserting all details in database , itemname and order_id are not inserted successfully remaining fields are working perfectly. Please help. here is my code for the form.. <form method="post" action="https://www...

-1
Q: Bypass login/password CMS users

user3046091For a project I need to make a main login page that redirect the admin to the users CMS made webshop. EXAMPLE: All the users have their own CMS made webshop User1 -> login page -> admin page of the webshop1 User2 -> login page -> admin page of the webshop2 User3 -> login page -> admin page of ...

0
Q: PHP cURL error with HTTPS

Florian Mac LangladeI have to develop an API which call url with curl method but I've got this error (on wamp) : cURL error: Protocol https not supported or disabled in libcurl Here my code : function request($resourcePath, $method, $body = null) { $url = _getBaseURL().$resourcePath; var_dump("Request : $url");...

-5
Q: Please convert below php code to c#.net with asp.net code.

user1135690Please convert PHP to ASP.NET with C#.net code. Please take PHP code from https://github.com/kingster/Way2SMS-API/blob/master/way2sms-api.php . I am unable to copy paste that code here. So, i am giving link... Please do any one needful. it is much required for me.

0
Q: error in ffmpeg when sending image from pipe via php

Abdul Aliused the following tutorial to send an uploaded image to ffmpeg from php via pipe. Image pipe from php to ffmpeg however it raises an eror saying that the pipe has invalid data in it. pipe:: Invalid data found when processing input following is the php code for uploading an image file $temp...

-1
Q: Does PHP automatically remove quotes?

Dan GoodspeedLooking at the source code of my outputted HTML from a PHP script, I noticed almost none of my attribute values are quoted, even though I specifically quoted them in the PHP script. I finally figured out that PHP seems to be automatically removing all the quotes if the value is just one word or ...

0
Q: Replace all occurrences of \\ not starting with

aleThis should be simple. I want to change all of these substrings: \\somedrive\some\path into file://\\somedrive\some\path but if substrings already have a file:// then I don't want to append it again. This doesn't seem to do anything: var_export( str_replace( '\\\\', 'file://\\\\', '\\som...

0
Q: how to capture array in ajax page when sent through JSON object

user3058736i am sending an array from one page to another through ajax.i used JSON object for this purpose.I am able to send but i am not able to capture in the ajax page.Please help me how to capture the array values. javascript: var jsonString = JSON.stringify(dataString); $.ajax({ type: "POST...

0
Q: Trouble installing Omnipay via Netbeans composer extension

FlobboI am currently trying to install Omnipay into my Codeigniter project. I am stuck on windows because I do not have ssh access to the box where this needs to run on. So far I have gotten a new directory in the project root that is named "vendor" and it contains a lot of empty directories referring ...

0
Q: upload a image in multiple directories using PluploadPlugin

Dilip vyasI have implemented the PluploadPlugin plugin for multiple file upload using drag and drop now i want to upload these images into different different directories but there are only these files uploaded into on directory either first directory or last directory so please can any one help me what ca...

0
Q: Make sure MySQL processes close after running

charlieI have a site running in PHP and MySQL, recently it has started to not respond and not load pages. My Web host says it because of open processes: Id User Host db Command Time State Info 28312497 eximstats localhost eximstats Sleep 0 NULL 42808356 integra_integra ...

-1
Q: PHP - proper check if $_POST['variable'] is posted

user2871179I want to check if $_POST['submit'] is posted. My original code was: if ($_POST['submit']) { } But I have a PHP notice with this code - "Undefined index: submit in..." So to remove the notice I have to write this: if (isset($_POST['submit'])) { } But this is pointless because $_POST array...

0
Q: How does 8 tracks handle tags?

MikeIs there a name given to the way 8tracks handle the clicking of tags? Looking here, when you click on a tag, it is appended to the end of the URL. Click on multiple tags and they are all added. My question is, other than always checking the GET values, is there any other way to add to the url.

0
Q: SUM value from query changes when i add inner join to the query

Diogo Santos $sql = mysql_query("SELECT totals.*, sum(totals.payments) as total_payments FROM totals INNER JOIN users GROUP BY totals.idseller;"); When i add the INNER JOIN the sum value is changed. Why? In my SQL table i have one record in totals width this value: 8943.09 but when i do the s...

1
Q: Image links broken in Gmail because of google's Image proxy

balajimcaImage links in gmail are broken because of google's Image proxy (news1,news2). I can't load my site's images in gmail. Actual image path is: http://sampleimageurl.com/images/logo.jpg But I get the same image path like this in gmail: https://ci3.googleusercontent.com/proxy/CUiMBo2ELdin8h5R_jKa...

0
Q: How to dump in sql a table structure (fetch fields metadata) and data for Oracle using PHP and ADOdb?

wildnoveI am looking for a php script that starting from the name of a table and an Oracle connection through ADODB returns the sql dump of the structure of the table (CREATE TABLE) and content (INSERT INTO). Does anyone know any solution? This is ADOdb http://adodb.sourceforge.net

-2
Q: Posting a facebook wall from a website

user2902681How to post the facebook wall from my webpage using PHP script? and how many ways to post the facebook wall from my webpage to facebook ?

0
Q: how do i know api is called securly via https or not

Dev01So we have created an api, we want to make sure it is called via https secure connection, how do we know from api it is serveing securely. For example if from another domain comes request to our api like this: https://ourdomain.com/api.php?appId=dev4&apiKey=XXXX From api.php, how do we know we...

0
Q: File Writing in php without appending

user2174920Following is my piece of code which writes to file. $fileWrite = fopen("c.txt","w+"); for($i=0;$i<5;$i++) { $bytes = fwrite($fileWrite,$i); } fclose($fileWrite); I am getting 01234. itmeans pointer is appending to last location. i dun want to append data. i want only 4 to be wr...

0
Q: Doctrine mapping a single entity class to multiple tables without inheritance

Eugene LeonovichIs it possible somehow to map a single entity class to two different tables without inheritance? Something like: <entity name="Acme\Entity\Service" table="organization_service"> ... <many-to-one field="target" target-entity="Acme\Entity\Organization" inversed-by="services"> <joi...

0
Q: PHP Project Reference Project

ok3n0b1I try to implement a structure like the one I know from C# with Library Projects wich are referenced in other Project. But this time in PHP. Structure I try to achiev this through setting Project Include Paths to the Projects: But now I have the Problem how can I finally include() one of my...

0
Q: Giving another class to child elements : wp_nav_menu (walker)

user3057186I have a problem on giving to child items only the class I want. Anyone can give me some hints or any little help on what I have to write on my functions.php ? Here's my code: sidebar.php: http://snipt.org/Byx0 functions.php: http://snipt.org/Byy8 I want the output to be like this ( snipt.org/...

-1
Q: What is a proper limit of Memory that PHP need for one Application Run?

ins0This Question is in my mind a long time ago. I heard many people say different things but what is a accurate Memory Usage that a PHP Application need for a single run? I searched a lot on the Internet but didn't find usefull answers or similar big pages that gives out there Memory Usage. We hav...

0
Q: Editable Jquery table not working

user3078580Been working a enable jquery table with little luck. The table used PHP / Ajax and jquery. However I am unable to update the DB once I have made the changes on the webpage. Below I have placed the code for PHP and AJAX. The Jquery is used for actually making the table editable on the webpage but...

-2
Q: How use webhook in codeigniter?

Dharampal YI am new in webhooks. I want to use webhooks in CodeIgniter(PHP) framework. I want to transfer data from one website to other through webhooks. I tried this but its not working.

0
Q: Automatically Submitting a Form WITH Submit Button Parameters

no0bI am using the following code to submit a form automatically: <form id="reg_form" name="reg_form" method="post" action="../mm2/register.php" > <input ..... /> <input ..... /> <script type="text/javascript"> document.reg_form.submit(); // SUBMIT FORM </script> </form> However, the manual way ...

0
Q: Can I execute a multiple parallel cURL against the same URL?

rubdottocomI need to execute multiple request in parallel using cURL, but I need to do it against the same URL. This is because is a SOAP webservice, I have a unique URL but I'll send different headers to receive multiple responses that I need. I tried to make a curl_multi_exec, but I var_dump the $chann...

-1
Q: Is it correct way to identify if it is https url or not

Dev01# serve from secure page only if ($_SERVER['HTTPS'] !== "on" || $_SERVER['SERVER_PORT'] !== 443 || empty($_SERVER['HTTPS'])) { exit('Non-secure requests not allowed!'); } Is above code fine technically or do I still miss something to check whether request came from http or https?

0
Q: Using a function in dialogConfirm - AgileToolkit PHP

AdiCrainicI'm using Agile Toolkit version 4.2.4. I had this line which worked well: $deleteBtn[$i]->onClick(array($this, 'deleteData'), 'Are you sure?') A pop-up which asked users if he really wants to delete something,and when they clicked 'Ok',the 'deleteData' function was called. Now I want to c...

0
Q: Query the join Table of HABTM related Models

oligenIm working with CakePHP since very recently.. I've got a table 'advertisers' and a table 'users', aswell as a table 'advertisers_users', that only contains 'advertiser_id' and 'user_id'. . User hasAndBelongsToMany Advertiser. I need an array in which i can find all advertisers (names and id's) ...

0
Q: submitting via jquery (smarty)

user3082435im using SMARTY and php4. i have two selects where i move contet which i get from database from one select to the other with buttons like this : |<<| |>>| using jquery. Now my problem is, submitting everything which is in the right select. code im using so far to submit my right select. (s...

0
Q: PHP imagecopy destination image disappears

Stefan DunnI'm importing a PNG image and creating another image which has text on it. Both have alpha channels, and when I use imagepng() on the separate images they both display correctly. When I then use imagecopy(), the destination image appears blank and all that is displayed is the source image. This ...

0
Q: Inconsistent results in special characters with Apache/PHP/FreeTDS, but not with PHP/FreeTDS from command line

carlo.borreoI have two identical servers (called test and production) with Linux Red Hat Enterprise Linux Server release 6.2 (Santiago), PHP version 5.4.2, Apache Apache 2.4.2, OpenSSL/0.9.8s, freeTDS 0.92-dev (not the best thing but I cannot change that for the moment), and a separate Windows server with Mi...

-1
Q: php connect to two databases same time

user2198518I wanted to connect two databases same time This code block works only once. In the second record it gives me a error please help me to find out the error.... $hostname1="localhost"; $username1="root"; $password1=""; $hostname2="localhost"; $username2="root"; $password2=""; $dbh1 = mysql_conne...

0
Q: Client-side JSON decode jQuery

MikeFPlease view my other question here I am trying to work out how to decode a JSON response from a PHP file. The JSON is structured as follows: [{"id":1,"info":{"title":"http:\/\/www.peopleperhour.com\/job\/amazon-webstore-379672","price":" - "}},{"id":2,"info":{"title":"http:\/\/www.peopleperhou...

0
Q: how to display users when we search for a particular node in the exposed filter in views drupal 7

ArunI have a view, where user searches for a particular node, and i want it to display the user who created that node. I have created a view and used exposed filter to list all the nodes in autocomplete, but when i search a particular node, it is displaying a error as "An illegal choice has been de...

0
Q: Checking the login from my MySQL table

user3086373I have code here that checks the login from my MySQL table i am then looking to carry my session over but it doesen't seem to be working. This code is checking my login it is the check_login.php <?php $host="localhost"; // Host name $username="root"; // Mysql username $password=...

0
Q: PHP preg_split in to array

user2373636Hi Im using preg split to split a value, I need to store each value of the split into an array. currently what is being passed in to the preg split is: preg_split("/[0-9]/", fujitsu30001 , NULL , PREG_SPLIT_OFFSET_CAPTURE); I need it to split on each number so it appears as: fujitsu 3 0 ...

-2
Q: How can I make an installer for a PHP applications?

user3074468I have a PHP application and would like to create an installer for it. Are there any existing frameworks I can use? Are there any good tutorials on this sort of thing?

0
Q: Joomla loading file dynamically not inclusing Joomla installation

devoncrazylegsI am currently building a website in Joomla 3 which is mostly going to be dynamically loaded pages and content. On my main page I have three anchor tags which when clicked will load a file with html content and then scroll across to that content using jQuery animate. The issue I am having is bec...

0
Q: Safely transport strings with special characters

ragulkaI have the following source file: https://www.post24.lv/public/files/Pakomatu%20adreses_web_lv.csv It's a list of addresses with lots of special characters (it's Latvian). I'm having lots of issues with this because the addresses get stored to a different file and then a database, so there's lot...

0
Q: Looping through MySQL rows in PHP

ElendilTheTallI have a MySQL database with 3 tables - events,venues,instance. events contains informations on events such as event id, name and description. venues contains venue id and venue name. instance contains event id, venue id and date. I perform a join and load the results into an array so I can disp...

0
Q: Combining results from database

kabuto178Is it bad practice to just have an include file in my HTML layout file where I want the queried database results to be displayed? I had been doing this but began wondering if that causes performance issues, I had included a file with the query and loop through the results then echo out the result...

0
Q: Ul li tree structure in php

AaruKarthigaI have the tree structure of my code in ul li. now i'm struck up with one small issue.. below is my array Array ( [5] => Array ( [parent] => 0 [name] => Kitchen [cat_id] => 5 [slug] => kitchen [children] => Array ...

0
Q: How to let user hide rows from a html table

SebI have a table which gets dynamically populated by the results of a search query: echo '<table class="table">'; if ($num==0) echo "<tr><td>Sorry, no items found.</td></tr>"; else { echo '<tr> <th>Nr.</th> <th>Name</th>'; echo '<th>Description</th> <th>Image</th>'; $lf = 1; while ($dsatz...

0
Q: php returning null http response to android

Kunal KorI am calling php url from android to recevive some string value. My android code is as below: private static final String BASE_URL="http://10.10.2.26/demo"; public static HttpResponse executeUrl(String action,String[] parameters) { try { HttpClient client = new DefaultHttp...

0
Q: Giving another class to child elements: wp_nav_menu (walker)

user3057186I have a problem on giving to child items only the class I want. Anyone can give me some hints or any little help on what I have to write on my functions.php ? Here's my code: sidebar.php: <?php wp_nav_menu(array( 'container' => 'div', 'container_class' => 'menu', 'i...

0
Q: When does a javascript function is being executed in a jquery mobile page?

Elisabetta FaliveneI have a php function that, after it did his computations, contains this code: echo("<script> window.location.replace('index.php#login'); </script>"); meant to redirect the page to another, under certain circumstances. The function works, the javascript code works, but if fails in one case. If...

0
Q: explode function in java as in PHP

user1765876I have a variable in java, which is like this I+am+good+boy I want to get seperate them on the basis of + , in PHP I can use explode which is very handy, is there any function in java?I saw the split() function definition but that was not helpful.as it take regular expression. Any help Thanks

1
Q: When should I close a databse connection in PHP?

KiwyI'm nothing like a php developper but I do have to use it and I'm not really aware on how PHP handle memory allocation during session. I'm working on an application that ask for an htpp authentication, once you're login you can manipulate data through a nice interface. Someone told me on anot...

0
Q: codeigniter : how print response of page into log_message?

Dharampal YI am new in CodeIgNiter. I want to print the response of server into log_message. In simple when one page called by other that time what response sent by server to calling page.

0
Q: mysql in php programming

user2509780I have a table say "fruits" with two columns 'ID' and 'value' which is linked to another table "fruit desc" with two columns 'No.' and 'name'. The fruits table has row values like 1 red, 1 sour, 1 nigeria, 2 green, 2 bitter. The fruit desc table has row values like 1 colour, 2 taste, 3 country,...

0
Q: cakephp User Login Redirect Without AppController

user2342231I am trying to create an applciation in cakephp where I am allowing user registration and login system, but my AppController is somehow encryption and I don't know how to decrypt it. Is that possible to redirect admin and user to their relevant pages without configuring AppControler. Thanks eve...

0
Q: i need a flipkart-like payment gateway in php

user3086387does anybody know how to do different payment methods exactly like flipkart.com's in PHP? P.S. - PHP, in the sense, Core PHP and not any CMS frameworks like Wordpress, Magento, etc. Thanks in advance!

0
Q: Creating a HTML form with conditional logic

user2825890I'm looking to create a form with logic, so for example we may have the following fields as dropdowns: Product: Colour: Size: etc, however, If we have product 1, product 2, product 3, and product 1 is only available in black and white, product 2 in blue and yellow, and product 3 in green and or...

0
Q: icCube with olap4php

user3086436we started to build PHP application to connect to icCube and we would need an example for olap4php because we don't find in icCube Documentation. in particular we need the Provider to use in building connection object to icCube. // Example for Mondrian $connection = new Connection( new SoapAd...

0
Q: Useful jyggen/Response error message?

sturrockadThe response from a jyggen/Curl request is based on the Symfony 2 Response, documented here. In my code, after a Request is executed, both the Request.isSuccessful() and Response.isSuccessful() conditions must pass for the script to continue. If the Request fails I can use $request->getErrorMes...

-1
Q: Mysql and html timestamps

user3038421how can i get mysql records greater than a timestamp like 1386632264 sent as a GET var from html ? (php and mysql) mysql time stamp is the current_time_stamp WHERE time>1386632264 doesnt work

0
Q: What's the issue in following PHP-AJAX code?

PHPGeekThe Smarty template file(i.e. HTML) is as follows: <form id="view_questions_form" name="view_questions_form" action="{$control_url}modules/questions/match_question.php"> <input type="hidden" name="page" id="page" value="1" > <div class="w50"> <ul> <li>...

0
Q: PHP: How to store and checkboxes values and update them

user3013190I'm having a problem with storing and updating checkboxes values. When I select/unselect them all it works, but when I select the last one the value is set to the first unchecked box and so on. HTML Form: if ($row[10]==1) { echo'<input type="checkbox" id="activateExam" name="activateExam[]" ...

0
Q: ucwords for German Umlaute and dash without using setLocale

WernerI need a function in php to capitalize all first letters of a sentence. Normally this can be done with ucwords, but if have 2 problems: ucwords doesn't capitalize german umlaute correctly ucwords doesn't capitalize words after a dash correctly The text input/output is all UTF-8. I tried: fun...

0
Q: How to get the results of a HTML select on to a php script

user792589Hello: I'm new to PHP and HTML What I want to do is simple: I create a combo box (select) using a php script. The options are created from a list of files in the server machine and it works just fine. However I would like to trigger a second script when the user actually selects something. Here i...

0
Q: JQuery + Upload a file via Ajax to cross-domain and get the uploaded image name (or, error response)

user2909624I need to upload a image file via ajax to a external web application, and I used wallform jquery plugin (ajaxForm) and it always gives the same origin policy issue. Even I managed to handle it in server side by setting the error, ajaxForm alwasy return an error though file is uploaded as below. ...

-3
Q: PHP PDO: Call to a member function prepare() on a non-object

AntilogicalOkay, So I have two classes Mission and Database, and I'm trying to access Database's methods from inside the Mission class definition, yet I'm receiving this error: Call to a member function prepare() on a non-object on line 26 I have marked the line where the error occurs. Here is my Mission ...

0
Q: ModelState equivalent in PHP for use with jquery validationEngine

ToniHopkinsAppologies if this is a stupid question but this is my first module at college using javascript, php, jquery etc. The module is web design but we have been asked to include some jquery in it. I decided to use jTable for mine and have been following this example: http://www.jtable.org/Demo/UsingWi...

0
Q: exec mysqldump returns code 127 in PHP

edi9999I'm trying to execute this when I ping a URL: exec("mysqldump -h $host -u $username -p$password $database > $filePath",$output, $code); Howewer, I get a returning code of 127 and the $filePath is created but is a void file. When I execute it over ssh, it works. I have put writing permissions fo...

0
Q: using header location inside switch case

user3086505I have enter code here $CID= $_REQUEST['cid']; $UID= $_REQUEST['uid']; if ( $UID == '0' ) { header('Location: url/you-need-to-log-in-before-redirect/'); } else { switch ($CID) { // go to URL1 case number is the same as CID case "147": header('Location: url'.$UID); break; case "148": header...

0
Q: How to display daily total in this foreach?

fRAiLtY-I've made a function that queries a MSSQL database to get a list of daily totals by rep. I group them into weeks with an ISO week number which then shows the days. At the end of the week I produce a total thus: You can see from the image that each week is separated automatically, then each row...

0
Q: how to convert Object array to array while single value returning

Bhavin Ranahow to convert Object array to array while single value returning , here is the o/p what i am getting while i am getting only one hotel, how can i convert it in a way to access it as a 0th [0] value shown in code. i have problems in accessing when i m getting single hotel in o/p. print_r($result)...

0
Q: Going to cake folder doesnt work

Marc RasmussenI have just recently cloned a cake project. Now when i go to the page localhost/myproject/cake/users/login Nothing happens (no error message) just a blank page! Now things ive tried so far: Made sure that all of my files have read write and delete access (777) Checked that my project contain...

0
Q: How to display custom post wordpress while showing default posts?

user3060132I am trying to display new custom post and the default post as well. How to display both posts(default,my_custom_post) <div id="primary" class="site-content"> <div id="content" role="main"> <?php wp_list_pages('title_li='); wp_nav_menu();?> <?php if ( have_posts() ) : ?> <?php /* Start the Loop...

0
Q: How to call and post xml data on web service in Symfony2?

faisal nasirI am using Symfony2.3. I want to call a web service via my controller class. I want to post and get the data on the webservice through my controller. The data is in XML format. How can I achieve this ? Thanks, Faisal Nasir

0
Q: Query to get data from relational databases in MySQL

TwitchI have this database format below (taken from phpmyadmin, the tables are relational already): I'm trying to get all "videos.Video_Name, videos.Video_URL" with a certain "tags.Tag_Name" via the "tagmap" relational mapping. I've never really used MySQL before for anything more than SELECT's and ...

0
Q: Check if string exists in meta key string using meta_query check in wordpress get_posts function

JoshcOK you would think this is a fairly trivial piece of code, but it is not working. The code below is not broken, it is just not working as it should. Ok, in wordpress I have a custom field in my custom post-type: individual, this custom field has a meta_key of: login_email The contents of thi...

0
Q: Why Session variable unset

Kajal SinghI am using 7digital API in a PHP project. Here is my code to calling API: print_r($_SESSION); $requestUrl = "http://api.7digital.com/1.2/release/details?oauth_consumer_key=" . SEVEN_DIGITAL_CONSUMER_KEY . "&country=$CountryCode&releaseid=" . $wishlistArray[$i]['release7id'] . "&imageSize=33"...

0
Q: PDO prepared statement 'where' issue

user3086601I'm new to PDO and I'm struggling to use the 'where' statement in a prepared statement. Below is the code I tried. It returns Data could not be retrieved from the database. Can anyone tell me what the issue is? Anything to try etc? Appreciate it! $user_id = 1; try { $query = $db->prepare(...

0
Q: How to create divs / tiles from an sql table

user3086555apologies if this sounds noobish, not a lot of experience in web development flash aside, and trying to find the best solution for my project. I have an sql table from which I can echo data like this in my php file: echo "<table border='1'> <tr> <th>username</th> <th>objectname</th> <th>url</th>

0
Q: how to fetch record from model through foreign key in yii

Rizwan Shamsher Kaim KhaniI am new in yii framework. I have three different tables in yii framework. First Table First table is language(id, language_name) // id is primary key. Second Table Second Table is verse(id,topic_id, verse_text) // id is primary key, topic_id is foreign key. Third Table Third table is verse...

0
Q: How to generate Signed URL for google cloud storage objects using PHP

piresashwinThe method i tried using was with openssl $fp = fopen($key, 'r'); //open the PEM file $priv_key = fread($fp,8192); fclose($fp); $pkeyid = openssl_get_privatekey($priv_key,"password"); openssl_sign($response["data_to_sign"], $signature, $pkeyid,'sha256'); $sign = base64_encode($signature) Is...

0
Q: catch the Nusoap error with php

Hansi have a soap problem, this my code: server code : define ( 'WS_NAMA_KELOMPOK', 'MITRA_Pakalolo' ); define ( 'WS_NAMA_WSDL', 'WSDL_' . WS_NAMA_KELOMPOK . '.wsdl' ); $ws_svr = new nusoap_server (); $ws_svr->soap_defencoding = 'UTF-8'; $ws_svr->configureWSDL ( WS_NAMA_KELOMPOK, 'urn:' . WS_NAMA...

0
Q: Nginx passing parameters to a PHP file

Naveen GamageI'm trying to pass all the requests that hits a specific location, to a PHP file with the request URL via Nginx config file, I've almost done this but I cannot pass the URL to the PHP file. I've tried var_dump($_REQUEST); var_dump($_ENV); var_dump($argv); but returns NULL or emtpy array results....

0
Q: Compare document with database

Patrick Akkerson my server i have a folder, named: old_files In that folder there are a couple of 100 documents. I also have a database with an column named "filename" and a column named "transferFlag". Now i want to read out the files in the Folder, compare the names of the files with the values in column "...

0
Q: CakePHP (2.4) Deep Relationship

LapidusI have a database: Companies | Users | Files - ID - ID - ID - company_id - user_id So for my models: Company hasmany User User belongsto Company & hasmany File File belongsto User How can I list al the files belonging to a company? With...

0
Q: How to append div on blind div

user3030853I have three div. how to append div on unknown div. <div class="main" > <div id="drag-box" > <div id="" class=""> </div> </div> </div> I want to append div on unknown div which is come after drag-box div. I don't know which div is come after drag-box div. but one div definitely keep aft...

0
Q: class 'COM' not found, eventhough extention is included in php.ini file

user2761723trying to execute the following PHP code line: $browser = new COM("InternetExplorer.Application")or die("Unable to instantiate Explorer"); eventhough i've added in my php.ini file: [COM_DOT_NET] ;extension="php_com_dotnet.dll" tried everything to solve this.

0
Q: Exact meaning of PHP max_execution_time

user3000292The phrase "maximum execution time" is ambiguous: it could mean (a) the elapsed time since the script started, or (b) the total cputime taken by the script (including or excluding the cputime taken by operating system calls). The very interesting post by kuba here Real max_execution_time for PHP...

0
Q: amfPHP/AS3 - Read database of object

FeFeAs title said, i've a database in .txt that i want to read. I don't know how it's made and what is read inside, i just want to read it and print it with a readable text. The db is read by a flash android application (I've decomipled the .SWF file and the DB is read through the 'readObject' metho...

-4
Q: OPEN A LOGIN FORM ON CLICK OF A LINK

user3045432I HAVE SOME DESCRIPTION TO DISPLAY WHEN USER VISIT A PAGE BUT WHEN USER CLICKS ON A LINK IN THE PAGE WHICH SAYS "login" THEN THAT DESCRIPTION SHOULD BE REPLACED WITH LOGIN FORM.

0
Q: PHP PDO: Cannot use object of type 'x' as array

AntilogicalWhere 'x' is the child class name. I'm dealing with an issue with inheritance, and I'm well out of my depth. I'm getting the error: Fatal error: Cannot use object of type Mission as array class Mission extends Database { protected $mission, $mission_id; public function __construct($id) { p...

 
11:42 AM
0
Q: access element inside object

Mayur Buragohainvar_dump($row_games_query) gives the following- object(MultiCore)#15 (1) { ["_data":"MultiCore":private]=> array(2) { [0]=> object(Core)#18 (1) { ["_data":"Core":private]=> array(2) { ["games"]=> string(5) "1,2,3" ["email"]=> string(8) "2...

0
Q: Is my implementation of the Active Record pattern and overall design correct? (PHP with PDO)

user3086557I am a noob... but I'm trying to find a clean design for a database-heavy project in PHP. I'm using PDO and am trying to follow the Active Record pattern. Find below a sample piece of code to illustrate the design I've come up with. 1 object of class Team refers to 1 entry in my Team table There...

0
Q: insert data from csv file to mysql with php

hansi want to insert data from a csv file into my mysql database with php. But i dont know what i doing wrong. This is my php code if ($_FILES[csv][size] > 0){ $csv_file = $_FILES[csv][tmp_name]; // Name of your CSV file if (($getfile = fopen($csv_file, "r")) !== FALSE) { $data = fgetcsv($get...

0
Q: php soap client returns 404, when calling WSDL methods from HTTPS environment

dskanthI am running a php soap client example under https environment of my Zend Server. I am able to list the methods in the WSDL. But when i make a call to one of those methods, i receive a 404 HTTP not found error. I also tried saving the WSDL to my local drive. Interestingly, the same example was ...

0
Q: Doctrine Many to Many flaws

user3086619I've got following problem and I can't see any solution (even less probable after analysing doctrine source code). The problem is following: I've got two entity classes, let's say Author and Book. My assumption is that one book can be written by many authors, so it will be many-to-many relation ...

0
Q: ZF2 new module run step?

Bikash RanjanI've spent 1-3 hours but I can't resolve my problem to run ZF2 module in my localhost please suggest a solution to as me as I am a beginner of Zf2 I have download https://github.com/takeid/crunchysignup module(but i did not able run) In my configuration of module step Step -1 download from gith...

1
Q: Jquery Working with a DropDown List

MacManI know this has been asked before, but this is a slight variation. I know how to change the selected value of a dropdown using with the selectedIndex or the option value.. $("#colA"+id).prop("selectedIndex", 0); $("#colA"+id).val("1"); But can it be done for the option TEXT. eg: <option v...

0
Q: PHP combine 2 strings

DesignSubwayI have searched around for the answer to this but everything I try gives me an error. I have a php function: function _buildQueryCategoryK2Multiple(){ $query="select id,title,alias,catid,introtext FROM #__k2_items where published=1 and catid=17"; return $query; } Basically I would lik...

0
Q: Magento - Check if category is enabled in template file

Tim CuttingIs there a method of checking if a certain category is enabled from within Magento template files? I only want to show a link to a specific category if it is currently enabled. Something like: if($categoryID(123)->isEnabled()){ // Do something because category ID 123 is enabled... } Appr...

1
Q: removing a complete column and data from csv

user1765876I have exported my sql dump in csv format, so suppose my schema was like name,email ,country, I want to remove email column and all its data from csv. what would be the most optimized way to do that either using a tool or any technique.I tried to load that dump in excel but that didn't looked pro...

0
Q: MongoDB GridFS image not loaded correctly

Dragon5689I am trying to save images to a MondoDB Collection using GridFS. To test this, I made the following: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <?php // open connection $m = new MongoClient(); $db = $m->selectDB('ImageDatabase'); $gridUploads = $db->getGridFS('image...

0
Q: Composer in Codeigniter prevents MY_ controllers from loading

FlobboAfter going through the agony of setting up composer in my Codeigniter project I put this: require_once "./vendor/autoload.php"; into my index.php file. After uploading everything to the server I got the error message that MY_Mainconroller (which is located in application/core) was not found...

0
Q: Magento reindex url_rewrite is not working anymore

Jeroen van der LindenI’m stuck with the following issue in a live Magento store. After i've created new categories for one of my 2 stores (multistore setup), i’m not able to reindex the URL rewrites. I’ve already emptied the core_url_rewrite table in the database, cleared the var/locks folder and tried to reindex, b...

0
Q: Wordpress PHP - replace string with string

DreadlordSo im using Wordpress advanced custom fields, outpit is this: <?php the_field('output'); ?> Output is pure text, it can be: one, two or three. I need to replace output text with image. I tried this example: if string... but its not working for me. I also tried swithc example on the bottom of ...

0
Q: JavaScript not working on PHP but works on html

user2946282I am trying to move my html website to PHP but the menu's drop-down isn't working on the PHP version but does work on the html version but its the same code does anyone know what i'm doing wrong? This is the index.php: <!DOCTYPE html> <html> <head> <?php $cpage = 'index';?> <?php incl...

0
Q: folders created by mkdir() are not accessible

revoI'm using mkdir() inside a foreach loop to create my folders: if (!file_exists($id)) { mkdir($id); } $id could be 529e1f4070b0c Folders are created but when accessing them by FTP or directly from Direct Admin file manager, I encounter No such file or directory, also a 404 Not found page w...

0
Q: PHP create table error 1064

user3086696I am trying to create a table in mySQL. This is my php page below, when I run the page there are no errors but the table is not in mySQL and when I test the code in mySQL I'm getting the error '#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server v...

 

« first day (294 days earlier)      last day (16 days later) »