« first day (280 days earlier)      last day (30 days later) » 

11:02 AM
0
Q: Unable to edit a mysql subject using Php

user3035999So I'm creating this CMS for faculty information as part of my thesis. When I need to create/delete a subject, my code seems to be working fine. However, when I try to update them, it tells me that the editing process failed. Not sure where exactly it's going wrong. Below is my subject query. I'...

0
Q: What is the exact detail but simple meaning of [x-amz-meta-expires]?

user3004444I have uploaded images using putObjectFile(). I have used there "cache-control" attribute. So I just want to know is [x-amz-meta-expires] returns the object expiration time? Thanks in advance...

0
Q: Call PHP Function In Smarty

mike jonesCan some show or tell me how to call the php function below to get the ratings for each movie in smarty as i'm new to php. public function getRating($movieid){ $movieid = mysql_real_escape_string($movieid); $average = 0; $e = mysql_query("SELECT AVG(`rating`) as average FROM movie_ra...

0
Q: Strange issue with Content-disposition: inline on IE 11

GetzI have a download code in php which works fine, i just want to add the possibility to open file when it's possible instead of download it. I set the Content-Disposition to inline, which works like a charm for all browsers except...IE. No problem with the file displayed directly in browser (Imag...

0
Q: Putting ContentURL in smartwizard working, does anyone know how?

user3021575Im using smartwizard in a multistage booking process. But cant seem to be able to load content throught ContentURL.. I know that there is already open questions about this, but from what i saw, no one has found a solution.. I want to use contenturl to load a php page that will include other page...

0
Q: PHP export / import mysql table data to / from sql file for wordpress plugin

GravyI am building a custom wordpress plugin for one of my clients. I have a php activate and deactivate script which creates and drops the custom tables. Before deactivating, I would like a wp-admin to be able to download an sql export script with insert statements for my custom table data. That wa...

0
Q: How to prevent designing is disturb during sortable() of j-query.

user3030853I am creating drag functionality using sortable() of j-query. I am showing 30 div in one line with horizontal scroll bar. I have some design disturb issue. When I drag one div to place another div then It disturb designing. Please Help. Functionality is done but only design disturb issue is gener...

0
Q: I have error in function of recursive xml traversal

