« first day (259 days earlier)      last day (51 days later) » 

12:11 AM
0
Q: How to choose a certain string out of an array

XeroElixirI was wondering how to choose a certain string out of and array. Say this this is my array: $a=array("What Color is the sky?","How are you?","Can you spell 'the'?"); how would I echo just the first string?

0
Q: Proper way for concatenating 2 or more .js files into one in Cakephp

Lay GonzálezSuppose I have: common.js scriptA.js scriptB.js And suppose that both, scriptA and scriptB require functions that are in common.js Instead of copy-pasting common.js in both files, I would like to send a concatenation of common+scriptA and common+scriptB as used. I don't want to do $.getScrip...

 
12:23 AM
0
Q: Zend framework 2 module routing?

gGololicicI've done a lot of research and before I get into this new project I wan to ask you for opinon of arhitecture I should take. I am creating an application that is build with multiple modules that are not connected and I want to sperate them as modules. They will be developed separately. Now I wa...

0
Q: Sending a certain cell from the database to another PHP page

Poyraz SagtekinI am trying to send a specific cell to a PHP page and deleting that row which contains this specific cell. But it appears I am doing something wrong. This is how I sending the information: echo "<td><a href='delete.php?id= '$row['pid']''>Delete</a>< /td>"; and using it like this: $del = "D...

0
Q: Struggling with this undefined index

Lalien-Miles Lamar ColemanThis has made me feel like a total doofus. I know this undefined index stuff, and I made sure that the name matched the request thingy. But here it is. It's a file upload / registration form and whenever I upload something, it says that it's undefined. I tried switching it to GET, POST and REQUES...

0
Q: Auto-Update Wordpress Posts to generate slugs

Dan JI have bulk uploaded 10,000 or so posts onto my wordpress site, I used SQL query to change all posts to "publish", but the slugs aren't updating unless I do it manually, and I can only do 20-40 at a time efficiently. Is there a way (or script) to auto update every single post using a SQL query s...

0
Q: Possible to manipulate $_POST variable in php script and express it in another php script?

user2251229I've been trying to do form validation without using the url. So I thought that I would create a hidden field in my form and send it over to my validation php script. What I was hoping I would be able to do is set what ever errors there are in the form to this hidden field and return it. However ...

0
Q: Laravel Eloquent Eager Load Constrains

