« first day (220 days earlier)      last day (90 days later) » 
00:00 - 15:0015:00 - 00:00

3:03 PM
-2
Q: Is this functions correct and not vulnerable?

NRovEPlease can you see if this code is vulnerable overall or if its fine mostly ? I will highly appreciate it any comments. function doProcessNationTransfer() { if (!isset($_POST['submit'])) { ...

0
Q: DataTables server side filtering, ordering,

nielsvI am using the datatables jquery plugin for showing data in a table. I want to use server-side processing for showing the data and filtering, ordering, ... the data. What I can do now is populating my datatable with the data. I pull data from multiple tables and form an array which I sent back a...

0
Q: Payment gateway: Information hash needed?

PickleI'm building a payment gateway for my organization. Different apps will be able to POST data to the gateway to initialize a transaction. Some of that data will be 2 account codes, and the dollar amount. Now my thoughts have moved to security. I'm concerned about end-users being able to change...

0
Q: PHP Soap plus Android (read it)

user2742861I'm trying to get the info from a SOAP in PHP and I achieve that task with the help in this post Android SOAP wsdl. Although, there are a few things missing that I would like you to explain to me and give me a better option. Currently, my PHP code is: $query = $db->prepare("SELECT name FROM `oc...

0
Q: static graph or widget out of piwik for pageview evolution of single page(name)

mcProgrammerWhat I need is the evolution of pageviews for a single Page Name, shown in a graph, available as widget or static image for embedding in another website. In the Piwik website itself, this graph is available: go to Actions -> Page Titles, and hover over a certain page title -> two icons appear, o...

0
Q: $wpdb->insert() does not Insert record in a table

ahmii321I'm trying to understand and get hold of the $wpdb global object but can't seem to make it work. Basically, I'm trying to insert a single record into a custom table in wordpress DB. Instead of creating your own connection string and using that, I've seen the Global $wpdb object do the trick for u...

0
Q: Online Invoicing service with payment integration

Mohamed FawaskhanI'm searching for php script which provides Business users to create invoice and send them to client. Later client can do payment. I have come across some website which provides this service. http://www.bill4time.com http://www.billmyclients.com http://www.billingorchard.com http://www.simplif...

0
Q: Select query on two tables (brands & phones)

ZabsI have two tables - 'brands' & 'phones' as illustrated in the sqlfiddle below http://sqlfiddle.com/#!2/6da79 brands(id, brand) phones(id, brand_id, phone) I basically want to know how to best implement a search that will do the following - if a user enters 'Sony Ericcson' - it displays all th...

0
Q: Mongo+PHP Querying nested (embedded) documents excluding fields +'Where' clause

leseTrying to query nested documents(message collection) with embedded fields from an other collection(user) here it is an example of the document i want to query: array ( '_id' => new MongoId("52454de22660b239178b4567"), 'from_uid' => array ( 'uid' => '5231817277758e660c7202d7', 'uname' =

0
Q: Laravel 4: Restful Controller and Layout

arielcrI set up a resource on Laravel's routes.php like this: Route::resource('users', 'UsersController'); I created the UsersController, and set it to use a layout: class UsersController extends BaseController { protected $layout = 'layouts.default'; public function index() { ...

1
Q: Using ajax in zend framework 2

fedorSmirnovi am really new to the zend framework 2 and to the programming of web applications. In my application, i want to have a button which triggers a function that changes the content of a database and returns a String which i can use to update the visible content of the website. As i donĀ“t want the we...

0
Q: Forming DoubleClick for Publishers Soap Requests without a library in PHP

user2824003I'm stuck developing in an environment where I cannot use the PHP DFP library. I'm using PHP's SoapClient and I'm having trouble forming the headers correctly for SOAP requests. Here's the example: <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xm...

0
Q: mysql - Many tables to one table - multiple entries

RalphMI have a system which has (for the sake of a simple example) tables consisting of Customers, Vendors, Products, Sales, etc. Total 24 tables at present. I want to add the ability to have multiple notes for each record in these tables. E.g., Each Customers record could have 0 to many notes, each...

-1
Q: Forgot Password PHP Email Link

PrianI have made member forum zone nearly, however I would like to create a password reset. So if users forget their password. They can click on a click and then the link will take them to a place to fill out a email address. Then once they have opened their email it will give them a link which will...

-1
Q: Adjust time to inverval

AlexI have an array of Event objects that have 3 properties that represent start time, end time and text. They are sorted by start time: 20 - 30 - A 40 - 60 - B 75 - 120 - C 140 - 150 - D And I want to re-adjust the start/end time of each event to fit within a specific interval. For example,...

0
Q: cakephp select multiple strings from a string in a column

Anugrah PandeyI'm using cakePHP 2.3 to build an application with a restaurant database. Now, the person before me has saved restaurant details in a table called 'locations' which has a row for cuisine which has multiple values in one column, like 1 location can have chinese, indian, korean etc. If the column ...

0
Q: Subscriptions and recurring payments with preapproved allowance limit

ArchimedixI am working on a site providing software as a service which is billed on a monthly basis. The software is licensed on a per-user basis and will be extensible via optional standard modules and custom apps that can be subscribed to through an app store. The customer can alter the number of users...

0
Q: WordPress: Ordering the output of a loop by a custom field containing a datestamp

roberturidgeI'm using a custom field that stores the timestamp of a date entered by the user. I want to display posts sorted by that custom date, but they refuse to order by custom field. Here I register the custom field using this custom meta boxes tool - https://github.com/jaredatch/Custom-Metaboxes-and-F...

0
Q: PHP - If Equal to or greater than

AaronHattonI am trying to write an if statement but cannot work out why it is not working, probably being stupid... $a = 5 $b = 12 if ($b >= $a) { echo "B larger then or equal to A) } else { echo "A smaller then B" } The problem is I get the following message and cannot find anyone trying to...

0
Q: zombie.js lose session in callback

DEYI'm trying to authenticate to a PHP app using zombie.js (tried 2 symfony2 apps and same result). But the browser session is not the same in the callback. I think this why the authentication fail. Here is my node.js code var Browser = require("zombie"); var assert = require("assert"); // Load...

0
Q: Changing the front page in WordPress based on whether the user is logged in or not

Chris FerdinandiI'm building a plugin that helps users signup and login from the WordPress front-end, and also hides and shows resources based on whether or not the user is logged in. One area I've gotten stuck on is how to change the homepage that's shown at the root domain based on the user's logged-in/logged...

2
Q: How to use the password_needs_rehash function in PHP 5.5

AsheshI have a set of passwords in my database that I had earlier hashed using sha512 and now that I have upgraded my server to PHP 5.5, I would like to use the bcrypt password hashing. So my idea is to have the user's login and then call this password_needs_rehash function described here to check the ...

0
Q: Yii UnitTesting WebUser

LiamIm writing some unit tests and bear with me I am still very new to unit testing. The issue i am having is a lot of my saves invoke a behaviour that requires the users id from Yii::app()->user->id. However when I run the UnitTest I get problems as the user isn't logged in. Is there anyway i can...

0
Q: How to use GetDate() instead of Time() in this php function?

NRovEHow I can edit this PHP function below, so it will use GetDate() and will check like: (nTime < DATEADD(DAY,-7,GETDATE()) OR nTime IS NULL) instead of if ((intval ($row['nTime']) + 604800) <= time() || !$count) Basically I want to do the same but to use GetDate() instead of time() Code: $...

0
Q: How to write PrinceXML file to server using PHP

no1uknowTrying to fwrite the pdf results from PrinceXML to the server (in a new pdf file) instead of exporting via headers to acrobat. The below code displays the results on the browser. require_once("../library/Prince/prince.php"); $princeSettings = $this->getInvokeArg('bootstrap') >getOption('prince')...

0
Q: SQL query to CakePHP

tcastrog10I have an SQL query for my database to get the 5 most popular queries in my website. SELECT query, COUNT( query ) AS cnt FROM search_queries GROUP BY query ORDER BY cnt DESC LIMIT 5 This works when I use it in phpmyadmin, and it shows my 5 most used queries. Now, I want to convert it to pure ...

0
Q: a way to serve php and nodejs realtime functionality at the same time ( integration )

RichardWhat is considered effective in terms of implementation if a php application wants to provide realtime functionality. I am talking about Nodejs ofcourse. The php is served from a shared hosting provider and does not provide anything for Nodejs. Do I have to deal with crossdomain policy if the ...

0
Q: PHP Error with Login Form

user1781192I did not create a database for this login form to post to yet... I am getting an error saying syntax error, unexpected '<' on line 118. This code is supposed to check for invalid characters and display an error message if the invalid characters listed are found. I apologize for the code not bein...

1
Q: Add current date to mysql database in PHP

NadeeshaanI have a my sql data base in which i have a field to store date. What I want to do is to store the current date to that field when i insert a new record. My php code in Codeigniter to insert a new entry $commentData = array( 'comment'=>$message, 'docid'=>$_GET['id'], ...

0
Q: Average b/w two dates stored as int

user2802100i want to show average diff of 2 dates colums as in int data type. i know how to show if thats date column but not now how with int data type. i tried this but nothing shows: mysql_query("select AVG(update - date) AS avg_time from qchat_sessions"); Thanks

0
Q: How to pass href variables to javascript

amartin94So ive got a JS function that's run when multiple html href's are clicked. That is to say, i have about 4 different href's that look similar to this: <a href='#' onClick="myPopup()">New Window</a> and my JS looks like this : <script language="javascript" type="text/javascript"> <!-- function...

0
Q: php variable with site wide scope

sanjaypoyzerI'm using Kirby CMS and creating a little snippet which limits by posts by what number they are, and what date they are. A way to create a 'autopost' system basically. $today = new DateTime("now"); //Declare today $startdate = new DateTime("2013-09-12"); //Declare startdate $interval = $startdate->

1
Q: How to retrieve sum of 5 top score from a table in mysql

user1684080I am working on a project where i need to extract the sum of top 5 score for every team sorted in descending order from a table. Here is the table structure Can anyone help me for this query Thanks

0
Q: How to make a query with id in condition?

AviAtionFor example select all posts from table where id in ( 2, 3, 5 ) $criteria=new CDbCriteria; $criteria->condition='id IN (:id)'; $criteria->params=array(':id'=>$postIds); $posts=Post::model()->findAll($criteria); var_dump($posts); but I have an error: Array to string conversion.

0
Q: Is 'Errors-To' needed in the mail() PHP function?

TomIn PHP mail() function, what is the purpose of 'Errors-To' in the header? Is it a good practice to include 'Errors-To' in the header at all? I think 'Return-Path' should be enough? For example: $headers .= "Errors-To: webmaster@domain.com\r\n"; versus $headers .= "Return-Path: webmaster@doma...

0
Q: External PHP file returning error with the result?

user2561369I have an external PHP file which updates mysql database (this file is connected with the main theme with jquery and ajax). This is the simplified code from the ext file <?php $file = dirname(__FILE__); $file = substr($file, 0, stripos($file, "wp-content") ); require( $file . "/wp-load.php");...

0
Q: how to remove a letter according to a particular position

An Nguyį»…n Lê Tháii have two php files. 1st is displayPhone.php <!DOCTYPE html> <html> <?php $labels=array("first_name"=>"First Name", "last_name"=>"Last Name", "phone"=>"Phone"); ?> <body> <h3>please enter your phone number below</h3> <form action='savePhone2.php' method='POST'> <...

0
Q: PHP Showing in Source Code but Still Executing Correctly

EnijarI was looking through some of my websites today, and updating them. I was in Chrome Dev Tools, looking at the source of one of my sites, when I noticed this: The PHP is clearly visible, and it isn't commented out in the HTML, nor have I changed any of my server settings (I am on a hosting plan...

0
Q: Its possible to see the sql query that we are doing in browser?

user2469122i have a basic doubt. i have this example: $sql = mysql_query("SELECT * FROM admin where id = username='$username' and password = '$password' LIMIT 1"); Its possible to see what this sql command is doing in the browser? To see if it is correct.. Thanks.

0
Q: File get contents params

user2665393I'm making php crawler to explore e-shop called alza.cz. I want links to all products in that e-shop. I'm on address: http://www.alza.cz/notebooky/18842920.htm., but this display only first 21 items. To get all items I must go to address: http://www.alza.cz/notebooky/18842920.htm#f&pg=1/10000. Cr...

0
Q: Using "use" within a function?

FlorianI'm trying to make the following work: function flosoftdedicated_api_init() { require_once 'resources/vendor/autoload.php'; use \Ovh\Common\Ovh; .... $ovh = new Ovh($config); return $ovh; } function flosoftdedicated_ClientArea($params) { global $ovh; $ovh = flosoftdedicated_api_init(); .... ...

0
Q: Push a multi array to array?

panthro$galleryData = []; foreach($input['gallery'] as $galleryImg) { } I want to push in the galleryData array, a keyed array. How can I do this? I've tried: $galleryData[] = ['name'=>$galleryImg['file']['name'], 'comment'=> $galleryImg['file']['comment'], 'youtube'=> $galleryImg['file']['yout...

0
Q: Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\baljeet2\ViewAllPolicy1.php on line 32

santbirsinghPlease somone tell me where I am wrong? I am getting the following error when I am running the script Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\baljeet2\ViewAllPolicy1.php on line 32 Here is my complete code <!DOCTYPE html> <html> <body bgcolor='white'> <?PHP include 'con...

0
Q: Importing mp3 files with PHP

Chance SmithSo Im having problems with the links of the mp3 files. I can get the mp3 to show up on the page but none of them are working with the corresponding files that are in the folder. All my songs in the folder are located in the htdocs of the xampp folder. I really dont understand what is going on. An...

0
Q: MYSQL syntax error submitting with PHP

rootI am kind of stuck. I keep getting a syntax error. Can anyone take a look and let me know whats going wrong? You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'return (Badge, Dept, Asset) VALUES ('61584', 'IT', 1...

0
Q: Password and username displaying in input fields?

Midway MediaI have a silly problem that i just cant figure out. when i refresh my login page the password and username appears in the input fields. here is my code: <?php include_once "includes/scripts.php"; ?> <?php session_start(); include_once ("includes/connect.php"); if (isset($_SESSION['logged_in'])) ...

-2
Q: open or download ms word document on cakepgp

user2822905i'm trying to download ms word from cakephp 2.* or open it in new tab browser. i found this code from http://codeshare.info/posts/details/Html%20data%20export%20%20to%20Excle%20,%20word%20,%20%20pdf%20dompdf%20%20by%20cakephp%20,%20php. this code only required to be place in view. i can download...

0
Q: PHP Dynamic Include Help on Index.php?

Alex MikhaelsonI need someone to let me know a solution to this issue. I am trying to create an include on my index.php file so when a user clicks a link on my navbar the content on the index.php changes. The code below works great, except when I go to index.php, because it is not part of the array, it calls ma...

1
Q: PHP String reversal without using extra memory

ArihantHow can i reverse $str= "hello\n" to "olleh\n" without using any extra memory variable? I looked up for prebuilt functions but they all use memory, also, i think string is immutable so basically can this be done without any tweak or creating a new string is the only option?

-1
Q: Why this php query doesn't work?

NRovEEverything else works from my script but just this doesn't want to work and insert into the database. $db->doQuery('INSERT INTO PANEL_NT (strAccountID, nTime) VALUES (?, ?)', $_SESSION['strAccountID'], time()); For example I've got: $db->doQuery('SELECT * FROM ACCOUNT_CHAR WHERE strAccountID ...

0
Q: error on passing from controller to views in codeigniter?

Jihad Mahfouzi want to passing data from model to controller then to view this code explain it. the model public function get_all_college_name() { $q = $this -> db -> query('select * from college'); if ($q -> num_rows() > 0) { foreach ($q->result() as $row) { $data[] = $row;...

0
Q: PHP Login authentication failed

Jairo FilhoI've used this to login in a ftp account for about 4 years: $conn_id = ftp_connect('server') or die ("ERROR"); $login_result = ftp_login($conn_id, 'user', 'pass'); Last days it wont work. No changes in account, server, or PHP version. I can access the same account in a FTP client. In the site,...

0
Q: form validation, that stores and retrieve data from mysql database

Brandon GambleHello I am a student taking an IT course online but my background is in Engineering. I am working on a project to create a form that validates on submit and stores and retrieve data from mysql. I have pieced together some coding and the input fields along with the javascript probably do not mesh....

0
Q: Form validation of a name php including apostrophe, space, hyphen and period

Aunt JamaimaI'm having a hard time putting the correct expression together, so that it rejects everything except letters, periods, apostrophes, spaces and hyphens. So far this works for everything except the apostrophe, which I've tried to escape with both single and double "\" to no avail. if(!preg_matc...

0
Q: PHP Composer create-project error with git

maennchenI want to create live Environment with the following command: $ php composer.phar create-project amiadogroup/students --repository-url=http://satis.amiadogroup.com --stability=dev targetDir dev-hotfix/Students_Config_1 This works good as long the version to install is the master branch. If I u...

0
Q: deleting a mysql table row based on current date and table date

user1751570I am trying to make a webpage that deals with seminars postings. I would like the page to delete a seminar that is past its expiration date (or the date that the seminar occurs) My table has 3 date slots, one for month, one for day, one for year. They are all integers in the table. if(date("Y") >

0
Q: Aviary jquery pass a form variable to post url

user2087269I am trying to send an image name using aviary and need the image name included. I have a hidden field in my form "img" Here is the code: <script type='text/javascript'> var featherEditor = new Aviary.Feather({ apiKey: 'yogbsxwbf3bl74f4', apiVersion: 3, theme: 'dark', // Check out our ne...

0
Q: I get this error Parse error: syntax error, unexpected '['

user2824290<?php // configuration require("../includes/config.php"); render("home_form.php", ["title" => "Log In"]); ?> /** * Renders template, passing in values. */ function render($template, $values = []) { // if template exists, render it if (file_exi...

0
Q: After setting .htm files to render using PHP I'm being asked to download the page

Chris FrankI'm working on an old site, and I want to add cookie functionality in order to allow people to use the mobile site, but also opt-into using the full site if they want. The site is currently all .htm files, and I can't with the budget go in and change every link to .php so I tried adding this to m...

0
Q: Simple PHP web crawler returning simple html dom error, what is wrong?

user1773070I have a PHP script that returns links on a webpage. I am getting 500 internal error and this is what my server logs say. I let my friend try the same code on his server and it seems to run correctly. Can someone help me debug my problem? The warning says something about the wrapper is disabled. ...

0
Q: (CodeIgniter) Unable to add to Cart Class

jessenortonI've just started playing around with the shopping cart class for CodeIgniter (version 2.1.4) and I've been following tutorials that help explain it. But for some reason I am unable to successfully add a a simple array to the cart. Here is my implementation of the cart class: <?php if ( ! defin...

 
5:03 PM
-5
Q: Languages without object reference

AlirezaI'm a C# developer. In C# every object either Reference Type or Value Type is dealt by its reference. I wonder is there any other language(s) in which this doesn't hold?

0
Q: DOMDocument on loadHTML some tags dissapear

yeah its meI'am getting all the content of the page, but after $dom->loadHTML($data): Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: input conversion failed due to input error, bytes 0x98 0xD0 0xBD 0xD0 in test.php on line 10 How to ignore malformed html to not remove it? because I miss some ne...

0
Q: âā‚¬ characters in mysql database

user1867350Storing some values in a mysql database, the input is being sanitized with mysql_real_escape_string($value) and it displays fine. However while performing a direct query on the database, I'm seeing characters like Ć¢ā‚¬ on each text field that has been edited using this form. How does that happen? I...

0
Q: Woocommerce--use non-Featured Images for loop?

KeithAdvThis is one is a toughie for me. I hope someone has figured it out already! I'm not very educated on PHP. I have a client who is porting her store from Adobe Business Catalyst to WooCommerce. I'm customizing the Ayoshop child theme for her. So far, she is really pleased with the results. Howeve...

0
Q: Joining two extra tables with two ON Conditions for both

user2823610$result = mysql_query("SELECT DISTINCT subscriberMaster.id, subscriberMaster.locationCodeID, subscriberMaster.firstName, subscriberMaster.lastName, subscriberMaster.company, subscriberMaster.address, subscriberMaster.address2, subscriberMaster.city, subscriberMaster.province, subscriberMaster...

0
Q: Wordpress - Wrapping posts in same category with <section>

user2762390I am trying to use Reveal.js (https://github.com/hakimel/reveal.js/) on WordPress with the Posts being the content per each slide. I have gotten the post to display properly on the slides, but I am having trouble finding a way to wrap posts that have the same category in a tag. Basically, My c...

0
Q: How to send image created by Imagine PHP library to browser?

MichaelI just tried this out: $imagine = new \Imagine\Gd\Imagine(); $size = new \Imagine\Image\Box(100, 100); $palette = new \Imagine\Image\Palette\RGB(); $color = $palette->color('#333333', 100); $image = $imagine->create($size, $color); header('ContentType: image/jpg'); echo $image->get('jpg'...

2
Q: Convert number to 5 digit string

Peter StuartI want to convert a number to a 5 character string. The string characters are a-z, A-Z and 0-9. Each combination of that code increments by "1" I am not sure how to explain it, so I am going to give you an example. For example 1 = aaaaa 26 = aaaaz 27 = aaaaA 52 = aaaaZ 53 = aaaa0 62 = aaaa9 63 ...

0
Q: Directory with PHP Include

Alex MikhaelsonI forgot to ask this in my question here: PHP Dynamic Include Help on Index.php? How do I make it so directories are used with php includes? For example. I want to rename page2 to rules, then put the rules.php file into a folder called /rules/, so its now /rules/rules.php As a result, the new u...

0
Q: How to build NAV with PHP and MYSQL

Wiktor LiszkiewiczI have write this by myself. I was wondering if you guys have some tips or see any issues in this script. So far it works great. Looking forward to see what you think of it. Here is the code: <nav> <ul> <?php $filepath = $_SERVER['SCRIPT_NAME']; $basename = basename($_SERVER['SC...

0
Q: PHP & SQL - get results from db where date is today

Daniel Yeffeti'm trying to do the following thing: In my Database, I have rows with time in each one (using time() function). For example: 1380300397. Now, I'd like to build a query that gets the rows from the current day. I've tried this query with no success: SELECT `id`,DATE_FORMAT(`time`, '%Y-%m-%d') FRO...

0
Q: curl put 411 required length

bart2puckI am trying to do a curl put with php using the below code. I am getting a response from the server. 411 Length Required nginx/1.2.3 Here is the code: curl_setopt($crl, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length:115')); curl_setopt($crl, CURLOPT_POSTFIELDS,$d...

posted on September 27, 2013 by user2780294

I have tried many answers here, none worked. I basically want to find any url like: http://vimeo.com/19141843 and Remove it, replace it with blank. I tried the following: $text = preg_replace("/(^¦\s)(http:\/\/)?(www\.)?[\.0-9a-zA-Z\-_~]+\.(com¦net¦org¦info¦name¦biz¦.+\.\w\w)((\/)?[0-9a-zA-Z\.\-_~#]+)?\b/ie", '', $text); $string = preg_replace('\b(https?|ftp|fi

0
Q: How to connect to php in android using an async task?

Diaan4uI want to retrieve data from a php file on my server from an android application. I have been searching for a working example for 2 days now and all I can found is this: http://www.androidaspect.com/2013/05/how-to-connect-android-with-php.html http://fahmirahman.wordpress.com/2011/04/21/connecti...

-1
Q: Making a HTML Tagged email in php

Muhammad UmarI want to create an HTML Message to send an email in PHP $message = $mess0 . "</br>" . $mess1 . "</br>" . $mess2 . "</br>" . $mes1 . "</br></br>" . $mes2 . "</br>" . $mes23 . "</br></br>" . $mes3 . "</br></br>" . $mes4 . "</br>" . $mes5 . "</br>" . $mes6 . "</br>" . $mes7 . "</br>" . $me...

0
Q: PHP Conditional Questions Data Structure

user1416564I'm working a webapp for a non-profit and I was wondering what would be the best data structure used to get the following effect: The app will consist of obtaining information from a user, similar to the game 21 questions, but with more than Yes or No, for example I could ask the user a serious ...

0
Q: Soap doesn't add type to the tag

Oleksandr KhavdiyHere is wsdl http://apiconnector.com/api.asmx?WSDL. And I have problems with UpdateContact function if I use php SOAP client on DataFields updating So php SOAP client generates call like <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://apiconnecto...

0
Q: Not recieving Emails from php code

Juliana WildeNot receiving emails. This is driving me NUTS, the orginal problem, before with just the field. Email, subject, message. I was getting emails, But I was unable to see the email variable. It just came in, from my server. So I cannot reply to any emails I receive. thought to add another field. "ema...

0
Q: how to remove the previous marker in google map

Narayan Ghimirei have used the following code to display the location in google map in every 2 second .Please help to remove the previous marker when it goes to new places.i could not remove the previous marker when it goes to new place. <style> #panel { position: absolute; top: 5px; le...

0
Q: Facebook SDK - PHP - Token invalid (expires?)

CiroI'm using the Facebook SDK to post content in Fanpages Wall (most than 20 sites and fanpages). Last week until today, only 2 pages appears an error. The token facebook (which I store in DB), expires after the first post, not accepting more. Anyone knows this problem? See the PHP code: <?php ...

0
Q: Best MySQL data type to store MD5 hash or NULL

user1032531I have a PHP application which stores all accounts regardless of whether they are active or not in a single table. The table has a column called "active" which is either is NULL which means the account is active, or contains a MD5 hash which means the account is inactive. According to Best prac...

0
Q: MySQL limit parameters relative to a row value

WebinanI have a boxes table with a box_size column. I want to fetch a set of boxes with a total size of 16 how should I do this? for example fetch 16 row with box_size = 1 , or two rows with box_size = 4 and 4 rows with box_size = 2 etc.

0
Q: Any way to dynamically create flow chart or UML with PHP/MySQL?

Sean CunninghamI've got a process tracking system built with PHP/MySQL and I'd like to provide a graphical representation of the entire process -- a map, more or less. Each step, tasks, assigned users, and dependencies are stored in MySQL tables and so I have no problem outputting the data in any number of way...

0
Q: The simplest way to parse xml in PHP

Jay RomualdI was looking for a simple way to parse xml with multiple row and nested selector but simpleXML is not that simple so I find a good solution using PHP Simple HTML DOM Parser. You only need a few line. <?php include('....../domparser/simple_html_dom.php'); // path to simple_html_dom.php $xmldata...

0
Q: php sql server putting it online

user2701926hello all can any one tell me how do i put my php database online.. i mean that i have got the domain name ,hosting and uploaded the php files to the server by ftp (filezila) i don't know how do i put the database created on local server (php myadmin) on the hosted server.. any help please ...

0
Q: How can i use User and Password by $_session[] to search?

T2terBKKI create images slider. It's must use user & password to run. Here is. <? include 'connect.php'; $_session[user_login] = "zyxel"; $_session[pass_login] = "12345"; ?> <html> <head> <link rel="stylesheet" href="themes/default/default.css" type="text...

0
Q: Best php framework to create an online ad system?

Mohamed SaleemCan anyone tell me about some frameworks which are best for creating online Advertisement System in php? Is it possible to create it in Cakephp or Codeigniter

0
Q: Convert sql to Zend_Table

UffoHow can I convert this: SELECT latitude, longitude, SQRT( POW(69.1 * (latitude - [startlat]), 2) + POW(69.1 * ([startlng] - longitude) * COS(latitude / 57.3), 2)) AS distance FROM TableName HAVING distance < 25 ORDER BY distance; to Zend_Table $this->select()->from(array('c' => 'conte...

0
Q: echoing php array returns no result

GustavoxDSo, guys, my problem is that i'm creating an array from a mysql column, but, when i echo the array items, it returns me nothing, i'm about this for a while and i'm not seeing a possible error, hope can get some help. Here' s my code: (I know about the mysql to mysqli, but i'm just beginning and t...

0
Q: Symfony Assetic - part_1 in url

methodinOkay so I've been searching all over for some input into this but haven't found anything to help directly (only mentions of this problem in relation to something else). Basically I'm having problems with the path assetic generates when looking for an assetic file versus what is actually generate...

0
Q: PHP json_encode JSON_PRETTY_PRINT: how to print a different format?

lauthiamkokI know that PHP provide the JSON_PRETTY_PRINT to format a json data already. What if I want a different format? $message = array( "Open all day" => "Sundays,Saturdays,12-12-2013, 14-10-2013", "Availabilty" => array( "12/12/2013" => array( 30, 60, ...

0
Q: Smarty {nocache} not working

CiroI use Smarty for a lot of projects, including Content Sites. In particular module, I have a template for comments, that I load via DB with Smarty Caching. And the Form of new comment, I use {nocache} to show the user logged (session). This section, using nocache, not works! This still cached to...

0
Q: Best way to make if statements

PackyBasically I am getting values from checkboxes (i.e. how many check boxes checked in a form). What I need to happen is echo a price for a certain number values. Here is what I was thinking but not sure if its the correct way to do it: $clubTotal = array( $driversChecked; ...

0
Q: multiple checkbox to variable

coco_nk4lhy, i want to ask about multiple Checkbox this my code <input type="checkbox" name="check_list[]" value="value 1 "> <input type="checkbox" name="check_list[]" value="value 2 "> <input type="checkbox" name="check_list[]" value="value 3 "> <input type="checkbox" name="check_list[]" value="value 4 "

0
Q: Calculations with PHP

KiranConsider the large calculation given below echo 999999*999999999; This returns 9.99998999E+14 Is there any way to get the the whole number 999998999000001 instead of the Exponent form? Please help . Thanks in advance.

0
Q: LOAD DATA INFILE Directory Structure

bmanhardI've been scouring the internet and attempting to troubleshoot this issue for hours and finally caved and decided to ask for help directly. I'm running a linux dedicated server and need to load data into my mysql database by running a mysql query executed from a php page on the host machine. Th...

0
Q: Sending email from a query on previous php page

Bill FlippenForgive me but I think I went in too deep for my skill level: database connection is set in the include: Here is the code: <html> <body> <?php include "inc.php"; //print_r ($_POST); //if "email" is filled out, send email if (isset($_POST['email'])) { //send email While($row=mysql_fetch_array...

0
Q: updating image in upload folder and image path in mysql

user2821383I am trying to update images in my upload folder and mysql database the file uploads giving the file name 0.jpg instead of the normal persons id 13.jpg and does not update in mysql database, here is my snippet below what am i doing wrong? $pic = mysql_real_escape_string(htmlspecialchars($_FILES[...

0
Q: How to cut uploaded audio without external programs

JeremehDWell for my computing coursework I am making a website that you can sell songs on. What I need to do is cut a song down to 30 seconds so I can make a sample. I am not bothered how its done as long as it is not an external program (since we're not allowed to use them we need to code it all) so I c...

0
Q: PHP APC Configuration shm_size

kevin olsI am about to use PHP APC for the first time but im not sure on the configuration settings. I am using a apache VPS server with 32GB ram 12-cores, Varnish, and storing static files on Amazon S3. And running on the server is my php/mysql application. But would setting apc.shm_size to 1024M be ...

0
Q: Limiting posix_mkfifo

user645402In PHP, there's a call: posix_mkfifo() which basically makes a fifo. Is there a way to set a limit on this file/fifo? Otherwise, if no one is pulling data out, it can grow unbounded. Thanks in advance for any help.

0
Q: Will not return MYSQLI Results for username

Patrick KershnerI am trying to return a username when a user forgets their username. I have it validating again their email address but for some reason it just keeps saying 'Error: cannot find username'. I am using the correct mysqli syntax I hope. if(isset($_POST['user'])){ $email = mysqli_real_escape_str...

0
Q: Adding a loader to load a table with data jquery or ajax

DanielDakeHere is the description of my issue: I have a db connection here: $host = 'some host credentials'; $dbh = 'My database'; Here is my statement: $qry = "SELECT some_data FROM some_table LIMIT 1000"; $result = some code here; Here is my while loop: echo '<table class="table table-striped tab...

0
Q: How can i search in 1 dimension array specificall columns?

T2terBKKI have array like this. Can i search by number 21 - 25 and put these number in row 21 -25 to new array? How can i do that ? <? $arr = array_search(.....),arr); <---- ?> Thank for advanced and any answer.

0
Q: Unable to get number of likes on a page by facebook graph using access token

ArihantHow to get access token for a website, I need the code to make call to facebook server (graph) and get the nuumber of likes on that page and then feed the number of likes to the database. I am using the below code but it returns only the name and the id fields. I know i need the access token but ...

-1
Q: is it possible to open the html page pre-filled by loading it from a text file using php or javascript without database?

SachinI have a html form layout, and i want it to be pre-filled with exact inputs when i load the page, and this data should come from a text file on my computer, and is this possible to achieve without using any database ? I know it is possible with a db, but is it still possible without db to match ...

-1
Q: Echo out the PHP Function Or Return?

user1313942I am not good with functions and classess in PHP. I am echo a function instead of return because it gives me desired results. But it also echo out the result value to my desired page. This function is in class. Just see the attach image and you will understand, what i want. Pic URL: ...

 
6:52 PM
0
Q: Composer vcs installs (git repo) wont commit to parent repo

Ben ConnitoWhen I install a dependency from BitBucket (git repo) via vcs in the repository config it clones the repo. Then when I commit my parent project it doesn't commit the files, just a link reference to the dependency repo. How do I a) commit these files in parent git repo. So that they show up in B...

0
Q: get php posted id on ajax

Dis HonestI added two buttons, 1 on html and one on php .... by getting second button with ajax.. but when i add event to the buttons the one on the html page works only ... need some help.... HTML <input type="button" value="button 1" class="btn"> <div id="div"><div> <script> $.ajax({ url:"btn2.php...

-1
Q: WordPress Facebook-Link-Preview

user2824575Trying to create a page that allows users to submit a link using the Faceboook-Like link preview by Leonardo Cardoso. Currently there are no plugins capable of this functionality. There was also this bootstrap link preview as well. I had a look at both of them but am not sure how I would include...

-1
Q: Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';'

user2824653im doing this project for my php class I have included the code. I cannot figure out what the syntax error is. I have changed things many times but nothing works. Can someone help me. thanks! <title>ordering form</title> </head> <body> <h1>Welcome <?php echo $_POST['firstname']; ?> </h1> <?...

0
Q: PHP search is showing entire db table when opening page

user2736333When I open my search page, (1) it immediately shows all results (every entry in my db.) (2) It also shows every entry in my db when search button is clicked with empty input. How do I resolve this? Any help would be much appreciated. <form action="search.php" method="get"> <input type="...

0
Q: if/else shorthand clarification

J. RobertsonI am sorry for the vague question title. I'm not sure what the actual name of this shorthand method is. If someone wants to help clarify how I should refer to this, I'll be glad to change the question title. In the following code snippet: $account = $value->uid ? user_load($value->uid) : ''; I...

 
7:04 PM
0
Q: PHP "or" syntax statement

some1Moving over to PHP from another language and still getting used to the syntax... What's the proper way to write this statement? The manual on logical operators leaves something to be desired.. if($var !== '5283180' or '1234567')

0
Q: Linux - 550 Access denied - Invalid HELO name(See RFC2821 4.1.1.1)

CamitalI am trying to send an email via Linux server but i never receive it. I'm currently using putty and I use # php -r 'mail("*****@gmail.com","Test subject", "Test Message","From: *****@gmail.com");' Then i go check my message with cat /var/spool/mail/ and i got this ----- The following add...

0
Q: Error In If Else That I cannot figure out

user2824700I have the following code so that before it writes the record to the database, it checks to see if there is a username that already exists..... $duplicate=mysql_query("SELECT username FROM user WHERE username='" . $username . "'"); if ($duplicate <> $username) { $insertquery = mysql_q...

0
Q: dropdown options is dependent from another dropdown options (all value from database)

user2805941how can i do this. if i select in first dropdown hand spa, hand massage should only appear in the second dropdown. i want the values in my second dropdown will depend on the first here is my current code: <body> <form method='index.php' action='post'> Category: <select id="id" name="cate...

0
Q: Mysqli Login problems

Red SparkleNewbie here. I'm having troubles with my code in php using mysqli. I have set the limits to 1 but when i tried to done some testings like placing an echo at mysqli_stmt_num_rows($stmt); to see if it really fetched something...but it came out 0 as a result. I really don't know what to do anymore. ...

0
Q: embedding phython script in php website

user2595441I am developing a php based web app but I have a phython script that I already had that I want to integrate into my system. Is it possible to embed/include the phython script within the main content area of my web app on a specific page?

0
Q: How to get path parts from Symfony2 path

BenjI'm a beginner with Symfony, and I'm trying to get all parts from an url formatted like this : ...pathToSite/Symfony/pathToBundleControllerAction/part1/part2/...../partN I would be able to get all part[1..N] individually, since the goal is to have pathes of unknown length to push some differen...

1
Q: Force Download Hangs system

user1987496When i try to force download mp3 file. my system hangs. The problem is when I click the download link, it works. But after few seconds, my whole computer freezes and I need to force a shutdown. What is the cause of this problem? Is it my computer fault ? I am using xampp Server. Is there php c...

0
Q: PHP - display POSTed image

Mark KennedyI'm sending a .jpeg to the below server using an HTML form How do I get PHP to successfully display the image once the server receives it? <?php if ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"]["error"] . "<br>"; } else ...

0
Q: htaccess strange behaviour on white space removal

Panagiotis George RaditsasHello In my project I have the following htaccess. Everything works ok for example I enter the following url domain.com/ test some test / test / which becomes domain.com/test+some+test/test as expected The strange thing for me at least is when I edit domain.com/test+some+test/test ...

0
Q: How to return the link from background url with simple dom html?

user1773070I am trying to get the link of a background div.mine{ background: url('www.something.com/something.jpg'); } I am using find('div.mine') $link = find('div.mine'); echo $link->background; This displays the image of the actual background. How do I get just the text?

0
Q: Adding plugin to hundred wordpress websites

MulticasterWe have 100 websites all have wordpress installed on them . I need to keep GUI and admin interface for all the same . I know I can use MU / MultiSite but I evaluated that option and I dont want to go that route . Is there any other way to add a plugin to all websites automatically ? Writing some ...

0
Q: Varnish: how to separately cache pages based on value of a specific cookie

MattI manage a site that has a single cookie, which we have to use, but will always be one of 9 values (including no value). I'd like to use varnish in front of our application servers, with varnish separately caching a version of each page based on the cookie value. So if we have page /page1, Varn...

0
Q: Error when CUploadedFile assign image property using extension mongodbsuite in Yii framework

Ali ZahediI'm using mongodb suite in yii framework, when assign CUploadedFile to public property image class model , get error : MongoException zero-length keys are not allowed, did you use $ with double quotes? /var/www/html/bablog/protected/extensions/YiiMongoDbSuite/EMongoDocument.php(611) model ...

0
Q: How can I update my PHP 5.3.3 to PHP 5.3.8 Linux Centos

Vergo Jeck DelimaI want to update my php 5.3.3 to php 5.3.8, I already downloaded PHP5.3.8.tar.gzip. My PHP 5.3.3 located in /usr/bin/php. When I try to install PHP5.3.8.tar.gzip and do this command: ./configure make make install It installed in different location /usr/local/bin/php. So now I have 2 php 5.3...

0
Q: PHP loop condition

user2738640Although following code is for WordPress, but my question is more about general PHP loop. I want to get posts of last 7 days. I want to get only last 7 days which have posts. If some day does not have any post, it should skip to next day. I am using following loop to get posts from last 7 days,...

-1
Q: how to sort multidimensional array in code igniter

sandyi have a array and i want to sort it according to created field, i tried to sort it by some code but i can't do this so please help me, for this i have some code my code is not working... , Array ( [0] => stdClass Object ( ...

0
Q: Mysql query for full text search with an OR condition

CHi RiLoI have a dropdown list where it contains only two options And and Or. These two options when selected will run a query however depending on the selection. When And is selected, a change in the query will be made. My query looks like this, $sql = "SELECT distinct n.node_id, n.path, ...

0
Q: database query retuyrns fields in one order, I want to display them in another

Scott_RobertsThis probably has been answered (or should be basic knowledge), so please forgive the noob question... I'm using the WP user_meta database to store advanced properties of a user. Data is stored in this order (this is all for userid=15): city = Altoona state = PA phone = 9999999999 name = Fred ...

-1
Q: Handle database exceptions with php

Alvaro ParraThis exception(error) is displayed when i try to delete a user. Error: the XML response that was returned from the server is invalid. Received: Cannot delete or update a parent row: a foreign key constraint fails (`db_almacen`.`perfil_solicitud_material`, CONSTRAINT `per...

0
Q: Can't run scripts after PJAX load

Ozan TuzelI'm using PJAX for a project. I have a container called #icerikAlani to load its content with PJAX. Here is the basic layout: <div class="container" id="icerikAlani" data-pjax-container> <!-- NIVO SLIDER --> <div class="row"> <div class="col-md-8"> <div id="slide...

-1
Q: How Make a login Page?

Màh Ðii make a register page but my problem is how to create how to create a login page ? this is my register page this is the form <form id="regForm" action="submit.php" method="post" accept-charset="utf-8"> <table> <tbody> <tr> <td><label for="fname">First Name:</label></td> <td><div cla...

0
Q: Wish to add a flash file and some php code woocommerce shop page

Sidharth BajajHow would i go about doing that ? I need the php code to get the page url and pass to the flash object. Which woocommerce php file do i need to edit ? I am trying to follow the code but it gets confusing, and i am not a very skilled php coder. http://www.wallartsy.com/shop/sailboat-nautical-na...

0
Q: Dynamic Dropdowns POST

Ahmed NassarI'm trying to post the values that I get from each dropdown menu, this is an n-level, however I'm going to use them maximum of 3. How can I post every value i get from each selection? <?php include('dbcon.php'); if($_REQUEST) { $id = $_REQUEST['parent_id']; $query = "select * fro...

-1
Q: PHP undefined index error in id_cust

ayeen$id_cust = $_POST['id_cust']; $username = $_POST['username']; $sql = ("UPDATE customer SET username = '$username' WHERE id_cust = '$id_cust'") ; the error is undefined index in id_cust.... what the problem with this coding actually... all of the query is correct. anyone can help me..

0
Q: How to detect which type of chinese encoding has text file?

thelolcaton http://www.gnu.org/software/libiconv/ there are like 20 types of encoding for Chinese: Chinese EUC-CN, HZ, GBK, CP936, GB18030, EUC-TW, BIG5, CP950, BIG5-HKSCS, BIG5-HKSCS:2004, BIG5-HKSCS:2001, BIG5-HKSCS:1999, ISO-2022-CN, ISO-2022-CN-EXT So I have a text file that is not UTF-8. It...

posted on September 27, 2013 by Ģ½Valdeir Vieira

Tenho um site e estou trabalhando ele para ter um bom rank, mais eu estou querendo aprender mais sobre o assunto. Nunca em minha vida imaginei estar fazendo esse tipo de trabalho. Por tanto, fico muito grato a todos que puder me ajudar! Valdeir Vieira - Consultor Imobiliária

0
Q: CASE on a lot of queries

denlauI have a lot of queries, which I only want to perform if the parent_id / placement in a nested set has changed. My queries are: SELECT @NodeID := c.CategoryID, @nodeRgt := c.Rgt, @nodeLft := c.Lft, @Width := c.Rgt - c.Lft + 1 FROM ".DB_PREFIX."ss_C_Categories c WHERE c.Category...

0
Q: Send User Copy to his Email #Contact Form #PHP Script

BlackCoderthis is related to contact form. i am trying to send a copy of email to user also. so i thought to replace the same function so i repeated if(!isset($hasError)) second time and changing $emailTo = $email and this is not working. i thing the problem might with the headers... can i write 2 differ...

0
Q: PHP - uploaded image not displaying properly

Mark KennedyI'm uploading a photo to my PHP server using this HTML form: <html> <body> <form action="photoServer.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file" id="file"><br> <input type="submit" name="submit" value="Submit"> </form> </...

-1
Q: Getting DNS address of IPV4 address using PHP

Muhammad DanishI want to access the DNS address of of a IPV4 address. I have set the manual address in connection settings. I want to get the set DNS address using PHP.

0
Q: EasyPHP 13.1 VC11 - Errors after deleting "ibdata1" file to fix MySQL

user2824889Using EasyPHP, I had this error, which I resolved by moving the ibdata1 file in binaries/mysql/data to a backup folder. However, I had a new error come up with an existing website: "PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'formulasite.semaphore' doesn't exis...

0
Q: Scheduling php task on shared server

user2824519I am looking to schedule a task which would be executed at date/time provided by end user. The date/time would be selected through date picker and stored in database using php file. This php file could also do whatever is required to schedule the job. The file to be executed is also residing on t...

0
Q: PHP Variables in SQL Statement not working

CarpetfizzI'm trying to create a SQL query with a PHP variable, which is a username. For some reason, nothing happens when it is executed. Any help would be much appreciated! mysqli_query($dbcon, "ALTER TABLE ipList"); mysqli_query($dbcon, "ADD ".$userName." VARCHAR(30)"); Thanks! ~Carpetfizz

0
Q: php bbcode preg match all

tolias63I am trying to write a function which will be checked the open bbcode tags and the close bbcode tags. Here is what I have write so far: public function CheckBBCodes($argText) { $openQuoteTagCounter = preg_match_all('[quote]', $argText, $openQuoteTagCounter); $closeQuoteTagCounter =...

-8
Q: Problems installing phpFreeChat on my site

Zul-Qarnain A. RonsingI wnt 2 dploy phpFreeChat on my site but al i c in my brwsr s ā€œChat loading...Please waitā€ an derā€™s nthing hapen. I'm using enable_query_strings=TRUE. Original code: <?php require_once dirname(__FILE__)."/../src/phpfreechat.class.php"; $params["serverid"] = md5(__FILE__); // calculate a uni...

-1
Q: Echo array index with comparative operators - PHP

tripleddevGiven an array such as... $array = array(); $array[0] = "blue" or "red" or "green" or "brown"; How would I use this to evaluate an if statement and echo it? for instance... If ($ans1 = $array[0]) { echo "correct answer $array[0]"; // this should display "blue or red ...

0
Q: How to use AJAX to request data from your SYL database

James A. Crone Jr.I'm not 100% sure if I titled this right. But my problem as far as I know is in my AJAX that I will be posting below. First let me explain what I am trying to do. Firstly a user will go to exploretest2.php Once they are at this location a little game map will show with your avatar at your current...

 
8:46 PM
0
Q: How to find value of checkboxes in PHP?

bklynMI followed the suggestion in this post: How to read if a checkbox is checked in PHP? I am trying to get values of checkboxes in form. I have tried separating the conditionals and using them together like this, checking isset and trying to get value. Either way it always returns false. What am I ...

-1
Q: How to transfer/create a site login form?

user2824963I am doing a redesign for someone, but I am having trouble transferring a specific log-in form to the new design. I plan on deleting most of the files from the old designer and uploading the ones I have created, however, I would like to keep the log-in form. My knowledge of PHP is limited. Here ...

0
Q: How to remove special charachters and keep letters of any language in PHP?

medo ampirI know this should remove any characters from string and keep only numbers and ENGLISH letters. $txtafter = preg_replace("/[^a-zA-Z 0-9]+/","",$txtbefore); but I wish to remove any special characters and keep any letter of any language like Arabic or Japanese.

 
8:59 PM
0
Q: Website to pull in external thumbnails from Wordpress

o7th Web DesignI have a website in it I have a module that pulls in a "portfolio" from a Wordpress blog. The "portfolio" creates "articles" that wordpress labels as "portfolio" (obviously), and I am able to upload multiple images to each "item". On uploading I noticed that Wordpress is automagically creating ...

0
Q: How can I make all paths relative to document root?

bikey77My project dir structure is /admin L index.php /includes L scripts.php L common.php /css /js index.php header.php footer.php ... In index.php I include /includes/scripts.php which contains references to various css files in /css dir like such: <link rel="stylesheet" type="text/css...

0
Q: server not giving any response for curl code

Cheerful Chanpreeti am new to curl and making a program which will search using yahoo search engine here is my code:- <?php $handle=curl_init(); curl_setopt($handle,CURLOPT_URL,"http://search.yahooapis.com/ImageSearchServ/V1/imageSearch"); curl_setopt($handle,CURLOPT_POST,true); //...

0
Q: Asking about how to notify order from customer?

ayeenI am doing shopping cart app, i want to know how to notify order customer from order table?? anyone can explain with me. I do my reseach before where using server script side and client script side, anyone can explain with me.

0
Q: How to put data to array and search by specifically row?

T2terBKKI query from mytable like this. I want to put it in array(PHP) and search like this $index = 15; $result = array_search(...)..); <--- age_range and put that row ($result) to new array i created; Or somebody hav better idea. Sorry some stupid question. Thank for help.

0
Q: Escape colon in url string

Wonder BredI have a string: $fonts = Arial:400; When I use that in a URL, the colon prints as %3A. How can I escape the colon so that it prints as :? I have tried preg_replace and url_encode with no luck. I'm sure its simple but I have searched.

0
Q: PHP - Diffrence between new Object vs new \Object?

MarcEverything is in the title. When I create my object with new Object I have an error saying that my Class is not found. But when I do new \Object everything is working like a charm. Hope someone can help me understand. Thank you in advance.

-3
Q: Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\schedule2\course.php on line 44

Ryan Delantari need some help here i dont know why it keeps tell mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\schedule2\course.php on line 44 if(isset ($_POST['course']) && isset($_POST['coursedesc'])) { $course = $_POST['course']; ...

-1
Q: How to make checks here for the rest of the code?

nRovAs you can see on the code below the first check if there are any characters from ACCOUNT_CHAR has db_error and etc to make sure its secure but others doesnt. How to add checks for them too like dbError one and dont change the code a lot ? If someone can do it and show me will be really appreciat...

-3
Q: Starting up with Google doc

user2824984I want to create a word doc from a template stored in the Gdrive and felt with data from a sql base. This done, i want to save the final word doc on my personal server or a other G-Drive. I can't catch how to proceed either with php (DrEdit) or ajax scripts. I'm looking for a simple working sam...

1
Q: Increase search relevance based on star-rating

George MarquesI'm building an application in PHP with MySQL where users can post articles and they also can rate those with a 5-star system. I've been thinking that I should move the high-rated a little bit to the top when the user perform a text search, so better articles will be easily found. I'm using the ...

0
Q: Call web service from PHP

user2824187I have generated the proxy classes using wsdl2php generator. Not sure how to use them from php client to call the service. Any small example would be a great help.

0
Q: Trouble parsing XML response from curl_exec

EvsterI am submitting the contents of an HTML form to a 3rd-party service using cURL, and it shoots me back an XML response. But no matter what I'm doing I can't seem to parse that XML response to customize the display of the results. Here is the code for processing the form (note a few ID numbers hav...

0
Q: Display selected option from select drop down

TheGamingArtI have a situation in which a user is presented with a drop down list on a php page. When the user selects an option from the dropdown list, something (a function?) needs to be called that will take the selected value from the selected option and display another drop down menu per the user's choi...

0
Q: php - X-Editable-Bootstrap not updating DB

Chong GuanI am using X-Editable-Bootstrap to do some inline editing. Everything works but it's not updating the DB so I am wondering if I am doing something wrong. Here's my post.php require_once("config.php"); $pk = $_POST['pk']; $name = $_POST['name']; $value = $_POST['value']; if(!emp...

-1
Q: Duplicate emails, no message content, javascript pop box, php and javascript

Juliana WildeTrying a different method. Problems. Sends Duplicate emails. Content put into the message field. When received in inbox. No Message content exists. Pops up twice the javascript box. Once in the beginning, and during submit. This is live server active atm. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML...

0
Q: How can I call a php variable in a javascript function?

Gnp Patpls can some one tell me how i can pass a a php variable into a javascript function? here is a sample of what i have so far. <script> function initialize() { var slon1 = '<?php echo (json_encode($siteLon1)); ?>'; self.alert(slon1); } </script> <?php $siteLon1 = 33.097684; > the co...

-3
Q: How to add json data to mysql with php with cUrl or file_get_content?

CrisyExample Json URL $url = "somewebsites.com/json.php?id=abc"; Example json data returns { "disclaimer": "here comes disclaimer text ", "license": "Licence details", "timestamp": 1380312059, "base": "USD", "rates": { "AED": 3.672992, "AFN": 56.700925, "ALL": 104.5311...

0
Q: PHP/javascript script stops working when I include a php script

jdiasNew to javascript. I have been learning a lot over the past few days. I have a script that loads a calendar. The calendar layout is built in php. I have the following code: jQuery.get(PLUGIN_DIR+'/bookings/reservation.php', function(data) { jQuery('#content_div').html(data); }); Reservati...

0
Q: what do I need to do to install XDEBUG in this situation - php version mismatch in phpinfo and php-config --version among other things

zorancI am trying to install XDEBUG on debian localhost( I have done this a few of times and it went a lot smoother in the past, as I remember it) I narrowed down the issue by checking the error_log output and there are two things going awry here the error being reported is: Xdebug requires Zend Eng...

0
Q: Memory Exhausted due to PHP loop through query data

zenI have some code that loops through the data received from DB, but the problem is that memory is exhausted. My memory limit is set at 128 MB. The total rows returned for my test are about 200k. So I don't know if it's just too much data or if there's a way to buffer the table and not store the w...

-6
Q: Does anyone has a php script to update a profile picture

user2821383I have been working my ass out to make sure my update script works but to no avail, does anyone has a sample script that can update a profile picture and save file to uploads and also update the picture path in mysql

0
Q: PHP symlink into subdirectory

PurpleFoxyI'm trying to create a symlink with PHP specifying the original path and the link path. symlink("tx/file.jpg","tx/link.jpg"); And it doesn't work, it doesn't give me errors neither in the logs, it just doesn't create the symlink. I've even tried using: symlink(getcwd() . "/tx/file.jpg", getc...

0
Q: Laravel 4 - File Upload

George RiveraI have a Form where among other info, a user would upload an image. I want to store the path to the image on the database and save the image to the public/img/ folder on the Server. The form was opened using: {{ Form::open(['route'=>'pizzas.store', 'files'=>true]) }}so that it would be able to P...

0
Q: WordPress Plugin with Widget in a single package

kyenoI am trying to build a WordPress Plugin and Widget, and I would like them to be in the same physical package. The Widget should remain as typical WordPress widget that can be dragged-and-dropped into widget enabled areas (already done and working), and the Plugin should enable certain submenu in ...

0
Q: htaccess redirect to https all pages except one

kromolI'm using Yii framework. I want to redirect all pages on the site from HTTP to HTTPS except this one domain.com/clip/create. Following code redirects all pages to HTTPS: RewriteEngine on RewriteCond %{HTTPS} !^on$ RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R,L] RewriteCond %{REQUEST_FILENAME}...

0
Q: Getting a shared parameter in a JOIN query

AdelphiaUsing PHP, I the following query: "SELECT * FROM `items` JOIN `categories` ON `items`.`category`=`categories`.`cat3` WHERE `items`.`user_id` = '".$UID."'" I'm trying to access the items.id field from the associative array. Problem is, $res['id'] seems to be giving me the i...

0
Q: jquery- phalcon submit button click

NedimoI am warking in phalcon framework. I have a Tag::SubmitButton in my view, and i want to create a jquery on click function, for example when user click on submit button to show simple alert message, but i don't succeed. When i click on my submit button, nothing happens. Here is my view code. <s...

0
Q: PHP PayFlow Pro - User Authentication Failed

n1tr0I've tried every API out there for PHP, even including the sample that paypal provided here: https://ppmts.custhelp.com/app/answers/detail/a_id/618 The problem is that I set user, vendor, partner, password as described. User is under merchants manage users(I've tried both users), vendor is my me...

0
Q: PHP - write to server folder denied

Mark KennedyI have done chmod -r 777 on the root folder, but I'm still unable to successfully upload (thus, write) to the uploaded folder! Do I also have to change the php.ini file? //$target_path = "http://localhost/photoServerProject/uploaded"; $target_path = "/photoServerProject/uploaded"; $fname = $_...

0
Q: using a php variable in a JS funcion

Gnp Pati previously asked this question but the example i provided did not provide my real problem. I want to get the input from a form using a php variable and use it in a javascript function. I do not use javascript directly because the content of the variable in question is obtained from a mysql da...

0
Q: Workflow/Structure for an export project

Yasen SlavovI am pretty new with PHP/MySQL and am still looking for best practices for planning projects etc. In other words looking to learn things THE RIGHT WAY (I can code stuff that work just fine, but they are messy, not structured). So my question is: How would you approach a project for an export fun...

-1
Q: Renaming Docusign Certificate of Completion

duckie715So I don't have much hope for this, but here it goes. Is there any way to rename the Certificate of Completion to where it does not have the envelope id appended to the end of the name? I ask because as our listener pulls the XML file, parses it and writes the PDFs to separate files, I'm having ...

-1
Q: Display running balance field based on my credit and debit values

TejaMy database is constructed in the following manner. Pk unique_id credits debits 1 U1 100 2 u1 50 3 u2 150 100 I want to show balance field on my web page dynamically but the problem is for a single field i am able to calculate the balanc...

-4
Q: profile picture not updating

user2821383I need help making this script work but all to no avail, its not updating in sql but it uploads to upload directory giving the name 0.jpg instead od the staff_id appended to the beging like 7.jpg, please i need the script to be corrected or reworked `<?php` ` $allowed_filetypes = array('.jpg...

0
Q: PHP Guzzle - redeclare issue

MKN Web SolutionsI'm using AWS .phar SDK to putObjects to S3. I'm using the same code on 3 other applications, but for some reason the latest one seems to fail. Fatal error: Cannot redeclare class Guzzle\Service\Description\ServiceDescriptionInterface in phar The above error makes no sense as: the "aws.phar" ...

0
Q: Representing a set of conditional questinaires in PHP/MySQL

user1416564I'm trying to do a webapp that will ask an end user a series of questions. Based on this, they will get another series/set of questions branching out into a tree. So for example. The user is asked 2 questions: Q1: How old are you? a)0 - 18 b)18-35 c)35-55 d) 55+ Q2: Do you smoke? ...

-1
Q: Not set when I first open page

joebegborg07I'm still new and trying to learn php. I have a form and everytime I run it I get an error displaying that the variable were not set when they should be. I'm definately missing something. Kindly explain what why is the variable $_POST['login_button'] not set the first time i run the page? Code c...

0
Q: Duplicate entries in MySQL after performing a check (PHP)

user2825016Lately, I have been getting some strange duplicate entries in my MySQL database. Entries in this table are inserted during a PUT request to a PHP page. The table contains 3 fields with no external references: manga_id (primary key; auto increment) - bigint(20); name - varchar(255); manga_cid - ...

 
10:29 PM
0
Q: Custom post meta in widget not showing

user2825143I am making a custom post widget thats linkt to custom post type reviews with information as boxart, dev, publicer but it won't show. Can someone tell me whate i do wrong? Its looking like the request is not possible in widget in the singel.php is it working but not in the other widget file. <?...

0
Q: <b>Warning</b>: preg_replace(): Unknown modifier 'g'

Foo LingI got an error by this regex.. $strTmp = preg_replace('~(<\/CharacterStyleRange>(.*?)\n*</CharacterStyleRange>)~gim ' , "</CharacterStyleRange>", $strTmp); error <b>Warning</b>: preg_replace(): Unknown modifier 'g' in <b>.... why?

-5
Q: What is a better way in php for variables

Federico PiraguaThis: $var = true if(1 > 0){ $var = false } or this: if(1 > 0){ $var = false } else { $var = true }

0
Q: How to print elements and values from two related associative arrays in PHP

devlin carnateI have two associative arrays. $dpt_total is a list of departments, and the total for those departments. $cl_subtotal is a multidimensional array of department, class and subtotal. I want to display the department and total, then the classes associated with that department and the subtotal for...

 
10:53 PM
0
Q: ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

user2824287why i'm always getting an error like this when I'm trying to INNER JOIN tbl_interview_schedule to tbl_reservation_info_id? SELECT CI., HM., TP., RI., IS.* FROM tbl_client_info AS CI INNER JOIN tbl_reservation_info AS RI ON RI.client_info_id = CI.client_info_id INNER JOIN tbl_house_model AS HM ...

0
Q: jQuery $.post() to a specific PHP function?

John SmithIf I have the below function inside of a class how can I post that specific function to get the data and display it in a div? public function getComments() { $Comments = $Db->query("SELECT * FROM `comments`")->fetch(); return $Comments; } What would the contents of the $.post() func...

0
Q: ZF2 Rest Exception handling

pavkatarI'm writing rest service in zend framework 2. My controllers extends AbstractRestfulController and everything works perfect, but have problem with error processing (exceptions). First, here is the problem: I need to stop the code in the middle if, something is wrong (for example, user is not ...

-1
Q: How does exchange message recall actually work?

GeoffI'm developing a webapp the intended users of which would like to be able to recall emails that they send through the app if they later change their mind. Ideally I'd like to be able to use our existing Exchange accounts so that the mail shows up in all the appropriate places, but I could also ju...

0
Q: Prevent "You didn't submit a keyword" from prompting when search page opens? Also, injection protection

user2736333Everytime I open/refresh the page it prints the "You didn't submit.." error. How can I prevent this and protect from mysql injection? This is my first real mysql db search that actually works so go easy on me please. I just want to make sure that if I put it up, it doesn't get raped. <form...

0
Q: Getting data from database into a php array

user2825210i've been having an error for about 2 days now i'd appreaciate if someone could help me. I want to make a query that selects all payments in a month and save them in an array, i wanna graph this so i also need the days where no payments were done. this is my code and i think my problem is when i...

 
11:23 PM
0
Q: How to store multiply check boxes in to database with PDO Connection

John SinigerI have the following problem which I can't resolve in which I've tried everything and nothing is working. The problem is that I want to store multiply checkboxes values into database, into one column one record inside it. Here is the Form code which I am using: <label for="newsletter1">PRIMARIA:<...

-1
Q: how to create url's as in google images

user635656I am creating a website similar to google images. When an image is clicked (expanded) in google images the url changes to that particular image of google images. So when i copy and paste that url in a new browser window the same image shows up expanded. Any idea how this is done?

0
Q: Where can in insert mysql_real_escape_string in here? And how to prevent html from being entered?

user2736333I have a php/mysql db search. When I search for html code, like /hr> tags it alters the page and creates /hr>'s. I'd like to also protect this from sql injection but I don't know how. Can I add the real escape string somewhere? or no? <form action='trytosearch.php' method='GET'> <center> <h1>M...

0
Q: Can I load a function from the came controller in Codeigniter?

Peter StuartI have this basic function a controller: public function index(){ if($this->input->ip_address() == XX.XX.XXX.XXX){ $this->status(1); } } protected function status($status_no){ echo $status_no; } But the status function does nothing. It doesn't even load. I can confirm my IP is cor...

0
Q: Weird response with foreach

Sagive SEOi am trying to concatenate values into a string which later is attached to a hidden input. This is the forach loop: <?php $langid = array(); $transLang = ''; foreach($translator['langs'] as $lang) { $curlang = $lang->term_id; $langid[] = $curlang; ...

0
Q: Define not working in Wordpress

Michael St ClairI have this code inside of my header <?php define('RELPATH','http://www.saint57records.com/'); include_once(RELPATH.'sidebar.php'); ?> and an example line of code in the sidebar <a href="/"><img style="margin:10px;" src="<?php print RELPATH;?>images/logo.png" width="60px"/></a> b...

0
Q: Get value form SimpleXMLIterator if has no children

eomeroffPlease check this code, taken from here <?php $xml = <<<XML <books> <book> <title>PHP Basics</title> <author>Jim Smith</author> </book> <book>XML basics</book> </books> XML; $xmlIterator = new SimpleXMLIterator($xml); ...

-1
Q: Assigning entire html code to single string variable php

user2803648I had found that there was a way to assign an entire page of html code to a single variable in php such that when you call the php file, the html page runs, but if you call the variable, the entire html page can be called. Here's an example of the code. I'll withhold the actual HTML code as th...

0
Q: Can't change permissions for header.php

DylanHere is my official WordPress forum support plea: http://wordpress.org/support/topic/headerphp-is-not-updating?replies=4 I changed all the permissions via FTP, currently set to 777. Originally 666, but that didn't work, so here we are. I cleared all of my browser caches. I added: define('DISA...

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

« first day (220 days earlier)      last day (90 days later) »