« first day (217 days earlier)      last day (93 days later) » 
00:00 - 13:0013:00 - 00:00

12:02 AM
0
Q: PHP Codeigniter: Passing dynamic form data to a view without having to refetch from the database upon validation errors

Savvas NicholasI am making a basic signup page using PHP Codeigniter. On the signup page, I ask the user to select from a selection of categories (via a <select> html element). These categories are stored in a list in my MySQL Database. My current method is to fetch this list from the DB when the user calls t...

 
ping
 
0
Q: How to add the $i from the for loop to the end of a url?

KaoukkosI am using a for loop to get the contects of a url that has paging in the form of pg=1 However I tried this without luck $html= file_get_contents("http://www.........&pg='.$i.'");

0
Q: Write a Model Class in CodeIgniter with ORM style

Wind DwellerI thought about using an actual ORM like Doctrine, then I figured its download link was even broken...and all tutorials online dated back to 2011. Also I'll have to write yaml files. Then I start off by trying to write my own model class in ORM style. I just fill it up with fields and save it t...

0
Q: php Jquery form generated from a foreach

nikzI have a foreach that generate data from an sql select. When user click on the div a text message appears "points ganed" and the data inside the form will be submitted. The entire script works but it always submit the last form on 4 generated... he doesnt target the right form. There's a way to...

1
Q: Send a form without showing results

hugerthI'm doing my first javascript game and I nearly finished it, but the last thing I'd like to add is scoreboard. I've already set a simple database table ([id][author][time]), connection through PDO works perfect, etc.. My game contains a div, where at the end of level jQuery set user's time. This...

0
Q: how to read the input values from a dynamic html table?

Sachini have the following code to read the values from a regular input, HTML: <tr> <th>Email:</th> <td><input id="email" name="email" onchange="EmailValidate()" maxlength="50"></td> </tr> PHP: file_put_contents($file, "\nEMAIL:", FILE_APPEND | LOCK_EX); $ret = file_put...

0
Q: How to select fields using doctrine 2 query builder

Mr.StudentI have the following query I'm executing in Symfony2 Repository. The query looks like $q = $this ->createQueryBuilder('m') ->select(array('m.reciever','m.created','m.id','m.subject')) ->where('m.reciever = ?1') ...

0
Q: Php default timezone in sql query

charlieI have this php to set the default timezone on my website: <?php date_default_timezone_set('Europe/London'); ?> It works fine if I use <?php echo date("Y-m-d"); ?> etc... But I am running sql queries that say: SELECT * from billing_pdf_archive where datetime < DATE(NOW() - INTERVAL 14 DAY) ...

0
Q: PHP time() and end of DST issue - 1 hour after end of DST

user2719933I have defined this code as such(simplified version for clarity) : $fifteenMinsLater = strtotime('+900 second', time()); $now = time(); if ( $now > $fifteenMinsLater ) { mtrace("This should NEVER happen"); } else { mtrace("This should always be the case"); } On 11/03/2013 2:00...

0
Q: How to make sum on parent level with nested sets

denlauI've tried to write some MySQL queries about nested sets. This tutorial is my knowledge base, and I've made the select of a list of advertisement regarding to the nested list of categories work: http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/ Now my problem is, that I have ...

0
Q: PhP MySQL query script syntax error?

Lalien-Miles Lamar Coleman<?php require 'soloconfig.php'; require 'connection.php'; $query_text = $_REQUEST['query']; $result = mysql_query($query_text); if (!$result) { die("<p>Error in executing the SQL query " . $query_text . ": " . mysql_error() . "</p>"); } echo "<p>Results from your query:</p>...

0
Q: One row of the for loop being inserted