pankajfunction ReadUserXml($requestXml) { static $res = ''; $xml = new SimpleXMLElement($requestXml); if(count($xml->children())) { $res .= $xml->getName().php_eol; foreach($xml->children() as $child) { ReadXml($child->as_XML()); } } ...

0
Q: how to set up virtual host in nginx?

Manoj KumarI am using below configuration settings but it is downloading index source file on execution. But it is showing output of index.html if it is put instead of index.php Overall it seems it is not reading php file. server { server_name test.com; root /var/www/test; index index.html index.php...

-2
Q: Trigger jQuery from PHP?

JamesI'm fairly new to jQuery but I'm sure this has a simple solution. I have a Popup jQuery function defined in my .js file. I am checking with PHP if the USER needs to verify his Login credentials with facebook: <?php if(empty($user)){ // the user needs to verify credentials // execute Jquery po...

0
Q: PHP with curl for Xml parsing

rahulI am parsing a google map api for getting latlong form address.I got the xml succesfully.How can i get the latlong from the xml response. My response is SimpleXMLElement Object ( [status] => OK [result] => SimpleXMLElement Object ( [type] => Array ( [0] => locality [1] => political )[formatted...

0
Q: PHP - Get variables from a URL & save it for later use

D.MIm using this short php script to get variables from a Url which sends me data. file_put_contents( "log.txt", print_r($_REQUEST, true)); Now when i make a test call the variables are saved in my log.txt file, but any following call doesn't get saved or displayed in the log.txt. So basically it...

0
Q: How to upload photo in yii?

404 Not Foundi am not able to upload photo in my database and folder... this same code is working if i use CModel class for building form... but if i am using plain html it's giving me error Profilepic cannot be blank... my code is given below my form <form method="post" action="<?php echo Yii::app()->g...

0
Q: Manage ID's inserted an in input box seperated by commas

PLATANIUMI'm developing an "input box" where you should insert various ID's seperated by commas (1,2,3,4...etc) where later on I would like to manage these ID's in a MYSQL query. How is the best way to do this? How can I later use the variable in the MYSQL query? Thanks in advance for your help!

0
Q: Get the total of a Project from related project items in CakePHP

Vincent van den BoogaardIn CakePHP i've a model Project and a model ProjectRecord: <?php class Project extends AppModel { public $useTable = 'project'; public $hasOne = array( 'Customer' => array( 'foreignKey' => false, 'conditions' => array('Project.customer_id = Cus...

0
Q: FB API Request/notifications

Mr SorboseHave seen various articles dotted about with similar material on FB request invites. How is it possible these days to invite friends to an external website rather than a canvas app or game. I have the necessary usernames and IDs from the graph API. I need to loop these in PHP and send out an i...

0
Q: Class resolution quirk with 'implements'

Jonas BerglerCan someone explain the following, seems like a bug to me. <?php class A implements JsonSerializable { public function jsonSerialize() { return []; } } new A(); new B(); class B implements JsonSerializable { public function jsonSerialize() { return []; } } Has the following result ...

0
Q: Is it bad practice to use a global $config variable?

danijarAt the moment, I use a variable called $config, which is a big associative array containing settings for the application like folder configuration, database connection, urls to match, and so on. This variable is defined in its own file system/config.php which gets included by the main file system...

0
Q: I got a very strange function returnvalue behaviour in PHP here

SteiniHi I have a very strange behaviour of PHP and hope that you are able to help me. I have a Symfony 1.4 based PHP project on PHP 5.4.7. I have the following class function to resize images: public function getResizedImageHorizontal($newWidth) { $image = null; $data = $this->getData(); ...

0
Q: Form input formatting

MatthijnIs there a good way to format the input for form's in laravel? For example I have a field in my database calles price which has the price in cents. But in my form I want to display it as a normal "money" value. (e.g 300 becomes 3,00) but when I read the value from the form laravel converts it bag...

0
Q: How to combine two arrays with same keys?

Gottlieb NotschnabelI have two arrays First array [0] => array('date' => "2013-11-26", 'value' => "2") [1] => array('date' => "2013-11-24", 'value' => "6") # Note there is no entry for "2013-11-25" Second array [0] => array('date' => "2013-11-26", 'value' => "null") [1] => array('date' => "2013-11-25", 'value' =>...

0
Q: I need class written by the Trirand team to solve this issue

user1384389I'm facing an issue with jqGrid php component integration with MSSQL server. while browsing stack overflow i found this thread but the answered thread missing the class. Can someone Pleaselink go through this thread and send me the class which is written by #Trirand team to solve the issue.I'm un...

-2
Q: If condition - $a and $b || $a and $c

Macko Taranaif ( 'post.php' == $hook && $screen->post_type == 'slideshow' || 'post.php' == $hook && $screen->post_type == 'page' ) if ( ('post.php' == $hook and $screen->post_type == 'slideshow') || ('post.php' == $hook and $screen->post_type == 'page') ) It's not working properly. Any suggestion ? How ca...

-1
Q: How can you execute php/sql code within a form

user3032860I want to make a form with a textarea that displays the tekst so you can modify it. If you press submit, it wil update the database table and return to the same page. I thought you could insert code in the action attribute, but what about returning to the same page? <form action= <...

0
Q: Implement PHP logic to jQuery

Jhilke DaiIn a system I have 3 users, Ben, Shane and Payne, the site functions normally for all users and also have same Menu system. However I am tasked to add one Menu item from core and be visible only for Ben. So, I added Candy in the Menu item as Ben is kid, but now I cannot change the core in PHP sa...

0
Q: Order on MySQL is Returning 1,11,2,22 not 1,2,11,22

tim.bakerOn this MySQL Query the ordering is sorting all results digit by digit. What I want is to simply return the smallest number first. Am I going about this wrong, or is it just the way PHP sorts? MySQL: $history = mysqli_query($con,"SELECT id,credits,timeadded FROM users ORDER by credits ASC); R...

0
Q: Different PHP directory Apache + CLI (chrooted)

user3036021I have an issue running php command line tasks on chrooted environment. (CentOS Linux running Plesk 11.5) If I execute the following php code: <?php echo getcwd(); ?> On web server (Apache + suexec + php fastcgi) it prints: /var/www/vhosts/mydomain.com/httpdocs On command line (/bin/b...

0
Q: I want make a OOP pagination for my articles

user3036158I want make a pagination for my articles.. Here is class: <?php class Mynews { public $conn; public function __construct() { $this->conn = mysqli_connect("localhost", "root", "", "mynews"); } public function readAllarticles() { $sql = "SELECT * FROM article...

1
Q: Safely auto increment MySQL field based on MAX() subquery upon insert

Ben DodsonI have a table which contains a standard auto-incrementing ID, a type identifier, a number, and some other irrelevant fields. When I insert a new object into this table, the number should auto-increment based on the type identifier. Here is an example of how the output should look: id type...

0
Q: run a script PHP from MS DOS without opening any browser

user2915878i want to run a script PHP (example : http://localhost/project/test.php) from MS DOS without opening any browser. i use the command : START http://localhost/projetc/test.php but this command opens a browser do you have any solutions?

0
Q: Video Upload PHP Script Not Working

user3023297I want to upload videos instead of images I have used this script for image uploads but now I want to upload videos and I have changed file types to video file types but it's not working and it is giving me this notification Notice: Undefined index: file in C:\xampp\htdocs\mysql_login\upload.php...

0
Q: add subdomain to folder php

user3035800I need php script to perform the next thing to be performed cpanel account management system storage . The following example - Creating a subdomain Create a folder at the same time of course (is the example here involves creating a folder ? ) I wonder if the reference of the domain folder is do...

0
Q: Is there a way to temporarily disable Duplicate entry in phpMyAdmin?

SirBTI keep on getting the below error message when I try to enter some important records I accentually deleted. Duplicate entry 'EMIR2023 ' for key 'flightNo' Is there a way in the phpMyAdmin environment I can disable the UNIQUE KEY then activate it when I am done with inserting the records? Fi...

-1
Q: PHP string output buffer to html- generating extra anchor tag

user2678538Once again, I have no choice but to ask you guys for help on this one as i'm completely baffled and I've been trying to solve it this past hour. I have some php code structured something like this : function build($url=""){ $output = '<ul class= "bc-ul">'; $output .= '<li class= "bc-li"

0
Q: Simultaneous Requests to PHP script with Transaction

Yuan ChenI have a script with update the table record. I use the transaction for rollback if there is an error occur. The problem is that when the script try to update the same record then the system will broken. Example: the record is 10 2 simultaneous request then request 1: +5 to the record request 2:...

0
Q: Undefined index: aksi

kputriHi i'm getting an error as :Undefined index: aksi in C:\xampp\htdocs\crud\lat1.php on line 6 my php code is: <?php include"class_koneksi.php"; $db=new database(); $db->konek(); if($_GET['aksi']==''){ //line 6 $daftar=$db->tampilData(); echo"<table border=1> <tr> ...

0
Q: Allowing user to type html tags and save them to file to display on website

FeathersI am writing blogging software from scratch (mostly as a learning experience). My method of allowing the blog owner to make a new post is for them to type the post into a form (textarea), including formatting tags such as <br />, and then use PHP to create a file and write it with the contents of...

1
Q: JQuery not changing the content of div from even numbered links?

VaMooseThanks for taking the time to look at this post. So I have managed to do my task to a point. I am pulling data from a database called posts with the following fields: id, account_name, data, heading, subheading, videos, voice_notes, music, images, post_date, date_for_post. So This is the proces...

0
Q: Populate Google Charts with php array

almalI am trying to create a Google line chart using their API and JSON. Hard coded, this chart works: <?php include "include/dbcommon.php"; $url = "http://".$_GET['P1']; if (! is_null($_GET['P1']) || $_GET['P1'] != "") { // Connects to your Database $conn = mysql_connect($host, $user, $pwd) or ...

0
Q: php get array elememnt using $$

ddw147i know this $var1 = "10"; $var2 = "var1"; then echo $$var2 gives us 10 i want to this with array i have array $intake_arr = array(5=>10,7=>20,8=>30,9=>40,10=>50,11=>60,12=>70); i have some logic that will pick one array from set of array , all array will look like $intake_arr ...

0
Q: How can I access parent class variable?

Repon HossainI would like to access parent class variable. How can I access parent class variable? here is example: class myclass { var $parentvar; function __construct() { $this->parentvar = 'Some text or array'; } } class anotherClass extends myclass { function __construct(argumen...

-1
Q: Wordpress admin panel error?

Debakant MohantyWhile accessing the admin panel of my site http://freepokemmorpg.com/wp-admin/ te following error appears Warning: Cannot modify header information - headers already sent by (output started at /home/freepoke/public_html/wp-content/themes/hanami/functions.php:9) in /home/freepoke/public_html/wp-i...

-2
Q: "Private" not not really private?

Joran Den Houtingclass Test { private $private = ""; public function add($string) { $this->private[] = $string; } public function evaluate(Test $container) { return $container->private; } } $test = new Test(); $test->add("zero"); $test->add("one"); $test->add("two"); $resul...

0
Q: PHP Markitup wysiwyg doesn't read my content

Ludovico LoretiIf i add some text on Markitup wysiwyg, and i send the form, it doesn't save the content of the text area in the POST variable...Someone know why? `<textarea id="markItUp" cols="80" rows="15" name="contenuto" placeholder="content" required></textarea>` this is the query: <script type="text/j...

0
Q: Exclude Wordpress posts from being shown on homepage from a specific category

Bob FlemmingHeres a tricky one... If a post is marked as 'Category A' I want it to be excluded from the homepage. This can be achieved with the following code: function exclude_category($query) { if ( $query->is_home() ) { $query->set('cat', '-3804'); } return $query; } add_filte...

0
Q: redirect html page that is ajax content

user3036243I have a one page portfolio site that uses ajax to load some portfolio items. These portfolio items are separate html pages, for example folio-item.html. The problem I am trying to solve is that the pages like folio-item.html are being indexed by google (which is good) but when clicked or are l...

0
Q: CGridView filter whit CJuiAutocomplete

TaviI want to filter an GridView by using an autocomplete field since the table of values has over 4000 entries and a simple dropdown wouldn't help. what i've tried so far lots of ways. closest i got was this way : View file: $this->widget('zii.widgets.grid.CGridView', array( 'id'=>'activitate-...

0
Q: curl with php not giving any results

user2964771this is my php code, where it is not giving any result, please let me know if I have made any mistake. <?php $curl_handle=curl_init(); curl_setopt($curl_handle,CURLOPT_URL,"http://www.my-ajax-site.com 'https://ajax.googleapis.com/ajax/services/feed/find?v=1.0&q=Official%20Google%20Blogs'"); ...

0
Q: Replace space with dash (-) in url only

Luc PrevooIs it possible to change the space in the url to a dash (-) without changing it in the code? The URL is used to identify the page, so it is not possible to just change the url because the page will not be found anymore so str_replace is not usable in this solution. Using str_replace twice, once...

0
Q: Array key partly repeats, merge by that

php_nub_qqI have an array Array ( [database_db_host] => localhost [database_db_user] => root [database_db_pass] => qwerty [database_db_db] => db [system_base] => http://www.mysite.com/ [system_DEBUG_MODE] => 0 [system_name] => mysite.com [system_VAT] => 20 [appearance_c...

0
Q: How to get hyperlinked PHP value in other PHP file

gree_tejasI have a PHP page where I have hyperlinked text: echo "<li><a href=list_result2.php?name=$disease_name>$disease_name</a></li>"; Let I have 5 diseases in hyperlinked list, i.e. diabetes, Ischemic Stroke Stroke, Cardiovascular Disease and malaria. Whenever I am clicking single word disease, say...

-2
Q: PHP Variables in Javascript

user2790911I don't have much programming experience. I have some code that I'm adapting and I don't understand how the variables are being passed from PHP to JavaScript. I suspect I'm missing out on a bit of basic theory but I have so far been unable to track it down on the web. Google maps marker informati...

0
Q: Changing all values of a form that are "on" to "Yes"

georgewoofbatesI have a form with lots of check boxes in it that when you check the checkbox the from sends through the value "on". Before I insert them into my database I want to change these to something more usable like the value "Yes" and then for all the boxes that weren't checked the value is "No". Can so...

0
Q: External URL gets blocked by FortiGuard Web Filtering

enenenI have an extension which should connect to my web server to retrieve data. The domain is added to chrome permissions and all users are accepting the usage of 3rd party website when installing the extensions. But today I received a feedback with this problem: Powered By Fortinet Forti...

0
Q: How to enable php_mssql.dll extension in xampp 1.8.x

freestyleI'm using xampp-win32-1.8.3-1-VC11-installer and i enabled php_mssql.dll extension in php.ini by remove ; I copy php_mssql.dll to xampp\php\ext and ntwdblib.dll to xampp\apache\bin i got 2 files above in old of xampp version. But when i start my apache in xampp then i get How to fix tha...

-1
Q: There has been an error processing your request cURL extension has to be loaded to use this Zend_Http_Client adapter

user3036262/var/www/app/code/local/Aitoc/Aitsys/Model/License/Service.php(29): Zend_Http_Client_Adapter_Curl->__construct() /var/www/app/code/local/Aitoc/Aitsys/Model/Module/License.php(109): Aitoc_Aitsys_Model_License_Service->__construct() /var/www/app/code/local/Aitoc/Aitsys/Model/Platform.php(338): Aito...

0
Q: Buddypress bp-forums functions not acessible

abiosoftI am developing an android client for a buddypress forum and I am using the buddypress xmlrpc receiver to communicate. The xmlrpc plugin is restricted, it lacks ability to post. I am manually editing the xmlrpc plugin to satisfy all that I need it for but I am having difficulty accessing function...

0
Q: Update in PHP MYSQL

user3036261I have a problem with my update and I can undertsand where is my mistake So ,my table in database:place with (id,place_number,rezerv) And I have a form: <form id="formid" action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post"> <label>Place :</label> <select name="place_number" c...

0
Q: WooCommerce - show generated values in attributes

Ralph SmitI am building this webshop, in which customers should have a choice between having their delivery either the next or the following saturday. It's no problem to get these values, I can create a function using this: $weekNumber = date("W"); $nextWeek = ($weekNumber +1); $this_Saturda...

0
Q: How to keep the values of dropdown list when the form is submitted in php?

Preetham RaoHere is the code i have written, Please do help me to solve this issue. >Male >Female >Other When i submit the form by selecting Male in dropdown list, it should keep the selected value till i change that in the n...

0
Q: How to display ioncube decoded php-file through PHP code?

MolodI have a web-site of one company that I need to support. Guys who was supporting that web-site gave me all the archives with files and db to move it to my hosting. I moved it and it was all good to this day. I found one issue - email form doesn't work. I figured that I need to change mail-server ...

0
Q: Oracle OCI connections on PHP have stopped working - Apache returns ERR_CONNECTION_RESET

TenGAll of a sudden ( ... I know ... ) my PHP app has stopped working. When trying to establish a connection with the database I get a connection reset error. The PHP code is: error_log("dbconn.php: db logon " . $un . "/" . $pw . "@" . $db, 0); $db_conn = oci_connect($un,$pw, $db); error_log("d...

0
Q: Editing only one part of data, ZF2

user3036291I have a product table with many fields (id, label, reference, key_product, ...), the key_product is an encrypted value. my exchangeArray function in the product model is normal except that when it comes to the key_product i do like so : public function exchangeArray($data){ $this-

0
Q: How to avoid re-comparison of strings in following scenario?

PHPLoverMy PHP code snippet is as follows: $sql = " SELECT * FROM ".TBL_QUESTIONS." WHERE question_subject_id=".$subject_id; $sql .= " AND question_topic_id=".$topic_id; $this->mDb->Query($sql); $questions_data = $this->mDb->FetchArray(); $questions ...

0
Q: How to remove duplicate entries from an associative array?

LizaWhat i'm trying to do is to remove duplicate entries from an associative array without using any PHP core built-in functions, how can i make this work? And the basic idea is to make it also work recursively, is it possible?

0
Q: search.php from a database for jqueryui autocomplete multiple remote widget

Mohd MuddserI want to use jqueryui's autocomplete multiple remote widget. I've downloaded it from the website. It has a search.php page to retrieve data remotely. What I'm asking is that by default it is using array() of PHP of some already given values but I want to use it to retrieve data from a database a...

0
Q: How to find the nearest cities using web services?

user1878507I am facing a problem in calculating the nearest distance.This is my requirement. If the user searches for a zip code or city and the search return's no results. We need to expand the search to a 50 mile radius, if nothing is found then expand to 100 miles. We don't need to return results beyond...

0
Q: Fetch the response body on failure using file_get_contents [PHP]

Prakash RamanThe documentation of file_get_contents says On failure, file_get_contents() will return FALSE. I am integrating with a system which returns error messages in the response and sets the status code to "50x" Is there a way, I can still fetch the response content ?

0
Q: when select image that wide != 500 px., why ie7 not show aleart message?

user3030013..................................................................................................................................................................... when select image that wide != 500 px., why ie7 not show aleart message ? ..........................................................

0
Q: symfony2 include php file on twig template

BrunoRamalhoI'm looking for a way to include a php file inside a twig template. I have one php file not inside the resources, and I want to include it. There's some way to do that? I searched for all google, and I cant find one explanation

0
Q: How to remove all the Anchor Tag from Content Using PHP

vs7I extract Content fro RSS feed , but it comes with anchor tag so what i need to do is remove all of them from my content. For this i tried strip_tag but it remove all of my HTML tags including Then I try $content= preg_replace("/<a[^>]\+>|<a>|<\/a>/i", "", $content); But its not work for m...

0
Q: How to differentiate the pressed button in later code?

user3019672I have trouble with this code.. I'm making a "zoo system", where using button click (its value=type of animal) it adds me new item (<select> of animals) of that type. The problem I have, is that I am not able to determine (because I'm using button, not submit and its $_POSTS), which of the 10 ty...

-2
Q: MySQLI in classes and in functions

Adsy2010My question is rather simple and after checking a few bits and bobs on here I feel its best to ask a new question. Lets say I have 2 classes class FirstClass { function test() { return "info"; } } class SecondClass { function test() { return "info"; } } Then I have my mys...

0
Q: Combining csv file using php

user2978570Hello Help make the association csv files. The problem is as follows. need simply access and join tables on the first line. If line = "" it should indicate an empty cell in the resulting file. csv1.csv = Tom;1000 Anna;2000 Aleks;3000 Maikal;2000 Piter;5000 csv2.csv = Tom;1200 Anna;2300 Andre...

-1
Q: Strange behavior of Codeigniter while inserting data to database

Kamran AhmedI just had this issue and found that Codeigniter kept the record of the last insert query that it had performed, no matter how many times I reloaded the page. And when I tried to perform a new query, it inserted the previously inserted data along with the newly inserted data as well. What's wrong...

0
Q: HTTP POST from c#, php saves POST as image

user2725580In c# i convert an image to base64 string and then post it to a php script which saves it as a image file in the server. the php: <?php file_put_contents($_POST["name"], base64_decode($_POST["file"])); ?> <html> <body> <form action="<?php $_PHP_SELF ?>" method="POST"> <input type="text" n...

0
Q: Paypal API issues

Ryan GittingsI am using Paypal and got a few questions actually. My IPN script is not getting called. I've tried it with the IPN simulator, and just put a simple error log that writes to a file, and it doesn't write when the simulator runs, it gives a success message although when I visit it manually, it d...

0
Q: cURL extension has to be loaded to use this Zend_Http_Client adapter

user3036262I got a error when we moved to magento site from local server to linux server i got this error i use ssh server is linux plz help me which file we change i remove the error its very urgent and you can see this error on live site http://ec2-54-201-50-37.us-west-2.compute.amazonaws.com/ so plz what...

0
Q: PHP link issue with target="_blank"

Francisco CarvalhoI have a strange issue in PHP + HTML. I made this code to auto generate an item image and create a <a> tag with _blank target. Works nicelly, but the link doesn't target in a blank page. PHP <?php if ($item->getPrimaryImage()) :?> <div class="image-container"> <?php if ($item->getPrimaryLi...

0
Q: Ebay revise Item Not working

user3002165I am using EbatNs_1_0_841_P5_0 for listing items .Listing item successfully completed but when i am revise that item i got the following error as response <Errors> <ShortMessage>Only Single item can be sold in auction-style listings</ShortMessage> <LongMessage>Only Singl...

0
Q: How to disable get last inserted id in CakePHP

Patrick Maciel - p4devQuestion I'm working with a database with composite primary key, and CakePHP doesn't support that. So, when I save some information, CakePHP try to get the last inserted id, but return some errors (exactly because this table/model not have 'one primary key' but two or more. So, how can I disab...

0
Q: Set value in element inside collection

ahmad solimanI have a collection used in form, i know that if i want to set a value in a normal element i use: $form->get('submit')->setValue('Update'); How can i set a value in the field 'Address "For example"' in a collection '' "I use zend Framework 2". $companies = $this->getCompaniesTable()->getCompa...

0
Q: What is the smartest way to structure a JSON array in this case?

CandilI'm using codeigniter php framework and select2 jquery plugin. I want to load all the names stored in my database with its id so I use a a query like this: select id, name from drivers; Then I format the result returned by this way: $data = array() foreach ($query->result_array() as $row){...

-1
Q: How to bring array values out of foreach loop?

rgkIn my program i have a foreach loop like this. if ( is_object($res_two)) { if($res_two->num_rows() == 0) { echo "No Records Found";} else if( $res_two->num_rows() > 0) { foreach ($res_two->result() as $row ) { echo $row->js_id."\t". $row->designation."\t".$row->full_name."\t".$row->location...

0
Q: What to write in htaccess

AndruWhat to write in htaccess I want to redirect the different URL to one main URL. All variations of the URLs (http://domain.com, https://domain.com, http://www.domain.com) to https://www.domain.com Thanks in advance

0
Q: How to avoid xss atack in php codeigniter

SSMAI am relatively new to web development. And just today my teacher told me to implement a method to avoid cross server scripting in my project. I have searched a lot and found about xss_clean but i am not sure how to use and implement it. Any guide or article related to that would be welcome. Or i...

0
Q: Wordpress add_filter to woo commerce search_post_excerpt fucntion

Joseph ChambersI did a modification in the woocommerce core to make the search work with search strings containing an apostrophe in the file wp-content/plugins/woocommerce/classes/class-wc-query.php file. There is a function: search_post_excerpt I have commented the preg_replace part which was adding an additi...

0
Q: upload image by curl, generate wrong image type?

HenrySnoopyI want to test Image Upload using curl. When I upload image file (jpg, gif), the type is automatically generated correctly, but when i upload png image file. like $data = array('image' => '@/test/yansejun.png'); the type is not automatically generated, it's "application/octet-stream". so I mo...

0
Q: Wordpress - How to get access to WP scope within frontend plugin?

FratyrI've created a plugin in /wp-content/plugins/myplugin/myplugin.php with appropriate comments, activated it via backend, and when I visit my frontend website, the plugin gets called, I can subscribe to actions, like: class FileManager { public function __construct() { add_action('download_pro...

0
Q: SugarCRM adding fields from custom modules to email templates

DreagenI am trying to add a fields from a custom module to the Email Templates in SugarCRM (Version 6.5). I have followed the advice at: http://forums.sugarcrm.com/f3/adding-custom-module-insert-variable-dropdownlist-email-template-50158/ However any changes I make to the Email.php file don't seem to ...

0
Q: Connecting to a remote MySQL database on Google app engine

Quincy KwendeI'm working on an application to run on Google app engine. Normally, I would have to enable billing/pay if am using Google Cloud SQL. So for a start, I decided to connect remotely to a mysql database on another server. It works perfectly offline but after deploying my app it didn't work. Clearly,...

0
Q: PHP Identifying & manipulating duplicates in multi-dimensional array

OptimaximalI have a multi-dimensional array of values posted from a form and I am trying to not just de-dupe them, but sum the values from the duplicated arrays so that these can be posted as one, larger value. The array posted is as follows: Array ( [0] => Array ( [0] => 4 [1] => 27/1...

0
Q: Looping through User Timeline - Twitter API

Daniel BenzieI'm currently writing a web application which traverses a users time line via the Twitter API. I have no problems getting the data or manipulating it. The issue I have is with speed. The Twitter API limits the number of tweets you can retrieve to 200 per page. Pagination is done via ID's by passi...

0
Q: Warning: mysql_fetch_assoc() expects parameter 1 to be resource, string given in E:\00 - USBWebserver v8.6\root\PHP\Gastenboek\lees.php on line 29

antoon100I'm working for a guest book: but this gives some errors: Does anyone know how this happens and how to solve? Here I give you the code with it: I have 4 pages: verbinding.php <?php $host = "Localhost:3307"; // Je host $user = "root"; // Je MySQL gebruikersnaam $pass = "usbw"; // Je MySQL ...

0
Q: Convert from PHP to ASP Classic

tonydeleonGood Morning I'd like to convert this PHP code into ASP Classic code, I'm trying to get an upload page for one of my projects in ASP classic <?php $upload_folder = 'data'; if(count($_FILES)>0) { if( move_uploaded_file( $_FILES['upload']['tmp_name'] , $upload_folder.'/'.$_FILES['uploa...

0
Q: PHP class to include content in Div

RalfI have created a class to build up the content in my page. I want to use this a broad as possible. Where I run into, is how to enclose certain content within (for example) a div, without the need for calling a closing tag. Below is a section of my class, which does the following: __construct -...

0
Q: Acess to the the same Database Session variables across scripts

AndyI have tried to solve my problem for a day or so now and I have read as many posts on StackOverflow as I can before asking this question but I have to accept this has beaten me and I feel certain it can be solved. I am using Database Sessions to store variables that need to be accessed from mult...

0
Q: adding a .ajax to my jquery causes page load to hang

user3036423I have a page that uses bootstrap and jquery. Basically presents a table of conference attendees and allows the host the do a check-in. Host can also add a new attendee if they had not registered (ie not in DB). I have an existing and working button called Attend which has an onclick event and c...

0
Q: get data between hours in php

DS9I have a time like this 2013-08-12 12:58:14. Now i want hour so i use following code: $date = "2013-08-12 12:58:14"; $date = strtotime($date); $hour = date('H', $date); so i get $hour=12 now i have a other parameter $tohour=5(it is user defined which value is between 1 to 24 ). now 12-5=7 ...

0
Q: How to execute sybase stored procedure using php

crampedI just got the PHP module installed for SQL Anywhere 12. I am not sure how to execute the stored procedure calls. any chance some one can give me an example ? I have been referring the documentation on http://dcx.sybase.com/index.html#1101/en/dbprogramming_en11/php-prepare.html Many Thanks Dave

0
Q: Dynamic apache log directory based on hostname

JamesI have a PHP application which is used by multiple domains. To avoid maintaining multiple vhosts, I have just setup a single "default" Apache vhost to direct any incoming request to the server to the application directory. What I want to do is to set the Apache access and error log paths dynamic...

-1
Q: Applying jQuery to multiple different dynamically created HTML elements

KenI have a form i will be using to edit data in my database. It has 3 which consists of Category,Subcategory and item.The are dynamically populated based on the value selected in the previous dropdown.After all 3 dropdowns are selected, the current data on the selected item will then be added int...

-3
Q: Retrive value of radio button from database

Sunil Pachlanga <input type="radio" name="sex" value="Male" id="sex" <?php if($sex=='Male') {echo 'checked' }; ?>/>Male <input type="radio" name="sex" value="Female" id="sex" <?php if($sex=='Female'){echo 'checked' ;} ?> />Female I want to retrieve values of radio buttons which i have select when submit t...

0
Q: Joomla 2.5: How to get only updated table name in Joomla Database

user3036147Hi I have a two version of my Joomla website first one in local and second one is on server, after article/menu/banner and other modification in local I share this local URL to client after approval all these i need to update this on server for these i had to export all table to as zip and import...

0
Q: Regex to check for validity of what's after the .com

NormanAll these years, I used this regEx in javascript as well as php to check for a valid domain name. Original Version /^((http|https):\/{2})([w]{3})([\.]{1})([a-zA-Z0-9-]{2,63})([\.]{1})((a[cdefgilmnoqrstuwxz]|aero|arpa)|(b[abdefghijmnorstvwyz]|biz)|(c[acdfghiklmnorsuvxyz]|cat|co.in|com|coop)|d[ej...

0
Q: Send a variable's value through clicking a link

user3017315Here, $row['filename'] contains filename fetched from database. I want to send the filename to download_file.php when the link is clicked. <?php //other code $filename=$row['filename']; echo '<a href="download_file.php?name=$filename">' . "See file name" .'</a>'; ?> but in download_file.ph...

0
Q: display stats is a banner php

Jeffry SolingerI have a web site that is useing table to do game stats in header. What i am doing is make everything in to a plane div set up for my master page so that css can be used more easily. I someone could take a look and explain to me what i doing If its right way to processed. I will give you ...

0
Q: How to optimize the following code in order to decrease the execution time?

PHPGeekI'm dealing with huge amount of data. I've written following code into a function to find out similar questions. It's working perfectly but it is taking too much time in execution. Can anyone help me to optimize the function code so that the execution time will be less? <?php /** * This fu...

0
Q: String is not stored in mysql properly

Sohil DesaiI am trying following string to mysql database using php $str = 'Beschläge für Schiebetüren'; It prints perfectly when I echo it. But when I try to store it in database it stores just Beschl I am not getting why it happens? I have tried $str = html_entity_decode('Beschläge für Schiebetüre...

0
Q: cakephp: seo friendly url routing - avoid the url parameter passed

user1555112I am working hard to get my seo routing working. Right know I am able to build such url: http://mydomain/Rentals As soon as I need to use the pagination, I get urls like this http://mydomain/Rentals/page:2?url=Rentals I can't figure out what I have to do in order to avoid the url parameter?...

0
Q: CPU Processing for high traffic site using .php extension

user3036466I have a high traffic site that uses .php includes for the header/footer. The pages themselves use the .php extension for legacy reasons. Because the site has grown, it is consuming large amounts of CPU resources. My question is if I remove the .php includes (replace with static html), but leave...

0
Q: Reflecting date difference in weeks based on selection instantly

user3036527Hello i have a form where user can enter their rental start date and end date. And from here, there will be a renting period field reflecting the difference between the rental start and end date instantly in the form of weeks But i am stuck on how to approach this. Anybody have an idea? Using ...

0
Q: Remove duplicates from an associative array recursively

LizaI want to make a function that remove duplicate entries from an associative array and makes it work recursively; What i have now is: function rmDup($array) { $result_array = array(); Foreach($array as $sub){ If(!in_array($sub, $result_array)){ $result_array[] = $sub; ...

0
Q: For each ajax request,PHP return different results based on the time row was created

EustatiaI have an ajax loop that returns recently created profiles from PHP encoded for JSON. What i want to do is first return the most recently created profile and go to the second recently created profile and so on every time ajax sends a request to PHP. How do i do this. So far the ajax loop just r...

0
Q: Modal in Gridview Yiiframework

York KeijzerIn a Yiiframework application I have a gridview that displays different items. Now I would like to use the Modal widget from bootstrap inside this gridview. So in short: The user clicks on an item in the gridview -> the modal widget opens and shows the specifics of that item. My code is as fo...

0
Q: My webservice online doesn't receive my contact list in Json format

sulfuridI have develop an Android app that works in an Asynctask to send contact list to my localhost webserver with Json format, and store these data to my mysql database. its works fine, the problem is when I have accomodate my php folder on line the values are not stocked synced. So would somebody gi...

0
Q: Yii findByAttirbutes overrided function returns error

Onur GökerI have a problem with overrided functions of Yii. I am trying to override findByAttributes functions in Yii, but it returns this error: PHP Fatal error: Class declarations may not be nested in /var/www/html/yii14/framework/collections/CListIterator.php on line 20 My codes of overrided functio...

0
Q: I'm trying to make a comment system and the comment should shown when pressed enter but i can't seem to get it right . Can anyone help me

Aviyan khadkaThis is a simple code for displaying which didn't work :-( . I tried to use the "HTML" function from jquery but i showed nothing , if i use alert or other javascript functions like prompt , it works but if i use Html then it doesn't . It would be really helpful for me .Thanks <script type="text/...

0
Q: zend lucane dosnt work in index field

Hossein Rezazadehi have this code $queryString = $request->getParam('tag'); $path = ROOT_DIR.'/application/indexes'; $index = Zend_Search_Lucene::open($path); $index->setDefaultSearchField(null); Zend_Search_Lucene_Search_Query_Wildcard::setMinPrefixLength(0); if(empty($...

0
Q: php regex_replace stop after first match

user2979757I am trying to replace the first occurnce of css size(px|pt|em) with - so this: 64px 64px #123456 will become: -64px 64px #123456 I am using the next regex: preg_replace("/((-*\d+(?:px|e[mx]|%)?)\s(-*\d+(?:px|e[mx]|%)?)){1,1}?/si", "-$1", $input_lines); it works great when there are only 2 ...

0
Q: How can I transfer windows hosted( IIS) website to wordpress? To make an exact same copy

Troy4344I have a website that's been bothering my clients for over many months. I want to move it from windows hosting to WordPress. It's written in asp.net. I want to make an exact copy of it onto WordPress. It's currently running on: Windows Hosting IIS Asp.net And I want to move to wordpress ...

 
1:33 PM
0
Q: count number of times selectbox values

Jack Maessenfor a quiz i use this form: <form action="" method="post"> <p><strong>HOOFDSTAD VAN PERU?</strong><br> <select name="v1"> <option value="0">Kies een antwoord</option> <option value="1">SANTIAGO</option> <option value="2">PERU-STAD</option> <option value="3">MANAGUA</option> <option value="4"

0
Q: Issue with codeigniter and Apache server

Samik ChattopadhyayI ran into a strange problem for last 4 hours. Please anyone share your experience regarding the following issue. Thanks for your time. I have uploaded codeigniter in two different server. The urls are as followes - You can check the following urls - http://www.clearindia.com/ztest/ci/index.php...

0
Q: Alipay MD5 signature

CiaranI'm trying to integrate alipay(payment processor) when sending data to a site it needs to be signed with an MD5 hash I am having a lot of trouble creating the hash though here's what I have so far and the example they have on their website. MY Hashing function (i've tried it both /w urlencoding ...

0
Q: PHP create an array starting by a query

almalin my script php i need to format an array end encode it an a json format starting from a select like this: $result = mysql_query("SELECT datet,vototags,votodom FROM intro_s1 WHERE intro_s1.www = '".$url."' ORDER BY intro_s1.datet DESC"); $data = array( array('Date', 'v1', 'v2...

0
Q: table to display in php page dynamically

user2997270i want to display table using php where i get input of 2 date start date and end date for leave and then i check date base for timetable and i should get day time table for the faculty logged in along sem and session i want to put this in dynamic table to print as date range increase.. here is...

0
Q: How to insert a Not In in my query

PLATANIUMIm having trouble inserting a NOT IN in the query shown below. What this query does is it selects an amount of articles and those which are related. What I also want is to use a NOT IN so it wont show certain articles specified. Where would I put this, I have tried but I just keep on breaking the...

-2
Q: webstie not working in internet Explorer 8

user3036613My website is showing differently in IE8. And i have tried it in compabilitymode, but that is not making it any better. I am not a expert, but if anybody can help or give some advice I would appreciate it. The website is www.nooda.dk Thanks

0
Q: Calling pdo function with arguments

user1745014I'm trying to call this function with the argument of a table name, I have changed a number of things I'm not getting any output. function getTbl($tablename) { $mysqlConnection = getConnection(); $sql = "SELECT * FROM ".$tablename; $Results = $mysqlConnection->query($sql); retur...

0
Q: Generating a SWF preview for Facebook in PHP

metodiewI need a PHP script for generating a SWF preview from a generated HTML. An alternative would be generating another area with PHP (dynamically) that is converted to SWF, or the last resort could be a Node.js or Ruby script that could do that without too much hassle on the server I tried with thos...

0
Q: Formatted text in posts like fb/orkut

rosemaryI have a site under development.I have tried the following format in my post,but it doesn't display as it is.I have tested it in facebook/orkut which displays it as it is: ███─█─────█─███─███─███ █───█─────█─█───█────█ ███─█──█──█─██──██───█ ──█─█─█─█─█─█───█────█ ███─██───██─███─███──█ ███─███─...

0
Q: Prioritizing contents and loading specific element before the other

THORI tried to optimize my pages today with Google Speed https://developers.google.com/speed/docs/insights/ And it says, here If your site uses a two-column design with a navigation sidebar and an article, but your HTML loads the sidebar before the article, consider loading the article first. ...

0
Q: i need a function to append data from one table to another table

user1921704i have a wordpress database with custom table "wp_new_term_relationships" i need a function that would append all the records in that table to the table "wp_term_relationships" and then it would delete all the data in the first table , something like : function jr_cron_insert_jobs() { global $wp...

0
Q: PHP Merge array to another sub array

eurekaI want to merge an array to another sub array. The code as below: <?php $data = array( 'id' => array(), 'data' => array( 'rows' => array( array('name'=>'abc123'), array('name'=>'abc456'), array('name'=>'abc789'), ) ) ); ...

0
Q: Why do I have only one green status on Apache/MySQL servers on MAMP?

FlorentPI was wondering why do I have only one green status for both servers on MAMP ? Actually I remember that I used to have the two tokens alight, but now I only have one green chip. How is this possible ? What is the difference ? Thanks

0
Q: wordpress-fatal-error-maximum-function-nesting-level-of-100-reached

mike O.I am using the ultimatum drag and drop wordpress theme. I installed woocommerce, wp-types plugin and wp-views plugin. created a page called "store" and added the shortcodes: [wpv-view name="Slider"] [wpv-view name="Recent Products"] as stated in the tutorial and documentation. But when I try to ...

0
Q: Fetch a cell data by clicking another cell data from same row

user3017315I'm asking for a concept how to solve my problem. here is my problem, I have a table with 6 columns (id, filename , modified, size, type and download). This table is fetched using mysqli query and showed in a php file. now, my download column has an image (same for each row). This image is actu...

-1
Q: Payment Gateway ACH Integration, Getting error "INVALID MERCH OR PASSWD" in PHP on TESTMODE

MahendraI'm integrating ACH using "Payments Gateway (Forte) http://www.forte.net/Developers ". I have download API from here "http://www.phpclasses.org/browse/file/42423.html" . I'm getting following error response "INVALID MERCH OR PASSWD". Not sure what exactly going wrong. I have put merchant Id corr...

0
Q: How to $SESSION individual result within an array?

ClarklightHi I am pretty new to php, trying to do this account page, the php use $session_username to draw out a row(listingname) from the database, the individual result are turned into links, they all link to another php. And what i am trying to do is, $SESSION the specific Listingname as i clicked on it...

0
Q: How do I get all public GitHub repo that are PHP using GitHub API?

Kim StacksI found this link that shows me how to get all repositories using GitHub API. http://developer.github.com/v3/repos/#list-all-repositories But I am not sure how to find all the repositories that are PHP. For e.g. this gives us only a select snapshot. https://github.com/trending?l=php If this i...

-3
Q: PHP : file_get_contents shows PHP code

user1763032I have this code: <?php echo file_get_contents("file.php"); ?> And in my file.php file, I have the following code: <?php include_once("../includes/connect.php"); $query = $db->prepare("select * from messages"); $query -> execute(); ?> when I run the code.. I got the following output: prepa...

0
Q: php soap API authentication

SLAYERI have created simple SOAP API which is as mentioned below. catalog.wsdl <?xml version ='1.0' encoding='UTF-8' ?> <definitions name='Catalog' targetNamespace='http://example.org/catalog' xmlns:tns=' http://example.org/catalog ' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xm...

0
Q: HTML form working but need a php validation

user3036585i need a help with this. What i need to do to validate the email in this form? This is a landing page, I want to get the email of a visitor before he/she can visit my content here is this demo. Can I get some tips or the right code to use for this page? <form id="contact-form" action="send.php"> <

1
Q: Update or insert only columns that changed

imperium2335I am experimenting trying to find the best and most efficient way to alter the data in a given table through a form using PHP. The scenario is a list of items in a table, if you right click->edit an item, a request is made to MySQL for all the data and the fields are populated. The user can cha...

0
Q: get the next auto increment id in cakephp

beautifulmindI want to write a function in appModel that returns next auto increment primary id for each model I want. For example in UserController I use $this->user->nextId(). I know the query that returns next auto increment primary id: SELECT Auto_increment FROM information_schema.tables WHERE table_name...

1
Q: PHP regexp - remove all leading, trailing or standalone hyphens

Koralek M.I'm trying to remove all leading, trailing or standalone hyphens from string: -on-line - auction- website Desired result: on-line auction website I came up with a working solution: ^-|(?<=\s)-|-(?=\s)|-$ But it looks to me a little bit amateur (isn't it?). So do you have a better solution?

0
Q: Yii CActiveForms one view no Ajax

SarBeen struggling with this weird issue that I couldn't work it out. Can you have two or more CActiveForms (widgets) on one view? widgets would have different 'id'. Each widget has 'enableAjaxValidation'=>true, and each widget submits to different actions of one controller? Issue I am having is ...

0
Q: xmlreader child node value

matterixhello i have this xml: <pola_wlasne> <pole> <nazwa><![CDATA[STAN 1]]></nazwa> <wartosc><![CDATA[5.33]]></wartosc> </pole> <pole> <nazwa><![CDATA[Gatunek]]></nazwa> <wartosc><![CDATA[I]]></wartosc> </pole> <pole> <nazwa><![CDATA[pal]]></nazwa> <wartosc><![CDATA[6...

0
Q: Facebook image share script not sending thumbnail image on first click why it's sending thumbnail on second click .

Sanjay NakateI am trying to sharing the thumbnail image on Facebook using Facebook share link in JavaScript ,my problem is that when i click first time on share button image not share the image or the Facebook window display blank content but when i refresh that page or either i click that share button again...

0
Q: Query posts outputs news items 5 times

user2810940I have a problem retreiving posts into a page. I try to get posts of a specific category but when the posts get loaded they get displayed 5 times. I allready tried to change the number of posts to view in the admin panel but this doesn't have effect on the output of the posts. This is my code:

0
Q: Strange behaviours on PHP MYSQL Image Unlink

DisturbedHello dear Overflowers! I have a little issue with my code... I have followed several tutorials on here and I can't figure out my mistake. The Gallery gets displayed correctly, and the checkboxes have the right value when I check with Element inspector in Firefox, but this little script I wrote...

0
Q: how can i get record out by using date between certain columns

Zazhow can i get record out by using date between certain columns Example. I have a date value, 14-11-2013. I want the record in my tabel that has this value between startdate and end_date. I have tried with between statement and bigger/less then, but without sucess. Is this even possible? This ...

0
Q: jQuery `submit` method ignores POST sends with GET. Why?

twigmacI have a form like this. <form id="hiddenForm" method="post" action="/my-controller/my-action/" enctype="multipart/form-data"> <input type="hidden" id="HiddenFormInput"> </form> When I use jQuery to submit it (I am NOT employing AJAX here, simply submitting the form), as in this snippet, ...

0
Q: How to catch a Google gclid cookie

RobbertHi I am working on a tool where I can track a Google conversion. It is a lead form with some contact fields and a hidden field for saving a Google gclid Cookie. My problem is that I don't know how to save the cookie in my database. It's for a Wordpress plugin btw so maybe sometimes you see wordp...

0
Q: Getting a particular element from a PHP array?

Vikalp JainI have an array in my PHP code which looks like this: Array ( [1] => Array ( [subject_id] => 1 [subject] => Math [default_selection] => 1 ) [2] => Array ( [subject_id] => 2 [subject] => Physics [default_selection] => 0 ) [3] => Ar...

0
Q: laravel-4: How to find route for NotFoundHttpException?

PiTheNumberI found a NotFoundHttpException in the logs. It looks like this: [2013-11-26 13:49:20] log.ERROR: exception 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException' in /var/www/myproject/vendor/laravel/framework/src/Illuminate/Routing/Router.php:1429 Stack trace: #0 /var/www/myproject/vend...

-1
Q: Create file from HTML form, using PHP

user3022563I have created a simple HTML form that I want to use to create new files. <form method=post action=page.php> <input type=text name=boardtitle> <input type=submit name=submit value=Create> </form> I understand the fwrite/fopen PHP methods, but how can I use them so that when text is entere...

-1
Q: How to get a value of pressed <button type='button'?

user3019672is there a way (without using JS) to get into PHP the value of pressed <button type='button' name='bobby' value='".$value."'> .. </button>? In latter code, I have the submit button as well (to submit all form).

0
Q: Sending multipart email from php, only download shows not the actual message

spirytusI'm struggling with sending my multipart email with plain text version as well as with HTML. Unfortunately when I receive it in Gmail it shows as downloadable message only as shown below: ![enter image description here][1] The code is pasted below and although I went over like 100 questions her...

0
Q: PHP - find all all files within directory that match certain string and put in array

odd_duckI have a directory of images on a server that customers have uploaded. I need to be able to get all files that match a certain string or item code and put them inside an array. Filenames and extensions can always vary but each file will always have an 8 digit item code in the filename. So for ins...

0
Q: Post from Android to CSV with Columns

user2799097i want to post from Android to a CSV File correctly. Now the php posts the Question, Answer and the User in one column. With \n i can switch to a new row in the CSV File. \t doesn't work. Now it look like this: Column1 Question1Answer1User1 Question2Answer2User2 ... It should view like this:...

0
Q: joomla 2.5 in module install.mysql.utf8.sql dosent work

user3009655i want to install extranal sql file with module and i follow this link tutorial http://docs.joomla.org/J2.5:Creating_a_simple_module/Using_the_Database but it dose not work. here is my xml and sql file coding. where is my mistake? <?xml version="1.0" encoding="utf-8"?> <extension type="module" v...

0
Q: mysql num rows on mysql fetch object

berzins92function sql_obj($q){ $result = new stdClass(); $r = mysql_query_ex($q); if (mysql_num_rows($r) > 0) { $o = mysql_fetch_object($r); $result = $o; } return $result; } $o = sql_obj($q); How can I get number of rows? I was using if(mysql_num_rows($result) > 0)...

0
Q: PHP/ read from folder

Or SmithI have the next code: <?php $path = 'imgsFor'; $files_array = scandir($path); for ($x=0; $x<=4; $x++) { echo '<img src="imgsFor/$files_array[$x]" <br>'; } ?> In order to display all images in the folder imgsFor. For some reason, I see the just boxes and not the actual...

0
Q: How to merge table in Fpdf

user3035511How to merge table in fpdf , using cell method or multicell method.? cell | cell | |Cell|Cell|Cell| Cell | Cell | Cell |

0
Q: How can Rewrite URL in PHP

Rahul JhalaI am new to PHP. I just wanted to know how i can customize my website's URLs in PHP. For Example: **http://something.com/home/index.php?id=5** TO **http://something.com/home/t-shirts** Please Tell me the efficient way to doing this. Thanks in Advance.

0
Q: Calling MS Log Parser from a PHP script

JuwI have been trying to make LogParser to work called directly from a PHP script system() and exec(). But i can´t and i cant see what i am doing wrong. Can someone help me out a bit? $command = "C:\\Program Files (x86)\\Log Parser 2.2\\LogParser.exe Logparser...." echo exec($command,$o,$r); The ...

0
Q: PHP Script to break out csv tables into a single file

user3036740I have been on this site and many others the past 6 days looking for and trying various php scripts to help me out with a free service website that im building for the security community. You guys give some awesome help here. The Goal: I am pulling a free CSV file off a security website (http://...

0
Q: Doctrine2 - select from multiple tables with no direct relations

socketThis question is about selecting data from multiple tables, joins, Doctrine2, ResultSetMapping, DQL and such stuff. I have 4 tables: user contact contact_phone call With relations as shown on the image: http://i.stack.imgur.com/762Jw.png Every user can have many contacts, each contact can h...

-2
Q: Processing CSV through php function

BobI made a PHP function that works with an API to show me the dollar balance of an account. This function is called get_balance I'm certain that the function works, so I have no questions on that part. However, I'm trying to process accountnumbers written down in a CSV file. I call the CSV file wi...

0
Q: Run shell script with sudo from PHP

James TrotterI currently have a PHP file on my ubuntu box that i want to use to create users on the machine from a web interface (security blablabla, its all on an internal network completely inaccessible from anyone who would accidentally/purposefully cause harm to the system) I initially tried using this: ...

0
Q: Load disparate views based on user name using PHP

user3036812I have created a student and teacher feedback system using PHP and MySQL. Students and lecturers should be shown a separate view once they login. A students username takes the form of B******** and a lecturers' username takes the form of E********. I'm thinking is there a way to take the user inp...

0
Q: How to link a button and text to the same link with php

user3036817<p style="" class="remove-item"> <a href="<?php echo $this->getUrl('checkout/cart/delete', array('id' => $item->getId(), Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED => $this->helper('core/url')->getEncodedUrl())); ?>" style="font-size: 8.5px; float: right; margin-right: 6px; color: ...

-5
Q: How to Rewrite URL in PHP efficiently

Rahul JhalaI am new to PHP. I just wanted to know how i can customize my website's URLs in PHP. When i run my webpage For Example: http://something.com/home/index.php?id=5 It should display... http://something.com/home/t-shirts Please Tell me the efficient way to doing this. Thanks in Advance.

0
Q: RedirectMatch 301s same page URL to multiple TLDs

LewisWe're working on a magento store at the moment where multiple 301 redirects have previously been implemented. The original .htaccess file has lots of rules in such as the following: RedirectMatch 301 ^/original-page.html http://www.yourdomain.co.uk/our-new-directory/new-page.html RedirectMatch 3...

0
Q: MySQLi insert into statement inserts data but also shows errors

Eric BrockwayGoing out of my mind on this one. Here's the situation and what I've tried so far: I've got a simple form that collects an email and a password which are then supposed to be inserted into a database table with three columns. The table is called users and the three columns are called userID, us...

0
Q: Changing colors of slices depended on text in the name

T_5I am using Highchart in my page and I wonder if I can make pie chart more dynamic. I want to make slices, where specific text in the name appears, to be shades of green. Some code: plotOptions: { pie: { allowPointSelect: true, c...

0
Q: Laravel 4 — Receive 404 Instead of Controller ResponseRoute

kkirscheI have a new web server that I am using. I have installed laravel using composer and started working on the pages, but when adding additional routes, I'm getting a 404 Not Found error rather than the page. I'm working off an IP address at the moment (162.243.61.188/laravel/public/) and this is w...

0
Q: joomla 2.5, how to retrive data from database?

user3009655i want to show data from database on my module front page. To retrive data from database i write this code in helper.php public static function getdb($params) { // Get a db connection. $db = JFactory::getDbo(); // Create a new query object. $query = $db->getQuery(true); // Select all records f...

0
Q: sysmfony2 create table from sql query

BrunoRamalhoI would like to know if its possible to create table with Doctrine. Everytime I trie I got CREATE unexpected, i looked on google and there is nothing about this. So, I'm asking if its possible? If not, how can I create tables with symfony. I dont want to use this tables as object. And if its poss...

0
Q: Two webpages communicating

JoepThe Idea I have two webpages; one is HTML with Javascript (let's call it one.html) and the other can be HTML or PHP (let's call it two.html/php). Both will be on the same server. I have two.html/php opened in my browser. When someone, somewhere, opens one.html I can see in two.html/php that it ...

0
Q: Reading value of YUI text editor in php

user3032721I am using YUI Text editor in html file and after submit the next page is php file where i am showing the output - Content of the text editor - Hello All My Programming Good Output in php page - Hello All My Programming Good what is the problem?? php code is - $VAL=$_POST['msgpost']; echo...

0
Q: IF there is another row

Seth ForzaI'm trying to write an if statement to check if their is another row after the current one in the database. Where the current one is the id of the page. <?php if($new_id>id): ?> yes <?php else: ?> no <?php endif; ?> $new_id is the selected page. so if their is an entry after it it will say yes...

0
Q: Global view variables in Kohana

rodwebI'm trying to figure out how to use global View variables in Kohana properly. I have a Controller_Base class which provides a basic layout of a page: abstract class Controller_Base extends Controller_Template { public $template = 'base'; public function before () { parent::before(); ...

0
Q: show logged in content in the best way

user3033162if the user is not login then redirect him to log in page, else show logged in content. But my logged in content is huge, should I just paste it in between this block of code : if(isset($_SESSION['logged_in'])){ // here } is this the usual way you guys do it? that is tons of markup

0
Q: add html inside a wordpress loop

AlecsI have this code: <div class="row-fluid"> <div class="span6"> <h3>UPCOMING DEBATES</h3> <?php $query = new WP_Query( array( 'post_type' => 'debate', 'post_status' => 'future', 'orderby' => 'date', ...

0
Q: using values from a query in another query

user2959441i have a query $result = mysql_query("SELECT * FROM comprofiler WHERE cb_playstationgames LIKE '%FIFA%' ORDER BY id ASC"); in that query there is a user_id wich i need to perform a query on another table. $gebruikerid = mysql_query("SELECT * FROM users where id LIKE '".$result['user_id']."'"...

0
Q: Select picture when name of picture is random and not sort in PHP

The RiverMy English is not good at. Hope everyone understand. I have near 1000 the pictures. All name of them is random.This's link: http://www.deptinhte.com/upload/projects/large/ I want to select some picture in database to group in website written by PHP. Because I don't know the coder before how code ...

0
Q: ZF2: Define empty array in XML configuration file

P0rnflakeI have set up my application to use a module configuration xml, by following this example. Now I need to define an empty array for one configuration key. The equivalent php configuration file would be: <?php return array ( //...the other configurations 'sample' => array( 'empty' => arra...

0
Q: Checking equality of variables in array

user3036851I want a PHP program to tell if an array contains any equal data. For that I'm writing this code but it always returns false, even though I have given equal values at position array position 1 and 2. Can anyone help me find out what is wrong with this code? $a[0]=qwe; $a[1]=abc; $a[2]=abc; $a[3]...

0
Q: Detect access_control in controller symfony2

walolinuxI want to know if the user comes from a access_control url set in security.yml and if so, redirect the user, if not, redirect it to a custom url in a controller. Currently i have: security.yml access_control: - { path: ^/subscriptions/.*/.*/subscribe, role: [IS_AUTHENTICATED_FULLY] } ...

0
Q: Send push notification to MPNS with PHP along with certificate

HansElsenI'm writing this Wordpress plugin to send push notifications to mobile devices. I have a class that can send messages to MPNS. I read that MPNS requires a certificate if you're trying to send more than 500 messages per day. Can anybody tell me how I can modify the following class to send along a...

0
Q: PHP PEAR Mail via AJAX not working correctly - mail script works perfectly when invoked directly

user2872449I have a web form that calls a PHP PEAR Mail script via AJAX. When I invoke my script directly (by typing the full path to the script in the browser) it works. When I call the script from the web form it sends the first time, but not subsequent times. I am using smtp. The hosting has SSL. T...

0
Q: PHP MySQL search not returning results

user2965329I've created a php search script to search a MySQL database but no search is returning results. Form Code <form method="post" action="search.php"> <input type="text" value="Search..." name="query" /> <input type="submit" value="Find" name="completedsearch" /> </form> PHP Script <?php ...

0
Q: Efficient way of programming using php and mysql

user3036887I have a database contains tables using foriegn keys to indicate relationships among them. In one table i have 2 columns.. 1 is id(foreign key) and other contains friendsids(foreign key from friends table). Either i can have two options like below | id | friendsids | ...

0
Q: Total page views in mysql

user3036848Hello everyone i think this is good question. I am using page counter script for my website but i want to see in my dashboard total page view not only one page total viwed. I want Total page view HOW CAN I MAKE IT ? This is my page counter code : mysql_query("UPDATE posts SET `post_view` = ...

0
Q: Visual FoxPro database, spaces in displayed data

vladimirI have some problem with removing spaces in my DB response... i.e data in table is second - ____________________1 by underline I mean spaces... but I can't remove those spaces when I display my data... How can I do it? I have been tryed TRIM(), LTRIM(), ALLTRIM(), REPLACE(), STRREPLACE(), but th...

0
Q: How to print html script dynamically with php?

diegoaguilarUsing php I printed an <script> tag and some JavaScript lines. It worked as it should have. Script I'm printing includes generate some objects from a library I'm using. However, when I want do that according to some condition, in this case, a for cycle I can't get it working. This is the code I ...

0
Q: CodeIgniter ip_address() always returnes 0.0.0.0

Dvir LevyMy Codeigniter sessions have been dying a-lot lately. So I went and had a look at my database and I saw that all the sessions have ip_address 0.0.0.0 and some have useragent 0 So I checked my $CI->input->ip_address() function and saw that it always returns 0.0.0.0 event thought $_SERVER['REMOTE_...

-4
Q: I require a script exchange rate*price

user3036940I need to add to my HTML site a price for each product witch is "Price * (Exchange rate currency)" I need to be able to choose the price for each product. Can anyone help?

-1
Q: Finding "&" in string in PHP

user3036943How can I find & in some string. I'm currently using this code: //this code is looking for < and > if (strpos($string, '<') !== false || strpos($string, '>') !== false) $found = true; But this is not working fo & symbol.

0
Q: Wordpress load scripts only for certain admin page

Jeton RamadaniHi there WordPress lovers! I am trying to add a date and time-picker for option-tree framework on my current project. I have a question regarding script loading on certain admin page! Currently I am using global $pagenow; but was wondering if there is another way of doing this? Here is my cod...

0
Q: Detect if category is a parent - on wordpress template category.php

KevI have created a category.php template in my theme and would like some code to detect if the category being viewed is a parent or not. If it is then I want to set a variable to one value, if it isn't I want to set it to another value. Is this possible?

0
Q: Zend Framework 2 Authentication without DbTable check

user2540463i'm trying to make a Zend 2 classical Authentication, without using a DbTable check. I'll explain better I've a custom method authenticate() that is able to authenticate a user (independently from Zend Auth). I've made a custom class that extends Zend\Authentication\Storage\Session Now i want ...

0
Q: Yiistrap: Dropdown option not getting passed to the database. I get validation errors

sushI wanted to use dropdown menu in my form to enter the category of books but the data is not getting passed and I get validation errors when I'm using Yii with Yiistrap. Here is how my code looks like.. this in protected/views/books/_form.php <?php echo $form->dropDownListControlGroup($model, 'b...

 
3:21 PM
0
Q: Laravel 4: How to correctly work with Models in Repositories

user777Read books From Apprentice To Artisan and Implementing Laravel by Chris Fidao and now i don't know how to correctly work with Models in Repositories. In Implementing laravel book author is working with models in this way: Example #1 <?php use Univemba\Interfaces\UserInterface; use Illuminate\D...

0
Q: Image maps with dynamic links from database?

user3036953Basically I'm in my final year of college and working on my major project. I'm creating a 3D html image map, so more or less a 360 degree rotation of an object. This will object will show various Artists at specific areas. I'm also creating a database through PHP and MySQL. Basically the problem ...

0
Q: How to make WordPress sticky posts work in custom loops?

KetriI want to be able to create custom loops using query_posts or $custom_query = new WP_Query() and be able to make sticky posts. For example I have a custom loop on a page called News, which loops the posts in 'news' -category and builds a nice Masonry grid out of them. The looped items then link...

2
Q: Using a regex variable from within the regex itself, within PHP

Jimbo My goal: I'm trying to use regex to retrieve a name string from the jumbled response of a file_get_contents() call within PHP. Here's an excerpt of what I get back from a file_get_contents call, and the string I will be working with: file_get_contents('http://releases.ubuntu.com/13.10/ubunt...

-2
Q: mail function in php not working

user2876019i have a PHP script for sending email to a certain email but i think that i have some problem in it can anyone help please here is the code: <?php $feedback; $name=$_POST['author']; $email=$_POST['email']; $subject=$_POST['subject']; $main_message=$_POST['text']; $to='email@hotmail.com'; $he...

0
Q: Symfony can't find any routes

OxySocksMe and the team have been working on a relatively large Symfony project. We've been working locally using XAMPP on all windows PC's, and have barely encountered any errors. Recently I have taken on the task of testing the application on linux (CrunchBang linux) and I've encountered some pretty se...

0
Q: PHP - Email with attachment collapses original message

ChemistWhile aware of better solutions, I am using manual PHP script to attach a file to the message to be sent by email. The file gets attached properly and I can even see the message, but for some reason the original message ($msg) gets collapsed! All those \n\r 's I have disappear. Any ideas?? Here'...

0
Q: MySQL Proc Does Not Appear to Execute

FastTrackI have a MySQL procedure, which does NOT seem to be executing from my PHP script. Here is the proc: -- Need these working time variables SET @DateTime = Now(); SET @UpdateDateTime = (SELECT DATE_ADD(@dateTime, INTERVAL 1 SECOND)); SET @InsertDateTime = (SELECT DATE_ADD(@UpdateDateTime, INTERVAL ...

-1
Q: PHP +issue with the file_get_contents and comparing the value

user3036985This is driving me nuts. I have a test.html file that contains either "OPEN" or "CLOSED" inside of it. I do a file_get_contents(): $testA = file_get_contents ('files/test.html'); if ($testA == 'OPEN') { $color1 = '#00800'; $back1 = '#DDFFDD'; } else { $color1 = '#F...

0
Q: Php strip template

Crisan Raluca TeodoraI have some html templates witch have this format: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>myTitle</title> <meta http-equiv="Content-Type" conten...

 
3:48 PM
0
Q: Add alias to values in query

user3029024Sorry if my question not so understandable.My English not so very good. I process all fields with quotes for SQL query and im doing this through function array_map() and I need to add to each field Alias of table When im do it like that: private function fieldClause($fields, $alias) { if...

1
Q: Post value change

papao surnameI have records which column name is counter. And the value is like 000003, 000012, and so on. But my problem is, when I try to post it the value that receive in the form action url change, I receive only 3 which is the real value is 000003. Why is that? I echo POST value in my second page. <?php...

-1
Q: How to work with javascript data objects? How to access the entries by variables?

user2718671I passed a multidimensional array via php to javascript: var my_javascript_var = <?php echo json_encode($my_php_var); ?>; But now i don't know how to access the entries. I tried my_javascript_var['first-level-entry'] and my_javascript_var->first-level-entry but it always return undefined. I wa...

0
Q: Array of forms in PHP

Alex MilesFirst, thanks for taking a look at this. I am trying to create an array of forms that acts as a dynamically sized results list. From the results that were given the user can click 'detail' (a submit button) to get further information on the result which is why I am attempting to create an array o...

0
Q: Using {{store url= template tag with Slider on homepage - Magento

GuidoI am looking at slider extensions. Looking at their screenshots, I see where I would put the images’ target URLs however none of them seem to offer what I want (and I’ve contacted a few). At the moment on my homepage, I have various images that have links using the {{store url= or {{store direc...

-4
Q: getting value in php (code ) one at a time

user3033564I have trouble getting value in order. the result below is like [12345,23],[12333,21],[12322,15] but I want $temp list all the data first, and then $temp1 list all his data, and last $temp2 has his data. kind of like this [1385445401000, 23],[1385445431000, 23],[1385445462000, 23],[1385445493000,...

-1
Q: Append text with <<<EOD in php variable

Yatin TrivediI am trying to append multiple string enclose with <<< EOD into a single php variable, but could not found any answer yet. Can anyone help me in this. I want to do this for creating a PDF file. I want to do something like, $tbl = <<<EOD <table cellspacing="0" cellpadding="1" border="1"> <tr> <...

0
Q: Upload the same file several times

Gabriel Buzzi VenturiI need to upload the same file several times for each user that is selected. For example, if you selected 3 users, the uploaded file need to be moved to the user folder. MY CODE: $subDir = $_POST['curr_user']; $usuarios = explode(',', $subDir); if (count($usuarios) > 1) { foreac...

0
Q: PHP - How to count rows inserted into database

user2966161I have a simple insert into database command that works and i was wondering how i could count the number of rows inserted into a database. I tried using mysql_affected_rows() but it doesn't do anything. Is there some syntax errors with my code? Thanks in advance. $sqlRegister = "INSERT INTO `Log...

0
Q: Add data to an existing collection with data mongoDB + php

taxicalaI am working on a new project with mongoDB and I'm defining some classes in order to handle database related things with PHP and MongoDB. There is something that I could not find and a still don't fully understand. Here is what Im doing in order to insert data: $m = new MongoClient(); $db = $m->...

0
Q: Laravel 4 Authentication & Protected Route

rickchongI have some problems with Laravel 4 authentication & protected route... my problem is it seems like I kept getting redirected back to the login page instead of proceeding into the admin page after inputting the correct credentials. I have previously tested that authentication of login function i...

0
Q: Trouble connecting from PHP to microsoft sql server 2005 on an external host

Joris RietveldI'm working on a application that's on a external webhost. It has PHP 5.3.1 installed with PDO dblib drivers and is running on Ubuntu. The microsoft SQL 2005 server is running on a windows server 2003. I have forwarded the port 1433 and tested that connection with telnet. My code: $connection ...

0
Q: How to connect Remote Sql Server using PHP 5.4?

SumitI want to connect to SQL Server 2008 from my local machine. I have completed the driver installation from this link But this extension does not support remote connection to Sql Server. It has to be installed on same machine where PHP is installed. ( got from link ) How should I resolve above ...

0
Q: Searching category and subcategory in a associative array

dante466I am trying to populate a table with information pulled from a file where type = b. Now, if the record has b as a type, but has a subcategory, it will not pull the record into the table. How can I make it pull any record regardless of it having a subcategory or not? Code: $best_buys = array(); ...

0
Q: Unable To Connect To Postgres

user2991185I am using the following php scipt to connect to pgadmin : <?php $conn = pg_connect("host=localhost dbname=postgres user=postgres"); if (!$conn) { // Check if valid connection // NO, some error occured echo "Error Connecting to database<br>"; exit; // add your error handling fu...

-2
Q: Make a SQL Form Post Data Correctly

user3037091I am new to the php & mysql scene, and am trying to input data from an html form into a sql database via php. In the long run I will want to input/modify/delete such data, so if you have any links/tutorials, etc, it would be much appreciated. The HTML Code : <body> <form action="addcustomer.ph...

0
Q: How to change description of post without using excerpt in Wordpress?

user3037116I want to use separate text for post description 3-5 phrases but i dont wan't to use first 200 character from the post. It is posible to do that? Maybe it is some plugin? mike

0
Q: Ubuntu server install php5

CrotchFrogI'm running ubuntu server 12.04 LTS Recently I upgraded my php5 from v 5.3 to what I thought would be v 5.4 but I suppose I was not paying attention because I ended up with v 5.5. The upgrade was no problem but this is not the version I want/need. It's necessary that I have 5.4 so I tried to rol...

0
Q: Magento Product Reviews Require Product Options to be Selected

ashley07If I have reviews enabled on configurable products, I have multiple issues: When you click the submit review button, it will ask you to select the required options on the product. If you do as it asks and select the required options, when you click the submit review button, it will add the prod...

-7
Q: How to make website wide changes?

Nick EckertI want to know the best way to make changes to a website across all the pages. I've heard of the php include statement but I'm not sure if that's the best or the most used way of doing this or if it's even efficient or practical? Let me know what you recommend?

0
Q: Creating class that extends TCPDF with WhiteOctoberBundle

ladislav_pragueFor creating PDF files in Symfony I'm using TCPDF class with WhiteOctoberTCPDFBundle. Both installed via composer. I need to create custom header and footer by extending TCPDF class, like mentioned in TCPDF documentation. But the only working solution for me is to extend TCPDF class directly in...

0
Q: Avoid fatal error with `new $className()`?

fekleenew $className() triggers a fatal error: Fatal error: Class 'foo' not found in /bar/baz.class.php on line 123 Is it possible to avoid that fatal error and continue? For example, is it possible to check if the class named $className is available prior to requesting an instance?

0
Q: php code order being changed by server?

SwodahsSomeone explain to me what either the server or browser is doing here: Integrated a wordpress blogs last 3 posts to display on home page of non wordpress site and simply was going to apply some inline CSS styling to the post: <?php $posts = get_posts('numberposts=3&order=ASC&orderby=post_title'...

0
Q: Php write to log also when @ is used to suppress a warning

Ai Em AntonioIn PHP sometimes we prepend a function call with the @ operator to suppress the warnings that can be eventually shown on the page. Assuming that the application is set up to log error and warnings to a file, when a warning is "suppressed" its correspondent entry in the logfile will be created an...

-1
Q: Password hash function

jihdehPlease, I know this might not meet the requirements of answering questions, But I just want to know your opinion on this php password_hash() function. How safe and secure is it? Are there any flaws? I read about it here. uk1.php.net/manual/en/function.password-hash.php

0
Q: How can I sort a multidimensional array by specific key in PHP

user3037117I want to sort a PHP array with the order of a key value(order). Can you help me in order to find a solution? the printable array is : Array ( [image] => Array ( [0] => photo1.jpg [1] => photo2.jpg [2] => photo3.jpg ) [link] => Array ( [0] => link1 [1] => link2 [2] => link3 ) [map] => Array ( ...

0
Q: Setting iframe cookie with no control over external site

user3037097I'm working on a website and I'm running into cookie issues in IE and Safari. Most of the answers I've seen require me to be able to edit the code of the site I'm linking to in the iframe, however I do not have access to that. I've tried a few other solutions but nothing seems to work. Here i...

0
Q: SSl Certificate issue with Omnipay and CI

pfuncI am trying to make a simple payment through my paypal sandbox from my local machine. I am using the Omnipay library in Codeigniter. I setup a sandbox account at developer.paypal.com and a test application. This is the code I am using: $gateway = GatewayFactory::create('PayPal_Express'); $gateway-

0
Q: Is there any API or service by which one can share message to all contact list in gmail or Yahoo

KarimkhanIn my product user gets benefits by sharing their personal link to others. Get more benefit by more share and more hits on that link. For that I want implementation such that user can click on Share login to his gmail or yahoo and share his personal link to all contacts in hist diary in single c...

0
Q: How to write Unicode string to ms-excel file

Өсөхбаатар ДотгонванчигHow to write Unicode string to ms-excel file in php, Zend Framework. I wrote "Сайн" but result is "НийÑ" . How to solve this problem. Thanks.

0
Q: Nginx serves raw php

user3037184I have PHP-FPM setup listening on 127.0.0.1:9000 properly on Ubuntu, it seems to spawn everything properly, my nginx works great for plain html as well, this is nginx.conf user www-data; worker_processes 4; pid /run/nginx.pid; events { worker_connections 768; } http { keepalive_timeout...

0
Q: php time() value is not updating in mysql db to update the last active time of a user

Hasib MahmudI am trying to detect whether a user is online or offline. If a user is online, php time() is used to update the last active time in db. Here is the script of online.php file: <?php if (isset($_SESSION['id'])) { $user = "*******"; $password = "*********"; $id = $_SESSION["id"]; $dbh = new PDO('m...

0
Q: images upload of any user in database

MariaI have two tables first and parent "register" and second is what I wanted is to create a script in which one USer with unique SN whenever upload a pic that pic path save in "userimg" i user SN as foregin key in userimg code is below if(isset($_POST['SN'])) { $filename =...

0
Q: PHP readfile() causing pdf to render in browser, not downloading

user988129I'm trying to force a file download and all I get is a random string of unknown characters in the browser window. Code is included: $file_url = "docs/$c/$path"; header('Content-Description: File Transfer'); header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment...

0
Q: PHP mail form sends back error only when I include $headers

popshuvitI have a simple form setup. The only problem is that I cant seem to include the 'from:' and 'reply-to:' in my $headers. Whenever I include the $headers it sends back an error. Without it the forms sends. This is my php, any help would be greatly appreciated. <?php // Make accessible from AJAX o...

0
Q: Applying jQuery based on the values of dynamically added inputs in a form

KenI have a form used for editing data in my database.A user would first select an item through the use of 3 after which the existing data on the item would be added to the form via jQuery's .load() The problem i am facing now is that i have a pair of radio buttons that are added dynamically to th...

0
Q: PHP Search only displaying one result?

user2965329Could somebody help me, I have a PHP search script (shown below, has HTML around it) that I want to return multiple search results when necessary, but at the moment it doesn't, and I've struggled enough getting it to this point so I'm lost.. <?php if(isset($_POST['completedse...

0
Q: Trouble with Pear in XAMPP

DimitriI'm trying to install PhpDocumentor 2, and after following the steps for the installation through PEAR, I get the following message: PEAR_Config::writeConfigFile fopen('C:\Windows\pear.ini','w') failed (fopen(C:\Windows\pear.ini): failed to open stream: Permission denied) So I checked the...

-1
Q: Line break : White-space, br or p tag?

DamienOn recent wordpress version, the editor don't add < br/> or < p> when you create new lines. It just create a new line, like \n. In front office, i'm using this css for having the same line breaks than in code. .write { white-space: pre-line; } See this js fiddle : http://jsfiddle.net/d2uGe/ ...

0
Q: Joomla offline page send php mail not working

user2689642I have made an offline page which should allow users to submit their email address and mail it to me here is the code <form action="/templates/jp-revo/send_contact.php" method="post"> <fieldset class="input"> <div id="form-login-username"> <input name="email" id="customer_mail" ...

0
Q: Add www to urls having HTTPS

RajeeshI need to add www to all the url which doesn't have the www at the starting(site is build in drupal). I have done the same for http request using the following code in htaccess file. RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] Now I want...

0
Q: How to say JS, which button was pressed, and which action to perform?

user3019672I have: this PHP/SQL code: $prod = array(); $vys = mysqli_query($db,"SELECT * FROM produkty ORDER BY nazev"); while ($arr = mysqli_fetch_assoc($vys)) { $prod[$arr['id_typu']][] = "<option value='".$arr['id_produktu']."'>".$arr['nazev']."</option>"; $polozky[$arr['id_typu']]= '<select name...

0
Q: Unset destroys all the sessions

Nave TsevaI have the following PHP code: <?php session_start(); if (isset($_SESSION["info_message"])) { echo '<div class="alert alert-dismissable alert-success"> <button type="button" class="close" data-dismiss="alert">×</button><strong>'. ...

0
Q: Showing Newspaper PDF files inside an Interactive Viewer

user3037221I work for a local newspaper company. We are looking for a solution that lets us upload a PDF and then the users can view the PDFs easily inside an elegant reader. I like the process on this website (http://dailynewsnetwork.epapr.in/190071/Daily-news/26-11-2013#page/1/1/rw) I like the way PDF ...

0
Q: Using SQL and PHP to Populate a HTML Select form

visualbasicNoob9000So I am currently having some difficulty using PHP to populate a select option on an HTML form. I need to have the select options filled with the data from my sql table and then I need to populate the selections into a different table in sql. First I will desribe the sql table that I am using. Th...

0
Q: Codeigniter, routes and 404 error

Toni Michel Caubetthis are my routes.php $route['(:any)'] = 'base/index/$1'; $route['home'] = 'base/home'; $route['operativa/(:any)'] = 'base/operativa/$1'; This is my controller, base: class Base extends MY_Controller { function __construct() { parent::__construct(); $this->load->mo...

0
Q: Trying to Pull Single PHP Variable from JSON Array

PrestoHere is the result on the page when using print_r($result); Array ( [result] => Array ( [0] => Array ( [username] => Elvis ) ) ) I would like to pull this out of the array and use it as a PHP variable. I have tried extract, while loops...

0
Q: Delete file using Codeigniter

Muhammadthis is my controller function function delete_article($title,$filename,$filename_additional){ if ($this->session->userdata('User') && $this->session->userdata('User') == 'admin@example.com') { $this->load->helper('file'); $this->load->model('Article', 'Article', TRUE); ...

0
Q: How to define a PHP variable as a specific class type before instantiate an object?

EASII am creating my own MVC framework, and I want it to be very basic, but when I use some IDE's like Eclipse or NetBeans they tend to give me warnings telling that those variables where not initialized or they do not recognize what type they are, so they do not autocomplete the class methods or pro...

 
4:36 PM
0
Q: Keep getting MySQLi Error

ClassicPerson409When I'm trying to connect to MySQLi, I keep getting this error: Warning: mysqli::mysqli() [mysqli.mysqli]: (HY000/1105): (proxy) all backends are down in /home/xylotk/public_html/Main/Header.php on line 5 Warning: mysqli::real_escape_string() [mysqli.real-escape-string]: Couldn't fetch mysqli ...

0
Q: directory error in dynamic php background

tht13I am trying to load a seperate image for each div by getting a directory from a database and inline styling <div class="query"> <?php if ($type == "category") { $query = "SELECT * FROM shopItems WHERE category = '" . $_GET['query'] ."'"; $result = mysqli_query($con, $query); ...

0
Q: Pass PHP variable into html file

luaLoverI'm trying to pass a variable in PHP in the same page. The form is: <form name="form1" method="POST" action="index.php"> <input type="text" name="F1" value="" size="35"> </br> <input type="submit" name="B1" value="Go!"> </form> and the PHP script is: <?php if(isset($_POST['B1'])) ...

0
Q: Woocommerce checkout steps indicator

user1960419This is regards to woocommmece checkout using Wordpress. I need to find a way to display the total number of steps for buying , from filling the cart till end of the check out .and to highlight the actual step the customer is in at the moment. From the research I have done, I haven't found any...

0
Q: How to check which site sent job to the script from another site

user3037322I want to block for users to use script from my website and let only use for people from other site. I mean something like If i try to get script from my site = die but if i want to do samething with this script from website chicken.eu then my php script let me do that. Sorry for my bad english

0
Q: how to pass a json formatted string between functions

user1047069I have : $res1 which is array in json format. I get it in function GetStats(), by receive from other application. function APstats_update_graphs(stats_requests) { $.ajax({ type: "POST", dataType: "json", //set to JSON url: getUrl('/GetStats/'), data: stats_requests, succ...

-3
Q: what is wrong with this php statement

Corn Hole LII can not seem to figure out how to write the following. The statement below is being echoed in a php string and no matter what the real value of $sex is it always shows F as being the checked value?? $string = "Sex&nbsp;&nbsp;:&nbsp;&nbsp;<input type='radio' name='sex' value='m' checked='<?php ...

0
Q: Convert string to decimal php

pc_ocI'm fetching data based on two values​​. The price of a product and the discount on the product. And I want to calculate the difference. The problem is that the values ​​come from the database such as: 22,50 €. I grab this value, I'm removing the "€" and replace "," by "." . But the problem is th...

0
Q: PHP and Active Directory Authentication allows wrong password

tattooedgeekI'm working with tying in our internal site to use Active Directory for authentication. However if you put in the wrong password and it finds the username it will still allow authentication. So basically that is telling me that it isn't really even checking whether the password matches or not. I...

0
Q: How to run a php chat server and cliet program in a freehosting server which uses cpanel?

nuke1010I have created a client server chat application in php. It uses socket programming to communicate. It works fine on my Fedora using terminal. But I need to host the chat in a server. But I don't own any server, so I use free hosting site(with cPanel). Is there any way to run the socket programme...

0
Q: Check number of columns in uploaded excel-file

user3037311I'm creating a web page in which you have to upload a excel-file (either csv, xls or xlsx). Then I have to check the number of columns in the file, because the can must only contain TWO columns. I already find how to do this, but only for a csv-file: if (($file = fopen($path, "r")) !== FALSE){...

0
Q: AdWords Automated Live Email Alerts

user32081I would like to create a custom alert for an AdWords campaign. AdWord Sripts: https://developers.google.com/adwords/scripts/ The AdWords scripts only allows daily or hourly runs of the script. However, I would like a live monitoring of the alert. How can I do this? I am basically trying to ...

0
Q: Retrieving e-mails from any string

2Noob2GoodI have a string and I want to retrieve all e-mails contained in that string. I can get the @domain.com part with this code: preg_match_all('{@(([^ ]*)\.com)}', $string, $matches); print_r($matches[1]); What I want to get is: name@domain.com

0
Q: if or statement isn't working correctly

Jacob JohanssonIm having problem with a if statement. This is the if statement: if($userID != $_SESSION["sess_id"] || $creator != $_SESSION["sess_id"]){ echo "Success"; exit; } This is the values for the variables: $userID = 24; $creator = 13; $_SESSION["sess_id"] = 13; So for short: if(24 != 13 || 13 ...

0
Q: MySQLi can't prepare a statement with FIND_IN_SET

CawerenI'm doing a project where i have to find some rows which depends on a single field from another table, this is the statement i use: SELECT name FROM minerals JOIN blocks ON blocks.id='25' WHERE FIND_IN_SET(minerals.id,blocks.bonus) The function returns this: Problem preparing query (SELECT...

-1
Q: How to retrieve and store data with Ajax

Kid DiamondI want to return multiple data (variables) from PHP instead of just 1 piece of returned html code. Right now I got this: $.ajax({ url: "test.php", cache: false }) .done(function(html) { $('video').attr('src', html); }); But I want to be able to do someting similar to this: $.ajax...

0
Q: substr() or mb_substr() does not work

user2129623I am parsing webpage content using file_get_content() and then getting plaintext out of that. Now I want to catch first 150 characters from that plaintext. Here I worked. DEMo on codepad: DEMO $data = file_get_contents($url); $content = plaintext($data); //dont bother about this it works fine ...

0
Q: Curl Login to website which javascript(or jquery) login box

ExoonI have a script which logs into a website and im trying to update it to log into this other website but they have a scripted login box, not sure if its jquery/javascript or something but my usual script isnt working. This is the site: http://uploaded.net, You click Login along the bottom and it ...

0
Q: Function that checks the value of my roof that was selected and give me the output can be customized

Alexander Ti work on web application in php. The application will be the estimates of works on roof. the app is app.tettosano.com/php_test/ when the user select its roof, then draw the roof on google maps, useful for measure the roof's area, and then on the basis of the choice of the roof, the user can mak...

0
Q: Implementing SEO into custom CMS

ividyonI am interested in making my website URLs friendlier for the eye (and Google) by implementing various directories rather than obscure ?id=xyz pages. Examples: "/review.php?id=371" to "/review/deja-vu/" "/reviews.php?sort_by=1&order=1&approved=1" to "/reviews/asc/by_title/approved/" etc...

0
Q: Update a couple of values in nested array MongoDB

user222914I would like to update a couple of elements in they match given values: Example : I have a collection with this structure: { "_id" : ObjectId("52936a0270c68c04063f0300"), "channel" : "1", "content" : "145548", "keywordsValues" : [ [ObjectId("52816d3370c68c2c1c4b05...

0
Q: Date checker with error check

user2947210Here is some thing am looking for. I need a date picker for start_date and end_date. When user makes an wrong entry it should give some error. (eg: start_date: 27/11/2013 and end_date: 29/11/2013) and return to the same page. My trials goes like this. Created a jumpMenus for day, month, an...

0
Q: php header location redirect method didn't work

user3033162 <?php if(isset($_SESSION['logged_in'])) { header('Location: test.php'); echo "test"; ?> <?php } else { ?> <a href="#" onclick="CallAfterLogin();"><img src="facebook-login-button.png" border="0" alt="Log in with Facebook"></a> <?php...

2
Q: Why am I getting an undefined index error with this query?

CodeManiakI am working on creating a very simple content management system... Unfortunately I'm failing to retrieve posts from my database. My error is: Notice: Undefined index: title in C:\wamp\www\NightOwlSoftware\index.php <?php include 'scripts/db_connect.php'; include 'scripts/functions.php'; s...

0
Q: Zend Multiple identity (Zend::Auth)

user3035608I'm trying to get more identity (2 actually) on my website (on Zend Framework 1). I want to avoid to do this with roles. I have two tables ('USER', 'ADMIN'), and I need that one User can also be logged as Admin ... So currently, I have this class (who extends Zend_Auth) class Plugins_Auths ext...

0
Q: Preg_replace only when it's the only word

inTOWNHow would I preg_replace a string, when it only exists out of that one word? Example: Coming in are: G-star Raw G-STAR G-star I would like to change them all to G-STAR RAW: $x = preg_replace('/(G-star)\b/', 'G-STAR RAW', $x);` But I am getting also: G-STAR RAW RAW It's also replacing t...

0
Q: PHP: access to directory from file

dryhayThe file test.php: ./foo/test.php [-rwxr-xr-x user1] doesn't have an access to the bar directory (in the same directory): ./foo/bar/ [drwxr-xr-x user1] until permissions are changed to: ./foo/bar/ [drwxrwxrwx user1] How to get access to the bar directory from the test.php file without ch...

0
Q: htacess 500 Internal Server Error

Isaac SturkeyAlright so I'm having a problem using htaccess to password protect a page. Every time I navigate to the page they are redirected to a "Internal server error" page. I have very minimal knowledge of PHP and am having a hard time getting this fixed. I took a look in the error logs and found this err...

0
Q: Trouble running local WordPress in Google App Engine

OC2PSInstalled MySQL, Python and Google App Engine PHP SDK on a Windows 8 PC. Perfect! Created an app for WordPress, created database and user on localhost and edited WordPress config accordingly. Started the app in the Google App Engine Launcher. Clicking Browse leads to blank page at http://loca...

-2
Q: Form elements email

user2957054I'm trying to create a php form to email to myself the contents of the information in the summary bar. Could someone help me with just the part of the form where it will collect the information. My site is azaservice.com/mscalc.html <!doctype html> <!--[if lt IE 7]> <html lang="en-us" class=...

0
Q: PHP: Using preg_match_all to split csv into usable array

user3037392I'm trying to use preg_match_all in php to pull out the individual pieces of a csv string. Here's the code I'm currently trying: $csv = "1,2,3,4"; $match = "/^(\d+)(?:,(\d+))*$/"; $matches = array(); preg_match_all($match, $csv, $matches); print_r($matches); What I'm expecting is: Array (...

0
Q: Ajax jquery php file upload drag and drop

user3037414i want to make a multiple files uplod with a drag and drop , but i dont know where is the problem in my code PHP, the file not be uploaded jquery Code $("#drop-files-container").on( 'dragover', function(e) { e.preventDefault(); e.stopPropagation(); }); $("#dro...

0
Q: Recurring Post / Multiple Published Dates in Wordpress?

user2981169I want to implement a post schedule with recurring posts, such as Thanksgiving message, x-mas specific posts etc. I cannot seem to find a way to do this. I did see one solution with http://blog.vishalon.net/index.php/wordpress-yearly-monthly-weekly-post-repeater-plugin but other people on th...

0
Q: PHP URL Shortener error

Marco JohannesenI have this PHP code which is supposed to increase a URL shortener mask on each new entry. My problem is that it dosen't append a new char when it hits the last one (z). (I know incrementing is a safety issue since you can guess earlier entries, but this is not a problem in this instance) If i a...

0
Q: Display modified web newspaper front page (from another server) in my own index.php

MortenI'm making this irritating php app. I want to: Dynamically copy all current html from www.politiken.dk into a variable: $html Modify $html so that images and flash works from my own index.php Modify $html so that every occurrence of "Yahya" gets replaced with "Morten" Send the html to the user ...

0
Q: PHP 5.2.4 compile error: checking size of char... configure: error: cannot compute sizeof (char)

ChuckI am on RedHat Linux and trying to manually compile from source PHP 5.2.4. I have most every other library compiled into a specific set of directories as I have restricted permissions on this server. I "think" I have everything in place but am running into the following error: checking size ...

0
Q: Direct video upload to youtube (Without form)

user2894688I want to upload videos to my website and simultaneously upload them to youtube. I have found a link that works great but it's browser based, it's a form that needs to be filled (select video to upload), fill details, etc. It's the code that's in here: http://www.rd2inc.com/blog/2012/08/youtube...

0
Q: PHP Strict Standards: Only variables should be passed by reference in /etc/sphinx/sphinx.conf on line 1340

user2484920I'm getting this error.. PHP Strict Standards: Only variables should be passed by reference in /etc/sphinx/sphinx.conf on line 1340 ERROR: invalid section type 'Strict' in /etc/sphinx/sphinx.conf line 1617 col 8. ERROR: invalid section type 'Strict' in /etc/sphinx/sphinx.conf line 1617 col 1. ...

0
Q: How to autoclose and auto refresh a window opened sign up in js and php?

Mika SaSo i have this problem of updating site. Problem Background: In angular js, i have this directive that checks and controls sign-ups to an external account when a user tries to perform an action that needs to have a linked external account. When clicking a a button in the form which corresponds ...

0
Q: Is it possible in php to turn string var into type name?

user2554211So, can I get this code working: $typename='integer'; $tmp='12321321312'; $var=($typename)$tmp; WITHOUT using conditions, like: if($typename=='integer') $var=(integer) $tmp; AND WITHOUT using evals, like: eval( '$var=(' . $typename . ') $tmp;' );

0
Q: Trigger a cron with PHP

user3036906I have users of a golf league program who are allowed to email their members. The average number of members is 40 but some leagues can have up to 150 members. The email script uses phpmailer to send each member a personalized message and works well. I have a mail page that displays a sending gif...

0
Q: Ajax Unique Id From

ComyI have some problems that I don't know how to solve. I want to create some textareas that will update some values in my database. The problem is that I don't know how to make every FormSubmit unique and I also don't know how to get $_POST['id'] from that hidden textarea in another page. $("#Form...

0
Q: Browser Cache on production site

Mpa4HuI have a site which is in production. WordPress 3.7.1 + W3 Total Cache (I know it's not conected with browser cache) I updated some files (css, some php and js) with W3 Total Cache, I combine and minify css (which automatically generates name) So I cleaned minify cache + changed javascript ver...

0
Q: Why this function return true?

user2886388<?php var_dump(in_array('ddds', array(2,3,0))); Why this function return true? We have a string which could be converted to 1 but why to 0?

0
Q: Error with form_validation in Codeigniter

user3009010I am using the following code in codeigniter,and getting error, because the form_validation is not running.Please help me to sort out the problem.The code in controller is: public function event_desc() { $this->form_validation->set_error_delimiters('<div class="error">', '</div>')...

0
Q: Drupal 7 get block info programatically

user1298511I have a block defined programatically in Drupal 7 On my development machine the block appears under the main content as it should When uploaded to the server the block appears above the main content When I look at the row height in structure/blocks main content has a weight of -14 and the blo...

0
Q: php is sending invalid email address

user3018817Hello after 3 days of trying to put my form together, I have come across a problem... Using the form, It can validate when i press submit. which is good, but once i press send, the invalid data still gets sent to my inbox.. so I will end up with two emails.. one with invalid data and then one wit...

0
Q: how can I transfer data between php pages?

user3037527There is a page; login.php I try to receive username and password via form. Login.php <form id="form1" name="form" method="post" action="welcome.php"> <table width="275" border="1"> <tr> <td width="103">User; Name: </td> <td width="156"><label> <input type="text" name= "name" /> </label></td>...

0
Q: Jquery checkbox unchecks on submit

Jeremy TylerMy checkboxes are empty when page refreshes after submit. I would like to keep them checked. How can I do that in jquery? Here is my jquery code. $(document).ready(function () { $(':checkbox.selectall').on('click', function () { $(':checkbox[id="' + $(this).d...

-2
Q: How can i plus multiple rows?

Sigve AleksanderIf i have 5 rows in a table with a number in it. The number of rows isnt important. row 1: 1 row 2: 4 row 3: 5 row 4: 10 row 5: 10 like this (row 1 + row 2 + row 3 + row 4 + row 5) and show in a page the result 30?

0
Q: MYSQL IN statement returning wrong data

ForebaI'm trying to use the MYSQL statement IN to select only the data I need from my table. For example: I have a field that save categories by ID separated by comma (7,1,10,25,20). If I use this code: SELECT * FROM cancelamento WHERE ( motivos_int_id IN ( 7 ) ) I get only the rows that start with ...

0
Q: jQuery/PHP- POST Forbidden (403) when trying to send a complete URL in my JSON data

QwisoI'm making a card generator for fun and learning how to collect data from inputs and write to database. When trying to send this simple piece of JSON data I get POST Forbidden (403) errors from my PHP script. Here is the jsonlint.com validated object I am working with which is generated from in...

0
Q: Using enctype="multipart/form-data" with form, no data gets posted?

Andrei OnigaThis is one of the most bizarre bugs I've encountered. I have an HTML form that I use for uploading a file and also sending some additional hidden inputs, which gets processed in a controller method, like bellow. Just fyi, whether I use the CI form helper functions or write raw HTML code, the pro...

0
Q: Appropriate way to create PHP tables

John LeeI was wondering if there is an appropriate way to create PHP tables accordinaly. I am attching here an image sample of a PSD I created but now that I am moving to php creation I would love if anyone has an input about the best way to create those tables. Also, those tables are very organized ...

0
Q: Multi foreach with no repeat unchecked checkbox on PHP(CodeIgniter)

user3037564I do edit with codeigniter, which has checkboxes, but there is a problem after I earn them checked checkbox me out repetitions of these checkboxes, which unchecked. this is view file: foreach ($query as $n):foreach ($link as $l):foreach ($cat as $c): if($n['id']...

0
Q: Is this a legitimate use of the Abstract Factory pattern?

user1578653Here's what I'm trying to implement in my program: The program should open a zip file, which contains many data files The format of the data files can differ between zip files (e.g. csv, tab delimited, or could even be some kind of binary file which needs decoding) However, within a zip file a...

0
Q: Custom routing PHP

Rápli AndrásI'm trying out some custom php routing, and something is wrong at the last line of this function: public function is_valid_uri($a){ $s=$_SERVER["REQUEST_URI"]; return (preg_match('/'.$a.'/i',$s))?true:false; } I'm testing it using: die($route->is_valid_uri("\/u\/u\/?[0-9]*")); What's the ...

0
Q: Website that has a database attached to go with it

Russ ComptonI am fairly new to webdesign and I do not know much about databases either. I work for an IT company and I am only out of high school less than a year. I have been studying intensively now for quite a few months and I know about html/css/ and java to make an alright website. My boss wants me to m...

0
Q: Delete mysql records is not working in codeIgniter

MuhammadThis is my controller function function delete_article($title){ if ($this->session->userdata('User') && $this->session->userdata('User') == 'admin@example.com') { $this->load->model('Article', 'Article', TRUE); $this->Article->delete_article_db($title); redirect('a...

0
Q: Dreamweaver CS5 code hinting and syntax errors with PHP 5.4

amaster507I have done some research but have not found something that fits my scenario exactly. I am using Dreamweaver CS5 with PHP files and Dreamweaver alerts me that there is an error in my code with this line: if(explode("_","some_variable")[0]=="some"){ If I remove the brackets [ ] then the error m...

0
Q: Sharing array inside object through classes in php

Marco Aurélio DeleuMy problem is that I have an object shared through two classes that contains an array inside of it and along the script, someone will request some of the classes the value and a foreach loop will change such value and I want this change to affect every reference of the value. class bar { pr...

0
Q: Unable to change theme in magento 1.7

monojitUnable to change the template of Magento site. I am using Magento 1.7 version. I have created a new template like default/modern and i have changed the settings from admin-..configuration->design. Site have different languages store view and I have changed all of the store and default config as w...

 
6:04 PM
0
Q: Why is an E_WARNING acting like an E_ERROR?

MirroredFateI am running a script that requires a file which is not properly included in my script. PHP Fatal error: require_once(): Failed opening required 'Math/BigInteger.php' (include_path='.:/usr/share/php:/usr/share/pear') in /myDir/Net/SSH2.php on line 746 I have an error_handler set up, which reco...

0
Q: how to redirect wrong entered url

user3037590My current url is http://domain.com/example.php/link=eg But if someone plays with url and puts url as http://domain.com/example.php/abcdefgh97654 - anything, my all functions all links from that page become inactive. I tried using before all links in my php files but as my website has user regis...

0
Q: Display uploaded files using arrays in PHP

user3037589I'm trying to make a PHP site that uploads files (videos in this case) and displays them. I'm trying to store them in an array and then display them on the page. The problem is, the page is only displaying the last video uploaded, i.e. the array is only storing the last uploaded file. How can I m...

0
Q: How to show view in a child page, using Ionize CMS?

Ant100I am using Ionize CMS to build a project. This is my page structure: -- Page 1 ---- Page 1.1 ------ Page 1.1.1 ---------- Article 1.1.1.1 ------ Article 1.1.1 ------ Article 1.1.2 However when I click on Page 1.1.1, for some reason the theme doesnt show and all I get is the default p...

0
Q: How to get webpage URL using php

Rishi KumarI have a php script webpage let's say abc.php @['localhost/abc.php'] in abc.php i used this <?php echo $link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?> i include this page in another php webpage for example xyz.php @[localhost/123/xyz.php] but when i load xyz.php webpage i got th...

0
Q: PHP & MONGO: nested find query $and $or $ne

user3037638I am trying to make a query where I want to retrieve items querying a field in the database. I need to check something as follows (example): Read books where the text field contain "Soccer" or "Basketball": I want to have the items where only in the population above: contain '1989' exclude 'Euro...

0
Q: Parsing JSON with section headers and section rows

mreynoli am struggling with something that seems like it should be simple. Parsing the following JSON into tableview with the category name as section headers and the details within search of those sections. Here is my JSON. As you can see i have multiple categories (e.g. Baby and Other Baby Stuff, etc)...

0
Q: PHP - Create default default object from empty value

mr-santosThis is my code: I want to update the User information and risk factors. public function getUserById($id) { $user = $this->_xml->xpath('//user[@id="' . $id . '"]'); return $user[0]; } public function updateUser($post) { $user = $this->_xml->xpath('//user[@id="' . $post['id'] . '"]'); $user[0]->

-5
Q: How to grab a websites XML And copy it to your own

user2993980Alright, So theres a game I am playing now called ZWINKY some may have heard of it and some may not of.. Theres a way to get free items in it insted of paying heaps of money and I would be all for paying for the product except they are saving paypal info and I dont like that.. Anyway I have too...

0
Q: filename missing from upload when Uploading to Google Cloud Storage from Wordpress on Google App Engine PHP

loomtronicI have my GCS bucket set up in Wordpress/GAE PHP, I go into the wordpress admin and click on a post and attempt to upload a file. The file looks like it is uploading fine, but then when it finishes it says HTTP error. When I look at the logs on GAE, I see it says PHP Fatal error: Google Cloud...

0
Q: Whats the best way to use mysql_result in php 5.5?

wwwAs it is deprecated, I will need to change my all code which contain mysql_result. Since this may take long time, I am looking for a simplest possible option. Normally I would use this: $varname=mysql_result($result_query,0,"settingName"); now I found a function which may be a replacement: $...

0
Q: nursery application - how to structure my database

Zaphod BeeblebroxI'm having trouble getting my head around exactly what is the best way to build an application which is supposed to manage a nursery, particularly, who is in what room when. Nurseries have several rooms and each room has an age range allowed in it, and a maximum number of children it can accommo...

0
Q: Incrementing "Name" in jQuery output

Brandon McKinnon<script> function addRow() { $('#newitems tr:last').before('<tr><td><input type="text" name="itemnum" value="value"></td></tr>'); } </script> I'm trying to figure out if it is possible to set a variable to increment the "name" and "value" of the function above each time the addRow() function is...

0
Q: Setting a var in mysql and using in new query

user3032474I will like to do somthing like this $tagNo = 12345; mysql_query("var = SELECT `jobNo` FROM `Jobs` WHERE `tagNo`='".$tagNo."'; INSERT INTO `Locations` (`jobNo`,`tagNo`,`name`) VALUES (var, '".$tagNo."', 'blah')"); can this be done?

-1
Q: send json request using php for and api

user3037728i am working on some api in which i send information while json POST /api/v3/users/ HTTP/1.1 Host: example.com Content-Type: application/vnd.api+json Authorization: Bearer ab1dcb45be7e43db2212b0d2b0ca3892 this is a information using this will get that response but i dont know how to use this...

0
Q: Is there an alternative to the default php ldap library?

David R.The default php ldap library returns a resource when you run a search. It also returns a resource when you try to grab an entry from the search result. In order to read the values of an entry's attributes, you have to either know what they all are, or run the ldap_(first|next)_attribute() functio...

0
Q: exec(foo | at now) in PHP script

Nicolas ReynoldsI'm currently trying to execute in a PHP script a command using exec(), but delayed in time. I tried : exec('at now | fooCommand >> aLog.log 2>&1'); Does not work and : exec('fooCommand >> aLog.log 2>&1 | at now'); Neither. However : exec('echo "fooCommand >> aLog.log 2>&1" | at now"'); ...

0
Q: how can I upload and post image like facebook without page reload or refresh

Kesong Tsehtml code here <form id="upload_img_form" enctype="multipart/form-data"> <input id="add_picture" type="file" name="post_img" > <span id="postbutton" >Post</span> </form> //I don't want to use the action at the form above, because the page would reload or refresh I have done some of...

0
Q: PHP: removing words written in an array from another word

user2987364$a = array('jo', 'se'); $word= 'josephine'; I want to delete all the instances where the words 'jo' or 'se' can be found in the $word. So it would print the new word 'phine'.

0
Q: How to redirect to different websites after hit a submit button?

user3011308I'm trying make a form which have has a submit button which redirects different url when hit submit button? The way to redirect depends on data which viewers type. For example, lets say theres a form of input type="text" name="age" value="20" and if it was type over 20 and hit the submit butt...

3
Q: Cannot redeclare class error being thrown from file that is included twice with include_once

tubaguy50035I have a script that runs other scripts as a nightly cron. Looks something like: require_once 'states_import.php'; require_once 'product_import.php'; Those files then look like: include_once 'database.php'; include_once 'verticent.php'; Inside verticent.php there is a class declaration. W...

0
Q: unable to extract any facebook page images using php

user2753583I am implementing a link sharing feature in my website like facebook. When the user enters a url, it either finds the og:image tag, or uses some algorithm to find an appropriate image for the page. I also extract the title and the description. I am doing this by getting file contents using get_fi...

0
Q: Color code variable to change css

user3002515I have a color picker form but i want a preview... so how do i get the code form the colour picker into the divider at the bottom? i have tried javascript but cant get it to work... as far as i can go is to get the color... <script> function color(){ var color = document.getElementById("color"...

-2
Q: How to save cookies

GavinHow would I go about having people that say they directly login to my website, How would I make it to where, Once they login they are actually loged in via cookies? To say something like this. "If you would like to actually completely access the website you signup and login, But once you login i...

0
Q: Get limited amount of results from related table in Laravel

code9Tables post category ----- ---------- id id name name category_id I get limited amount of posts for each category (if category have posts) $categories = Category::get(); $categores_with_posts = array(); foreach($categories as $category) { $...

0
Q: PHP array comparison with different lengths

GrimnoffI need to compare values from 2 arrays that are not always the same size, each containing either a login or a logout time. I need to get the time difference total or time logged in between these values. Where I am getting caught is the logout result is usually smaller then the login. I tried t...

-2
Q: Blank Profile page when non existent user id manually entered in url

user3037590My website has user registration The users' profile is diplayed using a unique id Ex: http://domain.com/profile.php?uid=1 If someone enters http://domain.com/profile.php?uid=100 (100 is non-existant/non registered user). No error displays but a blank profile page displays with all background ...

0
Q: Need help to solve the seating plan

user3037756This is the php code I copied from a website but also there was technical mistake for which I was unable to find the solution. // save selected seats in db foreach($_POST as $vblname => $value) { $v = explode("-", $vblname); if ($v[1]) { mysql_query("UPDATE seats SET status=1...

0
Q: Magento empty transactional emails variables

Bakr KawkjiAll the transactional emails on a store I'm developing are showing empty variable values in emails. For example, the following is what a new user will get: Dear , Welcome to MySite. To log in when visiting our site just click Login or My Account at the top of every page, and then enter...

0
Q: Function is not responding as intended

KenI am trying to pull data from my database which will be dynamically added into a form.Depending on the data values in the database, i have a pair of radio buttons("Yes" and "No") that will be checked differently. To accomplish that, i have a function which accepts the value of the radio button a...

 
6:57 PM
0
Q: Returning string value in php array

Daniel AcciolyIts a simple problem but i dont remember how to solve it i have this array: $this->name = array('Daniel','Leinad','Leonard'); So i make a foreach on it, to return an array foreach ($this->name as $names){ echo $names[0]; } It returns DLL It r...

1
Q: updating checkboxes when stored in table as 0 or 1

user3037773i have stored data values in a table using checkboxes where values are stored either as 1(service available) and 0 (not available). how do i update checkbox info. INSERTING <?php $chkbox = array('antenatal', 'arvtherapy','basicemergencyobstericcare',`'bloodtransfusion', 'caesereansection', '...

0
Q: Performance Request PHP

Thiago Masano CavalotiI'm focused on a big problem on my web aplication that uses PHP, Ajax and MySql. I´ve already developed a script that uses a date-range timepicker for make calendars for each store that i have on my database + the advertisement that will be shown on the place. For each advertisement it will be pr...

3
Q: CakePHP: how to specify returned fields when there are multiple associated records

EmersonI'm doing a find('all') with a fairly complex set of conditions: array( 'conditions' => array( (int) 0 => 'Attempt.test_id = 8', (int) 1 => 'Attempt.score > 60', (int) 2 => array(), (int) 3 => array( (int) 0 => 'Resume.has_file = 1' ) )...

0
Q: (JavaScript) Trying to call a Method throught a CheckBox

Kamon241Basically I have a PHP method that downloads a table from a database on a server (phone_table). That all works fine. When it prints the table the last column is just a checkbox, and its printed using this code throught the php: echo "<td><input type='checkbox' id=$i onlick=getSubtotal($i)" . $a[...

0
Q: Using $_POST in mySQL query

Ralph David AbernathyI am trying to create a program where the user will enter a state abbreviation in a form field and the output will be colleges that are in that state. Here is my code: <?php $abbr = $_POST; print_r ($abbr); $host='x'; $dbname='x'; $user='x'; $pass='x'; try { # MySQL with PDO_MYSQL $DBH = new...

0
Q: Log into Instagram with PHP script

LanceI have the following. function InitializeCurl($url, $is_post, $post_data, $user_agent, $proxy, $proxy_auth, $cookies) { $c = curl_init(); curl_setopt($c, CURLOPT_URL, $url); curl_setopt($c, CURLOPT_USERAGENT, $user_agent); curl_setopt($c, CURLOPT_RETURNTRANSFER, true); curl_...

0
Q: get textbox name and insert it into database

Anup Kanti KarI have a textbox, like: Age:<input type="text" name='patient_age'> and text box value is 21. i can get value using POST method like $_POST['patient_name']; . But i want 'patient_age' text and insert 'patient_age' into one column in database.. Say: database table column key ...

0
Q: Cascade Select Needs to evaluate against first drop down not second

user3019140Getting so close! Here is the deal: I have successfully modified a freebie script for Cascading Dropdowns and so far it is working ok, but I need to make a change and I have not been able to figure out. There are 3 tables involved: tbl_gm_year, tbl_gm_paint_upper, and tbl_gm_paint_lower. Here a...

0
Q: php - Add to cart via mysql

user3037825 I have simple question. I try to do easy e-shop. All items are listed from database ID|NAME|DESCRIPTION|....|ADD TO CART Id like to make field ADD TO CART after clicking on the icon actually add item to the cart. So far I have on the page listed everything what I need: Listed items from DB, ...

0
Q: How to get the values with highest number of records with same value in mysql

Mahesh EuI have a table say "deal".it has got a field 'category'. i would like to know the top 2 categories from this table, which are the categories having highest number of 'deals'. for eg: there are 20 deals with category "cars" and 10 deals with category "bikes" and 5 with category "cycles" I want...

0
Q: NOtepad and Apache don't detect line breaks I save with Notepad++

thnewi have a problem with my PHP Code. I wrote something simple: <?php echo("Hello World"); ?> Now using xampp locally it works. But when I upload (with Filezilla) and run it on my webserver (Apache, PHP 5.3.24) I get following wrror message: Fatal error: Call to undefined function phpecho() i...

0
Q: Click a button to sort a table in jQuery

JohanI have a pagination that works great but I need to add buttons before the table so it can sort by "id", "name", etc.. So one button for id and one for name! I have this code in jQuery at index.php so you can browse fast between pages.. <script type="text/javascript"> $(document).ready(function...

0
Q: slides position and size error in php using SMIL Layout Module

Kelum Deshapriyai used SMIL Layout module in my MMS server. but in play slide show option in MMS have position and size error of image slide.how cam i fix this slide resize problem? thank you.

3
Q: What is the difference between "./file" and "file" relative paths

deadlockI always see developers including external files using these two types of relative paths. The question is, is there really a difference between" require "./lib/helpers.php" and require "lib/helpers.php" As far as I know, both points to the same file. But, does one outperform the other in te...

0
Q: Allow users to create their own pages

user3037373So I just started learning web development and I am just curious on how a website can allow registered users to create their own pages. For ex: www.website.com/john/page2 or www.website.com/john/page2 This is what Ive understood so far. So when a user registers with an email address and create...

0
Q: Updating a number value in my sql with php

MarkGreenI am trying to update a price in a mysql item table but no luck. In php i have the following query. "UPDATE Products SET `Price` = '{$price}' WHERE Item_Code = '{$tem}'; But it is not returning any order and it looks fine but in actual in table it is not updated! I tried echoing it t...

-2
Q: PHP if and mysql it have ip and id

Даниел Димитровips ID IP USER_IP 1 1.1.1.1 1 skins ID USERNAME 1 test If the ip and user_ip is same, do nothing. Sorry about my explanation.

0
Q: php fgetcsv and integer conversion

Paulo BuenoI have some data stored on a csv file in 'table' format and I want to store this data as (tag, tagtimestamp, tagvalue) on a database. But can't find a way to cast values stored on $v array to integer values: $p=0; $tag=array(); $dt=array(); $v=array(); $handle=fopen("sga/2013.10.054.vol2.csv", ...

0
Q: Display confirmation message after avoiding form resubmission?

CompressionsI have created a web page, where after you complete a form, the page is redirected to itself to avoid form resubmission. However, I would like to display a confirmation message after the page is redirected. Below, I have my current code for this. I need the echo statement to show up below the for...

0
Q: Get Uploaded Video Status after it's been Processed

DravenI am uploading a video to Youtube server-side. I understand the order of the statuses: uploaded -> processed -> rejected I need to get the "rejected" which could take several seconds to several minutes to reach that status depending on the size of the video file. So, how can I delay my script,...

0
Q: Jqgrid cannot add or edit data

JCooperI am using the jqgrid from Trirand.com and I'm unable to add or edit by data through the built in form dialogs. When I edit and or add data and hit submit the data refreshes but nothing changes. I've checked PHPmyadmin and no data has been changed or added to the database. Any help would be app...

0
Q: connect my microsoft CRM from my Website PHP

user3037933I have installed Microsoft CRM on my Local Server MS WIN SERVER 2008, I connect from my intranet to CRM using web browser http:// crm, now I have static IP configured to that Server, how can i login to that server from my website or from the Internet?

0
Q: how to retrive data where date is equal to current date

Johnfranklienhey i am trying to retrive data from MySQL where date = CURDATE() but its showing some kind of error Notice: Undefined variable: stmt in C:\wamp\www\resturent managment\todaysExpenses.php on line 48 here is my code <div class="container" align="center"> <table cellpadding="5px" cellspacing="5...

0
Q: Zend Framework 2 and Imagine

RR_1990I am working on a CMS built on top of Zend framework 2. There needs to come a function which resizes images, after some research I found Imagine It has all the functions I need. On the website it says you need to require the libary on your page. With Zend Framework 2 you can't just include the ...

0
Q: Parse html table using HTML DOM to php array

user3037927im trying to take this table Link into a array but i just want to take this parts and save it like this in arrays e.x $tag1 $stunde1 $fach1 $tag2 $stunde2 $fach2 Picture im having kinda problems getting just this parts my current code: <?php include('simple_html_dom.php'); include ("date....

-5
Q: Clarifications on the "elseif" statements

EdwinnerI need some clarifications here. How many blocks of code can a "elseif" statement take in Php? I have always assumed it was only if, elseif, and else. What other conditional statements act the same way in Php and JavaScript?

0
Q: Generate Doctrine Schema/Query from sql string

soupdiverI've got sql queries for different databases. I have to parse them somehow and then do some analytical stuff. Which columns are created with which datatypes etc. I thought I could use something like Doctrine instead of writing my own parsing algorithm. Until now I wasn't able to figure out how to...

0
Q: PHP get only the part of a mulit-dimensional array where the song name is DNA

marcusI am trying to get the album artwork from the itunes api, I need to get the artwork for a certain song and so am usign this code to retrieve the json from the api, turn it into an array, and loop through. <?php $songs = file_get_contents('https://itunes.apple.com/search?term=Little+Mix&attri...

0
Q: Delete row Jtable Jquery

notforeverI am having problems deleting rows, I think is because the post[id] is not being sent. The delete message displays but the row is not deleted. Here is my code: JAVASCRIPT: $(document).ready(function () { $('#PersonTableContainer').jtable({ title: 'Tabla de Clientes', paging...

2
Q: Difference between 'is_array' and '\is_array'

Eldhose T Jif(is_arrray($arr) { //code... } if(\is_array($arr) { //code.. } The two conditions gives same result. But, exactly, what is the difference?

0
Q: PHP simplexml search

user2962819I have the following XML file loaded into a php simplexml variable and I need to find the status and unit_id from one of the bin children. I will already know which shelve[] child it will be under just not the bin child. <frames> <shelve> <bins> <bin> <bin_id

0
Q: Dynamic OG meta data for Facebook

Ben PackardI have a small web page that, every day, displays a one word answer - either Yes or No - depending on some other factor that changes daily. Underneath this, I have a Facebook like button. I want this button to post, in the title/description, either "Yes" or "No", depending on the verdict that da...

0
Q: Trying to understand some PH coding

user3010829I have a program that build our cart... what does this do and how do i use this to check to see if the Product is in the cart? $KEYS = ARRAY_KEYS($CART->PRODUTS) I can provide the guts of the program. My goal is to setup a routine that will give a 25% discount at checkout that will exclude c...

0
Q: Redirecting to email editor compose screen - set from address (sugarcrm)

user794846I am redirecting to the compose email screen like this: SugarApplication::redirect("index.php?action=Compose&module=Emails&return_module=Cases&return_action=DetailView&return_id=".$this->bean->id."&recordId=".$email_id); This works but the problem is: Right now it always goes to the current u...

-1
Q: Codeigniter url does not work

user1684080I have transfered the site to a new server to the http://www.cbbqatoy.org/ its working for the default url but not working if i want to access a controller admin http://www.cbbqatoy.org/index.php/admin. But this site is working in my old server http://kolkata-web-design.co.in/trackscore/index.ph...

0
Q: Call-Time Pass Reference GV Streamer Google Chart API

user2970533I was using GV Streamer to create a Google API Chart The code I was using is this: <?php header('Content-Type: text/html; charset=utf-8'); include_once("gvServerAPIEx.php"); $tqx = $_GET['tqx']; $resHandler = $_GET['responseHandler']; $host = $_SERVER['HTTP_HOST']; ...

0
Q: Buying in-game through paypal securely

Aidan MolloyOk first of all if a mod sees this and has a better title please change! So in my website I have in-game features which you can buy I have a miniature store made and paypal buy now buttons included What is the best and most secure way of automatically giving users there in-game bonus. When they ...

0
Q: How can I set $_POST to equal $_POST

ArianI have a lot of $_POST variables ... is it possible to do something like this? I want something like this... (I know this doesn't work, because it comes out to $_POST['POST'] ) : <form method="POST" action=""> <input type="hidden" name="POST" value="<?=$_POST?>"/> </form> Instead of this: <

0
Q: LOAD DATA LOCAL INFILE does not work from php 5.5 using PDO

user3034537I've recently moved web servers, and the new web server has a different version of PHP. New Server: PHP 5.5.3-1ubuntu2 (cli) Old Server: PHP 5.3.10 (cli) On the database server, my.cnf is set to allow local-infile. I can use load data local infile from: * HeidiSQL * The command line client runn...

-2
Q: Undefined Index: func isset is present

user3019140Receiving the following: Notice: Undefined index: func in /Applications/XAMPP/xamppfiles/htdocs/select2/func.php on line 23 Notice: Undefined index: func in /Applications/XAMPP/xamppfiles/htdocs/select2/func.php on line 67 Notice: Undefined index: func in /Applications/XAMPP/xamppfiles/ht...

0
Q: Modal form Submission to PHP using Jquery .ajax

BEBOI am trying to post a modal form to a table using php, jquery .ajax but it never works.. tried debugging using firebug and i don't see any errors. i tested the form by using form action="notes_functions.php" and it worked fine. Profile.php <div class="modal-body"> <form class="note...

0
Q: Cakephp How to order by date and month only

HartsI have a contact table with date field for birthdate. Now I would like to show list of birthday within next week. I can show it, but the order is based on the year. How can I order the data, just based on month and day only? $sideBarTaskSuggestion = $this->Project->Contact->find('all', arr...

 

« first day (280 days earlier)      last day (30 days later) »