« first day (295 days earlier)      last day (15 days later) » 

12:00 AM
0
Q: Check which link is clicked

Naourass DerouichiI have three links <a name="send1" href="#signup" >go 1</a> <a name="send2" href="#signup" >go 2</a> <a name="send3" href="#signup" >go 3</a> When the user clicks a link the same pop up form is shown: <div id="signup"> <form action="send_form.php"> <

0
Q: the 4 words must be careful with what is being written in the posts thus input

user3089022This is how I have 4 words out of the database, the 4 words must be careful with what is being written in the posts thus input. The problem is that it only takes "a girl" out of the database, You can show its problem here: if ($stmt = $this->mysqli->prepare('SELECT id, rigtigsvar FROM opgave ...

0
Q: Php Email confirmation link

user3088818I've just seen this code somewhere in the net and i have tried it and the build is good but nothing is showing up in my email address after signing up but it echo that the link is sent. Here is my code: <?php include('config.php'); // table name $tbl_name='temp_members_db'; // Random confirm...

0
Q: Preg match and Preg replace specific format

user3080063I need help with preg match/replace forma i really cant understand how its working and what each element doing, So far i have this : $username = preg_replace('/\s+/', '_', $_POST['uname']); if(preg_match('/^[a-zA-Z0-9]{5,12}+$/u', $username)) { ...

0
Q: Simple html include system (Nested includes)

CezarisLTMy html files are becoming very huge as I'm writing a big html app and I want to organised it. I have an array that will include all the includes that looks like this: $html_includes = [ 'menu', 'tools', 'canvas', 'sidebar' => [ "resource", "layers" ], "footer" ]; What I'm ...

0
Q: jQuery form data not sending to PHP page

SekerI'm very new to anything outside of PHP, so forgive me if this comes off as simple. I'm trying to create a simple registration form, which then calls a PHP function, which inserts the data. The problem is, the data doesn't seem to be going to the page. My form: <!DOCTYPE html> <html> <head> <...

0
Q: Updating Rank Row in table from PHP

Zain SohailThis code create's rank on the fly and set's them accordingly.. Now the question is how do I update the Rank values in the table, without duplicating?I have posted this question recently but didn't find the solution.I am applying this code to a PHP code so that the rank updates with respect to Te...

0
Q: php probably memcached bug

user2965619Hello i tried implement in my application mechanism which will store memcached object i cache yeap i know sound crazy. But when i try to do it i find a probably bug: let`s try this code on your php version: $memcached = new Memcached('aa'); echo '<pre>'; print_r($memcached->getServ...

0
Q: Ajax and external JS scripts

user3078580Have the issue here when I dynamically load a php page the external JS file linked into that PHP pages doesn't seem to take effect. There is know JS code in the HTML file to call functions, the JS files does all the work by modifying certain tags. HTML page will load the PHP file which is linked...

0
Q: Codeginiter JOIN query with DATE between and LIMIT not working

VikramI am trying to get the details of a persons based on the user input age (Integer). Now my query always returns null Array() whenever I execute the below code. I haven't specified the $postdata array. You can see I have used $postdata['ageto'] and $postdata['agefrom'] are used in calculating $agef...

-1
Q: How to set a facebook user for all admins of my a self-hosted wordpress site?

Sekazone CrewI want to create a function that shares my posts on a specific profile, and page, when the publish button is pressed. Just like the facebook's plugin for wordpress. The problem is, actually, creating that "Make this user available for all users" option work. Any ideas?

0
Q: How to configure PHP builid

GameDevGuruI'm attempting to add the gettext() extension to the PHP build, the installation instructions are not very clear: To include GNU gettext support in your PHP build you must add the option --with-gettext[=DIR] where DIR is the gettext install directory, defaults to /usr/local. Where ...

0
Q: Trying to reproduce PHP's pack("H*") function in C# but not same result

Flozzathis is my code in C# : public static String MD5Encrypt(String str, Boolean raw_output=false) { // Use input string to calculate MD5 hash String output; MD5 md5 = System.Security.Cryptography.MD5.Create(); byte[] inputBytes = System.Text.Encoding.ASCII.Get...

0
Q: Responsive wordpress theme not displaying correct widths for columns

aDroidmanI am using the Wordpress theme called Responsive. I moved my edits into a child theme and they are no longer being displayed correctly. The test site is currently live at http://hanahanpolice.com/test/ The edit I made is in front-page.php, <div id="featured" class="grid col-940"> <!-- M...

0
Q: MYSQL: echo out results from table but don't echo out duplicate results?

user3080996I am really struggling with this so hope someone can help. I have a table like so: id | msg_id | to_user_id | from_user_id | subject | content 1 1 6 10 hi hello 2 1 6 10 hi hello 3 1 10 6 ...

0
Q: Need help tweaking query against WHMCS MYSQL database

Dizzy49I am creating a report against our WHMCS database, and I can't seem to get the results that I want/am expecting. We bill for our normal service on the 25th of the month, due on the 1st. The rates are fixed at $100, $180, $250. We bill for our optional service on the 5th of the month, due on the...

0
Q: iOS Posting images and data to PHP mySQL Database

mreynolI am attempting to post several pictures along with mainly text data to my PHP page and on into mySQL database. I am getting a response 400 error and nothing is now posting. I have had been able to get just data to post and just pictures to post, but have not been able to combine the two. I belie...

0
Q: Can not login and how to redirect different level user to each member area page

user3089038i'm novice in codeigniter, i'm trying to make multi level login in codeigniter, but still failed to login. And i want to redirect every level user to each member area page. i hope someone can help me. here is my controller member.php: class Member extends CI_Controller{ function __construct() ...

-1
Q: Creating and mediating two person interaction with php

user3089102I am very new to php, and i am trying to creat a game that can be played by two players over a server. I can not find anywhere that shows me how to get values from client one and send them to client two using php. when client one makes a move, I want to send a whole html table through php to clie...

0
Q: Setting protected variable value in child class and accessing value in parent

Meisam MullaI'm not sure if this is even possible but here goes. I want to set the value of a protected variable from within a child class and then access that value from the parent class. This is what I have tried: class A { protected $a; public function __construct() { new B; ech...

0
Q: html code Inspection of "templates" in PhpStorm

dakerIs there a way to tell PhpStorm to only evaluate header.php together with footer.php (as a browser would do when running index.php)? Consider a project containing 4 files index.php    -   server side stuff, like MySQL header.php -   html with some php prints item.php      -   html with some ph...

0
Q: suppress parse errors in PHP

pillarOfLightso I'm trying to prevent fatal errors from stopping my script from running so I set error report to 0: error_reporting(0); then I added some junk code afterwards.. junk code~~~~trololololololol However, PHP ends up returning parse error nonetheless: Parse error: syntax error, unexpected ...

0
Q: Comparison of simple User Regeistration by PHP and Javascript

user2837851A simple user registration may be completed by PHP (framework: Codigniter,etc..) and Javascript.Following is simple flow: PHP A registration view with form input(user_name,e-mail,password) post the data to an controller to validation -Pass, redirect to a completion view -Failed, go back to the...

0
Q: How to call an url in php file?

dotcom27I need to call a remote API using URL such http://api.remote-server.com/rest/?method=add_user&api_key=123&value=value1. If I paste this url directly in my browser url barre this work well. What I would like is simply call this url through a php file such myscript.php. I'm not a php coder and I m...

0
Q: Add background color to cells in PHP xls function

BongskyI am using the built in export to excel function of PHP... I just wanted to know how to add a background color to the cells code excel function: function xlsBOF() { echo pack("ssssss", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0); return; } function xlsEOF() { echo pack("ss", 0x0A, 0x00); return; } functi...

0
Q: A php page of mine works on localhost but not on my class webserver

CarsonFor some reason, only one of my pages doesn't work on my class server, but does work on my local host. The page is entirely db work and then a redirect. I'm not sure if it is something with the server, or if I need some privileges or what. Here is the code in question <?php error_reporting(E_AL...

0
Q: In YII Framework, the Captcha doesn't show(conflict with accessControl)

iLeoDoIn my site, only when I remove the filters() method, the captcha can show up. other time the captcha doesn't work. and my php gd support is enable. by the way, if I access user/captcha directly, it only show a picture box, but not content, maybe can not load the picture.. here are some code seg...

0
Q: When using NetBeans to debug PHP script to modify table records, 'affected_rows' will change from 1 to -1

user305611156I am testing a simple PHP-MySQL script, and it's to delete one record from the table. The strange thing is in this block of code: // Check if the form has been submitted: if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($_POST['sure'] == 'Yes') { // Delete the record. // Make the qu...

0
Q: if/else with undeclared variable

user2588317What is the proper way to do an if/else statement regarding a variable that may or may not exist? For example: I have a website search script that gets variables from the URL. If the user has not checked any advanced options then they are not included in the URL. Basically what I'm wondering is, ...

0
Q: handling checkboxes in form submission with php and db updates

user756659I am using checkboxes in my form to allow the user to turn on/off certain settings. I load the form by providing the correct 'state' from values returned from the db. They can then change these and submit the form where it is processed. Example... <input type="checkbox" name="settings[somethin...

-5
Q: Sons of Anarchy Season 6 Episode 13 Finale Episode 'A Mother's Work' Full

user3089129Watch Sons of Anarchy Season 6 Episode 13, Sons of Anarchy Season 6 Episode 13 Online, Download Sons of Anarchy Season 6 Episode 13 | Watch Sons of Anarchy Season 6 Episode 13 Online, Watch Sons of Anarchy Season 6 Episode 13, Sons of Anarchy Season 6 Episode 13 Online, Download Sons of Anarchy S...

0
Q: A way around my XOR Encryption requiring plaintext size

user3072634I looked at some of the XOR examples and am unable to find an answer. This is the code I'm using for PHP: for($i=0;$i<strlen($text);) { for($j=0;($j<strlen($key) && $i<strlen($text));$j++,$i++) { $outText .= $text{$i} ^ $key{$j}; //echo 'i='.$i.', '.'j='.$j.', '.$o...

0
Q: php form required field validation

frontenderHey i have inherited a page to update and am having difficulty modifying the required fields. Can anybody advise what is setting the required fields and how to reduce it to just the first three items (name, email, phone)? from what i can see this is the html <form class="enquiry" method="post" ...

0
Q: XML Parsing with Children()

user3088301I'm trying to parse the following xml https://ota.cartrawler.com/cartrawlerota/files/static/ctlocation.EN.xml I need to parse locations based on countries, this is what I have: <?php $xml = simplexml_load_file("ctlocation.ES.xml") or die("Error: Cannot create object"); $name3 = $_GET["nombr...

0
Q: Symfony2/Doctrine - Entity Abstraction in Relation to Normal SQL

shotdsherrifI am new to Symfony2 and building an app based on an existing legacy MySQL schema. I've become familiar with all the Intro docs (The Book etc) but still needing to inderstand some higher level concepts of how to properly use the framework. Trying to get my head around the concept of an entity in ...

0
Q: PHP is outputting table all on one line

user3089160Basically the script is supposed to take all of the pictures in a folder and spit the first six of them out into a table; later I want to add a little next button and such so one can view the rest of the images, but currently the script is just spitting them all out on one line. All of them, not...

-4
Q: I need to create CMS for my first project using laravel 4,

user3089173I'm studying php and i'm using laravel 4, i need to create CMS for my first project, if you can provide me a step by step tutorial, i would really appreciate it.

0
Q: Hyperlink as an alternative to form submission

user3089184Is it possible to create hyperlinks that target specific choices from forms? Example: I have a search form with a submit/search button. The first form element is a dropdown list containing the colours red, yellow and blue. The second form element contains the shapes circle, square, triangle. Is...

0
Q: Increment total replies to a post

BagwellIn my database, I have the following structure for posts: post_id | reply_to | parent_id 1 1 1 2 1 1 3 2 1 4 3 1 So in this case, post_id 1 is the main post, while post_id 2 is a reply to post_id 1, post_id 3 i...

0
Q: Changing Wordpress 'Featured Image' table in MySQL

GivenyI am messing around with this "sandbox" site: http://miladavaz.com/idea/ I am currently running a script that takes rss feeds and inserts individual news stories from the rss feeds as posts into the wordpress site. My problem is that I am inserting the rss thumbnail as a column called '*post_th...

0
Q: Red Bean PHP find() function not listen records

Victor Schinaiderhere is my code: $eventos = R::find( "evento", "data_fim >= ? AND removido != 'sim' ", array( date("Y-m-d H:i:s") ) ); When i execute this "sql code" in the mysql's console, i see what i expected, but when i use this c...

0
Q: PHP MYSQL Select Monthly and Select Account Code

emcGood day guys.. I have a project about monthly report. I'm stack with it. I can generate the report by monthly but the problem is that as I select the month I want to select the Account Code of the specific month to be displayed in Dropdown List "" so that I can tuggle in the same month but selec...

0
Q: Creating a dynamic link without creating a new .php page/file

user3064038I'm new to PHP and I'm looking for possible way(s) to create a dynamic link without creating a new .php page/file So, I'm coding a blog, which the posts are categorized. Category A, B, C and so on. And my table id int(11) title varchar(255) post_category varchar(50) post_content text num_commen...

0
Q: Detect if model is being created or updated inside a method

user2094178In my BaseModel which extends Eloquent I have the validate method. My question is, how can I detect inside this method if the model is being created or updated? I'm aware and I use the model events, but can't figure out how to achieve the same inside methods.

0
Q: ajax POST request returns failure

user2548848The following script returns a failure, even though it used to work: function postToPHP(data_to_send) { $.ajax({ type: "POST", datatype: "json", async: false, url: "http://school.edu/myurl/write_to_mongo.php", data: data_to_send, success: function($msg) { alert('success'); return; }, error: func...

-1
Q: Get avatar from mysql table

user1598550I have the following problem and I'm going crazy. I have a table users in my database. I have an id, name and avatar. I want to show the name and the avatar but the problem is that the avatar is not shown. Does anyone know where is the problem? What am I doing wrong? <?php $users = $db->get_resu...

-1
Q: Variable variables in Zend Framework V 1.8

82dinI have a user_id array: $user_id = Array (); And I want to create different variable names for each object: //Something like $this->user_0, $this->user_1, $this->user_2, ... $i=0; foreach ($this->user_id as $id){ $var = 'this->user'.$i; $$var = new DatabaseObject_User($db); $$var->...

0
Q: What is wrong with this code : Invalid Characters JSON

JesseHello everyone I am having some problems with my code. I am trying to get an array from fetch.php to my website via AJAX implemented through Jquery. Here is my PHP code. <?php header("Content-type: application/json; charset=utf-8"); //-----------------------------------------------------------...

0
Q: Google Table fails to load sometimes

kimbarcelonaI'm using google apis to generate a table in our website: $sitelist .= "<script> google.load('visualization', '1', {packages:['table']}); google.setOnLoadCallback(drawSiteListTable); function drawSiteListTable() { var data = new google.vi...

 
2:13 AM
0
Q: Break doesn't work properly

TransformBinaryforeach($item_cost as $node) { if($node->textContent != "$0" || $node->textContent != "$0.00" || $node->textContent != "S$0" || $node->textContent != "S$0.00" ){ $price = $node->textContent; break; } } I'm trying to make it Skip 0....

0
Q: Implementing MarkDown possibly with regex

Jochem KuijpersI'm trying to make a simple MarkDown-like language for my website. Here are the conditions: The strings have no newlines in them. What I would like: A way to make text bold (e.g. **bold** ) A way to make text italic (e.g. *italic* ) A way to make text underlined (e.g. _underlined_ ) Hype...

0
Q: How do I properly check if an input field has information in it saved by the user and echo some html if the information was found

Michelle CantinI'm creating a widget that displays social media icons. Users can add their social media URLs in the themes' options panel. When I add a title to the widget and drag it to my homepages sidebar, only my title shows up. The links I have entered do not work. In my widget, I start by declaring a vari...

0
Q: jQuery Datepicker Beforeshowday - Ajax return array of unavailable dates

DavidI am trying to get a datepicker to update a array of unavailable dates. The below works if i pass a php variable, but the issue im having seems to be returning the data for the option correctly (it is throwing a console error of cannot read undefined of 0 jQuery(document).ready(function () { ...

0
Q: Trying to echo an array called $text (from sendmail.php) in a div prior to submit the form

Serge SfI would like to create a button at the end of a form so the client can preview (in a div called "preview") the mail that would be send on submit. In my sendmail.php form all the info is gathered and formated in a tray called $text (mix of php and html). Could you help me to do that please? Than...

0
Q: Global variables by reference in php

Kermit the FrogIf I have the following variable in a class protected $address and in a function test( I do $testAddress = $this->address; and then $testAddress['state'] = 'KO'; Does that change the state for $this->address ... meaning any function that uses $this->address will have the modified state?

0
Q: upload file that have arabic name

user3056538I am trying to upload file that have arabic name like (مرحبا بكم) but when i upload it to server the name is not correct , it shows carcters like that (ريف-Ù) so , how can i upload files with arabic name <form action="up.php" method="post" enctype="multipart/form-data"> <label for="file">F...

0
Q: Compressing png images using PHP

onassarI'm looking for a PNG compression algorithm/library in PHP that is similar to: https://tinypng.com/ It's compression is by the best Any ideas out there on ones to check out? Google didn't net too many good results.

0
Q: How to remove Trailing, Unused Query String with .htaccess rewrite

WWDI have a URL with a trailing, empty GET query string like this: mydomain.com/news/?=/ I've been able to gain access to modify this in the CMS and as such I'm wondering how I might write a Rewrite rule in my htaccess file to divert this to: mydomain.com/news/ or mydomain.com/news I do apprecia...

0
Q: findtext extention not working

user3011784I have a findtexts funtion in PHP to get the extention of a file uplaoded, and it's not working. If I echo $ext I get nothing. if (isset($_POST['submit'])) { if ($_POST['mainfile'] != "") { function findexts ($filename) { $filename = strtolower($filename) ; $exts...

0
Q: Merge two strings to one

ColaflaskeI have two strings. I am working on a simple encryption function. $str1 = "foo"; $str2 = "bar"; I want the result to be fboaor - every other character is placed next to the other. Is it done using a while loop and explode? How can I achieve the result I'm after? Thank you for helping!

0
Q: Additional properties to entity Field Type in a form in Symfony2

StrnmIn Symfony2, is there a way to map more fields from an entity to the option tag of a select dropdown generated from a form which is based on an entity? I currently have something like: $builder->add('creditcard', 'entity', array( 'label' => 'Credit Card', 'required' => t...

0
Q: empty(#_POST) === FALSE VS !empty($_POST)

hyphenI'm doing a tutorial, and whoever wrote it keeps using code like if (empty($_POST) === false) Why would you not just use if(!empty($_POST)) Is there a reason for this that I'm missing? It seems unnecessarily confusing to use the first method rather than the second. Thanks!

0
Q: PHP get all possible lines (between two words)

Fash Footweari want to get all possible lines between two words for example i got following news A wildlife centre in Norfolk says it is struggling to cope after more than 100 seal pups were found injured following last week's tidal surge. The East Winch centre, near King's Lynn, has launched a crisis appea...

0
Q: jquery search box + Ajax page

user2979512i made search box. I used http://www.ajaxblender.com/auto-completer-using-jquery.html But I want to create 3 different (searching in posts, other in posts, 3rd in both) But when i tried, script always going to rpc.php I'm using: google.load("jquery", "1.3.1"); google.setOnLoadCallback(funct...

0
Q: Ensure one database connection when creating objects

frustratedtechI want to make sure I don't start multiple database connections when creating objects. Being new to OOP I'd like to get this right the first time. I am using MongoDB //connect to mongodb $dbhost = 'localhost'; $dbname = 'test'; $mongo = new Mongo("mongodb://$dbhost"); So this is creating the...

 
3:06 AM
-2
Q: how to change from ereg_replace to preg_replace

user3003172Hi i have the following code and need to change the ereg_replace to preg_replace $text = " ".$text; $text = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_\+.~#?&//=]+)', '<a href="\\1" target="_blank" rel="nofollow">\\1</a>', $text); $text = eregi_replace('(((f|ht){1}t...

0
Q: How can I make composer load a branch dynamically?

RhinosaurusI'm using composer to organize my vendor libraries. One of these libraries is a private repository of general system classes. The problem is that I want to have my code run out of the dev branch when it's on the dev environment, and automatically use the dev branch of my composer library. When t...

0
Q: cURL initialization and access to it after reloading page

user2796493I'm trying to use cURL after page reload. First, I need to get question from other website, then i wanted to ask user about answer to this question and then send it using get / post to the same page(my page) And after: send the answer using cURL to another page. Unfortunately, I get the message: ...

0
Q: muti emails and phone datbase query mysql

SaquibI wanted to store contacts in mysql where one person can have many emails and phone numbers, I have created below diagram. Please help me with the best query to get all emails and phones contacts of person. or if this schema will not good please advise some schema

 
3:24 AM
0
Q: Magento products grid filter with custom attribute

Bakr KawkjiI've added a custom attribute to the products grid in the admin area using the following code in /app/code/local/Mage/Adminhtml/Block/Catalog/Product/Grid.php under function _prepareColumns() It works fine, but now when searching with any search filter - the new attribute column is showing no va...

0
Q: PHP create XML special group

MichaelI need to create a XML elemt which is like that: <funcgroup data="50"> I tried: $currentTrack = $domtree->createElement('funcgroup data="50"'); Unfortunately that does not work. How do i need to do that?

0
Q: Issue with css/image/js files in codeigniter base directory

nullReferenceI've been stumbling around setting up the .htaccess file to redirect all requests to the index.php file under xampp in windows 7(removing index.php from the url), and think I may have created an issue for myself...but then again it may be unrelated. I seem to be having an issue referencing the d...

0
Q: Getting the $rank variable and updating it in the table

user3063143I'm having trouble getting the ranked value for a variable and updating it to a column. Basically what I mean is that below I have a code that selects column "bankaccount" from table "bank" and i'm ranking the bank accounts based on the bank balance. How would I be able to select to update the co...

1
Q: How to optimize the code in order to reduce the loading time of page?

PHPLoverI'm using PHP, MySQL, Smarty, jQuery, etc. for my website. I'm using a MVC architecture to develop the website. Now in one of the functionality I'm fetching a large amount of data and perform some processing on it. Then I'm returning the finally processed data from model to the controller and ass...

0
Q: How can I reload web page in Zend forms

DaveI am attempting to reload a webpage using Zend Framework Forms. The first time the page is loaded it looks fine. Then I click on an action in my webpage which looks like below: <a style="color:#FFF" href="/admin/showMedia/1" class="">Today </a> When the logic is processed in my controll...

-1
Q: Sorting Wikipedia API search results into an array

John GrierUsing the following code as an example: $wikisearch = "http://en.wikipedia.org/w/api.php?action=opensearch&search=inception"; $wikisearchlist = file_get_contents($wikisearch); echo $wikisearchlist; I get this: ["inception",["Inception","Inception Motorsports","Inception of Darwin's theory","I...

0
Q: javascript function cannot called properly

Franky So<html> <head> <title>Get HTML code from any web page</title> <script src="js/jquery.min.js"></script> <script src="js/jquery.xdomainajax.js"></script> <script src="js/clientJs.js"></script> <link rel="stylesheet" href="style.css" type="text/css" media="screen"/> </head> <body> <...

0
Q: Itirate through array, and run function on each value

user2943677I need to iterate through an array, and edit each value but not differently. <?php Function parseStatus($Input, $Start, $End){ $String = " " . $Input; $Init = StrPos($String, $Start); If($Init == 0){ Return ''; } $Init += StrLen($Start); $Length = StrPos($String...

0
Q: .htaccess redirecting the display images in other server

Danilo La-llabanCan you help me out with my problem about .htaccess redirecting the display images in other server.. i got this in my .htaccess Options +FollowSymLinks -MultiViews RewriteEngine On RewriteBase / RewriteRule ^(.*).(jpg|png|jpeg|gif)$ http://www.newurl.com/folder/folder/i/m/img_4fa231e793149_s...

0
Q: Why not put all class properties in an associative array for easy set/get/etc.?

user3089455I have a class with 23 different properties of various types, but I'll only show three in this example. A typical way to construct this class would be: class Item { public $name; public $price; public $date; // Getters and setters public function get_name() {return $name;} public function get...

0
Q: Clear the form field after successful submission of php form

user3077217I am making a simple Form the problem i am facing is when i submit the form values still remains in the field. and I want to clear it after SUCCESSFUL submission. Please help. here is my code for the form.. <label class="w">Plan :</label><select autofocus="" name="plan" required="required"> ...

-2
Q: Table ID in PHP

user3013069I'm trying to assign anID to the table I'm generating with PHP but it keeps returning an error. $result = mysqli_query($con,"SELECT * FROM presnationalresults ORDER BY Percentage DESC"); echo "<table id=\"my_table\" border=1>"; <tr> Any help? maybe I'm going about it t...

 
4:17 AM
0
Q: creating a todo list with user login and user specific lists using php, mysql, and jquery

publicstaticvoidbrianbasically what i have is a system where users login and they are brought to a page that shows what projects they are working on. a project is defined by having a group name, a due date, a description, and the associated class. as it stands, the code can log a user in. take the user to a page with...

0
Q: Selling a commercial app

Chris RussoHello friends from SO! Always here, always helping. I need your help once again. We have developed an application that can be really useful for more than one member on this website. It's not a huge deal, but it's a good and simple idea, well developed and well implemented, I would say. We desir...

0
Q: How to keep the result of an if statement

JohnI often find myself doing something like this: $search = 'some string'; if(strpos($html, $search)!==false){ $trimmed = substr($html, strpos($html, $search)); // whole bunch of other stuff } Is there a way to do this without calling strpos() twice? Currently I'm calling it first for the if(...

0
Q: PHP: Using imported class without namespace in class with namespace

MrOrelliOReillyI'm using a pear library that doesn't utilize namespaces and some composer based libraries which, obviously, do. I'd like to use namespaces in my own code, but I find that when I import classes from the pear library (non-namespaced) I can't reference them correctly. <?php namespace Foo\Bar; req...

0
Q: How to create a repeating post using PHP

BlabtonicI am a fairly new with PHP and I am in need of help in creating repeated string post The code I have is listed below, what it currently does is when a user types into the comment field and then clicks the post button it post the string that was in the comment field to the bottom of the page ...

0
Q: Bootstrap 3 media grid: dynamically generated, different col classes and media queries

user6719I have a simple grid of thumbnails that I am laying out — the thumbnail items are dynamically generated and output via the wordpress loop. I'm using three of the Bootstrap 3 column classes per thumbnail: .col-xs-4, .col-md-3 and .col-lg-2 so that there are 3 thumbnails across on small screens, 4...

0
Q: Send a ping to XMPP server in PHP

firewallI'm using Openfire as the server for the XMPP. The problem I'm facing is that the user is being kicked out every few minutes although I changed the server settings to "not kick idle users". I was searching about this problem, and I found from many posts that many people were facing the same prob...

0
Q: Array in double Loop

asdfme123I have this input: mon = 8:00 -9:00 Tue = 8:00 -9:00 wed = 8:00 -9:00 thur = 8:00 -9:00 Fri = 9:00 -10:00 Sat = No Sched Sun = No Sched I want the output MTWTh=8:00-9:00 F=9:00-10:00 SaSu=No Sched I create a nested loop but i think that is wrong

0
Q: How to get files and folders from dropbox using php API

KennedyI am using below files for dropbox login . index.php <?php require_once 'Dropbox.class.php'; $dropbox = new Dropbox(); $userArray = $dropbox->get('https://api.dropbox.com/1/account/info'); ?> <html> <head> <title>Dropbox API</title> </head> <body> <h1>Dropbox API</h1> <?php if($dropbox->hasA...

0
Q: PHP NotORM foreign key data not picked up

Ashutoshthis is my first introduction with NotORM and i'm unable to print foreignkey data Here are my tables: **userinfo** id , int (primary key, autoincrement) username , varchar(50) gender , varchar(6) password , varchar(50) **budgetinfo** entryid , int (primary key, autoincrement) userid int referen...

0
Q: How to proper adding code for a class from a seperate file in PHP?

yegleSo I'm trying to implement some sort of plugin mechanism, to adding anonymous functions from external PHP files. Here's the example code: <?php // class_def.php class MyClass { function __construct() { $this->property = "some_value"; $this->callback = array(); inclu...

0
Q: Magento special price is showing zero by default

PolesI'm working on a site in magento where all product's special prize is showing zero by default, though I didn't set any special price for products. for example,it showing-> Regular Price: $755.00 Special Price: $0.00 how to hide those special prices and make visible only for those products whe...

0
Q: Apache Cannot load modules/libphp5.so into server: when I installed php5-gd

user2924482I was trying to install php5-gd but after ran this command: yum install php-gd php-tidy and tried to restart apache: httpd -k restart I got the following error: httpd: Syntax error on line 56 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.modules.d/10-php.conf: Ca...

0
Q: PHP unsetting array in loop

EdwardI am trying to modify an existing array called field_data and delete the parent array of the key->value pair that has control == off. So in this example I would like to unset Array[1]. However it's not working, what am I doing wrong? foreach ($field_data['0'] as &$subsection) { foreach ($subsect...

0
Q: Integrate ImageMagick & MagickWand with php ubuntu 12.04

Dipak Kumar PustiI have installed both ImageMagick and MagickWand in my ubuntu system by refering to the detailed instructions provided in Install ImageMagick From Source and MagickWand For PHP. When I chack whether ImageMagick is installed or not by command identify -version, it shows me follwing message Versio...

0
Q: Update column using checkbox

Willard<tr> <th>Waybill Number</th> <th>Truck Plate Number</th> <th>Date</th> <th>Route</th> <th>Destination</th> <th>Number of Vans</th> <th>Stripping/Stuffing</th> <th>Customer</th> <th>Driver</th> <th>PO</th> </tr> <tr> <?php do { ?> <td><?php echo $row_Waybill['waybill_no'] ?></td> <td><?php echo $r...

0
Q: How to trigger save button event in virtuemart

SHIVANG SANGHII have virtue mart installed in my joomla . What I want is to trigger the tool bar 'Save Button' event without clicking the button.How can i do this? Actually I have a joomla component in which I have a save button so I want to give an extra feature of saving its content directly.

0
Q: Is there any error in .htaccess rewriting rules

CodyI am trying to make search engine friendly urls for my website using .htaccess in Apache I want to redirect url http://localhost/simple_blog/tmp to http://localhost/simple_blog/tmp.php here are my rewriting rules RewriteEngine On # Turn on the rewriting engine RewriteRule ^tmp/?$ tmp....

-1
Q: Tables not showing in HTML database

user3085177I am creating a database and when creating the HTML script the table is coming back with no boarders = Firstname Lastname "; while($row = mysqli_fetch_array($result)) { echo ""; echo "" . $row['Firstname'] . ""; echo "" . $row['Lastname'] . ""; echo ""; } echo ""; mysqli_close($con); ?> Here is...

0
Q: php image process - PNG image become black afer process

runrunforestHi made the code to resize image. it works well with jpg and some png. but sometime some images become black after processing. What's could be the problem here? my code function resize($target_width, $target_height, $path, $name, $new_name){ $info= getimagesize($path.$name); $w...

0
Q: DHTMLX scheduler date and Time not saving to db

JayWhen I add a new event to the Calendar everything else saves except the date and time which is not saving to the database so the event will not show all together , but when I insert a row from the database it shows. I suspect that maybe the formats are wrong? This is the format for the date ...

0
Q: How to pass an array through ajax?

PhantomI have a form for a referral system which has two fields namely Name and email. I also have a 'refer another friend' button which allows the user to refer another friend(capped off to 11). So another Name and email field appears. Now I have also an ajax fuction $.post which is designed to take on...

0
Q: Issues displaying date using datepicker

www.sapnaedu.inI am using the Datepicker jquery plugin to select the date. When I select the date using the Datepicker, it is displaying using the the format "yy-mm-dd" However, when I donot select the date, the date is displayed in the "dd/mm/yy" I tried to change the dateformat in jquery-ui.js from //...

0
Q: How Text to speech save in specifit Location php + Sapi

user3065043I make the text to speech application which make text to speech and save this into the wav file. but now i want to save this file in specific location how to do that. <?php $TTS = new COM("SAPI.SpVoice"); $TTS->Speak('Hello world!'); $tts->SpeakToFile("Hello world", "1.mp3", 0); ?>

0
Q: Cant send data to database and redirect isn't working

Carefree4When you hit the "Post" button it should send the data to the database and redirect you to ?success=true but it will not redirect you or send the data to the DB. This is suppose to do the redirecting and function calling: if (empty($_POST['postBox']) === false && $_GET['success'] != true){ ...

0
Q: Data in Drop Down List Retrieve From DB in Codeigniter

user3089616In creating dropdown in my project encounters problems(errors). I'm very new to codeigniter. Please check and advise what is wrong with with my code? Model Public function get_region() { $return = array(); $query = $this->db->get('region')->result_array(); if( is_array( $que...

0
Q: Large mysql insert statement

ksb86I have a .txt file that looks like this: id,lat,lon,sequence,dist 98372,40.535257,-111.871612,1,0.0 98372,40.536023,-111.872235,2,0.1001 98372,40.535629,-111.872599,3,0.1335 98372,40.535499,-111.872559,4,0.1758 ...etc This file can be 863650 lines long! (34MB) I need t...

-1
Q: How to create a script that automatically logs new song data (artist, title, album, image URL) for each new song that plays utilizing existing code?

user1440495A bit complicated, I know. Here's the deal: I have a radio station that I have listened to since I was less than a year old. I still can't get enough of the station. The problem is that the station may be shutting down soon - for good. I want a song list which includes literally every song tha...

0
Q: PHP array_walk doesnt work properly

Gabriel Matusevichi've red a lot of post related to array_walk but i can't fully understand why my code doesn't work, Here is my example. the $new_array IS EMPTY when i do the var_dump, IF i write var_dump on every iteration it shows some value, meaning that is treating the $new_array as a new variable on every i...

0
Q: Filtering out duplicate values in array

user3064038I'm using php and mysql. I'm having a problem with my piece of code. I want to remove duplicates and output the unique ones. .php code $query = "SELECT * FROM blog_posts"; $result = mysql_query($query); while ($row = mysql_fetch_assoc($result)) { echo $row['post_category']; echo array_unique(e...

0
Q: PHP in HTML page, Super Quick Advice

user3089680I'm no genius when it comes to coding, but I google enough to figure things out... I have a quick question. I have a page "index.html", "events.html" etc... and I want to add <?php include('exitpopup.php'); ?> so that it loads and executes the php file. However, I do not want to have to r...

0
Q: Converting a DIV from html to an image

Valmir JuniorI looked around for an app that could make a wallpaper out of my music library album art but I did not found one that could do even remotely what I wanted. So, instead, I built one in PHP. This script scans a folder for all the mp3 inside it then creates a tile wall out of the scrambled album cov...

0
Q: What is the meaning of _ENV["HTTP_X_VARNISH"] values I get using phpinfo()

MukWhen I run echo phpinfo() in root of application(Magento). I get _ENV["HTTP_X_VARNISH"] 1321634895 This means varnish cache is installed on server but what does 1321634895 value means. Do we have some default value for the same. Please help me to understand this.

0
Q: How can I secure and get back response of image upload on CDN in PHP?

user3026568I have made a script to post my images on my cdn server to save bandwidth and process. Currently I am using XAMPP and I've created two domains in local host. First in mysite and second is usercdn. Mysite's root folder is htdocs and usercdn's root folder is htdocs/usercdn. I have htaccess files in...

0
Q: Using phpExcel to download xlsx file using Google App Engine

ZebbeniI'm writing a php web app to create and download an xlsx file, using Google App Engine: $objPHPExcel = new PHPExcel(); $objPHPExcel->setActiveSheet(0); $objPHPExcel->getActiveSheet()->setCellValue('A1', 4); header('Content-Type: application/vnd.ms-excel'); header('Content-Disposition: attachmen...

0
Q: php __FILE__ not working

user2612097I am trying to load a php file B.PHP from another php file A.PHP, plus I want to send a variable via $_GET. Both files are stored on the same directory. I tried several ways: 1st) Directly write on my file: require (__FILE__)."\b.php?action=1"; The result of doing an echo is: C:\xampp\htdocs\...

-1
Q: Pnline Football Prediction System

user3089717Dear stackoverflow Lovers Need your support for my final year project i am developing a website for the football fan as a part of my final year project much like a thesis. Football fantasy with Bhakundo.com Normally the site include the different football fixture (EPL, Laliga mostly) of the game...

0
Q: Is there any api in market for Instagram analytics ? (IN PHP)

Raj TamakuwalaI am trying to use instagram api in PHP , i have even created sample demo for that and working fine also. but my requirement is,i want fetch Instagram user Data For Analysis. so user can select 2 dates and api will result number of followers, following, photos , likes, comments "DATE WISE" so b...

0
Q: the difference between 'manual' ajax request and $.ajax function jquery, which one is safer?

Hanangger Hutamajust feeling curious about these both methods that really has different line break to code. $.ajax jquery is quite simple but is it really can replace and fulfill the manual ajax request technique?

0
Q: How to manage static loop on php

Rajat TripathiI have an array that contains 18 elements. i want to arrange them in a slider in a way that - from 1 to 6 element in one UL, 6 to 12 in other UL and so on. Can anybody help me that how can i manage the loop in PHP to achieve this ?

0
Q: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] No such file or directory

Frederick G. SandaloI am getting this error when trying to authenticate with a Zend Framework 1.12.X, deployed in PHP cloud

0
Q: FMDB database giving error on arguments number

Muhammad UmarI am using following code to query $statement = $conn->prepare('SELECT * FROM userFeeds WHERE userId = :userId ORDER BY creationDate ASC LIMIT 100'); $statement->bindParam(':userId' , $userId, PDO::PARAM_STR); $statement->execute(); $posts = $s...

0
Q: Cyclone Slider short code not working

Engr Zardarii installed cyclone slider 1.3.4 plugin in wordpress site i followed each step and instruction from Here http://www.codefleet.net/cyclone-slider/ but when i include short code which is [cycloneslider id="my-slider"] enter code hereto my header page this error comes... Parse error: syntax er...

0
Q: Regualar expression to extract annotation paramter

Bhavik Pateli want to extract parameter like exist in annotation i have done this far $str = "(action=bla,arg=2,test=15,op)"; preg_match_all('/([^\(,]+)=([^,\)]*)/', $str, $m); $data = array_combine($m[1], $m[2]); var_dump($data); this gives following out put array (size=3) 'action' => string 'bla' (...

-1
Q: Is there a way to check if a function exists within a class?

ElvisLikeBearI'm passing some post data to execute a function based on post data, to determine if this should execute I've tried to use the following: $SP = new StoredProcedure(); if(function_exists($SP->$_POST['function'])) { $SP->$_POST['function'](); } else { echo 'function does not exist.'; } ...

0
Q: After double click word , how to insert word in database using php or jquery

user3073602I am making application where i need to insert value which are double clicked.can any one suggest me how to insert a word in database after double click in any word in a paragraph.Like http://www.thefreedictionary.com In this Website after double click it search the meaning of that word, but i h...

-1
Q: xmlhttp.responseText value for hidden field(pl hlp me I'm going to loose my job)

vimuth <input type="hidden" name="hid1" id="hid1" /> Javascript: function showUser(str) { if (str=="") { document.getElementById("txtHint").innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chr...

0
Q: PayPal error, There was a issue verifying the signature of your secure order. Please contact your merchant

user1792399First off, I am getting a warning that my title appears to be subjective and likely to be closed, but this is where PayPal directed me when I tried to post my question on "their" forum. So I'm not sure what I'm suppose to do. After finally getting sandbox working, I switched to live and getting ...

0
Q: PHP Code Modification ... Simple Error?

user3089680I'm no genius when it comes to coding, but I google enough to figure things out... I have one last quick question, any help would be MUCH appreciated! I am trying to implement this simple Jquery Exit LightBox on my website... (http://www.tonylea.com/2011/creating-a-jquery-exit-popup/) The pop-u...

0
Q: php cross files include paths confusion

Aldilno JinjaloTwo files from different directory levels are simultaneously calling the same file: // index.php include('./include/same_file.php'); // Webpages/page1.php include('../include/same_file.php'); // include/same_file.php include('../template/header.php'); // failed to open on index.php fopen('../f...

0
Q: Show delivery date according to ship method magento

ChiragI have been working on a customization, I am a little confused regarding where should I start. As you know during checkout process we select a specific shipping method (USPS , FEDEx, Flat rate) depending on our store. Now, what I want is the delivery date according to method that was selected. Le...

0
Q: mobile website not working in symbian devices

Devendra SoniI have made a mobile compatible website which is working perfectly in android devices but when I open it in Symbian devices of nokia it is not opening correctly. javascript files are not supporting may be..

0
Q: store and get images in mysql using CodeIgniter

ArulI am using a WAMP server, and I want to upload images in the database using CI.The image variable in database is of blob datatype. My question's as follows: 1) How to store the image instead of the file name and what datatypes should I use? 2) How to retrieve images from the DB? my controller ...

1
Q: Php code get only the current date (system date)

sarmisthaphp code <td><?php print strftime('%c'); ?></td> This code is giving me the current date with the time .. But i want only the current date of the system... What ll be the code for it ??? Thanks in advance..

-1
Q: how can i make a system in php for Payment using Debit card?

user3089798I am working on a online shopping website user can make payments with paypal account and debit cards i have integrated Paypal but how can i make system for making payements using debit card. please help

0
Q: backbone.js Search Filtering System [Structure]

TransformBinaryI'm using Controller to Fetch URL. I need a way to put Parameter in this POST. These Parameters are selected by users on View & Not Stored yet(I dont know how to store) Currently I managed to 1) Display & Route The View with search result coming from API 2) Display and refresh the page when som...

0
Q: Pagination script error

user3089801Here i am collecting the category and area value from the search-form using get method.so as i m having a 7 records into the database and i want to display only 4 records per page and when user clicks on next button then the remaining records need to get displayed but here my code is displaying o...

0
Q: How to return a response via php

user2167582I'm writing a php api with methods wired together by php routing, such that dev.myphp.com/user/login?email=sdfsdf@fdfd.com&password=d514 will return a json/xml response. However, I do not know how to return this response, even if I use json_encode or xml_encode to conver the data string. Do...

1
Q: Set Cross Domain in Codeigniter

Jignesh.RajWhen ever I run hosted project service run perfectly.. when i test with Other project that give me error or i could not getting response from Services. i try a lot but not working my Ajax Call: self.ValidLogin = function () { try { $.ajax({ type: "GET", ...

0
Q: Contructor Inject on Silex Controller

NisamI am using silex form my project, I added yml routing , In my controller action I don't want pass Silex\Application on every time. I just want to inject Application through the constructor, I tried like this, protected $_app; function __construct(Application $app) { $this->_app =...

0
Q: how to set number of products to be displayed on home page in Magento

user2994951I have a new.phtml file and new.php file, I'm sure that products display on home page is coming from these files only. Currently there is only 6 products are being display. I just want to know how I can be able to display more products(should be incremented in multiplication of 3) like 9,12,15 et...

0
Q: AngularJS Iframe pop window like facnybox?

Pradeep JaiswarI am writing a web application using the AngularJs and PHP. I want to open a pop up by passing a few params and render a new page in pop up. How can i open a fancy-box like i-frame pop-up in a AngularJS ?

0
Q: How to Add extra column and extra filter to admin user listing

hinaI want to Add extra column and extra filter to admin user listing page. How i can do this and in which file. Please help me ASAP. Please

-1
Q: If my PHP file return true, my javascript should run

Ralph VillasotoI've set a 5ms Interval for my javascript to load my time.php file, if my php returns true, my javascript should fire up my audio. could anyone help me please? thanks a lot!. index.html setInterval(function(){ $.get('time.php', function(data) { if(//What should i put in here?){ $('#Audio'...

0
Q: Save checkbox value to database in codeiniter

Vinu VI can't seem to save the checkbox values to database,is their something iam missing in the code given below.Help me with a solution,as in using the code given below i seem to only save a particular checkbox value instead of every checkbox value checked. view Subject : <input type="checkbox" id...

0
Q: I need to filter data id wise?

user3084297I need to filter data id wise for a part(vechile) but it fetches all results related to that instead of customer wise which is PID.My code is Where i am going wrong? <?php $sql="SELECT DISTINCT(PARTNO) FROM `paidamount` ORDER BY `PARTNO`"; $res=mysql_query($sql); $num=mysql_num_rows($res...

0
Q: How to integrate BIRT report with php using wamp server?

user1690835I am trying to integrate BIRT report with php. I have followed the tutorial from http://www.theserverside.com/news/1363642/Intergrating-BIRT-with-PHP .I have used birt-rcp-report-designer-4_3_1 to design a sample report and was able to view the report using birt report viewer from tomcat http://l...

0
Q: PHP zend byte code reference?

daeheeis there any document which describes the byte code instruction structure of php zend vm?? there are opcode numbers and names at the php website but I want to know more detailed structures such as operand size or syntax.. is there any document for zend vm bytecode such as flash bytecode documen...

0
Q: PHP control panel with socket to manage multiple clients

Ff VoteI am trying to write a simple php+html webpage that monitor clients. But I don't know how to start. I successfully make a socket server in php, but doesn't have a user interface. What I want is when a clients connect to my socket server, my PHP will generate a table showing their ip, textbox, and...

0
Q: Accessing properties of PHP DateTime from other classes

SdiqI am learning Symfony2 and PHP as my first programming language. I am in the middle of building an example app to further learn from. I have two clasess; Beneficiaries and Services. Class beneficiaries has a property dateOfBirth. I can calculate the age using this; $this->age = ((new \DateTime())->

0
Q: Access denied for user 'root'@'localhost' (using password: NO) for php

user3056561I want to select some items from table, but the problem is shown that "Access denied for user 'root'@'localhost' (using password: NO)". The db system cannot select something from table. What can I do? <html> <body> <?php include ('opendb.php'); ...... echo "Date: " . date("Y/m/d") . "<br>"...

1
Q: Prevent forced image loading/overwriting

Gautam KrishnanI am building a website and have done a WordPress installation on the hosting. It was working fine till I parked my domain name when I started getting an image forcibly loaded on my webpage. You can find it here. I want to prevent this forced image loading on my page. It also overwrites all the i...

0
Q: How to get google plus page ID using API

Narendra VermaI am facing problem for getting multiple google+ page ID using googleplus API. I Get a person's profile using php code. $me = $plus->people->get('me'); output: { "kind": "plus#person", "etag": "\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"", "emails": [ { "value": "xxxxxxxx@gmail.com", "type":...

-1
Q: Item not getting selected through external file in jquery

user3089887 // Check to ensure this file is included in Joomla! defined('_JEXEC') or die(); /** * HTML View class for the module frontend * * @static */ include_once(JPATH_SITE."/modules/mod_jevents_latest/tmpl/default/latest.php"); class GeraintModLatestView extends DefaultModLatestView { function...

0
Q: query for recommendation board similiar to pinterest

ShazRELATIONAL SCHEMA: USER (userid, email, firstname, lastname, password, profilepic, sex, country, updatetime) PHOTO (photoid, title, description, path, source) BOARD (boardid, userid, boardname, category, permission) userid references user PIN (pinid, boardid, photoid, tag, pintime) photoid re...

0
Q: Modify value of an XML element in foreach loop using simpleXML in php

user1386869I want to modify XML values using simpleXML in a foreach loop. My XML look like that : <a> <b id="first"> <c></c> <d></d> </b> <b id="second"> <c></c> <d></d> </b> <b id="third"> <c></c> <d></d> </b> And my php look like that : $xml = simplexml_load_file('myfile.xml...

0
Q: how to pass the parameter value from the php page

user2786525 DELIMITER $$ DROP PROCEDURE IF EXISTS `users` $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `users`(in id int(25)) BEGIN declare empcode varchar(25); set empcode=(select emp_code from transaction_user_register where t_reg_id=id); ...

0
Q: variable value on page change

user3089900i am new onjavascript and php. I am creatng an admin panel in which i have a option for the user to play game but the issue is every game have a specfic time period like 30 mins. So, what i want is that if a user have started the game the count down mst be started and if user then swtich from tha...

0
Q: Whmcs integration with cloud stack

ahmad05I want to have Whmcs as a billing solution for my cloud stack what i want to know how Whmcs is going to integrate with cloud stack (i.e. calling the Api and fetching the data and stuff) Whmcs integration with the website is fairly easy you just have to change the header and footer files . but w...

0
Q: Array duplicated in output

KerryI am getting errors with an API provided by Expedia when I send a request sometimes it returns correct output and sometimes it returns wrong output. To test the issue I used print_r($_params); in line 191 Full code at http://pastebin.com/2JbnEZbi Sometimes the command is being called as below ...

0
Q: Smarty assign variable - returns zero

Tomasz GolinskiI'm having an issue... I'm trying to do simply assign value to a variable in Smarty, but it always returns 0. Any idea why? {if (strstr($pid, 'XXX') == true) || ($did == 256)} ......Step 1 reached...... {if (strstr($pid, 'MTG') == true) || ($key_name == 'mtgfc')} ......step 2 reached...

0
Q: PHP SOAP Request Attributes not created properly

SimoneI am trying to create a SOAP request in PHP using NUSOAP, require_once('lib/nusoap.php'); $client = new nusoap_client('wsdl_link', true); The structure of the request i want to generate is: <rootlevel att1="abc" att2="def" > <Start> </Start> </rootlevel > The parameters are as f...

0
Q: what is better when calling/navigating html pages

StingHandswhat is better when calling/navigating webpages A multiple href with calling header and footer inside its file and has own data inside its <div id="content"><div> <a href="info.php">INFO</a> or Having a single index.php that only call html pages to be displayed inside its <div id="content"> ...

0
Q: Forward output of a command line program into PHP script

TigranI use a program (tshark) that capture real-time network data and show it on the screen. Is there any way to forward it into PHP (or other language script), thus every time new line (actually block of lines is added) my PHP script (parser) is called. Or I can call once parcer, but need to redirect...

0
Q: data is not passing through url

Rahat Islam Khani am trying to pass an id to a controller through url but the problem is it gives me the id field null result of the edit link is like "localhost/home71/project_management/index.php/boq_account/edit?id=" $url=base_url(); echo "<td id='edit'><a href='$url project_management/index.php/boq_account/...

0
Q: html,css.php? help how output my form subissions into webpage instead of text file?

Allen Aquinohelp i have bit knowledge in html,css but im kinda new to php forms,database,etc stuffs my php is working well, when user click submit all forms goes to carlist.txt but i want it output it through webpage html instead of .txt so i can view it online how i can able to do that? html : <html>

-2
Q: How to send data to PHP server from android

Raghu KaligipulaIam new in android, am developing feedback kind of android application where i am storing all data locally using entity class,now i need to send this data to server using php url, so can you please help me how can i POST my data on server.

-4
Q: PHP project with MYSQL, looking for more general advice advice

user1807880I have a PHP project and I want to to be able to generate html pages based on data entered into the database automatically. I have a link to my site now. I would love to have some links in the table to pages about that specific row in the data base. here is the link let me know if I am not cle...

0
Q: PHP placement within HTML page?

user3089680I have asked a question leading up to this earlier. Thanks again for your help. I have updated my .htaccess file in my root directory with the following: AddType application/x-httpd-php .html Where within my .html page should I place the php tag? I still cannot seem to get my .html page to...

0
Q: Avoid duplicate content - DRY - in validator rules

Papa CharlieI am now working on implementing a validator but I have a problem and do not want to fall in DRY. I will try to explain clearly... When someone submits a form, I have the properties of each field that will be checked to return TRUE|FALSE. eg: $post = array (          'name' => $_POST['name'] ,...

0
Q: PHP - Simple SendGrid Fatal error: Class 'SendGrid\Email' not found

user1966211I'm trying to use php sendgrid to send emails from a contact form. I only need the simplest implementation and followed the basic steps indicated here: https://github.com/sendgrid/sendgrid-php Here's my code: require_once 'sendgrid-php/lib/SendGrid.php'; require_once 'unirest-php/lib/Unire...

0
Q: Send data to server is not working

Namoi have created employee table on server. in that table i have four fields Table look like this emp_id ,emp_name,emp_address,emp_salary this is four columns i want to insert data into that my php file code is below.. $emp_id=$_POST["emp_id"]; $emp_name=$_POST["emp_name"]; $emp_address=$_POST...

0
Q: In symfony 2 how to access twig templating base url parameter in php?

user1191081How do I access base url in service or any other class ? framework: templating: engines: ['twig'] packages: assets: base_urls: ["http://assets.acme.com"]

-1
Q: Converting PHP site to Joomla

WayneI have a large complex web site currently implemented using PHP and MySQL. Some of the pages (about, contact us, etc) are largely static, but need to be updated from time to time. I'd like these updates to be able to be done by non technical admins, so I'm migrating the site to Joomla CMS. I've ...

0
Q: Opencats installation error

Jeevan Roy dsouzaI am trying to install opencats. While installing i am getting following error.. What is the problem? Deprecated: Function ereg_replace() is deprecated in /opt/lampp/htdocs/opencats/ajax.php on line 86 Deprecated: Function ereg_replace() is deprecated in /opt/lampp/htdocs/opencats/ajax.php on l...

0
Q: How to process and print the data recursively in order to reduce the waiting time of a user?

PHPGeekI'm using PHP, MySQL, Smarty, jQuery, etc. for my website. I'm using a MVC design pattern in development. Now in one of the functionalities I'm fetching a large amount of data and performing some operations on it. Then I'm returning the finally processed data from model function to the controller...

0
Q: Can you pull wordpress members account info?

Jonathan DicamilloI am trying to hook up a video chat api such as quickblocks in a mobile app. However quickblocks requires a username, password, and email to sign up and login. Is there a way I can pull that information from wordpress so I can feed it through the api? In the end i have a wordpress or buddypress...

0
Q: HighChart with large amount of data not working

ChandreshI am working with one of the large CakePHP portal, where i have used Highcharts for some graphical representations. Its working fine for almost all the simple graphs, but my problem arise when Query retrieved large data from database and tried to plot in highchart. Below are the example data w...

0
Q: Simulate innerjoin in two php array

Morteza SepehriI have two table in my phpMyAdmin. I want to join this two table, but that tables is very large. I think if i fetch all table in an array, and another table to another array and join this two array this make my program faster, if is it true, is there any php function that simulate it?

0
Q: Php mod rewrite condition display showing improper contents

Vin_fugenUsing mod rewrite i'm cleaning my url from http://example.com/profile?name=username To http://example.com/username By Using Below mod rewrite rule RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([A-Za-z-]+)/?$ profile.php?name=$1 [...

0
Q: Item not getting selected through javascript file

user3089887I have simple jquery file which slide news, but now some problem has occurred and it's not selecting element. while debugging it shos null value in triggers. Code for Php file <?php /** * copyright (C) 2008 GWE Systems Ltd - All rights reserved */ // Check to ensure this file is included in...

0
Q: how to upload image file from document directory to php server in iphone

Anand GautamI am currently working on gallery kind of iPhone application. According to my requirement, i need to store all the camera captured image into document directory. there is some 10-20 image files in document folder and after that i have to push that application resource document folder on server us...

0
Q: MySql query not working. no error showing

user1693763here is my code <?php $con=mysqli_connect("localhost","boursdfdswmat","PfdXfdsfkd"); mysqli_select_db("dbanme",$con); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } else {echo "connected";} ...

0
Q: Joomla custom user management

WayneI have an existing PHP application that I've trying to convert/integrate into Joomla. I have a number of MySQL tables that are used to store various pieces of information about my users. I also have a large number of existing PHP pages for users to register, login, etc. I want to keep using these...

0
Q: MySQL, combining DISTINCT and JOIN

AdelphiaI have a table of users, called ..wait for it... "users".. and then another table which records users' activity called ...you'll never guess... "activity".. I have an HTML table which shows the users in the users table, but I want to order the table by the users' last activity. Here's my query....

0
Q: Test my php script is ok to add but not on my android application..

NickThis is my CreateRequest.java class CreateRequest extends AsyncTask<String, String, Integer> { /** * Before starting background thread Show Progress Dialog * */ boolean failure = false; String res; int success; String Name, MobileNumber, Address, City, PostCode, St...

0
Q: changing line but keeping same tab space in php

user2707590Is it possible to change line while keeping the same indented space in php? i was trying to play aroung with \n, \t, and \r but still not able to do it. for example i need to do something like this: my first line my second line indented once from my first line my third line indente...

0
Q: schedule a task with yii

user983983I'm using YII framework for my website. I would like to schedule a task, as in, if a user has his/her birthday, then the scheduler will pop a birthday greeting for the particular day and remove it a day later? Has YII any inbuilt functionality to trigger such events?

 
7:54 AM
0
Q: Not Found The requested URL was not found on this server on PHP Cloud

Frederick G. Sandaloactually it is my first time to use Zend framework on phpcloud and i have successfully created a new Zend framework on my container. But when I try to access different parts of the application (controller and actions / links / page), I get a "Not Found The requested URL was not found on this se...

0
Q: WP_List_Table how to add action <form> in a column

Boy PasmoI have this custom WP_List_Table data and I want to do that one of it's column can perform action. Wrap in a <form></form> tag to be specific. Like this. +-------------------+ | Name | Action | +------+------------+ | Foo | Click me | +------+------------+ | Bar | Click me | +------+--...

0
Q: Skip some array in PHP

user133790I need some help. in my database have fields "ID","Domain","Key","Status" Below is what i have currently in my code //code start// $connection = mysql_connect('localhost', 'username', 'password'); //The Blank string is the password mysql_select_db('database'); $query = "SELECT * FROM tblhos...

0
Q: how to delete a session inside the multidimensional , i want to delete session of 'c9f0f895fb98ab9159f51fd0297e236d'

anonymous i want to delete the session of 'c9f0f895fb98ab9159f51fd0297e236d' => how could i > this please help me i tired and googled a lot but not found any solutions. ? i really need a answer fast as possible. your help will be greatly appricieated. thanks in advance array (size=12) ...

0
Q: How can I join several MySQL queries while excluding some results?

cjaredrunMySQLFiddle here: http://sqlfiddle.com/#!2/12213/16 I have three tables I am trying to work with. Table 1: users table (stores data for each user in the database) Table 2: users_fav table (stores data for each user who has added another user as a favorite) Table 3: users_rated table (stores dat...

0
Q: How to execute a bash file from php on a button click

JesHi i m trying to execute a bash file which contains a command to run a script file. I had been trying all possible methods but nothing seem to work. I want to run the file and display the result on the web page. the bash file contains arguments to execute the script. i tried with system(./ba...

0
Q: How do I load video from my MySQL DB into my website?

MakkebakkeI have uploaded a video into my MySQL DB and saved it under a BLOB column, now how do I load this data into my HTML / PHP webpage? (I know saving video in a MySQL DB isn't recommended, but work with me on this. I'm doing this for learning purposes) I've looked into doing this mostly with HTML, ...

0
Q: multiple select in ZendFramework

Rbrt Gmni want to select values from 2db. image_db => id, image_adress, category, product_id; product_db => id, name, price; i want to select the images from a particular category and for each image the data of the product what should i do? this is correct? $select = $image_model->select() ...

0
Q: Need to make a trigger on SQL table which triggers a PHP script on insert in a table

user2129794I want to know if we can create a trigger in MS SQL server which triggers a php script on each insertion of record

0
Q: How to call my PDO variable inside a class method?

ElvisLikeBearI have the following class: <?php require_once($_SERVER['DOCUMENT_ROOT']. '/wp-content/themes/quest/wahoo/common.php'); class TestingClass { private function InsertUser() { $query = "EXEC dbo.InsertUser @Title = @sTitle, -- varchar(50) ...

0
Q: how to insert today date in mysql using php

Nirdosh ShresthaHow to insert today date in mysql using php.date format is like Dec-10-2013.i tried $sql="insert into tbl_name (colm1,colm2) values (1,now())"; Here value inserted in colm2 is 2013-12-11.

0
Q: yahoo api for contact import query returns only 10 datas

ssenguptai am using yahoo api for importing contact into my php website. using the query: $query = sprintf("SELECT * from social.contacts WHERE guid=me"); $response = $yahoo->query($query); but the issue is that it returns only 10 datas where as i have 11. more over i tried to go to their develo...

1
Q: MySQL encoding parsed wrong

Johnathan SmithIm trying to add some text with this command, included in my php file: $sql = "INSERT INTO $this->table_name_category (name, marker_icon) VALUES ('".$name."', '".$marker_icon."')"; Everything looks fine in English characters, but in GREEK one's, the parsed text is being converted to quest...

0
Q: Error after xml is saved successfully also

Ramya MAm getting the following error when i try to add the a node to xml and save it. Even though the element is added successfully in the xml. XML Parsing Error: no element found Location: moz-nullprincipal:{0469b36b-8f9b-4c6e-9d4f-7aaea6d39210} Line Number 1, Column 1: Can you please help me in...

0
Q: how do I efficiently display all and just the icons that have a URL in the input?

Michelle CantinI'm having trouble creating my widget. Basically, the user goes to the options panel, pastes their Social Media URLs and save their options. Then they can go to the Appearance >> Widgets in their Wordpress dashboard menu and drag the Social Media Icons widget to whatever sidebar they want it on. ...

 
8:24 AM
0
Q: Wordpress backend redirects to a blank page when adding new page or post using custom theme

user1636130I'm creating a theme but something in it must be affecting the backend of wordpress. Whenever i make/edit a post/page or update a settings and press save, I get redirected to a blank page. The frontend of the theme looks and works great, just the backend which is broken :S What could be the c...

0
Q: Magento SQL statement not returning expected results

mooseI'm running Magento 1.7.0.2: I'm trying to retrieve all the columns from a custom table using PHP & SQL, but the results returned are not what I expected or usually get: $connection = $this->_getConnection('core_read'); $sql = "SELECT * FROM " . $this->_getTableName('my_custom_table_name') . "...

0
Q: win8 apache stops output

EmileI have a PHP script that inserts 40.000 records into a MySQL table. Every 500 records there is an output in the browser. The scripts works perfect in Win7. In Win8.1 the output in the browser stops after about 20.000 inserts. The connection to the browser is not closed, it is still waiting for a ...

1
Q: How to populate zf2 form using doctrine?

Iosif Ioan FecheteI have this form: $this->add(array( 'name' => 'selectedcountries', 'type' => 'Zend\Form\Element\ObjectSelect', )); and this entity: <?php namespace Application\Entity; use Doctrine\ORM\Mapping as ORM; use Zend\Mvc\Application; /** * @ORM\Entity * @ORM...

0
Q: Social network with a blogg/news feed. blogg enrty displayed 4 per row. (3 too meny)

Måns Dahlströmsocial network" mostly for fun, and now im displaying 8 enrtys at per row, i think it's something with the foreach function, i don't fully understand it, can someone explain what values im supposed to put in. Right now i have this code. while ($row = mysqli_fetch_array($statusA)){ foreac...

0
Q: Passing Values to Modal Popup Using Java Script

RifaI want to pass a button ID values to a Modal popup window when user click that button. Later form that passes ID I can query DB values and view in that opened modal popup window. This is the code portion for button. Id willbe assigned form Data Base. It is working fine. <td><input type="submit...

0
Q: Script that adds pixels to top and bottom of an uploaded image

Tommy CoffeeI have a website where I upload rectangular images, all a set width, on a regular basis. I need the image to be automatically resized to be a perfect square (for use on Instagram) but resized so that the original image is centered, so the pixels would be added to top and bottom of the image. Belo...

0
Q: wsdl error: HTTP ERROR: socket read of chunk terminator timed out

user2885692I try to build a connection between data from a CMS and a CRM systems based on web services and using NuSOAP library. But when trying to form a request to a CRM server my web server (http://poseidonexpeditions.ru/soap/) returns this kind of error wsdl error: Getting http://79.172.60.168/poseidon...

-2
Q: How to write this PHP conditional tag with curly braces

Codex MeridianI have this code below: if ( $term_id ) { if ( is_array($term_id) ) $term_id = $term_id['term_id']; if ( isset($term['term_id']) ) $this->processed_terms[intval($term['term_id'])] = (int) $term_id; continue; } The inner co...

0
Q: how to convert user friendly url to another url with htaccess

mamal10I have one user friendly (http://example.com/root1/root2?root3=abc25) that I want to convert this to another url (http://example.com/index.php?request=root1/root2?root3=abc25&root4=abcd) this is my code when run this code I get this url (http://example.com/index.php?request=root1/root2) I don't ...

0
Q: Not able to return a json file PHP

BiribuI am not able to return a json file doing an echo or print_r. This is my code: <?php include 'logFolder.php'; $email = "48k2r4l6o60nbn2cug9p0luk7c@group.calendar.google.com"; $url = "http://www.google.com/calendar/feeds/".$email."/public/full"; //echo $url; $xml = file_get_contents($url...

0
Q: Creating a simple "Logged In As" line on my page

user3074608 <?php session_start(); if(isset($_SESSION['login'])) { include_once('includes/header.php'); ?> <!DOCTYPE html> <html> <body> <div id="mainframe"> <img src="img/header.png"> <div id="menu"> <?php include_once('includes/navbar.php'); ?> </div> <...

0
Q: Result Not Found (400) is not working

user3044615The Result Not Found (400) is not working. However I run, It is terminated. Here is onCreated() method. protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); SharedPreferences userDetails = this.getSharedPre...

-2
Q: Php emailing System

Tlou Sekgalai wish to create a emailing system whereby its sends mail to my email address in the database. first 5 people to reply send them mail sayin "you got it"..the rest send a message saying "to late". All using php any help will be appreciated.

0
Q: PDO query returns nothing with PHP 5.1.6

user3087793I have this PHP code: <?php if (!extension_loaded('PDO')) { dl("pdo." . PHP_SHLIB_SUFFIX); } if (!extension_loaded('pdo_sqlite')) { dl("pdo_sqlite." . PHP_SHLIB_SUFFIX); } function ejecutar_sqlite($consulta, $bbdd) { $dsn = "sqlite:$bbdd"; ...

0
Q: How do I download a file from my S3 bucket to my local server using PHP?

martti dI'm trying to create a rotate image function, the image I am trying to rotate is in my S3 bucket. So I am trying to create a function to grab the image from my bucket, save a local copy, rotate the image, upload the image back to S3. My Script: $s3 = new S3(myAccessKey, mySecretKey); $target_p...

-1
Q: i getting data from database and but it in table in text filed and want to update it if user updatet text filed and click update what can i do ??

user3090194` tables retrive function downloadExcelSheet()//to download excel sheet { javascript:window.open('data:application/vnd.ms-excel,'+document.documentElement.innerHTML); } function printDiv(divID) //to print the div contain data { ...

-1
Q: sort array by element: [datum]?

piti want to sort by the element [datum] per month! at the end it shoult look like: 08.02.2014 25.02.2014 09.03.2014 the data comes from flatfile database! they are now sorted by the day of [element]! thats the array from ffdb: Array ( [26] => Array ( [id] => 50 ...

0
Q: Symfony2 SwiftMailer - How to send emails without waiting for the server response

MilosI am using swiftmailer to send one single email with about 300 BCC. The problem is that I am getting a 30sec timeout on the client side when doing this. When checking on the server side, the mails were sent correctly, but sending all those emails take some time because the mail server deals with...

0
Q: Float numbers coming out of database wrong

Amy NevilleI am selecting a float field with value 0.1 out of a mysql database and then rendering it to the browser with an php echo and it is giving the value 1.77175e-07. What could be causing this very odd occurrence? $question_result = mysql_query("SELECT question, answer, timelimit FROM trivia_questi...

0
Q: should I create database connection everytime for PHP?

user2764422in PHP, I use the following code to get a database connection: $result = new mysqli('localhost', 'root', 'password', 'test'); //...some other code return $result; My question is, should I create mysqli object every time when connect to the database, if so, will that affect the database perform...

-2
Q: $_SERVER['QUERY_STRING'] in Laravel isn't the Full Query String?

TransformBinaryIn laravel when i do the following code, echo $_SERVER['QUERY_STRING']; I will only get the latest parameter result, it will not return me the full query string. Do note that i have duplicate names which is why it's updating the parameter as it retrieves. What I would actually do if it manag...

0
Q: .htaccess error after change server

user3090229I have changed my hosting and get a 404 error on one website where we have using .htaccess file and code like this, now what happening sub-cat page showing 404 error http://www.natural-stones-india.com/sandstone/Golden%20Brown%20Black.html .htaccess code is like this ----------- can anyone help?...

0
Q: create a thumbnail for the video in vimeo by selecting frame

NagendraI need to create thumbnails for the video in vimeo in php (cakephp), Please have a look at this User will be selecting the particular frame by clicking on the Use this frame button. Did anyone work on this, if so please help me..

0
Q: Export order info to .txt file once order is placed

MassacrusI have researched and tried all possible ideas I could come up with but not having any luck with the below...what am I missing? The idea is to export a text file once an order has been placed on my Magento store. The text file will then be used for the printer to print the order automatically. ...

-1
Q: FPDF : can't write a pdf anymore

user3090263I'm in a project for someone, I have to evolve his php application, which creates pdf. I put on his server the new version of the application, and I can't write pdf anymore in the same directory as the old version did ! FPDF error: Unable to create output file: /var/www/cridev/php/crepe/data/pd...

0
Q: Apache Mod_Rewrite: include dynamic rewrites with date based variable

HaroldoThere are some api calls in my app that I want to rewrite to static .json files (cache). My site is for music events and the api calls I want to rewrite to cache are those for the next 7 days, so 7 urls to redirect. So the urls will look like this: api.domain.com/?date=2013-12-01 -> cache_2013...

0
Q: PHP multidimensional array being nested twice

user3004208I am using this function to get data from a database. public function getModelSpecs($modelCode) { $modelSpecs = db::fetch_array("SELECT * FROM `product_specs` WHERE model='{$modelCode}'"); return $modelSpecs; } And i am accessing by using a for loop based on the count of a previous it...

0
Q: How to add zip file attachment with Nusoap client?

Serafino BilottaI've a php client that send a form values to a soap webservice using nusoap. All string type fields works fine except for the attachment zip file that is 'dh' (apachesoap:DataHandler) . The WSDL is below: <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions targetNamespace="http://xyz.mydoma...

-1
Q: Submiting a form using PHP

user3063495I am trying to submit a form using PHP. I am trying to grab the value from two file inputs in my form, yet when I try to index them with my PHP code, I keep getting an error. The error I get: Undefined index: profile-pic in C:\xampp\htdocs\shareitme\form-test.php on line 5 Undefined index: cov...

0
Q: Regular expression: Unknown modifier '\'

Fabian PasI'm having the following regular expression: (?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'\".,<>?«»“”‘’])) but it's giving me the following error: Un...

0
Q: LPology/Simple-Ajax-Uploader Self Clone Failed, Clues?

TukangBakpaoI came across with ajax uploader that its simplicity that I like, it shows the uploaded image after its processing. But one thing for sure that I wanted to make them work in my localhost but I have failed. The upload progress is working but not for the saving the uploaded file and call it back to...

0
Q: is there any dump of names of all android apps available?

user2216267Has anyone come across the list of all android apps in the Google play market. I tried finding, got Appdata.com but they provide only list of 50 apps free then they charge heavy amount. OR any API to crawl or fetch results using PHP to produce list ?

0
Q: insert form to database

user3040066i have program codeigniter anda i want to insert form to database. code view: <form target="paypal" method="post"> <div class="field1"> <div class="field"> <label>Nama</label> <input placeholder="Nama" name="nama" type="text"> </div> <div ...

0
Q: Using ACF Gallery plugin with Bootstrap Carousel need indicators to count each item rather than image

user3090274first post here! I've incorporated https://gist.github.com/webgurus/6420102 to convert ACF Gallery plug in to work with Bootstraps Carousel slider. But this specific page: http://edwardbullard.com/home if you look at the Fashion Gallery Test at the bottom right (ones above are hand coded and the...

0
Q: Lottery, chance of winning

user3090316I have started to make a scratchcard in php, and will have different prices, and the chance of winning them. There should be 1:1.000.000 chance to win the first prize. <- Only 1 winner. 1:500.000 to win the second prize. <- Only 1 winner. 5:100.000 to win the 3. prize <- Should be 5 winners ...

0
Q: Get variables fom a txtor php file

Allin MarckI have this code on .fla file fm_button.visible = false; var menu_label:Array = new Array("Introduction", "Products", "Services", "Testimonials", "Our Company", "Contact Us"); var total:Number = menu_label.length; var i:Number = 0; var page:Number; var main_me...

 
10:00 AM
0
Q: Call to undefined method Illuminate\Support\Facades\Log::listen()

SynackSA Hi there I'm attempting to write a custom package for Laravel 4 that does some extra logging. According to the Laravel docs (http://laravel.com/docs/errors), I can just create a listener and do what I need to in the Closure. This is the register function inside the ServiceProvider use Log;...

0
Q: Pointing a sub directory to another domain name

Shafeeque ShazI have a domain name as www.something.com and which is hosted in a windows server.Now i have created a directory inside on it as www.something.com/help and need to point that to another server, I need to install a wordpress website on that. How can i point that.

0
Q: PHP if substr not catching a certain phrase

charliejsfordI am using the PHP function imap_open to get emails into a MySQL database. I am using this PHP code to check the subject, checking the RE: and # work fine, but checking if the subject is Read: doesn't. I have tried echoing substr($subject, 7,5); which displays the 5 digits of the subject which ...

0
Q: three selects each based on previous jquery

user1597404I'm trying to do 3 selects in cakePhp + jQuery first one with provinces, second - localities, third - schools in that place. Here is my cake code (so far): echo $this->Form->input('proviences', array( 'type' => 'select', 'empty' => true, ...

-3
Q: Real player multiplayer game to be developed on which language / framework

user3090222I am developing a project wherein i want to render some games to my site visitors. The games should be in fast real time multiplayer game so that 2 players can play the game with each other and such games can be played by thousands of users without any bugs or system failure or laggy. I was app...

0
Q: Retrieve $_SESSION value in Input value

rajeshI am working with a basic registration form , if the user presses submit button , i want to store the input values to a session and also to retain the same user data into the inputfield . With the following code i can able to temporarily store and retrieve but only when i press submit button twic...

0
Q: setting the same session id again in php?

user2753583Is it possible to set the same sesion_id everytime before session_start even after the session has expired? I want to have the same session id for a user each time he logins for some testing purpose. This is how i do it. session_id($myid); session_start(); if(isset($_SESSION['something'])) { ...

0
Q: PHP Array Building - How to write it better

ElliotBeen racking my brains on how to write this better AND make it loop depending on the $count value: if($count == 2){ $thenode = $tree[$splitnode[0]][$splitnode[1]]; } elseif($count == 3){ $thenode = $tree[$splitnode[0]][$splitnode[1]][$splitnode[2]]; } Any ideas? Tha...

0
Q: aggregate array base on array paramters

user2706762I have an array of arrays, each array hold three parameters, like so: Array ( [0] => Array ( [title] => 'games' [transaction_id] => 102 [order_id]=> a ) [1] => Array ( [title] => 'media' [transaction_id] => 95 [order_id]=> b ) [2] => Array ( [title] => 'tv' [tran...

1
Q: How to organize and minify lots of javascript files?

varanI have a project written on PHP and JavaScript. For example, I have two main JavaScript files main1.js and main2.js. They use the same functions, and I want to extract the functions to lib.js etc. On develop environment it's more useful to use 3 different files, but on production i'd like to h...

0
Q: substr_replace function returns weird symbols along with the string

kfirbaI've a variable with some string in it, for example: $var = "myText"; What I want to do is to "inject" before the last word a single quotation mark (') so the output will be: myTex't I've got this code: $var = "myText"; $var = substr_replace($var, "'", strlen($var)-1, 0); echo $var; And i...

0
Q: PHP imap_open not seeing all message body

charliejsfordI am using imap_open in PHP to download emails and insert them into a mysql database Here is my code to get the body message: $message = quoted_printable_decode(imap_fetchbody($inbox,$email_number,1.1)); if($message == '') { $message = quoted_printable_decode(imap_fetchbody($inbox,$email_n...

0
Q: How to select specific value in foreach smarty?

user2834795I am trying to get only 3 values from my array in foreach loop.I dont know how to do this. In drop down, now i am getting all the five values from my array.But i need to have only starting 3 values from array not 4 and 5. My code:- <select class="userCountryMapSelectMetrics" style="float:r...

0
Q: Column 'first_name' cannot be null in smarty

user3087018When i'm inserting form values in to database it's getting Column 'first_name' cannot be null. But In DB first_name is not null.but it is displaying null error.

0
Q: Issues with paypal processing in PHP

shwarealWe had a website built for us through freelancer for a charity donation website and we are having some troubles with the information updating to the database. The freelancer had built the website so that all the details are saved on the database in a table called tbl_temp_supporter and then once...

-2
Q: Change form input value with javascript

Tyler JonesI am trying to change the input value of a hidden form to update the score of a game in my database. I have this form code on a php page that displays and plays the game. <form id ="recordForm" method="POST" action="updatePHP.php"> <input type='hidden' name="record" id='record' value='' />

0
Q: PHP merge two arrays on the same key

user3004208I two arrays set out like this. First array Array ( [0] => Array ( [manufacture] => Moto [name] => ZSX 125 [code] => ZS125-48A [cc] => 125 [bike_type] => 3 Motorcycle [title] => Mto ZSX 125 [about] =>...

0
Q: Why are my links breaking when i add this php to pages.tpl.php

cojomojoThis is for my drupal site (qdin.me)... Ill give some background here, Im trying to have my exposed filters for a product search to appear in my main menu bar (using foundation theme). I have gotten everything to be laid out how I want by editing the pages.tpl.php file and some css. I moved the ...

1
Q: PHP (commas and dashes as range)

user3090402Hi anyone can help me. For example: $value = "1,3,5,7,9-12,14,16,18-21,23"; Result: 1,3,5,7,9,10,11,12,14,16,18,19,20,21,23 using PHP

0
Q: Get single "elements" from a PHP variable

TylerI am new to PHP and don't know much about PHP. I just understand some basics. I have a PHP variable called $myVariable. This variable is filled with strings which I loaded from the internal system. I know how to load the strings from the system and this works so far. So my variable looks like th...

0
Q: FOSElasticaBundle Class not found

NGPATELi installed FOSElasticaBundle using Composer, After that as per the given instruction on https://github.com/FriendsOfSymfony/FOSElasticaBundle i registered FOSElasticaBundle Class in Appkernel.php file, demo code is as following // app/AppKernel.php public function registerBundles() { $bund...

0
Q: Symfony 2 : How to set the session lifetime at login?

Robin HermansI have a custom login form for my Symfony 2 application. In this form I have a choice field with multiple options to set the max idle time of the login session. I wanne be able to set the session lifetime at the login action. Unfortunately the loginaction is stored in the FOSUserBundle wich can n...

0
Q: Codeigniter DataMapper - Include related id's repeating

IamzozoMy problem is that child object ids repeating: I've a one to many relation: Posts - Comments $p = new Posts(); $p->include_related('comment', NULL, TRUE, TRUE)->get(); foreach($p as $post) { ... $out[$post->id] = $post->to_array(); $out[$post->id]['comments'] = $post->comment-

0
Q: The FastCGI process exceeded configured request timeout even after setting activityTimeout

LauraThe following is my code in php: set_time_limit(0); $sql="select * from Words where `Ph`=\"to be added\""; $result=mysql_query($sql); while($row=mysql_fetch_array($result)) { $url = 'http://somewebsite.com?word='.$row["Word"]; if (!$str = file_get_contents($url)) { $error = error_get...

-1
Q: PHP Vlookup function

TeckyWilsonI'm new to learning PHP and don't really know where to start with this. I'll try my best to describe it. Here goes... I am wanting to have some sort of Vlookup function for PHP. I want to have a list of data, I'll call it A. Which is gathered from uploading a file containing this data. I then...

0
Q: get data from POPUP window back to Parent(SMARTY)

evridejmy popup gets data from Database where the user can chose from. now can somone explain me how i can get submitted data(array) from my popup window back to my PARENT Form and after that back to "PARENT PHP" ?:X i already found a way using window.opener.document.forms.form_id.inputname.value o...

0
Q: Grab ALL values from a column pulled out of a DB comma seperated and put into a textfield

SiZaI have a table which contains the column fleet name, vehicle registration and some other info about each vehicle. 1 fleet can have many vehicles. The main aim of my application is to show vehicles within a fleet when a fleet is selected (from a dropdown), so filtering out and showing rows of the ...

0
Q: magento - coupons code bulk import

user1347007Hi I am trying to import coupons via csv to magento mysql and when i try the solution below i get an error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/wwwevolv/public_html/Lancaster/bulk.php on line 19 Any ideas? is it the code quotes?

0
Q: apns feedback service certificate issue - works for push, does not work for feedback (php)

yuripollI have odd issue. The pem certificate that I generated WORKS FINE when I'm sending Push notifications, but it does not work when I'm trying to request feedback services. Here is the code I use: $stream_context = stream_context_create(); stream_context_set_option($stream_context, 'ssl', 'local_ce...

0
Q: Yii scope related models

Constantin.FFI have Page model which HAS_MANY Attachment In Page model: public function relations() { return array( 'attachments'=>array(self::HAS_MANY, 'Attachment', 'parent_id'), } and I am looking for a way to do some scoping on these attachments. In the PageController I have: $model =...

0
Q: Show topic for particular word

DhavalI am sorry if i am not clear I am quiet new to JOOMLA I want to Show all the pages link in a list for a particular topic(word) For example please see this http://www.healthcareitnews.com/directory/electronic-health-record-ehr there is post of EHR and when scroll down the whole list of EHR re...

-1
Q: Syntax Issues while using []

MfaspkSo while working on a test project (learning purpose) I found that its possible to use syntax like: throw new Exception($Query->errorInfo()[2]); notice use of [2] (array index) after $Query->errorInfo(). This thing also seems to be working on other functions like explode; since when? and/...

0
Q: Insert multiple values via PHP PDO into MySQL database

m33xI want to insert 20 values at once via PHP Data Objects. At the moment I'm doing it this way, it seems very ugly: $stmt = $this->pdo->prepare("INSERT INTO user_mooney (`uid`, `mid`, `status`) VALUES (:uid, :mid1, :status), (:uid, :mid2, :status), ...

0
Q: How to list all the folders and its files in php

user2754416I have a folder and it contains directories in it.Some of the directories contains files and some other contains another directory with its file.What I want is list all the files from the folder.Suppose my folder is A and it contains folder B and C.B contains some mp3 files and in C there is an...

-1
Q: XML reading value s:envelope s:body

user17087I have a file XML, but I there are two first line strange, with "". I have search on google and other about soap, but nothing works. I have tried, simplexml_load_file() and new DomDocument() to parse the data... snif. Thank you for your helping. <s:Envelope xmlns:s="http://schemas.xmlsoap.org...

-5
Q: Parse Error expecting T_Function

user3090539I am getting the following error: Parse error: syntax error, unexpected '<', expecting T_FUNCTION in /home/coepzest/public_html/wp-content/themes/my_customizr/parts/class-footer-footer_main.php on line 214 Someone plz help!! The code is :- <?php /** * Footer actions * * * @package C...

-2
Q: warning mysql_query(): supplied argument is not a valid mysql-link resource in C:/xampp/htdocs/test/abc.php in line 106

Varun BaggaThis error is coming when simple query is executed that inserts data into one table. I have checked the syntax and its correctly fine.

0
Q: Php multiple mod rewrite rule conflict

Vin_fugenI'm trying clean my url from localhost/xxx/profile.php?name=google to localhost/xxx/google Below is my htaccess file RewriteEngine On RewriteBase /creatorsink/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ $1.php [L] RewriteRule ^([a-z]+)/?$ prof...

-2
Q: Need a powerfull text editor

Paul DinhamI need a powerfull text editor which can identify these elements to colour them: Types Properties Methods Numbers Strings Constants Comments Keywords I programme mostly with C++ and PHP. I've tried Notepad++, Komodo, Sublime but Notepad++ cannot distinguish property vs method. Komodo and Subl...

1
Q: Format a string as a serial numnber

ManitobaI'd like to format a string into a serial number. I'd like to get something like that: AAAAA-BBBBB-CCCCC-DDDDD with alpha-numeric characters (0-9ABCDEF). So far, I've tried to create a regex to achieve that but I don't know exactly how I am supposed to deal with that. Here is the code I made: $...

-3
Q: put data from html to database

user3090194 *** it is for geting data from database then print it in text in table then i tried to get the data if it updated then print it again ' <form method="post" action="<?php $_PHP_SELF ?>"> <?php function x()***//this for get data from text box and print it*** { $f...

0
Q: Deleting entry from Database via PHP Select Form - not deleting entry

KimberrleyI'm trying to delete an entry from my database using an HTML form. However, when it's submitted, the entry doesn't get deleted from the database and no error code is displayed to say why. Could somebody possibly let me know if I'm missing something from my code, just in case I've over-looked som...

0
Q: Poster image for video embedding

chadocatOn my home page I have 4 embedded videos. To reduce loading time I would like to generate thumbnails that link to an other page with the real embedded video. How can I generate these thumbnails? Noting that : embedded videos come from several video shraing websites (dailymotion, youtube, vime...

0
Q: Change the list of dropdown according to the selection of other dropdown

user3089798I have two dropdowns .i want second dropdown list shoul changed according to the value selected in first dropdown. this is my first dropdown Category :<select name="Category" id="a1_txtBox5" required="required"> <option value="select">select..</option> ...

0
Q: How to upload an image to server using php url

Anand GautamI am working on gallery kind of iphone application. According to my requirement i need to send camera captured image to server using php url. I am storing captured image in application resource document directory. here is my Php code - $file_path = "../Gallery/"; $file_path = $file_path ....

0
Q: Zend preDispatch function not called in Plugin Controller

user3035608I have the first Bootstrap.php who call a plugin controller, who (the plugin) call another Bootstrap. And in this second Bootstrap, I call another plugin controller, but the preDispatch() function is not called ... This the path: Bootstrap => Plugin (preDispatch) => Boostrap (another) => Plugi...

0
Q: Where to store private key for encryption in PHP environment

stUrbIn my database I store information which is encrypted and decrypted on the fly via a PHP-class. Per application I use a private key appended with a user key to make sure the decryption only succeeds when a user tries to decrypt its own data. The user 'key' is stored in the database; but the p...

0
Q: Mysql query for Join table within table

AaruKarthigaI have table with the following column names Table : category_object , Columns name : product_id, cat_id I have to join the table inside this table with the result query For example : The cat_id 5 and 6 having the product id 1 and 8 , these values should come into one row may be another pro...

0
Q: Updating table scheme without affecting data in Laravel

dallardtechI am new to Laravel from code igniter and I am LOVING THE FRAMEWORK! My life is so much easier now. I have created a table with columns using php artisan and entered some test data. I now want to add a few new columns to the database without affecting the current data, and setting the new fields...

0
Q: Getting Json array to work database?

user3078580A bit lost here I'm using the below code to insert a Json array into a html table. Been wondering how I could change this array to pull data from a database rather than a static array? Many thanks. HTML CODE: <html lang="en"> <head> <meta charset="utf-8"> <script src="lo...

0
Q: Magento bundle product oryginal price

user2746186How I could get bundel product oryginal price when price is set to dynamic (price excluding special - when is setup)? I'm trying like this: <?php echo Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol().number_format($_product->getPrice(),2) ?> B...

0
Q: GD merge multiple images together

Backbonerthat I working on at the moment, <?php $image = imagecreatefrompng("img/layer1.png"); // integer representation of the color black (rgb: 0,0,0) $background = imagecolorallocate($image, 0, 0, 0); // removing the black from the placeholder imagecolortransparent($image, $background); // tur...

-1
Q: How to check if anything was chosen in a File Input

user3090624so i have this form: <form enctype="multipart/form-data" action="profile.php" method="post"> <input type="file" name="pics"><br> <input type="submit" name="submitpic"> </form> while trying to identify if there is actually a chosen file seems like $_POST['pics']; doesnt work, or doesnt get a va...

0
Q: how to download attached files in imap

Rathish Venugopali am using imap to connecting my mail server. I stuck with "download attachment files". Anybody can help me,, please ? Last 3 days i am working in this issue. I am using this code to displaying the name of the uploaded files. It is working fine. foreach ($attachments as $attachment) { echo '<a ...

0
Q: POST query from user input on button click

user3059984This is what I'm trying to do. I let the user to input DATEFROM and DATETO. Then when the user click the button, it will execute a query to SELECT * from my table WHERE DATEFROM BETWEEN DATETO. I don't know what's wrong. Please help. <html> <head></head> <body> <?php <for...

0
Q: routing in zendframework 2 is not working

user3027364/* Here is my module config */ 'controllers' => array( 'invokables' => array( 'User\Controller\User' => 'User\Controller\UserController', ), ), 'router' => array( 'routes' => array( 'user' => array( 'type' => 'Literal', 'options' => array( ...

0
Q: SQL - PDO - how to get top 20 rows?

pancho villai have this database setup on records table http://i.stack.imgur.com/obVIa.png i want to PDO for the last 20 by the reference, this is an auto increment number by php but i need an sql statement that would pull out the top 20 meaning the recent 20 records so far.. $display_query = $dbh-

0
Q: “Each PHP statement must be on a line by itself” Sonarqube pattern error

Dr. NoI'm analyzing a PHP code using Sonarqube, and I've noticed that in almost all files I have this error: "Each PHP statement must be on a line by itself" (DisallowMultipleStatementsSameLine) But when I check this files seems that there is no error. For example, in this file the error is raised: <...

0
Q: Using Ajax, to work with a mysql database to download files from server

user3080734I have created a table in my database called 'coursework'I am trying to create a button that downloads the files from the 'coursework' field inside the 'coursework' table in the database to the users computer. I have created the following php code: include 'connection.php'; //This calls up ...

0
Q: validate captcha when form submit using ajax and php

peacehow can i validate if the user has enter the right captcha using ajax? and prevent the form submission if $_POST['captchainput'] != $_SESSION['code']. this is the markup <form action="captchaccept.php" method="POST" name="maincontact"> <input type="text" placeholder="Please enter the code"...

0
Q: In magento how to include subcategory path too in breadcrumb of home page product

Rama PriyaIn my magento site i have added my products under subcategory.i was in need to display the full path for breadcrumbs of my home page product image like home -> main category ->sub category -> product name. So i have implemented this link Full-Breadcrumb-Path. Now i am getting the breadcrumb like ...

0
Q: How to show the loader image until the page data loads?

PHPLoverI'm a newbie to the concept of displaying loaded image until the data loads. The time to load the data is too much so till then I want to display the loader image. Can anyone help me in this regard? For your reference I'm putting below the code from the PHP file and Smarty template file(i.e. HTML...

0
Q: WordPress blog_content character limit

Aaron LeeGreat people of Stack, I once again require your assistance. I currently have an external website that pulls through blog content from a sub-folder containing a WordPress installation, for example: Website A: External Static Website Website B: WordPress installation I have the posts including ...

0
Q: execute sqlplus using phpseclib

user3090655I want to execute sqlplus from phpseclib ssh2 but it doesn't work $sqlcommand = "sqlplus -s /nolog <<EOF connect $dbusername/$dbpassword@$dbserver $sql quit EOF"; $ssh = new Net_SSH2($server); if (!$ssh->login($username,$password)) { exit('Login Failed'); } $result= $ssh->exec($sqlcommand)...

0
Q: php syntax error unexpected '<' expecting T_FUNCTION

user3090539I am getting the foll error:- Parse error: syntax error, unexpected '<', expecting T_FUNCTION in /home/coepzest/public_html/wp-content/themes/my_customizr/parts/class-footer-footer_main.php on line 214 Can anyone pl tell what's wrong? var or method(): static $instance; function __co...

0
Q: Automatic Logout after 15 minutes of inactive in php

user1866385i want to distory session if user are not doing any kind of activity on website at that time after 5 user automatically redirect on index page how it is possible is possible in php with session handling and for that i have to maintain or update user login time or not..

0
Q: Unexpected T_STRING error on server but not on localhost

FaarbhurtzSo on my localhost my website is running fine, but when i run it on a server on my workplace (it has PHP 5.3.3) i keep getting the unexpected T_STRING error. I have pinpointed the problem down to a function: exportXML (when i remove this function the website is working) Any ideas? I'm kinda sur...

0
Q: Add Row To HTML Table & Add to Database After

Andy NaylorI have a table that inserts rows into the database. It is currently limited to 2 rows: <form action='insert-expenses.php' method='post'> <input type='hidden' value='$taskid' name='taskid'> <table width='655' border='1'> <tr><td align='left' width='350'><input type='text' name='expense1' sty...

0
Q: Looking to convert this JAVA/PHP Encryption code to C#

seopowerI work in PHP and looking to convert a piece of code from JAVA/PHP to C# related to encryption , I am novice in C# can anyone help me? Code is picked from http://www.androidsnippets.com/encrypt-decrypt-between-android-and-php Also given below - Please help me : ================================...

0
Q: Paypal API chained payment Primary Reciver can Pay all fixes fees only?

Natthapon ButsabokPaypal API chained payment. Hi I have Question in Paypal API chained payment. link ==> https://devtools-paypal.com/guide/ap_chained_payment/php?interactive=ON&env=sandbox I Develop API With PHP Programing. I use Paypal API chained payment. fees option i use "Each Receiver Pays the Fee in a ...

0
Q: transform dates into other format?

user3090697I have many event dates that are read out as 20131212 or 20100125 or it could be any date a user has submitted as an event (structure is yyyymmdd) now i have made a function that displays all events that month. But the date gets read out as 20131212 How can I replace the 20131212 or whatever...

0
Q: Result after divide (/) is not correct

afzulnizamIm trying to show data from API using this code below. <? // CALL API URL $OfferFeed = simplexml_load_file("http://adshiftmedia.com/api-leads.php?pubid=2738&apikey=LBbCxaMDuhifj73dxYDXh1GmYzxLZYvi"); foreach ($OfferFeed as $singleOffer) { ?> <!--display offers--> Subid: <?php echo $si...

0
Q: Issue in iterating MongoCursor using foreach loop with php

Mark GreenI am trying to iterate the MongoCursor using the foreach loop as shown in the code below. The loop only returns the first record. Can anyone figure out what the issue is? Here is my code $usrcollection = $db->users; $user = new MongoId($userid); $where = array('_id' => $user); $filter = array(...

-1
Q: Javascript Library for interactively creating workflow flowcharts

yomexzoI need to build a module that allows its users to create the flow of a workflow. Flow means the steps involved and the stakeholders (users) involved. I want to achieve this by allowing the user to build a flowchart with a start and stop by default. Problem is I've looked around for a Javascript ...

0
Q: Comparing two arrays and adding the missing values to both arrays

SitethiefPHP Fiddle code I want to compare two arrays based on a single variable that is present in every subarray. If its not present in one of the arrays it should be added as an empty value in the right alphabetical order and in the same order as the other array. So that when I print the information i...

0
Q: Retrive the id as per single element from an array of a coloumn

RIA DevI have an table like this. I want to retrieve the product_id by selecting the "level_id" which are "20" from "misc" column. Any idea guys how to do that in mySQL ? product_id misc ---------- ------ 1 {"level_id":20,"group_id":"2132","product_name":"bg","category_id":6} 2 ...

-1
Q: Replacing characters with regular exp

user3090649Let's say i have a variable which is coming from form. $number = $_REQUEST['number']; It can have only three types of values. 1. 9***2331**32 2. 9%%132%%13%% 3. 3xxx31231xx4 So only *,%,x How can i replace the wildcards with regular exp to '_'

0
Q: How to set rewrite rule for same filename and directory name?

SachinI have upgrade my Wamp server 2.0 to 2.4. I had set rewrite url to hide extension. But after sever upgraded the rewrite rule is not working for same directory name and file name. Here is the structure, root- test/ (Directory) test.php (File) Rewrite rule is as below I have used RewriteC...

0
Q: ZF2: Create Fieldsets based on data extracted from DB

manouI have a list of elements and options stored at the db in two tables. Each element may be one of four types. These options are managed with a MultiCheckbox form-element for each element and I achieved to render as I wanted like foreach($form->getElements() as $element) { if ($element->...

0
Q: Regular expression for replacing

gprusiiskiI`m very weak at regular expressions and i need your help. The result that i want to accomplish is to replace all $variable in my templates with $view->escape($variable, 'js') Can someone help me with the regular expression for this. If you assist me with this by using the search and re...

0
Q: Php my sql insert into does not work

Matthew BazanetI'm developing with the amazon API. It all works, but when I try to save the server's response to the DB .. the process does not error, but in DB does not save anything. foreach ($offerList as $offer) { $buyingPrice = $offer->getBuyingPrice(); echo("LandedPrice\n"); $landed...

0
Q: Cronjob not working Ubuntu Server

StanI just finished set up a cronjob on my server. I created my cron.sh. If I run this file via SSH with ./cron.sh everything its fine, its working as expected. I added a new line within /etc/crontab file to run the .sh at every 5 minutes but its not working. Can't understand why. Line added in cr...

0
Q: matching multiple inputs with database

MoopsishI'm trying to make a self test page where php matches the input with the database and checks if the answer is right. but so far I don't know how to get it to check all the answers individually. the script i got so far only works if all the answers are wrong. How would I do this in PHP? this is m...

0
Q: Symfony2 forms after modifying a join table

TomI have Symfony2/Doctrine system. Table A has a many-to-many join to Table B. Doctrine has been taking care of the join table so far. Within a Symfony form, when you edit a row from Table A, the field has been represented by set of checkboxes (each relating to a row in Table B). I need to add ...

1
Q: How can I extend class Confide in Laravel 4?

NicI want to extend/overwrite the method logAttempt in class Confide (Confide on GitHub) in order to execute some extra code whenever someone logs in successfully. This would be cleaner than copying the same code to all controllers where logAttempt is called. I read through the Laravel documentatio...

0
Q: PCRE Regex Function Parser

puppyFloI have a specific requirement to parse some basic pseudo code in (wait for it) PHP. The type of string that might need parsing is as follows: MID(DATEDIFF(ymd,131001,131201),0,1) Such that: DATEDIFF(ymd,131001,131201) = 61 MID(60,0,1) = 6 The parsing of the individual expressions is not the...

0
Q: Yii Framework: Different view (on actionIndex) depending on user's role

RémyI'm a beginner in Yii Framework, and I have a problem I can't fix. I have this in my class controller : public function actionIndex() { $dataProvider=new CActiveDataProvider('Absence'); $this->render('index',array( 'dataProvider'=>$dataProvider, )); } That gives me a list of all 'abs...

0
Q: Yii - CHtml::link() Post with Confirmation Dialog Doesn't work

ctcworksecho CHtml::link('Delete', '#', array('submit'=>'admin/page/exhibitions/delete', 'params'=>array('test'=>50), 'csrf'=>false, 'confirm'=>'Are you sure?' )); I can see in the inspector that Yii has inserted these line of code in html jQuery(function($) { jQuery('body').on('click','#yt0',function...

0
Q: Abstraction of external service / API request and response

Jimbo Background: I'm designing some classes to retrieve data from an external service. It could be an API, but in fact it's calls to ffmpeg cli, which in effect is an API to the conversion tools themselves. When talking to an external service, where the data retrieved may not always be the same, ...

-1
Q: php errors 'headers already sent' and 'mysqli_fetch_array expects mysql_result, boolean given'

Eric BrockwayI've got a shopping cart script that uses a stored procedure called 'get_shopping_cart_contents' on a web page, a fairly straight-forward jquery carousel plugin on another page, and a script to display a sort of mini shopping cart in the header of each page. If I remove the mini-cart code, both ...

0
Q: Content-Disposition: attachment alongside HTML

joltmodeI have the following response headers for one of my file download pages: Content-Disposition: attachment; filename="file.zip" Content-Length: 286269 Content-Transfer-Encoding: binary Content-Type: application/zip Since it takes some time for the zip to assemble, the request for the most time i...

0
Q: submitting form with parameter from a link in jquery

gauravishereI am trying to save data in database in background through a link, and to give download functionality to that link in front end. but it gives an error. my script is - <script> $(document).ready(function(){ $("#download").click(function(){ var me = $(this), data = me.data('params'); ...

0
Q: Postfixadmin is not working with Postgres

user3042967I am new to both postgres and postfix, I decided to use to postfixadmin with postgris to gain so hands on, I have ran through detailed steps mentioned in different websites, and I have checked another working installation of postgres (but without postfixadmin), but whenever I accessing the setup....

0
Q: Reflection::hasMethod vs. method_exists performance

user1740331From performance point of view should I choose: $className = 'Foobar'; $methodName = 'method'; This $Reflected = new ReflectionClass($className); $result = $Reflected->hasMethod($methodName); over $result = method_exists($className,$method); And why? For this case I'm not using any othe...

0
Q: Vonvert JPG/PNG to SVG format using PHP

user1087110How do I convert JPG/PNG to SVG using PHP? I know that it will not be vectorised, but I need it in a SVG-format. I dont want to use any other software than PHP. Something like this: <?php $image_to_cenvert = 'image.jpg'; $content = file_get_contents($image_to_cenvert); $svg_file = fopen('i...

0
Q: Function with the_author_posts_link returns link out of order in WordPress template

SauceI've written a function for my WordPress theme to output the Author's name and post date. It runs inside the Loop. $author = the_author_posts_link(); $date = get_the_date( 'j/n/y' ); echo '<span>Posted by </span><span>'; echo $author; echo '</span><span> on</span><span> ' . $date . '</span>'; ...

-1
Q: How do i search and get a unique id from my table

KofYebLets just say i have a custom search engine and i want to search with a specific keyword and that keyword should only bring forth one result that result in the database. example. i have this keyword in my db 10101010 this keyword should pull the specific field info. please someone should help me ...

0
Q: unexpected '.' error when defining class constant

MaximusI define constant in my class class Controller_CopyPronounceFile extends Controller { const PATH_TO_MULTIMEDIA = DOCROOT.'multimedia/pronounciation'; } and have the following error: unexpected '.' caused by this part DOCROOT.'multimedia/pronounciation' DOCROOT is a constant defined i...

0
Q: PHP-MSSQL - Running complex SQL script in PHP with MSSQL database

Airbag888I'm trying to run a rather complex SQL script that works great in SQL Manager. After a few hurdles to get my php server to connect to MSSQL, simple scripts (selects) work however this script I'm trying to re-use returns nothing. Script is as below: --===========================================...

0
Q: Retrieving table via relational table in Laravel models

user1392042I have a database called "recipe-book" that looks like this: +-----------------------+ | Tables_in_recipe-book | +-----------------------+ | ingredients | | migrations | | recipe_categories | | recipe_ingredients | | recipes | | users | +...

0
Q: Codeigniter Controller rendering blank on SERVER

K CloudI am using codeigniter for my project. These are the symptoms of my problem. My controller is displaying blank page.(name : signup) My other controllers are running well with no problems. The signup controller is runnign good on my localhost but giving problem on server. I haven't used andy mod...

0
Q: PHP memcached update result

Liam SorsbyI'm about to implement a memcached class which can be extended by our database class. However i have looked at many different ways of doing this. My First question was, what is the point in the Memcached::set() as it seems to replace the value of the key. Does this not defeat the object of cachi...

0
Q: php - parsing html doc but issue with comparing text content

user3083672I'm using PHP to retrieve a document and find some data within the HTML. I've used Tidy clean and repair as the document contains lots of bad html. Anyway, In the html document there is a tag like: <a href="www.google.com">Link 12345</a> I want to get the value of the attribute (www.google....

0
Q: How to make dynamic textarea in CActiveForm in yii

Rizwan Shamsher Kaim KhaniI want to make text area in cactiveform in yii dynamically. but I am getting errors. I have a code. <?php foreach($model->verseTranslations as $trans) { ?> <?php $model->translation = $trans['translation_text']; ?> <?php echo $form->textArea($model,'translation',array('rows'=>6, 'cols'=>50)); ?> <

0
Q: Get array inside of array without knowing what is the first layer of array would be

deathlockecho $merchant_pic['shop']['campaign']; I know that would give me the value of campaign. But first I have to know what is the first layer of the array - which is shop. Problem is: the first layer could be anything. Is there a way to get the value of second layer of array without knowing/defin...

0
Q: get xhr status from a callback function

user3090817Hello, I have a php call that write javascript lines in my html file in this format: <script src="http://localhost/listing.php?jsonp=thecallbak"></script> I would like to get, in the callback function, the http status (such as 404, 403) to respond appropriately. I tried several option but not...

0
Q: How to get error page with user entered parameter or page name in php

Rajesh Odayanchal I didn't get a proper solution for this issue. the URL should be like http://mydomain.com/poem/xyz. Here I need to process the the value xyz in http://mydomain.com/poem/index.php, and accordingly I need to take some actions. Is it possible with php or through jquery? Thanks in advance..

1
Q: Error in ajax jquery pagination in CI

user3085812Got error in jquery pagination in codeigniter. if per_page=5; total number 6 and total page 2 but the pagination like below Showing 6 to 6 of 6 | < 1 2 But only 5 is shown and last one show in 2nd page. Hi friends i am stuck in this bug.This show in every pages.Pls give ...

0
Q: Symfony 2.3.7 form value from query result

willyI had create a form from my Entity (use Symfony 2.3.7) and i have one problem: i want put the query result in my form values. Ex name : john (the name get in my table). My form class is: class form extends AbstractType{ private $repository; private $idRistorant; public function __co...

0
Q: Echo page description from Yoast on wordpress

Tony HeydenI have installed Wordpress SEO by Yoast onto a site Im building. They have an area when you can add the description for the meta information. However I want to add this to a twitter meta tag: <meta name="twitter:description" content=""> Does anyone know how to grab the description and output ...

0
Q: Displaying Tweets from Hashtag

BenI am trying to display all tweets with a hashtag, for example an event name. I've looked around and tried various bits of code and still no joy, the code pasted below actually worked for me about a year ago. It doesn't appear to be now. <? $feed = "http://search.twitter.com/search.atom?q=%23Mandela

0
Q: PHP Storing more than one value in array for RGB

user2010470I've been trying to understand how to convert this script into a multidimensional array. I've got as far as the code below. It builds an array of the RGB colour. I want my array to store the R G and B values each loop alongside the full string. I honestly cant find the information i need to lear...

0
Q: Enabling email permission acquiring when making a Facebook login on my website

spfrontI'm trying to get Name and Email information about the user that connects to my site with Facebook Login. I've looked in this article and i've made the written step: facebook api email permissions Then i went to my Application section in my profile and i've made a call to the Graph API specify...

0
Q: Opencart: How to update system/library files using vqmod?

Sankar VI'm using opencart 1.5.6. I need to modify system/library/user.php. Is it possible to do this via vqmod xml file? My requirement is to add a function for usergroupId in user.php file. I tried like: <modification> <id><![CDATA[Modify system library user for usergroup]]></id> <version><![CDATA[0.1]]

0
Q: Preg_Match Last String From A URL

Matei ZocWhat i'm trying to do is to get the pagination from a web url with preg_match Example: http://www.google.com/page/223 What i need from this url is " 223 " I try this code but is not working ... preg_match('~"http://www.google.com/page/(.*)"~iU', 'http://www.google.com/page/223', $page); prin...

0
Q: JSON encode from PHP

Reverteri have a problem with my PHP code. I can't encoding all my record in my DB This is my PHP code: $out = array(); while ($row3 = mysql_fetch_array($res3)){ array_push($out, array( 'nomi_partecipanti' => $row3['nomi_partecipanti'], 'importo' => $row3['importo'], 'Stato' => $row3['options'] )); ...

0
Q: mysql AND morethan one time for a column

Anish CharlesSELECT DISTINCT group_id FROM mark_mapping WHERE subcat_id = 22 AND subcat_id = 30 AND subcat_id = 17 AND subcat_id = 18 AND subcat_id = 19 This is my sample query. As you know.. this is not working. Help me please. Here subcat_id may can repeat more than 10 times. All are same columns.

0
Q: php error unexpected '<' expecting T_Variable

user3090539I have a wordpress theme 'customizr'. It contains the 'footer' php code, as it is. When i update the site, it shows the foll error:- Parse error: syntax error, unexpected '<', expecting T_FUNCTION in /home/coepzest/public_html/wp-content/themes/my_customizr/parts/class-footer-footer_main.php on ...

-1
Q: Increase value when data is inserted into the database

user3090891Good good, I tell them I need a bit to insert some data in the database has a field that according to records already in the database, this increases. I mean, if there are 25 records in the database & ever want to insert new data, the following data fields have the following form, which will ad...

0
Q: Batch timed loop php files

JoelHow do you create a .bat file that runs a file every hour? eg. I want 'php_json.php' to run every hour (60 min) to collect new data. I heard that this was possible with batch-files

0
Q: cant get user id facebook php

user2964372got crazy to fix it and i have no solution for this i tried to put permissions - its not working, the kidding thing here is when i try to get my profile photo via opengraph its works good but when i try in another account its not working and i got $user = NULL (0) please try to fix my code, im ...

-1
Q: framwork selection for php project

mksMy new project is document management system.It has to be done module wise.I know basics of php and oop concepts.Which framework in php is better to do this project?Please suggest me

0
Q: Multiple file upload is uploading only last file and not the rest

kittu88I have created an app which is supposed to upload all files from a particular directory, one after the other. The code is uploading only the last file in the directory and not all files. The activity class: public class UploadAudioDemo extends Activity { private static final int SELECT_AUD...

0
Q: CakePHP 1.3 Elements not outputting PHP

GregI'm currently just trying to output some text via php in an ctp file within the elements directory. If i have the code: <?php echo 'PHP output'; ?> Plaintext Output You will see Plaintext Output but it ignores PHP output, if i you try the following: <?php $i=2; if($i==1) { echo '$i is equal...

0
Q: Internal server error while importing sql file?

Ghanshyam KatariyaI am importing an SQL file and it shows me an error like this Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator at admin@example.com to inform them of the time this error...

0
Q: Fileupload Using Dropzone & Laravel4

WebDevBI'm trying to upload multiple files using dropzone but I can't seem to get it to actually upload the file... I'm getting a "sucsess" respone but the file isn't present. This is the code that I have: public function post_upload() { $input = Input::all(); $rules = array( 'file' =>...

0
Q: How to set the header background color in TCPDF?

Belmark CadayGuys how do I set the background color of a header in TCPDF? I have tried this one. Im quite new to TCPDF sorry: function Header () { $this->setFillColor(); $this->Rect(); } I ended up with no header and a brown pdf page.

0
Q: MultiCell page break in fpdf

Aliasgar110I am creating a table using multicell in fpdf,the problem is that after the first page each new cell I add goes to a new page.i found a similar problem TCPDF / FPDF - Page break issue but i was not able to understand the solution

-1
Q: PHP: function as form action

Ignas DamunskisSo I have form and PHP function in .php file, and I want to submit form content to function. <?PHP ... $i = 1; while ($row = mysql_fetch_assoc($result)) { $prekes_id[$i] = $row['prek_id']; $i++; } ... function kreps($num){ $q = 'INSERT INTO krepselis (krep_prek_id) VALUES ("'. $pre...

0
Q: I have got an error in script using PHP and cURL to upload image

user3026568I am trying to upload image using cURL in PHP. I want to upload it on CDN server. Right now I am using xampp and I've created two domain to work. My main site is website.dev and CDN is cdnmysite.dev Mysite's root is "htdocs" and cdn's root is "htdocs/usercdn". Now I am trying to post image using...

0
Q: Backslashes displayed upon select from db

LebachWhen I insert into mySql using "mysqli_real_escape_string", it's fine, well handled but then a weird scenario occurs: In my local environment, when I select from db and display it works fine : Example : "It ' s working fine. However, in the prod environment, it displays: "It \' not working fine" ...

0
Q: How to assign php variable to java script variable

pd1786<?php $query = mysql_query("SELECT products_zipcode FROM products ")or die(mysql_error()); while($row = mysql_fetch_array($query)) { $zip = $row['products_zipcode']; } ?> here how to assign $zip variable value to java script variable var address = zip; <script type="text/javascript"> ...

 

« first day (295 days earlier)      last day (15 days later) »