Lucky SoniI am using Laravel 4 and I have this Eloquent query (Which works fine): return User::with(array( 'order', 'order.orderfeature', 'order.orderfeature.feature.featureprice' => function($query) { $query ->orderBy('date_from', 'desc') //Latest price on ...

0
Q: Trying to post a form with multiple fields with same name as an array

Neta Metai am trying to post a form with fields that act like a table entries I think it would be best if i give an example: <form method="post"> <table> <tr> <td><label>Name:</label></td> <td><input type="text" name="appsDetails[name]" placeholder="Enter name" value...

0
Q: How can I have google maps API refind the longitude and latitude when place_changed is not activated?

David MckeeIn my web app, I give the user the ability to go back and edit the information that they entered. However, for some reason when they resubmit, the locations latitude/longitude does not recalculate. This happens when they don't change the job location. Is there a way to make google maps find th...

0
Q: This specific PHP function is taking 15 seconds to calculate. What part of it is causing the lag?

CanerI know this may look very specific but I'm new to PDO database connections and I had to rewrite this component. I used Php microtime to check what part of my code was slow to load and it narrowed down to the function below (called from a class file). Can you help me figure out what is the ineffic...

0
Q: submitting php form with ajax

Dan wscript in my header: <script> $(function () { $('form#ratingsform').on('submit', function (e) { $.ajax({ type: 'post', url: '/dev/scripts/ratevideo_vibrary.php', data: $(this).serialize(), success: function () { alert('form was submitted'); ...

0
Q: Prevent form resubmission

Qassim Hassan QdevPHP Prevent form resubmission After a user submits a form, and they refresh the page, it asks if they would like to re-submit the form. Is there anyway I should be structuring my code to prevent it? or is it something else? For the the record, it’s primarily for anti spam purposes. My php cod...

0
Q: Popover is not working

elLI have list of data in a table and provided a popover. Like when the pointer hovers to that image, it will pop the body of that data. It was working before I separated that view. I'm using yii by the way. This is my code for the table: <tbody> <?php foreach ($page_data['data_list']a...

0
Q: Making a form sticky from database values in php using functions

CodingtonI am having a problem figuring out how to make my form sticky. I made two functions one to populate a dropdown list and another to populate a radio button list. The names and values (I am using the power of two approach for a search page) come from a database. I can't figure out how to make the s...

-1
Q: How do I make a post answer non-caps sensitive, or have multiple answers?

XeroElixirHow do I make a post have multiple answers? And it would also be helpful if I could figure out how to make it non-caps sensitive. Here is an example: $a = "What is the color of the sky?" if($_POST['ans'] == "blue") { echo "Correct!"; } form: <form method="POST" action=""> <input type="...

0
Q: php is it possible to determine if a constant is user defined?

mysql_noobie_xxxxI know that in general I can check if a constant is defined with the following: defined('MY_CONSTANT') defined('PHP_EOL') The first one is my own user-defined constant. The 2nd one is created by php. Both can be checked with defined() and return a boolean value. My question is.. is there a w...

0
Q: How to use curl with php

aavHow do i use curl to get this website response, i need to get the website response from this website. <?php $ch = curl_init(); // set url $qry_str = '?dores=true&includeKeywords=facebook'; $cURL = 'https://accounts.clickbank.com/mkplSearchResult.htm' . $qry_str; curl_setopt($ch, CURLOPT_URL, $cU...

0
Q: PHP include path for subclasses

Christopher FranciscoI'm having an issue with the include/require path. Since the code style is OOP, the problem comes when subclassing, since the path is relative to the first includer file. For example: // path: /class/entity/A.class.php class A { /*definition*/ } // path: /class/widget/B.class.php require_once(...

0
Q: Foursquare venues search optimization

JonathanI have a search API call for Foursquare venue/search, and it takes around 4-5 seconds. I'm using PHP and library PHP-foursquare PHP-foursquare. As for parameters, I'm using bounding box as sw and ne points, and for "intent" I use "browse". I would appreciate any suggestion to make it faster tha...

0
Q: Scrape longitude and latitude from this html using preg_match

Ben PatonI'm trying to use a regex to extract just the longitude and latitude coordinates from this html. <div class="coordinates"> <i></i> <strong>Latitude :</strong> 46.369384765625<strong>Longitude :</strong> 2.56929779052734</div> </div> This is about as close as I can get at the moment: p...

0
Q: Customizing the text output by the WordPress function human_time_diff()

henrywrighthttp://codex.wordpress.org/Function_Reference/human_time_diff I am using human_time_diff() to output relative dates on WordPress posts. e.g. echo human_time_diff( get_the_time( 'U' ), current_time( 'timestamp' ) ) . ' ago'; This will output something like 34 mins ago How can I change the w...

0
Q: IE 10 (W7) doesn't like my JQuery

M.SidimI was asked by someone on stackoverflow to post an example of a problem I was having concerning using IE, by creating a new thread. As an issue arose from the other post that required a new thread. For those of you joining in to see this post, the problem I have is whenever I use JQuery and even ...

0
Q: Cannot insert into mysql table - mysqli error not working

FahadI'm trying to insert some data into a mysql table but the process doesnt go through and I get nothing printed for the error and I get Notice: Trying to get property of non-object in. I don't think I'm outputting the errors correctly. Looking at php.net it seems like I'm doing the error handling p...

0
Q: Remove CSS & JS files from Wordpress Main Page For Increase Pagespeed?

muhammad usmanWith the reference of wordpress load plugin css/js in functions.php w/ conditional tags answered by @maiorano84 i am using cforms, FancyBox, WP Page Numbers plugins for Wordpress. From Page Speed point of view i want to remove CSS and JS of these plugin's from all pages except single post page....

0
Q: Want to tinker with a woocommerce shipping distance plugin to allow me to calculate road miles.

Charlie Tupman I have every piece of the puzzle except how to insert the shipping postcode into my function. I get the base postcode by using: function get_base_address() { $address = $this->get_option( 'base_postcode' ); return $address; } Then I try and get the normal postcode the s...

0
Q: how do I use multiple databases to update multiple contents in rows

jihdehI am trying to use 2 different database to make actions, like I have three buttons approve,disapprove or retract which outputs the contents from a database. But if I click on any of the buttons it updates only one row. Here's d code: require '../../includes/databases/acctdb.php'; ...

0
Q: In Codeigniter, how to make controller run index() without having to write /index in url?

PrinceEnderI'm setting up my first personal codeigniter project and my .htaccess file is this: <IfModule mod_rewrite.c> # Turn on URL rewriting RewriteEngine On # If your website begins from a folder e.g localhost/my_project then # you have to c...

0
Q: PHP Mailer Fatal error: Class 'SMTP' not found

fooNot sure why I am getting this fatal php error because all my files and classes are setup correctly. Any help would be greatly appreciated. contact.php is here: <? session_start(); if (!isset($_SERVER['DOCUMENT_ROOT'])) { $_SERVER['DOCUMENT_ROOT'] = substr($_SERV...

0
Q: Magento add sub-menu to menu item in the navigation bar

Les JohnstonI have the following code in pop.html and I would like to add a sub menu under "contact us". I cant seem to accomplish this. I first edited my index.php home page which works fine, but when I go to magento store home pages the sub menus need to edited differently. I'm a bit of a novice and if ...

-3
Q: Storing Data to HTML Table without using a database in PHP

monnix please help me find codes in this matter... Thanks so much...

0
Q: Tokenize and Match using PHP

Kimjue Sooni would like to token a single Malay affixes word and match it with the word in my database. That Malay word is a user input data. so i would like to checker either the word input by a user either correct or not by match it with the word in my database. if it is wrong then we give them exactly a ...

0
Q: Stuck trying to link image in table cells to sql record

Jay Jibo'lekan Hamzai have created a table in html, in each cell i would like to link the image in it to a record in php but i'm a bit confused about how to go about it please help. <td> <?php $con=mysqli_connect("server","username","password","db"); $sql = "SELECT imgurl FROM Workshop_products WHERE id=XXX"; $res...

0
Q: Register form do not execute all code

LegarndaryI'm new to php, so i have a hard time finding my errors, and this one i simple can't find. the code i have simply don't register the user on submit, i have no qlue why it don't perform the last bit of code. Any suggestensions? <?php session_start(); ?> <!doctype html> <html> <head> <meta chars...

 
1:47 AM
0
Q: Creating a SQL INSERT from a CSV file w/ parsing

user2690363I would like to create a SQL INSERT query with a large CSV file I have. The problem is the names are not parsed out. They are listed as "John Doe" or "John B Doe" instead of "John" and "Doe" because I differentiate between first and last name (I am not concerned with a middle initial). Another ...

0
Q: How to parse a multiple choice problems and solution into an array format?

jack97For example, I have something like The study of standards for what is right and what is wrong is called _. a. pure science b. applied science c. ethics d. technology ... unknown number of choices ... ANS: C and I want to split it into ['The study of standards...

0
Q: Cakephp SQL error with join and fields

Testounet TestounetI'm creating a website and during the development I changed the database system from mysql to postgresql. Everthing seems ok now except when I want to join a table (or several) in the following way (without hasMany, hasOne, etc): $this->find('first', array( 'joins' => array( array( ...

 
2:05 AM
0
Q: Magento: Custom Customer Fields in checkout

David SarmientoI've succesfully managed to add custom fields to the customer. However I need these fields to show up in onepage checkout. I've overridden Mage_Customer_Block_Widget_Name and created my own customer/widget/name.phtml, added the attributes in the sql/xxx_setup/installer-x.y.z.php (added them to ...

 
2:23 AM
0
Q: How to use regex to grab URLs and then echo URLs from website?

JasonJust for fun, I'm trying to code something that will scan a website for YouTube URLs and save them. The URLs will not be within tags so I need to use regex. I have that part down. But how I do go about echoing the URLs from an array? What I have so far: <?php $website = file_get_contents('http...

0
Q: PHP MYSQL GET RECORD IN BETWEEN

user2954757here's the query: Select Clock from ras_attrecord where (Clock like '%2013-05-01%' and (Clock >= '2013-05-01 18:00:00' or Clock <= '2013-05-01 18:00:00')) order by Clock ASC the results are : 2013-05-01 09:00:00 2013-05-01 14:30:00 2013-05-01 17:30:00 I need to get the "2013-05-01 14...

0
Q: How to check if a user uploads a file to the server and use a dafault file if not

Jben KayeI have a code which allows file upload. (And uses it in an imagecreatefromjpeg). It throws an error handler when the user does not upload a file and forces him to. Now i want it to check if a file has been uploaded or not. IF THERE IS, IT WOULD USE THE UPLOADED FILE.IF NOT IT SHOULD USE THE DEFAU...

0
Q: Error iframe not scroll in Chrome when using facebook comment?

haitruonginfotechI added iframe facebook comment, in Firefox is scroll, but in Chrome is not, How to fix it ? <iframe src="https://www.facebook.com/plugins/comments.php?api_key=172666652872245&amp;channel_url=https%3A%2F%2Fs-static.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D27%23cb%3Df3a81f3cfd7ece2%...

0
Q: Can we import posts directly into Wordpress database?

user2081323We published a daily blog starting in 1998, almost before the word "blog" was invented. We had static pages set up in a folder structure, but /year/month/date/index.shtml + content here We switched to Wordpress in November of 2008 and are now scraping the archives 1998-2008 and converting to JSO...

0
Q: Checking cookies on other pages

Timothy BassettI am having trouble setting and checking cookies in PHP. What I would like to do is set a cookie on one page and on another page, check to see if that cookie exists. On the first page, I set the cookie using: setcookie ("conversionChecker", "anything", time() - 3600); and on the 2nd page, ...

0
Q: in Google Chrome, there appears to be an issue with using a form processor to process javascript-created Select menus

Gus MuellerMy code takes a series of form items and, using cloneNode, it replicates them and assigns new names and ids to the new copies of the form items. These new form items are then visible on the page. I can then type in some text into a text input or use dropdown menu (a select menu) to select an op...

0
Q: echo php javascript alert?

Anaes AriasHow can I echo this javascript if the php error messages is called? I have an error message setting that when a user misses his username or password it triggers an error message. The php error message is called by a php code. Here is the code: <?php echo showmessage($msg) ?> I have an alert ...

0
Q: Issue deleting rows in SQL of type varchar

pixandpugI am trying to create a form that will delete a row in a table based on the attribute a user selects from a drop down list of options. For some reason the first option, (attemptid) which is an int, works, but the other three (which are varchar) do not. The error handling I have set up to debug th...

0
Q: HTML5 Geolocation api with direction arrow

user2605793I am building a simple PHP based off-road navigation webpage for use on a smartphone that will display two icons on a Google map, one being my my current location and one my destination. As I move, the position of the icon for me will automatically update. Sample code to do the basic stuff incl...

0
Q: MySQL pivot tables - covert rows to columns

user2723490This is the structure of my table: Then I run a query SELECT `date`,`index_name`,`results` FROM `mst_ind` WHERE `index_name` IN ('MSCI EAFE Mid NR USD', 'Alerian MLP PR USD') AND `time_period`='M1' and get a table like How can I convert "index_name" rows to columns like: date | MSCI EAFE...

-4
Q: how to send money paypal using php code like this?

robertthis code is automatic refund paypal code click here i want to get automatic send money paypal code like above, how can i do ?

0
Q: If $var is empty dont work?

CyborgI run this code: <? if (empty($map)) {echo '<br />'; } else {echo $map;} ?> The problem is when the $map is empty it don't do <br /> I have tried this 2 methods to see if $map is really empty: echo $map; // It results empty and noting is shown on page. var_dump($map); // It results...

1
Q: How to resize an uploded image before using it in an imagecreatefromjpeg function?

Jben KayeI have a code that allows file upload and some text input. It uses the uploaded file in an imagacreatefromjepg and imagecopymerge. I want to resize the uploaded file to a definite size which is 255x175. how can i make it? Here is what is have: $now = time(); while(file_exists($upload...

 
3:09 AM
0
Q: Problems Using Class Library - Need to include directory of files

Jennifer BornI'm trying to use the following library, but am having SO many problems! v1.1.1 https://github.com/triplepoint/php-units-of-measure/releases <?php require './PhpUnitsOfMeasure/PhysicalQuantity.php'; require './PhpUnitsOfMeasure/UnitOfMeasureInterface.php'; require './PhpUnitsOfMeasure/UnitOf...

-2
Q: How to get dates in betwwen mysql

user2954757Table : ras_attrecord Field : Clock (date time) Table : staff_shift Fields: startdate (datetime), enddate (datetime) Scenario In my table there are multiple records of Time In and Time out. In order to get the timein, it will depend on the staff shift. for example, my shift is 2013-11-05 09:0...

 
3:27 AM
0
Q: Joomla - Force File Download / CSV Export

lautaro.draganI'm in need of help... this is my first time asking a question in SO, so please be kind :) I'm trying to force-download a file from php, so when the user hits a certain button, he gets a file download. The file is a csv (email, username) of all registered users. I decided to add this button to ...

0
Q: Change static nav menu to wordpress dynamic menu

DunkeyI'm trying to convert my static nav menu to WP dynamic nav. This is what I've got: <nav> <ul id="menu"> <?php $pages = array( 'index.php' => 'Home', 'services.php' => 'Services', 'sitemap.php' => 'Calculators', 'about.php' => 'About' ...

0
Q: error in Login php

Mohamad Noor Qusyairi Manlanit's said error..cannot login.. the username,password was exist in my database... this is my base.php code ?php session_start(); $host="localhost"; // Host name $username="root"; //Mysql username $password=""; //Mysql password $db_name="kuih"; // Database name //Con...

0
Q: Linking each text word or words divided by comma into an existing URL?

MezelderzI am trying to auto add each word or words divided by comma into an existing url. I have url lets say http://stackoverflow.com/search?q=HERE IS THAT TEXT. I have this function: function movie_cast( $atts, $content = null ) { return '<div class="movie_cast">Cast: '.$content.'</div>'; } add...

0
Q: Submit button from shortcode reloads page

neanderslobI have a problem that is a bit tricky to describe so please bear with me. I have a function in a wordpress plugin that populates a particular page. Within that function is a short-code to access another plugin. That other plugin produces a calendar on the page with a few buttons. (With me s...

0
Q: ORA-01036 oci_bind_by_name illegal variable/number

user2954863I have been trying to get this function to work, for context it is meant to be a session fetcher for my online store. It keeps erroring out on the oci_bind_by_name line. I was wondering why this is the case and possible solutions to this problem. function getSessionID($customerID) { global $...

-1
Q: How to creat 2 hour Blocks of schedule

thangHow to creat 2 hour Blocks of schedule. Example: Enter 8:00 -> 22:00 Show: 8:00 -> 10:00 10:00->12:00 .... 20:00 -> 22:00 . Please help me, thanks.

0
Q: How to implement Follow board feature on pinterest

user2954876we are developing a website similar to pinterest.com and i am a bit confused as to how to implement follow board feature that pinterest has in our website. We are developing webpage in PHP. I appreciate if you can help me with this or tell me the place where i can get help. Thanks in advance

0
Q: How to add a jQuery validation plugin in to zf2

ShenCan we add them into the layout.phtml? How can we initialize the validation object?

0
Q: mysqli_real_escape_string() isn't functioning properly

kaiserphellosI have the following PHP function: public function signup() { $mysql = mysqli_connect(HOSTNAME, USERNAME, PASSWORD, DATABASE); if (mysqli_connect_errno($mysql)) { $this->viewModel->set("pageTitle", "Signup"); $this->viewModel->set("message", "There was an ...

0
Q: php foreach loop & associative array

KozbotI have a code that gives me exactly the right output, but I keep getting errors during the process, and I'm not allowed to use @ to stop the errors. :( $som = ''; foreach ($prizeStr as $som=>$ptext) { $Cloth = $AssocArr[$som+1]; //doing something else here etc... } I have an array of prize mon...

0
Q: Not getting an array as result (calling a webservice by AJAX-JSON)

PasargadI'm trying to get the result of my web service as an array and then loop over the result to fetch all of the data; what I have done so far: In my web service when I return the result I use return json_encode($newFiles); and the result is as following: "[{\"path\":\"c:\\\\my_images\\\\123.jpg...

0
Q: PHP Mail sending to external e-mail addresses but not internal

user2954893Started off with e-mails not being sent at all, but then I used the "-f" parameter in the function, which then works to send to external addresses (Gmail and Hotmail tested so far) but it won't work for addresses that are on the domain though.

 
4:08 AM
0
Q: wp_enqueue & youtube API on different templates

vytflaI'm trying to use the youtube API on two of my template pages. Obviously I want to enqueue it correctly. When I put this code in my footer.php page, I got it to work: <script type="text/javascript" src='http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js'></script> <script src="http...

0
Q: using Document.get elementbyid

Kiran RSSubject:- VAlidation is not working by using document.get element by id. I have the following javascript code in my page. <script type="text/javascript"> function validate(){ var name=document.getelementbyid("send"); if(name==""||name==null) { alert("Please enter your name") return false;...

0
Q: Returning more then one row from DB

Jess McKenzieAs you can see in my code below I am using ->row()->$db_field;. I somehow need to manipulate this so I can return $db_field and $db_field1. What do I need to do to be able to return both rows? Code: if ($query_country->num_rows() > 0) { return $query_country->row()->$db_field; }

0
Q: How to show invisible buttons after clicking on checkbox in php?

Sumit RathoreI am using php to connect to a database and show all rows of a table as a table on a webpage. Now what i want is to have a checkbox and a hidden button in each row so that when i click on a checkbox in a row then corresponding button of that row become visible and when i click on that button the...

0
Q: Executing Python Script with PHP Variables

MicahI am writing a simple application that uses information from a form, passes it through $_POST to a PHP script that executes a python script and outputs the results. The problem I am having is that my python script is not actually running with the arguments being passed in. process3.php file: <...

0
Q: Php reading Foxpro DBF file

Georges C ZinhoI need to do a record search and display in a Foxpro dbf file using PHP. My dbf file name icitem.DBF, i am using ODBC and OLEDB methods but both return errors. Method 1: I manage to install the foxpro ODBC driver and create a system DNS, below is my php script and output. php script: $odbc = o...

0
Q: PHP writing into text file while looping

sravisI'm developing an app where user upload excel [.xlsx] file for dumping data into MySQL database. I have programmed in such a way that there is a LOG created for each import. So that user can see if there is any error occurred and etc.. My script was working perfectly before implementing the log s...

0
Q: Zend Framewrok 2 return ViewModel not working

yunhasnawaI created a Zend Framework 2 admin website based on Zend's Album example. Everything works in HomeController which is acted as my default controller. However when I created another controller, the view won't loaded. This is my code in indexAction. class UserController extends AbstractActionContr...

-2
Q: How to better scrape YouTube URLs from site?

JasonI'm trying to get a list of YouTube URLs by scraping the URLs from a site where people generally post them. I enjoy the content posted so I'd like to automate it and watch the videos later. It's just something fun I'm trying. Here is what I have so far: <?php $website = file_get_contents('http...

0
Q: GAE php "urlfetch error"

user2954939i want to get a webpage content via my gae php application. but the code doesn't work. my code is: echo file_get_contents("http://www.navyfield.com", false); and i tried my code on php-minishell,http://php-minishell.appspot.com/ it didnt work either. here is the result Google App Engine/1.8...

0
Q: Grails, how to fill a form from database?

user2954933i'm doing a Grails app for school but i'm having some trouble. What i need to do is, (form a DB called students) fill a form with: ID (user will provide this one) Name (from DB) Specialty (form DB) i don't really know if this can be done whit this: Filling a form in JSP with ajax thank you in...

0
Q: Getting radio selection in PHP returns on not the value

user2954911I am trying to get the value of the selected radio button using php. But when I try to echo the value of the radio it returns 'on', no matter which radio button is selected when I submit the form. HTML: <legend>Question 2</legend> <p>Where was CoffeeScripts first stable build announ...

0
Q: PHP can't pick up file

AndrewI've been trying to create a registration form that requires students to upload documents at the very end. However, after picking up the form values via jQuery, the PHP document can't seem to pick up my uploaded form. Any ideas? Form: <form id="joinUs" enctype="multipart/form-data" method="p...

0
Q: How can I use inheritance with PDO?

NicoI need to build a microframework. I have a generic model where the real models would inherit from. How can I inherit a sql query like "select * from table_name" using pdo knowing I can't bind the query's table name? I hope I've explained myself, thanks.

0
Q: Can I used memcached selectively?

OC2PSHow does memcached really work? If I have 5 different Percona MySQL databases d1, d2..d5, each serving a different PHP application a1, a2..a5 respectively, then can I just try to boost d1 with memcached? I understand that memcached changes a lot and that in order to use it, I'll have to "tweak...

0
Q: Showing fatal error call to undefined function _e() in wordpress

MelvinPlease help me out I have added a search box widget to my site http://www.immostwanted.com. And when I am trying to search some item it is showing the error as Fatal error: Call to undefined function e_() in /home/spencerj/public_html/immostwanted.com/wp-content/themes/proreview/search.php on li...

0
Q: PHP OCI error oci_bind_by_name

LireoecI have been trying to get this function to work, for context it is meant to be a session fetcher for my online store. It keeps erroring out on the oci_bind_by_name line. I was wondering why this is the case and possible solutions to this problem. function getSessionID($customerID) { global $...

0
Q: aligning images and its details side by side in shopping cart

user2934937I am developing a shopping cart. In the first page I have to display all the items.I have to display item's image,price and a link to vie about its details.I need to display the items and its details side by side. Just like online shopping cart sites. Can you please help me. I don't need a slider...

0
Q: Add 'textarea' Field Product Opencart

Ashish VermaI need to add a custom field 'textarea', same as Description with CKeditor in products. Steps I have followed: Created a column 'contents" in product table through following sql command: ALTER TABLE `product` ADD `contents` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ; File: a...

 
4:56 AM
0
Q: Ajax how to disable div or item

user2434677Im new to ajax, is there away you can help me, how to disable all items once click is successful: here is my code for ajax: if (!parent.hasClass('.disabled')) { // vote up action if (action == 'click') { alert("test"); }; //how do i a...

0
Q: Studio is not working in Sugar 7.0

user2955009I am newbie to Sugar 7.0. I am trying to open Studio but studio is not working, it only display the nothing. I have searched alot, but not found any solution. Can any body tell me that whats the problem with Sugar7's Studio ? Thanks

0
Q: sending checked box values to php script to process via jquery

saintI have a table with four columns with a checkbox at the end of each row. I would like to know if there is a way of writing a jquery function that will select all the values of each row when the check box has been ticked and the submit button has been clicked.. and then pass the values to .php fil...

0
Q: How to get etra json data from the server using JQueryUI autocomplete after selecting an item

user2944805after selecting an item on the returned results, how do i alert another item from php? here's plugin settings. $(function() { $( "#SearchInput").autocomplete({ source: '../Search/BP_Search.php', minLength: 1, autoFocus: false, select: func...

0
Q: PHP Login Page Redirect

user2896254this code is incomplete and I need it to redirect to a page called mainpage.php with hardcoded information for the username and password. Here's the code. <?php session_start(); $username="user"; $password="123"; if($_POST['username'] == $username && $_POST['password'] == $password) ?> <html> ...

0
Q: Php not parsing new line in variable obtained from GET request

user2954995I am writing a plugin in which I need the user to be able to download a csv created on the fly (I don't want to use up server space). I have the text I need to print to csv pinted in a hidden element in a form, which I then echo and create csv using fopen and fclose. The problem is that new line...

0
Q: JSONException:Android Can't connect MySQL and PHP

George EdwardJAVA Code: ![protected String doInBackground(String... args) { // Building Parameters List<NameValuePair> params = new ArrayList<NameValuePair>(); // getting JSON string from URL JSONObject json = jParser.makeHttpRequest(url_all_products, "GET", p...

0
Q: Send Javascript variable to PHP to be saved to DB

user2872697Hi I am new to PHP and javascript, am unable to send a variable from Javascript to PHP page. My Javascript code is separate .js file where I have declared a variable count which incremented at each correct answer that user gives. I wanted to pass this data to PHP page so that I can save it to dat...

0
Q: php mass mail get blocked by gmail

shanavasWe want to send mail to our 5000 users about their account details every day We are using php CodeIgniter mail function to send mails with loop Now our users especially gmail are not receiving mails, We are getting mail logs as gmail has temporerly blocked our ip Someone please help me how We c...

0
Q: how to connect to different ip address using php socket programing

Rincy Raphaeli am running wampserver in one system and its ip address is 172.16.127.105. i took this as my server and run the server program server.php as { // set some variables $host = "172.16.127.105"; $port = 25003; // don't timeout! set_time_limit(0); // create socket $socket = socket_create(AF_IN...

0
Q: I need to match all characters in a group as long as they don't match a certain word

Fred GarbuttI'm not sure if this is a simple question, but i have been unable to find an answer to it thus far. I am trying to write a regular expression that pulls apart a .docx file and matches replaces all <w:tab /> tags with <w:ind /> tags, as the <w:tab> tags don't seem to preserve tabs correctly when t...

0
Q: multiples INSERT INTO SQL and PHP

user2955030$DEVICE_REQUEST_ARRAY = $_POST['DEVICE_REQUEST']; foreach ($DEVICE_REQUEST_ARRAY as $value_set) { foreach ($value_set as $key=>$request){ echo $key ." ".$request."<br/>"; $query = "INSERT INTO master_request_devices ( '{$key}'...

0
Q: who does PHP's YIELD->send() works?

learning phpfunction yielding() { for ($i = 0; $i < 10; $i++) { var_dump(yield); } } $y = yielding(); foreach ($y as $val) { $y->send('foo'); } output: string(3) "foo" NULL string(3) "foo" NULL string(3) "foo" NULL string(3) "foo" NULL string(3) "foo" i expected the output to be: 1...

0
Q: RegEx to process and change multiple links in a string

marcnycI am having a hard time figuring this out: I have a string ($data) which contains some links formatted this way: [pagelink]Folder/File[/pagelink] The $data contains multiple of these links. I need to replace these links with actual html links and I have this code to do it (which works): $da...

0
Q: how to show square root symbol in php code using gd library?

Kiran RSI am now dealing with a mathematical problem with my codes. I have second degree equation , for example , ax^2+bx+c=z . If we have to find the value of 'X', we have the eqution , x=(-b +/- root(b^2-4ac))/2a. The main heaach is i've to show the square root symbol in image using gd library. But i...

0
Q: The appropriate way to securely use flash in webpage

Thanos DarkadakisI will start with an intro to prevent you making specific questions. Introduction I have no idea about flash programing. What i do know, is that when i browse a page that contains a flash object, i can somehow save it in my computer. I just want to know (before i start learning flash coding) if...

0
Q: Internet Explorer cannot display drop down menu properly

niaizahraWhen i run my project in IE8 my drop down menu in navigation bar seems not working properly as in Chrome and Firefox. Its appear in bullet forms that line in the left side of the page.See the image below. This happen when i try to alter the URL of my existing website. I put all my php file ins...

0
Q: PHP special names - simple explanation needed

cactusboatCan someone please explain how i would answer the questions below, simply, so I am able to work it out myself. I have the questions together with their answers at the bottom. Consider the following code and complete the incomplete entries in the table: <?php class Employee { ...

0
Q: Extend ModuleAdminController Add/Edit not working

Amb3rL4nnSo this seems really dumb question maybe and basically a text book implementation. But when using the Add/Edit buttons created by the renderList() the submitted fields are empty. I have gone into the core ObjectModel class and output the results and indeed no data is passing back. From what I ...

 
5:38 AM
0
Q: php form post not sending email

Michael McLaughlinSo I was able to get the user all the way to the thank you page, but when I check my email (which is correct in the real code), I had nothing. any help would be appreciated. <?php $myemail = "myEmailInAString@gmail.com"; $name = check_input($_POST['full_name'], "Enter your name"); $phone = che...

0
Q: Why does php md5() always different from python's hash.md5() if using chinese character?

ruibinhere is my php code: $str = '你好'; $input_encoding = mb_detect_encoding($str, array('ASCII','GB2312','GBK','UTF-8'), true); echo sprintf('input encoding:%s', $input_encoding); $str_gb = iconv($input_encoding, 'GBK', true); echo sprintf("utf8 encoding:%s\n", $str); echo sprintf("gb encoding md5:%...

1
Q: PHP Class not echoing properly

TrauliaSo im in the process of learning php and classes is giving me trouble here, this code if im not mistaken should echo out Blue and Dusty but for some reason it is sticking to the default green <?php class World { public $color = 'green'; public function __construct($color) { $this->$colo...

0
Q: Passing PHP session to different folder

user2955076how do you pass a PHP session value to different folders? I have this index page in the localhost. localhost/index.php <?php session_start(); $_SESSION['Username'] = 'Hello'; header('Location: ../AnotherFolder/index.php'); ?> In here, I want to echo the $_SESSION['Username'] on other s...

0
Q: php's FINALLY is for Uncaught exception?

learning phpFor what is can see, the only difference between putting code inside finally block and outside finally block is that the code inside finally block will be executed when if there is an uncaught exception while code after try-catch-block that is not inside finally-block will not be executed. am i c...

0
Q: Php syntax error confusion

jayadevkvI have been using php simple image libraray for image manipulation quite a while(and never come across this error before). Now the script stops throwing a syntax error when the code is put online and there is no error occurring in the local server The error that shows: **Parse error: syntax e...

0
Q: yii grid does not follow page size

EnricoI have this typical search in yii. All works well except that the grid view does not display all the results. the headers says "Displaying result 1-2 of 6 results" although the page size in dropdown is set to 20. here's my dataprovider public function search() { // Warning: Please modify ...

-1
Q: How to center username and password textbox

user2896254I'm trying to get the admin login to center in the middle so that it looks better, here's the code. <?php session_start(); $username="user"; $password="123"; if(isset($_POST['username']) && $_POST['password'] == $password) { header("Location: mainpage.php"); } else { ?> <html> <head> ...

 
6:08 AM
0
Q: PHP include statement different between servers

tPlummerWorking on a win2009R2/IIS7 server, this php include statement was valid: include('/path/file.php'); Moving over to a shared Linux CPanel server, it is not. I have to instead do this: include('path/file.php'); When I first wrote the code, I was under the impression that the opening / meant...

-2
Q: I am getting error Can't connect to MySQL server on 'Host ip address' (110)

RedSunI am getting error "Can't connect to MySQL server on 'Host ip address' (110)" I am using FileZilla Client and phpmyadmin

0
Q: SwiftMailer Help - PHP Contact Form w/ File Attachment

712JeffersonTrying to do something seemingly very simple: write a script for a contact page that allows the user to input a few basic lines of info, attach a file and e-mail it to a fixed address. My, how this has turned into such a headache! Here's the page in question: http://www.starcrestescrow.com/form...

0
Q: Remove .php extension is not working

UserProgI found a lot of tutorials and questions regarding to removing the .php extension in the URL. I have tried a lot of examples and until now it is still not working. This drives me crazy. I also want to put trailing slash at the end of the URL but first I would like to achieve this first. Currently...

0
Q: no-www url for sub-directory/sub-domain

Raj ツSay example my domain is http://www.domain.com and i wanted to redirect into no-www url (http://domain.com), for that i used this code in .htaccess RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] It's working fine http://www.domain.com redirects to http://do...

0
Q: how to use javascript in php when there is a header?

mishir.aliif(($row["status"])!="valid") { $stats=$row["status"]; echo "<script type='text/javascript'>"; echo "alert('Your Status is $stats..Please Try Again Later...');"; echo "</script>"; header ("location: index.php"); } it is a part of a php code. if i use // before header, javasc...

0
Q: i m having caution of Deprecated: Function eregi() is deprecated in url code

saiyyedfardeenhttp://fastseoindia.com is my site... on below link http://fastseoindia.com/tools/robots-txt-checker/ when you insert your website link... it will show you your site's robots.txt but will give error on top... Deprecated: Function eregi() is deprecated in /home/hjlhvqyy/public_html/fastseoi...

0
Q: Php doesnt execute when coming from window.location

user2509768I have a php file named "savegame.php". I use xampp. When i enter "localhost/morabaraba/savegame.php" as a url manually it works i have a file "index.html" in the same folder as my "savegame.php" file and using window.location = "savegame.php" redirects to c:\....\morabaraba\savegame.php but it...

0
Q: I want to select record multiple key with like

shaktiI want to select record from table with key.My code is working but it's not select all record regarding Php and Mysql it select only PHP,Mysql record. My code is $skill=PHP,Mysql; mysql_query("select * from tablename(skill) where fieldname(key) like '%$skill%'");

0
Q: Heroku Scheduler and PHP

PoochI have seen many instructions using Heroku Scheduler , but none explain how to use PHP with it. Would anyone have a good example of PHP being used with the Heroku Scheduler? I don't want to be pointed to something that isn't with PHP, since all the replies i saw to similar questions did not show ...

0
Q: Postgresql 8.3 "shadow user"?

MuhvI have currently online working system (SunOS 5.10 i386/PostgreSQL 8.3). Now i need to create new "shadow" user who has read-only access to same data as working system from other server (Ubuntu/PHP). netstat shows that postgres listens all netw. interfaces. Unfortunately I dont have any experie...

0
Q: Echo to another page

user2896254How do I get the input from this textbox to show up on another page called mainpage.php. Here's the code for the form that I want outputted onto the mainpage.php <form action="" method="get"> <b>Bio</b> <br> <textarea rows="5" cols="20" name="result" value="result"></textarea> <br> <input type="...

0
Q: Fatal error: Call to a member function prepare() - On call function more one times

user2594631I have a problem on call this function more one times Index.php <?php function check_status($id){ require_once ('inc/connect.php'); try { $query = $db->prepare('SELECT `usage` FROM `room` WHERE `id` = :id'); $query->execute(array(':id' => $id)); $row = $query ->fetch(PDO::FETCH_NUM); }catch (P...

0
Q: PHP Email Pixel Tracking Not Firing in Yahoo Mail

MicahIn order to track email open rates, I'm firing a pixel in a mass email I'm sending from my server. The script is working in Mac Mail and Gmail email clients. The email is received and the pixel is downloaded. However, it's not working in the Yahoo mail client. The email is received, however the...

0
Q: Preg Match checking in PHP

WarriorI have pattern like this 'D34566'. how i can check this pattern contains in the given string. String = D34566-Test Case. Pattern = D followed by 5 digits. i.e A word starting with D and followed by 5 digits.

0
Q: any way in PHP to access the KEY of YIELD outside FOREACH?

learning phpIs there a way to access the KEY of the YIELD or it is acceptable only through foreach loop? function foo() { yield 'bar' => 'baz'; } $foo = foo(); foreach ($foo as $key => $val) echo $key; // output: bar $foo = foo(); echo key($foo->current()); //Warning: key() expects parameter 1 t...

0
Q: mail gt marked as spam by gmail, any solutions?

Rickyi am using php code to send a mail with an attachment in my web application. all are working fine expect gmail marked it as spam. my code is look like below. move_uploaded_file($_FILES["file"]["tmp_name"],$path . $_FILES["file"]["name"]); $filename = $_FILES["file"]["name"]; ...

0
Q: English to Arabic conversion in buddy press

Kiren SivaI want to translate English to Arabic in wordpress (buddy press). In php $reason = __(sprintf("Wave limit has been exceeded for today, you can wave %s tomorrow",$user),"buddypress"); In buddypress.pot #: wave msgid "Wave limit has been exceeded for today, you can wave %s tomorrow" msg...

0
Q: PHP session_id() refresh on every request, $_COOKIE['PHPSESSID'] empty

user2780294I can't figure out why, but tried all answers/google.. I found nothing. Here's the situation: Localhost code session_start(); echo session_id(); print_r($_COOKIE['PHPSESSID']); Result: Consistent session_id() across app pages, and on page refresh. $_COOKIE['PHPSESSID'] matches th...

0
Q: Session randomly expire and logs out SOME of my users

Marcus LindI'm having issues with users of my website complaining about getting logged out automatically multiple times while using my serivce, however I can't reproduce the error and the issue does not seem to effect every user, since I have hundreds of users that is using the service fine without complain...

0
Q: PHP sort assosiative array by key

user2629419I have a associative array in the following format: How to sort the array by 'c_name' in ascending order Array ( [country_detials] => Array ( [0] => Array ( [c_id] => AD [c_name] => Andorra ...

0
Q: Ajax call on yii dialog box close function fails

not.your.ordinary.girlI have this problem with using ajax call on dialog box close function. Here's my ajax call function: function samplefunction(var1,var2){ $.ajax({ url: "controllerFunction?var1="+var1+"&var2="+var2, type: 'POST', dataType: 'json', success: function(data)...

0
Q: why does the it displays the php file as text?

user2955204i know this question has been asked befor but i really didn't understand anything out of the answers. i don't know much about php i just wanted to connect my html website into a php file that will save all the password into a text file. but when i enter a random password and it directs me into th...

0
Q: Need a help on logs with codeignitor?

tpdevI have used code ignitor framework.Have used its log part. I had a query regarding configuring logs in the application. As per the documentation they say that we can configure in app/config/php and filter the logs as debug,error or info messages. But even after doing that, I am not able to filter...

-1
Q: Saving to MySQL TIME and DATE data types through PHP

JRulzI need to store date in DATE type and time in TIME type in a MySQL database table. I have found many ways such as formatting and converting from unix time etc. but whats the most straightforward, simplest way to create data to store as DATE and TIME types in MySQL when using PHP.

0
Q: Use a trait conditionally in PHP

MouliI want to use a trait in a class, only if a condition is satisfied. For example: trait T { } class A { if ($condition) { use T; } } I know I can't use if directly in class. So, I'm looking for a way to use traits conditionally similar to the above. Is it possible?

0
Q: Object not found! codeigniter control

gabrielhy all, can you help me friends... I get error : if(count($q_cek_login->result())>0) { foreach($q_cek_login->result() as $qck) { if($qck->ID_JABATAN==1) { foreach($q_cek_login->result() as $qad) { $s...

0
Q: log4php logger's additivity

Shivan RaptorIn log4php configuration documentation, there is a configuration option called "additivity" which stops the inheritance from root loggers. However, I added to the PHP-format configuration file, root logger is still logging the entry that supposed to appear inside logger queryLogger only: <?php ...

0
Q: loading only new data from database instead of loading all data using loop

user2955239I am in the middle of a social networking site. I am stuck in the status update process. I want to show the status when some status update takes place. Is there a way so that instead of using loop to load and show all the status, i load only the new status and previous status remains on the profi...

0
Q: Implementing a html markup with PHP in OpenCart, How?

Gary DapogiNo PHP skills yet, I've just learned HTML/CSS and think I'm already good at it, but still not in PHP. I am developing my own OpenCart Store and also making it as my practice environment for html/css. I've installed a paid module to make a product option as custom product field. I've already set ...

0
Q: How to Implement queue in php?

user2955245I am having data base with contact numbers of users suppose 123,1234,456,123,456,... Now I have 2 callers and I want that there will be queue so that no repeated call will be made. Both the callers are making calls at the same time. In simple both the caller will have distinct contact numbers...

0
Q: custom module routing is not working in magento

rajeevktomyi am a beginner in magento. I have added a custom module and made routing for that custom module. however it is not displaying anything at all, showing a blank page!!!! Not even the page not found message. here is my code.. my config file is as follows app/code/local/Test/Test/etc/config.xml <c...

0
Q: php display data in div, h1, ul using while loop

user1462863I am not very good in php and mysql but based on my code, I am able to display the results that I wanted but, it is not displaying in the right DOM structure. I would like to display like below: <div class="container"> <h1>Header</h1> <ul><li> <p>data 1</p> <p>data 2</p> </li></ul> </div> <div...

0
Q: Laravel 4, default Email queue priority

Marek SzymeczkoI've configured Beanstalkd for my Laravel 4 application. I've got two queue events I need to handle. One is some calculation for each user (one calculation per user) and the second one is mailing. The question is, do I have to implement Queue priorities? Or does Laravel 4 have those things hand...

0
Q: PHP not properly passing UTF-16 String to Python

MichaelMitchellI am passing a UTF-16 String from PHP to Python, the String comes in from a header to PHP, then is passed/executed with this: $mystring = system( "python test.py {$_SERVER['HTTP_EVE_SHIPNAME']}" ); The header being {$_SERVER['HTTP_EVE_SHIPNAME']}. My Python code: import sys shipName = sys.arg...

-1
Q: How to save Facebook Post ID to mysql database?

Jben KayeI have a program (an app) which ask for user input then generate an image and post the image link to FB timeline. now i want to do is to get the POSTID and save it to my database. so i can have a record which i can retrieve if ever i want to connect to the FB POST. how can i do this? below is the...

0
Q: Execute a line of php before ajax submission

Greg LI have a function in wordpress that handles the uploading of files to the wordpress image gallery. After converting the form to ajax, I realized the file upload no longer works. The thing is, if I could just get the function to execute before the ajax it would work. Here is the code: function ...

0
Q: Store Cached image path in Sqlite database

David KimzI can download images from the web and save them to Cache, now I need to store their path in SQLite Database. Any help please !! thanx in advance. Below is my code Snippet with help from http://www.androidhive.info: //Saving Cached Images to File E_Meges...

0
Q: How to loop the input type text?

user2901740How can I loop the input type text so that it can have it's own unique attribute eg. name, value. What I mean is that for example name="text1", name="text2",. Something like that. Here is my code. Thanks :) <HTML> <HEAD> <TITLE></TITLE> <SCRIPT language="javascript"> function add...

-1
Q: How to return constant value from string in php?

Jobaer ShumanHere is constants: define('Qc', 1); define('D1', 1); define('D2', 1); define('S1D1', 1); define('E1D1', 1); define('E1D2', 1); define('An', 1); define('D3', 1); Formula comes from database: $formula = "Qc + D1 + D2 + S1D1 + E1D1 + E1D2 + An + ...

0
Q: php mail to send a PDF attachment and receive a confirmation message

J HI'm a relative novice trying to write code so that: 1) a user can fill in a form with their email address and (optional) their name and a message body 2) I send them a reply message automatically with a pdf they requested 3) I get an email with their email address (and name and message if they...

0
Q: file type upload is not working on windows 8 phone?

Bhattiwhat is the alternate of input type file for windows base mobiles, i can see the browse button but when we touch on browse button nothing work. Ref to: http://viljamis.com/blog/2012/file-upload-support-on-mobile/ *what is the quick solution to replace input type file * My Code <input id=...

0
Q: Does loadHtmlFile php function sends ip address of the web server to the target website server?

Zahid RainSuppose my website is mywebsite.com and collecting data from remotewebsite.com I am using loadHtmlFile function to load data from a remote website. The page I am accessing is dynamic and I am calling loadHtmlFile every 3 seconds to get the updated data via ajax call. My concern is, the website o...

0
Q: Issue with binary operation in PHP

sourcecodedecbin() converts decimal to binary , also 1 XOR 0 = 1 so , decbin(0) ^ decbin(1) should give me 1 but it is giving me nothing .... why ?

0
Q: PHP SOAP WSSE Error

RobI've been attempting to auth using WSSE headers. I've found a lot of useful information on this site so far, but still have not been successful yet. I need to send headers like such: <soapenv:Header> <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oa...

0
Q: Deprecated: Function eregi() is deprecated in class.kValidate.php file

saiyyedfardeen Deprecated: Function eregi() is deprecated in /home/hjlhvqyy/public_html/fastseoindia/klib/class.kValidate.php on line 107 Deprecated: Function eregi() is deprecated in /home/hjlhvqyy/public_html/fastseoindia/klib/class.kValidate.php on line 109 Deprecated: Function eregi() is deprec...

0
Q: ip4 and ip6 convert in different way

wervaI want to store ranges of IPs into database. The problem is that some IPs are ipv4 and some ipv6. I want to convert all to ipv6 then store into database. for example: according to converter: 192.168.1.100 => 0:0:0:0:0:ffff:c0a8:164 What makes problem is that php treats them in different way...

0
Q: "likes for comments" database designing?

Srii have database tables for Posts and comments. i want to allow users to put a like or dislike for each comments and posts. so..i have few ideas of doing this. please tell me either i am correct or not. create two additional columns in comments table. likes | liked_uids if a person clicks on ...

0
Q: How to add sortable columns in a Joomla component (table), both ASC and DESC with an arrow

KelvinI have followed through the tutorial, http://docs.joomla.org/Adding_sortable_columns_to_a_table_in_a_component When I have followed all instructions there, I was able sort the columns, but with only ASC direction and there is no arrow indicator. Does anyone happen to know how to enable both ASC...

0
Q: MySQL: Updating a Field With The Same Value

Michael RichI use the below method to update a field comment_confidence in my comment table. public function update_comment_confidence($confidence_score) { $this->db->update($this->_table, array('comment_confidence' => $confidence_score), array('comment_id' => self::$comment_id)); if($this->db->aff...

0
Q: How do I get numeric values in an array in str_replace()’s search parameter to map the way I expect?

binkiphp > echo str_replace( array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'), array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p'), '01234567890abcdef') . PHP_EOL; klmnopghijkklmnop I expected this str_replace() call ...

0
Q: Fatal error query codeigniter

gabrieli have query, but it's error ...why? can help me?? $tot_hal = $this->model_welcome->manualQuery("SELECT * from tbl_transaksi a left join tbl_pelanggan b on a.id_pelanggan=b.id_pelanggan left join tbl_karyawan c on a.id_karyawan=c.id_karyawan where a.status_transaksi='OK'"); error : Fatal erro...

0
Q: Like or favorite a post with unique user using Laravel Eloquent

Sagiruddin MondalI was creating a like system for my website. in this I wanted one user can only like one time for a post. and a post can be liked by many user. Also many user can like many post. So if I guess it right, It is a many to many reletionship. in this context, I create the following table ... user...

1
Q: Need suggestion to edit a php through php

YadheendranI have a config file which is written in php as below, <?php class WebConfig { public static $WEBPATH = '/customers'; public static $ACCOUNTPATH = '/empaccountpath'; public static $INFO = '/accountInfo'; const ACCOUNT_STATUS = '/account_status'; const ENABLE_SEARCH = '/enable...

0
Q: Move position of MySQL row up/down using php

FaisalI'm fetching my page's menu from MySQL table as an unordered list <ul></ul> ORDER BY their position, Here is my MySQL table's screenshot All I want is a query when I fetch record of page_id_pk=3 and SET its page_position from 3 to 2 and UPDATE it so now it holds page_position 2 and rest of t...

0
Q: kendoui grid CRUD example

user2313172I'm new to KendoUI. I'm developing an app using the Grid with CRUD functions. It is for a relatively simple application for a few columns (10) and rows (25). I managed to make it work for Read and Update. But I don't know how to code it properly for Create and Delete. I cannot find examples with ...

0
Q: Set userprefs when loading a gadget in PHP

thekman30Greetings from a long time reader, I am wondering if anyone could give me an example on how to set the UserPref of an XML Gadget using when loading it in PHP? So far I have managed to make the gadget display by iterating the the tags until finding the content tag, then echoing out the code betw...

0
Q: PHP get_result() with mysqli prepare not working

AkilanI am trying to implement php mysqli prepare in my existing source. To fetch "select * from " I used object oriented method. Its working fine in my local server. When i deploy into server, it will not show the result or error. It breaks after the get_result() function. Here is my source, $mysql...

0
Q: Cant find base path for bundle

DavidI'm using Symfony2 and want to generate getters and setters for the entities by running: $ php app/console doctrine:generate:entities TestBundle The Console returns me the following message: [RuntimeException] Can't find base path for "TestBundle" (path: "C:\xampp\htdocs\ProjectX\src\Nam...

-1
Q: Increment time by 15 minutes in php

ashwinbhyIn mysql database we have a column of type time we need to increment the value of time by fifteen minutes in our php code. for example time is 09:45:00 it should become 10:00:00

0
Q: Syntax Error, unexpected $end -- PHP error, what's wrong?

user2955368My entire error code is Parse error: syntax error, unexpected $end in /home/a3704125/public_html/home.php on line 356 Here is my entire PHP file.. Tell me what the problem may be? ._. Thanks! <?php define('INCLUDE_CHECK',true); require 'connect.php'; require 'functions.php'; // Those two fil...

0
Q: PHP Files work in one setup but not in another

zack_falconI've recently made a new Fedora setup, consisting of Fedora 19, Oracle 11g, Apache 2.4.6, and PHP 5.5.4 (afaik). My objective is to migrate an existing PHP setup from one aging PC to this new one. As far as I know, I have everything correct, sans PEAR*. Now, I've been able to create an info.php ...

0
Q: PHP - Replace subfolder in link (in order to change language)

AndyThis is my first post on this forum, so please forgive any of my unintentional errors. So, let me try to explain what my problem is: I have a two language website with a folder structure like this: mywebsite/ru (russian) and mywebsite/en (english) When I'm on the russian version of the websit...

 

« first day (259 days earlier)      last day (51 days later) »