« first day (307 days earlier)      last day (3 days later) » 
00:00 - 15:0015:00 - 00:00

12:09 AM
0
Q: config files with php variables smarty

AthanatosIn my php file to send emails I would like to use smarty config variables however currently I have to cut them This is part of the PHP file: PHP $messagecontent .= " <p>bla bla bla bla <b> $username </b> xxxx <b> $myitemname </b> <p>When you receive xxx go to xxxx</p> feel free to <a h...

0
Q: How to create zoomed thumbnails in PHP?

LightningsoulHow do I automatically create thumbnails via a dropbox feature on my website? I need it to perform quite well and generate them automatically in a set size and zoomed in (so for images with a big height I just want to take the center part of it). All the thumbnails should be like 150px to 100px a...

0
Q: PHP Lithium framework - How to use xSQL FUNC in model

TomFor example, in PHP Lithium framework, if we want to create a new user object and add it to db, we can use this - $model = 'app\models\Users'; $user = $model::create(); $user->user_guid = uniqid (); $user->save (); Now I want to use MySQL FUNC UUID() to replace uniqid() in PHP, the SQL is si...

0
Q: Artisan Migration trouble

user3127842Okay, so I'm trying to migrate my database, I've got mysql and everything else set up properly. But when I went to my SSH Console and typed in " php artisan migrate:install " I got the following error message: PHP Fatal error: Class 'laravel\bundle' not found in /Solder/laravel/cli/artisan.php ...

0
Q: PHP Laravel - How to use xSQL FUNC in model?

TomI want to use MySQL FUNC UUID() in the SQL is similar to this : INSERT INTO users SET user_guid=UUID(); I know laravel has model when I create an user and add it to DB, I can do this : $user = new User; $user->user_guid = uniqid(); $user->username = Input::get('username'); $user->email = Inp...

0
Q: How to match Rich text format quotation marks during a preg_match operation

user2075625I have a small piece of code that searches a string for a pattern of 'quotation mark' 'text' 'quotation mark' - The idea here being to find quotes within a string. Currently I have this as the preg_match function preg_match_all('/"([^"]+)"/', $essay, $q); However I have found that when pastin...

0
Q: PHP Variable inside <Script> with \

AntBHey so I'm trying to add a variable inside this code, I need to replace the bold with my variable. $_url_form .= '</form></div>'; $_url_form.= "<script type=\"text/javascript\">"; $_url_form.= "var gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http:...

0
Q: How to determine if variable is simplexmlelement, an is_simplexmlelement function?

lbennetI am getting all types of warnings in a loop first: <b>Warning</b>: simplexml_load_string(): Entity: line 2: parser error : Premature end of data in tag imageThumb2Url line 2 in <b>/var/www/category_search.php</b> on line <b>49</b><br /> Then I have a function that expects a simplexmlelement ...

0
Q: Apply class to first and third post of every row in Wordpress

