« 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...

 

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