Jess McKenzieI have the following for loop that gives me: Cat: 1, Sort: 20 Cat: 2, Sort: 13 Do I need to do a count onto the $cat and $sort in my data I am pushing into my query? as I am only getting the second row in my database instead of both values: For Loop: for($i = 0; $i < count($categories)...

0
Q: PHP API call returns "Sorry, that page does not exist"

user2785588Working with twitter API 1.1, trying to send a retweet. It worked this afternoon, then this evening it started returning an error no matter what $postID value is. <?php date_default_timezone_set('America/New_York'); // Include twitteroauth require_once('twitteroauth.php'); // Set keys $cons...

0
Q: WordPress Custom Taxonomies WP_Query

Edward TomlinI'm trying to create a query where I create multiple categories (taxonomies) in a custom post type, and then on the homepage query based on specific which is working fine. Currently I have 3 taxonomies: current-specials meineke-difference featured I have already written code that pulls these....

0
Q: Browse and Select File in PHP form element

Johny BravoPlease be kind, I know you guys are very intelligent. But not all of them in this world are, and i assume, some of you might not were initially. I don't have college, and i am self learner. So please kind with my question and kindly help me out to solve this. I have below form :- File 1 :- weal...

0
Q: How to set a background color in Geany for PHP scope different from the HTML scope?

axelbrzWhich is the easiest way to set a background color for PHP code in Geany 0.21 (Ubuntu 12.04) different from the background color of the HTML scope? The default background color for all the code is white. I would want to have a light gray background color for PHP scope only. Thanks.

-3
Q: Parse error: syntax error, unexpected end of file in PHP

user2809160I'm not sure why I'm getting a parse error. I'm trying to write a webpage that will conduct error handling but when I write separate the page into strings it runs into a parse error at the end of the file. I can't figure out why. What am I doing wrong here?

0
Q: Disable Error Notices when set_error_handler() Set

dpDesignzI have a custom set_error_handler() set and I'm using mPDF which keeps giving me errors. My Custom Error Handler: function error_handler($number, $message, $file, $line, $vars) { $email = " <p>An error (".$number.") occurred on line <strong>".$line."</strong> and in the <strong>file...

0
Q: HTML Regex to Extract Data

a432511I have a simple question for regex gurus. And yes... I did try several different variations of the regex before posting here. Forgive my regex ignorance. This is targeting PHP. I have the following HTML: <div> <h4> <a href="somelink.html">some text blah</a> </h4> I need this...

 
12:56 AM
0
Q: What paypal service should I use so that the user pays one time for lifetime access to my website?

Nick ManningI am just going to have the user register, then pay $10, then they have access to my website for life. I don't want to waste time reading through all of the paypal options, choose the wrong one, find out they require a shipping address and waste a week looking for a workaround, etc. Someone wit...

0
Q: Symfony 2.3 validation - getting an error regarding NotBlank

KevinM1I'm creating simple blog in Symfony 2. With my BlogEntry model, I have the following property: use Symfony\Component\Validator\Constraints as Assert; // ... /** * @ORM\Column(name="text", type="text") * @Assert\NotBlank("You cannot save an empty or blank blog post") */ private $text; Yet...

0
Q: Output wideimage to page

BurrowsI'm trying to use the WideImage plugin and loading an image into it, resizing it, and then outputting it in the following form: <img class="image" src="image.jpg" /> I have this so far. How can I output the resized image so that it's in the form above? <?php $image = WideImage::load('image....

0
Q: Magento: Exception.log invalid block type

user2580600Help! The following is being repeated over in over in my exception.log and i have no idea how to fix it. 2013-09-22T20:08:05+00:00 ERR (3): exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Enterprise_Cms_Block_Hierarchy_Head' in /chroot/home/artevolu/artevolution.com/...

0
Q: How to inject controller into EventDispatcher in Symfony2

CaptainStiggzI want to do some post-processing after sending a response object in my Symfony controller. Problem is, the post-processing requires other methods contained in my controller object. I'd like to do something like this: public function testAction() { $dispatcher = new EventDispatcher(); $d...

0
Q: Magento Inventry Update From Excel Takes Too Long

Sandeep Singhi have website more then 8k products i am using excel to update inventory. i am using magento 1.4 commercial version. in this when i try to update inventory with PHP script. it take too long time. Like about 30 min. for 20 products. i use everything like : set_time_limit(0) ini_set('memory_lim...

0
Q: foreach array displaying result

Jess McKenzieI have been looking at this code etc for so long that I am now confusing myself - not good I have foreach of foreach($sort_order as $sort) { echo '<pre>'; var_dump($sort['sorder']); echo '</pre>'; } That gives me a result of: string(2) "20" string(2) "10" How ...

0
Q: Google image search

CodeCrackGoogle changed their google image search to show full size images instead of linking to the hosted page. I noticed some sites have implemented a counter measure to swap the image with the one that says "Click for full resolution" when they detect hot linking from google. What's the best mechanism...

0
Q: Joomla 3 Invalid Token error

dooversEvery time I log into joomla admin I get the following error: The most recent request was denied because it contained an invalid security token. Please refresh the page and try again. And the only way I can get to admin section is to go back a page or 2 and I'm in. What could be causing ...

0
Q: PaaS that allows C++ code execution from PHP?

Jonathan WheelerI have a web app written in PHP that shell_exec()'s a backend written in C++. I'd like to move the web app to a PaaS provider. Does anybody know of a PaaS provider(s) that allows this? I'm having a difficult time finding this information. (Elaboration: The C++ backend runs in isolation. It does...

0
Q: PHP - best practice for displaying a select list

Steve CookeI am using the MVC concept (as per http://r.je/view-helpers.html) in my PHP project: Controller - processes user interaction; View - displays any data and or fields; Model - handles all business logic, including access to data access objects. A front controller is instantiating the MVC triads...

0
Q: Twitter feed asynchronously loading in new tweets

user2541153I'm wanting to create a webpage the lists all tweets from my twitter account. I would like this page to be able to check every say 1min for new tweets and add them to the page with out a browser refresh. From what I know I have to setup a twitter app and then use the Consumer key/Secret and acces...

0
Q: How to build json cross domain call php

renkui'm new in json cross domain. here is my problem. I want to call php with json cross domain, but still get error. example code to call: $(function() { var doc = urls; $( "#origin" ).autocomplete({ source: ''+doc+'book/server_book_from.php', select: fun...

0
Q: Simple PHP SQL login troubleshooting

user2785839I am trying to create a very basic PHP login by retrieving a registered username/password from a database. This is not ever going live and I am aware there is zero input validation. All I'm trying to do is select data from a database in a login. Here is the login form on index.html: <table ...

0
Q: opentbs and jQuery Mobile

mishxpieI'm making an web app that allow user to input form and generate word document. The form is relatively complex and I use a lot of jQuery and jQuery Mobile framework. I try to plugin the demo from opentbs ut it seems like it doesn't do anything when I have: <script src="http://c...

0
Q: CakePHP, a "settings" page that links to other models. Does it need to be a model itself? , MySQL issues as Result

brizzI am new to CakePHP. I want to have a 'settings' page that links to other models. i.e. "groups" and "accounts". I created a model/and controller for "Settings" as that is what I figured I had to do. Is this a correct assumption? Now in the 'settings' page, I want to display the MySQL count o...

0
Q: Cassandra vs mongoDB for social network system

phpuser12I currently work on social network system using PHP. I have some tables in MySQL that store data about content. and I'm thinking to build my social network system using NOSQL Database to store : user interest user follow user comment I know mogoDB well and I worked before on it, but I don’t ...

0
Q: Q&A Forum - Logic

Kevin HarrisonI'm not asking for help with coding I'm just asking for somebody to help me come up with an idea of how I would make it. Basically I want to make a basic Q&A forum, I guess you could say its like Stackoverflow, but not nearly as advanced its just something quick to add onto my website. I was th...

0
Q: simple d3.js relationship graph from mysql table

Áki BarkarsonI'm trying to use d3.js to graph relationships from a mysql table. Here is an example table to explain what i'm trying to achieve. +----+---------+-------+------+ | id | name | entry | type | +----+---------+-------+------+ | 1 | ObjectA | 100 | ID1 | | 2 | ObjectA | 101 | ID1 | | 3 ...

0
Q: Where do I start if I want a C# application to talk to a (PHP) script running on a (local, Apache) web server?

HamsterIn short, I just want to offload some heavy lifting from my PHP scripts to a (local) C# application. Where do I begin for this?

1
Q: php - why showing value of last item from array?

DannyOk, I have this code <?php //getting values $column1 = $params->get('param1',''); $column2 = $params->get('param2',''); $column3 = $params->get('param3',''); $column4 = $params->get('param4',''); $column5 = $params->get('param5',''); //setting array and filter the empty values $getvalues =...

0
Q: Assign Separate Port to One Controller in CodeIgniter

LyonI have this CI web application which serves both admin/client. The admin section is controlled by application/controllers/admin.php, while client section is controlled by application/controllers/client.php. I listened port 1234 in Apache server, so that this whole application can be accessed b...

0
Q: How to correctly document that a method parameter should be a class name that implements a certain interface?

dimadimaI'm using PHPDoc. I've got a method that accepts a string parameter. That string should be the name of a class that implements a certain interface, say, IMyInterface. Should I do: /** * @param string $class_name */ public function myMethod($class_name) {} or /** * @param IMyInterface $cl...

0
Q: Why my sql php logic return false output?

NbaerHello I have this code and I have a problem at function evalLoggedUser I think...as it is now the function shows me wrong output(returning false instead true) and when I change the if statement inside the function and do it like this: if($numrows == 0) { return true; } It work like as I wi...

0
Q: MYSQL in while array, print first result different from the others

jose sanchezI need the following, this is my function: function i_iframe($cadena){ $x=@mysql_query("SELECT * FROM videos WHERE id_peli = '$cadena' LIMIT 3"); while($i=mysql_fetch_array($x)){ $option = adios($i['idioma']); echo "<li>".$option."</li>"; } @mysql_free_result($x); } this code outputs: <li>opt...

0
Q: PHP. Autoloading. Cannot redeclare class

Виктор НовиковI try to make my own autoloader (spl), but i always get "Cannot redeclare class" error. So many times, i check my code, tried to find any declaration dublicate but i not found, First, i check my index.php file, there all simple: ini_set('display_errors', 1); error_reporting(E_ALL); include 'in...

0
Q: Render a graph with d3.js

Kanang KuanI have been looking for a technology to render a tree based on Json data. I found graphViz and d3. But d3 is taking more advantage on modern browsers. So, from an extracted Json data, I can render a graph bottom to top, but I want the links to be elbow-like. And I also want it not to be just a b...

0
Q: How To Insert Data From Web Service/xml/json Into Mysql Db Using Ar Model Class

Maxxi'm new to Yii, still learning and loving it a lot. So the thing is that i have to build a product retrieval system, which is based on Amazon web services. First i have created the necessary tables to hold the information about the products. Then i've created the model class using the awesome Gi...

0
Q: Doctrine nullable one-to-one relationship still wants to create unique index

MattI have a Person entity which has two relations (hometown and current) to Location table. Both of these fields can be null, otherwise they must exist in the Location table: class Person { ..... /** * @var Location * @ORM\OneToOne(targetEntity="Location") * @ORM\JoinColumn(name="hometown_id", ...

0
Q: after user has logged in, what's next?

Braden Jakoulovhow to load the html to be appeared after user has logged in? mysql_connect("localhost","root","") or die("Fail to connect to database"); mysql_select_db("db"); $q = mysql_query("SELECT username from users WHERE username = '$_POST[username]'"); $result = mysql_query($q); if(!empty($result)){...

0
Q: how to get the paypal adaptive payments IPN posts?

Wesly WaidSo I have my PHP IPN script working, now I am just not sure how to get the post values? Paypal returns the post as an array like this. transaction[0].is_primary_receiver=false &transaction[0].id_for_sender_txn=50E02759CC687801U &log_default_shipping_address_in_transaction=false &transaction[0].r...

0
Q: webform_set_breadcrumb | webform.module | Drupal 7

user2711365Like to change webform breadcrumb to show record title. THe default breadcrumb is "Home > Webform results >Submission #1" I want to show as "Home > Webform results > title_field" below is the original php code function webform_set_breadcrumb($node, $submission = NULL) { $breadcrumb = drupa...

0
Q: Is it possible to control which form a submit button calls?

ssturgesso I'm working on a site, I currently have: <form method =post action=process.php> <form method = get action = process3.php> <input type=submit value = add name = action/> </form> </form> is it possible to add a attribute to control which form this input calls? For reas...

0
Q: Retrieve Comments List from PDF via PHP?

user2349806Is there a way to obtain the Comments data in a PDF file via PHP? Perhaps generate a list of all the dates when the comments/highlights were made. Regards, Justin

0
Q: textarea name, id the same --

CFHcoderI have an unusual issue. If I use name="adBody" and id="adBody" for my textarea, it fails to appear. If I instead use id="adBoty" then my text area appears fine. Here's the code (by the way, $adText is set to ="" in the php at the top of this file): <textarea rows="7" cols="68" name="adBody" ...

0
Q: Creating an 'IF' statement for datatypes in PHP

Ali KazmiI'm kind of new to all of this and was hoping I could get some help. Some background that leads to my question is that I am building a small php interface that outputs a table. That table gets values from SQL Server. I have to display 4 tables. 3/4 table display successfully and dynamically (wher...

0
Q: cURL now requires CURLOPT_SSL_VERIFYPEER=FALSE

tim petersonI was using cURL on my localhost for the longest time and all the sudden I noticed it no longer works unless I explictly set the option, CURLOPT_SSL_VERIFYPEER=FALSE. I have no idea how/when this changed but I'm using NGINX and PHP and I can verify that this is not a specific issue to a specific...

0
Q: Add a class/id to a single.php wordpress pagination link

NickI have a piece of code to grab the query string and continue to carry it throughout the pagination of a single post. The problem is I can't find a way to select the pagination links correctly to apply this code to it. Here is the code for the query string: <script> $(document).ready(function()...

0
Q: SQL assume case sensitive despite ci collation?

riistaIn my users table, I have a row with username = Q. When I try to log-in as "q" instead, it states the user does not exist, however with "Q" it works as intended. Here's the login check code. $username = $_POST["name"]; $password = $_POST["pass"]; $pahash = crypt($password, $username); $logcheck ...

 
2:49 AM
0
Q: preg_replace: making regular expression

Rociio Lourdes RodriiguezI know there are a lot of questions with the same problem. I read them but I couldn't fix my code. <? $tabla = "<table> <tr> <td> <a class='texto'>$ 2,123.01</a> </td> <td> asddasdsad$,.$$$ </td> </tr> </table>"; echo preg_replace("<a class='texto'>\$ ([0-9]*),([0-9]*).([0-9]*)</a>", "<a class='...

0
Q: Notice: Undefined index: myfile

user2809327Iam trying to build an upload form and Iam getting notices ( ! ) Notice: Undefined index: myfile in C:\wamp32\www\game\upload.php on line 19 and the code I am using is: <?php include("config.php"); session_start(); $_SESSION['uname']="123"; $uname = $_SESSION['uname']; ...

0
Q: Send Smime attachment with htmlMimeMail5

user2216168I am using html Mime Mail5 class to send emails from my system and I want the attachment files to be send as encrypted in smime format. Is there any way I can send the email with attachment made in smime encrypted format through the htmlmimemail5 class. Thanks in advance

0
Q: SQL 2008 express and IIS 7 installed in a server and try to establish connection from website using PHP(another server)

Queenie LowMSSQL 2008 and IIS 7 is installed in a local server and I'm trying to establish a remote connection using PHP script via the website. All extensions needed in php are enabled and i can access to the MSSQL using RazorSQL from my Macbook (remotely). But i cant seem to get connected via the websi...

-1
Q: Retaining separate values

Jess McKenzieIf I have an output of string(2) "20" string(2) "10" What is the best way to retain the values so that I can echo them out in the specific string order: for($i = 0; $i < count($sort_order); $i++) { $sort = $sort_order[$i]['sorder']; }

 
3:18 AM
0
Q: What php code is required to send email from an iphone app?

user2495189I want to have my users populate a form in my iphone app and when they click send I want it sent to my email via my php client. My problem is that my php code will send an email with a subject line but it will not send the contents of the email (the body). Below is my xcode code. xcode: - (voi...

0
Q: How to convert from $this->text to $this->data in MediaWiki?

user530873I'm trying to compare the title of a page to a certain value in a skin for MediaWiki. The page title can be outputted using: <?php $this->text('title') ?> This works and will output the page title (in this case "Main Page"), however it will not allow me to compare the value to anything, for e...

0
Q: Sql query over SSH not working

user2800974I'm facing a problem which is driving me real crazy, i've been looking for a solution but my finite knowledge about php is not enough to solve it, so here we go, hope you can help me. I am generating a query via PHP which is the following one : CREATE USER 'wally'@'localhost' IDENTIFIED BY 'wal...

0
Q: setting my wordpress blog to display in an iframe only

user1106295im trying to have wordpress only display from a certain passed URL. (long story) e.g i put this in the head and it works...mostly <?php $access="1uiydkdh7754jhdj"; $access=$_GET['access']; if($access==0) { die('Im sorry you dont have permission to access this page, please login an...

0
Q: Need to modify PHP code for date countdown (want to show nothing when count reaches 0)

user2398188Need to modify PHP code for date countdown (want to show nothing when count reaches 0) I'm using the following code to show a text visual countdown to a specific date, broken down into months, weeks, days. Works great. However, when the countdown reaches the actual event date and then exceeds th...

0
Q: How to make a url parameter stick in php

wolvereneOkay php newbie here, please bear with me. I am not sure if this is a redundant question but here goes. I have a reference code i want to stick to my url. example: site.com/index.php?refcode=123. That's fine right? we can put anything on there. Naturally the visitor goes to the index page. But if...

0
Q: Resize and crop image, then echo it

BurrowsI need to add a way to resize and crop images of various sizes down to the same size (200x150). I then need to echo that resized image using an image tag: <img src="imagehere.jpg" /> How would I do this? I've tried looking into ImageMagick but I find it hard to understand.

0
Q: Rename a file if already exists - php upload system

Lior ElenbyI this PHP code: <?php // Check for errors if($_FILES['file_upload']['error'] > 0){ die('An error ocurred when uploading.'); } if(!getimagesize($_FILES['file_upload']['tmp_name'])){ die('Please ensure you are uploading an image.'); } // Check filesize if($_FILES['file_upload']['size'] >...

0
Q: How to parse the string to array

Jobin JoseI have following value in a table column is there any option to get the sandbox value and merchant_email like array ? I know using explode and loop is works but any other smart options ? something like $result->sandbox paypal_merchant_email="sample@ymail.com"|paypal_verified_only="0"|payment_...

0
Q: How to install Dbase in PHP 5.3.13

studentI have a problem regarding on the dbase extension in PHP 5.3.13 . My dbase_open can't recognize i think it's because of my extensions. i uncomment this following extensions but it doesn't work extension = dba.dll extension = dblib.dll Is there's anybody knows the solution for this. Th...

0
Q: wordpress curl to codeigniter site

user2809421I have a wordpress site that will login using a curl to another codeigniter website. After the login, the wordpress site should redirect to the dashboard of codeigniter site. I am not able to redirect the site. Please help me. Here is my code: $loginUrl = 'http://siteB.com/login/process'; $ch...

0
Q: Identical php files and Layout/SQL troubles

user2307958I have a very strange trouble with 2 identical php files on differnt folders: foldera/index.php folderb/index.php When I open file on browser, first index.php open correctly, second, appear with broken CSS (misaglined tables) I have checked out many times, files are identical, UTF-8 and saved...

0
Q: PHP Session isn't working on index.php in webroot

HayekSplosivesThis is kind of strange. I'm working with sessions. I have session_start(); at the beginning of all my first php blocks on each page. When I echo out a session variable on index.php in webroot (/var/html/www) it gives nothing. If I move index.php to /var/html/www/home or some other non-webroot...

0
Q: CodeIgniter Controller Folders

DJDarkViperCodeIgniters automatic routing is what I still want to use here, so I'd like to avoid using the router config if possible. When using Controller folders, like say "/controllers/admin/", what do I use to constitute the "index" of that folder? Like I just want the url to be /admin if I wasn't u...

0
Q: Run PHP script from URL, every time when the user refreshes the page

EdorasI need to run a PHP script from another site, without the use of CRON, so that will be called whenever anyone comes or refreshes the page. The script will perform some kind of update my database, it is possible that it takes several tens of seconds, so I needed to run the PHP script so that it a...

0
Q: In yii how to verify record integer exists in database

Michael SoI am creating a condition inside my controller, where I have to check in my databse if it already exists or not. I have 2 attributes('default','fk_user') inside my database which is an integer. What I want to do is if the checkbox is checked, check the database if it has records of employees and...

0
Q: PHP class variable failing to update via XMLHttpRequest

JaieI'm trying to get some code to work for a uni assignment, I am still learning but feel like I'm going a little crazy trying to understand why a class variable is not working. Using a PHP class such that class Users { //Variables protected $_userName; protected $_password; ...

0
Q: Android socket not recieving data from php server

user1722206i have a problem with android client receiving data from php server. Android can successfully writes data to php server and server accepts that data and then send back response to that client but android is not accepting. it does not move forward from Socket s = ss.accept(). Here is my android c...

0
Q: Show hidden div on form submit (javascript & PHP)

Kevin T.I'm trying to create a number guessing game: <?php $num = rand(1,1000); $guess = $_POST["guess"]; ?> <div class="intro">We've generated a random number between 1 and 100. Give us your best guess!</div> <form action="index.php" method="post"> <input type="text" name="guess"> <in...

0
Q: scripting $_POST variable on the fly

ddelnanoI have a registration form that allows a user to register as many people as they want. For example I don't know ahead of time if 1 person is registering or if 500 are. So on the server side if I have 3 people registering at once I need to access all the first names of a person by $_POST['first0...

0
Q: AJAX calls return results in a (seemingly) synchronous manner

KirkAll, Background of how problem was detected My question concerns the performance of a web app, mainly the index page. I noticed the problem when I was giving a demonstration at a local branch of my company that has slow internet (I don't know the exact speeds, or ping rate) judged by the fact t...

0
Q: How to get curl option with string

Lee LoftissI am working with PHP 5.3 and Curl. I want to make my curl calls more flexible so one function can handle all my calls. The problem I am having is with the curl option. It uses values like CURLOPT_POST to represent a LONG value. To make my function more flexible, I want to set these options wi...

-1
Q: PHP error syntax error, unexpected T_FUNCTION in

user2809489Hi all I believe my new host uses PHP 5.2 hence i am getting an issue in line 166 (2nd line below) can you Please help me out. syntax error, unexpected T_FUNCTION in /home/bsbpac/domains/bsbpacific.com/public_html/wp-content/themes/bsb-pacific/includes/CustomPostType.php on line 166 public fun...

0
Q: Type hinting in namespaced files

dimadimaSuppose I've got: <?php namespace My\Namespace; is function myfunction(My\SomethingElse $something) {} the same thing as function myfunction(\My\SomethingElse $something) {} or is it relative to the declared namespace, like function myfunction(My\Namespace\My\SomethingElse $something)...

0
Q: Createoperation concept not clear (RBAC)

Ajeet Manrali just read about creating operation for defining the authorization rules...there was a code in the book which is as follows # protected/controllers/SiteController.php::actionSetup() $auth = Yii::app()->authManager; $auth->createOperation('createPage',"create a new page"); $auth->createOperation...

0
Q: Wordpress text link when click returns "you do not have sufficient permissions to access this page."

Eli_junI am new with wordpress and I really appreciate this cms application. I have been working in creating my own plugin and I was stuck in this particular problem. I have created a text link that points to one my function I have created. But whenever I click this link "Add Category" it returns the "y...

0
Q: Mocking an interface implementation with PHPUnit

dimadimaI've got an interface I'd like to mock. I know I can mock an implementation of that interface, but is there a way to just mock the interface? <?php require __DIR__ . '/../vendor/autoload.php'; use My\Http\IClient as IHttpClient; // The interface use My\SomethingElse\Client as SomethingElseClie...

0
Q: Sending more than one array to ajax

itsover9000im trying to send more than one array to my jquery ajax the arrays were made like this var i = 0; var tname = []; var tid = []; var tprice = []; $(".party_list li").each(function() { tname[i] = $(this).data('catname'); tid[i] = $(this).data('catid'); tpr...

0
Q: cakephp upload plugin - define what directory to save files in

Paco CarI'm using cakephp-upload plugin of jose gonzalez to upload images to our app. By default, they're being saved in a directory like this: webroot/files/user/photo/{user_id} which is fine, except for when we want to display such images using $this->Html->image() which searches for images in the webr...

-2
Q: PHP Oracle How Can I Use LIMIT SYNTAX in Oracle

user2806837I have PHP + Oracle query like this : $query_pag_data = "SELECT P.FORM_NO, P.MODEL_NO, P.PRODUCTION_STATUS, P.REMARKS, P.DATE_ADDED, P.TIME, P.QTY_PLAN, M.MODEL_NO, M.MODEL_NAME FROM SEIAPPS_PRODUCTION_STATUS P, SEIAPPS_MODEL M WHERE P.MODEL_NO = M.MODEL_N...

-1
Q: Adding detailed input forms to quiz results with Javascript

user2756478I currently have an online quiz in the making. The current code works fine, but I would like to see who scored what. I am still extremely new to Javascript, and I have been building this quiz for a friend. I have learned quite a bit just getting this thing to work. Could someone please point me ...

 
4:41 AM
0
Q: Need to display a 12 hr clock

Mark LewisI have thoroughly searched and I cannot find a solution to what I am trying to do. The scheduling time is in 24hr format. the software requires this 24 hour format to schedule email campaigns. However I need the page to "show" a 12 hour format with AM/PM options. How would I do this? I found this...

-1
Q: how to remove folder name from url using htaccess

anytimeI want to change url From : http://domain.com/Portfolios/iPhone/app To : http://domain.com/iPhone/app and same for all like From : domain.com/Portfolios/iPad/app To : domain.com/iPad/app & From : domain.com/Portfolios/xyz/app To : domain.com/xyz/app I have tried a lot but nothing is wo...

0
Q: subval_sort() is out of order

user2073143I have generated an array from a MySQL query which I then re-order using subval_sort(). This works fine except where the letter "E" figures in the ordering. In those cases, the value with the "E" in it comes out first. I have four instances of this happening, but everywhere else (this a very larg...

0
Q: finding a pair between 0 and 35 difference in weight mysql php

Edmar CruzIs there a way that mysql can find difference between two numbers in weight Example: 1890 to paired by (1890 to 1925 or 1890 to 1855) with 0 minimum difference upto 35 maximum difference PHP code <?php $weight = 1890; $minWeight = $weight - 35; $maxWeight = $weight + 35; mysq...

0
Q: Assigning a variable a value from an recordset

user2809524I apologize but I'm very new to PHP and I am trying to create a very simple form that sends an email back to a user when they enter in their email address. I want the message to include some data from our database. I have been able to create a form that works perfectly as long as I enter in the...

0
Q: CodeIgniter - Optional parameters

Silvio DelgadoI'm building my first CodeIgniter application and I need to make URLs like follows: /{uf}/{city} Example: /rj/rio-de-janeiro This example should give me 2 parameters: $uf ('rj') and $city ('rio-de-janeiro') Another URL possible is: /{uf}/{page} Example: /rj/3 This example should give me 2 ...

0
Q: I would like to kno how to stop form submission when the validation fails?

ShashankIm new to php here's the my code. when any of the field is empty i want to stop form submission... <!DOCTYPE HTML> <html> <head> <style> .error {color: #FF0000;} </style> </head> <body> <?php // define variables and set to empty values $nameErr = $emailErr = $genderErr = $websiteErr = ""; $...

0
Q: How do I connect mssql with PDO using php 5.4.19

user1888781I am gettin following error when I connect to mssql Uncaught exception 'PDOException' with message 'SQLSTATE[IMSSP]: This extension requires the Microsoft SQL Server 2012 Native Client ODBC Driver to communicate with SQL Server And I am using $db = new PDO("sqlsrv:server=127.0.0.1;datab...

-2
Q: Passing 2 arrays from controller to view

MaxcotI'm trying to pass two arrays from controller to view, using this approach: My underlying data query has extracted this data as follows: $catalogData: Title (Clothing); Season (Winter); $ProductData: Type (Shirts); Size (XL); Price ($10); Controller $this->load->view('users/TheView', $catalogD...

0
Q: SMTP PHPMailer doesn't work

Emerald214I tried to use google as SMTP server like this but it cannot send mail. How to fix it? It seems that there is firewall which blocks my script. <?php require("PHPMailer_5.2.4/class.phpmailer.php"); $mail = new PHPMailer(); $mail->SMTPDebug = true; $mail->IsSMTP(); // telling the...

0
Q: unable to decode json variable

Muneem HabibI have following piece of code which is generating JSON variable. I use php built in json_decode function to decode the json variable but i am getting NULL after decoding JSOn variable. $a=array("targetAction"=>"getHeadFields","targetHead"=>$table_name); $obj1 = Post_Uamsdat...

0
Q: how to upload a large size file in chunks on server in php?

user2809576How to divide a large file in chunks and upload it to server. I try the simple move_uploaded_file() function. But it upload only of 2 MB size.

0
Q: how to exclude one subdomain from subdomains that share SESSION variable

OrmozI had a cookie-free subdomain (static) until I used this code to make my session variable visible in all sub-domains: session_set_cookie_params(0,'/','.example.com'); apparently, By doing so, I have lost cookie-free characteristic of the "static" subdomain. How could I have one session variab...

0
Q: stepping through code between php and node servers

Arjun PatelI was wondering how I can step through code between a node server and php server and client side code. I mostly want to see what's going on between the node server and the client side code especially with the ajax calls. They seem to be messing with the order of my lists. Something that could sho...

0
Q: Multiligual change current page

Misz Jiehahi just wonder what is the best practice for me do work with multilingual so that whenever the user change the language it will return the same page with language choose. Let say i'm having this for changing language <a href="index.php?lang=en"><img src="images/en.png" /></a> <a href="index.ph...

0
Q: Multi Language insert - MySqli, PHP

Lior ElenbyI have this code: $type = $_POST['type']; $content = $path_final; $desc_heb = $_POST['desc_heb']; $desc_rus = $_POST['desc_rus']; mysqli_query($mysql,"INSERT INTO gallery (type,content,desc_heb,desc_rus) VALUES ('".$type."','".$content."','".$desc_heb."','".$desc_rus."')"); at the end of my p...

0
Q: What is Virtual Numbers and how to implement them?

Fakirchand PatidarPlease tell me the answer about Virtual Numbers and how to implement them in real world?

0
Q: How to create custom Api and Api2 in magento and give a permission for those Api and Api2?

Manoj KumarHow to create custom Api and Api2 in magento and give a permission for those Api and Api2? Can you anyone give a example for those? Thanks in advance.

0
Q: PHP : Echo error,undefined blank page

user2189103I'm trying to echo and print out some variables and a few arrays. However, every time I try all that came up is 'Undefined'. I research but most are not relevant to my problem. Instead of showing error,a blank page with only the word 'undefined' is shown. I isset my variables and all, so i know i...

0
Q: retrieve logged in users events through codeigniter

user2584190Controller: public function searchevent(){ $this->load->model("users_model"); $data["rows"] = $this->users_model->search_member_events(); $this->load->view("search_view", $data); } Model: public function search_member_events(){ $this->db->select('*'); $this->

-4
Q: how do I change what file a <form> posts to?

user2758281I have recently been making a website where I have an input then an ouput from the inputs on the first page (dead simple php). I have been wanting to make the arrays postable to different files which the user can choose from (in a dropdown). how do I change what file a posts to? Is there a wa...

0
Q: How can i Set the max length on xml form max lenth is php variable

user1581939I've create the XML form text box. now i want to set maxlength. the maxlength is php variable how to set .. thanks!

1
Q: php unlink returns file not found

Brian BeckSo, I have a script in /var/www/vhosts/Domain/SubDomain/Script.php that writes images to /var/www/vhosts/Domain/wwwDomain/PhotoLocation/ and this works fine. However, when I run this script: /var/www/vhosts/Domain/SubDomain/Script_to_Delete_Photo.php which uses the 'unlink' c...

0
Q: How to use wse-php library to connect to secured webservices via SOAP [PHP]

maikelsabidoI have a script that is supposed to connect to webservice using WS-Security. Currently - in my script, I built a soap XML and sent it to the webservice endpoint but I'm getting an xml response saying "Client Internal Error". Here's the code that I'm using: <?php function sendXMLRequest($url, $p...

0
Q: How to get full path of image in php

user2746093I want to get the full path of image in php. i used tag for image uploading. i m unable to get the full path. when i alert the value of , m getting c:/fake-path/image.jpg here is my code: <input type="file" name="upload_captcha_background" id="upload_captcha_background" /> var file_path= jQu...

0
Q: Displaying unequal amount of data?

RukshanI have this small problem although it's small i can't seem to work it out, I've set of data i need to display, lets say 1 to 17. i need to display 3 in a row like 1,2,3 in one row and 4,5,6 in the next because bootstrap row support 12 columns and there are 3 elements of 4 columns each. Because ...

-1
Q: Paypal Delayed Adaptive chained payment more than 90days

skkishorMy Scenario is this when X buys P, Y should receive the full amount and after a certain period(it may be more than 90 days also), part of the amount has to be sent to Z. Which method can be used for this and how to do this. Kindly suggest please. When i checked Delayed Adaptive chained payment, i...

0
Q: How can I do domain name suggestion script using php

user2809656How to do domain name suggestion/generate simple script using php? Not the domain name availability. I already can domain name availability process. But I don't have any idea how to do domain name suggestion/generate script ? Example:- http://www.domaintools.com/buy/domain-suggestions/ If anyo...

0
Q: PHP implement preg_match with an array then preg_replace the matches

faildistractionNamaste, everyone. So I grabbed this very useful snippet from php.net and modified it. $cat = strip_tags(trim($_POST["cat"])); $joke = strip_tags(trim($_POST["joke"])); $patterns = array(); $patterns[0] = '/quick/'; $patterns[1] = '/brown/'; $patterns[2] = '/fox/'; $replacements = array(); $repl...

0
Q: Multi calculation problems

Gregory Scott CameronBelow is part of my calculation that im having a problem with. This calculation should come to 23.4 but when i enter it the email i get back has 24 (this list is to find out how many cubic meters furniture will take up) $Multi = $_POST['bedqueen'] * 1.4 + $_POST['babybath'] * .1 + $_POST['babyb...

-1
Q: Color Picker using php similiar to MS Paint color picker

Swetha swethaHow can I create a color picker in php? I want to show the color of the clicked portion of an image in a cell similar to the concept used in MS Paint.

0
Q: php array multidimensional

user2745375I need access to each id in the following array through foreach loop.Please tell me how array 'id' => array 0 => string '43' (length=2) 1 => string '82' (length=2) 'price' => array 0 => string '749' (length=3) 1 => string '599' (length=3) 'color' => a...

0
Q: Session destroy of inactive users if inactivity at browser

Praveen DeshmukhThis is bit different scenario in session management. I want to develop as system where if users loges in and then keep shows activity on browser his session will continue and if no activity session will destroy. For example user logged in at abc.com after that if he access google.com , yahoo.co...

0
Q: Yii framework new column in database not showing in output of $model->getAttributes() method call?

user1074660Yii version 1.1.8 I have added a column to a table in a mysql database, but the new column is not showing in output of $model->getAttributes() method call I deleted all files in protected/runtime folder, but still no column config: 'schemaCachingDuration' => 0, // in seconds. <1 means off ...

0
Q: Why the colorbox popup is not getting closed after clicking on a button?

JSLoverI'm using PHP, jQUery, Colorbox - a jQuery lightbox plugin, etc. for my website. On one of my webpages I'm displaying a Colorbox popup which has two buttons Yes and No. Now it is expected that the popup should be closed when user clicks on No button. But actually it's not getting close in my case...

0
Q: How to identify when Async tasks are completed

user2129794I have a php script which in turn runs few php scripts in async manner in windows. Now I want to execute another php script when the async tasks are done. Is there a mechanism which tell me when all the async tasks are completed so that I can execute the other php script.

0
Q: Updating total price array when user submit

Adam SmithI have an array with nested array in it like below. cart ( [total] => 98 [itemcount] => 3 [items] => Array ( [0] => 0 [1] => 3 [2] => 5 ) [itemprices] => Array ( [0] => 33.00 [3] => 32.00 [5] => 33 ) [itemqtys] => Array ( [0] => 1 [3] => 1 [5] => 1 ) [iteminfo] => Array ( [0] => Chemistry ...

0
Q: Updating field in Database with if else statement

jr.greenDefenderI am working on recieveing an item from another application with the use of $_POST and I am trying to see if that item already exists in the database. If it does, then $count increases by one. If it does not exist in the database, then it will added in with the use of INSERT INTO. Here is my cod...

-2
Q: how to change active currency based on user ip address using php

user1659887I am trying to change my active currency based on user IP address. it's already working in airbnb

-1
Q: Is it possible to define shortcode and then cal in template file - Wordpress

user930026I have a file a.php where I have defined <a href="abc.com/page_id=11?key=123">link</a> I have created a custom template custom.php and created a page at wordpress backend that has page_id=11 So, from a.php I am sending a user to custom.php with the help of page_id and then fetching the key=123 ...

0
Q: Rotatelogs on CentOS

user2228647I use the rotatelogs to splite the apache's accesslog. After I configurated the httpd.conf, the apache can't restart. this is the code I add to the file. ErrorLog "|/user/sbin/rotatelogs /var/log/httpd/ocake_error_%Y-%m-%d.log 86400 480" CustomLog "|/user/sbin/rotatelogs /var/log/httpd/ocake...

0
Q: How to make mkdir() work outside main file folder?

Anna Gee$ad_title = $_POST['title']; $ad_content = $_POST['content-ads']; $ad_region = $_POST['region']; if (!is_dir("uploads/".$ad_region)) { // dir doesn't exist, make it mkdir("uploads/".$ad_region); echo "directory created!"; } else { echo "directory already exist!"; } I am makin...

0
Q: get rid of arrays into an array in php

ShaDI came up with this ugly verbose array(and I have to use it): $puppy_mother_father_arr = array( array('46' => array('30','29')),array('17' => array('30','29')),array('16' => array(24','29')) ); How do I simplify it to something like this : $puppy_mother_father_arr = array('46' => array('30',...

0
Q: Symfony2 entity form field required multichoice

Zakii have form in Symfony2. One of field is entity type: ->add('kind', 'entity', array( 'class' => 'TestBundle:Kind', 'expanded' => true, 'multiple' => true, 'required' => true ) ) I want extort thta u...

0
Q: how to use sub query in where condition of another query?

Puppulii have a variable with value as the result of following query select concat_ws(',',name,age) from table1 innerjoin table2 on table1.id=table2.id where table1.height=150 its result stored in varible $result, i want use this $result on a new query in where condition as the following select addr...

0
Q: what content type to set if the page content has a mixture of php, html , css and javascript/jquery...and the file extension was php?

sasoriwhat should I set in the header() php function as the content type of the web page, if it is a php file, and has html, php, css and javascript ? header('Content-type: text/html; charset=utf-8'); because that script above doesn't work, when I view the source code of the i-frame..the javascript ...

0
Q: Need JQUERY Virtual Keyboard

Vinoth BabuI am in an urgent need of Jquery Virtual Keyboard Plugin. Is there any Jquery plugin which support multi-language?

0
Q: configuring the index.php file to run on localhost

vibhai am trying to run a php project whose source code and database are available to me. but when i put the source code in the www folder and run it on the local host then it gives the error 500 , may be down or configured incorrectly.. i think i have to change some configurations in the index.php fi...

0
Q: gmmktime(): You should be using the time() function instead

Habeeb PerwadWhat is the reason of the following error? How to solve the issue? gmmktime(): You should be using the time() function instead

-1
Q: convert an Oracle pagination query into Mysql

JAHeliahow to convert this pagination query to be compatible with MySQL : 'SELECT * FROM ( select p.*, ROWNUM rnum FROM ( select * from employees ) p WHERE ROWNUM <= '.(($current_page)*$perpage).' ) where ROWNUM > '.(($current_page -1)*$perpage)'; giving that this query is used ins...

-2
Q: $(selector).css() is not working

SalimI have an html div element in a variable var rows = ""; rows += "<div>1111 : Hi there</div>"; I have tried to add background color to this div by following but everything failed. 1. $(rows).css({'background-color':'#FF0000'}); 2. $(rows).css({'background-color':'#FF0000 !important'}); 3. $...

0
Q: Wordpress Plugin Code

user2809745I am currently looking to change a few pieces on a wordpress plugin, the plugin itself introduces a restful API for wordpress. One of the sections of the API allows you to specify a url modifier to exclude certain things from the API e.g. &exclude=custom_fields if ($json_api->query->exclude) {...

0
Q: Updating SimpleImage Class to resize animated .gif

NephanorI am using Simon Jarvis' SimpleImage class to help with image manipulation on my site, and I need to resize animated GIF files with it. The class is here: http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php I have a little bit in the loading which now determines if the file i...

0
Q: Multiple Drop down Not Working in HTML

coolprarunHi Friends Good Morning I have Created an Page like Shopping Cart in that i am using many Drop down field [example 8 drop downs in a single page].Using drop down i can add as much as quantity i needed and amount should be increased on the basis of Quantity changes using PHP i have the following ...

0
Q: how to install Authorize.net - CIM Payment Getway in X-cart Platinum...?

JimmyI have Download and Perches Authorize.net - CIM Payment Get-way Modules. URL:- http://www.bcsengineering.com/store/order.php?orderid=29520&mode=download_files Also, Put the ALL ( authorizenet_cim-45x-1.0.9 ) code in my project root modules directory. But, Still We can not show Modules for Admi...

-5
Q: what is wrong with this statement? I cant get what I want to display

Christian Debuqueforeach($paxArr as $index=>$id){ $query = $connect->prepare( 'SELECT * FROM passenger_details WHERE id = :id AND departVoid ="" AND departTicket IS NOT NULL OR returnVoid ="" AND ...

0
Q: Wordpress - Calling an ID from MySQL to use as a label or option in website

lauren stewartI am developing a website that uses Theme my Login plugin to generate custom registration fields. These fields that the customer fills in, I would like to use as labels or dropdown options elsewhere in the website. Can anyone help me in this regard? Thank you in advance.

0
Q: Is it dangerous to access wordpress tables directly?

TijuanaKezI'm coding an iOS app that will share information with a wordpress site. I had originally created a separate database with a custom data entry page in php but the client would like data entry to be done via wordpress forms for both user and admin. So the easiest way to modify my code is just to l...

0
Q: Python SHA512encryption with PHP

NewPHPThis is the first time I am trying with a python code. My client gave me a python code python -c 'import crypt; print crypt.crypt("Pa55w0rd!", "$6$x88yEvVg")' which is used to encrypt the password. In the above code: Pa55w0rd! is the password & x88yEvVg is the salt value. Can I execute th...

0
Q: Regex and carriage returns

KimomaruI'm working through a weird problem with carriage returns in a web form causing confusion in my regex statatements. I'm new to regex, so please forgive any obtuse questions. When my form sends data input from a text area, the following functions are used to turn any qualifying string into a...

0
Q: Download zip not total PHP

Alessandro MinoccheriI'm trying to get a zip file (I don't know size and name before) with a request xml that return me a zip file. I want to download it but sometimes download it all (16mb about) sometimees not( 2mb or 4 mb or 1mb) I don't know why. This is my code: $ch2=curl_init(); curl_setopt($ch2, CURLOPT_URL,...

0
Q: Yii module internationalization

GraceI need internationalization in my module admin_test. I created "messages" folder in module's directory and "en"/"ru" folders in it. Filled translation.php files in them the following way: <?php return array( 'test' => 'тест', ); in my templates and views i use messages this way <?=Yii::t...

0
Q: Create a mobile wensite in php

Rahul GuptaI want to create website which is for mobile version or desktop version. This is possible to create new subdomain of my domain & launch it for mobile . All request which is come from mobile redirect to mobile version folder. But i want to create same url for desktop version & mobile version site...

0
Q: i am writing code to conduct online test

user2787527I have used PHP, JS , Mysql and Html Every thing is working except auto submit and timer. After 20 min it should auto submit with user selected option and stores in mysql. popups "timesup and tell your answer as been submitted". but its popping timesup msg and not auto submitting and executing ...

-1
Q: i want to add list of items to show per page

user2637639I did simple pagination with numbers and next and previous buttons. I want to add the list of items to show per page functionality.I am unable to get it. Actually my code is like this. Please help me how to do.or please send me any reference links for that. <?php mysql_connect("localhost","root"...

0
Q: Joomla, php GET and redirecting

user1829015I have joomla 2.5 site, and I have http://www.something.com/places?x=target I would like to have URL like this: http://www.something.com/places/target How can I do this?

0
Q: unable to retrive + characters using php and ajax

user2735598Hello friends again i am facing a problem with AJAX and PHP ??? Let me tell you what i did ...! I created 2 pages one page (AJAX_view.php) with a drop down with all the blood group in short code like (b+, b-) and i placed my ajax code on the same page. to asynchronously search for the blood gro...

0
Q: php retun variable to external javascript

Бојан Беслаћjquery code var test; $.ajax({ type: "POST", data: dataLink, url: "find.php", success: function(data){ $("#status").html(data); }, error: functi...

0
Q: Saving HTML To MySql

HunarmanI am getting error message saying "0 rows affected. Warning: #1265 Data truncated for column 'content' at row 1" when i am saving my html to Mysql database. The Html is as under: About Us <p>We are revolutionising the way people shop around the world by providing the freedom to purchase fr...

0
Q: Connection Error: Unable to create selectable TCP socket (1121 >= 1024)

user2024336Thanks in advance. I have created php-imap class for retrieving email from email client. It worked fine for last 3 months. Now it showing the following error "Connection Error: Unable to create selectable TCP socket (1121 >= 1024)". I goggled it and find some solutions like "FD_SETSIZE,this is a...

0
Q: Update MySQL table by drag-and-drop from one table to another

AliI have two tables table-A and table-B. When I drag item from table-A to B, want to update table b data base. Please see structure here http://aliakhtar.tk/drag.jpg item which is in table b able to rearrange but new data from table-A is not able to insert into db. using this code for update $arra...

0
Q: PHP populate drop box with jquery

AjitI have a script which fetches options from a script php to populate a drop down list on the main page. Here's the javascript <script> $(document).ready(function(){ //#This script uses jquery and ajax it is used to set the values in $("...

0
Q: Joomla language switcher override

Mi5h0I'm trying to force the language swither module not to redirect to the home page if there is no menu item associations in Joomla 2.5. I would just like to change country code in the current URL. So that 'my-domain.com/en/menu?view=cat&id=1' translate to: 'my-domain.com/de/menu?view=cat&id=1' and...

0
Q: inserting values to new table in mysql_query

RiKoOkay guys, I will try to share my guestion understandable. So I have 2 tables like below: ALL Id from TABLES are Autoincrement. Number id number 10 100 11 102 12 105 13 106 subnumber id number_id subnumber 52 10 10 53 11 15 54 13 40 Yo...

0
Q: Check if domain is available fails

MarkI have been using this metode. I have set it up on my site, but for some reason, it doesn't seems to work for all extensions. As I set I did setup that code on my site, but modified it to check the requested domain name. You can try it on my site here. So here you can see some working examples...

0
Q: WP - woocommerce listing product categories by order

AmeerI'm using (wordpress) woocommerce for the first time. I'm trying to display all the product categories with their respective sub categories in a tree shape, but i cant seems to order them the way i'm ordering them in the back-end using drag and drop. The WP get_terms() only allows order by id, ...

0
Q: i am writing code to conduct online test , got trouble in auto submit

user2787527I have used PHP, JS , Mysql and Html Every thing is working except auto submit and timer. After 20 min it should auto submit with user selected option and stores in mysql. popups "timesup and tell your answer as been submitted". but its popping timesup msg and not auto submitting and executing ...

0
Q: How to check whether facebook is opened or not

Vijaya Narayanasamy I am very new bee to php code.I am trying to sort out code for allowing user to download the links when they are logged into facebook else ask then to login. Need php code for this task to complete.Please help.Thanks in advance.

0
Q: Generate xml using simpleXML

PonceI am currently making a dynamic XML generator by using records I get from the database. I have object returned from a query in the database into $res_detail Array ( [0] => stdClass Object ( [MWSCID] => 2 [MWSCDID] => 1 [MWSCDName] => Root [MWSCDValue] => message [MWSC...

posted on September 24, 2013 by Tim Withers

This is something I just had a question about as I am not 100% sure how events work and event bindings. I have a BaseModel that extends Eloquent with some code to allow validation and such in my model. I have a listener: public static function boot(){ parent::boot(); static::saving(function($model){ $model->removeExtras(); }); } My User m

0
Q: Codeigniter upload and insert filename to table

conmenI using CI tank_auth library to allow user to edit their profiles all in one page, now I was stuck at avatar upload, I want user to upload their picture and store the filename in table, I've been tried get the filename and update the table, but has no success and the specific field is leave blank...

0
Q: FOSElasticaBundle and geo_distance find

Kioko KiazaI´m trying to make a search sorted by proximity with elasticsearch. I installed FOSElasticaBundle and I have this configuration on my config.yml: fos_elastica: clients: default: { host: localhost, port: 9200 } serializer: callback_class: FOS\ElasticaBundle\Serializer\Call...

0
Q: PHP Oracle Pagination Cant Show Data Using ROWNUM

user2806837I just try using Oracle database and found problem in pagination. Last time I using in MySQL it work good. See my code : <?php $page = $_POST['page']; $cur_page = $page; $page -= 1; $per_page = 3; $previous_btn = true; $next_btn = true; $first_btn = true; $last_btn = true; $start = $page * $per...

0
Q: preload jQuery building of JSON results

user2656127So I am currently building an activity feed/news feed or sorts using JSON and jQuery (and of course PHP). Everything works really well, especially fetching new results. The only issue is the first load - and I'm wondering if there is some way to sort of preload the results to make it more slick? ...

0
Q: How To Insert Form Data In 2 different tables using single form

Mehul BawadiaHere's the form where the user inputs the data in it. <form action="addemployee.php" method="POST" id="addEmployeeToDataBase"> <input type="text" name="username" placeholder="UserName..." class="txtInput" required="" /> <input type="text" name="fullname" placeholder="Full Name..." class="txt...

0
Q: Laravel - change the default database connection globally

ericbaeIn my database.php, I have TWO databases configured. 'db1' => array( 'driver' => 'pgsql', 'host' => 'localhost', 'database' => 'db1', 'username' => 'root', 'password' => 'password', 'charset' => 'utf8', 'prefix' => '', 'schema' => 'public', ), 'db2' => array( 'driv...

0
Q: How to hide/show form using jQuery in following scenario?

JSLoverI'm using Smarty, Php and Jquery for my website. When the page loads the following form should not be displayed. When user clicks on a hyperlink given below it should get dsiplayed and if user wants to hide the form again he will click on the same hyperlink to hide the above form. In short on for...

-1
Q: How to add the json root node in php

Nambii'm trying to encode the json data in php and i used the echo json_encode($row); i'm getting the output like this [{"rec_id_c":"1","crname_c":"room1"},{"rec_id_c":"2","crname_c":"room2"},{"rec_id_c":"3","crname_c":"room3"}] i'm excepting the output be like this {"reponse:"[{"rec_id_c":"1","...

0
Q: Using PHP and MySQL Repeats Events

ActionseeI want to use Upcoming events. But i couldn't do it. My table ID | Name | StartDate | Repeats 1 | Theater| 23.09.2013 | 0 2 | Cinema | 19.09.2013 | 1 3 | Dinner | 22.09.2013 | 2 4 | Theater| 20.09.2013 | 3 5 | Cinema | 19.09.2013 | 4 Repeats means: if repeat is 0 : no repeat if rep...

0
Q: facebook login auto wall post and database insert using php mysql

Bolem VeeruI need a login system using facebook, here are some requirements i need as facebook login, auto wall post when login first time at my site. need to insert user name, email, facebookid, access token to mysql. i have created facebook app when i testing with this code facebook login working and redi...

-1
Q: ajax retrieve and display function not working properly

sunil sandeephi i have some ajax coding in which the if condition is not at all working, whenever the program executes else statement only works even the program satisfies the if statement. <script type="text/javascript"> function CheckDetails() { var http = false; if (navigator.appN...

0
Q: Large file sizes generated in php

altafhussainI am not sure if this will be the correct forum to ask this question or i should post it on another stack exchange site, please advice. I am generating translations files in PHP and translations are stored as below $lang['fileName_md5_hashed_word'] = 'translation in arabic' The lang array h...

0
Q: PHP Referrer of Referrer (Recursively)

BendaI am looking into sending the user back two (or maybe more) pages from where they came. What works so far is <strong> <a href="javascript:history.go(-3)"> Click here to go back to the view </a> </strong> However, the page does not refresh to show the changes. So I have the id...

0
Q: How to post to php on input change then get results in content div

user2743057I want to do just what the title says, when data is inputted into the textfield, I want it sent to posttothis.php, then have the result printed in a content div. I can't seem to make it work. testscript.html <input type="text" name="text" id="text"> <div id="content" name="content"> <script> $(...

0
Q: PHP - Order in a while loop

oliverbj<div class="row"> $r=mysql_query("SELECT * FROM advertisements WHERE $filter exposure!='0' AND `status`='2' AND (clicks_left_micro>0 OR clicks_left_mini>0 OR clicks_left_standard>0 OR clicks_left_extended>0) ORDER BY exposure DESC"); while($ar=mysql_fetch_array($r)): ec...

0
Q: Getting unrecognized expression

Isaac BasseyI want to display my wordpress blog posts as a list using jquery mobile and json api but when i execute the program I am getting: Error: Syntax error, unrecognized expression: div class="entry">undefined ...){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"=... This...

0
Q: Variables in route group prefixes in Laravel 4

HailwoodGiven the below routes it will respond to http://example.com/game/stats/123 http://example.com/game/stats/game/123 http://example.com/game/stats/reviewer/123 What I want to know is, how can I make it respond to http://example.com/game/123/stats http://example.com/game/123/stat...

0
Q: MySQL and empty select result

nyan-catSome of my MySQL queries should return non-empty response (empty response treated as query error). Currently I configure it in the custom config, like procedure name bla bla bla select bla bla bla empty="false". I mean my own queries named as procedures, but not MySQL stored procedures. So, I che...

0
Q: ZF2 table getaway select with IF() in columns

ArVanI want to get the following type of query with ZF2 using its tableGateway. SELECT IF(column1 LIKE 'text', 1, 0) FROM table WHERE (column1 LIKE 'text' OR column2 LIKE 'text') AND status = 1 Is it possible to achieve this? I have tries the following: $this->tableGateway->select(function (Select...

0
Q: how to allow user to download file residing in public_ftp folder from email

Yogi Yang 007I am web site that I am developing there is a need to send an email which will contain a link to allow a user to download a file which is generated automatically in a sub folder of the public_ftp folder like for example: ftp://xxx.xxx.xxx.x/public_ftp/AHM/ks/ks_14_09_2013_AE98347CB0.upl If I pu...

0
Q: Iterate through MDB database using PHP

zulunationI'm using odbc_connect to connect to Access (MDB) database. I want to iterate through all records and store specific to another database. What SQL command do i need to use for that?

-3
Q: How can I make this code simply ?

crazyoxygenIt's simple function , request data by cURL and get JSON. I just want to use data in json but why it's a lot stdclass object. How can I simply this code ? <?php function movieRequest() { $url = "http://api.com/content/movies?format=json"; $ch = curl_init(); curl_setopt($ch, CURLOPT_...

0
Q: PHP Multiple User Login Form on Different Pages Based on Login Credentials

JestyI am trying to create a login page that will send the user to a different index.php page based on their login credentials. For example, should a user with the "Admin" role log in, they will be sent to "index.php", and if a user with the "Student" role log in, they will be sent to the "student/pro...

0
Q: putting mysql_fetch_array with the same result set within two loops doesn't work

rosemaryThe first loop does well,but the second isn't. For example: $sql = "select * from table"; $result=mysql_query($sql); while($row=mysql_fetch_array($result)) { //some code } while($row=mysql_fetch_array($result)) { //some code } I just want to know why

0
Q: How to preg_match with the pattern being an array (php)

stevenmwPhp.net had this preg_replace snippet $string = 'The quick brown fox jumped over the lazy dog.'; $patterns = array(); $patterns[0] = '/quick/'; $patterns[1] = '/brown/'; $patterns[2] = '/fox/'; $replacements = array(); $replacements[2] = 'bear'; $replacements[1] = 'black'; $replacements[0] = 'sl...

0
Q: Marker on menu-item with sub-items

user2674339I really love that Wordpress makes my menu automatically, and that i do not need to use the Apperance->Menus system if i do not want to. Child pages can be styled as dropdowns and everything is good. Except: I can't manage to make a marker on top level menu-items, to show that there are sub-ite...

0
Q: Fatal error: Call to undefined method PDO::fetch() in C:\wamp32\www\dbcheck.php on line 24

Navnee PrakashIf i execute this, I get Fatal error: Call to undefined method PDO::fetch() in C:\wamp32\www\dbcheck.php on line 24 $var->setFetchMode(PDO::FETCH_ASSOC);

0
Q: Switched from PHP version 4 to version 5.3 - code not working anymore

Carsten ANdreasenI recently swithced php version from 4 to 5.3. I now how some code that is not working anymore. I have a PHP script that fetches data from a form into a new form, when a user clicks a link. First it recognizes the user/account and after that it finds the form data. This is the code for the acco...

0
Q: Display Text (Title of product) instead of long URL

Paul Adam HarrisonI need to display Title of product instead of its url. For Exapmle instead of localhost/test/index.php?option=com_spidercatalog&product_id=109&view=showproduct&page_num=1&back=1&show_category_details=1&display_type=cube&show_subcategories=1&show_subcategories_products=2&show_products=1&select_c...

-1
Q: Cron syntax - plus/minus sign

vlcikWhat do plus and minus signs at the start of lines mean in cron syntax? + 0 9 * * * /usr/bin/curl -k http://www.example.com/cron/deactivate_users - 10 8 * * * /usr/bin/curl -k http://example.com/cron/delete_users

0
Q: putting shell_exec() output into array

BryanKI have a line of php : $output = shell_exec('ps aux | grep 9902 | awk \'{print $11" "$2}\''); print $output; will give the output : rtmpgw 10089 /usr/bin/vlc 10107 sh 10123 grep 10125 I tried using this next line to put the above output into an array. $oparray = explode(" ", trim($output)...

0
Q: How to expand multilevel divs with javascript and save expanded condition in url for links sharing or manual copy/past

vikprostokvashaHi to all javascript pros! I search solution for expanding multilevel divs which contains links to doc/pdf files with posibility to copy/past or share url links in expanded condition. I am a total newbie with javascript and not sure wich way it can be realized. May be something like "location.has...

0
Q: php include() does not work

user2810131I'm trying to modify Wordpress theme I want to create multiple templates for single blog entry, based on its category. But I'm stuck with the include(). <?php error_reporting(E_ALL); ini_set('display_errors', '1'); include 'single_product.php'; include TEMPLATEPATH.'/single_product.php'; ...

0
Q: get value from address bar using url rewritting

user1929676i am using .htaccess file to user url rewritting and it's working properly. when i user this for an user then i write RewriteEngine on RewriteRule ^user/([0-9]+)/?$ index.php?user=$1 [NCL] and it's working but when i use this for pagination..it's not working. RewriteRule ^user/([0-9]+)/...

0
Q: Server-side processing jquery datatables in Zend Framework

niels123I'm trying to work with datatables and server-side processing. This is what I have in my view: <table id="datatables" class="display"> <thead> <tr> <th>Your Name</th> <th>Date and Time</th> <th>Actions</th> </tr> </thead> <tbody> </tbody> </table> <script> ...

0
Q: PDO login script returning false

gutigrewalI've created a login script where I am simply trying to match the username and password that is passed through my login form, create a session and pass through session variables and redirect the user to a different page. I'm using an OOP PDO approached style as this is the way forward and it is ...

0
Q: how to get edited value in editable Sencha grid 4.2 for edit using ajax

Souvick DeyI want to edit a row in a editable row grid for Sencha Ext Js Grid 4.2, and save the edited data in database using ajax. here is the given code for update row: var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', { clicksToMoveEditor: 1, autoCancel: false, listeners: { e...

1
Q: PHP Inheritance: Child has same class name as parent

Lance BryantI am interested if its possible with any trickery, and or cool PHP features to have a child class inherit from a parent and have the same name as a parent. This should be able to be repeated as many times as desired. This can be done in a number of ways I figure, but I am interested to see what...

0
Q: How to send a notification to an offline app whenever there is an online transaction

ChibuzoI want to send a notification to an offline client application, and also update the offline database whenever there is transaction on the web application. The client application has a static IP address issued by my ISP. How should I do this? Secondly, there may be cases when there is no interne...

0
Q: Amazon MWS bulk request without throttling php

Matthew BazanetI edit the sample product library for php and now I can get my price for sku. But I want to automate the process. I have create a DB with all my skus. I know that I can request only 20 items at time, so.. I can do that? If I tried to do a for cycle the api doesn't work. Thanks!

0
Q: .htaccess php_value include_path not working

pmgutiI have a small project in local. I'm working under Windows and with XAMPP. My file directory structure is: Root directory: C:\xampp\htdocs\routes Under this folder, I have my bootstrap.php with the configuration I want to initialize my project. Public folder: C:\xampp\htdocs\routes\htdocs Under...

0
Q: PHP SQL UPDATE Query issue

user2306304I'm having trouble with this update query.INSERT works absolutely fine.My INSERT query and UPDATE query as follows, This is the error that i've been getting. db_exec:DB Error: (UPDATE vms2 set invoiceid='', slicenseinfo='testVM', manufacturerid='692', hyp='6', stitle='UBER', vmg='UBER', sversi...

-1
Q: Execute a function via Cronjob (Silverstripe)

cSGermanyis it possible to execute a function in a Silverstripe Controller via Cronjob ?! Thx a lot!

0
Q: WordPress running code from template

OnIIcEI have discovered that WordPress is executing code from a template that is in my theme, but when it is not actually on a page using the template. Although this template will not be used in a live state (since it only runs a loop to create data) I was wondering if anyone else had come across this...

0
Q: PHP cURL HTTP-Authentication to let user into password protected directory?

tzeldin88I am building a prototype of a web app for a client, using axure - which is all front-end code (html/css/js files) - no php at all, so i can't use php authentication (sessions, etc) within the prototype itself. So to protect it, the prototype is in a password-protected directory on my server (us...

0
Q: Discount Coupons on shopping cart page

cartinaI am working on a shopping cart built in oscommerce v2.3. I need to make customer (not registered) enter discount coupon code and pass the discount amount to paypal so that they can make payment using paypal express checkout. I tried copying the discount code form to shopping cart page but that...

0
Q: SimpleXML add Multible Child Elements i a Foreach

Huzur Polati am looking for a way to add multiple child form a array to a existing xml element. $newParm = array( 'testTag' => 'testAtr', 'testTag2' => 'testArt2' ); Output: <existinTga> <testTag>testAtr</testTag> <testTag2>testAtr</testTag2> </existi...

0
Q: Nested object tags, the inner one is too small

PavelIn my page I had a div containing another page embedded within object tag. The other page contains another object with embedded Google Map. But the div looked (both in Firefox and in Chrome) as follows - the map was small, not filling most of the div as intended: I found a workaround: when I i...

0
Q: how to pass variables in url with an ID section using PHP?

PrimitivoI can do this: <a href="home.php?var=home">home</a> But when I have a link with an Id, I can't pass variables: <a href="home.php#sectionID?var=home">home</a> <--!this doesn't work of course --> Thanks a lot!

0
Q: PHP 5.5.x libphp5.so size

user2810222Using yum to install latest php for FC17 and I get php 5.4.17 and its libphp5.so size is just under 400,000 but it includes numerous modules I do not need/use. I decided to roll my own and I downloaded php 5.5.3 and compiled successfully but the libphp.so is now over 1,400,000 even though I've d...

0
Q: How to make a regular expression for doule quotes in PHP?

user2702406I have the following string which I have to pass to mysql_query() function. This sting is generated dynamically when somebody tries to search some data in my site. Now the problem is there is no ending quotes after each word and before the 'and'. and purpose="Buy and property_type="Home and prop...

0
Q: Symfony2 - Impossible to access an attribute ("date") on a string variable ("inline")

AbirI have create a entity "Fact" width "date" attribute. /** * Fact * * @ORM\Table(name="fact") * @ORM\Entity() */ class Fact { ..... /** * @var \DateTime * * @ORM\Column(name="date", type="datetime") */ private $date; /** * Get date * * @ret...

0
Q: Codeigniter failed to upload and can't get file_name

conmenI using CI tank_auth library to allow user to edit their profiles in one time, now I was stuck at picture (avatar) upload, I want user to upload their picture and store the filename in table, I tried to get the filename and update in the table, but has no success and the specific field is leave b...

0
Q: How to prevent Magento removing grouped items

JPKI have successfully created a grouped product which contains 4 products and all is working fine. However, one of the items is a free item, only available when purchasing the grouped product. My problem is, when going to the basket, I can edit it and remove some of the items. Is there a way to rem...

0
Q: Search for multiple patterns inside a pattern

markmbI'm using regular expressions to extract data from a website, but now I found a problem. This is part of the original HTML that I want to parse. I want to extract the text after "descuentos-" and the city, after the "<a href>". <div id="cities2_2"> <a href = "http://website.com/descuentos-esp...

-1
Q: How foreach array in array in php?

Darien FawkesI have an arrays in array: $tree = array(array($value => 7, $left => 2, $right => 3, $leftValue = 0), array($value => 5, $left => 4, $right => "", $leftValue = 0), array($value => 25, $left => 5, $right => 6, $leftValue = 0), array($value => 3, $left =>...

0
Q: PHP: Pass variable to AWS SDK2 uploader

RusselltI am completely stuck on what I expected to be a simple problem. The following Amazon AWS SDK2 script uploads files successfully to AWS S3 when the $filepath variable is an absolute path to the file being uploaded and is defined within the script. However, when I try to use a simple form to sel...

-2
Q: I have changed my website to https but it's still loading http. what do I do

Obeahon LuckyAfter paying for a ssl for my website to load with https, my site still load with http and if I type https://example.com it will open but my picture and flash on the site will not open. how do I make my site to load direct to https and show all website content

0
Q: Extra where statement using sql server doctrine pager with Symfony 1.4

HMRI have this code: $this->pager = new sfDoctrinePager('ProductImage', $imagesPerPage); $this->pager->getQuery() ->select('img.*') ->from('ProductImage img') ->where('img.product_id=?', $id) ->orderBy('img.number ASC'); $this->pager->setPage($pageNumber); $this->pager->init...

0
Q: How to use move_uploaded_file() in wordpress

user2746093I want to upload an image in a folder named upload which i created in my plugin. I m using <input type="file" name="upload_captcha_background" id="upload_captcha_background" /> plz suggest how can i upload image in uplaod folder.

0
Q: Running 2 versions of PHP on the same apache server

Michael WilsonI am looking to use Symfony2 to help build a large web system. I want to run this on the same server that is being used by existing systems (It is an Apache2 server on linux). The issue I have is that the existing projects are not all compatible with the newer versions of php. To be able to get t...

0
Q: Navigation breadcrumbs not rendering in zend framework 2

shyammtpI am new to zend framwork and I followed based on this link (http://zf2.readthedocs.org/en/latest/tutorials/tutorial.navigation.html) but the breadcrumb doesn't showing in the view or layout. Below are the codes i have implemented. Guide me what i did wrong? In module.config.php, return array(...

0
Q: laravel 4 validation unique ignore and where

DriesI'm trying to my values before i submit them to my database. My field requires a very specific type of validation and so my question consists of two pieces. My table has 3 fields: id, name, parent_id Currently I'm using these lines to validate my variables: protected static $rules = array( ...

0
Q: using combo box to populate another combo box so that a user can run a query

cstuI'm trying to let a user query a database by using combo boxes. The first combo box shows a list of tables in the database. When the user selects a table another query is ran which should populate the second combo box with the column names within that table (this will be used as a select for a ...

0
Q: Task scheduler run successfully, but not sending email

user2810332I develop a system using WampServer. I try run the script using Task Scheduler. The program run successfully, but there is no output after all. Supposedly, an email is automatically send to me if there is no problem occur. At the Program/Script under "Action Tab", I put .bat file that consist...

0
Q: Unable to create array for recursive function

NitishI have a simple function checkReplies() which checks the reply_id and if the reply_id is not equal to 0, calls himself and checks again. Now I need to create a array ffor the outputs it generate, but I am unable to do it, the array outputs only the last element function checkReplies( $rnid ){ ...

0
Q: PHP user login - short session in Chrome

user2810364I have problem with user session. My code on login page: <?php ob_start(); $sessiontime=60*60*24; session_set_cookie_params($sessiontime); session_start(); ?> . . . <? include "password.php"; $pass = $_POST['pass']; if ($pass) { if ($pass==$haslo) { $_SESSION['user_id']=1; header("Location: in...

1
Q: maintaining same size on submit

user2403357I'm making a webpage which has a few links on the side, which when I click on it redirects me to this particular .php file. On every php file I have the same header and footer. But the problem is, when I click on a link or on a submit, I'm automaticly at the top again, even though I'm scrolled do...

0
Q: trasfering value from php to javascript inconsistent

DevfaRmy php code has a value of 2 digits like $var1 = 16; $var2 = 24; $var3 = 31; but when i used those value and put it in my javascript like for example var var1 = <?php echo $var1; ?> var var2 = <?php echo $var2; ?> var var3 = <?php echo $var3; ?> console.log(var1+"-"+var2+"-"+var3) the ...

0
Q: jquery remote validation username check

Ray DavisI have been looking around and i still cannot figure out why my username validation is not working. I am just to check if the username exists and if it does show an error message. Here is the rules for my username field. username: { required: true, remote: "user-c...

0
Q: Getting data twice on page in wordpress

Dk-MacadamiaI have my theme page.php as: <?php /* The loop */ ?> <?php while ( have_posts() ) : the_post(); ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header"> <div class="hd"><?php the_title(); ?><

1
Q: Saving value in "$data" from AJAX output

Hildosjust wondering how i save the value from the "var vname" to "$data" so that i can use the value in my php. Assuming this is pretty easy, but i'm new to this :P <script id="source" language="javascript" type="text/javascript"> //Call the yourAjaxCall() function every 1000 millisecond ...

0
Q: How to export table in php?

user2789964I am new to php and want to export tables from databse to excell datasheet how do i achieve this please explain in simple language as i am very new to php. Please explain this to me with suitable example. Thank You

-2
Q: how to update in database using ajax call in php

gokulFor now my php page updates a column in DB using form $_POST but how to do it without submitting using ajax my current code is below . how to do it in ajax so that it updates in the column completed as 1 or 2 or 3 or 4 <html> <head> <script language="JavaScript" type="text/javascript" src="...

0
Q: How do I install AWS PHP SDK on Elastic Beanstalk?

JoeI try composer with composer.json in /home/ec2-user but get the error: Your requirements could not be resolved to an installable set of packages. Problem 1 - The requested package aws/aws-sdk-php could not be found in any version, there may be a typo in the package name. My json file lo...

0
Q: check whether the next row is a duplicate

Edmar CruzHow can I check whether the next row is a duplicate one. if duplicate it will move to the next row. Example: 1st row: 1900 2nd row: 1900 3rd row: 2000 How can mysql and php can do these results: 1st row: 1900 2nd row: 2000 3rd row: 1900 Is this possible or any possible codes? <?php $array...

0
Q: Execute a Function in Silverstripe via Cronjob

cSGermanyHi I want to execute a function via cronjob to start an csv import. At the moment the import is triggered by accessing a controller in the browser tld.de/Update The controller has this code http://pastie.org/8351266 How can I execute the function init() via Cronjob? Thx!

0
Q: Codeception: Cleaning test data from database

David JonesI have been writing some unit tests with Codeception and my database has been getting over run with the test data. While reading the documentation I found it says: Database will be cleaned and populated after each test Does anybody know if there is anything in the yaml file or maybe somethi...

0
Q: PHP mySQL - Combine Multiple Queries into 1

IIIOXIIIHere is my problem: I have a mySQL database with 3 columns (for simplicities sake - there are other irrelevant columns) and 3000 rows of data (again for simplicities sake), on which I am executing the loop below: $iCount = count($item_ids); for($i=0;$i<$iCount;$i++){ $q="SELECT item_id, val...

-1
Q: Android login authentication with remote (MySql) database

John RI know this question is already asked before and i make changes in my code as provided by the answers in that post. But no answer solve my problem. Hope this time someone have new answers that solves my problem. My java code btnLogin.setOnClickListener(new View.OnClickListener() { @Overri...

0
Q: ZF2 composer usage to intall new module

FreshteaI am facing some problems with using the composer to install ZF2 components. I do know how to work with ZF2 but now I want to make user of composer to get modules into my existing project much easier than download them by zip. I find out how to build a new project by composer: composer create-...

0
Q: PHP Regular expression with arrows (>>)

Mateusz OsuchI need a little help with my regular exp. Here is what I've got: function formatLink($post) { if(preg_match('/^\>\>[0-9]{+}$/', $post)) { return "<font color=\"red\">".$post."</font>"; } else { return "<font color=\"#b7b7b7\">".$...

0
Q: PHP If else solution

Tobias LeuschnerCan it works with this if else or can't i write it so? I need help with the if and else Problem. So can i write if² than if³ and than else³ and else². <?php if (empty($_POST['blue'])) { echo '<img src="images/error.png">'; }else { if($_POST['blue']<256 && $_POST['blue']>=0){ echo...

0
Q: Alert (via mail) if a level is met (earthquake strength) BUT avoiding duplicates? Php? Cron?

user2700686I am ok in PHP but this has me scratching my head. Basically, I want to send an email alert when a specific variable is met. For example, when seizmic (earthquake) activity is equal to or greater than level 2.00, I want to send an email alert to users. I get the current earthquake level every ...

0
Q: Nginx redirect on specific url - pretty url style

zeusakmI need to set redirect with nginx config, similarly to .htaccess, here is an example: RewriteBase / RewriteRule ^(xml/)$ /send_xml_sms.php [L,NC] RewriteRule ^(get/)$ /send_sms.php [L,NC] RewriteRule ^(post/)$ /send_sms.php [L,NC] It works perfectly with Apache 2.2 and .htaccess file, but I d...

0
Q: Remove element and reindex

user2810175$foo = array( '0'=>'1', '1'=>'2', '2'=>'3', '3'=>'4', '4'=>'5', '5'=>'6' ); now remove element indexed at 2 and reindex the array in below format. $foo = array( '0'=>'4', '1'=>'5', '2'=>'6', '3'=>'1', '4'=>'2', );

0
Q: Insert Data from Checkbox and Textbox in DB

Jane DimiI've created two php files with code for an order form for a cafeteria and the correspronding lines of code for inserting the posted values in my database. Here I present them. CODE FOR addorder_form.php **<?php db_connect(); $cats=array("Kafedes", "Rofhmata", "Pota", "Snack/G...

0
Q: Change the DST in Manual Mode

Nima Ghaedsharafibecause of my country specialness, the date of changing DST is different with world. so I want to handle the dst in manual mode. I'd searched too much , but I cannot find anything. how can I do it??

0
Q: How to detect a-z letters in php loop?

steveI want to detect starting letter of string A-Z Currently I am displaying data using loop which displays data from a to z Now I want to detect data starting with letter "a" in loop Is that possible using PHP? I want same this http://cdn.ihwy.net/ihwy-com/labs/demos/jquery-listnav.html using PHP

0
Q: Simple update query fails PHP SQL

DragonChaserI have tried practically everything but I cannot get this simple update query to work. Array shows: Array ( [pSelect] => 102 [budget] => 44 [submit] => submit ) So i can conclude that it does get the ID and receives the value from the input field budget. <form action="test.php" method="post"...

0
Q: Parse url with API to an array via simple html dom parser

MaryI have a problem with start a project of 'clan community statistic'. I have a URL with that API of statistic -> http://api.worldoftanks.eu/2.0/clan/info/?application_id=d0a293dc77667c9328783d489c8cef73&clan_id=500000001 and i want to show this in an array using simple html dom parser. I want get ...

0
Q: Joomla extension module EU e-Privacy Directive is not clearing the HTTP cookies

Sino ThomasI am using EU e-Privacy Directive Plugin and Module,When i remove cookies using the module it is not working,Still i can see some cookies. I Think the module not clear all the HTTP Cookies.

0
Q: Displaying MySQL data to clients once they log in

Stan HoweI have tried numerous combinations of code to try and display my client data to them on their own profile page once they log in. This is my first time designing a website and i have never worked with MySQL before but i have developed a quick understanding of how it all works. I understand that...

0
Q: Data save with phpfreechat

HarshanI am facing the problem related to data saved. I use PHPFreeChat Method to Mysql.so it will save chat history in to database. But if I look into database, I can find only some records data automatically has been removed. Please, can anyone help me find some solutions.. Thank you.

0
Q: Yii timepicker textbox size

ungalnanbanHow can I change the default size of textbox for timepicker in Yii. I'm using timepicked in Yii from the link timepicker. I have tried the htmlOptions , its now working, $this->widget('application.extensions.timepicker.timepicker', array( 'model'=>$model...

-6
Q: CONVERT PHP CODE TO HTML AND CSS

Justin JoseMy Php Code < div class="maincontent" style = "background-color : <? php echo $row [ ' c_color ' ] ; ? > ; AND HOW TO CONVERT AND WRITE IT TO AN HTML PAGE WITHOUT PHP CODE? HERE ONLY USE PHP CODE FOR CALLING STYLES AND CONTENT . I NEED TO WRITE ...

-1
Q: data not coming in proper order from table using php

user2810532I am trying to insert data from feed into the database using Zend and also adding a column date_updated in table so that whenever the article in feed is updated the column also gets updated. But the problem is, the first article is being inserted earlier and thenafter the others. So, when I am tr...

1
Q: Using image magick with php to resize an image while fetching from the database

Rakesh MishraIn php I have uploaded an image to the database by using php move_uploaded_file function. Now when I am getting the image from the database I am using this code to get the image $result = mysql_query("SELECT * FROM "._DB_PREFIX_."storeimages WHERE `city_name`='".$_GET['details']."'"); while($row...

0
Q: How to display all syntactic symbols from php mode in Emacs?

jcubicHow to get a list of all syntactic symbols? like when you type M-x c-set-offset you get one of them. I have my old code (from this question how to fix php-mode indenting when using closures), that use c-syntactic-context but it seams only work for c-special-indent-hook because Emacs say that the ...

0
Q: XMLWriter VS. XML helper from CodeIgniter. Which one is faster and better Performance?

crazyoxygenXMLWriter VS. XML helper from CodeIgniter. Which one is faster and better Performance ? Still not see result from anywhere. ps.already search in stackoverflow and google. ps2.may be , I'm bad searcher. ;w;

-1
Q: how to rewrite my ulr?

Manjuwhen i send the values using hidden input fields trough the form, the url is showing like http://www.travelpunk.com/blog/hostel-details/?Rio+Guesthouse=&St%2BLawrence%2BGap= but i want to show this like as follow url http://www.travelpunk.com/blog/hostel-details/Rio-Guesthouse/St-BLawrence-BG...

0
Q: Facebook php api in Ajax facebox

SultenhestI'm trying to load some php fql calls in to an ajax facebox (its like lightbox), i include a file with the following code in, but it does not work without the redirect ($my_url), is there any way to make the code ignore the redirect? Or do i need to use the javascript sdk from facebook? $app_id ...

0
Q: How to use {php} in smarty, for cmsms 1.11

AtirisFrom April 2012 is for CMS Made Simple removed use_smarty_php_tags from config.php. How can I use {php} {/php} tags in templates now? I can not find any explanation how to insert php code into templation outside of user defined tags (they are good if I use it on multiple pages, but I need short ...

0
Q: Validating form and sending a confirmation email on submission

Jackie69I am creating an admin page, where the admin person can create users accounts for people. The idea is, that once the form is completed, when clicking 'Submit' an email must be sent to the user (containing the ID and name of account selected). In the same action, the form must also first be valida...

0
Q: It is possible to embed a pchart in a function?

Acelasi EuI want to populate a chart with dynamic data, but in order to do so, I want to embed the pchart php file in a function, and then call it with echo "<img src='function();' /> "; Is this possible? Here is what i`ve done: function grafice() { /* pChart library inclusions */ include("../cl...

0
Q: TWIG/SYMFONY2 - The filter "date_modify" does not exist

Martin ZotterI am trying to manipulate a date in my index.html.twig with something like: {{ myDate | date_modify("+3 day") | date('Y-m-d') }} and get the error: The filter "date_modify" does not exist in XXX:YYY:index.html.twig at line 723 I am using Symfony 2.0.16, and the Date used is working so ...

0
Q: Ajax load to only load one of multiple classes on page

craigSo on my page i have many blog posts that are all editable on the page. When you click edit a text editor is displayed and then on clicking save the editor goes away and the original text comes back. However, i want the text of the original post to reload to show the new information. This: $t...

0
Q: Magento - Can indexer events be queued to run later?

WouterI noticed that Magento CE 1.7 uses indexer events to process things like product saves etc. These events are stored in a table index_event and index_process_event. Now, my situation is the following. I have a product import script that inserts between 1 and 10.000 products directly in the DB. Th...

0
Q: How to use API google search

user2810612I search for a phrase with Google APIs, and once achieved the results I have to see if the sentence has been found. but do not know how to do it. I do not know how to use bee research, I read the documentation but I do not understand. I have to do in php. Can anyone help me? Thank you.

0
Q: how to fetch particular data from expedia's V3 PHP Hotel List Request?

user1528313It seems very stupid but for last 2 housr's i am trying to extract particular data from the expedia's EAN api's responce The php code is $response = json_decode(curl_exec($ch)); print_r($response); and the responce is http://api.ean.com/ean-services/rs/hotel/v3/list?minorRev=99&apiKey=baabqgw...

0
Q: unable to export wordpress post properly

wahabI am trying to export the wordpress posts with their authors. but wordpress is not exporting the user's role properly. is there any way, or any plugin which can solve this problem. Please help!

0
Q: Call to undefined function ssh2_connect()

user2807431$connection = ssh2_connect($SFTP_SERVER, 22); ssh2_auth_password($connection,$SFTP_USERNAME,$SFTP_PASSWORD); $sftp = ssh2_sftp($connection); Fatal error: Call to undefined function ssh2_connect() in /var/www/html/beta/0sftp.php on line 33 my system is CentOS 6.4 all the required extensions...

0
Q: how to show login username in php

user2468472how to show login username on home page suppose if user name is admin when admin user log in own account then home page show this username is admin please see the links now its showing like this http://www.koolfree.com/ImageUpload/uploads/1380106000.jpg and i want like this http://www.koolfr...

0
Q: i am writing code to conduct online test , got trouble in mysql table inserting option

user2787527Code for entering into online . <html> <head> </head> <body> <form action="" method="POST"> <b>Enter Username:</b><input type="text" name="username" value=""/><br> <b>Enter Password: </b><input type="password" name="password" value=""/><br> <input type="submit" value="submit" name="submit"/>

0
Q: Codeception code coverage - file_get_contents exception (c3/report/clear)

MMacdonaldI'm using Codeception with Laravel 4. In particular I'm trying to use remote code coverage so that I can include acceptance testing in the code coverage results. XDebug with remote_enable are configured, and c3.php is installed and included in 'public/index.php'. On Windows everything works as...

1
Q: Split a form into multiple pages

NareshI've got this problem that I can't solve. Partly because I can't explain it with the right terms. I'm new to this so sorry for this clumsy question. Below you can see an overview of my goal. I am using Magento CE 1.7.0.2 In my magento i have a seller account in that i have some fields like cat...

-1
Q: Sql query empty result on php code

George Kourouleas$publication_year = $_GET['publication_year']; $conn = db_connect('guest'); .... $query.=' ORDER BY publication_year DESC'; $result = $conn->query($query); if(!$result) { echo 'Could not run query: ' . mysql_error(); echo mysqli_error($conn); } returns on my website Could not run query...

0
Q: PHP DOMDocument and Javascript

markmbI've just started with PHP DOMDocument because of another question I asked and I have questions about JavaScript. I've been told to use DOMDocument and not regular expressions to parse HTML, and it seems a bit easier, and with a more clean code. Now I'd need to extract a JSON string from the HTM...

0
Q: fine uploader resposeJSON

AndrewI wrote the following code, I expect a JSON object but instead I restitutisce always a string with the name of the file. var app=$('#failed-fine-uploader').fineUploader({ request: { endpoint: 'media/upload.php' } }).on('complete', function (id, name,responseJSON) { alert(responseJSON.success); ...

0
Q: Cant figure out MySQL PDO update

user2810669I have a script designed for updating a users profile on a website I'm developing, and I can't figure it out. When I click submit on the website, nothing happens, I have a form setup and all, and I get no error messages what-so-ever. Any ideas? if(isset($_POST['username'])) { try { ...

0
Q: PHP - Sorting multi-dimensional array

user2810556i'm Fabio Masino and i'm italian, so my English may be not perfect. I would like to realize a method for sorting football groups by points (sorted as numbers, in descending order), then by goals scored (sorted as numbers, in descending order), then by name (sorted as strings in ascending order...

0
Q: Yii framework where in clause

Set outI am trying to fetch result with where in condition $email = 'test@gmail.com'; // This works $email = 'test@gmail.com,test1@gmail.com'; // This fails $users = User::model()->findAllByAttributes(array('email'=>array($email))); print_r($users); Where i am wrong.

0
Q: Trying to populate a drop down list with jquery and ajax

AjitHere's my code :- <script> $(document).ready(function(){ //#This script uses jquery and ajax it is used to set the values in $("#day").change(function(){ //# the time field whenever a day is selected. var day=$("#day"...

0
Q: JQuery column total along with other validation

user2230967I have created variable number of tables having two columns (heading and value); as I wanted to enter values vertically downwards. The values are validated and on wrong entry cursor does not proceed. I want now that the columns-wise total should be updated. I have given variable class name for va...

0
Q: Google Map API download map

Bruce Elenois McGravy my question for professionals I think may be stupid but I had a problem which regards to search for my solution for my problem. Technically I am developing social networking site and I want to integrate Google Map API and my question is, is there any way that I can download the crop image so that...

0
Q: php: execute query with PDO OCI

user837758I'm trying execute simple script, but can't get result. $id = $_GET['contract']; $dsn = 'oci:dbname=xxx.xxx.xx'; $user = 'xxxx'; $pass = 'xxxx'; try{ $conn = new PDO($dsn, $user, $pass); $stmt = $conn->prepare('SELECT * FROM DOGOVOR.CONTRACT CTR WHERE CTR.CONTRACTORNUMDOC = ?'); $s...

0
Q: Services_Twilio_TinyHttpException' with message 'Failed connect to api.twilio.com:443

Sahin YanlıkHi I am trying to send sms with Twilio api, It works on their web-sites but doesn't work on my local server here is my code. <?php // Get the PHP helper library from twilio.com/docs/php/install require_once('Services/Twilio.php'); // Loads the library // Your Account Sid and Auth Token from twi...

-1
Q: Issue on mysql while copy table

RiKoI have 3 tables. Calls: result, project, save_result. mysql_query('insert_into project (user_id, project_id) VALUES('.$_SESSION['id'].', $_POST['pr_id']) '); $last_id=mysql_insert_id(); Now, I want to copy the table result (user_id, status_id) to another table save_result (project_id...

0
Q: Increment in UPDATE query not going over 4

jr.greenDefenderI have another problem which I have spent hours on understanding and rewriting. On the UPDATE query I included countr=countr+1. I successfully received the keyWords from the mobile application and was also able to store them in the database. The problem is, whenever the same keyWord is passed for...

0
Q: ZF2 Zend\Db\Sql aggregate function as key in WHERE

allapowi found some solutions for Zend\Db\Sql SQL aggregate functions, but they are not working for me :( my old PDO Statement (works with "simple" PDO): SELECT DISTINCT DATE_FORMAT(date, '%e') FROM termine WHERE MONTH(date) = ? Solution for the first aggregate function (only in theory): $select->c...

0
Q: sonata_type_model_list - set default value?

alexHow can i set default value in Sonata Admin for sonata_type_model_list? For text i can: ->add('title', 'text', array('required' => false, 'data' => 'default value')) but i try: ->add('demo', 'sonata_type_model_list', array('data' => 1)) then i have error: Class 1 does not exist If i ...

0
Q: Symfony - Restrict access to a route for users with a particular role

DavidIn security.yml I have routes secured for users by defining the minimum role the user must have. E.g. { path: ^/a/clients, role: MY_CUSTOM_ROLE } Is there a way to negate this access to that the only people allowed through are those that do NOT have this role?

0
Q: If time now is more than 3 hours since last update

KimI need to have a validation that checks if the "last_update" is done before 3 hours or less. I have this PHP code: if($user['last_update'] < strtotime("3 hours")) { $msg .= "You can only register every 3 hour."; } How could this be done?

0
Q: Datepicker positioning not correctly working

Johnny GaleneckiI have a search box, that searches for a range of dates from a period which the user can select using the date picker plugin from jquery. The problem I am having is that the position of the date picker when enabled, is appearing at the bottom left hand corner of the page, instead of directly und...

1
Q: Keys With same values in array

Vishal ParkashOnce I was asked one question in an interview. Below is the question : $arry= array("1"=>"20", "2"=>"20", "3"=>"30", "4"=>"40" "5"=>"20"); I was asked to find the keys which have the same value by using the foreach loop. I still don't know the solution to this question. Any Help??

-1
Q: How to add mintues to date using php?

Nabeel SheikhI want to add 30 minutes to the current date. But if i do so, it displays 1970-01-01 01:03:33. How to retrieve the actual date? Here is my code: $date1 = date("Y-m-d H:i:s"); $newdate = date("Y-m-d H:i:s", strtotime('+30 minutes', $date1));

0
Q: Unable to decide which technology to choose JSP, ASP or PHP

Saurabh LprocksI am going to developed a application for medical practitioner's management which will be both online and offline application. The practitioner may work offline or online*strong text* and app will be synchronized whenever the practitioner will be online. The application will be going to manage ev...

0
Q: Unable to unpack the amazon elasticache package on one instance but fine on the other

JaySo I was installing the AmazonElastiCacheClusterClient On one server with the same base image I got the following(working) response: sudo pecl install ...../AmazonElastiCacheClusterClient-1.0.1-PHP53-64bit.tgz downloading AmazonElastiCacheClusterClient-1.0.1-PHP53-64bit.tgz ... Starting to down...

0
Q: PHP regex Is this the fastest way to get this result?

Mateusz OsuchFinally I have found the solution to get what I want. The only question is - is this the fastest and best way to change post numbers into linked post numbers? BTW: I was asking for advice in this thread: PHP Regular expression with arrows (>>) Maybe someone will find this script useful. $stri...

0
Q: Cakephp and templates

MarcI have been trying to Google this for quite a while and haven't been able to find any "real" answers to the question. I am creating a website using cake and have decided to buy a template at themeforest. Now most of the templates on this site is meant to be used in CMS systems. But what about C...

0
Q: How to return errors from PHP method?

paulI have a save method in my User class. If the save method encounters validation errors it returns an array of errors that I display to the user. However this means in my code I have to write: if (!$user->save()) { //display success to user } Surely my save method should return true on succ...

0
Q: $results gets multiple results back, but only last one gets updated on mysql_query. Would need all updated

crashtestI know this should be kind of simple, but I just can't figure it out on my own. So heres the code: while($row01=mysql_fetch_array($res01)) { $results=stripslashes($row01['spec_search'])." "; $specArr[$row['id']][]=$row01['id']; echo $result; mysql_query("update products set searc...

0
Q: Really annoying character encoding issue with a PHP form

MazzonI'm having a really annoying issue with special characters in a PHP HTML form, everything is UTF-8 yet the special characters still show up as question marks... Here is my current PHP code and i was hoping one of you would notice the issue... <?php header('Content-Type: text/html; charset=utf-8...

0
Q: Extracting leading spaces from the rest of the string

Emanuil RusevI'm looking for the quickest approach to splitting a string into its leading spaces and the rest of it? ····sth should become array("····", "sth") and ·sth· - array("·", "sth·") * · = space

-1
Q: How to delete comments programatically in WordPress

henrywrightI want my bloggers to be able to delete comments via the front end instead of the standard way via the WP dashboard. I wrote a function custom_delete_post_comment() which deletes a comment with a given ID. function custom_delete_post_comment() { $comment_id = comment_ID(); wp_delete_commen...

-1
Q: How to make Facebook login page fit inside 400x400 square?

AtlasI am using Facebook login plugin on my website.When i clcik login with facebook it opens a 400x400 window with window.open() and goes to login.php.If the user has not registered to my site I change the url to facebook login url with Facebook PHP SDK echo "<script>location.href='".$facebook->getL...

1
Q: username and password passed as integers rather than strings

gutigrewalI'm creating a login script and its failing each time even when I input the correct credentials. I firstly thought this was to do with the crypt function which has been explained in depth and have done further research upon to find a good method. Anyway I have remove the crypt function in both ...

0
Q: Codeigniter not_unique

XeganoI am new with codeigniter and I am working with the form_validation of it. I found a function called is_unique which looks if the value is not already in the table. But is there an opposite of this function available? That checks if the value IS once in the table?

0
Q: Retrieve value from an object

NDGI have an object and like to retrieve the value of one or more elements from the object. Hire is one of the objects if put in a var_dump(). object(SimpleXMLElement)#13 (2) { ["@attributes"]=> array(1) { ["name"]=> string(5) "chain" } ["value"]=> string(11) "Abba Hotels" } I g...

0
Q: determine no of pages required during pagination

Mayur BuragohainI am trying to implement pagination.The query,shown below,is used to get the the required no of rows to display per page and also filter some data . The problem is that since i am filtering data in the same query,I am unable to determine the no of pages for the pagination part . What is the bes...

1
Q: Connecting to an external MySQL Server is very slow in PHP

charlieI have 2 MySQL servers. One is the same as my web host and the other is a server in a datacentre. I am using 2 different PHP connecting strings: $conn for the web host database and $pbx01_conn for the other server. Connecting to the web host MySQL server is fine but when connecting to the other...

0
Q: Create setup file for my php application

nikunj kansaraI want to create setup/exe file that includes wamp server, mysql database and my php native code as well. When I click on that setup/exe First of all wamp server is setup in XYZ pc/laptop, After install database and configure database Lastly configure my code with database. I have tried ...

0
Q: composer update with uncommitted changes

nonsenzI'm running into problems when updating vendors with composer in my ci. Composer runs into a conflict and tells me: "... has uncommitted changes." Now I have two questions: Where do these changes come from in the first place? Does a custom intsaller change the sources after the update? How...

0
Q: phpdolphin - How to add facebook style link share?

OfficialAkashSo I'm building a social networking site with phpdolphin and I would like to know how I can add a Facebook style link sharer. As you may know when you share a link on Facebook it shows the title, description and thumbnail. How can I achieve this on my website. Keep in mind I'm using phpdolphin ...

0
Q: Display a limit of 15 elements taken from MySQL (while I am forced to use a LIMIT above 15)

Dany PI am trying to display a list of 15 profiles pictures from my members. There is a column called settings, which looks like 0, 1, 1, 1 I must only display the pictures of someone who has a 1 as the first number above. Since I can't directly fetch people WHERE the first numberis 1, I must fetch ...

0
Q: pairing a match displayed in a loop in a single query php mysql

Edmar CruzI have a query: mysql_query("SELECT * FROM match ORDER BY id ASC"); The results will have these: ID Name Age 1 Mary 18 2 Edward 18 3 Jen 22 I want to pair Mary and Edward because they have the same age: The expected result will be: 1. Mary ID 1 Age 18 match to ID 2 Edward Age 18 2...

0
Q: Many table in mobile navigator

imen bhiriUsing mobile navigator to display web pages, only the content of the first table (data between <table> and </table>) is Displayed. When I combine all data on one table, the information is correctly displayed. tks in advance, Imen.

posted on September 24, 2013 by Connor

I was wondering if any of you know of a api/service that categorizes terms, i mean, something that i can type (for example) "Google" and get the category of: Websites, or "Alexander Bell" and: People. I would like this in order to create an interpreter type script that can take a Search Term, and find what exactly it is (e.g. Parrot; Bird) and find results on that ite

0
Q: htaccess multiple parameter virtual subdomain redirect

user2810836I am currently working on a project, what i want to achieve is to be able to pass multiple parameters to page and redirect ( one parameter as a sub-domain). also i have to do this for multiple added hosts so i don't have a specific domain name and have to use [^.] for domain names. for example :...

0
Q: Sandboxing the exec function PHP

Daniel BraithwaiteI am working on a project for a python tutorial website and this entails me allowing users to execute python code on my website. To do this i am using the exec function in PHP, the code is below session_start(); $code = str_replace("\\n", PHP_EOL, $_GET['code']); $code = str_replace("\\t", " ...

1
Q: PHP/MySQL: Massive SQL query or several smaller queries?

skiwiI have a database design here that looks this in simplified version: Table building: id attribute1 attribute2 Data in there is like: (1, 1, 1) (2, 1, 2) (3, 5, 4) And the tables, attribute1_values and attribute2_values, structured as: id value Which contains information like: (1, "...

0
Q: Override form field error message

tolgapA form I had built has a single exception. To "save costs", an existing property of the Model would be used for this "new field". My target: Change the label of the existing property Change the validation of the existing property Change the error message of the existing property I worked out...

1
Q: PHP Foreach , Where

Robin KnightIs there a way of adding a where class to a foreach equation in PHP. At the moment I am adding an if to the foreach like this. <?php foreach($themes as $theme){ if($theme['section'] == 'headcontent'){ //Something } }?> <?php foreach($themes as $theme){ if($theme['section']...

-3
Q: Warning: Cannot modify header information - headers already sent by... - cannot update database

user2796717I have the following code to update my database (change a password). I know the method I'm using is a bit old school but the website is only being used as a test. I've copied the code from another website and have used it before to carry out INSERT query's (not UPDATE). For some reason the datab...

0
Q: how to customize the news feed posted from an app on facebook

ssenguptai have developed an app on fb which has a bragging option which allows users to post their stories on their time line. After the user chooses to share the story it comes up on the time line with options to like,comment, unfollow and share.... is it possible to design the news feed in someway to h...

0
Q: Login Check using jQuery, Ajax & PHP

Ritesh AI have been trying to understand how jQuery works while checking the login details of a user. I have created these pages: db.php (DB Connection) signin.html (Login Form) check.php (Login check - MySQL select) myscript.js (jQuery) Signin Form: <script src="js/jquery.min.js"></script> <script ...

0
Q: to change format of date in php

zayaI have got date store in my database in datetime format,whereas in my view page I need to display date in different format. My current query in model is- function get_date($id) { $query=$this->db->query("select `created_time` from `comments` where `post_id`=$id"); $query2= $query->res...

0
Q: Add a multidimension PHP Array at the end of each item of a multidimension array

KandariHere are the two Multi-dimension arrays explained. // Categories Array $categories = array( array('cat_id'=>'1', 'cat_name' => 'Category One', 'cat_data' => 'Some Data'), array('cat_id'=>'2', 'cat_name' => 'Category Two', 'cat_data' => 'Some Data'), array('cat_id'=>'3', 'cat_name' => 'Ca...

0
Q: fail send html email by using php

Abdullah Al-hazmyI have problem when i try to send html email by using mail() on php , when i try to using this code it`s working perfect $bodyhtml="<html> <head> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type' /> </head> <body> <div dir='RTL'> <p dir='RTL'> <table>...

0
Q: Radiobutton associated array php

user2810895I've made an associative array with colors ('1'=>'Blue',...). Now I have to make radiobuttons, each should represent a color? How can I do this with a foreach? I've this code: foreach($maanden as $key => $maand):?> <option value="<?php echo $key; ?>"><?php ec...

0
Q: Facebook Like Button doesn't work

levent kayaFirst sorry for my nooby questions, i've checked almost everywhere but i couln't the right answer. There are lot of documents and tutorials but in development its changing. However, my problem is, i have a fan page that has a Tab which is integrated with my app. I just want to check sessions th...

0
Q: PDO, memory issues, entities and collections

Ashley BickerstaffI am building an abstraction layer for a data provider. Each component of the data has it's own repository which returns collections of entities. The repository has three public methods: public function fetchAll(); public function findById($id); public function find(Query $query); When the...

0
Q: using dropdown list to select entries based on two tables

user2794549I wonder if someone can help with this. I'm a php/mysql newbie and would appreciate some assistance with dropdown lists. I have two tables. One called simply "type" which contains a list of animal species type with 2 columns, a unique ID "IntTypeID" and a species type name, birds (ID=1), butter...

0
Q: CodeIgniter template to autoinclude header and footer

Beniamin SzaboSo. I am using CodeIgniter to create a simple website. On my website I have a header and a footer that I must load on every page. And I was wondering if there is a way to create a template that will automatically load the header and the footer on every page.

0
Q: wp_mail sending multiple emails

danyoI have the following function in my themes function.php: function user_profile_update( $user_id ) { $site_url = get_bloginfo('wpurl'); $user_info = get_userdata( $user_id ); $to = $user_info->user_email; $subject = "Profile Updated: ".$site_url.""; $messag...

0
Q: PHP variable in javascript is not getting updated

Lars KerffI'm trying to pass a php variable (number) to javascript. It kind of works but as soon as the number changes, it's not getting updated. My code: $totalamount = $woocommerce->cart->get_total(); $totalamount = preg_replace("/[^0-9\.]/", "", $totalamount); $totalamount = number...

0
Q: Magento 1.7 - Custom module, call function

s4lfishI created a custom module where i want to show some information about an product. In config.xml i added <blocks> <mymodule> <class>Namespace_MyModule_Block</class> </mymodule> </blocks> The block class extends Mage_Catalog_Block_Product_View. But i can't call $this->getProduc...

0
Q: HTTP OPTIONS request on Azure Websites fails due to CORS

Uzair SajidI've recently moved our servers from Rackspace CloudSites (running on Apache/Linux) to Windows Azure Websites. Since the migration, all the jQuery AJAX requests on our REST API have started failing due to CORS. We use custom headers, so jQuery makes a Pre-flight HTTP OPTIONS request before runni...

0
Q: how fix an error Creating default object from empty value

user2753885I've a script with variables in a class ($slug). When I run this script, it works, but I get a warning: Warning: Creating default object from empty value. I know, I can hide this warnings in my php.ini, but how can ik fix this warning? $test = new myclass(); class myclass { private $or...

1
Q: issue with single double quotes in php

M Shahzad KhanI am having issue with single and double quotes in function and its parameters. Here is my code $prev_page_arrow= "<span class='pagn_prev' onclick=\"send($where,'Page_{$this->name}=$prev&amp;{$this->rppGet}{$this->query_string}#$this->anchor');\" >Prev</span>"; The problem is with my $where pa...

-5
Q: How to make notification

Vladimir MrksicI have a problem,I dont know how to make notifications like this http://s22.postimg.org/sob0sxm1d/slika.png .If someone can explain to me step by step or send me an example

0
Q: Can't echo PHP variable

user2598619I am trying to build up a CMS. I don't want to use a template, I want to do things a bit more advanced and therefore I will need to make many tables and many rows to achieve the same effect because each page will have a different design. So, in the index.php I have 7 text fields that I want to ...

0
Q: php and html - Pop Window asking for "Save or Open File" when i click on href

user2810984I want to get a Pop Window asking for "Save or Open File" when i click on href. And i want to use only PHP and HTML only.( No Jquery,Javascript etc ) Code is: <?php listDirectory("."); function listDirectory($path) { $handle = @opendir($path); while (false !== ($file = readdir($han...

0
Q: Get the password of a Protected Post in functions.php

Joris KrawczykI am working on a Wordpress theme, and I would like an author to send an email to someone when a Protected Custom Post is published. How to get the password of a Protected Post in functions.php? I already created a metabox field (for the e-mail) and I am using PHPMailer() in my functions.php fi...

0
Q: php SimpleImage library keep updating the original file. where is the error?

Jacopo Grassii've to manipulate some images with php and decided to use this library as it seems to fit my need perfectly. but the save() method continue to overwrite the original file instead of creating b.jpg my php file is this: <?php include "lib/SimpleImage.php"; $img = new abeau...

0
Q: PrestaShop1.5.5.0 module Authorize.net AIM (1.4.4) not showing on Payment Page

vanuragI am using PrestaShop 1.5.5.0 and I have installed Authorize.net AIM (1.4.4) from the Admin's modules Payment and Gateways tab. I have Provided Login Id and Keys for Authorize.net Terminal Account and enabled the Test mode. The Authorize.net module isn't showing on my payment page. In fact it i...

0
Q: return post data on server side validation failure

Mohammad FaisalI have a large registration form and if a user makes any mistake and failed on server side validation then how could I show up the fields which were previously correct. How can I send the post data back to the registration form?

0
Q: Propel subqueries in select

AxelI need to find article from database, and also the next and previous id of the neighbours. Right now i have 3 queries that work - first two are without the find() method - i know that. $artNext = ArticlesQuery::create() ->filterById(array('min' => $artId + 1)) ->filterBy...

0
Q: certain characters behaving unusually within htmlentities function

user2014429So first I noticed when an ampersand (&) is in the htmlentities function it will count the ampersand as 5 characters. So this code: $a = htmlentities("&12345"); $b = substr($a,0,6); echo $b; would echo '&1' as, I believe it is counting & as 5 characters. more interestingly is with the GBP s...

0
Q: PHP - Mysql select AND OR

oliverbjI have this PM system, where users can write each other. When I show the available PM's I have in my MySQL table deleted_sender and deleted_receiver If the deleted_sender is 1, then the person who sent the PM shouldn't be able to see it in the list. If the deleted_receiver is 1, then the person ...

0
Q: file_get_contents error whilst using aviary

Barry WattsI have embedded aviary into my webpage and it is working fine but I am unable to use the file_get_contents command to grab the saved image the aviary code: JS: <!-- Load Feather code --> <script type="text/javascript" src="http://feather.aviary.com/js/feather.js"></script> <!-- Instantia...

0
Q: php openssl: how to match the private key with the certificate

DundarI have a self signed signature which contains the certificate itself and the private key. My purpose is to check if this private key matches with the certificate. What I do is the following: $private = openssl_pkey_get_private("path/to/certificate"); $public = openssl_pkey_get_public("path/to/...

0
Q: Auto login yahoo.co.jp using curl or OAuth

Nathan SriviI am trying many ways to yahoo auto login. first i am trying curl. But its not working properly. My coding working fine only yahoo.com not yahoo.co.jp. its ask captcha for auto login time. i am really confused. My curl login Question link : LINK Now i am trying Yahoo Yconnect OAuth. But this ...

0
Q: /var/php_sessions not being recognized

FrantumnI'm trying to set up Joomla as a CMS for a web site I made. I have the site hosted with Globat. When I try to install Joomla, I get this message. Warning: Unknown: open(/var/php_sessions/sess_cc24fb3a1ba0e66a653237dd88762ac6, O_RDWR) failed: No such file or directory (2) in Unknown on l...

1
Q: PHP exclude information from xml

lokoI want to exclude just the <img> tag(ads in a newsfeed) from an xml file to be shown at my php file. I know that these should work to remove attributes but isn't there anything else to just remove the img from being shown? I think there has to be another way for this and would like to know what p...

-1
Q: Textbox language change should be changed to arabic while adding text

viral vasaraI have one textbox. I want to make like that when i enter text in it, text should be converted to arabic language. i want to do it by javascript. If there is in library needed for that? please give your ideas. I have did like this: <script src="jquery.js" type="text/javascript"></script> <scrip...

0
Q: Using MySQL CASE to update 1000s of rows

artparksI have a table keeping track of usage by customers, a simplified structure having the columns id and voice_activity. id is the index and voice_activity expects a date as MM-DD-YYYY which indicates when usage was last shown. I need to process large log files (CSV up to 200k lines) which is workin...

0
Q: Server disconnects when rendering symfony 1.4 template

Simon CastI'm trying to track down an intermittent problem. On certain actions/pages the user ends up with a server dropped connection error and reloading the page produces the same problem. I've checked the logs and Symfony goes all the way to sending the content of the page but nothing is actually sent ...

-1
Q: Live video Streaming using php

Rakesh RajanI want to make live video streaming in website. I'm a php developer but a beginner. The video will be captured using camera and should be recorded in laptop. The component shown in the image is used to import the live coverage into laptop from camera. They dont want to embed the video in fre...

0
Q: php trim doing more than I want.

FrantumnI'm trying to get a list of mp3 files within a directory (/music/category/). Then I trim the directory, and then trim the mp3 extention. The problem I'm getting with some files is that if the file name begins with the letters a,u,d,i,o (audio) as found in the string of line 1, it trims them. S...

0
Q: Formidable Forms Wordpress Plugin

johnI have this code: add_filter('frm_get_default_value', 'form_fullname_value', 10, 2); function form_fullname_value($name_value, $field){ //set array with all form fullname id's $name_array = array(94, 83, 101, 185, 165, 114, 151); //Set value for each fullname field if(in_array($field->id, ...

0
Q: How to show a running progress bar while page is loading

ammuI want to show a running progress bar while my page is loading LINK THIS LINK, in my page . i used a simple loading image in my example but i want to convert it in a running progress bar. here is my code: //Html <div id="loading"> <img id="loading-image" src="http://cdn.nirmaltv.com/images/gene...

0
Q: Is it necessary to to end a php query or function width ';' in html tags?

curiosity4834I have simple question. I'm learning php and I realized that to end a function with ';' is not necesscary if any other function or query doesn't exists. But I wonder, while using php in html tags as in the example, not to end functions can cause any performance and security problems ? <?php fore...

0
Q: Optimising Select number of rows in PostgreSql for multiple group by fields

rohitmbI have this query to get number of rows for the given filters, it takes too long time to get the result since db is too big, is there any way to optimise it i'm using postgresql 8.2 SELECT COUNT(1) as numrows from ( select lower(column1) as column1, column2, column3, column4, sum(column5) as co...

0
Q: Deleting a directory including a file that is currently being downloaded by a client

Cummander CheckovImagine the following scenario: Client (browser) calls a PHP script Script generates a ZIP file in web_root/downloads/tmp/test.zip Script returns headers accordingly and therefore initiates a download of that ZIP file Script terminates the directory web_root/downloads/tmp/ What could happen? ...

0
Q: new ajax request on scorll down

rexhinthis is my jQuery $('#banner').click(function (){ $('#dropdown_c').toggle(); //ajax request function recall(){ setTimeout(function () { xmlhttp = new XMLHttpRequest(); xmlhttp.open("GET", "http://localhost/ajax/not_data.php", true); ...

0
Q: PHP: send an email alert based on a value (integer), but to avoid sending duplicates if the value does not change?

ArnoldJRimmerI get data from a server every 15 minutes. The data is numbered 1 to 10. If the number is equal to or greater than "2" I want to send an email alert. But I can't figure out the logic to avoid sending duplicate alerts if the value doesn't change. Here's the lowdown: The PHP script will be run by ...

0
Q: Php formulae to calculate new lat long position to specific distance

askkiratiI have a Latitude and longitude points. Now i need to move them say 0.25 miles to any direction in map. I am using google maps. I want to do this in php. Reason I want this is to not pinpoint accurately to user submitted address instead scramble few distance away. Is there any algorithm available...

0
Q: Dynamic creation of host groups in zabbix for a period of time

opensourcegeekCan zabbix be used to create host groups for a period of time adding hosts dynamically and removing hosts after period of time?

0
Q: mySQLi Debugging Issues

user2587774I actually have this PHP code, which i use to obtain my database info.. function searchUserEmail($username, $raw_email){ //Prepare Statements $query = "SELECT * FROM users WHERE username = ?"; $query2 = "SELECT * FROM users WHERE email = ?"; //Sanitize Input $user = $this->conn->real_escape_stri...

0
Q: .NET sha1.ComputeHash encryption hex array equivalent in PHP

geoidesicHow can I recreate this .NET hash in PHP? byte[] bH = Encoding.UTF8.GetBytes(sT); SHA1 sha1 = SHA1.Create(); byte[] hB = sha1.ComputeHash(bH); StringBuilder hS = new StringBuilder(hB.Length * 2); foreach (byte b in hB) { hexString.AppendFormat("{0:x2}", b); } finalValue = hS.ToString();

0
Q: Zend Form in Modal - Submit Form

nielsvI have a question about using a zend form in a twitter bootstrap modal. This is what I have: In my Controller: public function accountAction() { $form = new Form_CancelAccount(); $this->view->form = $form; // Some executions and view params for the view, ex: /*if ($user->getRe...

0
Q: In RabbitMQ why exchange accepts messages on second run?

Emil RoyzmanSo the situation is. I'm working with PHP PECL AMQP RabbitMQ client. When I'm trying to send a message to exchange for the first time, nothing happens. It seems that the message haven't been sent, and AMQPQueue::get returns nothing, even though AMQPExchange::publish returns true. After that (i....

0
Q: Mysqli query in one line

Jason LipoThe current procedure I am using to run a simple SQL query is the following: $a = $mysqli->query("SELECT column FROM table"); $b = $a->fetch_assoc(); $c = $b["column"]; This uses 3 different variable names and it gets frustrating trying to come up with suitable names. I think that in the proce...

 
00:00 - 13:0013:00 - 00:00

« first day (217 days earlier)      last day (93 days later) »