NiklasI'm using 960 grid system on my wordpress theme, and my loop is within a child grid. I've got a three column layout of thumbnails, and to avoid the unwanted padding of the child grid, I need to apply "alpha" class to the first post on each row, and "omega" class to every third post (the last of e...

0
Q: Referencing a 2D array value from function return

Brad BirdThis is just a general question and could not find an answer to it. I have a function. Say it looks like this. function_name() { $array = array( "1" => "One", "2" => "Two" ) return $array; } Now I want to reference "2" into my PHP. echo function_name()[1]; Obviously this doe...

0
Q: Issue on getting return values from google map api when using proxy

Iscoplease help me on this. The code is working well when I am on a direct internet access but not returning value when using proxy and the error below showed. I have already tried directly writing this "http://maps.google.com.ph/maps/api/geocode/json?address=Mandaluyong+City&sensor=false" on the url...

0
Q: Inserting values to two tables simultaneously

techAddict82My form is composed of several dynamic select dropdown menus. I have accomplished a way to insert values into the select list if an item is not found. I trigger this behavior every time the value Other- Not listed is selected a hidden div will appear to take the input of course_name to add to the...

0
Q: php connect to sqlserver for error

user2609972 PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[IMSSP]: This extension requires either the Microsoft SQL Server 2008 Native Client (SP1 or later) or the Microsoft SQL Server 2008 R2 Native Client ODBC Driver to communicate with SQL Server. Neither of those ODBC Driv...

 
12:58 AM
0
Q: Invalid authorization specification: 1045 Access denied

DaveI have a query which is suppose to create a sql backup file of tables but i get access denied, im no expert with servers so I am a bit confused how to solve it. My code looks like this: foreach($array AS $i){ $file = $i.'.sql'; $statement = 'SELECT * INTO OUTFILE ? FROM '....

0
Q: PHP script to check tokens from database APNS

Rick de JongI have a MySQL database with push tokens. A PHP script sends the pushes to the tokens. But a few are invalid. Apple haves a feedback service. But how to use it and delete the invalid tokens from the database? Is there an example ?

0
Q: how to make a simple sliding content with tabs

Francis Alvin TanNeed some help with sliding panel so, basically all I want is something like this http://thecamdenstudio.com/ (the twitter, facebook and rss tabs) not the review us tab so I want to achieve that effect because need to add html content inside please anyone help me...

0
Q: Getting a Serialized Array From a MySQL Database

ivoilicSo I have a table in my database called "cards", in this table there is a column called "decks" which needs to contain a list of serials numbers of various decks. Since cards can belong to multiple decks an array is needed to store the multiple serial numbers. I was told the best way to store a...

0
Q: Python - PHP - AS3 Socket Server

user2791849I'm been looking at this for 2 days now and I'm stuck. Basically, it's a bypass for a website called xat.com Here is the AS3 code, the AS3 is getting a value needed to bypass, but before it does, u have to give it a different value. So basically I need my python script to give a value called "...

 
1:10 AM
0
Q: Inserting PHP Variable into <Script>

AntBSo another annoying one from me, I have this advertisement code: <!-- PopAds.net Popunder Code --> <script type="text/javascript"> var _pop = _pop || []; _pop.push([\'siteId\',$popadsID]); _pop.push([\'minBid\', 0]); _pop.push([\'popundersPerIP\', 0]); _pop.push([\'delayBetween\', 0]); _pop.push...

0
Q: php XMLwriter file size limit

user3101337I'm creating an xml file from an sql query using PHP. If the query returns more than about 500 records, the xml file is not written fully and I get an error message from the PHP server saying: "The server is temporarily unable to service your request due to maintenance downtime or capacity probl...

0
Q: MySQL works in console, but not in PHP's mysqli->query() function

user1578823I have this SQL, made with MySQL Workbench: http://pastebin.com/T09Actyg When executing the code manually in the MySQL console, everything works as expected. When querying from PHP however, I get this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL s...

0
Q: Laravel 4 Log Errors: NotFoundHttpException

user3128211I have the following appearing in my log files and being a new comer to Laravel, I'm not sure where to start debugging. Any assistance would be appreciated. [2013-12-23 01:04:41] log.ERROR: exception 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException' in /home/ulti/laravel4/bootstrap/...

-1
Q: Create business card using FPDF & PHP/MYSQL

user2691372I have created a the code for generating PDF business card from MySQL data. I use the FPDF library. i also attached the current screenshot..I tried a lot but cannot able to correct it.Can anyone help me to correct it. All the data in the business card will come from the MySQL database. Data to ...

0
Q: array issues when using ajax

codenamejupiterxI am trying to use ajax to compare two arrays to see if a particular value set is the same or not, so I filled both arrays with the same values and when i tested them my test says that they are not the same. The first array was made on fileA.php (with a while loop pulling directly from a datab...

0
Q: Cookie works in Chrome but not in IE or Safari?

user2554352I'm using cookies with my log-in system and the system works on Chrome, but then when I go to IE or Safari, it's not working. For some reason the cookies are not being set, I've tried to echo them to no avail. Here is the code that makes the cookies: if(isset($_POST['log_in_iniator'])){ $us...

0
Q: get values for the option box from mysql database

lamahewaI have been trying to get values for the option box from the database. I don't why this code isn't working. Please help include_once "connection.php"; $order ="SELECT * FROM seminar "; $result = mysql_query($order); <?php echo '<div class="uk-form-row">'; echo '<label clas...

0
Q: Save words typed by a user, in MySQL, or...?

RealGuyI have a little problem, so... I have two MySQL tables, one of them stores user's data and the other one some words, I mean each row has a field with an unique word. Then, I have a formular with an input where users can type a text. Basically, I check if the text typed by the users exists in th...

0
Q: Select group of rows with same value

user3128232i am building a game where players can kill players and so on, whenever there is a kill it gets inserted in to a database like, ID - Killer - Killed - I want to have a killstreak stats page with the highest kill streaks. The killstreak will be how many kills in a row a player got but i am unsu...

 
1:40 AM
0
Q: What does .htaccess affect?

Jim ThioDoes it affect only web request or does it affect php program opening and closing file. For example, I have a file mysecretfile.php I want that file to be accessed by user going to domainname.com/somedifferentfile.php I want to use .htaccess. How would I do so? This is my current .htaccess ...

0
Q: What is the proper use of "$html .= '<img src="'.wp_get_attachment_url( $id ).'" />';?

Daan TwiceI have the following php variable if (has_post_thumbnail( $post->ID ) ): $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); Which I output in a wordpress template as follows: <img src="<?php echo $image[0]; ?>" /> However, I now have to outp...

1
Q: How can two arrays created in the same way become different?

codenamejupiterxThe var_dumps of the two arrays are different but they were created the exact same way . Why is this????? first array dump: array(2) { [0]=> array(0) { } [1]=> string(6) ",2,2,1" } second array dump: array(3) { [0]=> array(0) { } [1]=> string(1) "2" [2]=> string...

0
Q: Unlink PHP prermissions denied

DimitriI'm having some trouble with the unlink function. I use this to create my directory: $customer_path_files = $_SERVER['DOCUMENT_ROOT']. '/'.$job.'/'; if (!file_exists($customer_path_files)) { @mkdir($customer_path_files ,0777,true); } This works great. The problem is when I try to dele...

0
Q: Know how many times used a user a discount coupon code?

RealGuyI have two tables in a MySQL database. One of them stores user's data (users_table) and the other one the coupon codes (codes_table). Then, I have a form, where users can type the coupon code and a variable increases depending on some factors. Well, the problem is that I don't know how to let t...

0
Q: php 5.5.5 not working with Apache 2.4.7

user2288650OK, so recently I decided to upgrade my server. I downloaded apache 2.4.7 "httpd-2.4.7-win32-VC11.zip" and extracted all the files, configured them for my use and I get ("It works!") when I visit locolhost. Then I downloaded "php-5.5.5-Win32-VC11-x86.zip" and configured Apache and php but my ph...

0
Q: Symfony 2.4 form field not rendering with value selected with a user/role one to many relationship

guohaolayI've got a User entity with a role relationship described by the annotation below: /** * @ORM\ManyToMany(targetEntity="Role", inversedBy="roles", cascade={"persist","remove"}) * @ORM\JoinTable(name="user_role", * joinColumns={@ORM\JoinColumn(name="user_id", referencedColumnName="id", onDe...

0
Q: Installing SSH2 for PHP to run on a Xampp Apache server on a OSX 10.9.1

Mona PaunI am running Xampp on a Mac with OS X 10.9.1 and I am trying to develop a web page that calls a PHP script through an Ajax call. Xampp is used here for development purposes and it is not intended to form the backend of an online page. A PHP script needs to connect though ssh to a remote machine,...

0
Q: Delete old MySQL records every hour

LemonioSuppose I include the built in MySQL timestamp into my fields on my database table. Everytime I update the records it will update the timestamp. I would like to delete records than are older than an hour. Any ideas for how best to do this? I could have a loop checking the timestamp for all rec...

 
2:34 AM
0
Q: blueimp - jQuery File Upload - cannot delete files from custom location

DimitriFor this plugin, I'v been able to upload and manage my files perfectly. The problem begins with deleting a file after it's been uploaded and appears in the upload queue. Originally the index.php file where the uploader is located looks like this: error_reporting(E_ALL | E_STRICT); require('Upl...

 
2:58 AM
0
Q: PayPal php sdk throw PPConnctionException when params was wrong

jiangI got this SDK version at https://github.com/paypal/rest-api-sdk-php the problem is if any param was wrong(for example leave the credit card number empty), PayPal throw a Connection Exception,but not a normal json data with certain Error Message ... (when I organize POST data mysel...

0
Q: How can I configure apache2 to look for new php directory after I manually moved it?

user3128326In some purpose I need to move my php bin files from one place to another, such as /etc/php/ to /etc/php2/, the question is how apache2 knows where to find the new php bin files? I know a file called libphp5.so which is refered in httpd.conf, but I think this filed is created during the compile...

 
3:15 AM
0
Q: Laravel eloquent orm WhereHAS

madziikoyThe code: $members = Group::whereHas('members', function($q) { $q->where('is_blocked', 0); })->with('members')->where('jid', $group_id)->get(); The plan: Get all active members (is_blocked = 0) members of the group. The models: public function members() { return $this->belongs...

0
Q: Advice needed: Ajax not sending data to php

JeanAlesiI don't know what is happening. Data gets sent, but it does not send the updated value of the variable. Harcoded data gets sent as expected. How can I solve this or go around it.. Any help will be highly appreciated. username = ''; // supposedly these variables are global tree_name = ''...

0
Q: MySQL Inner join output to html table in php

user3128099I have a table that is being displayed in a form, which looks like this: http://puu.sh/5VBBv.png . The end of the table, City, is displaying an ID of a city, which is supposed to be linked to another table (http://puu.sh/5VBIG.png). What I've done for my INNER JOIN query is mysql_query("SELECT *...

0
Q: Install Composer Dependancies from PHP script

jdpI've been working for some time on figuring out a good way to manage Composer dependancies in WordPress plugin development. Including dependancies in WordPress plugins is easy enough, but if two separate plugins both have composer.json/vendor directories, and include the same package, you get a c...

0
Q: Accessing class instantiated outside slim from class instantiated inside slim?

Ahhkrequire ('dataclass.php'); $db = new DataClass(); $app = new \Slim\Slim(); $app->group('/api/v1', function () use ($app, $db) { require('processingclass.php'); $foo = new FooClass(); }); This above is just an incomplete example. But, how would I call a $db method from within $foo? I ha...

0
Q: 5 star rating system

user3078799I am trying to convert the scripts that are provide on this webpage: http://net.tutsplus.com/tutorials/html-css-techniques/building-a-5-star-rating-system-with-jquery-ajax-and-php/ And make it function as a rating system, which it rates webpages rather movies. I want it to connect to my databas...

0
Q: AJAX within AJAX not working correctly

user3009875I am working on social site. On first load, it fetches all the post, each with two comment max. If the comments are more than two it attach More comment button to it, if clicked, it displays all the comments and replace the button with Less comment. That is just a little story of how it works. I...

-1
Q: php DateTime seems to be acting up sorry for reasking no answers seem to be working

Fts Devso im simply trying to keeps statistic on a system im writing although when trying to get the difference of the two dates.. i know this topic has been covered many times however i have tried using date diff and strtotime and keep getting errors what am i doing wrong $s_date = mysql_result($ticke...

1
Q: Regex to capture google web fonts weights and styles

RegEditGiven a string in this form: var myfont = 'Exo 2:600italic'; I need a regex to capture the numeric part of the string after the colon (600) as var1 and any value following the numeric value as var2. For example, from the above string, I would get: font-weight:600 //var1 value font-style:ital...

-1
Q: What's the different Layout Format of Report Module Magento

Josua Marcel ChrisanoWhat's the different Layout Format of Report Module Magento between Number 1 and Number 2 What's the easier to build? What's the default magento-like layout format? What's the best result? What's the lighter process? How to create both of reports because i made a fatal error when creating rep...

0
Q: PHP OOP Prepared Statements Select Query

user2872510Im trying to take the connection info set from constructor and use that in my function using prepared statements, but it gives me Call to a member function execute() on a non-object. I checked the query in Mysql Workbench, it ran fine and gave me the info that i wanted <?php /** * Logs the U...

0
Q: Add fonts and error virtuemart

user3128381My site: huongpainter.com It have two problems need resolve: 1. I need add more fonts to system, anyone recommend me a component or plugin which simple use. 2. In product details page, click "Ask a question about this product",put all require field and click "send your question". error 500. any t...

0
Q: display div and table side by side

SyaaI have a div and a table, I wish to make both of them display side by side. after a few try, I still can't did that. the div(navbar) would be at the top-left, and the table would be at the bottom-right. <html> <head> <link rel="stylesheet" type="text/css" href="stylenav.css" /> <link rel="styles...

0
Q: Issue with Dynamic Form Arrays and While Loops

user1713438I am having trouble getting data entered into a dynamic form to return properly. I can't tell if this is a javascript or PHP issue. My javascript: <script> function displayResult() { var table=document.getElementById("EquipTable"); var row=table.insertRow(-1); ...

-1
Q: How do I start with PayPal?

RealGuyI read many things in PayPal Developer, but I still don't understand how to start. My idea is this: I have a tag with some options: 5€, 10€, 15€, etc. Well, then depending on the selected value I wanna make the payment, and add the same value to a PHP variable which is stored in a MySQL databa...

-1
Q: Please convert this ruby code to php

Krishna KarkiHere is my ruby code # A list of bags with different weights list_of_bags = [11, 41, 31, 15, 15, 66, 67, 34, 20, 42, 22, 25] # total weight of all bags weight_of_bags = list_of_bags.inject(0) {|sum, i| sum + i} # how many containers do we have at our disposal? number_of_containers = 4 # Ho...

 
4:02 AM
0
Q: Giving user profile pages unique url ids PHP

Trevor WoodI've made a user profile page. Using the code written below. I'm trying to give each users profile page a unique id/url that so it is viewable by others. Is this the right technique to use or is there a more practical one? <?php session_start(); if(isset($_SESSION['signed_in']) && $_...

-4
Q: Complicated select query for a beginner

user3114385This is my table in/out emp_id td_id status timestamp remarks 35 1 in 2013-12-19 10:15:09 late 35 2 out 2013-12-19 12:00:23 example 36 3 in 2013-12-19 10:15:09 36 4 out 2013-12-19 12:00:23 ex...

0
Q: only one record is saving when uploading multiple images in yii

FarhadController for image upload: public function actionUpload() { $model=new Tblvehicleimage; if(isset($_POST['Tblvehicleimage'])) { $company= Tbluser::model()->findByAttributes(array('user_code'=>Yii::app()->user->ID)); $images = CUploadedFile::getInstancesByNam...

0
Q: RuntimeException when put 'n' for Discard cahges

whitebearcomposer.phar update shows RuntimeException when I choose 'n' for Discard changes [y,n,v,?]? this is the my log below. Could you check? $ sudo php composer.phar update --verbose Loading composer repositories with package information Updating dependencies (including require-dev) - Removing go...

0
Q: usort works fine with WAMP, gives syntax error on remote server.

Josh SieglI'm trying to run PHP's usort function to sort an array of files by the time they were created. Here is the code: $files = array(); $files = glob('./posts/*.txt'); usort($files, function($a, $b) { return filemtime($a) < filemtime($b); //lambda sort }); usort of course references an arr...

0
Q: How To Open Multiple Random Link In A Single Click

MiaI have a code in my site. Here how it looks. <a title="Click for Random Pic" href="mywebsite.com">Click</a> Now, how can I open multiple links? Link1.com, link2.com, link3.com etc. But I want to open it randomly. Not opening it all at the same time. Example I click the link then mywebsite.co...

0
Q: Why does this only work in php myadmin but not in php?

jonWhy does the following work when I paste it into phpmyadmin, however if I try and run the query using php it doesn't? $sql="BEGIN; INSERT INTO nodes (admin_id,title) VALUES (1,'test'); INSERT INTO themes (theme_id,directory) VALUES (LAST_INSERT_ID(),'test'); COMMIT;"; $sql_result=mysql_query($sq...

0
Q: PHP CURL get content return null

user2357288As my job i need to use the curl to get some content from the payment side who offer to us. they gave us the test url and official url. First of all, i need to use the curl to get some content from json. i use the test url to testing, the result always return null. but when i use the link which g...

0
Q: Load more search data on scroll down

Javier LopezI have out together the following code that searches a mysql database but I only know how to create links to the next pages. Is there any way to load more data when I scroll to the bottom. I f so how can implement it with the following code? $currentPage = $_SERVER["PHP_SELF"]; $maxRows_searchH...

0
Q: Display malayalam fonts in wordpress

RajeeshI am created a wordpress site in malayalam. And it shows malayalam text. But I need to change the malayalam font, it currently showing the default font. How can I do that? Please share your ideas with me, Thank you

 
4:32 AM
0
Q: which is better conditional approach (1==$i) or ($i==1)

user2623213I have seen some people using if(1==$1).I know in some language its an invalid approach.which is more better approach and why? if(1==$i) or if($i==1)

0
Q: Issue with if statement pulling incorrect data from database

Israel CasillasI own a tournament script and i had a report system built into the script. Below is the code. switch($t['bracket_size']) { case 8: $games_count=2; $rounds_count=3; break; case 16: $games_count=2; $rounds_count=4; break; case 32: $games_count=2; $rounds_count=5; break; case 64: $games_count=2...

0
Q: MySQL how to SELECT FROM two distinct Sub Set within Same condition range and Order by a Case condition

mahen3dI have real world mysql select problem with my website, I have members who's gender is either female or male, But they are not proportionally distributed, i.e 70% male, 30% female, I want to do Select to the Display in my home page of the website, where Select Random 50 members BUT make sure...

0
Q: PayPal Express Checkout Instant Update CallbackURL not being called in live setup

LavanyaI'm working on integrating PayPal Express Checkout into an existing web application using Zen Cart . Everything, including the Instant Update Callback, works fine in a setup that uses Sandbox settings. The Callback works fine both on HTTP and HTTPS in the Sandbox. But as soon as I switch to Live...

0
Q: PHP reg exp - where did DOI go?

LeoI just want to replace "doi:yyyy.yyyy" here, but $1 does not give me back that text. Why? ;-) $zp_citation['citation'] = preg_replace('(doi:[^ <]*)', '<b>' . '$1' . " - where did doi go?" . '</b>', $zp_citation['citation'], ...

-1
Q: ticket_uri returning Facebook's URL, leads to blank page

user3128489Using the "ticket_uri" variable returns a link like "https://www.facebook.com/ajax/events/ticket.php?event_id=236674259826369&source=1" which leads to a blank page unless you're logged in. Is there any way to return the ACTUAL ticket link, or do we have to wait for Facebook to fix this issue?

posted on December 23, 2013 by user2485292

I want to make a file downloadable from a specific page, i tried .htaccess deny from all then some php but it didnt work, ive read similar problems like this one here but they didnt help much. I only want it so people cant use my website as a direct link to the download file.

0
Q: remove accents and filter out non-alphanumerical chars

libertaireHow can i filter the non alphanumerical characters out of a string, but keep the accents untouched ? example: $string = "présentation d'un texte, avec des accents (en français!) & autres..." Should be replaced by: $string = "présentation dun texte avec des accents en français autres"

 
5:20 AM
0
Q: Codeigniter - How to store the test selected answer after pagination

user236501I am creating a test system, this is my first codeigniter project. I am able to make the pagination, so each page will only display one question and click next button to go next question. Now my problem is when user answer one question and go next but when he/she go back to previous question the ...

0
Q: what is the procedure for using REST services hosted on the server (Apache 2.2) through curl php to send https request?

deepjyoti22what I am actually asking is the procedure for sending secure data ( login id,password) over https to an apache 2.2 server with self-signed certificates.

0
Q: Algorithm for running an application every hour as a day

Vinodkumar SaravanaHi I need to run a patch which needs to execute every one hour and each one hour the patch should run a for a past date. Let me give you example so that you will have clear understanding what i needed For example, consider i have to run the patch from 2013-11-04 and each one hour i have to run f...

0
Q: FTRUNCATE leaves space at the beginning

Abdullah FahimI want to truncate a file with each loop and write again. So, I am using below code. However, what is happening here is I am getting some extra space at the beginning in each loop. There is no space as 1st time no space is being added (also I tried trim function). Can you please help me? $file...

0
Q: how hide internal server from client when using curl in php?

user1944894I get internal server error in client side when curl URL dynamically generated. I already tried error_reporting(0); ini_set('display_errors', 0); Methods in php.

0
Q: Nested Mysql Table

surnameI have nested mysql table. I used the script below to hide/show the table. The table contains the records from purchase_order when I click <a id="loginLink" onclick="toggleTable();" href="#"> the hidden table comes out based on value of counter. Just like the picture above, when the records is...

0
Q: Getting inconsistent facebook posts in response of Graph API call with me/home/

user777171Graph API call https://graph.facebook.com/me/home returns limited number of posts. Moreover response is having inconsistency in number of posts returned in response. Few of the posts are missing in response which i can see on my Facebook news-feed. Inconsistency between results returned in Grap...

-1
Q: How to count number of genuine online visitors?

Kiran RSI'm developing an application to store total visitors visiting to my website using set_cookie(). But while developing that application, I've a second thought regarding the issue, that if the user is visits from the another system how can I track him. Confused What I mean? Dont worry, I'll Expla...

0
Q: take data from 3 tables using orderby

user2698983I have 3 tables(event_csv,TimeSlots and FilledSlots). i have check whether 'Quota' represents total no seats with $filledpositions(no.of filled seats) then after i want to sort out the rows in 'event_csv' table in the order of unfilled rows displaying first SELECT csv_id,description,Location_...

0
Q: XDebug is not present in phpinfo on Ubuntu 11.10

user3128499Heading I am having an issue with setting XDebug to work with my php5; The core problem seems to be that XDebug cannot be shown in my phpinfo. Env: Ubuntu 11.10 64 bit Apache Version Apache/2.2.22 (Unix) PHP/5.4.5 here is what i tried with xdebug. xdebug installation: sudo apt-get install ...

0
Q: mysql db skip inserting existing data

user123I am getting twitter live tweets data, which I am inserting into table. Following is my code. foreach($arr as $k=>$v) { $tweet = $arr[$k]['tweet_text']; $tweet = escapeshellarg($tweet); $tweet = nl2br($tweet); $tweet = mysqli_real_escape...

0
Q: Send a vlaue from view file to widget in yii

Fazeela Abu ZohraI have a blog,in which there are different blog types,each blog type have many number of blog posts.I am passing the id of blog type to get the detail of the blog post(a foreign key relation ship).For the sidebar i have created a widget ,i would like to pass the blogtype id to the widget so that ...

 
5:50 AM
0
Q: installing mysqlnd driver for wamp 2.4

1994I `m newbie learning php I have installed the WAMP server ver. 2.4 I have visited this Link The manual tells that from php 5.4 and mysql version 5.6 onwards the driver is installed and enabled by default. But when I open D:/wamp/bin/php/ I cant find the php_mysqlnd.dll file. I am a bit conf...

-2
Q: How to add a button “create pdf” in the form.

user3128553On clicking create a pdf file with the current user data and make it downloaded.( A download popup should come asking whether to save or open the document) using PHP??

0
Q: All things working fine for 2 monthns suddenly Error #1146 appears

ProgrammerI have a database uploaded on remote server. All things were working fine but suddenly yesterday there appears a bug. Some tables were showing on left side pane of phpmyadmin but were not visible on right side. When i click on any of the left table it says #1146 the table doesn't exist. Kindl...

0
Q: how to show the single alert message for multiple mysql queries?

Indiani have a small doubt.. i posted my delete.php page coding here. if(isset($_GET["id"])) { $meal_query = mysql_query("DELETE FROM ebmealplans WHERE MealPlanID = '$id'"); echo mysql_error(); $room_query = mysql_query("DELETE FROM ebroomtypes WHERE RoomTypeID = '$id'"); echo mysql_er...

0
Q: Add space in the string before certain characters

user3128549how to put white space before and after a character in text field eg Text="John123456" so i need whit space before 456

0
Q: Process String to words

user2095165Is the any library exist than can process string to mathematical expression? Example is seven divided by seven or 7 divided by 7 Or how api for google since it can handle in its search Calculate seven divided by seven or seven divided by seven

0
Q: function in mysql (1064 error)

MailiThe Query CREATE FUNCTION AverageRateofProduct ( p_toDate datetime, p_productBatchId longtext ) RETURNS decimal(18,2) BEGIN Declare p_averageRate decimal(18,2) ; if((SELECT IFNULL(sum(inwardQuantity),0) FROM tbl_StockPosting WHERE (date < p_toDate and productBatchId =...

 
6:14 AM
0
Q: Update count after returning result

GluteFreeI was looking for a way to update the count for the database after finding the result of a product but it keeps returning an error and/or not updating the count. I found ways to update the counts out right but not after finding a result. If i'm blind please redirect me. My apologies if I overlook...

0
Q: Insert to MYSQL table without knowing variable names

BEBOI have a page where users creates Category which creates a tables. after they create they create category fields which in turn create category table columns. The user then can access the category and its fields in a form. Is there a way that i can have the form submit to mysql table without knowi...

0
Q: Video won't load special video URL

VelonciaSo I have the URL as follows. http://redirector.googlevideo.com/videoplayback?id=9121d1f9a8444ea0&itag=18&source=picasa&cmo=sensitive_content=yes&ip=0.0.0.0&ipbits=0&expire=1388380751&sparams=id,itag,source,ip,ipbits,expire&signature=242B9782F916E8CC2B0C69F580E552275686F967.59A5AC2A4F28503DD84...

0
Q: Genrate fedex tracking code

VickyI am trying to integrate fedex service on my site where user purchase products and selects fedex shipping method, i am able to calculate the shipping rates with help of api but i also want to generate a code/label which can be used further to track orders like when a user purchase a item he/she w...

0
Q: How can i enable secure http connection (https://) with my aws free tier instance

Vidi am using AWS free tier instance as my back end server. I need to enable secure HTTP connection (https://) for my web services. is there any way to do that ..

0
Q: Codeigniter - Ajax not working no return value

user236501echo '<script>$( "#start").click(function() { $.ajax({ type: "POST", url: "'. base_url() .'StartTest/session", data: "id=' .$row->id .'", success: function (result) { ...

0
Q: Best way of importing a large data file to MysQL

mridulaI have an application which receives a datafile of size 16GB (with around 90,00,000 lines) which is to be imported into a MySQL database. Everytime I ran the php script, I would get the error 'Lost connection to MySQL server during query even though the database is on the same server where the sc...

0
Q: How to count total rows except for blank rows?

user3128599I want to count total rows except blank rows from table tb_counting. Problem is this my query is running correctly but it count balnk rows: $total= SELECT resume_count, COUNT(*) FROM tb_counting WHERE resume_count IS NOT NULL GROUP BY resume_count echo $total[0]; Output result = 3 (it is th...

0
Q: Can we create database and run php files in MySQL similar to WAMP?

user3121801I installed MySQL in my machine. Can I run created php files in MySQL it self similar to WAMP SERVER? Can I create database in MySQL similar to WAMP? I'm restricted to install WAMP in my machine and I'm new to the webdesign. Please help me out with that. Thanks in advance.

0
Q: Fetch Email from IMAP Server Without Inline Attachments - PHP

calamansi_grenadeI am working for a support application that fetches emails from an IMAP Server. I have followed this tutorial, http://davidwalsh.name/gmail-php-imap and it works. The only problem I have with the tutorial is when the email contains an inline attachment. The message displays base64 encoded strings...

0
Q: Zend Framework: Module Name in Bootstrap _initNavigation

Girish PatidarI need to know how to get the current module name in the bootstrap _initNavigation() function of my zend application. On the load of the page I'm doing a request to a change navigation by module. The problem is that module name get in _initView() method by my code but module name not get in _init...

0
Q: CSV file displaying value in different columns

Happy CoderI have an array $email_details and it is like this : Array ( [email_address] => myemailid@yahoo.com [mail_client_friendly_name] => Apple iPhone iOS 7 ) I am trying to put this in CSV and doing the following code : header("Content-type: text/csv"); header("Content-Disposition: ...

0
Q: how to show sliding div alternately

Francis Alvin TanNeed some help on this please, I need to have the div close when a tab is open alternately, or one tab can be open and others will close automatically Here is My fiddle I just got from someone HTML: <div class="siteMap"> <div class="mapButton"></div> <div class="theMap" style="background:red;">

0
Q: Executing Symfony2 specific commands on Ubuntu

user3109712Earlier I used XAMPP with Symfony2 on Windows 7. There was shell for running specific Symfony2 commands for generating bundles etc. Now I have switched to Ubuntu 13.10. Problem is when I go to Symfony directory and try to execute following command to generate bundles php app/console generate:bu...

0
Q: Can't get Superfeedr callback response in CakePHP

user2889036I already added this URL to my subscribers list: http://push-pub.appspot.com/ BTW, I also setting well the callback URL, like: http://online-domain.com/data/callback public function forward() { $this->autoRender = false CakeLog::write('debug', 'Callback work!!'); CakeLog::write('deb...

0
Q: XML parse with PHP / MySQL database Statements and import within mysql arabic letters date formatting

Aditya BhattBelow is my data format in XML, from Oracle database which I am exporting to import with MySQL: <?xml version='1.0' encoding='UTF-8' ?> <RESULTS> <ROW> <COLUMN NAME="CLIENTCATID"><![CDATA[29]]></COLUMN> <COLUMN NAME="CLIENTCATNAME"><![CDATA[Delivery Items]]></COLUMN> <COLUMN NAME="C...

0
Q: how to cut a portion of a variable and put it into another

NewerI have 2 variables as $a=abc.php?b=1a1a; $b=abc.php?b=0; How can I replace '1a1a' of variable $a into '0' of variavle $b. that means variable b will be $b=abc.php?b=1a1a;

0
Q: jqury list of dates in a month

ChinthuI am using jquery ui plugin for date picker now i need to read the year and month from user to create an array of all dates in that month in the format "yyyy-mm-dd" also need to convert this array to php

0
Q: How to Call a PHP Function on the Click of a Button

RazorI am a rookie in PHP and have just started learning the basics of this language. I have created a page called functioncalling.php that contains two buttons, Submit and Insert. As a beginner in PHP, I want to test which function is executed when a button gets clicked. I want the output to come on...

-1
Q: Seperate emails to seperate users.

user3128693This is my first question here and I'm just looking for some advice on a structure/algorithm problem I have. Essentially my problem is this: When a user signs up to my website they automatically have a "product" added to their account. Therefore I want to be able to push different emails to diffe...

0
Q: Laravel 4. default controller route wont accept arguments

Steve PattersonI have a RESTful controller for my users to handle the viewing of a users profile. The problem is this: I want the url to look like this "www.example.com/user/1" This would show the user with the id of 1. The problem is that when i define the getIndex method in the UserController it wont accep...

0
Q: combine if condition with hyperlink inside single display of strings

user7181i have this code <?php echo "<td class='name'><a href='humlaInfrastructure.php?title=".$humlainfrastructure["sn"][$i]."'>".$humlainfrastructure["title"][$i]."</a></td>"; ?> i need to add ananother condition inside this <a class="button red right" href="#" onClick="window.open('modules/addIn...

0
Q: INSERT query of xampp MySQL doesn't work

preethi yogasundaramthis php insert query is not working in MYSQL xampp. i couldn't find the error $query = "INSERT INTO member (id, username,fname,lname,email, password, salt ) VALUES ( '$username', '$password', '$email', '$salt' )";

0
Q: Concatenating PHP and JS while echoing

Obmerk KronenI have JS with an options var like so : $output .= '<script type="text/javascript"> // <![CDATA[ var options = { render: "canvas", size: "100", radius: "0.5", }; ...

0
Q: Fatal error: Function name must be a string PipeCMS

FernandoFatal error: Function name must be a string in C:\xampp\htdocs\pipe\includes\class.engine.php on line 101 Witch is the following void final public function num_rows($sql) { return $this->mysql['num_rows']($this->mysql['query']($sql, $this->connection)); } Also here in a main file i decla...

-1
Q: How to get the in-line blocks as close as desired?

user3128709![That's how it should look][1] Hi, I am trying to make 2 in-line blocks next to each other and similar 2 under it. The problem is I am unable to make them stick as close as possible. I have to make it responsive as well. please help.

1
Q: PHP rearrange the array by indices

SanganabasuI'm trying to produce categories and sub categories array. The array look like as follows. array( (int) 1 => array( (int) 0 => array( 'id' => '2', 'name' => 'Hydrualic Fluids', 'photo' => '', ), (int) 1 => array( 'id' => ...

0
Q: Why does this code cause error while using form tag in PHP?

user3128717I wrote JavaScript code to show the particular div tag in textbox by onclick event. If I use a form tag, it's not showing div tag id in textfield by onclick. If I remove the form tag, it works fine. Why? Source: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/...

0
Q: Dropdown chosen item doesn't display corrently in mysql db

user3125900I have a drop down; <select name="pizzaSize" type="text" id="pizzaSize" > <option value="Small"<?php echo ($pizzaSize== 'Small') ? ' selected="selected"' : ''; ?>Small</option> <option value="medium">Medium</option> <option value="large">Large</option> <option value="XL">XLarge<...

0
Q: Managing Wordpress Database (Adminer)

user3125817Im new to wordpress and having difficulties in managing the database. I have installed "Adminer" plugin to manage the database. I already created a new table called "tbl_admin". Now I also created a custom template that will connect to this database using PDO statements, the problem now is where ...

0
Q: CoffeeScript for PHP/HTML to convert the coffee to php/html minified script

daison12006013Good day, I'm new to coffeescript and happy about the features. I would like to know if there such thing as CoffeeScript for PHP View Layer, and something from .coffee to .php as minified form. something like: td: Wow to: <td>Wow</td> Or something ways to preserve the ORIGINAL CODE to a...

0
Q: Php insert/update multple row, using array and not a foreach

RobI’m wondering if this is possible, I’ve search and haven’t found anything so about to give up. I’m looking to do the following for example, note i do not want to use a foreach as that converts it into single queries. $a = (1,2,3); $b = ('john','Rob','Stuffs'); $c = ('doe','roe','soe'); $sql = ...

0
Q: Ajax call inside each loop

Abdullah FahimI found many posts with this topic. But the solutions I found is not much unsuitable for me. Some experts advised to change code structure, but I am not sure how can I do that. What I want: 1) Get a list of movie from SQL database 2) Fetch information from a website for each movie Problem I fac...

0
Q: write with php code in javascript

user3098032 <script type="text/javascript"> var id=<?php print''.entry1->id.''?>; var dataString = 'id='+ id; $.ajax ({ type: "POST", url: "ajax_unfollow.php", data: dataString, cache: false, }); </script> there have a error in this line var id=<...

0
Q: Stop redirecting to another page if the fields are empty in YII

vijayI am a newbee to yii and i am middle of something. I have many forms in view page where i click on submit it check the fields and enter database. But my question is if i have 5 different forms that need to check for validation and should stay in the same form which is entering another form.In th...

0
Q: comparing fetched data between two database

StingHandsI am successfully connected to a mySQL database and oracle database, how do I compare the table content and update mySQL table if something added/updated on Oracle table; ex. MySql db Oracle db STAFF ...

0
Q: Zend Db Table delete not working

user2910708I am new to zend framework and want to delete data from database, but delete function is not working. Please help me out. Here bis my controller code. public function deleteAction() { if($this->getRequest()->isPost()) { $del= $this->getRequest()->getPost('id'); if($de...

1
Q: Remove .php and id from url and replace with slash

user3128780i have tried lots of for url rewrite rules in htaccess but i am stuck now. i have to change this url products.php?id=31 to products/31 i have used Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteBase / ## don't touch /forum URIs Rewrite...

0
Q: Can't figure out this parse error

Kiran RSI am getting an error like this Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in (<file path>) The error that showing the line is echo "$count. ($useronline[ip]) Browsing page: <a href="$useronline[page]">$useronline[page]</a>"; Here is the full function. <?php f...

0
Q: Fix a variable with a valu, and never change it

NewerWhen i visit a page after login,I go home.php. Then i get $a=1234asdf; now after doing some task in different pages when I come back to home.php then I get $a='something else'. but I need $a=1234asdf; Now how can I fix $a,and not to change.

0
Q: Error Occured in worldpay

Anup PProblem with the Worldpay extension - In my website, transaction works from Magento to Worldpay completely fine and payments go through to the merchant account successfully. but the problem occurs after a transaction, when returning to the site. The customer receives an email from Worldpay bu...

0
Q: SCRIPT_ROOT alternative for jQuery

Michael Eugene YuenI am trying to Simple Star Ratings http://absolutephp.wordpress.com/2013/03/23/simple-star-rating-system-using-php-mysql/ for multiple domains within the same hosting server. However I cannot get the correct script url to work. Is there an alternative like <?php SCRIPT_ROOT ?> for jQuery...

0
Q: Doctrine 2 join two tables with third using four table

user3054974I'm confused, and spend 2 days for find answer for this question: I am already have 5 tables Language -> id, iso_code I18n_Entity -> id I18n_String -> id, i18n_entity_id, language_id, text Product -> id, i18n_entity_id(unique) Category -> id, i18n_entity_id(unique) I need to do 2 methods ge...

0
Q: Saving Image in php: image not getting saved

elvismdevI am trying to write a script to save an image, it suppose to save the image at the same location where the script is located at the disk but no luck. I am missing something else over here? //Function to make GET request using cURL function curlGet($url) { $ch = curl_init(); //Initialising ...

0
Q: Passing file from one if to other if to finish proccses

RavgI already opened Question relative to this(i flaged the question for moderator review),but no one finish help me.. and i stuck . I have somthing like that : if($proc == "question"){// Handle some normal form 'contact us'. ...some proccses code when submited via ajax $fileElementName =...

0
Q: substr function displaying incorrectly

C-linkI'm using substr() function something like this: <a href="#">link</a> <?php echo substr($item->introtext,0,75);?> <a href="#">read-more</a> When the introtext has more than 75 characters it's displaying correctly like this: <a href="#">link</a> <p>introtext paragraphs here<a href="#">read-more<...

0
Q: Interface 'Psr\Log\LoggerInterface' not found in /opt/lampp/vhosts/development.com/htdocs/test/Monolog/Logger.php

Eswara ReddyI am trying to execute basic example of monolog. I have tried follwing code. My index.php file is <?php include_once __DIR__ . '/Monolog/Logger.php'; include_once __DIR__ . '/Monolog/Handler/HandlerInterface.php'; include_once __DIR__ . '/Monolog/Handler/AbstractHandler.php'; in...

0
Q: How to check whether a file is present in a directory or not in PHP?

PHPLoverFollowing is my code snippet: <?php $filename = $test_data['test_name'].".pdf"; //I want to check whether the above file with the same extension(.pdf) is existing in the directory having name say "ABC" is present or not ?> And if such file is not present over there in the directory "ABC" then ...

0
Q: How to Display ListData() in CDetailView in Yii

Rizwan Shamsher Kaim KhaniSuppose I have a code of CDetailView as shown in below $this->widget('zii.widgets.CDetailView', array( 'data'=>$model, 'attributes'=>array( 'title', 'owner.name', 'description:html', array( 'label'=>'City', ...

0
Q: Wordpress | How to define and use helper functions in theme functions.php?

James HuckaboneHow to get following to work properly in Wordress Theme functions.php file? I haven't figured out how to make the top function available to the bottom function within the theme's functions.php file. I'm not grasping how to setup hooks so they can work together. Thank you. Filter/helper/whatev...

0
Q: Data is not inserted into database

sosyteeI would like to add data from an html form into the database , here is my code <html><?php $var1=$_POST[tag]; $var2=$_POST[name]; $var3=$_POST[surname]; echo $var1; echo $var2; echo $var3; $dbhandle=mysql_connect('localhost','root','mysql') or die ("Unable to connect to database"); mysql_sel...

-2
Q: About Database Connection error

Vijay PandeyI am creating a registration page in PHP with mySQL and got a code from the Internet as I am new to PHP, and getting this error: Warning: mysql_connect(): Access denied for user 'prasanth'@'localhost' (using password: YES) in C:\xampp\htdocs\source\include\fg_membersite.php on line 733 Register...

-1
Q: Imap mail not working properly

user3107514I have the following code in my project. The issue is that the message(body of the email) is not displaying properly. --37cd8764df1f86bc509d0994d83f1d26 Content-type: text/plain;charset="iso-8859-1" Content-Transfer-Encoding: 7bit hello --37cd8764df1f86bc509d0994d83f1d26 Content-type: text/html;...

0
Q: NodeJS with PHP application and user session

user1853777I have a PHP application (with Symfony2) and I need to let my users talk, and other tings, in real time (with socket.IO). But I also need to store the sent messages and they are linked to a logged in user. So I have two possibilities : I use PHP to store messages : I have an event on the clic...

0
Q: MySQL-based search not bringing up full results

user2142702So I have a MySQL table, people, with the fields _Name, _Criminal, _Loyalist, _PrevJailed and three people in the database. John Mitt, 1, 0, 1 John Sample, 0, 1, 1 Jane Lastname, 0, 0, 1 When searching for people with the query SELECT * FROM people WHERE `_Name` LIKE '%' AND _Criminal = 1 AND...

0
Q: TCPDF- How to reset tcpdf settings to default on add new page?

user1456131Is their a way to reset tcpdf page settings to default on $pdf->AddPage() since I am generating pages dynamically with different page settings. Thanks in advance

0
Q: Magento layered navigation category Url

AnkurThere is a code into filter.php file that is <?php foreach ($this->getItems() as $_item): ?> <li> <?php if ($_item->getCount() > 0): ?> <a href="<?php echo $this->urlEscape($_item->getUrl()) ?>"><?php echo $_item->getLabel() ?></a> <?php else: echo $_item->getLabel() ?> <?php en...

0
Q: PHP and Mysqli OOP - Handling database

MaheshToday i tried to convert my functions to PHP Class. I tried with some basic steps. <?php class DataBase { private $host; private $user; private $password; private $db; private $mysqli; function __construct() { $this->host = "localh...

0
Q: Nested table format

surnameI have nested table, the nested table is hidden. My current table output is this And I want my hidden table place under its parent link the tr with yellow arrow in the top. I want look like this How I can do this? I want to do this with jQuery but I don't know how. I cut some codes to sh...

0
Q: phpmyadmin displays code not web page

3118731i was upgrade my distro, from kali(wheezy) to sid. but when i setting up my web server, i reinstall all over, apache2, php, mysql etc. but i found this error when i access localhost/phpmyadmin, that url is not showing an index / login page of phpmyadmin, but showing the code. in my /var/www defau...

0
Q: How to add value in element of array php

user2962871i want add value for array in php example from Array ( [0] => hello [1] => baby [2] => aaa ) add value to Array ( [hello] => Array ( [0] => abc [1] => ac ) [0] => baby ) thank all.

0
Q: Jquery Ajax PHP Mysql Autocomplete not Functioning

BehseiniCan someone please take a look at this link and let me know why the auto complete text box is not functioning? What I have is a Table called "Brangays" in a MySQK datadabase "157400X_XXXXXX" which contains: I have these files as PHP files aswell 1-:Get_Auto1.php <?php // Database Connection...

0
Q: PHP Prepared Statement's OOP

user2872510Im trying to make a prepared statement that gets the result of the database as an array and returns it as json data <?php /** * Logs the User into Website */ class Login { public $connection; public $result_array; public $user_type; public $id; public $username; public ...

0
Q: Embed function in swiftmailer not working

Shanil SoniI want to send logo of our company in email inline & not as attachment. I have this code for sending out email. $transport = Swift_SmtpTransport::newInstance('hostname', port, 'ssl') ->setUsername('email') ->setPassword('password'); $mailer = Swift_Mailer::newInstance($transport); $message =...

0
Q: Rotate image string vertical, i.e. top to bottom

D. RattansinghUsing the imagestring up function, the text rotates from bottom to top. Is there any way to rotate the text from the other angle? i.e. top to bottom?

0
Q: Converting large numbers into letters (and back again)

techtheatreIs there a term for the idea of storing large numbers as letters? For example let's say I have the (relatively small) number 138201162401719 and I want to shrink the number of characters (I know this does not help with saving disk space) to the fewest possible number of characters. There are 26...

0
Q: Connecting to MS SQL database with PHP: Data source name not found, and no default driver specified

peirdI'm stuck with this problem for a while and I just can't get any further, I did a lot of searches but nothing works... I'm trying to connect to a Microsoft SQL Database with php using odbc. Everything is set up, as follows (the values between "" are correct in the file): /etc/odbc.ini: [CRMCON...

1
Q: How to create an Vagrantfile that matches Elastic Beanstalk?

gchuckyWe're putting together a PHP site that we plan on deploying to Elastic Beanstalk, and I'd like to create a virtualized dev environment to match production. I've got a few questions about it, though. So it looks like I can use vagrant-aws and feed it a custom AMI - presumably one that would be cr...

0
Q: About URLs using REWRITE in PHP

CecilI have a PHP file and I don't know how to rewrite its URL when 'Borrow Book' link is clicked. In the url, I want the names of the input fields to be posted, not its input values. I have here some some sample links (I can't post image) so it can be better understood: http://localhost/library/borr...

0
Q: Array within an array using Facebook Graph APi

user3109966I have been working on this problem for the last 2 days, searched over and over again .. nothing. Understanding that I am not an expert here - it's good! lol I am trying to get the information found in the link below; https://graph.facebook.com/570215713050551_4508656/comments/?fields=likes.fie...

0
Q: Parsing data to the view using codeligniter

user3017975this is ma function am trying to parse data to the view but i have failed to initailize the arrays to some variables function blogs() { $this->load->model('blog/Den_model'); $this->load->model('Den_model'); $da['qry']=$this->Den_model->get_last_ten_entries(); ...

0
Q: MySQL while loop only loops once

AndrewI have a database activities that stores activities information such as attendees, event description, event time, etc. I call a while statement to print out the data, however the while loops is only looping once: $result = mysqli_query($conn, "SELECT * FROM `activities` ORDER BY `date`"); whi...

0
Q: phpcs menu is not active in sublime text2

MarioI've installed a phpcs plugin for Sublime Text2, it even seems to be installed. But when I right-click on a php file, the PHP Code Sniffer menu is always inactive, as in the screenshot below: Does anybody know how to make the plugin work?

0
Q: Numbering Tree Array

user3111525a have i tree array, looks like this: $testArray = array( array( 'id' => 12, 'address' => 'root addr', 'parent_id' => 0, 'children' => array( array( 'id' => 11, 'address' => 'child addr', 'parent_id' => 12, 'childre...

0
Q: Pressing backbutton on browser going back history url

NagendraI am using window.history.pushState and popstate functions for getting the previous page url's while clicking on back button of browser and i want to reload the page every popstate function calls. My code is.. function refresh_results() { page_link = $("#form").serialize(); if(pa...

-1
Q: How to get rid off the following error and make the code workable?

PHPLoverFollowing is the code: require_once("../../includes/application-header.php"); require_once OCN_ROOT."/core/extention/pdfcrowd/pdfcrowd_config.php"; require_once OCN_ROOT."/core/extention/pdfcrowd/pdfcrowd.php"; $filename = $test_data['test_name']; $client = new Pdfcrowd($username, $a...

0
Q: echo img not working but echo <p> is working in php

user2509932I am using $().load() method to generate elements in an html file. I want to display an image so I have used echo to display image using echo "img" but does not display. but when I use echo "p", it gets displayed.

0
Q: Validating OpenCart password hash in ruby

frankmtI'm migrating a system from OpenCart to Spree in ruby, and as part of that I would like to seamlessly migrate the users so they can keep login in without changing their passwords. Looking at the OpenCart code I've found the login function for the website. I'm not great at PHP, so I'm trying to u...

0
Q: how to upload profile pic for users wordpress from front end

sharathI have tried a lot to to upload an image for each of the users in my wordpress website, I have tried a lot of plugins like user avatar,easy user image, etc but no use, all these plugins uploads user image from the dashboard. I have used profile builder to create an edit profile page but it does n...

0
Q: Strange variables. XSL

user3128979I've such piece of code: <xsl:template match="bottom"> <div class="l1"> <div class="l2"> <div class="fl100"> <div align="center"> <div class="mw" align="center"> <div class="footer"> <div class="f1">$-BOTTOM_COPY-$<

0
Q: phpmyadmin in iframe being redirected

user1999806I am trying to enclose phpmyadmin into an iframe on my website. However, when the user is not logged in, the browser redirects into the full link. It only embeds into the iframe when user is already signed in. <div class="row"> <iframe src="http://nypgis.com/phpmyadmin/index.php" heig...

0
Q: Store Procedure Calling Error

user3110355I create store procedure in phpMyAdmin through cpanel->Localhost its execute correctly when I call in phpMyAdmin but when I call it in my Online it shows following error. Store Procedure CREATE DEFINER=`username`@`localhost` PROCEDURE `GetAccountingLedger`() DETERMINISTIC BEGIN SET @csum := 0;...

0
Q: Magento mageworx not saving well

user3127521I have in my shop custom option with the extentension mageworx. When a edit a option it not good saving the changes. Magento 1.8.0. Is it possible that a make checkbox in each field and that ik can choose which field a wil override and which field not? How do i that?![enter image description ...

0
Q: How to make SoapClient request with complex parameters?

TanSoloThis is the first time I work with SoapClient on PHP. My task is to create a script to automatically send a Soap request to the server. The correct request in SOAP UI is: Soap URL: http://example.com:8181/inventory/soap/inventory-api?wsdl <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap....

0
Q: How to make verification message alert by jquery

user2839993i have this code for view cats of my script <table align="center" width="100%" cellpadding="0" cellspacing="0" border="0"> <td class="td1" width="70%" align="center">title</td> <td class="td2" width="30%" align="center">Delete</td> </tr> <?php $select_cats = $mysqli->query("SELECT * FROM cat...

0
Q: gd library is install but not working

RickyI am using xampp gd lib is installed but it's not working it's gives Fatal error: call to undefined function imagescale() Here it is my phpinfo details: GD Support enabled GD Version 2.0.35 FreeType Support enabled FreeType Linkage with freetype FreeType Version 2.3.9 T1Lib Sup...

0
Q: How Do I Change Properties of an Existing Twilio Number?

SisirWhen I am purchasing a phone number via twilio I can setup various properties for the phone number like this: $sid = 'AC...'; $token = '8...'; $number = '+12345678901'; $client = new Services_Twilio($sid, $token); $response = $client->account->incoming_phone_numbers->create( array( ...

-2
Q: how to use join that pull coma seperated value in mysql

Tnd.exei have tables tbl_restaurant(name,cuisine_id,....) and tbl_cuisine(cuisine_id,cuisine_name) In tbl_restaurant, cuisine_id field contain coma(,) seperated values like (3,6,9,20,31) and when i try to pull cuisine_name using join it only takes first id ie 3 in above case. I had a query: SELECT tb...

0
Q: CakePHP - Related values not showing

Vincent van den BoogaardI'm busy with an invoice project in CakePHP. I've set my related tables in the models, but somehow it's not forwarding to the view. These are my models: Invoice Model class Invoice extends AppModel { public $hasOne = array( 'Customer' => array( 'className' => 'Cust...

0
Q: how to insert sum value into mysql database

user3060742This is my Insertws.php page. I use the below query to insert data's to mysql database, mysql_query("INSERT worksheet SET Date='$Date', Team='$Team', Process='$Process', Item='$Item', Touch='$Touch', issuedwt='$issuedwt', receiptwt='$receiptwt'"); This is my index.php page. I use the below que...

0
Q: Stripping out unwanted embed code

user3059018I am currently looking at a piece of code for a friend and I am trying to strip out a piece of unwanted code but not sure how I can achieve what I want. CODE: <?php $blah = '<iframe src="//player.vimeo.com/video/82444237" width="500" height="281" frameborder="0" webkitallowfullscreen mozallo...

0
Q: Performing Javascript on HTML returned to the browser via PHP

Damilare BinutuI am trying to perform some basic DOM manipulation on html code returned to the browser via PHP, the html are table cells that display information retrieved from a database. Here's what I mean; echo "<tr class= \"data\"><td><a href=\"#\">Explore</a></td><td>$row[id]</td><td>$row[ip_address]</td><td

0
Q: Dynamic html mail process through single list with exact target fuel sdk

DeepakI want to sent a mail through single list every week.html mail and text mail both. It is possible to create one list like "12548" and add the different user like "abc@gmail.com","xys@yahoo.com", - - - -more. Sent the one html newsletter for one user. means different user for different html newsle...

0
Q: PHP request is too long

Jacques Attalihi need to tell that i'm totally new to php and SQL so please take care of that and forgive my mistakes. I have a database with 45 000 rows, i need to extract all 'udid' attribute, so there is a lot of data, i put the result in an array, for each udid i check if udid.xml exist, if the file exi...

0
Q: Bootstrap Pagination is removing href, making links unclickable

Michael FalcigliaI have setup my pagination exactly how bootstrap pagination examples are given. Everything works except the links. Apparently the Jquery script removes the href="link" from the <a> tag. This is what my php script generates in the html without the pagination script <div id="alphabet"> <ul> ...

0
Q: fgetscv(); escape dilimiter not working

Titi masterI am using fgetcsv() function in PHP to read CSV file The problem is the CSV file contains value with semicolon ";" and the function fgetcsv is not escaping it";" . eg : "18";"test";"test";"<p><span style=\"color: #333333; font-family: 'Open Sans', sans-serif; font-size: 14px; font-weight: bol...

-2
Q: varchar not suppoer this character:'

DS9My Datatype is: varchar(500) My Query is like this: $file = "55Beethoven's Symphony No. 9 (Scherzo).wma"; UPDATE `uploadfile` set `file`='$file' where `id`='5' and account_id='5' when i try to execute this query it's through following error: 1064 - You have an error in your SQL syntax; ...

0
Q: Give error 404 on purpose on an existing url

user3128991I received an abuse complaint from my hosting company because a spammer is sending phishing emails linking to a gif in my domain. Unfortunately the image is linked with a thumbnails php page and I want to filter only that particular url with mod_rewrite the url is similar to this http://www.my...

0
Q: CURLOPT_SSL_VERIFYPEER option gives certificate error

user2849371Hi I have following code and corresponding logs. Please let me know if anyone can figure out certificate problem. /////////////////////////////////////////////php curl code////////////////////////////////////////// curl_setopt_array($handle, array( CURLOPT_SSL_VERIFYPEER => true, CUR...

0
Q: Filtering the output with checkboxes in WordPress

Martin van HouteI'm building a page in WordPress with a filter function. Basically I want to change the output of the data when you click on the checkbox. What I have now: <form class="compo-filter"> <input type="checkbox" name="compo-cat" value="indoor" onclick="if(this.checked){this.form.submit();}" />...

0
Q: Save Array of objects into codeigniter

ahmedsaber111I built a form where i have to create array of objects from kind of inputs related to each other like below: { "name_node":{"type":"input","name":"name","validation":"required, alpha numeric"}, "content":{"type":"textarea","name":"contentco","validation":"required, alpha numeric"} } I used J...

0
Q: How to use google to search for strings to check plagiarism?

Th3lmuu90I have a website where users post articles and my goal is to find if their articles are copied or not from another sources. Is there an API from google (I found something yet I don't know if it was what I was looking for https://developers.google.com/custom-search/) to find the string I want and...

0
Q: How to pass a database value in a hyperlink using PHP + HTML

user3115396I have a table in a database called Artists. It contains two bands. What I would like to do is to be able to click on the bands name using a hyper link, send that bands name to another php page to be processed The hyper link syntax i have is throwing up errors: $query = "SELECT * FROM artists"...

0
Q: Datetime php conversions and usage with timezone

user1282407I am trying convert a utc time stored date to another time zone but i cant seem to get it right. I have a time : date1 = new DateTime('first day of the month'); date1.setTime(0,0,0); // Since using the first day of the month seems return the current time with different date The default...

0
Q: Dynamic table with checkboxes

user245679I'm creating a site and what I need is to create a page "Modify and delete users" accessible only to the site administrator. This page must be possible to delete and change user data. These users are stored in a database table, and there are information such as username, passowrd, name, etc.. So...

0
Q: Mysql Converting date to days of week

user689017I have the following query which gives me the visit_date for each client: select visit_date from visit The output of the above query is the timestamp when the entry was inserted into the Database , it will appear as follows : visit_date 2013-12-21 06:31:04 2013-12-21 11:05:30 2013-12-21 2...

0
Q: php server doesn't seem to execute code, although server is running

Badescu AlexandruI haven't worked in a very long time with php so this question may be a very noob one. I've installed apache server 2.0.65, and although when i call the localhost, my page in htdocs gets executed, only the html code appears in the view. The php code appears in the source view as html would, thu...

0
Q: PHPExcel print a range area

user3092049i need to store in a variale the content of a cell area and after print the value. The code that i use is: $type=$objPHPExcel->getActiveSheet()->setAutoFilter('C4:E4'); echo $type; but it doesn't work.How can i do? Thanks

0
Q: a way to validate form fields with same name attribute

FortranI have the following form. <form method="post"> <input name="lang[bg]" value="foo"/> <input name="lang[en]" value="bar"/> <input name="lang[de]" value="baz"/> <input type="submit" /> How can I validate fields and show the errors in this case?

0
Q: IE decodes umlauts in encoded urls to wrong charset

flecI have a file url (file:///...) with an umlaut in a intranet solution. The url is encoded which turned the ä into an %C3%A4. When I click the link in Firefox/Chrome the character is an ä and the file is displayed. In IE the character is changed to à which results in a 404-error. I tried with a...

0
Q: mysqli->multi_query INSERT INTO no result

AnujBasically what I'm trying to do is registering a user via ajax when a user submits a form. I want my data to be stored in 3 different tables. So here is the code I'm running $sql_insert = "BEGIN; INSERT INTO $table_name_primary (role, email, verified) ...

0
Q: Twig PHP Template Engine Class 'Twig_Loader_String' not found

Hasan NaturAm Trying To use the twig template engine , i included the "Autoload" file from the lib folder as bellow : require_once 'lib/Twig-1.15.0/Twig-1.15.0/lib/Twig/Autoloader.php'; $loader = new Twig_Loader_String(); $twig = new Twig_Environment($loader); echo $twig->render('Hello {{ name }}!', arr...

0
Q: Laravel eloquent show group directly instead under the user

madziikoyThe code: public function exploreJoined($page = 1) { $user_id = Input::get('user_id'); $joined_networks = User::whereHas('groups', function($q) { $q->where('is_blocked', '=', 0); })->with('groups')->where('uid', $user_id)->get(); return Responser::assert(200, $join...

-1
Q: Php does not store dynamically added extra input fields data

mansi had following html code for add more input fields to my form, but when i submit form database does not store extra fields data, i got only first field data. HTML <h2><a href="#" id="addScnt">Add Another Input Box</a></h2> <div id="p_scents"> <p> <label for="p_scnts"><input type="t...

0
Q: Remove the "view" segment in a CodeIgniter url

user3129131I am a newbee to CodeIgniter, I have a page which is called by http://www.example.com/pages/view/about is it possible to just use http://www.example.com/pages/about if yes how to do it? thnak you for your help.

0
Q: Laravel Request::Intended goes to home

dasmikkoI'm making this authentication filter, but when it gets to the Reguest::intended() it just throws me back to the homepage. Example: Tries to access forum.dev/admin -> Forces me to login -> Password and username is correct -> Goes back to forum.dev/ where it should go to forum.dev/admin How do ...

0
Q: Site removing www from URL/address in magento Hosted on Plesk server

Mahmood RehmanI posted this question on magento.stackexchange but not get my solution so posting here.Can view on this link. I want that user can access my site with or without www.But it didn't work with www. My site removing www from address and redirect to non www address like http://example.co.uk.I write t...

0
Q: Kohana and Wamp Server issue

plotusI would like to comment the following issue that I have, and know if you have any solution. I have to add a web page that was hosting a function on wamp server to do the necessary tests locally . My case is the following : the website is scheduled under the framework Kohana version 2.3.4 . The q...

0
Q: Replace items in a url string in php

poorvankbhatiaI am new to php. And i am trying to replace the "hash(#)" in the url string with "ampersand(&)". for example : if the url is :` http://www.abc.com/Cat/pgecategory.aspx?cid=8730&via=top#pge=2&pgeSize=36 i want to change it to http://www.abc.com/Cat/pgecategory.aspx?cid=8730&via=top&pge=2&pge...

0
Q: Loops on SQL Select

user3114471i have a problem, my page PHP make loops. I select into my DB only 2informations like this : $sqlins="SELECT hardware.name, rd.cmd FROM hardware, rd WHERE hardware.name LIKE 'Boomee' AND rd.cmd LIKE 'putty'"; $toto = mysql_query($sqlins); it's an exemple of my request. And when i use the loop...

-1
Q: HTML isset and value relation

Baran SengulI have a form and fields are name, surname and email. When I filled name but did not fill surname and email fields I want to name area write name area.(I did not write all codes.) I hope u can find where is my mistake. <?php if ($_SERVER["REQUEST_METHOD"] == "POST") { $name = htmlspecialchars(t...

1
Q: calling a php function using ajax after interval of time

user3122618hi i am working on a codeigniter project. I want to execute a php function after an interval of 10seconds. When a user visits that specific page after 10 seconds i want that php function to be executed. In that php function i have set a counter which adds 1 to the specific table into the database...

-1
Q: PHP is_numeric validation not catching letters

knot22The following function is supposed to allow empty an empty field to pass the test, allow a positive integer to pass the test, fail the test if a field contains any letters: function fnValidatePositiveInteger($v) { return (!empty($v) and (!is_numeric($v) or $v < 0 or $v != round($v))) ? 0 : 1...

0
Q: joomla 3 php if else statement

user991830I have the following statement in my Joomla 3 index.php file that I am trying to work out: <?php if ($this->countModules('right')) : ?> <?php if( JRequest::getVar( 'view' ) == 'article' ): ?> <div class="col-md-<?php echo $right; ?>"> <section class="sidebar right-sidebar"> <jdoc:inc...

0
Q: CodeIgniter error showing core file path instead of the working file path

pixelngrainJust wonder how I can setup the system in CodeIgniter so all error path and line number directly shows to my working file instead of any core file path, filename and line number. For instance I'm having error on file Filename: application\core\MY_Model.php Line Number: 59 but it showing erro...

0
Q: Mysql query to aggregate data with a column values becoming columns in result

Mona CheikhnaI have this query that i've been trying to get right but couldnt so far. I have a table s_states : +-----+----------+------------+---------------+ | client | groupe| date | success_rate | +--------+-------+------------+---------------+ | c1 | 1 | 2013/12/01 | 40 | +--...

-1
Q: echo results with DIV

NathaliaZeedI'm trying to get results into my html page from a mysql db using an external php file. I want to be able to echo the results together with the DIV tags so I can get the results including the DIVs into the html page. How do I add the DIV (below) in to the mysqli_fetch_array results and echo the r...

0
Q: "connection was interrupted" error while sending big package through WebSockets

sashok1337I'm using phpDaemon and WebSockets in my project, there is one page with data being updated at real time. Project is hosted in third party hosting service. With growing amount of information in the page i have experienced the following problem: in case if the package sent from server exceeds the ...

0
Q: Handler for method call

user3050705I'm in view file and I want to execute a helper: echo $this->url(); I want to write the handler for checking if method url() exists in view class. How can I do it? __get() method is only for object members? Is there something like this for methods? class View { public function partial() ...

0
Q: phpinfo() works fine, but any other php code thrown a 500 HTTP code

Andrea MoroI'm trying to create a VirtualBox that I can recycle across multiple projects, using a shell script to install all packages I need. I got Apache2, MySQL and PHP5 installed regularly and running a page that contains works fine. The same for a static html fine. However, if I try to run everything...

0
Q: Bind buttonClick() Event to PHP Function

RazorI am a rookie in PHP and have just started learning the basics of this language. I have created a page login.php that contains a text field and a password field. What I want to do is, on the click of the submit button, I want to call a PHP method, authenticateUser() that I have defined on the sa...

0
Q: JMeter: How to replay a file upload and download jmeter testcase

user1134090I am trying to test a web application having upload and download of files as a feature. I am able to record a upload and download scenario successfully. But I am not able to replay the test case and look up for a file literally getting uploaded (from a location specified my me) and getting down...

0
Q: how to select a particular field and display it's output in mysql

user2281190I am very confused about the error when i use this code :- <? $result = mysql_query("SELECT * FROM users"); $array = mysql_fetch_assoc($result); $last = $array['lastactivity']; echo $last; ?> it doesn't show any output but when i use the above with WHERE username='$user' or any oth...

-1
Q: While in compering value to array keys

Wojciech SzabowiczWell i have a solution that looks foreach($overdue_tasks as $task) { ?> <li> <a href="<?php echo $task_url.'/'.$task->id; ?>" title="Przejdź do zadania"> <i class="icon-arrow-right"></i> Spóźnione zadanie ID: <?php echo $task->id; ?> ...

0
Q: decode twitter dinyurl to get full url link

user123I need to decode tinyurl coming from tweets, <?php $url = "http://t.co/vpDXYaXl7m"; $full = URLDecode($url); echo "URL is $full"; function URLDecode($url) { $ch = @curl_init($url); @curl_setopt($ch, CURLOPT_HEADER, TRUE); @curl_setopt($ch, CURLOPT_NOBODY, TRUE); @curl_setopt($ch...

0
Q: cakephp: saving to multiple models using one form

Sandara KwonI have one form that saves a person with many parts and many colors but it's not saving the parts and the colors; only saving the person(main model). On my list view, part of script: echo $this->Form->input('Person.person_name', array('required' => true, 'placeholder' => 'Name Your Person', 'la...

1
Q: FosMessageBundle sendId cannot be null

aybarscengaveri implement fosMessageBundle with my message bundle, but if want send a new message use fos_message.composer , i got that error. An exception occurred while executing 'INSERT INTO Message (body, created_at, threadId, sendId) VALUES (?, ?, ?, ?)' with params ["Test mesaj\u0131", "2013-12-23...

0
Q: Zip file not downloading in PHP

UltimateI've implemented the code to Create Zip Folder of Files (from db path) and download zipped folder in PHP. I am using Ubuntu OS. public function actionDownload($id) { $model = $this->loadModel($id, 'Document'); $results = array(); $results = $this->createZip($m...

0
Q: Error on reading from localfile

user3129226m stuck and i need any help if is posible The problem is that if he can not connect to ip , he stop.. dont jump to next ip from the list ip.file. It should take line by line I dont know what to do anymore.. this is my code <?php error_reporting(0); $_UserFile = "user.file"; $_PassFile = "pas...

-4
Q: how to fecth the whole data from db which has multiple pages of data

DNRI need to fetch all data in my database.My database has multiple pages.While executing the query to fetch all the data from my DB;it only fetches the data from the first page.All other data are not getting fetched

0
Q: Message Queue in PHP

Neel KamalI have developed a rest api which accepts some data and store it in a message queue (Redis List). Now from redis this data is pushed into MySQL database. The problem is client needs to wait till the data is written into mysql. I want that the client should wait till the data is written into mess...

0
Q: opencart Sub Category products in main category in admin

AsifFollowing is the vqmod that shows all sub category products in main category. I want use same functionality in admin category so that all subcategory images can shown in parent category. Please Help <?xml version="1.0" encoding="UTF-8"?> <modification> <id>Display products in sub-categories ...

-1
Q: php function to read subdir content

kosI would like to ask what I have to add to make this function to show not only the files on top dir but also the files in subdirs.. private function _populateFileList() { $dir_handle = opendir($this->_files_dir); if (! $dir_handle) { return false; } while (($file = r...

0
Q: Laravel JSON reading from POST

Vit KosSuppose I have a resourcefull route in Laravel 4.1, like next: Route::group(['prefix' => 'api',], function() { header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Headers: Content-Type'); Route::resource('user','UserController'); }); And I have controller method ...

0
Q: How to reduce the no. of page referesh

Let me seeI am using Yii and i have created a page in which there are 10 links. Whenever a user clicks on a link,a session is created containing the corresponding value.Although everything is working fine and the sessions are also getting created successfully but the problem is that With every click the wh...

0
Q: Jquery radio button submit repeats same value multiple times

user3047285I have problems creating report system. Plan is this: User has 4 radios to select and then submits one of them. First submission inserts only one row in mysql but every after that submission inserts more and more rows. Here is the code: profile.php <form id="myform"> bully<input type="radio" ...

0
Q: How to Search the Text Area field in Sugar CRM

user3069222I Want to search the description field(Text Area field) in Sugar CRM and I am Using Community edition. And Is it possible in doing the procedure given in below link??? http://www.soulbroken.co.uk/2013/02/turn-on-unified_search-for-users-in-sugarcrm/ Can any one give me a clear answer. Mani.

0
Q: How to create submenu(dropdown) in dolphin7.1?

user3129297I've been looking for how to create a submenu(dropdown list) in menu link through Dolphin7.1 admin panel. I've seen in the "Builders > Navigation Menu" options but couldn't found any thing about this. It is creating menu easily but no option seen for submenu.

1
Q: Multiple checkboxes with unique ID's through ajax

Simon AspI'm working on a website which should be done any time now, but I've got a new task to complete where I need to check check-boxes to simply archive news items. Or "blog posts" if you like. The idea is to have a check-box on every blog post and if you check that check-box, the post should be arc...

0
Q: how to remove unwanted characters from string in PHP

user3099298When i read an array i got value set like this "lat" : -37.8087928,. I want to only -37.8087928 part. what is the correct way to do that. I did it in this way: $value = '"lat" : -37.8087928,'; $ex = explode(':', $value); and $ex2 = explode(',', $ex[1]); final resualt $ex2[0] is this cor...

-1
Q: Making PHP output Bold

Brian J KirkI am having trouble figuring out how to make my php output bold, I have tried but I receive and error when I try that. I have tried to search this topic but none of the answers seem to be helping me in my situation. while($row = mysql_fetch_array($oPlayerInfo)) { Print "".$row['FirstName']."...

0
Q: Personal URL for website premium members

user3129227I'm building a website that lets you view a members (Basic Member) profile with a url of say, http://www.website.com/user.php?id=123456789, which is fine for what I'm doing, but for premium members I'd like to give them a more personalised url, say for example: website.com/user.php?id=1234567...

0
Q: Download multiple images from remote server with PHP

subbunI want a php script that download multiple images from different URL and save in my remote server. http://sitename.com/images/image1.jpg http://sitename.com/images/image2.jpg http://sitename.com/images/image3.jpg can any one please provide the full working php code. I know that i can copy on...

-1
Q: Start point in string - PHP

user3059018I asked a question earlier on how to define an end point of a string. I have now worked that out, however I am still needing to strip some more unwanted code from my string. <?php //BLOG POST INPUT HERE $x = '<p style="color: red">Test</p><iframe src="//player.vimeo.com/video/82444237" width="...

-1
Q: php error (when i click on create post it logout and session end and redirect into index )

user2953370This is full project you can find the error in posts the image the error is in this lines in the image when i click on create post it logout and session end and redirect into index

0
Q: upload asp.net using ajax FormData

yozawiratamai have a file upload code from nettuts but this is php, i try convert this to asp.net use jquery ajax and asp.net webmethod. this is html : <form method="post" enctype="multipart/form-data" action="upload.php"> <input type="file" name="images" id="images" multiple /> <...

0
Q: How to echo Wordpress Author ID in author.php?

NewUseri have a custom theme with frontend E-Mail and Facebook login. Every user gets the author role by default after registration. How can i echo the USERS ID in the frontend wich shows up by hovering about the users name in the backend? I tried this: <?php echo the_author_ID(); ?> But it does n...

0
Q: How to remove Phishing alert message in gmail?

Genx88I am stuck with a problem and I need assistance, We have a system which triggers auto-generated mail, where in mails from all module ends up in inbox, but mails from a certain module shows up "Phishing Alert inside Gmail's inbox", which is not supposed to be, as we are worried about our reputatio...

1
Q: Assign checkbox items to MySQL db TEXT column

user3129325My HTML form has three check boxes; <input type="checkbox" name="numb" value="1">1<br> <input type="checkbox" name="numb" value="2">2<br> <input type="checkbox" name="numb" value="3">3 How can I assign the checked items into a TEXT variable of a MySQL database, separated by a single space?

0
Q: insert large string into json object

Fawazi have problem when insert large string into json i need to make sure there would be no mistakes when insert this large string into json object by filter the article from special characters like (!@#$%^&*()\|';:./) and smile faces before insert it for example if i have this json { "Article"...

0
Q: Authentication for bandpage api

user3128062Hey First time poster so take it easy on me. I am trying to access the bandpage api using this scrpit which I found on github. I have very little experience with php so can't really figure out what is wrong with this. This is the script <?php function bandpageToken($client_id,$shared_secret) {...

0
Q: How can i get world wide VAT rates in PHP?

user3129330How can i get world wide VAT rates? I can find EU countries VAT rates script. But I cant find VAT rates in Worldwide.

0
Q: Format opencart select option value

user2689642I have the option named artwork which has 3 values (We Design Single, We Design Double, Upload Artwork). I want to edit the view product.tbl to format the "We Design Single" and "We Design Double" So it only shows as "We Design". I think this is the part of the code i need to edit but unsure h...

-4
Q: Creating a Bitcoin/Litecoin/AltCoin game

NeurofluxationI've been creating a CryptoCurrency game. Everything is done except the integration into the wallet. Does anyone know how this can be done? I can't seem to find any documentation on how to do it? Merry Christmas!

0
Q: how to change google map v3 marker icon on mouseover of div/link

Yogesh SaroyaI want to change the icon of a marker on google maps when I mouseover the text in a div/link. how to change marker icon on below code ? Code : var locations = [< ?php if (isset($place)) { foreach ($place as $lat) { ?> ['< ?php echo $lat['marker']; ?>', < ?...

0
Q: setting up apache to redirect all subdomains to a specific file

user3081534I want help that how to setup apache to redirect all the subdomains to a fixed file but the URL remains same like: when a user request the a.example.com or b.example.com it will be redirected to index.php and get same result in both.

-5
Q: I need free web to print solution in php

Mohamed HabeebHere can anyone tell me. there is available any free web to print solution in php like http://www.uprinting.com/ http://www.printvenue.com/

-4
Q: Sum Filtered Data After Filter Is Applied in php

user3060742team issuedwt receiptwt sri 100 100 mm 100 100 Total 200 200 If i filter team 'sri' i need total as 100 as in the database. How to Sum Filtered Data After Filter Is Applied. I using php mysql.

0
Q: Wordpress pdf attachment theme_support

jolenHow do I enable wordpress pdf attachments on a custom post type - can i use something in theme_supports? I can attach them via the media library - but how do I do that from within a post?

0
Q: How to convert provided single line of cURL code with inline parameters to a format using curl_setopt()

Eric BrockwayI'm trying to use an API from avalara.net to get sales tax data and their API documentation lists what appears to be essentially a single line of code with a long string in JSON format for connecting to their API via cURL; I'm not familiar with this single string style and am trying to convert it...

0
Q: How to generate rows and columns dynamically for users and their roles in php

Sapthagiri I have got a requirement where I need to present employee attendance for the Manager to take down the attendance in a single page. Wherein the Manager selects the date from the date picker and provides attendance fro the employees. Like if I can display rows as "Roles" and Columns with "Employees...

0
Q: How do I get the last id from a table after multiple insert

Army DesignI am adding data to three tables, I needed to get the last ID of the first table to use in the second table, which was successful with $this->db->insert_id() function, Trying that with the second table still gives the ID of the first table. The arrangment of my code is function addcrm() { ...

1
Q: Flash AS2 loading XML from php script

bitdiegoi have this problem I have a Flash application that needs to read an xml file which is dinamically generated by a php script. The swf and html files are on a different server with respect to the php script I use the xml object and this is the piece of code: var _xml:XML = new XML(); _xml.ignore...

0
Q: the session end automatically when i create a post

user2953370--------------------post.php------------------------ <form action="postdata.php" method="post"> <textarea name="textarea" ></textarea> <br/> <input type="submit" value="Create Post" name="Submit" /> </form> ----------------------postdata-------------...

0
Q: Data corrupted after download through php form

user2893605<?php global $table; global $act; global $upload; if(!isset($_SESSION)) { session_start(); } include('db_connection.php'); if(isset($_POST['choose_lang'])) { $table = $_POST['choose_lang']; } if(isset($_POST['action'])) { $act = $_POST['action']; } if(isset($_GET['upload']...

0
Q: Codeigniter handling errors in Model and Controller

JackLipariI'm trying to handling errors in Model and then pass them to Controller, but I can't catch the error in the Controller, I'm sure I'm doing some errors, but I don't know where. Here the Model: public function updateOpera($image_id, $title, $author, $year, $annotation) { try { $c...

-1
Q: preg_replace_callback() not replace pattern with a function in class

JuST4FuNI ve a function in a class that replaces patterns. part of the function is below. $text = preg_replace_callback('/\[dekanlik\]/',function (){return $this->dekanlik();},$text); dekanlik() is another function in that class which lists the members. works in local (PHP Version 5.4.21) but not wor...

0
Q: which username and password should be give in order to connect to database ,

user3123134i have those usernames and password `User name : AmirAman Pin : ** Password : ********1 Parallels Plesk : qatarreal password : ******2 DataBase : username : amir password : ***3 when i type this code in index.php file . it doesn't work and Internal Server Error apperar enter code here <...

0
Q: Google Maps API v3 KML & MySQL Integration

imbayagoI would like to know if it's possible to use the Google Maps API v3 to create a web app that can store custom routes into a MySQL Database other than read the custom routes using a stored KML file. Which option would work better on the web app? Database saved custom route or the KML version. I ...

0
Q: Form inputs to class properties

The EscapistI'm trying to learn OO PHP and I'm working on a contents manager project, I want to construct an object starting from an html form. For example, if I have a form with ten textbox (or other types of input), I sent the form in POST mode, then I want to construct my object starting from POST data. ...

-2
Q: Abstract class and implements

user3090649I have a class which contains an abstract method, which is implemented in child class. class A { public abstract function A(); } class B extends A{ public function A() { return true; } } How i can get B class's A function value in A class? The classes are in different files and cl...

0
Q: fuser process php5 cron job using high amounts of cpu

user2708100We are seeing our server's CPU spike at 30 minute intervals. this is likely caused by php5 job to cleanup session files. this is taken from our /etc/cron.d/php5 on the server: # /etc/cron.d/php5: crontab fragment for php5 # This purges session files older than X, where X is defined in seconds #...

0
Q: .htaccess throwing my website in disarray

and0rskSomething odd is happening to my website. I added a DirectoryIndex wp/index.php to my .htaaccess. It works fine in that my home page is now index.php however there was a side effect. Now, when I go to my website and I click a link, although the url is correct it doesn't load the page. Instead it ...

0
Q: PHP TCPDF ERROR: Unable to create output file the folder exist and has the right permissions

danieleI'm trying to save a pdf file using the html2pdf PHP class. The code is this: $this->html2pdf->Output('directory/file_name.'.pdf', 'F'); But I have alway this error TCPDF ERROR: Unable to create output file the folder 'folder' (the name is an example, obviusly), exist and has the right permi...

-1
Q: When i create post from post.php it session end and it log out and redirect to index.php

user2953370Download Full Project Files here --------------------post.php------------------------ <html> <?php session_start(); ?> <head> <meta charset = "utf-8"> <title>Posts</title> </head> <body bgcolor = "#F0F0F0"> <table border="0" width="100%" height="100%"> <tr> <td height="200" width="...

0
Q: Redirecting to a specific file from all subdomains using htaccess

user3081534I want to redirect traffic to a specific file when user requests a.domain.com/index.php or b.domain.com/index.php it will redirect to domain.com/index.php

 
11:55 AM
0
Q: PHP Combine Two Matrices Where Value is same

user3057706I have two arrays in PHP, one set of data looks like this: [['name'=>'tom','age'=>23,'phone'=>0123456], ['name'=>'john1','age'=>23,'phone'=>625328]] And the other looks like this: [['name'=>'james','age'=>26,'phone'=>1244124,'icon'=>'me.jpg'], ['name'=>'john2','age'=>25,'phone'=>625328,'icon'=

0
Q: Folder and files are there but I get 404 error

Ahmar AliI accidentally moved a folder on my server through my ftp client. It contained stylesheets and css files. So it broke my site. I realised it and moved the folder in the root again. But even still I get 404 error even though the folder and files are there. When I rename the folder to stylesheets12...

0
Q: Making a model persistent in the controller using doctrine2 or making the model persistent it self

dan87Hello I'm new in doctrine and I don't know what to do in the following situation: I have a controller which create a new model object "Ad". Who has the responsability of making that object persistent in the DB?. The controller because it created it? or the model it self? Acording to MVC, the mo...

1
Q: Calling a PHP script using ajax

user3122618hi i am calling a php file using ajax after an interval of time. In my php file i simply echo a text line. But it didnt show me any output after time interval.. here is my ajax code form where i am calling my php file.. <script> $(document).ready(function() { setTimeout(function() { ...

0
Q: Exclude a specific PHPCS rule for a specific file

josef.van.niekerkWe're using PSR0, PSR1 and PSR2 standards in our project, but I want to exclude a specific file from just the PSR0 namespace checking rule. Is there a way I can add a comment to the file, so phpcs ignores this rule: Each class must be in a namespace of at least one level...

1
Q: Symfony2 and date_default_timezone_get() - It is not safe to rely on the system's timezone settings

MilosI have a Symfony2 project. I updated my php to 5.5.7 today and since then, I am getting the Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case yo...

0
Q: ffmpeg comressed mp4 video is not playing on mozila file currupt error

user2519007I have compressed mp4 video using ffmpeg in php environment. Videos are being compressed but these are not playing in firefox showing error "Video can't be played because the file is currupt" while this video is playing fine in VLC media player also in chrome browser. My code of comression is as-...

0
Q: Library using PDO object

gvnI'm writing a library which requires a database connection, so it requires users to pass a PDO object as a parameter of the constructor. But as many of you know, PDO has 3 different error reporting mechanisms: Silent mode, warning mode and exception mode (http://www.php.net/manual/en/pdo.error-h...

2
Q: PHP command line error : Timezone database is corrupt

Hussain TamboliMy date.php is - <?php echo date('Y'); When I execute php -f date.php on my staging machine, I get error - PHP Fatal error: date(): Timezone database is corrupt - this should *never* happen! in /home/staging/test/date.php on line 2 But when I execute the same on my local / dev machine it ...

0
Q: Using Date time diff with timezones

user1282407I found a link earlier regarding using time diffs and getting the difference in minutes, hours and days: How to get time difference in minutes in PHP I was trying this: $date1 = new DateTime('first day of this month', new DateTimeZone('Europe/Amsterdam')); $date2 = new DateTime('fir...

0
Q: Search and open for file

SteppingHatI have a script that I have made so far which looks for a specified file in the current directory and if it isn't there, it will go up a directory and search again. If the file exists the script works fine, however if it doesn't it goes on until the script is cancelled for being longer than 30 s...

0
Q: Why I'm unable to download a pdf file which is already present onto server?

PHPLoverFollowing is the code: define(ADMIN_ROOT,'/var/www/abc/pqr/web/control/'); $filename = $test_data['test_name']; $flname = ADMIN_ROOT.'modules/tests/test_pdfs/'.$filename; header("Content-Type: application/pdf"); header("Cache-Control: no-cache"); header("Accept-Ranges: none"); header("Cont...

0
Q: PHP dividing by 10, adding +1 when result is greater than .0

Michael FalcigliaI am new at programing and I am trying to figure out how to write a variable correctly. To calculate the number for this variable I have to divide by 10 and if the result does not evenly divide, I need to add 1 on to it. So for example, lets I have to divide 294 / 10, I would get 29.4. In this c...

-1
Q: how to send id and fetch data from database and print the values using php in jquery mobile

user3121701how to send id and fetch data from database and print the values using php in jquery mobile. At present am having list view in which a list item is clicked it has to get that id and fetch data from database and print it in new page using php in jquery mobile. Can someone help me how to do this ...

0
Q: Yii loses session after redirect

6yt9BkaI have yii project and in Chrome sessions is lost. Example: config in main.php 'session' => array( 'class' => 'CDbHttpSession', 'autoStart' => false, 'connectionID' => 'db', 'sessionTableName' => 'ph_YiiSession', 'autoCreateSessionTable' =

0
Q: Creating MYSQLI only once

Charlesim trying to create my db connection this way. In Functions_BD i would like to create connection to BD and define all my functions (Login, Insert, Selects...). My class looks like this: class functions_BD { private $mysqli; function __construct() { require_once 'config.php'; $mysqli...

0
Q: URL query string not changing with .htaccess file

MalikI have this url: http://example.org/product.php?course_id=$x And I want this url changes to this: http://webeducate.org/Course-Name this is may code in .htaccess file: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^...

0
Q: ShortCode Wordpress doesnt work

Darko PetkovskiI have a shortcode that I put in my post but somehow it doent execute for some reasong. Here is the code I have: my shortcode php: add_shortcode('teammate',function($atts){ $classes=$atts['country']; $imgUrl=$atts['img']; $name=$atts['name']; $des...

0
Q: Symfony2 Extending Controller getParameter()

Nigh4mareI Want to extend Symfony2 Controller to my project that is using API but I am having error of a non object use getParameter() function look at my code: namespace Moda\CategoryBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; class ApiController extends Controller { ...

-2
Q: I need help on a do_form.php file where i need to check to validate the form.php

Dan DaviesI have completely drawn a blank on this question i was given at university any help would be appreciated. Write the PHP code for do_form.php that will handle the post from form.php, where the below form resides. The code must check that the user has entered both a name and email address, and th...

0
Q: Apple APNS, on sever cant send push with php

mialkanI have been trying to send push using php on my server but I coulndt send. With same .pem file I tried to send push on my mac and it was successful. here is my code. $passphrase = 'pass'; $ctx = stream_context_create(); stream_context_set_option($ctx, 'ssl', 'local_cert', 'ck.pem'); stream_c...

0
Q: Fix LOAD DATA INFILE when an entry has a \n

SongoI'm trying to load a csv file into my database using: LOAD DATA INFILE '".$file."' IGNORE INTO TABLE ".$table." FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' IGNORE 1 LINES The file looks like this in a text editor: header1...

0
Q: How to add comments to post with Mysql and PHP

swissedI managed to add comments to the table of Comments but it doesn't appear to the related post. I understand because the foreign key (artID) in the articles table is empty. How do I fetch the primary key from the articles table? Here is the structure of my database. SQL injections issues will b...

0
Q: problems with inheritance of variables over many pages

user2202625I have this code on bootconfig.php that is loaded in all of my pages. // What languages do we support $available_langs = array('en','it'); // Set our default language session $_SESSION['lang'] = 'en'; if(isset($_GET['lang']) && $_GET['lang'] != ''){ // check if the language is one we suppo...

-1
Q: How to echo array value in php?

user2834795I have an array $transactionDetails whose output comes out to be when I print_r($transactionDetails): Array ( [METHOD] => gettransactionDetails [VERSION] => 65.1 [PWD] => ######## [USER] => ###-facilitator_api1.gmail.com [SIGNATURE] => #######-ANdhu9ESaTkLG1iBBuUtsLA91D.M ...

0
Q: add to cart in core php script used 3 table in my project

user3064563 add to cart in core php script used 3 table in my project, one table store in add to cart but more than table table not stored in add to cart using session. my program are . <?php $product_id = $_GET['idproduct']; $action = $_GET['action...

0
Q: how can see who's online using timestamp function?

user2281190i am having problem showing how many users are online using timestamp function. what i am doing is storing last active time in 'lastactivity' database column using time(); function and updating it whenever user refreshes the page. here's code for showing lastactivity :- <? $result = mysql_query(...

0
Q: Symfony/Doctrine users in multiple databases

Rick SlinkmanFor a project we would like to use multiple databases containing different kinds of users. The website is divided over multiple subdomains. That means: 1 subdomain has 1 database. We have 1 central database to keep up with the existing subdomain databases. In the central database, we have admini...

-1
Q: how to simplify this php code using array

samI have a 'loop' to go through but I can't work out how to do this. I want to do something like array1=(2,3,10,11,13) array2=(20,22,24,27,29) and then loop though for each. Here is the long hand version that I want to produce. Thanks in advance... <?php if($values['2']['value'] == 'No'){echo ...

0
Q: URL query string not changing with .htaccess file

MalikI have this url: http://example.org/product.php?course_id=$x And I want this url changes to this: http://example.org/Course-Name this is my code in .htaccess file: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ 404page.ph...

0
Q: Wordpress custom post types and categories, posts not showing up from custom post types when queried in index.php

deadmanI have a set of custom post types in my wordpress theme, and a category named Home, to show particular posts from all post types i wish on main index.php template page. What i am doing is adding the custom post type like this in my functions.php - function livingroom_post_type() { $labels = a...

0
Q: PHP cannot modify class private var from constructor

salivanI've a function: function printCaptcha($formId = NULL, $type = NULL, $fieldName = NULL, $htmlClass = NULL) { require_once(SITE_ROOT . '/visualCaptcha/inc/visualcaptcha.class.php'); $visualCaptcha = new \visualCaptcha\Captcha($formId, $type, $fieldName, $htmlClass); $visualCaptcha->sh...

0
Q: generate range based on strings

Dmitry DubovitskyIs it possible to generate range based on string merged with numbers: AB0000003 - AB0000010 to AB0000003 AB0000004 AB0000005 AB0000006 AB0000007 AB0000008 AB0000009 AB0000010

0
Q: Yii IN Query is not working

Let me seeI am trying to create a query in yii but its not giving the desired output but throws error $name=array('tata','classmate'); // $result= implode(',', $name); $mydata='("tata","classmate","adas")'; $records=Yii::app()->db->createCommand()->select('productName')->from('products')->where( var_dum...

0
Q: how included websites work

user3052629well i was looking at some topics that is talking about my question but couldn't find or understand my specifics. i have users, i want redirect that user to a website outside my web, stay there for 10 secs, and then click a button that is confirms that he is waited those seconds, i was thinking ...

0
Q: PHP+MySQL: Search entire table for a keyword

Alex DeiworI have a trivial question. Im using PHP+MySQL managing a huge DB I want to search in a entire table a keyword I write in a input. The problem is that the main table have +100 columns, so I had to write the php query manually [...]$sql="select * from db where ID LIKE '%".$q."%' or USER_ID LIKE ...

0
Q: Laravel 4 workbench not defined

Laky I have already made one workbench and everything was ok. After a while I tried to create a new workbech and got error. Any help?

1
Q: Gmail transforms and removes HTML and CSS contents [PHP]

MehdiI'm working on a WebApp which generates some QR codes and sends them by mail to the client. I have read that to let gmail interprets correctly the CSS of the mail etc.. I should include it in the HTML in the inline way. this is my code : $qr_images_url = "http://" . $_SERVER['HTTP_HOST'] . "/G...

0
Q: Handle tmp file in form upload and pass the file to other form before uploaded

RavgI need help badly , can't fix it to working like i want..! I have two forms , one is contact form , and the other is image upload inside the contact form,the forms using AJAX for proccsesing. I dont want to move_upload_file unless the all form(contact)is submited. so so far its all working, e...

0
Q: How i set the my plugin html in body in joomla

Pritesh MahajanI want to set my plugin HTML in body tag in joomla. below my code $doc =& JFactory::getDocument(); $doc->addStyleSheet(JURI::BASE().'plugins/system/-------/css/abc.css'); $doc->addScript('http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js', 'text/javascript'); ...

0
Q: Redirect request to subfolder with the parameters using htacess

ArpitaNeed to create an .htacess file to a sub folder "public" with the preceding url suppose my url is something like Base_url/MVC/items/viewall where Base_url/MVC/ is path to my folder which I would like to redirect at Base_url/MVC/public and items & viewall are my value for some parameters I am cur...

0
Q: FuelPHP ORM cannot insert related table

veeMy database: CREATE TABLE IF NOT EXISTS `ws_accounts` ( `account_id` int(11) NOT NULL AUTO_INCREMENT, `account_username` varchar(255) DEFAULT NULL COMMENT 'username', `account_email` varchar(255) DEFAULT NULL COMMENT 'email', `account_salt` varchar(255) DEFAULT NULL COMMENT 'store salt f...

0
Q: mysqli connection error across servers using php

CDubYaaI am trying to connect to MySQL database which is on another server using PHP connection. I am getting the following error and can not figure it out. Thuis is the error when I include the port: Warning: mysqli_connect() [function.mysqli-connect]: (HY000/2005): Unknown MySQL server host 'xx...

0
Q: Search by product id

Mr_GreenIf we want to search by name or sku, we can just alter the their respective attribute settings in admin panel. But how to search by mentioning product id? I thought changing Mage_Adminhtml_Model_Search_Catalog would do the same but I figured it out that it doesn't. $collection = Mage::helper('c...

0
Q: Symfony2 Doctrine2 Many To Many get all entities with they relation entities

VardiusHow to get in controller using one SELECT all entities from one table with his entities from another ? for exaple if i have a tables: applications and categories (many to many realation) and i want to get all aplications with their categories using one SELECT. How to do that ? InnerJoin ? Then ...

0
Q: Explode white spaces in a string excluding what's inside quotes

JulienI can't figure out how to explode white spaces in a string excluding what's inside quotes. I have found several regular expressions that can do the job, but the particularity here is that the quotes are preceded by an equal sign: string = 'arg1="value1" arg2="value2" arg3="value3 value4 value5"'...

0
Q: How to select 1 row when joining table

Aigars CibuļskisMy goal is to get Users and ONE latest entry user has created, I've tried to figure it out on google but I failed, so you're my last chance. On of things I tried: DB::select('SELECT u.id, u.username, u.user_rating, u.avatar, u.created_at, e.id as e_id, e.title ...

0
Q: Some ajax error, no syntax error

VitaliiPlease help, I don'tunderstand where is error. In log I have error 500. There is my js code. $('.image_reload').click(function(){ $url = '<?php echo config_item('base_url')?>ajax/page_data/admin_add_new_article'; $.ajax({ url: $url, cashe: false ...

0
Q: How to restart compiled php-fpm on 127.0.0.1:9000

MilosI have the php 5.3.10 on my ubuntu. Now I installed the 5.5.7 and would like to restart it but when doing: /usr/local/php5.5.7/sbin/php-fpm restart I am getting: Usage: php-fpm [-n] [-e] [-h] [-i] [-m] [-v] [-t] [-p <prefix>] [-g <pid>] [-c <file>] [-d foo[=bar]] [-y <file>] [-D] [-F] -c <path

-5
Q: Display data from database in php when clicked on checkbox

user3129645I have arrays of check-box and i want to send value of check box to sql query using php and display data from database on same page when user click on check box. Redirect checkbox value to sql query and display result dynamically.Plz send example codes

0
Q: How do I traverse CakePHP relations?

FabioI´m trying to traverse the relations on CakePHP models. This is the database: I can access product attributes (product-> attributes) on a product model but I cannot access the product attributes on Ad model (ad->product->attributes). Here is my code: //Product Model class Product extends ...

1
Q: how to match rtmp links

Jack BenHow to match the following link structure that started with rtmp:// $link = "rtmp://00.000.000.000/live"; // GOOD $link = "http://00.000.000.000/live"; // BAD $link = "www.00.000.000.000/live"; // BAD so only matching the links with rtmp with preg_match or whatever ~ thanks

0
Q: Laravel WhereHas with polymorphic relations

edi9999it seems like the whereHas method doesn't work really well. $res = Entreprise::whereHas('labels',function ($q) { $q->where('hidden','!=',1); }) ->whereHas('labels',function ($q) { $q->whereHidden(1); }) ->get(); dd(count($res)); //shows int 2 Here is t...

1
Q: How to create a block template in drupal 7

Deepti KakadeI have created a block using quicktab module. block_name = league_websites_overview_promo_t in drupal 6 template was = league_websites_overview_promo_t.tpl.php I have upgraded my website from D6 to D7 but league_websites_overview_promo_t template not loading in drupal 7. What should be the t...

0
Q: Saving php file - what encoding should I use to work with MySQL

Pawal ZielkowskiI have one php file when I get data from MySQL where I set encoding to utf8. When Im tring to get data and display it in my php file I see there is sth wrong with some characters, e.g Magia Świąt w Jasełkach 2013-12-23. I create all php files using utf8 encoding, but when I want to open this ...

0
Q: ragrding jqplot plotting piechart with data from SQL server in php

user3058736hi i am using jqplot for the first time.I need to show a pie chart by pulling data from database i have written query and i am facing problems in converting the data in json tableI am not able to generate the graoh.Please help me in this regard.This is my code. <script src="assets/plugins/jquer...

0
Q: PHP if (isset($_POST[''])) +Jquery send in same page

MensurI would like to send a form so i don't get page refresh when i send a form. Now when i press submit button im running this code: <?php if (isset($_POST['send_this_message']) == 'yes') { echo "yes this is just example and working"; } ?> <form method="post" action=""> <input type=...

0
Q: launch a pig script with php

AngelikI am learning Pig Latin, and I would like to know how to launch a pig script with PHP. This is my line for launching the script : pig -f ../testjava/calculs_routage.pig -param input=/user/hive/warehouse/tableRoutage/ -param output=/resultatsRequetes/obj1/resultatObj1 -param date1=2013-11-08T00:...

0
Q: How to retain textbox values after navigating to other page?

user3066006I have a page(say register page) with text boxes in it. After entering values in them, if I navigate to other to page by using back and forward buttons in the browser and come back to the register page again. I want the entered text box values to be shown. Is there any way to do that. Hope somebo...

0
Q: Find duplicate keys in a single array

6bytesI have a dictionary array like below $foo = array( 'key1' => 'value 1', 'key1' => 'value 2', 'key2' => 'value 3', 'key2' => 'value 4', 'key3' => 'value 5' ); as you can see there are duplicate keys. All keys are strings. Array sits in a file and was created manually. It has...

0
Q: adding comments using php and html

user3129647I was wondering if there were any kind people out there who would be able to help me with my php conundrum! Im very very new to php and I can't quite understand how to add a comment section that is functional. I have made a database table (named 'comments') to store all of the comments that users...

0
Q: php sorting an array based on value

Mike LovelyI have a very big array. Arrays within arrays. Below is a small portion of it; [lta/] => Array ( [2012-12-31/] => Array ( [0] => 31_december_2012.pdf [1] => 31_december_2012.xls [2] => key_points.html ) ) What I need to do, is get the "key_points.html" value...

0
Q: javascript on click show/hide content

DanielI'm trying to develop a private message system using php/mysql. I've got a database set up like this: CREATE TABLE IF NOT EXISTS `messages` ( `messageID` int(25) NOT NULL AUTO_INCREMENT, `msgTo` varchar(24) NOT NULL, `msgFrom` varchar(24) NOT NULL, `subject` varchar(100) NOT NULL, `...

0
Q: My upload image code in IOS and PHP doesnt work

natijauskasI have a problem. I've been looking at other answers here but can not get solution.My code seems to work, (the log gives me my image has been uploaded to the server) but when I open the server has not gained anything.Can you help me? I'm going crazy!THANKS Here is my ios code .m: @implementatio...

0
Q: Using iframe with jquery

SabreIn my code I have a jquery script which has a next & previous page function. The jquery script loads a php script to parse a selected page. The parsed page has a div removed with the name postsArea and is placed into a div with an id of wrap. As of the moment the jQuery script is set up to put th...

0
Q: PHP foreach get part of URL and match to link

DesignSubwayI have a Joomla website and I am trying to check part of the URL against a link in a foreach statement. When viewed in a web browser the only thing that changes is the part of the URL which refers to layout. Here are some examples: http://www.myweb.com/index.php?option=com_jsjobs&c=jsjobs&view...

0
Q: insert a row after payment with paypal and IPN

user3056724it's a simple question no code needed, I'm usign IPN and paypal and it's working fine, what i want to do and i can't seem to find the way to it's getting information from a table to insert it into an other from the IPN file.Let me explain bettet with an example: I click the button , go to the pa...

0
Q: /var/lib/php5 filled with empty session files

user2708100in my phpInfo i see that the session save path is /var/lib/php5 this directory gets filled with empty files with names like: "sess_fgf5gh2prbmnfs0ah3mcvpv4p4" i am not using any sessions on my server. is this php default behaviour?. this is a problem because this folder needs to gets cleane...

0
Q: how to create a multi-selection <select> element that will submit-on-click

user1280840I want an HTML [select] element that permits the user to make multiple selections simply by clicking (not by shift-clicking or control-clicking), AND I want the form to submit whenever they do so. I can achieve either of these behaviours, but not both. The code for the first behaviour appeared in...

0
Q: Why is the username not recognised in the URI

user3051827I am trying to pass the username through URI but in console it is saying that URI is not specified , the code can be tested on this link. Ajax code is below: function Putaccount(){ //an account for the user $.ajax({ type:'put', url: 'http://creative.coventry.ac.uk/~4078078/moviereviews/v1.0/...

0
Q: Split text into array with two-words

erdomesterI know how to split a text into an array: $wordArray = preg_split('#\PL+#u', $text, -1, PREG_SPLIT_NO_EMPTY); I want to split the text into two-worded parts, so the array doesn't include single words. How to do that?

0
Q: Laravel - how do you inject variables into the password reminder email

phirschybarUsing Laravel 4.1's new password broker, is there a way to pass some data to the password reminder view? Specifically I want to be able to alter the URL of the password reset view. Looking here: http://laravel.com/api/source-class-Illuminate.Auth.Reminders.PasswordBroker.html#97-118 I am not sur...

1
Q: How To Filter (Customize) PHP out put IN Ajax and JSON

BehseiniI have a Field in MySQL table which contains Address like : I am able to query this field from MySql by suing these two PHP files(Ajax-jQuery Autocomplete Proccess) 1: GetAuto1.php <?php include("configPDO.php"); $likeString = '%' . $_GET['term'] . '%'; $STM = $dbh->prepare("SEL...

0
Q: MySql Sort by Date in JOIN Query

foxybaggaI am trying to display a news feed of items from two tables. Table 1: News - Id / Title / Date Table 2: Shared_News - Id / News_Id / Date News_Id from Shared_News is actually the Id from the News table. Now the scenario... My News Feed has to display the items from the News table and also the ...

0
Q: Why isn't my dropdown value accessible to PHP?

ElendilTheTallI have a page in which a dropdown is dynamically generated from a MySQL query, based on the choice in another dropdown - an event is chosen, and the second dropdown is generated containing instances of this event (ie the event at a specific time and place). This is done using Ajax, as per this an...

2
Q: How to sort an array with PHP, ignoring the articles (a, an, the) in the beginning?

Soumalyo BardhanSuppose I have the following array $books (the actual array is much larger): Array ( [0] => The Mystic Masseur [1] => The Suffrage of Elvira [2] => Miguel Street [3] => A House for Mr Biswas [4] => Mr Stone and the Knights Companion [5] => The Mimic Men [6] => A Flag ...

0
Q: Flex dynamic change of server

leossmithSo i am working on flex 4.6(before updating to 4.11) on a new project with php services. There is an auto-generated class called MarkerService.as which contains the following: protected override function preInitializeService():void { super.preInitializeService(); super._serviceControl.endpoi...

0
Q: how to see how many users are online using epoch time?

user2281190i am having problem of see who's online and don't have any idea how to see who's online.what i am doing is updating mysql database using time(); whenever user log in or refreshes the page. Then, lastactivity gets filled with epochtime for eg : 1387806657 or 1287373415. After that i select the la...

-3
Q: How to make #url for redirection

BerakiI would like to make something like this, www.lookoutsms.com/overview.php#draft --- To move me to the drafts www.lookoutsms.com/overview.php#inbox --- To move me to the outbox I have seen this been used by Gmail and Hotmail but I would like to know how can I do it.

-4
Q: How Can i get dynamic VAT Rate based on Country and product type?

user3129330how to get VAT rates in Percentage(%) depending upon the Country selection. Thanks.

0
Q: Laravel 3: Cache behaviour on multiple/simultaneous reads/writes

JonathanUsing Laravel's 3 Cache (file): It is safe to read/write/update Cache containing payments data and expect to always have the latest up-to-date data when multiple users are simultaneously modifying the Cache? In a web app I am building, the payments information is saved across multiple MySQL tab...

0
Q: Lithium PHP integration testing - routes.php not included?

gavD_UKI'm building a toy app in Lithium (PHP framework) based upon the Union of RAD's Framework project. It's all working great in the browser but when running integration tests, routes.php is not loaded, so the routing isn't working. Here's the code I'm testing: class StaffController extends \lithiu...

0
Q: How can i make the for loop parameters dynamic

Elton Frederikfor ($i=40; $i>=30; $i--) //code will display data for top x row for ($i=1; $i<=9; $i++) //code will display data for left y column for ($i=29; $i>=21; $i--) //code will display data for bottom x row for ($i=30; $i>=39; $i++) //code will display data for right y column These 4 loops all d...

0
Q: Access child node with it's own namespace

seaversI have the following xml string: $trimmed_result = '<PagesCreated xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><PageCreated><Appeal>General Appeal</Appeal><BirthdayName/><CreatedDate>2013-08-01T00:00:00</CreatedDate><CustomCode1/><CustomCode2/><CustomCode3/><CustomCode4/><CustomCode5/><Cu...

0
Q: mysqli_stmt::bind_param() variable doesn't match

user3121850What's going wrong in this script it is giving me error for bind_param if(isset($_GET['ID'])){ $page_id = $_GET['ID']; $page_id = mysqli_real_escape_string($con, $page_id); $select_query = $con->prepare("select * from save_data where ID='$page_id'") or die(mysqli_error($con)); ...

0
Q: Wrong values typed into input field using Selenium php-webdriver on Internet Explorer

Michael KnollWe have an issue with Selenium2 tests written with the php-webdriver API running on Internet Explorer. The version of the Server is 2.39 running on Java 7 in a Windows XP virtual machine running on Mac. The version of IEDriverServer.exe is also 2.39 In Firefox, all tests are green. In Internet...

0
Q: The best and simplest way to execute SQL queries in PHP

SteppingHatAfter the old, faithful, dodgy and somewhat simple original mysql api functions have been depreciated from PHP I started to look for an alternate method to interact with my SQL databases. Using PDO connections have worked best for me in recent times, but the code to me is all clunky and at times...

0
Q: Passing a javascript variable into a php variable

Mcclane654My web page I am trying to make a highscore list. i have been seaching everywhere for an answer to this. but I can't seem to find an answer that works. yesterday I made it work yesterday. not sure which code i used think it was something like window.location = "hihgscore_code.php=" + score but t...

0
Q: Handling data with php mysql and ajax

George PtlSo here's my problem: I want the user to type something in a form input field and click search button (i.e. page: index.php) Uppon clicking the search button ajax would handle the request and search through a .php file let's say search.php and then post the result(s) in index.php under the search...

 
2:28 PM
0
Q: Using PHP require() to increase website performance

alias51I'm looking at ways to optimise the speed of our site (basic LAMP stack), and specifically am researching the impact of HTTP requests on load times. After reading, the most definitive guide I could find be from the Yahoo Developer Network: http://developer.yahoo.com/performance/rules.html (excel...

0
Q: No errors with mysqli connection indicated but my form does not populate my table

swissedThere's no error with my Mysql query connection but when I click on Submit, it does not populate the table (articles). I have been working for hours trying to find what I am doing wrong. SQL injection issues will be dealt accordingly later. Prepared statements will be made. articleform.php <h2

1
Q: use echo or Die for debugging and logging

user1765876The questions says everything. I am logging something on STDOUT.Should I use echo for displaying or Die().As far as I know If I use die() for normal printing like die('Entered in For loop'), it exits the program. Also is it good to log to files or mysql?

0
Q: $row=$stmt->fetch(); Giving undefined index error

1994<?php try{ $db=new PDO("mysql:host=localhost;dbname=placement","rot","password"); }catch(Exception $e){ die( "An error occured".$e->getMessage()); } $username=$_POST['username']; $password=$_POST['password']; $stmt=$db->prepare("SELECT regno,password FROM pla...

0
Q: Is it possible to show an image with Yii CForm formbuilder?

DaantjeI'm looking for a easy way to show an image in a CForm formbuilder array. But I want to show the model contents, something like this example: array( 'elements'=>array( '<img src="$this->thumbnail" />', 'thumbnail'=>array( 'type'=>'file', ), ), ) Is t...

0
Q: PhpMyAdmin | Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate xxxxxx bytes) in Unknown on line 0

user3108269I'm tying to find the cause of this error but I'm failing. I've have installed PhpMyAdmin on my server and right now on the footer of every page I'm getting this error: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 10934248 bytes) in Unknown on line 0 As you ...

0
Q: Get the value of the selected image

OrionCurrently I'm working on a mobile version of an article publishing application. I want to let the user search for their image like you are searching through images on Google Images(Fill in the keywords, click an image, swipe back and forth between images) The user can select their keyword(s) an...

0
Q: Limiting socket server access

grimv01kThis is security issue. I've got a socket server that should be accessed only from the same server, in other words, only from localhost. I need to somehow check if remote user that trying to connect is not an outsider. Currently I've come up with: socket_getpeername($current_socket, $client_addr...

-1
Q: PHP Creating marking scheme

EddyI'm currently doing a web server. There are 2 users in this, admin and students. Admin can create quiz while student can login and do their quiz.(consist of check box, radio and commend type question) Currently, student are able to login and see and do the quiz that admin created. Now(Step 2), I...

0
Q: accessing object and its relations in laravel 4.1

Ir1shI hope I can explain this clearly, apologies in advance if it is confusing. I have a goals table which hasOne of each of bodyGoalDescs, strengthGoalDescs and distanceGoalDescs as shown below goals.php class Goal extends BaseModel { protected $guarded = array(); public static $rul...

0
Q: Trying to Convert Image to Fixed Palette in PHP/GD

Greg SchoppeI am trying to use GD in PHP to reduce an image to a fixed 60 color palette. (I am aware that the results will look poor, it's a small part of a program I'm writing to identify visually similar or duplicate images) I have a 8x8 60 color png of my palette, here: and a test image (color gradien...

0
Q: jquery $.post not working unless debugging

TechAUmNuI have simple form for updating the stock of products, it uses datatables to generate rows for all the items in the database. I can update the stock correctly using the form when I set a break point in the function, but if I remove the break point it stops working. HTML form: <form id="updateS...

0
Q: How to save data from Fb.api to mysql

user3055639I use the below script to get friend list after acknowledge App. How can i call a value to save then into mysql table. Any suggestion ? If i do something like this in order to call it, it is not working: userInfo.innerHTML = '<img src="https://graph.facebook.com/' + response.id + '/picture">' '<...

0
Q: Social APIs not working because of cURL and SSL

Jason LipoI'm using a social authentication plugin called HybridAuth. When using it on my shared server but now I have upgraded to a VPS running IIS 7. I read that I needed to instal cURL with SSL and when running phpinfo(), all is showing to be configured properly. However, I am getting errors when tryi...

0
Q: how to 'unset' a button

user689I have the following code: <html> <title> Hilo </title> <body> <?php function compare($a,$b) { if($a>$b) return 0; else return 1; } $r1= rand(1,100); $r2= rand(1,100); echo $r1; print("<form method =post> <input type='submit' value=high class='...

-1
Q: Server not accepting URL variables

Mohamed SaidI'm on DigitalOcean Ubuntu and using laravel framework, the server strangely refuse get variables, so www.domain.com/?name=mohamed when I check $_GET['name'] I get nothing, what can be the cause of this problem?

0
Q: Mediawiki include articles from external wiki

user3129876I have created my own wiki using mediawiki. Now I would like to know if it is possible to dynamically include articles from an external wiki. For example, if my wiki does not contain an article about the topic "potato" and a user visits the page "mysite.com/wiki/potato", I would like to display ...

0
Q: php trait using another trait

FIA2008I have a trait which is using another trait, and now I'm getting errors about functions that don't exist in classes. I have simplified the code: file:settings.php: <?php trait settings{ protected function getSetting($type, $setting){ // read setting from config.ini try{ $...

1
Q: PHP Store Key Value from Associative Array into Simple Array

user3063045I'm having trouble wrapping my head around this, any help would be GREAT... I have an array $stores that is structured like so: Array ( [0] => Array ( [id] => 123 [name] => 'Store A' ) [1] => Array ( [id] => 345 [name] => 'Store B' ) [2] => Arra...

 
00:00 - 15:0015:00 - 00:00

« first day (307 days earlier)      last day (3 days later) »