« first day (289 days earlier)      last day (21 days later) » 
00:00 - 18:0018:00 - 00:00

12:02 AM
-1
Q: php elseif - unexpected { prob

user3037906Please help, this is very simple Elseif giving error - Parse error: syntax error, unexpected '{' - after '/e/contact_us.php' Why? How to write it correctly? if ($_SERVER['PHP_SELF'] == '/e/index.php') { include(DIR_WS_BOXES . 'whats_new.php'); } elseif ($_SERVER['PHP_SELF'] ==...

0
Q: CakePHP: make requests to external API's before inserting data

jesusbetI'm developing an app with cakephp 2.x, I'm really a newbie to cakephp and this could be a silly question. The app will be used to store social network posts (youtube videos, facebook posts, twitter tweets, instagram photos). The logic is very simple: 1. User finds an interesting post on any o...

0
Q: DateTime::diff always return 0 for all interval structure elements

jstuardoI have a problem with DateTime:diff function in PHP..... it always returns 0. This is the code: $intervalo = ''; if ($tipo == 'MEN') $intervalo = "P1M"; else if ($tipo == 'SEM') $interval...

0
Q: Could you ever legitimately have an occurrence of "}{" in a JSON string

Rodgers and HammertimeI am generating a sequential string of independent JSON strings for insertion into a single field in my database (the means justify the end), and am wondering if a JSON string could ever legally have an occurrence of two opposing(ly) faced curly braces such as }{? As I would like to use this patt...

0
Q: Grab certain text from within a string with PHP

user3063495I am new to php, and I am trying to write a script to grab text from within a string. How can I do this? My String: $string= "http://techcrunch.com/2013/12/04/publishing-platform-medium-keeps-iterating- with-new-photo-layout-tools-and-collection-controls/"; I would like to just have: $str...

0
Q: Memcached 3x addServer

user2965619$memcached = new Memcached(); $memcached->addServer('127.0.0.1',11211); $memcached->addServer('127.0.0.2',11211); $memcached->addServer('127.0.0.3',11211); For what needed to set 3 servers at one instance of Memcached? That mean when i use $memcached->set('some_key','some_value') than d...

0
Q: Using column alias with Postgresql within PHP

user3068093When a column alias was used like below to get data from Postgresql, the PHP code doesn't run. However, when I don't use column alias, then the PHP code works so I know that my PHP code is correct. Is there a way to make column alias works from Postgresql and within PHP framework? Thanks! $SQ...

0
Q: Arrange Returned PayPal IPN Data For Multiple Cart Items and Echo to Page

Josan IrachetaI have a PayPal-integrated form where a buyer inputs customized info to order a custom item. The form looks something like this: <input type="text" name="option_select0" placeholder="choose length"> <input type="hidden" name="on0" value="length"> <input type="text" name="option_select1" placehol...

0
Q: Problems using homemade mod function to index array

user2411121This is one of those questions where each little part seems to do what you want it to, but they won't work together. Big picture: I'm running an experiment where each new visitor to the web page is automatically assigned to one of six conditions (we'll call them "A" through "F"). All I need is...

0
Q: In PHP How to display a users information once they have correctly logged in

user3068091I have searched an tried many examples and solutions and come to the same problem and would be grateful if someone could help. Essentially I have the database connected and when they log in correctly the page is directed to the login_success.php. Once taken to the page I want the user to be show...

0
Q: ZF2, Doctrine, Entities, Services and Manager

macheteI'm really trying to get my head around on how to build a neat architecture. The most common approach when using ZF2 & Doctrine is to implement a Service, which is basically a facade for the EntityManager. In most common cases a (e.g.) UserService would implement something like findAllUsers, find...

0
Q: exclude sidebar from specific pages

anmareeI want to exclude the sidebar from one more specific page I have this: <?php if (is_page('Forum')) { } else { ?> <?php get_sidebars(); ?> <?php } ?> But I want to add another page I tried this: <?php if (is_page('Forum'), ('Shop') { } else { ?> <?php if (is_page('Forum','Shop') { } else { ?

0
Q: php mysql duplicate records

unalHow can I get the image at double records ` $calistir = mysql_query("SELECT *, (SELECT COUNT(*) FROM siparis_kayit t2 WHERE t1.ip = t2.ip) FROM siparis_kayit t1 order by id");` $ip = array(); $count ...

0
Q: Folder structure for developing Zend Framework 2 applications on Linux

DNoeWhat is the best organizational structure, starting from the server root, of all files required to build multi-module applications with Zend Framework 2 within an Linux/Apache environment? I am using Ubuntu, but I think this should not really matter for this question. Consider that multiple dev...

0
Q: Doctrine relation between tables

user1954544Here is a question. I Have several tables. User (primary and auto userID) - id - name Key (primary, not auto keyID) - userID - id - value Info (primary, not auto keyID) - keyID - infoName Person (primary, not auto keyID) - keyID - personID - personName So as you can see I use auto incremen...

0
Q: Counter variable not working?

vsingal5I'm writing a function to count syllables of a word as follows: function estimate_syllables($word) { $total_count=0; foreach($word as $w) { $syllable_count = count_english_vowels($w); $total_count += $syllable_count; } ...

0
Q: Enable Not Null Textbox

BongskyI have an array of Textbox, by default they are all disabled... Some Textbox are empty some are not based on the return values of my query... while ($imps_row1 = sqlsrv_fetch_array($stmt_line_util3,SQLSRV_FETCH_ASSOC)) { echo "<tr>"; echo "<td><input type='text' disabled='disabled' ...

0
Q: jquery script works only on firefox

user3067123After 2 weeks of hard work on my first, simple site/database I'm stuck. Friend of mine helped me on adding jquery, but now it works only in Mozilla, and he dont have idea why. I dont know java at all (and barely php). Can you take a look? Chrome console point an error at Uncaught SyntaxError: ...

0
Q: using PHP to get information in xml file. How to make it shorter and expandable in the future?

Muhamad Syahir Mohd HashimThese are the working codes that i have done. the program is about accessing information in an xml file such as student's name,id and marks based on group and team number submitted from a form. there are 2 submit buttons if one button is clicked, it will display with an additional element (pic) a...

0
Q: PHP default input value won't change on save

DT.DTDGI have set a default value of the input to be that of the server, however, if I change it on the site, it saves but reloads with the default value. I want it to display the default value at the start but if I change it later it should update the default value. <label for="site"><strong>Site:</s...

-1
Q: Load custom css after bootstrap

BarbaraI have this in functions.php. How can I modify it so that my custom css is loaded after bootsrap.min.css? function register_css() { wp_register_style( 'bootstrap.min', get_template_directory_uri() . '/css/bootstrap.min.css' ); wp_enqueue_style( 'bootstrap.min' ); } add_action( 'wp_enqueu...

0
Q: Opencart Images not displaying

TravisOk so i moved hosting. Everything is working great except i cant get images to show up on the site. The only place that they show up is when you are editing the product on the image tab. No images are displayed on the list of products nor on the front end. I have no idea what is going on here. ...

0
Q: Drupal: Custom Field Just Disappeared?

BrittanySuper weird; I created a custom field (called Opening Paragraph) for one of my content types (Page) ages ago, and it was working fine. I clicked onto my site today, and all of the sudden, that field and all of the existing content in it has disappeared. Does anyone know why this might be?

0
Q: Netsuite Add Order PHP Toolkit

user2570937I'm trying to add a sales order into netsuite using their PHP Toolkit however It is throwing an error. Custom price level id is 1 ADD ERROR Any ideas what I'm doing wrong? I'm using their sample file they included. <?php require_once '../PHPToolkit/NetSuiteService.php'; $service = new NetSui...

0
Q: Show data as checkboxes from 2 related tables

Nuwan FernandoI have related data in 2 tables in the database. Let's say table A and table B. Table A data is shown in the form as check boxes. And those check boxes only should be checked if those values are in Table 2. I hope you got the point. For clarification please find the attached images. Your help is ...

1
Q: send text from ckeditor with Ajax and show in page

phpKoderI'm using ckeditor in a footer and trying to write a code that when user is typing a word in the ckeditor, the text appear in another div; so, I wrote this code: jQuery: $('textarea').ckeditor( function(textarea){ CKEDITOR.instances.editor1.on('key', function() { var data = CKEDITOR...

0
Q: PHP Displaying an image as part of search results

user30639080 down vote favorite I have a search page on my site which basically has a text box which prompts the user to enter a postcode, when the postcode is entered and submit button clicked you are shown a list of details as hyperlinks related to the search. When an hyperlink is clicked you are taken t...

0
Q: When php.ini is present PDO disappears from phpinfo()

jerrygarciuhI have added the following php.ini (this is 100% of file): upload_max_filesize = 200M post_max_size = 200M session.gc_maxlifetime = 6000 max_execution_time = 600 When it is present the phpinfo() lists PDO in the configure command but nowhere else. The drivers, API version and SQLite version ar...

0
Q: How exactly does the mail() function work in PHP?

user2848575I am a PHP beginner and I am wondering how the mail() function in PHP works? I read on W3 Schools that the syntax is: mail($to, $subject, $content, $headers); But then who is the mail from? Does auto-asign a random email, or can you configure it? After doing some digging I found that the mai...

0
Q: export to excel using php

user3064692im trying to make a report in excel using php. below is my codes and its functioning but i dont get the right output that i want to appear in my excel. it seems that all the data in my form is included. what i want is only the data in my database to be print. can you help me to solve my problem? ...

0
Q: Facebook wall style image viewer using Twig - Symfony2

Lander MartinezHere is my problem: I have a facebook style wall, which loads the "posts" dynamycally, and in these posts go images too. I get the posts from the controller when the pages load, and I use the Twig loop structure for loading them(short example): {% for user in users %} <img src="{{ asset('u...

0
Q: How to append every array element to the previous array elements in a foreach loop

Nick ShearsI've tried my best but I can't seem to figure out how to even word the question correctly for this. So I've started off by splitting up a string into an array where spaces occur. $str = "a nice and sunny day today"; $split = explode(' ', $str); How could I possibly be left with an array that...

-1
Q: PHP : Copy database or delete database based on checkbox clicked

airiplease help me. i trouble to do this task Let say i have 2 database. First database have (id (auto increment) , numb) .. Second database have ( id (auto increment), numb_id, numb ). The first database already have its data and the second database is empty database. So, what i want to do is, If ...

0
Q: CakePHP: Apply bootstrap.css only to content of certain views, not layout

Stephen JamesI am developing a site with a designer, and he already coded the entire static webpage with HTML/CSS. We needed an admin backend and an Auth component, so I figured a simple CakePHP app would work well, instead of hacking together a custom PHP/MySQL solution. I converted all of his static pages ...

 
1:27 AM
0
Q: Unable to run matlab from php in windows?

user3051202I am calling returnX.m file in my PHP code. Output of Program is not displaying anything reutrnX.m file placed in C dir, and initially i had placed in matlab bin dir. function x = returnX() x = 100; display(x) end Here is my PHP program trying to call this file and display ou...

0
Q: How does top comment in facebook or youtube works?

ILikebananaI've searched everywhere else, but I could not find any reference or tutorials that shows you or explain a best way to show top comments (like the one on facebook, or youtube). I have accomplished fetching records (20 top comments that is order by their points). But where I always get stuck at ...

0
Q: Invalid characters at end of PHP Phar file print to screen on production server but not on local server

whelanskaI built a Drupal website with a custom module to integrate functionality from a company called MemberSuite. MemberSuite's PHP API is in a .phar file. I have little experience with .phar files, but everything works great on my local Ubuntu machine. After I uploaded everything to a live server, I ...

0
Q: Parse error: syntax error, unexpected T_VARIABLE in /hermes/bosoraweb081/b2603/ipg.glcmcrusaders/cyc/wp-content/themes/Nimble/connect.php on line 5

user3068255New to PHP...I am not understanding what is going wrong. if (mysqli_connect_errorno()) { echo "Uh oh..MySQL connection error: " . mysqli_connect_error (); } my echo statement is what is coming up as the error.....is this wrong?

1
Q: Table already utf8 charset, but still not storing foreign text properly

vephelpTable Charset mbstring installed extension=php_mbstring.dll mbstring configured mbstring.language = Neutral mbstring.internal_encoding = UTF-8 mbstring.encoding_translation = On mbstring.http_input = auto mbstring.http_output = UTF-8 mbstring.detect_order = auto mbstring.substitute_charact...

0
Q: Find static map image coordinates from two markers

bohwazMy idea is plain and simple: I've got a map as an image, that can be either a scan of a printed map, or a SVG map from Wikipedia, or a screenshot of Google Maps. I have for that map two lat/lon coordinates, and the user clicks on their position on the map, so I know their corresponding X/Y posi...

0
Q: javascript checkall/uncheckall checkbox for loop

NewPHPI have a webpage to display multiple checkboxes for each loop values. I did the below code for that purpose. It is not working well. <? $idArray=array(); foreach($this->login as $login): $idArray[]=$login['id']; endforeach; $count=count($idArray); ?> Javascript Function <script type="text/jav...

0
Q: Flicker changing CSS with ajax

user2761456i have a datetime.php which contains $hourdiff = 7; // Replace the with your timezone difference $hour = date("H",time() + ($hourdiff * 3600)); $min = date("i",time() + ($hourdiff * 3600)); $day = date("d",time() + ($hourdiff * 3600)); $month = date("F",time() + ($hourdiff * 3600)); $year = da...

0
Q: How do I update my php version?

PixelCheese<?php phpinfo() ?> says that my version is 5.2.0 and I want to update to the latest version. We are using the IIS, and I can get to PHPMyAdmin but I've been looking online and there wasn't any clear instructions on how to update your php. If you could point me in the right direction, i'd grea...

0
Q: Rabbitmq Consumer hangs when using PAMI open()

TimI have an rabbitmq consumer(oldsound) in a Symfony 2 project, when it consumes a message that should dispatch an event that makes a call to a PAMI Client->open(), for some reason every once in a while if the open() hangs or times out, the consumer is hung forever until we kill it and restart it. ...

0
Q: PHP preg_replace() with a pair of curly brackets, but ignore the ones with 3

user702300Wanted to know if this is possible $c = "The color {{ white }} will become {{ white }}."; $c = preg_replace("#{{\s*white\s*}}#", "black", $c); the result will be The color black will become black. Is there a way to ignore it if it's enclosed with additional { and } or any other character s...

0
Q: contact form php mail code is not working

user3068297This is my website : http://www.iamshahil.com , I have a contact form in my index page and i want the submitted data from the contact form to be sent to my email. i have a code but that does not work and my submit button is not being able to be clicked. Here is my form : <form method="post" ac...

-1
Q: How do I make a submit button display data? (PHP)

user2779572Im creating a website and it has a quiz and I want there to be a button that says begin (already created) and when the button is clicked the quiz starts (all the questions show up etc) but i dont know how to make the button display all this text without just linking it to another page? This is my...

0
Q: Execute Python game in Pygame from PHP script

SashaHere is a little synopsis. I have two chunks of code with me. One is a game written exclusively in python using pygame. The other is a learning management system(LMS) written in PHP/HTML/CSS. The user can click the play game option in LMS, and thus control would be transferred to the python progr...

1
Q: Why do my session variables unset when I don't call the href that unsets it

user3068310In my PHP program I have a few links that all link to the same page. What it does is update the current site depending on my action and I send new information through a GET or if I need to unset my session. In one link to the same page, I am calling unset($_SESSION['search']) and in the other I...

0
Q: posting data to server with jquery and downloading response as file

user3068322I'm creating a file server, where users can optionally encrypt their files, and ideally enter a password in the browser to decrypt them on the fly and download them (in a chunked fashion of course, easier for PHP). The decrypted data should never be saved to disk. So right now the user enters t...

0
Q: using date() and receiving a wrong format

user3064038My code only returns 12, ofcourse December $event_date = date('m-d-Y', strtotime($_POST['event_date'])); What should I do to make it December 05, 2013 and including the time? My event_date is integer(10), what must be the correct type?

0
Q: How to get fetch the top comments?

ILikebananaI've searched everywhere else, but I could not find any reference or tutorials that shows you or explain a best way to show top comments (like the one on facebook, or youtube). I have accomplished fetching records (20 top comments that is order by their points). But where I always get stuck at ...

0
Q: multiple PHPSESSID cookies and browser doesn't keep any

G45I'm getting 2 PHPSESSID set cookies headers from a login request from my yii application. Date: Thu, 05 Dec 2013 02:19:44 GMT Server: Apache/2.2.22 (Ubuntu) X-Powered-By: PHP/5.3.10-1ubuntu3 Set-Cookie: PHPSESSID=3lkhjlsv967n56horpcl3n7gl5; path=/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache...

-2
Q: Return array's element thst is not set?

Miron TvangesteI have an array $lang containing several keys=>values $lang['Contacts'] = 'Kontakte'; etc how can I grab the array's key's name ('Contacts') IF THE VALUE IS NOT SET and the array element is not in array at all. example of what I need and what doesn't work: function lang($txt) { global $lan...

0
Q: HTML2PDF Image Error Impossible to Load the Image

user1109244I am using HTML2PDF and I am trying to make images appear but I keep on getting this error: ERROR n°6 File : /var/www/vhosts/default-domain.com/httpdocs/html2pdf_v4.03/html2pdf.class.php Line : 1321 Impossible to load the image /student/questions 3rd/images/small1324538668Number Lines 5.JPG C...

0
Q: Yii pagination showing fewer items than available

PocoI have a simple CGridView that is fed from a CActiveDataProvider. At the moment, and I'm not sure how long this has been happening, it does not show all the data items in the view with pagenation enabled. My header shows "Displaying 1-7 of 9 results" but there are not buttons for more pages. I...

0
Q: Single-sign-on project baseed on CAS

Brutal_JLI have worked on a single-sign-on project serveral days. Now I have some problems. I have two client,one is php client,another is java.Now I find that php's redirect Url don' have the parameter 'tickect'. How to configure the php client to not use HTTPS protocol? How to logout java client when ...

0
Q: Save a form with ajax and php

Andrey Lima RamosHow can I pass any $_Post[''] with ajax to the php function, when the form is submitted? The function is working with AJAX but it can't receive the post's values. I tested and the alert return null. I am using wordpress. window.onload=function(){ jQuery('#newIdeaForm').submit(function(events)...

0
Q: PHP Warning: Module 'soap' already loaded in Unknown on line 0

user2690257Hi I have a problem with this error: PHP Warning: Module 'soap' already loaded in Unknown on line 0 I am running vps on media temple. I got some instructions from their knowledge base and I followed them exactly as described. However to see if SOAP properly installed i went to the command lin...

0
Q: Is this PHP crypto implmentation secure?

user3068322I'm not a dedicated cryptographer, so I'm looking for someone to look over these functions I wrote and let me know if there are any implementation errors leading to security vulnerabilities. Any other comments about improving performance, etc. would be great too. This is used in a PHP-based fil...

0
Q: How I may get name from mysql database after type id on text box of the html form

NeyI have been suffered from getting student name from database to a text field of my HTML form after typing idnumber of student. Exactly what I prefer to get is! after registering student in student table, When the time come the same student his/her passmark want to be entered, when user start ty...

0
Q: How to load HTML into a <div> using jQuery in WordPress?

Graham SuttonSo this is my buildInputFields.php file, which contains the markup I want to load into my #add_input_fields div located in my articlePostForm.php file. Both files are in the same directory in my theme file: buildInputFields.php <fieldset id="add_fields"> <legend>Add Fields</legend> </fieldset> <...

1
Q: Clean url mod_rewrite not working

zenCurrently I have a url www.mysite.com/folder/details.php?d=sample.com and I want it to change like this one www.mysite.com/folder/sample.com This is my .htaccess file, but it is not working: RewriteEngine On RewriteRule ^([a-zA-Z0-9_-]+)$ details.php?d=$1 RewriteRule ^([a-zA-Z0-9_-]+)/$ de...

0
Q: PHP subtracting strlen($string)

Cocoa PuffsI would like to invert the value of strlen, how would i do this? i.e. $string = "123"; echo strlen($string); 3 I would like it to be: -3

0
Q: Jquery downoad file with progress bar from other server to my server

user3068397I finish my game script for install (copy) and play game from mochimedia and other game server to my server from json or xml feed. But I'm not satisfied I want to make script more much simpler to use :-)rr I want to show progress bar for instal (copy or download swf file from other to my serv...

0
Q: php register script not adding to mysql database

Amy Jenningsjust wondering what im doing wrong here guys. This is my register screen, im using an older version of php as im following a tutorial. The script so far detects missing fields and existing usernames, however when i try to register new user it doesnt add to the mysql database??? <?php session_sta...

0
Q: How to pass javascript variable to php inside javascript function

VincentI have a js file . is it possible to do inside the js file a php coding? on my header i include my js file like this.. <script type="text/javascript" src="js/playthis.js"></script> now inside my jsfile: function getURL(e) { alert(e+' javascript varibale'); <?php $url; ?> = e; alert('

0
Q: Parse error: syntax error, unexpected T_VARIABLE on line 5

user3068434I am new to PHP and am encountering this parsing error. My code is: <?php $con=mysqli_connect("glcmcrusaders.ipagemysql.com", "cycregister", "Crusaders13!", "registration") $sql="INSERT INTO camperregistration (camperFirstName, camperLastName, camperGender, cam...

0
Q: I want to calculate the score of the characters in a sentence

MaverickI have a sentence as an input. I want to be abble to calculate the total score of a sentence (a=1, b=2, c=3), according to the letters that form each word. Also, if a sentence has a double letter i want to double its value. Finally, i want to filter out characters different from a-z. Code $wo...

0
Q: My code disappears after refresh php

user3034706Hey my code disappears after refresh. I have used other code on another page that was doing the same thing. Here is the code: $message_id = $_GET["message_id"]; $rs = GetMessage($message_id); if ($rs["poster_id"] != $user_id && $rs["user_id"] != $user_id){ redirect("message_read.php?messa...

0
Q: How to use preg_match when pattern has special symbol

marchemikeHow do I implement preg_match() if my pattern has a symbol? My pattern is "admin/filemanager" what should be my preg_match syntax? $line = "sometext/admin/filemanager/sometext"; (preg_match(??, $line, $matches))

0
Q: Changing URL and retaining values on dropdown onChange event

user1597438I have created a Magento site that has Japanese and English store. For both of these stores, I have almost the same products. I just added additional attributes to add the english texts where necessary such as the name. So for example, in my Japanese store, the product's name is "靴" then in Engli...

0
Q: a script that can load and parse .md2 files in PHP?

DestinyIs there any open source or any tutorials of PHP that can load and parse a .md2 file? Like this one: THESE LINK The link above is not an open source just a demo or can anyone guide me how to load and parse .md2 file or provide me an example script for it? I appreciate so much.

0
Q: Updating php Session variable on image toggle

user3068438I am trying to allow users to add/remove items from a shopping cart by simply clicking an image. I also want the image to change on click to show how many of this item has been purchased. Finally, I want the cart to exist on a separate tab of the same page. What I have so far is: <?php sessio...

0
Q: How to Save Jquery draggable as an Image

user580950I am using the code at jsfiddle at http://jsfiddle.net/py3DE/ Is it possible to change the code such that whatever changes i do on below and click on Submit button the below portion gets Save as Image ( offcourse i will use PHP when clicking on Submit button ) Here is the code.. <!DOCTYPE html>

0
Q: Issue with Codeigniter + Uploadify (Uploadifive) Ajax Function

Mike BarwickI have an upload "document" form that I had running as it should through the normal Codeigniter upload library. However, I need this to work as a Ajax call. I have an Uploadifive (which I purchased), which is the HTML5 equilivant to Uploadify. My issue is a can't get the Uploadifive jQuery Ajax ...

0
Q: Filter Form Parameters Before Submitting

Cindy93Is there a way to check the parameter if its empty or not before submitting? <form method="GET"> <input name="param1" value="test"/> <input name="param2" value=""/> <input type="submit" name="" id="search-submit" class="button" value="Submit"> </form> If i have a form something lik...

0
Q: How to parse data from url. (pretty urls) [PHP]

Tim O'ConnellSo using $_GET[] your url looks like yourdomain.com/index.php?page=home | lets say this loads home I want it to be yourdomain.com/home I don't want to have many folders with a bunch of index.php's either, I want to run everything through the index. how would I go about doing this? Thanks!

0
Q: Parse error: syntax error, unexpected '[' in log.php on line 22

user1834458I have build a login script. But can't seem to get the final login to work. Did i forget anything? I tryed olmost for 2 houres to find my mistake. I hope someone can help me with this. It's pretty importent for me. Thanks For All Help Already! Here is my log.php <?php include "config.ph...

0
Q: how to make a word file using php

Amit Kumar BallThis is my very first question in stackoverflow..... The code in 'clsMsDocGenerator.php', that I am using to make a word file is <?php error_reporting(E_ALL); class clsMsDocGenerator{ var $appName = 'MsDocGenerator'; var $appVersion = '0.4'; var $isDebugging = false; var $leftM...

0
Q: php issues adding product to shopping cart

user3068494I'm having issues adding products to my shopping cart. In order to read it easier I'm only posing the php code. I'm not worried about security issues at this point, just looking to correct the issue with the product not showing up in the cart on the page view_cart.php . Can anyone see what I'm mi...

0
Q: Edit the contents of another page with php

user2957574So I have a simple database for logging in to my website, but i am having trouble with displaying whether or not a user has logged in. $username = $_POST['Username']; $salt = substr($username, 0, 2); $password = crypt($_POST['Password'], $salt); $dbh = new PDO("mysql:host=$dbhost;dbna...

0
Q: how to use ajax to call a php and return a result

VincentI have a code in php where onclick i will call a javascript. but i dont know how to use the ajax and pass the value to php and return it. <script> function getURL(e) { //ajax code. } </script> body: <?php $url = "www.google.com"; ?> <a href="#" onclick="getURL('<?php echo ...

0
Q: Fatal error: Class 'COM' not found Win7 X64

phper2000Runtime environment: 1: win7 x64; 2: Apache 2.4.7 3: mod_fcgid 4: php 5.5.6 VC11 x86 Non Thread Safe PHP.ini [COM_DOT_NET] extension=php_com_dotnet.dll com.allow_dcom = true Code: $word = new COM("word.application"); Error: Fatal error: Class 'COM' not found in....

0
Q: fwrite executed multiple times although not in a loop

Wahyu Setyo BudiI have a code to download file from other server using fopen() and fwrite(). It works good, but the problem is it is executed multiple times which result to multiple images save in my server. The script is not in any loop. Can anyone help, thanks. Here is my code: ini_set('max_execution_time', ...

0
Q: MySQL "NOT IN" Query Optimization

iwsnolaOptimizng MySQL queries isn't my expertise, so I was wondering if someone could help me formulate the most optimal query here (and indices). As background, I'm trying to find a distinct visitor id within a table of transactions with certain where criteria (date range, not a certain product, etc....

0
Q: PHP warnings preventing me from creating csv file

user1815207I am writing a chron task that generates a csv file and emails the file to an address. Due to the fact that the data I need comes from woocommerce(which is a wordpress plugin) combined with the fact that their database design is incredibly poor, I am forced to pull in the wordpress wp-blog-heade...

0
Q: MySql Table Save to SqlLite with PHP

Chin YeI Have a MySql Server with PHP, with those table : Table Name: Tbl_Driver and Tbl_Vehicle. when user press the Download Button, will generate a .sqlite file from MySql Table and let user save to their computer, and user able to upload this .sqlite to Android Device by them self. what method i...

0
Q: sending javascript global variables after being modified in function call

user2687915I have a global javascript array and I make a function call that makes other function calls. In displaySearch() im supposed to push information into the array that gets return by an API call. Stuff with the API is working, I have already tested it. My problem is I need to send the array to a PHP ...

0
Q: Http to visual studio

TylerI am looking to send data from my website to visual studio and I would like to make sure I am doing things right before I start. I would like to have people login in with steam open Id, click on a button and have that send a response to my steambot in visual studio. The steambot coded in C+. T...

0
Q: what is low-level tickable statements in php

soooldierPHP version:5.3.3 Here is the example: <?php declare(ticks=1); // declare(ticks=2); function handler() { echo "handler called\n"; } register_tick_function('handler'); $a = 1; // Output: handler called\nhandler called\n ?> The Output is the same "handle...

0
Q: Live search function, how to make result to the input box

user3066938if (strlen($search_string) >= 1 && $search_string !== ' ') { // Build Query $query = 'SELECT * FROM User WHERE email LIKE "%'.$search_string.'%"'; // Do Search $result = $tutorial_db->query($query); while($results = $result->fetch_array()) { $result_array[] = $results; } // Check If We Have...

0
Q: Script deletes files out of home directory of site?

TravisNot sure how I ran into this issue. I thought my brother was deleting my files off my server. Apparently it was not him. I re uploaded the copies I had of my blog back to the domain. It seems to delete about 5 minutes after the files are on the server. Not sure where to look. I checked my erro...

0
Q: Recursive error in PHP

user3068555I am trying to migrate a database from an old XP machine to a new Synology DS213. I successfuly imported the database and mirrored permissions, but am having trouble actually getting the website to work. I run out of memory no matter how high I raise the max memory limit. I was able to install t...

0
Q: mixing chunked download with chunked on-the-fly decryption, corrupted files

user3068322I have a download script which sends out files in chunks and it works mostly fine... except that sometimes the files being downloaded from the file server are encrypted, which itself is done in chunks due to memory constraints. The size of the two chunks are independent and unrelated, which lead...

 
4:22 AM
1
Q: R Temporary File being created

user2977577So here's what's happening. We currently run an R program in the cloud and import a package (randomForest) specifically. When we invoke the command (through php), I can see this temporary file (.RDataTmp) being created. I believe what it's doing is loading the package during this time. Problem is...

-1
Q: custom yahoo messanger in wordpress

user41549i have use this code on my template but not working. please advise <?php $yahooid = " ta.rukmana "; $ch = curl_init("http://opi.yahoo.com/online?u=".$yahooid."&m=t"); curl_setopt($ch, CURLOPT_RETURNTR...

0
Q: PHP mail dosen't get the variables value

BursosI've got a web with two forms and those send an email. So, I developed this code: <?php if($_COOKIE['form'] == 'contact'){ $name = $_POST['nameC']; $email = $_POST['emailC']; $subject = $_POST['subjectC']; $message = $_POST['commentsC']; $headers ...

1
Q: php set cookie redirect

user3040048I need a domain example.com redirects to sub-domain a.example.com when I type on the address bar. <script type="text/javascript"> $(function(){ var city = readCookie('city'); if(city==null && city==''){ window.location.href = 'http://' + city + '.example.com'; } $('#citygo').change(...

1
Q: Output Variable Price appropriately

Henrique FolettoIn a WooCommerce loop there is the <?php echo $product->get_price_html(); ?>, that outputs the regular price or the "From" price of a variable product. However with variable products I need something that I can control. I'll be looping only variable products all with the same attributes, and I wa...

0
Q: WordPress - Passing Javascript Variable Back to Function in Functions.php

EricSituation: I need to use a jQuery facial detection kit (already have it) to grab each thumbnail image as it is pulled from within the loop, detect the face coordinates and dimensions, and crop the image. Dilemma: I have created a function in functions.php called "detect_face" which has embedded...

0
Q: Wordpress Boostrap Responsive Nav Menu - how to toggle top menu's href link using Bootstrap Navwalker

awongCMFor eg, in my wordpress navigation menu setup, it is as follows. Home About Us Who We Are? What We Do? Services Web Development Web Design On all these menus and submenus, I have setup page link for each one of them so the user can navigate them as they please. But when I use the Bootstr...

0
Q: Match anything but this group of characters?

Kristian RaftesethI'm looking for a pattern that will match anything but this: "/[a-z0-9]/i" How can i do that?

0
Q: HttpReqeust not found but I real installed pecl_http

joanerI'm use php-fpm on centos, php version is 5.5.6 When I install pecl_http and restart fpm, I get the phpinfo abot pecl_http module: http HTTP Support enabled Extension Version 2.0.1 Used Library Compiled Linked libz 1.2.7 1.2.7 libcurl 7.29.0 7.29.0 libevent disabled ...

0
Q: php undefined variable error when calling class method

user3042849I have been writing procedural php for years and am very comfortable with it. Recently I decided to rework an existing site and switch to PDO and OOP. Everyone is telling me that this is a better way to go but the learning curve is killing me. When trying to call a class, I get the following. ...

0
Q: Can't use method return value in write context; session data

Dylan ButhI know lots of people have asked this question but the answers I looked at didn't help. I have data set in the session that I need to send to the view but obviously only if the data is there. This is MY_Controller file in the core folder of codeigniter. (I need this code ran throughout the si...

0
Q: how to unset coolkie in php.i am click logout butten but cookie is not deleted

user3060459setcookie("cookie_name",$_SESSION['useremail'],time()+3600,"/beta","studentsponge.com"); setcookie("cookie_id",$_SESSION['userid'],time()+3600,"/beta","studentsponge.com"); // and unset cookie i use this. //in logout butten if(isset($_COOKIE)) { setcookie("cookie_...

0
Q: .htaccess content converstion to Web.config content

user3068678I have this url re-write rules in .htaccess in Apache: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php?route=$1 [L,QSA] and I know wish to convert it into Web.config contents in II7 <system.webServer> <re...

0
Q: I need some help creating a querry and a Database table to retroactively assign numbers to existing table

Bill FlippenAs my info states, I inherited the job of statistician for a local dart league. (Woohoo $20 a season) I would love to implement an ELO rating system. The current database table has over 90000 entries. There are 3 different games that are played. Singles, Doubles, and Team. The originator of t...

0
Q: Convert timestamp to hours and minutes for a movies' length

Erik EdgrenI have converted the length of the movie Avatar from 2009, from minutes to timestamp. The movie is 162 minutes long so the timestamp is 1386227800. Now I need to convert the timestamp to hours and minutes which I don't know how. In short: how can I convert a timestamp and get the correct result ...

0
Q: How do I fix Undefined variable error in PHP?

Anand MistryToday, I have started to learn PHP. And, I have created my first PHP file to test different variables. You can see my file as follow. <?php $x=5; // global scope function myTest() { $y=10; // local scope echo "<p>Test variables inside the function:<p>"; echo "Variable x is: $x"; echo "<br>"; ec...

0
Q: WordPress is_page conditional causes blank page

LukeJonGibsonI'm trying to use the is_page conditional tag to create a slider that displays different sets of images depending on the page. Below I've created an example of the code I'm using. All I'm getting back is a blank page and I'm really not sure why. Everything I've looked at on Google tells me my S...

0
Q: prevent to input string or integer value

LeeThis is the php code and I want to check people put the wrong value $response = $_POST['response']; $visibility = $_POST['visibility']; if($response == NULL || $visibility == NULL ){ printf("Invalid input: %s\n", mysqli_connect_error()); echo "<br/><a href='myevents.php'>Back to previous page</a

0
Q: When using laravel, where do I put business logic/functions

user2812935I've used symfony before and had my controllers call services and use those functions. Is there a similar setup for laravel? I'm guessing my controller's should not have complicated logic.

0
Q: fetch controller name from url -zend framework 2

SLAYERI am running one project on zend framework 2. URL is as mentioned below. http://zf2-tutorial.localhost/album/index/page/2 from this url I would like to fetch only album in my layout.phtml. can anyone suggest how I should do using Zend way?

0
Q: How to post associative array to php from c#

Sachin123I am working asp.net application.I need to call a php webservice.I am sending object array.But php doesn't detect the value from php.

0
Q: Why does Joomla! crash PHP?

Phil CairnsI'm working with a customised Joomla! 2.5.6 app, and I'm stepping through the code in Eclipse. The code I'm stepping through is in myapp/libraries/joomla/plugin/helper.php, and is in the JPluginHelper::_import function. The code in question looks like this: if ($pathExists || file_exists($legac...

0
Q: Web service throwing error 500 in yii

Let me seeI am learning Yii and i am trying to create a web service this is my WebServiceForUserController.php public function actions() { return array( 'databaseServices'=>array( 'class'=> 'CWebServiceAction', // 'serviceVar'=>'serv...

0
Q: PHP MySql E-Commerce left column filter results

user3048475Ok i've been looking for ages now and cannot find anything to help me and i've tried a couple of my own ways with stupidly bad results. All I want is to have a left column that filters through my product results. So, if I have all of my products on the page I then click a brand/catagory/sub cat...

0
Q: send data to MySQL with AJAX + jQuery + PHP

user2877718I've been looking all day to find a way to insert some data into my database and then show the new data in the list of already existent data on my webpage. I know that some of the points I can't get done may be basics but I just started learning Javascript/ AJAX so I have a limited knowledge. ...

0
Q: Get a list of colors used in word and pdf documents using php?

user1502093Is there is any php-based library that can extract all the formatting information from a word and a pdf document? Basically, I need a list of all the different font colors used in the document. I am working on a utility, where user uploads a document ( word or pdf) and it counts the number of ...

0
Q: How is it possible to make query on a csv file in php

menardmamI know and use mysql and php. But now i have 15 csv file. I have found that some pyton lib exist to make query on csv file. The question how is it possible to make mysql lome query on csv file ? Googleling does not return anything other that .py files that useless for me. I need hp fuction or api...

-1
Q: PHP Preg_replace error without paranthesis

user2201182I'm getting the error: Warning: preg_replace() Delimiter must not be alphanumeric or backslash from this code: echo preg_replace('install/install.php', '', $_SERVER['REQUEST_URI']); From what I can tell from the research I did this error is caused by parenthesis inside the echo preg_replace()...

0
Q: Save image url in google place photo response

user3058875I am using the command : drupal_http_request('https://maps.googleapis.com/maps/api/place/photo?maxwidth=400&photoreference='.$term['photo_reference'].'&sensor=true&key='.$GOOGLEPLACESAPIKEY); to get the image on browser its opening image but i want to get the url of image to store in db ,can so...

0
Q: Approve submitted data by admin in php

guruThere is registration form in which country field is there.if user's country is not in drop down list. user can select other at that time display one textbox and user enter their country in textbox.after submit country by user .how to approve the requested country and publish in country drop down...

0
Q: displaying mysql database in php

Amy Jenningshi just wondering where i seem to be going wrong? it looks ok to me, im fairly new to php so im using tutorials. i keep getting this error? Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in G:\xampp\htdocs\xampp\Assignment\reports.php on line 60 this is a small col...

1
Q: Adding to a multidimensional array from another array

DevonI'm trying to figure out how I would do this, basically I want the function to add to the following array: $this->array['key1']['key2']['key3'] = 'value' From a single dimensional array like $this->keys: Array ( [0] => key1 [1] => key2 [2] => key3 ) My function would be: functi...

0
Q: php mysql - get more than 1 record in single query

Sam HansonI have a table like <table width="60%" border="0"> <tr> <td>intId</td> <td>tagname</td> <td>cid</td> <td>lid</td> </tr> <tr> <td>1</td> <td>chemis</td> <td>5</td> <td>0</td> </tr> <tr>...

0
Q: how to implement add to cart functionality on custom module

manishI am new in magento. I have made a custom module of price calculator in which a user enter the height and width of a product and it gets its price. I want to implement add to cart functionality so that height,width and price goes to cart. But i don't know the code and syntax to implement it. Car...

0
Q: opening a flip book on lightbox popup

user3048611i have a popup lightbox i want to open a jquery css flipbook but the thing is the page is not getting loaded. Ex : I have a page with a link to popup. On clicking on this link the popup window will open a file which is located in a different file say xyz/test.php . <a class="example-image-lin...

0
Q: Facebook Notification Development

user3068753Let us suppose my website(www.1234.com) has two users A and B A is following B on www.1234.com, both A and B have facebook account. Case 1: A and B are not friends, is it possible to send notification to A on FB when B does any activity on www.1234.com using facebook API, If yes then how? Cas...

0
Q: Email sending is not working in Adobe muse site hosted in Azure?

jophy jobHello All, We have a site that made in Adobe muse , When we try to publish to Azure it giving a error Email not configured (http://forums.adobe.com/docs/DOC-3581, http://forums.adobe.com/message/5822297), and reason was azure not provide email service ( SendGrid not available in our r...

0
Q: Web Dev editor - references arcoss files?

midniteIs there any web-dev editor, that could do references (Open Declaration of a method, a variable, etc) across multiple files (within a folder/path, may be)? Simply say, just as if doing Java in Eclipse. I am trying with Aptana as it seems among the top of choices. But as said here (Aptana - Open ...

0
Q: htaccess file not working for wordpress pages

user225269I'm trying to add a new rule in the htaccess file that will allow input of other instead of the actual name of the page which is notify. But I can't seem to get it to work. # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteRule ^other...

0
Q: Copying images from live server to local

Suresh KamrushiI have around 600K of images in a different tables and copying all the images from server to local with below code and is working fine. (I know FTP is the best option but somehow i cant use it) $queryRes = mysql_query("select url from tablName limit 50000"); //everytime i am using limit while(...

0
Q: how to deal with jsonp request in php using the Slim Framework?

Patrioticcowwhen i send a jsonp GET request with jQuery, it usually sends something like: http://website.com/test?callback=jQuery20309569547907449305_1386221743664&id=9&limit=10&_=1386221743665 in Zend Framework i will handle this like: $request = $this->getRequest(); $callback = $request->getParam('call...

0
Q: what is the size or length limit of curl?

DS9I have use following line to send files. $curl_cmd = "/usr/bin/curl -k -d \"$post_data\" $url 2>/dev/null"; full Code: $rec_name = $_POST['rec_name']; $fax_no = $_POST['fax_no']; $filename = $_FILES['attach']['name']; $filedata = base64_encode(file_get_contents($_FILES['attach']['tmp_na...

0
Q: Fixing Contact Form 7 on Yahoo Email address

clestcruzI'm trying to fix my problem regarding the plugin contact form 7. Basically the objective of my contact form is once the user submitted their application form with resume the contact form will send an email to the sender that their message has been received. The problem is it works on a gmail ad...

0
Q: Is there a way in css to clear all font-family + font-size style declarations?

Jiminy CricketI have a page which is a cms/wysiwyg/ms word nightmare. It pulls many paragraphs of text from a database, some of which have retained ms word's bizarre html tags - including font declarations!!! ahh! In one sentence I can have things like: <span style="font-family:Verdana">this is some</span>

0
Q: HTTP header disappear while I do HTTP POST request with iPhone

user3068613i am new to Objective c and i stuck in a problem which only appears when i do HTTP POST request. I do HTTP request with my iPhone and i expect the server returns me something like this in the header (this is the respond header from other server): { "Cache-Control" = "no-store, no-cache, must-rev...

0
Q: how to search us city search from db city list auto filling using Google maps ? using php

pd1786This is the code for text auto filling ,here am new to google maps where can i change this code to search us city only (from my db) country should be us there are any other api available for this <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0...

0
Q: select command not working in php/mysql

user3004004 $invoicenum=$form['invoice'][$i]['inv_id']['#value']; $invoiceid=db_query('select invoice_id from invoice where invoice_number= %d',$invoicenum); $invoiceid1= db_fetch_object($invoiceid); print $invoiceid1->invoice_id ; In above code invoice_id i am getting. But its gives the 1st rec...

0
Q: How to parse sub-child 's attribute value

user3068785I m trying to parse data from xmal to PHP.Here I fetch the records attributes.But I also want to fetch item2's records attributes.Here if i write price21,base_qty_21 then its fetch null value.How to fetch items2's price21,base_qty_21 etc. value?.How to fetch child's subchild attributes value? X...

0
Q: Changing this verticle alignment on php website to horizontal wordpress issue

user3068814I am having a huge issue trying to change this http://i.imgur.com/KEr42ZQ.png [the wordpress theme is hotnews] I can have it do that but only if I change the .container .one-third { width: 31%; but I am changing that to 100% as to make the homepage have large images and not small images. They...

-1
Q: PHP: Why does the output of this string have an indent?

user3058753Here is the code: if( isset($_POST['item1']) ) { $firstitem .= 'Item: '.$item1." \nColor: ".$color1." \nQuantity: ".$quantity1." \nPrice: ".$price1."\n"; } if( isset($_POST['item2']) ) { $seconditem .= 'Item: '.$item2." \nColor: ".$color2." \nQuantity: ".$quantity2." \nPrice: ".$p...

0
Q: how to download google trend csv file automatically to particular direcotory and rename it using php code

user3068800Is There Any Way to get google trends data/csv file in php array by using url with passing parameters like: keywords, date, etc. if it is possible then provide the code to integrate google trends so that we can pass the url and google trend csv file is automatically download to directory as we p...

0
Q: ajax response on another domain

user2341915I have specific scenario to work with, It will be interesting and helpful to many developers, I have js file and a php file, In js file i code AJAX, using http request that send parameters to php file and get a response. Now I have 2 domains on 1st Domain I have Database, Store some html code...

-3
Q: Display any Language font in My code

Sadikhasan How to display any language font in my script using php. which function i use for that and how to use? please help me... I want to display like તમે કેમ છો? તમારી તબિયત કેવી છે? using php function.

0
Q: How to make db table field dynamic

404 Not Foundi am creating plugin in wordpress for contact us form and in that i am creating fields(textbox,textarea etc...) dynamically based on my requirement. so there is no fixed number of fields. i am storing dynamically created fields in my db table. in some project i may require to create 3 fields and...

0
Q: HTML Form Elements: Outputting escaped values (with PHP) and submitting unescaped values (with jQuery Form Plugin)

DanAlexson90What the title says. The first part is the easy one: value="<?php echo eh($sSomeValue); ?>" With the PHP shortcut function for escaping: <?php function eh($string) { return htmlspecialchars($string, ENT_QUOTES); } ?> Now, here comes the difficult part: I need to modify (that is, to ht...

0
Q: What about should I care when choosing a server for static content?

DJaYI have one Apache server where I store all my upload/image processing scripts. I found that if I store both scripts and images on the same server, it would break Apache. When choosing new web-server for static content what about should I care mostly? (RAM, what php.ini config)?

0
Q: php live search email address after @

user3066938if (isset($result_array)) { foreach ($result_array as $result) { // Format Output Strings And Hightlight Matches $display_function = preg_replace("/".$search_string."/i", "<b class='highlight'>".$search_string."</b>", $result['email']); $display_name = preg_replace("/"...

0
Q: what's the difference between return/echo json_encode in php

diligentmaybe this is a simple and stupid question. As we know, echo just print the variable out, and in a php function return statnds for return something to the function invoker. I notice someone use echo json_encode while others using return json_encode, I return something to jquery, and using ech...

-1
Q: I Want to create extension in elastix using php

PrabhuThis is my code $conn=mysql_connect("","","") or die("Asterisk database Could not connect"); $db=mysql_select_db("asterisk"); $uname=($_POST['uname']!='')?$_POST['uname']:$_GET['uname']; $pass=($_POST['pass']!='')?$_POST['pass']:$_GET['pass']; $phnumber=($_POST['phnumber']!='')?$_POST['phnumb...

0
Q: is the space in a function constitutes a space in php

IamcoderI am user a header function to redirect a page. Space is not allowed before the header function in php. I have some functions on the page and I was wonder if what is in between a function is considered white space. will I have to do this: function nil(){ statement } or can I do this: functi...

0
Q: MySQL INSERT query works but Data is not inserted

Rahul I just want to insert into database, but following code is not showing any error. Can anybody help me in debugging this code. <?php $tips = $_POST["tips"]; $day = $_POST["day"]; $month = $_POST["month"]; $year = $_POST["year"]; $date = $year."-".$month."-".$day; //echo "$date: $tips"; //...

0
Q: Looking static methods and non-static methods from security point of view

geek_guyThere are a lot of materials out there discussing about static methods vs. non-static methods but I could not find people talking about this. What I really want to know is : Are there any benefits using one of these over another from security point of view ? (For example the PDO class in PHP use...

0
Q: I want to edit the field #_content.alias in joomla when trash function is triggered in Admin Area in Joomla?

user3068891 How to edit the alias field of the table #__content in Joomla when i trash the article. Where to modify the triggered function Joomla 2.5.

0
Q: PHP works with XAMMP locally, but not "live" online

gr8scotincI am taking a class in AJAX. I have been testing the following files using an XAMPP portable server on my flash drive, and they work no problem locally. When I post them to my class server they do not work and I get the error in my Chrome console: "uncaught typeerror cannot call method 'getelem...

0
Q: PHP PDO syntax error

user2907171can you please what is the problem with this code ? $host = "localhost"; $database = "dbname"; $username = "postgres"; $password = "password"; $inf = "information_schema"; $db = new PDO("pgsql:dbname={$database};host={$host};port=5432", $username, $password); !$db && exit("Database connect fail...

0
Q: KML to CSV (Google Earth to Agisoft Photoscan Pro)

AFerraraI am trying to write a script to convert Google Earth KML files to CSV files for use in Agisoft's Photoscan Pro. This script will enable users to quickly create a CSV file of GCPs (Ground Control Points) for the optimization of models so they can be more accurately overlaid in Google Earth. Can ...

0
Q: login access the account with incorrect username and password

user2991258In the below code i have placed controller and modl.When user is inactive he should not able to access the account and only created account users can able to access the account.But in my case it is not working like that.Pls help me to rectify the issue. Controller: function inactive() { ...

0
Q: PHP Contact Form Problems (Red Border Validation)

umtek12I have been searching the web for two days for some sort of PHP template (because I do not know how to code in PHP) that could highlight a borders red if the user did not enter all the proper information. I manage to get the contact form working but not the way I want. Essentially, I need the use...

0
Q: I need a php code to grab posts from forums

user3068909I need to write a piece of code that goes through a forum and grabs posts bigger than 100 words, prefer php. I was able to grab the content using CURL, but I need to cut parts of it. Also I need to go to page after page and do the same.

0
Q: How do I Bind an Instance of a Model to a Parameter in a Controller Action

Abraham YusufIs it possible to automatically bind an instance of a model to a parameter in a controller action? Is their any workaround for doing this if it does not already exist within Yii itself? I know this is possible in Laravel and ASP.NET MVC. Here is what I want to achieve: class PostController exten...

0
Q: PHP if condition double value checking in single condition without OR or AND

altafhussainthis question will feel silly and very basic, but i dont know why it occures and why php is not supporting it :( . So please ignore my idiotic statements in this question. While working in ZF, i need to check an age variable with selected criteria for age ranges. I use Zend Studio as IDE. So wh...

0
Q: wordpress login stays in the same page even after accepting password

Aditya AmitI have deployed a Wordpress website. Primarily it worked fine. But recently I couldn't be able to login to my dashboard as it redirects to the login page again even after accepting the password. I have tried following isolated things but neither worked so far! Checked siteurl value from options...

0
Q: How to get the ajax response from success and assign it in a variable using jQuery?

JerielleHello guys I have a problem in getting the response from my ajax. If I display it in the console. I can view it. But How do I assign it in a variable? Here's what I have. In my PHP code I have this public function checkPassword($password){ $username = $this->session->userdata('user...

0
Q: Mysql Spatial Indexing with multiple LEFT JOIN on Large Database

Matthew Jonathan BrooksHi I have a query that I have been working on. I have used many different methods to do distance calculation. I have followed the guidelines on this page which seem to work well, however when I add multiple LEFT JOINS to the query it takes 12 seconds. How can I get this to under 1 second and also...

-1
Q: Call URL from SSH

KerryI have a PHP page that transfers data from one database to another database when its called. For example when I call mydomain.com/transfer then the transfer starts. I don't want to use a cron job for this. Instead I am running this URL on browsers and I will get an php echo message that 5000 re...

0
Q: How to read soap response xml in php

user2841243This is my Soap Response xml,I need to get RebillCustomerID How I can do this? <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://...

0
Q: How to fix error: Web with blank space at bottom

user3068963Please help to fix this error Web with blank space at bottom Link: enter link description here I spent all day time to search anh try to fix. But I can not know why that So, please help me Thanks so much!

0
Q: Deny access to .php files apart from the server itself

Chud37How can I write a .htaccess script that prevents the user from running .php files in a certain directory and it's child directories? I would need to be able to include the php file from the servers index.php or other files though, basically I want to enable to the server to to include the php fi...

0
Q: mysqli_result not even a function?

JafoolI have this login script: if (isset($_POST['submit'])) { $_POST = db_escape($_POST); if (!empty($_POST['name']) && !empty($_POST['pass'])) { $sql = "SELECT id FROM users WHERE name='{$_POST['name']}' AND pass='{$_POST['pass']}'"; $result = mysqli_query(...

-1
Q: how to make product search system

user3060706i want to make a product search system . its basically book system. i have these search query $maincat=@$_GET['maincat']; $subcat=@$_GET['subcat']; $country=@$_GET['country']; $procat=@$_GET['procat']; $author=@$_GET['author']; $publishers=@$_GET['publishers']; $price=@$_GET['price'...

0
Q: Restrict facebook connect for particular users in php

Sam HansonHow to restrict the pages login, groups login and companies login in facebook connect. Our file is developed in php. Is it possible to restrict?

0
Q: PayPal IPN returning full php ascii code instead of just a numeric value

user2163996So I'm passing a custom value to PayPal: <input type="hidden" name="custom" value="<?php echo $id; ?>"> However when it's returning the custom variable back it sometimes returns it as: custom=%3C%3Fphp+echo+9445%3B+%3F%3E custom=9445 It's random. Sometimes it returns it properly (custom=9...

0
Q: implement add to cart on custom module

OmegaI am new in magento. I have made a custom module of price calculator in which a user enter the height and width of a product and it gets its price. I want to implement add to cart functionality so that height,width and price goes to cart. But i don't know the code and syntax to implement it. Car...

0
Q: What tags should I use in PHP DocBlocks

Me123Say for example I have my name as the author: /** * @author: Jacques Marais */ How can I include my website, my license and my copyright in my DocBlock? Which tags should I use? Also what tags is the most common tags and how do I use them?

0
Q: Redis Cluster issue

jayWe are currently using Redis as our data store. I am making a new section where we need to rank and paginate users. So i am thinking to use Sorted set for keeping rank and userid. And Hash for keeping user's profile data. It was brought to my attention by a colleague that we ll need to make many ...

0
Q: Display notification whenever app is running or not

user3044615In my program, notification must be activated whenever app is running or not. Should I put my notification method in onCreate()? my notification is just like alarm. Please check alittle. public String getCurrentTime(){ Calendar c= Calendar.getInstance(); SimpleDateFormat sdf = new Simpl...

0
Q: Iam trying to copy image from a url but gets an error for connection refused

VickyIam trying to downlaod an image from url but always getting error for connection refused. The error is :- failed to open stream: Connection refused I have tried several methods form saving image like copy function, fput, curl .But no progress.The same code works for other servers I tried on, but...

0
Q: Call anonymous function from db

user837758I use Yii in my project and want realize event model with callbacks. I made "Event" model in MySQL and want store anonymous functions in many fields, for example, **Event model in Yii** id - int name - varchar(255) beforeEvent - text In "afterEvent" field stored function: function(){echo 'af...

0
Q: File button does not upload the image through ajaxForm after styling it

ButterfruitHere is the scenario.. I have a file upload button which is used for uploading images through ajax and preview the image in the browser. It also shows a loading bar when uploading happens. Now, I have given some styling to the file button using jQuery. When user selects the image, it gets upl...

0
Q: How do I get the value of a changing attribute from a php form?

Lesly BrezilienI am pulling information to be displayed from my database and what id like to happen is when the user clicks on a selection, its takes them to a form that would be just for that selection. So i have one form and im trying to pull the name attribute whose value is set but $form_id which gets its v...

0
Q: Amazon S3 (Simple Storage Service) PHP REST

JohnI hate asking for help, but I'm horrible with curl and I'm sure someone might be able to take a quick glance at this and make it work. Wouldn't that be nice? I know they have tons of 2000+ line classes for this but I don't want to use one of those when all I need is the "putobject" functionality...

0
Q: PHP - SMTP Error 10060 (SMTP -> ERROR: Failed to connect to server)

KabirI using SMTP connection to send email. It is not working from last one month before that it was working properly. I am not able to get the actual reason of that error. Error is: SMTP -> ERROR: Failed to connect to server: A connection attempt failed because the connected party did not properly...

-1
Q: Soap request generation with repetative tags how?

SumitI am parsing the data from client through function data I am forming in php is like this : $data = array('userID'=>array('ID'=>'23','type'=>0),'spID'=>'5219','productID'=>'2910','serviceID'=>'1234','updateType'=>'2','updateTime'=>'9876','extensionInfo'=>array('item'=>array('key'=>'TYPE','value'=>...

0
Q: How to get all connections of a Linkedin user

Sino ThomasI am trying to develop a program in PHP to import all the connections of a linked in user. I am trying the below API code https://api.linkedin.com/v1/people/~/connections:(id,first-name,last-name,location:(name),picture-url,emailAddress); But it only display the connections of the current use...

0
Q: Convert into Seconds from Double Data Type

user3063983I would like to ask of this kind of double data type can be converted into seconds? In my database, the record is 6.80 means that 6 is hours and 80 is minutes. I want the output be 7 hours and 20 minutes. Is this possible?

0
Q: Do I need to specify not to use the second variable in my second else if statement? If so, how?

Michelle CantinIf I want to create an if statement with 2 variables: if ($variable1 && $variable2) { // Do something } And then add another if statement below with only the first variable, how would I do it? Do I only include the one variable like this: else if ($variable1) { // Do something } Or...

0
Q: how to count same values are exists im my record

shaktiI have a problem i am not able to count how many same number are exists in my record. example: suppose in my table records are like this coloumnname=number value are here 2 4 6 2 2 4 2 I want to if 2 number exists 4 times it will be count and display record 2 exists 4 times and 2 ...

0
Q: How to collect same word from string using javascript or jquery

user3030853I have JavaScript string with some repeated word. I want collect them with comma separated. The string is - 1-16-15-master=1232_2-34-33-master=1233_3-33-23-master=1236 The output should be - 1232,1233,1236

0
Q: QuickBooks API (php) Integration

YunusI am a very new to QuickBooks. I have created a trial account in Quick Books and I want to add customers, create invoices or similar sort if things to my account. I have downloaded the php SDK from github. Now I have no Idea how to start, from where to start to add the customer to my account afte...

0
Q: save geolocation data on my server

עמית כהןI want to keep the geolocation data on my server-I prefer in txt file. (lat & lon -like 38.4589,36.4876). * Code to geolocation is here http://www.w3schools.com/html/html5_geolocation.asp (My site is stored in http://www.000webhost.com/) I want to know the exact position of the people who visited...

0
Q: Installing theme for Yii Application

Shanei'm new to Yii . i have downloaded one theme from "yii.themefactory.net" and i placed it in main configuration of my application. i know that view is separate from model and controller and all operation in my application but im wondering how this new theme will be match to my controllers and mod...

-1
Q: How do I receive a json data passed as argument from android application?

Ashik BasheerI used to decode a json string stored in a variable. Now i've come across a situation where a php file is passed a set of json data. I'm not aware of how to get the data and then decode it to php array. please do not give answers like $variable = '{ "data1" : "value1" }'; I've used this befor...

-1
Q: Redirect Not Working After Validation in Template Page Wordpress

kingzleIn Wordpress, I created a template page called donate.php <?php /* * Template Name: Donation Page * Description: This is a donation page */ get_header(); ?> <?PHP if($_POST['submit']!="") { $c=1; //check name if($_POST['name']=="") { $c=0; $name_err="Enter Your Name"; } ...

-2
Q: Find the smallest number greater than N with below conditions

Chakravarthy SMConsider a number 2345. If you multiply its digits then you get the number 120. Now if you again multiply digits of 120 then you will get number 0 which is a one digit number. If I add digits of 2345 then I will get 14. If I add digits of 14 then I will get 5 which is a one digit number. Thus an...

-1
Q: PHP handle Issue such as segmenation fault?

Rakesh BitlingHello Friend I want to know that segmentaion fault how it can be resolved. when i am adding code in top of php page as: ini_set('memory_limit','128M');

0
Q: php How to prevent someone from scrapping my website data?

shubhrajI am using php to write my server side code for my website What is the best way to prevent someone from scrapping my data on the website..?? Like in php if some one uses file_get_contents(); --->>http://ca3.php.net/file_get_contents or someone fetches my login form in an iframe html element or ...

0
Q: PHP move_uploaded_file not working but no errors either?

phpnoobI'm trying to move my uploaded file to a pictures folder. I dont get any errors when it comes to the script. Im using godaddy as the host. All file permissions are set up correctly. Have really no idea what else to do. This is the php code: <?php public function CheckPicture($picture){ if(...

0
Q: Main domain with codeigniter, subdomain without codeigniter

arvinchhiI have uploaded a CodeIgniter site to public_html folder on server, which works properly. http://my-site-name-here.com Now, I have created a subdomain "sub" for which there is a directory in public_html named "sub". I have uploaded a non-CodeIgniter application in that folder. If I try to go to...

0
Q: How to enable Full Text Search (FTS) in sugarcrm Community editiion 6.5.12?

bcrajkumarI'm using sugarcrm Community Edition 6.5.12. I tried to enable FTS on custom modules. I've done related searches on sugarcrm forums/googled. I'm unable to find the suitable free step by step guide or packages to full fill my requirement. I tried using Elastic search module. I built the module ...

-1
Q: Display mysql data as html link using while loop

Adele Von LandsbergI want to display product data from MySQL data base neatly using a while loop. Obviously this wont work: Hi, I want to display product data from MySQL data base neatly using a while loop. Obviously this wont work: <?php $Area = $_POST['Area']; $connect = mysql_connect("localhost", "root") or ...

0
Q: Caught fatal error: Call to undefined function geoip_db_avail()?

Stevie GThe code is: if (!geoip_db_avail(GEOIP_COUNTRY_EDITION)) { //do this } and it is throwing a: Caught fatal error: Call to undefined function geoip_db_avail() in one of my applications. On a test on another site on the same server using: $country_name = apache_n...

-2
Q: How to reset all data of particular user in data base apart of his user_id

Er.gaurav soniI want to reset all columns data of an particular user but his ID should not change. can any one tell, which is the best way to do so.And also I there is any way to reset all data from database of a particular user.

0
Q: Session Troubles - Keep Getting "Can't use function return value in write context"

Garrett BurkeI have seen several other threads with this error and none seem to solve my issue - I am thinking it's something out of the ordinary. My server is using PHP 5.4.20 The error I am getting is: Can't use function return value in write context in /home1/tradeinc/public_html/checklogin.php on line 4 ...

1
Q: How to avoid circular cache invalidation infinite-loop

cnktLet's assume we've got an app in this structure: Client --ClientUser ----Questionnaire ------Question We are caching every one of these items. If i invalidate one of these items, it needs to be propagated to up and down. Because after adding a new question, questionnaire's questionCount will b...

0
Q: Sending data from Java to PHP script . Tried everything. But missing a small thing

VivekI tried everything but am not able to successfully enter data in database from the Android app. My Java code is: private class DownloadWebPageTask extends AsyncTask<String, Void, String> { String js = "{\"1\":\"9999\",\"2\":\"test\",\"3\":\"AJE\",\"4\":\"Kutch\",\"5\":\"200000\",}"; Str...

-2
Q: Upload files using jQuery Ajax to PHP

user3029789HTML: <form id="upload" method="post" enctype="multipart/form-data"> <input type="file" name="file" id="file"><br> <input type="submit" id="upload_button" name="upload_button" value="Upload"> </form> Javascript/jQuery: $("#filefont").on("change", function(){ var fileupload =...

0
Q: Error while using variables and definations which are included using a include(file) in php

user2718964i know this question has been asked lot of times, i did go through most of them but none of the solutions seems to be working for me. i have to include mainly three files, which are all included in includes/ connect_db, functions and config. In config i have used define(dir_somefile,'includes/fil...

0
Q: Wordpress add custom table in search results query

SKPDear I am new to use Wordpress, I have add custom table in db and now, and when I use search some text, it shows me all results other than that sepecific custom that i added, I want to get search results including results from that table as well, I have searched and worked a lot in my wp-contetn/...

0
Q: Codeigniter and too many database connections? (Unable to connect...)

PetraI've a lot of cronjobs (50 -100) which all start at the same time. (Refreshing data for every single client.) There are many different jobs to do in a single hour so I can't differ the times of the jobs. And I decided not to make a loop - but single jobs - to avoid that possible errors affect th...

0
Q: Convert HEX value to DWORD DEC value on a x64 machine with php

user2107004I need to replicate this calculation with PHP on a x64 machine. B21642C9 = -1307163959 I manage to do it on a x32 machine like so: $value = intval(hexdec("B21642C9")); however intval does not seem to do anything on x64 machine and I am getting a result of 2987803337 which is the same if I wo...

0
Q: php write to file without prompting for download

user1815207The following code works fine for writing to a file, but I don't want it prompts the user to download whenever it executes. I would like to prevent this... Any help would be appreciatied. I've also tried it with fwrite with the same results. $file_name = 'orders'.date('Ymd').'csv'; header('Co...

0
Q: can't figure out how PDOStatement::execute() works

ciaobenI'm trying to write a function to update data on a user in a DB. I'm using PDOStatement::execute(), but i'm getting this error: Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in I tried to count the paramet...

0
Q: remove slashes from the string in php

Pritesh MahajanI have used below code in wordpress but i am facing slashes problem while call images in the code. global $wpdb; $data = array(); echo $select = "SELECT * FROM `wp_posts` WHERE `post_title` LIKE '".$_REQUEST['term']."%' AND `post_type` = 'post' GROUP BY `post_title` "; $results = $...

0
Q: database error help, debugging

NYCity<?php include('DBconnect.php'); if(isset($_POST['submit'])) { $password=trim($_POST['password']); $password2=trim($_POST['password2']); if($password==true && $password1==true) { $changepass = mysqli_query($mysqli,"UPDATE nweth1_firstdb SET Password = '$password' WHERE ID...

0
Q: Sql only selects first row

user2957574I have a login database, and i have a number of users, when i attempt to log in with the user that is listed first in the database, it works perfectly. However, when i log in with another user, it doesnt work, it would appear that it will only select the first row. What is wrong with my query? ...

0
Q: Form and PHP function to save form data to mysql in same file

Arringar1I have been trying to sort this out but so far I haven't been able to get it to work. No errors are thrown, the page refreshes on submit. Here is the code (simplified for posting): <?php if (!isset($_POST['submit'])) { echo "<!-- Form starts here --> <form id=\"...

0
Q: Input variables - query from MySQL database

user3069187I have a MySQL database which is online and which stores results from a lot of simulations I did with an energy program. I would like to give users of a website the possibility to look at the results in the following way: On the website, users have lists (like a HTML list) and there they can sel...

0
Q: Rewrite get parameter URL

user3069213I have a page which have link www.example.com/Test/Leisure-Tours.php?location=15. I want to rewrite the url to www.example.com/Test/Leisure-Tours/Africa. I put Africa because 15 is the id of Africa. Please help me

0
Q: Lock access to a settings page

WaldermortI'm probably using the wrong search terms since I'm getting nowhere with google. I have a site-wide settings page available only to admins. This question is not about permissions of users. How can I lock access to this page so that only a single admin can be using it at any one time? My idea so...

0
Q: Why is there a function `create_function()` - PHP

Me123Why is there a function create_function() if I could use function something(). What is create_function() really ment for. For example if I want to echo a specific value. With function something(): function sayHi($name){ echo 'Hi,' . $name; } //using it like: sayHi('Jacques Marais'); With ...

0
Q: form - output empty checkboxes (array) in a foreach loop (PHP)

user3069176I got a problem & don't get the solutions, hope you can help me! I created a form which have visitors with optional a guest. The sense of the form is to delete the visitor and the guest. Now you got some options: Delete the visitor and the guest Delete only the visitor Delete only the guest ...

0
Q: PHP This webpage has a redirect loop

Navneil NaickerI' am working on a custom website. After successful login this is the condition below is run when user is successfully logged in which will redirect user to dashboard. Else if the session is not isset then it will redirect to admin page. I' am getting error on the screen "PHP This webpage has a r...

0
Q: Why I need -d parameter when start php while I have already wrote it in php.ini?

YangI am using xhprof to test my php scripts. I successfully configured and installed the extension following the instruction. However the instruction show an example, which I should run command: $php -dextension=xhprof.so foo.php I got proper result after type that command. I checked the php ma...

0
Q: Preserve file timestamp when initializing a download with PHP

user2107004I forcing a download with headers like so header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename='.basename($file)); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control...

0
Q: Facebook PHP API for notifications

user3068753Let us suppose my website(www.1234.com) has two users A and B. The website www.1234.com has follow following functionality similar to twitter. A is following B on www.1234.com and both A and B have facebook account. Now I have to implement notification system on facebook using facebook API Case...

0
Q: Can't login to website using facebook's API when site is kept idle for 10-15 minutes

Devendra LattuOn immediate page load or refresh, I can login successfully using fb API. But getting trouble log in when I keep my site idle for 10-15 minutes. Note:PHP session has been set to 2hrs.

0
Q: missing session data after clicking browser back button

SeanI'm developing a simple member management system with php, and I've met a problem: The user logs in and it is redirected to a main page and the user ID is saved in the session; there are some links to other pages in the main page, after the user clicks and is trying to go back to main by pressin...

0
Q: PHP - Group items in while loop

oliverbjI am trying to group my output from my while loop, in PHP. What I am trying to achieve, is I want each "box" with the same 'exposure' to be grouped together, then whenever a new box, with a new 'exposure' comes, a line break should appear, and the next group of exposure should be grouped. Curr...

-2
Q: Check if a value exists in multiple columns, MySQL

RemedyHow do I check if a value exists in multiple columns using one query? I would like to check if the value I am looking for exists in one of these columns: screenshot

0
Q: Adding Get Parammeter On url with a tag

Cindy93i have a url that looks like this mysite.com/index.php?page=home&gender=female&age=22 or mysite.com/index.php?page=home&gender=female&occupation=programmer how can i append a new parram orderby=value and order=asc using a tag like how the submit button works. like when I click the link Nam...

0
Q: Decrypting parameters Codeigniter

DavidI have a small problem. I am sending a mail when an item needs attention. I am getting the encrypted string, but when I decrypt it I get nothing .. Anything wrong in my code? Thanks in advance Encrypting parameter (ID): $this->load->library('encrypt'); $yes = site_url('job/itemFree/?id='.$this->...

0
Q: call custom model's method from controller in laravel4

Sanny Singhsam trying to call a custom method in my Email model from my SessionsController .. Email.php // my model <?php class Email extends Eloquent { protected $guarded = array(); public static $rules = array(); public function sendMail($type,$data) { echo "yes"; } } Fr...

0
Q: Using php api from C# ASP.NET / VB.NET

user3069317I am tasked to use a php api from asp.net c#. I don't have any idea how to do this. Basically the php api accepts multiple parameters from "POST" method and will return a JSON message if the parameters are accepted or denied. How can I do this from C# code behind? How do I send a parameter to the...

0
Q: is it possible to creating an exe for mysql with database

Surendrais it possible to creating an exe for mysql database i want to run my mysql database while installing the xampp/mysql software. at a same time i want to install mysql and our database with schema. is it possible to create an exe that gives me an interface to write things into a DB? Is it possi...

0
Q: Link Button To Each Database Search Result

user3069267I have been searching around for days and cannot seem to find the answer to this, so was wondering if perhaps someone here could lend a hand. I am displaying a list of results from a search through a database and it is displaying each of the results and underneath a Checkout, Return or Edit but...

0
Q: Using woocommerce on palce order getting this error "PayPal = Error Detected. Your shopping cart is empty"

Farrukh KhanI created a website with wordpress and I'm using the woocommerce plugin. I set everything up (its my first time woocommerce). Installed Plugins: Akismet by Automattic version 2.5.9, Facebook Like Box by Sunento Agustiar Wu version 2.4, Hello Dolly by Matt Mullenweg version 1.6, Regenerate Thumb...

0
Q: php code for enter data when first day of month

SasinduRHNi have function for enter data in php for last date of month but how can i change in to first day of month.this is code for last day of month.<?php $a_date= date("Y-m-d");$last_date= date("Y-m-t", strtotime($a_date)); if($a_date==$last_date){ }else{ } ?>`

0
Q: SQL / PHP Calculator

user3069332Im trying to make a little calculator with input given by a person, multiplying and adding these answers with some variables declared in php. But I can't get it to work properly. What is wrong with this script? The writing to database part from the form works correctly. But when it directs to th...

0
Q: PHP Link duplication

IrtzaI am working in PHP and MySQL. I create a table with the results of a query that takes input from the user, and certain Column values are used as links to other php queries. But when i add in the link codes, it duplicates one of the two columns that i am trying to turn into links. When i run a q...

0
Q: Average Response times using PHP/MySQL

charliejsfordI have 2 tables in a MySQL Database. one called tickets and the other is ticket_updates tickets has the following columns: sequence ticketnumber datetime and ticket_updates sequence ticket_seq datetime starttime endtime the ticket_seq column in the ticket_updates table links with the tic...

0
Q: Append object to class for Mustache

Fez VrastaI'm just starting with classes and objects in PHP. I'm using Mustache.php as template engine for my project and I've created a loadcontents.php that has the purpose of fetch data from DB and from my config.ini and put everything in the contents class that will be passed to Mustache to populate t...

0
Q: Passing data to view, as object or as array?

egigSo, I need to create such a convention for my team. When we have to pass data from controller to view, what would be the best data type to use ? Object or Array ? which one is easier to manage ? is there any convention that already exist ? is there any consideration to make? . thanks.

0
Q: How to split a comma separated string into groups of 2 each and then convert all these groups to an array

user3069182I have a string which is like 1,2,2,3,3,4 etc. First of all, I want to make them into groups of strings like (1,2),(2,3),(3,4). Then how I can make this string to array like{(1,2) (2,3) (3,4)}. Why I want this is because I have a array full of these 1,2 etc values and I've put those values in a $...

0
Q: Issues with Wikimedia API search function

Gaston FlanchardI'm working on a wiki search engine based on wikimedia. Actually, here is my query : /external/wikiPublic/api.php?action=query&list=search&srsearch=".$search."&srprop=snippet&format=xml It works well but the results are terribles. For example, it returns redirections like this : <p ns="0" ti...

0
Q: Editing a row using an Ajax request

t4thilinaHere I have shown 4 files I am using to edit rows of table by taking data from the database. First file is DataAdministration.php. when loading this file #Loading_Page7 should be shown and after clicking on #EditForms I need to show #Loading_Page8 div. At the moment when it is displaying for the...

0
Q: HTML Contact Form With PHP Not Working

Dario BudenI have searched and found many of the solutions to the problem but when I try the solution it still does not work. I will include all the relevant (some not relevant to me but what do I know) code in pastebin. I also purposely changed my real email and phone, so thats not the issue. Thanks for yo...

0
Q: In symfony2, why AppKernel Instantiated twice?

user3069385I use symfony2. In AppKernel.php, I writed like this: class AppKernel extends Kernel { public function __construct ($environment, $debug) { parent::__construct($environment, $debug); echo "ok"; } in the page, it shows once "ok" in prod environment, but shows twice in dev environment. ...

0
Q: SOQL Join for Account & Contact Data

SalvatI use a Query to get all Contacts that were changed in the last "timeframe" like this: SELECT AccountId, Id, Email, FirstName, LastName FROM Contact WHERE LastModifiedDate >= $timeframe I also Need the Account name but for now I only make an additional Query like this: SELECT Name FROM Accoun...

0
Q: How do I get the windows file path from a uploaded file?

DaanI'm trying to get the windows file path from an uploaded file in zend. So far I have this: FORM: $offertelocatie = $this->addElement('file', 'bestandslocatie', array( 'label' => 'Bestandslocatie:', 'required' => true, )); CONTROLLER: //var_dump(realpath($form->bes...

-6
Q: why warning messages are coming in joomla site how to rectify

user3069471 Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home3/parsoft/public_html/xenorixit.com/index.php:43) in /home3/parsoft/public_html/xenorixit.com/libraries/joomla/session/session.php on line 658

-1
Q: PHP image upload

Aditya AnjoliI am writing a PHP image upload script. The script does not upload the file on the FTP. Please guide me. Thanks. <?php if ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"]["error"] . "<br>"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br>"; echo "Type: " . ...

0
Q: cakephp manual sql query in one table

mazandrei have this table structure CREATE TABLE IF NOT EXISTS `users` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(50) DEFAULT NULL, `realname` varchar(50) NOT NULL, `password` varchar(50) DEFAULT NULL, `email` varchar(50) DEFAULT NULL, `bos1` varchar(30) DEFAULT NULL...

0
Q: displaying error-messages in speech-bubbles using jquery/css3

user2999787hey there for now i am using this scripts for checking the input in my username-field: // username-check $(document).ready(function(){ $("#username-field").keyup(function(event) { $.post("checkUsername.php", { username: $(this).val() }, function(data) { ...

0
Q: MySQL Php Syntax Error, Check the manual

user3069463I have been having trouble with my code, and I keep getting this error. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[table_name]" at line 1 My code for this is as follows: <? //indicate the database you ...

0
Q: json_decode with special characters

Sathishkumar SI'm passing value from java script to php file for insertion, If i send name without special characters there is no problem with insertion. name: sathish location: bangalore But i'm sending my name with any special characters then json_decode() not accepting it. name: sathish&kumar location: b...

0
Q: Send emails as a background process

Dency G BI want to make a newsletter feature in my application. I need to send emails about 5000-6000 after I create a newsletter. When the newsletter is published it will create an email queue which will be stored in the database. Since it requires a lot of time I need to run it in the background. So I m...

0
Q: Contecting to exchange with php - 403

kramoI am trying to get calendars from exchange. But exchange return 403 http code $action='http://schemas.microsoft.com/exchange/services/2006/messages/FindItem'; $headers = array( 'Method: POST', 'Connection: Keep-Alive', 'User-Agent: PHP-SOAP-CURL', 'Content-Typ...

0
Q: Create Nested Form in php

NilayI have one form which contain some details. one field contain no. of time, next form will be display that time but one after another, and get data of all form in array i m use include in for loop but it display no of time 2nd form at a time.. for($i=0;$i<=$songs;$i++) { include "songs.php";...

0
Q: MySQL Updating enum field type vlaue

user689017I have the following script : UPDATE employee SET is_active='No' WHERE employee_id = 1 I want to update the is_active column which is of type enum from Yes to No, but when I try, I get a feedback of 0 rows affected with no changes made to the database. What is the best way to update the va...

1
Q: How create List object for class variables using php

Rockyin c# we have option to create list object for class variables in the following method, public class Distribute { public string Alias { get; set; } public string Count { get; set; } } public List<Distribute> States { get; set; } So my question is , how to impleme...

0
Q: php.ini, sendmail configuration to send an email using a php script

user2995165I need some help. I am trying to send an email from a php script. My environment comprises of the following: Operating System: Windows 8 XAMPP version: 1.8.2 php version: 5.4.19 I have the following php script: <?php mail('sugar.donkey@gmail.com','Helo','This is a test','From...

0
Q: Posts not getting sorted correctly in category.php and pagination

AdrianThe problem is that when i access Category1, i should see only the posts from Category1, instead I see all posts from all categories (5 posts in total). When I access Category2, i can see only 2 posts from Category1, same thing for Category3 were i can see the same last 2 posts of Category1. The ...

0
Q: Leave out discriminator part of Doctrine' generated SQL

Roel van DuijnhovenAssume the following AbstractPage model: /* * @ORM\Entity * @ORM\Table(name="page") * @ORM\InheritanceType("SINGLE_TABLE") * @ORM\DiscriminatorColumn(name="type", type="string") * @ORM\DiscriminatorMap * ({ * "page" = "Page", * "link" = "Link" * ...

0
Q: Unable to display image after storing its name and extension separately

KenI was trying to make my image upload script more secure by saving the changing the uploaded file's name and then saving the file AND it's extension into my database separately.While that was a success, i am now unable to display the images from my database even though i've concatenated the filena...

1
Q: PHP - Encrypt and decrypt weird sign

oliverbjI am experiencing quite a weird issue with my script. I have this script, that will get posted with jQuery as a POST. This is the URL that gets sent: url: 'index.php?i=v&p=k&token=<?php echo($tokenS); ?>&key=<?php echo $secretKey; ?>&token=<?php echo $tokenS; ?>&time=<?php echo $time; ?>&stime=<...

0
Q: Two or more different checkboxes how to store value in database

user3069468I have a form with text and number input fields and then there are also some checkboxes. I can get the text into the database from the input fields, but I can not get it to work with checkboxes, when I have more than 1. Here is the code of 2 out of the 4 I have in my form. <dl class="inputC...

0
Q: Find all external links with Simple HTML Dom Parser and regular expressions?

Me123How can I find all external links on a page using regular expressions and Simple HTML DOM Parser. I have the following code to find all links. <?php include_once('simple_html_dom.php'); $url = "http://www.tokyobit.com"; $html = new simple_html_dom(); $html->load_file($url); f...

0
Q: zendframework 2 layout's controller

amitbeni'm new to zend framework 2 and have stumbled on this problem that i can't find a answer to: i have a layout.phtml and i want before the layout loads to have a (layout) controller fetch from my db some junk and pass it the the layout to render, so no matter if it is my application module or any ...

0
Q: invalid header error on sending a request with curl

maxhere is my code echo 22; $url = 'http://www.10bet.com/pagemethods.aspx/GetLeaguesContent'; $fields = array( 'BranchID' => urlencode('1') , 'LeaguesCollection' => urlencode('10098') , ); $fields_string = ''; foreach($fields as $key=>$value) { $fields_st...

2
Q: symfony2 access private files as admin user

Axton56In my Symfony2.3 project, i have a frontend website and a backend. The backend is secure by security.yml file and only role_admin user can acces backend. Want i want now is only admin users can download pdf files stores in assets. Is there a way to do this ? now, all visitors can access my pdf...

-4
Q: Update Content With Ajax And Ajax Auto Refresh Div

SelvakumarI'm developing an web page and i would like to add Ajax post option in the index page... i.e when the user submit the post it will store in the database and i want to display the content below the post form without refreshing the hole page. Or otherwise i want to refresh the content div every 10 ...

0
Q: PHP SOAP-client's problems with .net webservice

Dmitry A. KorolevI am consuming a SOAP web service using php5's soap extension. And I have an error with request which I've sent to service. When I consuming a .NET WCF webservice using 1.1 binding from WSDL (and 1.1 version of SOAP) I have this response (error): a:InternalServiceFaultWcfDeserializer load or...

0
Q: How to display timer for cron job

Jonathan StokerI am currently working on a site that sumbit data from one table in the database to another table in the same database every 12th hour. I would like to display a timer that shows when the specific cron job is scheduled to run. Maybe if this could be done in jquery to set up an automatic timer? ...

0
Q: mysql_num_rows replacment to recomend?

Akul Von ItramI read that mysql_num_rows is deprecated as of PHP 5.5.0, and will be removed in the future. So what is best replacment by your opinion? $KatalogVrstaID = $redak_katalog['KatalogVrstaID']; $rezultat_podvrsta=mysql_query("SELECT * FROM katalog_podvrsta WHERE KatalogPodvrstaVrsta='$KatalogVrstaID'...

-5
Q: PHP Fatal error: Using $this when not in object context in ../form.php line 5

user3069609I am receiving this error when calling the form like this : <?php $form->displayForm(); ?> Code on Line 5 : line 5 ---> <?php if ($this->hasErrors()) : ?> <div class="error"> <p>The following errors occurred:</p> <ul> <?php $this->displayErrors("<li>","</li>...

0
Q: Creating a folder in php apache

Bhawin ParkeriaHere is my code to create a folder named images $path="".Yii::app()->request->baseUrl."/users/".Yii::app()->session["id"]."/images"; if(!file_exists($path)) { mkdir($path,0777,true); echo($path); } But the error i am having is mkdir(): Permiss...

0
Q: i am try many things but my site cookie as not unset

user3060459//my site under domain like this:www.123.com/new //full site code under the new folder include index page. // i am set the cookie in in remeber me clik cookie is create // cookie code like this setcookie("cookie_name",$_SESSION['useremail'],time()+3600); setcookie("cookie_id",$_SESSION['user...

0
Q: Php Input Validation not responding

user3056723I am new to the web developing world.Please bare w/ me for having some mistakes and insufficient knowledge. I'm trying to study the validation process of a users input. Below is my Code: <?php if($_POST['formSubmit'] == "Search") { $errorMessage = ""; if(empty($_POST['formName'])) { ...

0
Q: session expiring after refreshing page PHP

Brian Chitalu MukukaI am having problems with a custom start session.For security reasons I decide to look for a method that is safe when starting a session and I came across this tutorial and implemented the method related to start session. The problem is that whenever I am initiating a new session variable and re...

0
Q: File attachment path issue in CSV with django

Sandyi have implemented csv in my current Python Django project. writer = csv.writer(open('custom_data/abc.csv', 'w+')) print "abc" headers = [] for i in data_desc: headers.append((i[0].replace('_', ' ')).upper()) j = j+1 ...

0
Q: How to export Highcharts with CMYK colors?

kmasI would like to know if there is a way to export charts from Highcharts with CMYK colors ? I have read nothing in Highcharts API about CMYK. I have no problem to export them in PDF and also in SVG with php exporting-server but only with RGB colors. Do I have to configure something in CSS/Javas...

0
Q: How should i remove printer image on print?

user3067299I am printing receipt using following code,but when i click print even printer image is shown in preview and print.My code is <button onclick="myFunction()"> <div align="justify">Print</div></button> <script> function myFunction() { window.print(); } </script> ///all code are in html body tag

0
Q: Alternative to localStorage for PHP?

SoulArcangelExist an alternative to localStorage in PHP for save big data in locally? I created a web app that show messages on screen. This messages are stored in a mysql database, but I would run the application too offline by saving messages locally, you can do it?

0
Q: memcache(d) does not work on ubuntu 13.10

bencagriI'm trying to use memcache on my apache. (Xubuntu 13.10) I installed Apache 2.4, Php5, Mysql5, php pear etc like here: https://www.digitalocean.com/community/articles/how-to-install-and-use-memcache-on-ubuntu-12-04 php -m root@benjamin:~# php -m [PHP Modules] bcmath bz2 calendar Core ctype curl...

0
Q: Different size strings to multi dimensional array

user3069688I have different size strings that look like this Foo > bar > baz Or this Foo > baz I would like the array to look like this $arr = array(foo => array( bar => array (baz ))); I want it to check how many times this appears " > " and build the array base of that for each string

1
Q: How to change x and y coordinates from drawing PHP Mysql?

user3069677I want to count the letters in php using some php funtions. I have used the string function but it doesn't help me. Is there any other way to use?

0
Q: PayPal doesn't fill City State

Emerald214I tried to automatically fill out Shipping and Contact Information using PayPal Advanced Features but I have a problem that City State isn't filled when country is Australia. The same problem happens with Italia and some countries. How to fix it? This is the request and response using cURL. R...

0
Q: Parallels Plesk scheduling a task with wget command

roozbubuI'm running Parallels Plesk on a Hostgator windows server. I am trying to set up a 'Scheduled Task' ie cron job running every 5 minutes that simply loads a webpage, nothing more. This is my current setup: Unfortunately, nothing seems to work. I was ideally looking for something like wget "myur...

0
Q: Deleting from table if check box unticked

DarksideThis is probably an easy one but I am stuck. I have a form with checkboxes that show employees and there skills, these are taken from a table with a many to many relationship. The below code works for updating the records but I am unsure on how to delete records if the checkbox is un-checked $e...

0
Q: Paypal Return url is truncated

UmarPaypal return url truncates the Query String. My Paypal return url is : $returnURL = "http://localhost/eko/index.php?module=UserPlans&action=PaymentSuccess&Response=success"; and it is truncated after paypal adds up token and payer id. truncated url becomes http://localhost/eko/index.php?m...

0
Q: can't create a new tube in php pheanstalk

rubaI am using php phenstalk, and I want to create a new tube so I wrote the following code: $this->pheanstalk = new Pheanstalk(127.0.0.1); $this->pheanstalk->useTube('api')->put($json_info, 0,0,1); //json_info is data that i need to put in a tube as json encoded But when I run the following comma...

0
Q: BrilliantRetail Payment Gateway

Full Time SkeletonI'm trying to add a custom payment gateway to BrilliantRetail following these instructions but it's not working. I've added a _local directory which is required, I've added it here: expressionengine/third_party/_local/brilliant_retail/gateway/ The file name is correct: gateway.my_custom_metho...

1
Q: Why does Symfony still log to a dev.log file, even when I didn't define it in a loghandler?

StivniDuring the execution of Symfony Commands, I want to log messages to a different file. I have read the Symfony and Monolog documentation, and it should work like I describe here. (Note that I know messages from the 'doctrine', 'event', ... channels will still be logged by the main handler, but tha...

0
Q: Codeigniter MSSQL connection SQLSRV

user1076997I'm working on a web app that connects to a MSSQL database. I previously managed to connect to the database without any problems, however I made a minor change to the sqlsrv_driver file. I encountered the below error, rolled my changes back to the original file, but there are still issues. I ha...

0
Q: Redirect JIRA url to another url

user3069722if you can help I will explain my issue as briefly as possible. I have created a redirect url, so that the users can connect easier to it. the name of the redirect is : jira.xyz.co the redirect is working fine, and it takes me to the desired destination url, but without DNS resolution....

0
Q: how can i pass start date and end date as command line arguments in PHP

preethiI am trying to transfer data from one table to another using PHP based on date range.can anyone help me. import anprint import os import sys import re import datetime from mydb import cursor try: cam_name = sys.argv[1] rec_date = sys.argv[2] except: print "Usa...

0
Q: Transfer Value From One Column To Other

MASajjadI Have Two SQL Table's Columns Column A Column B Is there any way which only transfer 410015, From 410015,410016,410017,410018,410019,410020 (which is Column A Value) To Column B using PHP. So the values will look like Column A: 410016,410017,410018,410019,410020 Column B: 410015, Please...

0
Q: How to sort json type data using javascript?

EliI have 3 dropdowns with list of places that I wanted to sort in ascending order. The first dropdown of places is sorted using codeigniter active record order_by function and the places were successfully sorted in ascending order.However,using onchange javascript function,when I choose a place in ...

0
Q: Mail Send Using PHP Script

Er Pathak Harshal<?php if(isset($_POST['email'])) { // CHANGE THE TWO LINES BELOW $email_to = "mail@domain.com"; $email_subject = "Website Enquiry"; function died($error) { // your error code can go here echo "We are very sorry, but there were error(s) found with the form you submi...

-1
Q: search system having issues

muhammad umar farooq franki am making a search system and i have facing a problem in it my code is $maincat=@$_GET['maincat']; $maincat12=@$_GET['maincat']; $subcat=@$_GET['subcat']; $country=@$_GET['country']; $procat=@$_GET['procat']; $sort=@$_GET['sort']; $author=@$_GET['author']; $publishers=@$_GET['publishe...

-1
Q: PHP Webmail similar to Outlook

Grupo ActempIs there any PHP based Webmail similar to Outlook for free? Or a webmail that has a skin similar to outlook? I want to have one like this for my clients.

-1
Q: Registration page without phpmysql for home server

Grymfogel1I'm trying to make a registration page with mysql for a school project and i'm not that familiar with php. I wonder if there is any way of making a registration page connected to a database without using php. Thank you!

0
Q: Whmcs Code Modification

ahmad05my company has been using Whmcs for billing what i want to know can i modify the code to my needs (i.e add functionality)i wanted to know that if can do this or not as most part of the code is encrypted. i have just started working on a enterprise level wand wanted to know if i have the full con...

0
Q: imap_check throwing notice when mailbox is empty

Niet the Dark AbsolSo I've recently started my first real job (yay!) and I'm working on an email checker. It's working great, no errors... provided there are emails. $mbox = imap_open("{.../pop3/novalidate-cert}INBOX","smith@example.com","..."); $inbox = imap_check($mbox); The above code works just fine when th...

0
Q: Create MySQL DB export via PHP

CaptainCarlI want my entire database to be exported to a string(Such as PHPmyadmin does an export) in a PHP file. I want to export the database I'm connected to at that moment of time. I can't really find a definite answer via Google, just a lot of people who want to export to CSV and stuff. I just want th...

0
Q: How to get access token using refresh token in google authentication?

Chandan005I'm trying to get new access token using the refresh token provided during the first login. I'm using the following code to get the user info ,but not able to get it when access token expires function getTokenInfo($access_token,$refresh_token){ require_once "google_oauth/src/Google_Client.p...

0
Q: how remove 'a' tag in a string by its class name

YasirPoongadani'am trying to remove a tag by class name class="btn" from below $str variable using php code $str = '<div class="btn-holder"> <a class="btn" href="=#"> <span>Log In</span> </a> <p><strong> <em> <a id="reset" href="#">Reset My Password</a> </em> </strong> </p> </div>';

1
Q: Check if over 18 years, only works from 1960->1994

user3017426I am having some troubles with my form. The PHP is going to check if the age is under 18, and if so, the person gets a message that he needs to be over 18. However, the form only works when the person is born between 1960-1994. If the person is born 1950, he gets a message that he is not 18 years...

0
Q: PHP move information between SQL Tables

Maggie AckermannI am trying to move information from Table A to Table B with the following code. in the same time I want to delete the row in table B once information is moved to table A //Move from table A to table B $sql = "insert into del_ussd_members SELECT * FROM members WHERE member_id='$member...

0
Q: Not Able to see the uploaded 3gp file from android device to PHP Server

Traveling SalesmanIn my android code, I am trying to upload a .3gp file to XAMPP server. I reused the following code for uploading the file: public int uploadFile(String sourceFileUri) { String fileName = sourceFileUri; HttpURLConnection conn = null; DataOutputStream dos = null; String li...

0
Q: Open Cart Header position error

anthonytherockjohnsonI have been trying to add a position to my header in opencart i would like to put a banner in there ok. so here is what i have done so far. I opened the language file for banner module here /admin/language/english/module/ entered the following code $_['text_headerbanner'] = 'headerbanner...

0
Q: Fill in postalcode after iframe is totally loaded - working but not in Chrome

user3069797On our website we send a postal code from a form to an iframe. The code works in all browsers except Google Chrome. This is the code: <code> <?php if (isset($_POST['postcode']) && !empty($_POST['postcode'])) { ?> <script> $( document ).ready(function() { $('#sd-iframe').load(function() { $(...

2
Q: How to run code through eval?

Sanjay Rathodhere is my code of for loop <?php for ($x=0; $x<=10; $x++) { echo "The number is: $x <br>"; } ?> and i want to run this code using eval so how can i run this. i had tried this <?php $var = ("for ($x=0; $x<=10; $x++) { echo 'The number is: $x <br>'; }"); eval($var); ?> i wan...

0
Q: How change mp3 tag and photos with PHP?

MohammadHow change MP3 photo with php ? I use id3_get But in demos not found change photo

0
Q: Array to string conversion error when parsing xml data to php

user3068785I m new in PHP.When I try to store variable in array i got this error ** Array to string conversion ** PHP Code is : $record = simplexml_load_file('demo.xml'); foreach ($record as $item): $a=$item->item2->record->p21; $b=$item->item2->record->bq_21; echo $arr1 = array($a,...

0
Q: Codeigniter MSSQL/SQLSRV Connection

user1076997I'm working on a web app that connects to a MSSQL database. I previously managed to connect to the database without any problems, however I made a minor change to the sqlsrv_driver file. I encountered the below error, rolled my changes back to the original file, but there are still issues. I hav...

0
Q: PHP compiling on windows Toroule

Claudio PomoI've this troble when compile php-dev pn windows 7. Anybody can help me? C:\php-sdk\phpdev\vc9\x86\php5.5-201312050830>nmake Microsoft (R) Program Maintenance Utility versione 10.00.30319.01 Copyright (C) Microsoft Corporation. Tutti i diritti riservati. Recreating build dirs ...

0
Q: Yii - Highcharts - Cannot show Y values

Daniel CoelhoI'm using the Yii Highcharts extension, i can show X's values but cannot show the Y's values. My Highchart widget code is: $user = Yii::app()->user->id ; $xAxis = Yii::app()->db->createCommand() ->select('data') ->from('teste') ->where('Utilizador_idUtilizado...

0
Q: Parse emails with email piping in php

DS9I use MIME E-mail message parser class for parsing email.In this i get to,form,subject and message id. Problem is the body and attachment are not fetch or parsed. In this i stored email data in to text file and use this text file for parsing mail. Code: <?php include_once(CLASS_PATH."rfc822_a...

0
Q: Form validation unable to redirect page in PHP

Rendy Setiadii got some problem regarding form validation using PHP. I have done some research on google, the problem is I seem can't to redirect user after login using <?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?> in form action, it keep staying on index.php page instead going to other page. Form <?...

0
Q: Private API Creation Standards - Is this API correct?

Dev01So we wanted to create a private API that would allow others to interact with our services such as saving certain things in our db via api or getting certain information. The API itself only expects JSON data that can be pased via any programming language to the API. Here is code of the API at ...

0
Q: php PDO execute - Invalid parameter number: parameter was not defined

user1523489I have the following Code: static function insertFirst($userID) { $test = array( ':user_Id' => $userID, ':t1' => 100000, ':t2' => 100, ':t3' => 100, ':t4' => 100, ':t5' => 100, ':t6' => 100, ':t7' => 100, ':t8' => 100, ...

0
Q: How to stop decimals being rounded up or down using php

RiaI am calculating a number which I use in another calculation. the problem is this number could be 67.9699 I want it to say 67.96 without rounding up or down just chop the other digits of. I was hoping the floor function would do this like: $num2 = floor(($num1/5)*100)/100; How ever this is sti...

-6
Q: Script with member area and virtual money or credit?

user3065396hey i am looking for Script with member area and virtual money or credit ? and virtual products ! i want sell virtual products with virtual money to members

0
Q: Search Between Two Table Get mysql_fetch_array() WARNING

Subhajit SarkarI create two table customers | customer_details I create two search field and the given value search between two tabel Here is the code <form> <input type="text" id="example1" name="example1" value="<?php echo date('d/m/Y'); ?>"> <input type="text" id="example2" name="example2"...

0
Q: PHP to Display Categories based on parent

KingRaymondI have been fighting with this issue for about 2 months now and I still have not found a solution. I am very new to PHP/MYSQL so please be easy / patient. Basically, I have a page, called "browse.php" - This page has a query, which selects * from table and lists the categories AS A TREE. What ...

0
Q: Cron job of multiple php files with a php script

StanFor me cronjob is a very new feature, so I would need some help from you guys. I need to create a cronjob that will run at every 8 hours some php scripts. vend_1.php vend_2.php vend_3.php vend_4.php vend_5.php vend_6.php vend_7.php vend_8.php vend_9.php Loc...

0
Q: how to write a common pagination

user3069756hi i am new here and PHP i am creating a dummy site with insert update and delete i have two modules which uses pageination i want to write a common pageination for that using oops concept this is my pageination code <?php include ("conn.php"); $pagelimit=10; $pagequery= mysql_query("SELECT COU...

0
Q: How can I manipulate my array, so if there is a scan within 60min with the same

ZazThis is really hard to explain, but i will do my best. I have a array called arrayoftransationcs which contains 4 strings. *SCAN, MEMBER_ID, RESTAURANT, TIME, PAID. If a scan is paid, it will defined as 1, and if not it will have 0. So the main question to my problem is, how can I get scan th...

0
Q: Why is javascript+CSS display setting making radio buttons dissapear?

David McClaveI have a simple javascript that hides/shows various DIVs based on a dropdown menu choice - but it makes the radio buttons on one of the divs go away... anyone know why? the lists with radio buttons are programatic, and it works with the "Book" option, but not the "Video" Option. code: <script> ...

0
Q: dompdf unicode isssue in cakephp

Palsaniya My code is below but containing unicode problem. Please help... /* Create DOMPDF object for pdf file */ $old_limit = ini_set("memory_limit", "256M"); $dompdf = new DOMPDF(); $html = utf8_decode($html); $papersize = "legal"; $orientation = 'potrait'; $html = mb_convert_encoding("હà«...

0
Q: Get large facebook video thumbnail using graph

zackI want to get the large facebook video thumbnail using graph. Below code get the small thumbnail https://graph.facebook.com/VIDEO_ID/picture This code will return Ex: https://fbcdn-vthumb-a.akamaihd.net/hvthumb-ak-prn1/632393_10151574602254838_10151574598089838_34404_282_t.jpg If i replace...

-2
Q: What's the syntax for nested conditional statements?

EustatiaI want to check if $AD = 1, then if not pass to another function, but if $AD = 1 check if AC = contains some value, if not do some stuff. if ($AD == '1'){ else if ($AC == ''){ echo 'AC is empty'; } } Thanks.

0
Q: How to add a column entry in an already existing MYSQL database table?

PhantomI have a html page with a text field for email. When I enter an email ID I store it in the database. The database has 3 fields namely 'serial_no','coupon_code','email'. I already have 100 odd coupon codes stored. So basically I have serial numbers 1-100, coupon codes 1-100 and my email column is ...

0
Q: mongodb full text search negative terms

RouxI'm currently working on a search engine. I do it with php / mongodb. The new feature Full Text Search does quite well a big part of the job, but I have a situation. Here is an example: I search "Pizza -restaurant" (I'm french, but the words are transparents) With the negative terms, there is ...

-1
Q: PHP monthly EMI calculation script

PrakashI want to create script for monthly EMI Calculation. Lets say my product value is Rs. 10000, interest rate = 12% and period is 3 months. How to calculate EMI value for this?. I tried with some formula? But not getting correct value. Can you tell me any idea for this? Thanks in advance

0
Q: uploaded file showing 505 error on browser

Fazeela Abu Zohrai have a form with an upload .After upload i am saving the file to a folder under /public_html/images/resumes/(here goes the uploaded files) in remote site set up.Here i am saving the uploaded file's name into a variable $filename. At the same time i am sending a mail using YII extension ,In the ...

0
Q: Is this a good idea to use Yii Framework with Doctrine 2 ORM?

Andrei NestserI love Yii Framework, it works fast, it's pretty cool and easy to develop with. But now I have a problem - I am going to develop Learning Managment System with difficult domain logic and it's not good for me to use Active Record from Yii for my models, it would be better to separate mapping and d...

0
Q: ace code editor - forbid to type some php funcions, highlight those functions and raise error

SamueleWe are using Ace with mode PHP in a web application. We want to forbid to the users to use some php functions like: "unlink". So when they write those functions in the ace textarea, ace should be say: ERROR FORBID FUNCTION. What is the best way to achieve that? We was able to highlight those fo...

0
Q: 404 Error in codeigniter after specifying cname

curious_coderI have an application running in codeigniter. I have created a new cname in dns records of concerned server. When I type the new url(alias url), the login page is opening. When I enter the required details and submit, there is no response from server. After checking the console panel, I found out...

0
Q: PHP Revisions Library (like StackOverflow)

user3070008Is there a PHP library out there that can do something like this for me? http://stackoverflow.com/posts/20353734/revisions I'm looking to implement revisions where users can see what was added, changed and removed in posts.

0
Q: jquery/php form in modal window

user3021665I have a form in a modal window. When I submit the form through ajax I don't get the success message. My aim is to see the message created in the php file in the modal after submitting the form. Here is the code: <p><a class='activate_modal' name='modal_window' href='#'>Sign Up</a></p> <div i...

0
Q: Why the control is not going inside foreach in following scenario?

PHPLoverThe scenario is I'm fetching a record from MySQL database this record data is in form of HTML so I want to remove few tags from this HTML data record. For this I wrote one function also. But I'm not getting why the control is not getting inside foreacch. For your reference I'm giving below some p...

0
Q: WordPress Internal Server Error

AkhilAniyanCausing full Virtual Memory Usage!! 3,500 / 3500 MB Error log provided by hosting: [Thu Dec 05 16:33:34 2013] [error] [client 123.164.66.67] (12)Cannot allocate memory: couldn’t create child process: /opt/suphp/sbin/suphp for /home/sparkyh1/public_html/androidizer.com/index.php, referer: http:/...

0
Q: PHP Error prepare() on a non-object

mohammad Mustafaso i have this error on php. Fatal error: Call to a member function prepare() on a non-object in C:\xampp\xampp\htdocs\BookStore\user.php on line 21 this is the code. this is the connect class where i connect to my DB. <?php class Connection { public function dbConnect() { return new PDO...

0
Q: Integrate Dropzone with Symfony2 giving file "" does not exist

Rafael AdelI'm trying to integrate Dropzone with symfony. But when I select more than one file, I get this exception: The file "" does not exist 500 Internal Server Error - FileNotFoundException Stack Trace in /var/www/thegabrielhotel/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/F...

0
Q: How to effectively match a string with lots of regular expressions

dev9I want to be able to effectively match a string with a number of regular expressions to determine what this string represents. ^[0-9]{1}$ if string matches it is of type 1 ^[a-x]{300}$ if string matches it is of type 2 ... ... Iterating over a collection containing...

0
Q: jQueryMobile populate listview with PHP + Ajax

user3065191I'm trying to populate a listview of jQueryMobile with contents from PHP side. load_info.php file have the following code: if(isset($_GET['type'])){ switch($_GET['type']){ case 'locale': load_locale("localhost", "root", "", "testing"); break; } } fun...

0
Q: Cakephp: Many to Many Relationship with checkbox

PatrickCurrently I have two table Products and Orders joined with HABTM. I would like to add the order by ticking product on the list. Below is the code in OrdersController $products = $this->Order->Product->find('all'); $this->set(compact('products')); Here is the code in orders/add.ctp <?p...

0
Q: Map table in html to database

user3070028This is a 2 part question:- 1.I have a table in html.the number of rows is going to be dynamic. Each row has 8 checkboxes each with a different class assigned. How do i map this table into a database(using submit button for the table form)?is it GET method in php or POST and how do i loop through...

0
Q: Preventing errors when using mysql_real_escape_string with no active DB connection

crmpiccoI have inherited a legacy system and it includes this function that is used in many, many places across the site (both front and back end). function clean_text_for_db($str) { $str = trim($str); $str = stripslashes($str); $str = mysql_real_escape_string($str); return $str; } It ...

0
Q: String Conversion to proper format

Code HunterI have this string fetched from Database: $string = "Meubles salle Ã"; Some characters are not fetched in right order as they suppose to be. How can I convert them into its original format? Things I tried: echo utf8_decode($string); echo utf8_encode($string); echo htmlentities($string); ...

0
Q: php: replace numeric ids with associative keys

pixelineI'm working on a function that should parse an url to create an associative array. I'm having trouble replacing numeric keys with their proper string equivalent. For instance, http://localhost/fr/user/edit/5/?foo=bar&love=hate produces Array ( [langue] => fr [app] => user [action] =

0
Q: How do I pass link ID to controller?

Jamesrecently I've been trying to figure out this issue. Imagine a page with few links, each link is generated using a query that retrieves all the links from my DB. What I'm trying to do is when I click the link it loads a detail page of that exact link's ID within the detail view. Instead I'm gettin...

0
Q: preg_match for verify string codes

50l3rI need to verify this codes in php with preg_match but i dont manage regular expressions: R{1 TO 12}-{00 TO 99}-{00 TOP 99} Ej: R12-54-03 V-{01 TO 17} Ej: V-06 Y-{A TO Z} Ej: Y-Z BALL{1 TO 6} Ej: BALL5 Z{01 TO 30} Ej: Z09 you can help me with this problem? I am a denied with regular express...

0
Q: Search through server folders and display files that exist

Rik89Ok guys, So I have a folder called uploads in this folder is a folder for the year the file was uploaded(2013,2014,2015 etc...), inside the year folder are usernames(rick,dan,edward etc...), inside the usernames folder are folders 1-12 for the month that the file was uploaded. I want to sear...

0
Q: Query based on enum value

user3070011I am trying to query based on the value of an enum field. Essentially I have 3 values (categories) for the enum field, a, b and c respectively. I am attempting to populate a select field based on the results of the following query: SELECT * WHERE pid = $id AND group = 'a'; I have tried this wi...

0
Q: count colum and check if a different column is unique

user3057514I am trying to do a select statement which checks count rows. First off let me tell you why I want to do this just in case you have a better idea how to do it than me. I have an html table which is used to update different records. You can only update one record at a time because they is no po...

0
Q: Zend 2 redirect (bug or feature)?

user3070045Zend 2 seems to execute the "redirect()->toUrl()" not directly if it's called. I have the following code: public function onBootstrap(\Zend\Mvc\MvcEvent $e) { $em = $e->getApplication()->getEventManager(); $em->attach(\Zend\Mvc\MvcEvent::EVENT_DISPATCH, array($this, 'onDispatch')); } p...

0
Q: Sugarcrm - Notes date modified to update leads date modified?

bcrajkumarI'm using sugarcrm CE 6.5.14. Whenever I added a task for a lead the date modified field not getting updated of that lead. Right now, it is very tedious to track and follow-up the recent updated leads. I've googled and found related searches on sugarcrm forums using logic hook. http://forums...

1
Q: PHP Incomplete Class OOP

Arturik1988hello i have this code public function query($sql, $params = array()) { $this->_error = false; if($this->_query = $this->_pdo->prepare($sql)) { $x = 1; if(count($params)) { foreach($params as $param) { $this->_query->b...

0
Q: Creating multiple CSV files and then zip them ready for download using PHP

CNWLshadowI'm trying to create two CSV files from separate tables in a MySQL DB based on the users input (html form). The user can select which columns to display and the data range. I've gotten to the stage where I'm able to query the DB and output the result to HTML, I now want to create two csv files,...

0
Q: Populating an HTML select list from a PHP MySQL array

Sam HI'm fetching a list of 'actors' from my MySQL database table actors & trying to populate the result into a HTML Select box: <?php $query = "SELECT actor_name FROM actors"; $result = mysql_query($query) or die("<h1>Error - the query could not be executed</h1>\n"); $num_rows = mysql_num_rows($...

0
Q: unexpected '' (T_ENCAPSED_AND_WHITESPACE) while output

meksI'm sorry if my question may appear silly, but I'm really confused with an error I'm getting while outputting a file name from array. First I'm populating array with a column names from my database. Here is the code: $AddNews = "SELECT * FROM picture_names"; $result = mysql_query( $AddNews,...

0
Q: How to echo out the whole table? Right now I only get the last row

user3070065I have this code right now and I only get the last two rows, but I need to get as many as there are in the database with the html. Thank you in advance //We include the includes.php, which contains our db connection data. include("includes.php"); //dbCon(); references the db co...

0
Q: How to get a particular row in CActiveRecord in Yii framework?

CashewLets say I have a record like the following Users - id - username - password While login i want to check user's x_username, x_password with this record and i should return the matched row. How to do that in CActiveRecord? I tried the following $user = Users::model()->find('userna...

-2
Q: Push a button with HTTP POST

Karolis RaišelisI'm new to objective c and iOS programming, but my boss asked me to add paying method to the app using HTTP POST. I have managed to fill text fields with POST, but i dont know how to press a button "Pirkti" it stands for "buy". Do i have to know something about how that button was made in php, o ...

0
Q: Blocking fake users from using Facebook login

Markus OssiI am doing growth hacking at a startup. We are currently running campaigns where we give incentives (monetary reward, product prices, free goodies) for people who register as our users. In our most recent campaign we started using Facebook login for a fast and easy registration. However, we noti...

0
Q: How to replace all characters except a numeral (200, 200.45 etc.) from a string in php?

user2866631I have few strings where i need to extract only the prices in php (which will obviously be numerals). The use cases are follows: 1) Rs. 23,459.45 desired output = 23459.45 2)Our best price 23,459.45 desired output = 23459.45 etc. I gave the above use cases to ...

0
Q: sorting some weird array in php by a value

MihaiHow can i sort something like this $a = array( 0 => array( 'field' => array( 'id'=>'valueid' ) ) ); by valueid? I have managed to sort it by field but i can't realize how to do this weird sorting

-3
Q: Downloading an image from database in php

user3070119iam fresher in php. I want to download the image from the database in php. That images is stored in wallpaper folder. My script is running on localhost bt not on server. plz take a look on mi code n give me the solution. Table name: wallpaper attributes(id name, image) Images are stored after ...

-2
Q: Make a calendar with 2 cells for 1 day. PHP

user3070146I got the following code and that works, but I want to split a day in 2. AM and PM. I've been looking on the internet but I can't find how to do this! Can anyone please help me? Thanks in advance. Here is my code: class Calendar { var $events; function Calendar($date) { ...

0
Q: Cannot solve: PHP Warning: POST Content-Length of 13110857 bytes exceeds the limit of 10485760 bytes in Unknown on line 0

aahungI try to modify the post_max_size, upload_max_filesize and memory_limit I just cannot avoid this: PHP Warning: POST Content-Length of 13110857 bytes exceeds the limit of 10485760 bytes in Unknown on line 0 I dont know where 10485760 comes from, I'm using JustHost service and Choosing Sin...

0
Q: JQuery class vs ID

Aaron FI have a foreach loop here. For every item it prints, there is a comment section that is expandable/collapsable. The problem I have is, when I hit the "Expand All" for an item, it expands the comments for EVERY item in the loop all at once. Whereas, I only want to see the comments for that spec...

1
Q: JavaScript Array vs C# Array

HeinRichardSonButtWhat type of array is this JavaScript Array shown? 1-dimensional, 2-dimensional or 3-dimensional? Also what will be the exact representation of this array in C#? var arr = new Array ([34.01843, -118.491046], [34.006673, -118.486562], [34.009714, -118.480296], [34.010408, -118.473215], [34.01521,...

0
Q: How php is sending mails directly from the script?

Dency G BHow php is sending mails directly from the script?Without any smtp server installed? I am curious..!! On my server, I dont have any mail server installed.But it can send email. How does this happen?? I am using phpmailer.

0
Q: Is there any way to insert array element to mysql database

madhurjyaI am little confuse about to insert the array element in mysql i have a array as following $a = array( '1' => 'a', '2' => 'b', '3' => 'c', '4' => 'd', '5' => 'e' '6' => 'f' ); and i have a table field id1,id2,...may be id1 id2 a b...

0
Q: How to upload image taken from camera in android into MYSQL database

user2975407How to upload these images taken from camera into MySQL I can take multiple images and These images shown in image view but i couldn't find a way to upload them in to MySQL database. below is my code. This is the solution class public class solution extends Activity { static int ...

0
Q: Requesting for voice call in mobile app using php via elastix server

ElangoAm using elastix server for voice call functionality in mobile application, in this i can able to store value(extension data) in asterisk database and also able to view data's in elastix page through the php code . When am calling via extension number am receiving "service not available". h...

0
Q: Wordpress Rewrite Rule API

Piero MalteseI'm gone crazy with Wordpress rewrite API. I have: add_action( 'init', 'add_rewrite_rules' ); function add_rewrite_rules() { add_rewrite_rule( 'type/([^/]+)/?', 'index.php?pagename=$matches[1]', 'top'); } But when I go on www.mysite.com/type/article-name...

0
Q: Detect Price with xpath Efficiently

TransformBinaryI need to scan the page for price and extract it, i was thinking of detecting $ and extract the value after $. How can i do that using xpath? Unfortunately different page has different format. Therefore i need it to be smart enough to detect $12 or $12.30 $price= $xpath->query("//??[@??]"); ...

0
Q: Probleme in loop using Javascript , Please need clarification

nabilinfoi have this Javascript Function in a .js file , i need to customise this code by using a loop to display 9 locations // Javascript File function GetDateTime(plg) { switch (plg) { case "fr": language='fr'; break; case "en": language='en'; break; ...

0
Q: CodeIgniter two tables join with last table having optional rows

Majid Khan MohmandI have two tables in my database which are organized as follow --> Articles(ArticleID,UserID,ArticleCategory,ArticleTitle,ArticleBody,ArticleIsActive) --> ArticleImages(ArticleImageID,ArticleID,ArticleImageExtension) Scenario: => A user wants to post an article, the user has the option to pos...

0
Q: Show Youtube video on my PHP Website using proxy filter

user3070174I am new to Stackoverflow and apologize if I made any mistake in my wording or break any rule of Stackoverflow. I am using following code to show a youtube video in my php website, but Youtube is banned in Pakistan and cannot show the video on my website. Is there a way to show this video "using...

0
Q: php files are not working in my enkompass server

user3069471When i run .php file in my enkompass server showing below Error message. Server Error 500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed. Please help me how to solve this Error. Thanks in Advance

0
Q: How to make Opencart 1.5.6 urls use product name

user2689642Currently when you choose a product (Business cards) the url looks like this http://smoothprint.co.uk/index.php?route=product/category&path=59 What would I have to change so the Url would be http://smoothprint.co.uk/business-cards Is the url saved in the database attached to the product?

-2
Q: Adding a script to an Admin Template

user3057374I recently bought a Admin Template form themeforest and I was wondering how to apply a script to get it working. Or what are the steps to make it work.

0
Q: Canonicalization of php system

Kristoff RandI'm trying to get rel=canonical to work on my site, a php cms system called tomatocart. I'm using this php snippet which does create the correct url, however it shows the url on the page and it does not place it in the Head area where it should be. Canonicalization checkers do not see the code. ...

0
Q: Joomla 3.2 Increase the upload_max_filesiz

user974946i try to download this template on joomla 3.2 extension manger : http://scriptmafia.org/templates/115622-yt-moustache-yootheme-for-joomla-25-32.html but every time u upload it , its give me this error : There was an error uploading this file to the server. i read in articles about increase the up...

-1
Q: Using data which contains ' and ", storing it in WordPress database & displaying it back in a meta box

user2992596I have some custom meta boxes on WordPress, storing some information such as page titles and descriptions, but I am having a bit of a problem which I can't wrap my head around. The meta input boxes need to be able to accept " and ' (Speech marks and apostrophes), and WordPress is storing the dat...

0
Q: Getting variables after Randomly selecting two rows in PHP

Muhammad UmarI am using following code $con=mysql_connect('localhost','admin',"password"); $db=mysql_select_db('DbName',$con); $query="SELECT COUNT(shuffel.clientid) as total_users FROM shuffel"; $result=mysql_query($query); $total=mysql_fetch_array($result); $total =$total['total_users'];...

0
Q: Need to get all records from DB where ID is not known

user1476992in my project, the user can enter categories into a budget. So the user enters an annual amount in a form field. They can then select "monthly" or "annual" from a dropdown menu, and also select which month they want the annual category to start on. So if they select annual and June, then recor...

0
Q: View details data from grid in new html page [OpenJS]

user3070210I am using the OpenJS grid perfectly! I have a grid with students. I can click on the student row and get the studendID. And I can open the StudentID.php without problem, $Students.on("rowClick", function (event, $row, rowData) { var SN = rowData.StudentID; var url = "Stu...

0
Q: Is there a need for die; after print json_encode() when responding to api calls?

omar-aliI'm creating various 'my version' of web services. Basically, it's a yii controller with lots of actions.. each action is as follow public function actionNameOfWebService() { if(isset($_POST)) { // do some processing, when I have a result... I do .. print CJSON::encode('result...

0
Q: how to rewrite wp-admin url to some other folder using htaccess?

sunI tried to rewrite a simple RewriteRule but i guess it doesn't turn up good. I created a htaccess file in wordpress wp-admin folder and i tried to rename the wp-admin directory name in my localhost.Here is the code i tried RewriteEngine On # Turn on the rewriting engine RewriteRule ^wp-admin$...

0
Q: prev() is not working it seems

404 Not Foundi have my code like this in one file... $d = new db(); class db { function fetchform() { global $wpdb; $content=''; $result = $wpdb->get_results("select * from kp_contact_form",ARRAY_A); $path =plugins_url().'/kp_contactus/ajax.php'; $content.='<form action="'.$path.'...

0
Q: Paginate query result with ajax and php

Johny totaI have a fully working pagination with get method. I get the results from my query and the page is changed when the variable pagination changes on URL. I recently changed the site to ajax and now i can't get the clicked page value from URL i have a form with some inputs that i use to generate t...

0
Q: PDO_OCI prepare/execute

CrazySabbathI'm trying to figure out why my pdo_oci execute/prepare statements aren't working. It might be something trivial that I'm missing or oci drivers them selves or I don't even know anymore ... Short description: there's one query, array of parameters to be inserted. try{ $conn = new PDO($dsn,$...

0
Q: Mysql select older rows than x days, group by and order by and limit

user2301881I made a really uggly sql table long time ago. But now I need to use the data from it. The table looks like this: id => 1 video_id => gds1513sfsd51 user_ip => 244.154.16.. datum => 2011-01-11 10:10:10 referer => http://something.com user_id => 1 I whould like to get those rows are older than 30...

0
Q: Embed a Youtube video in my PHP Website using Proxy

user3070174I am new to Stackoverflow and apologize if I made any mistake in my wording or break any rule of Stackoverflow. I am using following code to embed a youtube video in my php website, but Youtube is banned in Pakistan and cannot show the video on my website. Is there a way to show this video "filt...

0
Q: Highchart not displaying cakephp

ChandreshI'm working on one of the cakephp website, Where i'm using HighchartPHP libraries. But high-chart is not displaying. This issue is only when i use dynamic data from database, but if i use static array to pass then it will working fine with same code. Below are array which i get from dynamic code...

0
Q: Uncaught ReferenceError: FB is not defined

user2078421I know this question is asked frequently, but I have not found the solution. I use this code: open the html tag with <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#"> in the index immediately after the opening tag I entered this <div id="fb-root"></div> <script> ...

-1
Q: MYsql and php best saving in database

Malin PedersenI have created a forum and created a "like" button, almost similar to that facebook has. when a user presses this button, give it a likes to record in the database, which will be shown Beside this "like" button. Now I have the problem of how it should determine if the user has liked the same "po...

0
Q: Syntax errors with my php code

user3040823I m struggling with a piece of code. I already know that there are errors with this code. It uses cURL. The curl process works perfectly however i have added an if statement to check a logic in order to pass certain variables to the other server. Thanks in advance.. <?php include...

0
Q: Very slow curl request to same domain

BenI am calling an API with curl to the same domain (right now its localhost) with the following code $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url ); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); curl_close($ch); It is very slow, (up to 7 seconds) unless I ad...

0
Q: Twilio - redirect to Twimlet in a PHP script

al_manchesterI have modified the Twilio call screening script so that it simultaneously tries several phones, and if someone preses a key to accept the call then it connects. If this doesn't happen, or it times out, then it is sent back to a switch statement that decides what to do. The issue I am having is...

0
Q: Building an Online Quiz

JamesI'm trying to build an online quiz for a charity. I've search SO already, but I've not found anything suitable. Ideally, I'd like a Flash quiz template (or something similar), but it seems the quiz templates that once did exist are no longer available. The quiz would be on their actual website ...

0
Q: Change the value of XML file using PHP - certain child

user3070268everybody! My problem is as follows: I am using an xml file with products info. Here it is - example.xml <?xml version="1.0" encoding="ISO-8859-1"?> <products> <item> <name>Flat Screen Television SONY KDL-4500WEED</name> <image>http://img.zap.co.il/pics/2/7/9/2/37682972c.gif

0
Q: Amazon API - finding products by filtering

user3070303How can i search products on Amazon's API using the filters they have on the website? For example, only smartphones that cost more than 100$ and 4.0 to 4.4" screen etc... Is this possible? If not with their API, then how can i do this manually ? I already tried to search the net on how this can ...

0
Q: concat and insert using php using quotes

user983983I want to add quotes to $sdatetime, so i can insert ('2013-12-1217:15:15') something like this into db. How do I go about it? form -- <input size="16" type="text" name="sday"> <input type="text" name="stime" size="16"> function --- $sdatetime=$_POST["sday"].$_POST["stime"]; $model->start_da...

0
Q: SQL Query Syntax error?

Satch3000I am trying to modify a query which results in 2 records before the modification for some reason my modification makes it not work as it return nothing. This Query works and returns 2 record: $query = mysql_query("SELECT * FROM `table1` WHERE `date` = '{$eventdate->format('Y-m-d')}' OR `date` >...

-1
Q: Call functions in php file along with the code

Muhammad UmarI have following php file when i run it xxxx/api.php nothing is shown in browser. the echo doesn't show up either. What is wrong. <?php try { echo "asdf"; $conn = GetDBConnection(); $statement = $conn->prepare...

1
Q: How to speed up template rendering in Symfony2?

cw'I have a symfony2 application that renders about 6000 database entities. I optimized the ORM (propel) queries and the database requests are now very fast. What remains is the symfony controller and the twig template rendering engine. Is there a way to speed up rendering (e.g. switching to php ...

0
Q: read old sms from smpp server using php

user3070323I have a project coming up where I need to send and receive messages through a specific mobile operator, which only provides an SMPP interface. The whole project will be a hosted website. I have already read quite a lot, but I do not yet quite understand what is actually needed from my side to us...

0
Q: PHP fputcsv() to create a CSV to import into outlook contacts

flynnI'm fetching values from a database and inserting them info a csv file to be downloaded and imported into outlook. I'm using this code // output headers so that the file is downloaded rather than displayed $today = date("m.d.y"); header('Content-Type: text/csv;'); header('Content-Disposition: a...

0
Q: Uploading single photo to 7 pages always fails 2 specific pages. OAuthException [code] => 2"

user3056517Uploading Photo to two of the pages I manage fails with "unexpected error has occurred. Please retry your request later. OAuthException [code] => 2" I am using a batch request to upload. I am a manager of all 7 pages. Debugging the Access Token gives me: Issued 1385854349 (on Saturday) Expires...

0
Q: Fill an polygon with dynamic text and dynamic size

user3070296I have no glue, wether there is almost an solution for my problem nor if it is at all possible to do solve this. What I want to do: I have a picture of polygones. It's a abstract drawing of a persons. Something like that: http://image.pixelio.de/000/362/837//player/1--362837-Familie-pixelio.jpg ...

0
Q: how to install zend guard loader on mac(os x 10.9 with php 5.3)!

user3070324i download zendguardloader 5.5 on zend.com, and get this error: /usr/lib/php/extensions/ZendGuardLoader.so: mach-o, but wrong architecture then...i... lipo -info /usr/lib/php/extensions/ZendGuardLoader.so it seems can not run on x64 mac osx... if i use zendguardloader 6.0(which is for php ...

0
Q: Inserting data using arrays within a loop of unspecified number of input fields

JummahGURUHere is the code that displays the table in a form where you are to insert manually only the last field. After filling you should go ahead and save the form into the database, but since there are no specific number of input fields (as they will vary), I need to use an array to capture all the d...

0
Q: Symfony2: pthreads produces blank page

LordSkI'm trying to use the extension php_pthreads with Symfony2. I set up a simple controller: <?php namespace Test\TestBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; class SimpleThread extends \Thread { public function run() { sleep(100); } } class ...

0
Q: Codeigniter, controller doesn't run when payson send

user256631I got a controller which will update a database if a customer has paid or not! I am using Payson to do this. and payson will send back post data to site (controller) where it will say if the payment worked or not. and if it worked it would update the database. THE PROBLEM: I have set payson to s...

-2
Q: Database structure for MySQL login

SJ PollockI am wanting some advice for setting up my database for a project that allows users to generate color palettes using Flickr's API based on a hex code inputted into the search bar. Basically, the system will allow for a user to input a color into the search bar, this will then look to flickr to ...

0
Q: Using PHP cURL to get Behance API feed stopped working

Andrew Welchup until today the below code was working fine, however, now it has stopped working. Yet if I put the URL in it returns a feed. Any idea what is going on here? I tried to debug Curl with error handling. <?php if (!isset($_GET['page'])) { $page = '&page=1'; } else { $page = '&...

0
Q: How to pass the result of a form to another website with cURL?

user3056723I am a student who is new to the web developing world.Please bare w/ me for having some mistakes and insufficient knowledge. Currently studying about the PHP cUrl, because according to my friends and base on my research, it is the php library that would fit in my current project still not sure t...

0
Q: Parse array with a array inside to PHP

Žydrius NežydrasI have array in my JS and I have to parse it to PHP: var transfer_data = { cl_name : $("#free_1_1_title").val(), contact_name : $("#free_1_1_name").val(), contact_lastname : $("#free_1_1_lastname").val(), contact_email : $("#free_1_1_email_1").val(...

0
Q: How to run composer update via puppet?

razbakovI'm using composer to manage dependencies. And basically want I want to do is automatically run composer update in puppet config when vagrant up is running. I'm using puphpet to generate puppet files for vagrant. I added composer::exec section in this code in the default.pp file: if $php_value...

0
Q: php array serialize key value codeigniter cache

user2924581I have table name 'preferences' column(key,value) http://imageshack.com/a/img202/2909/lvaz.jpg I use cache in codeigniter look this : $pref = $this->ci->db->get('preferences')->result(); $this->ci->cache->save('preferences', $pref, 30000); save cache : a:3:{s:4:"time";i:1386246188;s:3:"ttl...

-1
Q: How to fetch content from URL and save as xml file?

user3068785I want to fetch data from url and want to save to save it as xml file.I try something like this but its not working $xml = file_get_contents('http://example.com/file.php'); file_put_contents('file.xml', $xml);

0
Q: When using PhpStorm and Symfony 2 console I get error messages

user3070359I'm having troubles with the console when using PhpStorm in combination with Symfony 2. But when I use the same command in the terminal, it works fine. Somebody knows how I should fix this problem? In PhpStorm console: ➜ /Applications/MAMP/bin/php/php5.5.3/bin/php /Users/job/PhpstormProjects...

0
Q: Attaching a Image as attachment in Outlook

HiteshI am working with a PHP web application, where I need to attach an image to outlook on z click of a button. Provided outlook is configured in the system, and is logged in. The image is coming from a canvas(using canvas.toDataURL()) which gives a base64 encoded image. Is there a way to do it usi...

0
Q: CDbConnection failed to open the DB connection: could not find driver in Yii

Cashewwhile trying to connect with mysql in yii framework it shows "CDbConnection failed to open the DB connection: could not find driver " error php code : 'db'=>array( 'class' => 'CDbConnection', 'connectionString' => 'mysql:host=localhost:3306;dbname=testdrive', 'emu...

0
Q: Arrays names PHP Concatenation

nabil l.How can I concatenate arrays names in PHP5 without repeat the name : So this what I think to do , but doesn't works : $thisProduct = $data['deliveryMethod'][1209]; $thisProductReceiver = $thisProduct['receiver']; And after I do: $lastName = $thisProductReceiver['lastName']; I got this er...

0
Q: Getting the number of rows on MySQL with SQL and PHP

SercanI have a db with some tables like this: - fruitsTable id name numberOfPeople 1 apple 3 2 orange 4 3 cherry 1 - peopleTable person fruit john apple john orange john cherry jack apple ...

0
Q: How to put a dashed line around a specific row in php and mysql

NicI just found out how to display my table from PHPmyadmin but I would like the fifth row to have a dashed outline. I know how to make a dashed border in css "border-style:dashed;". The problem is how my code is calling my data from a database and putting it in a HTML table, do I need to re-code th...

0
Q: old sms read from smpp

user3070323i am using smppclient.php for send and receiving the sms from my tcp/openssl smpp server i am read only unread(latest) sms only how can i read old sms from smpp server using php I have a project coming up where I need to send and receive messages through a specific mobile operator, which only...

0
Q: PHP Not executing .bat file in windows

user3070383I am trying to execute a batch file using PHP on Windows Server 2008. The file is called NEWDNS.bat and its mission is to write a new entry into a DNS zone file stored in c:\windows\system32\dns - the zone file is named motlocal.co.uk. Here are the contents of newdns.bat @echo off cd windows...

-1
Q: Input directly to the same page

user3070406I'm trying to make a way to input an image directly onto the same page, but I can't figure it out. The image doesn't need to be saved when navigating away from the page. I've tried <form action="#" method="post">, but I still can't figure out how to actually put it where I want it. This might be ...

-2
Q: how can I connect an php row to an image?

user2796989For a school project I`m using php for the first time, the thing I want to make is a page with images on it, and when you click on an image it opens a new page with the information from my database. do I have to make a variable in javascript and connect cite this in the php query or is it possibl...

0
Q: Magento 1.8.0 creates multiples url redirects while reindexing

Styopchikall! I've been faced the next problem: every time, when i make reindex, magento creates premanent redirect for each product and category with number at the end. F.e www.site.com/product.html -> www.site.com->product1.html. So after several reindex processes, url rewrite rules quantity grows up to...

0
Q: Run HTML through wamp without specifying url

ronI have just installed WAMP for use in a web project i'm working on (Wampserver 2.2E). Now i've added an alias to WAMP so I can work in alternative folder (i.e. c:\myapp) my question is - how can I run the project files (html/php) without having to specify to the browser 'localhost/webapp/somefil...

0
Q: HTML2PDF - fopen() failed to open stream: Permission denied in/html2pdf/_tcpdf_5.0.002/tcpdf.php on line 6168

KevOneI got a problem with the HTML2PDF library (i use PHP with Zend Framework 2). I'm on a linux ubuntu dedicated server and the destination folder for my .pdf file got chmod 777. I even tried chmod 666 ... but i still get the same error : [warn] [client ..*.*] mod_fcgid: stderr: PHP Warning: fo...

0
Q: How to access hidden field's value?

PHPLoverI'm using smarty template and my code is as follows: <div class="form-element"> <select name="subject_id" id="subject_id" onchange="get_topics_by_subject(this.value, 'get_topics_by_subject_for_filter', '#topic_id'); return false;"> <option value="">All</option> ...

0
Q: PHP MySQLI Query error inside class "mysqli_query() expects parameter 1 to be mysqli, null given"

Raviv gI tryed everything , i read other questions here in stackoverflow and i still cant fix this. I know there is plenty other questions like this and answers, but none help me! tryed over 5 hours to figure out Anyway i have the following : class RecoverPas{ private $mysqli; public function __...

0
Q: Value not showing when sub folder is coming

PrakashThis is my table tag enabled bank 1 WT 1 Credit 1 Debit 1 EMI 1 and my query is $sql = "SELECT * FROM payment WHERE enabled = '1'"; $result = mysql_query($sql); while($data = mysql_fetch_assoc($result)) { $gateway=''; if($data['tag']=='credit') $gateway='/...

0
Q: how to get and display html tags from xmlhttpresponseText

BeSomehow can i retrieve HTML TAGS from responseText xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { inserttxt(xmlhttp.responseText); } }

0
Q: Magento Admin Config settings won't save

mikeunbI have a Magento 1.8 installation which was working fine up until yesterday evening at which point changing any config settings in the admin area stopped working. E.g. If I change 'store name' to anything different and clicking save: it says "The configuration has been saved" in the green bar at...

0
Q: Symfony2 - import config.yml in services.xml

user3049779I am new in Symfony2 and I want to import my config.yml into the services.xml. config.yml: cleverreach: soap: key: myApiKey url: myWsdlUrl services.xml: <parameters> <parameter key="key">getKey</parameter> <parameter key="url">getUrl</parameter> </parameters> I dont know...

0
Q: how can i solve this curl respose error?

SarwarCSEI was using a server(http://aserver.com) where i get some data using curl. my curl configuration is $url="http://aserver.com/alic/?lc=wpvlc"; $handle = curl_init(); curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, 5 ); curl_setopt( $handle, CURLOPT_TIMEOUT, 5 ); curl_setopt( $handle, CURLOPT_URL, ...

0
Q: How to use my own password hasher

SalsaI tried to follow cake's documentation do create my own password hasher, but it seems that the authentication component is not using it. This is my code: class AppController extends Controller { public $helpers = array('Html', 'Form', 'Session'); public $components = array( 'Session', ...

0
Q: Creat valid JSON from array, from database

Jeroen de BeerI'm trying to put my data into Json format. The code seems to work fine, I get a Json format, but the data is not Json valid. This is how the json comes out: ({ "sample": [ { "0": "12", "image_id": "12", "1": "background.JPG", "path": "background.JPG", ...

0
Q: mysqli update not working

user2987790I'm trying to replace my mysql with mysqli, and i get results - that's ok but when it comes to update mysql my code fails: $sql = "UPDATE ".$dbprfx."_users SET costAlertVar = ?, WHERE connection = ?"; $eintrag = $db->prepare( $sql ); $eintrag->error(); {die('Not Working');} $eintrag->bind_para...

0
Q: Wordpress custom post types not showing in search

user3070441I'm trying to get custom post types and advanced custom fields to show in my search results. At the moment it only searches the default posts. I have created my custom post types with this plugin: Custom Post Type UI I'm using advanced custom field plugin: Advanced Custom Fields Here is my cod...

 
2:07 PM
0
Q: Drupal's 'Print Theme' Not Printing List of Links

Chris MazzochiIf you can help I'd appreciate it. I'm taking this Lynda.com tutorial called "Creating and Editing Custom Themes". I'm at the section where we're learning how to customize a page template. We were advised, in order to create a page.tpl.php file, to copy over the index.html file, and simply re...

0
Q: Nginx + PHP-FPM Using CPU and Not RAM

Devin DixonI am doing load testing on an Nginx Server and I am having an issue where my CPU hits 100% but only 50% of my ram is being utilized. The server is this: 2 vCPU 2 GB of RAM 40GB SSD Drive Rackspace High Performance Server This is my Nginx Config worker_processes 2; error_log /var/log/nginx/e...

0
Q: Review form is not being submitted

Mr_GreenIn my project, I added a new field location in "product reviews" of admin panel going through the following steps as explained in many blogs. Created a new field in database table review_detail as location. Added the following code in app/code/code/Mage/Adminhtml/Block/Review/Edit/Form.php ...

0
Q: Why does my form with empty upload form take so long ? What could be the reason?

SkeletorI have a form with a simple file upload input like: ... <div class="contenttitle radiusbottom0"> <h2 class="finfo"><span>Uploader</span></h2> </div> <p> Chose your ...

0
Q: creating dialogue boxes for editing and deleting records in Yii

user2492854In My Web app I have a CRUD table and I need to implement a dialogue ox on clicking a particular record for editing ,deleting and making other changes. I googled it but unable to find proper tutorials. Any body kindly help me how should I proceed.How should I implement it.I know its a silly ques...

0
Q: PHP/MySQL/HTML Add user Error?

Haidar Musangi have file siswa-tambah.php <?php //siswa-tambah.php //periksa apakah username = kosong dan hak akses = adm if(empty($_SESSION['username']) OR ($_SESSION['akses']<>'adm')){ //jika user belum login echo "Anda harus login untuk dapat mengakses halaman ini !\n"; echo "<a href=index...

-1
Q: SimpleSamlPHP unexpected T_FUNCTION in GenerateGroups.php

Brian F LeightyI received this error when trying to test simplesamlphp Parse error: syntax error, unexpected T_FUNCTION in /simplesamlphp/modules/core/lib/Auth/Process/GenerateGroups.php on line 139 What is causing this? I'm running PHP 5.2

-1
Q: MySQL select a pair of unique rows

user3070443I'm trying to retrieve a pair of rows from a selected category that a given user has not already seen on a given day. I have a couple of tables: one table contains the items to be selected (item_id, item_name, category and item_description) and another table that tracks which items have been sele...

0
Q: Passing Javascript ID Value to PHP for download

user3070499I am pretty new to PHP but I am learning fast.. I have been trying to use AJAX to Pass An ID to PHP. With this ID I use SQL to get the path of a file from the database than use it to download the file. However after some research this is not possible and I couldn't understand alternives... maybe ...

0
Q: Rewrite Rule replace a symbol

Antonis VergetakisI have my website mywebsite.com/this.php?That=Blah+Blah My rewrite rule is RewriteEngine on RewriteRule ^That/([A-Za-z0-9-+]+)/?$ this.php?That=$1 [NC] RewriteEngine on RewriteRule ^([A-Za-z0-9-+]+)/?$That/$1 [NC] When I type mywebsite.com/Blah+Blah it is working fine. How can I change the...

0
Q: Jquery security regarding mysql injection

Mike OltmansI know its probably unconventional but I want to know if the below code is secure or not. First piece of code is htee jquery object creation plus the call to the retrieve_data function: var dataset = [ { query_column: "articles.id,articles.category_id,articles.text,articles....

0
Q: Access bitbucket git repo via php script from browser

ritaI'm trying to set up my POST hook to automatically update the git repo on the server on each push. This works all fine and when I am user apache on the command line and execute the script, it works all fine - the permissions are set, the ssh keys work and it runs the pull. But when I try and run...

1
Q: Need a PHP proxy script with database

Sameed Alam Qureshii have a ip database get from max mind. our site gives a affiliate on images views for different location with different rates. Now i have a problem some one run proxy bot on site like these use a USA proxy but our system detect ip range of USA and pay it. i want proxy and vpn detect ip script on...

-1
Q: PHP Parse HTML Table

Xorgi want to put the substitution plan of my school (html table) into an output for an android app. An example (contents of the page which contains it) (i replaced all Private data with * * * *): Pastebin So here is the layout: <tr> <td class="vpTextZentriert">5.2</td>---> Class <td clas...

0
Q: wordpress mutli array from custom posts

Matthew O'DonnellSo I been trying to get a multidimensional-array to check multiple custom post types via taxonomy to then display a list of relevant titles. <?php $genres_terms = get_the_terms($gametitleID->ID, 'gaming_genres');?> <?php $rating_terms = get_the_terms($gametitleID->ID, 'game_ratings');?> <?php $s...

2
Q: SQL Generated select menu, updating textbox based on related value

Mathew MacLeanSome Background information: I have a table with two fields, TECHNAME and TECHCOLOR What I am trying to do is: Have a SQL generated Drop down menu based on TECHNAME (DONE) Have TECHCOLOR update in text box when TECHNAME is selected (ISSUE IS HERE) What is wrong Currently, the textbox is...

0
Q: PHP accessing web service protected by PKI/SSL

eluish192I need to use PHP to access data from a RESTful web service that requires certificate-based client authentication (PKI) over SSL/HTTPS. What is the recommended way of doing this? I need use webservices to EJBCA from PHP.

-2
Q: Printing / Echoing To Console from PHP Script

Dropped.on.CapricaI'm debugging a PHP script that runs a couple SQL queries and emails a set of users. I'm sure this is a very basic thing, but every time I try to echo, print, or print_r it doesn't appear while running the script. So say I have this in the script: print("This should print"); echo "on the comma...

0
Q: mySQL 2 update query in sequence, the second is not waiting the end of the first one

marcoi'm using MySQL 5.5.34 (InnoDB) and the workbench. i'm running the below queries: UPDATE Product SET PRD_CostoEuro = ROUND(PRD_CostoEuro * 1, 5), PRD_UpdateDate = sysdate() WHERE PRD_FlagPC = 1; UPDATE Product SET PRD_SpeseEuro = ROUND(PRD_CostoEuro * 0.20000, 5), PRD_UpdateDate = sysdate() ...

0
Q: php instagram api to post photo by computer

user2995370hi can any let me know how to post photo to instagram by php api using computer i am using this code to comment. <?php foreach( $comments as $comment ): ?> <p><strong><a href="?example=user.php&user=<?php echo $comment->getUser() ?>"><?php echo $comment->getUser() ?></a>: </strong><?php echo \In...

-2
Q: How to group only certain results in php, MySQL

Mihajlo LjubenovićI have a query that is showing results of posts on my website. I have an integer column with "0" as default value. What I want is to group all results where this value is not equal to "0". Results with default value shouldn't be grouped. Is this possible and if is, how can I do that. Thanks!

0
Q: Proper way to require file that requires db connection

blong824I don't use php very often and was wondering if someone could answer this question for me. I have a folder structure like so: -pages/rightCol.php -pages/privacyPolicy.php index.php In my index file I have a connection to the database like this: ob_start(); require($_SERVER['DOCUMENT_ROOT'] ....

0
Q: PDO error sql state 42000

Ing. Michal HudakI have query function in model: public function query($qry, $params = array()) { try { $pdo = $this->prepare($qry); $pdo->execute($params); return $pdo->fetchAll(PDO::FETCH_OBJ); } catch (PDOException $e) { return '<div cla...

0
Q: extract images from PDF with PHP

RichardThe thing is that the client wants to upload a pdf with images as a way of batch processing multiple images at once. I already looked around and out of the box PHP can't read PDF's. What are my alternatives? I already know the host has not installed imageMagick or any pdf library and the exec ...

0
Q: readdir() and opendir() working locally but not working on live server

vishalI was getting below error so changed opendir(http://test.myserv.com/Optfolder/upload/upload) [function.opendir]: failed to open dir: not implemented so changed to file_get_contents($dir) but then in next i got this error readdir(): supplied argument is not a valid Directory resource ...

0
Q: HTML/PHP How to collect and echo form data that doesn’t go to server?

user3070663I am trying to write a basic online recipe schema code generator that takes a recipe via user input, wraps the HTML schema code around it and outputs the code that can then be pasted into a Wordpress post. As an example, a user would use a form like this: Recipe Name: Hot Chocolate Author: Jane...

0
Q: Paypal is not working on a mobile browser

user3070654I am using Paypal in my site. it is working fine on system(desktop) browsers and I have received all the callback variables posted correctly. but when completing the Paypal transaction using a mobile browser e.g. iPhone, iPad, android it will return nothing. Please help me to seek it out. Thanks...

0
Q: Warning on loading XML data

Alok JainI am using following code to get current time (hours) in Los Angeles $response_xml_data = file_get_contents('http://www.earthtools.org/timezone-1.1/34.05223/-118.24368'); $data = simplexml_load_string($response_xml_data); $dt = new DateTime($data->localtime); $time = $dt->format('H:i:s'); list(...

0
Q: if it is possible to use PHP and MySQL in ASP.NET project

Kamran Sadini am working on a portal that is modular, something like Dot Net Nuke, it accepts modules in any Dot Net languages (C#, VB.NET,...) now i want to know how to use Php and MySQL in this project to create modules? You know i want to have modules in other languages is it possible to use php codes in...

-3
Q: Editing PHP files for script

user3070693I got the following error on top of my newly installed ptc script: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/wwwdmtra/public_html/sitename.php on line 6 Have no idea how to fix this. Also how do I get a title on top of my website www.dmtrafwe...

0
Q: MongoDB collection sorting with respect to no of occurences of keywords in a filed

Imran NaqviNeed to sort documents in a collection with respect to number of occurrences of a search keyword in a field. There can be multiple fields but for the sake to simplicity consider only one field.

-4
Q: Warning: mysql_num_rows() expects parameter 1 to be resource

StykkerI'm new to PHP/MySQL and I know there's a few of these topics but I really can't figure out what's going on. I'm trying to connect to the database, perform a query and count the number of results. It still echos the "No match found" even when it's not supposed to. $con=mysqli_connect("127.0.0....

0
Q: Websvn showing blank screen after adding svn binary location

coding_idiotI installed SVN & configured just 2 things, after renaming distconfig.php to config.php $config->setSVNCommandPath('D:\SlikSvn\bin\'); // e.g. c:\program files\subversion\bin $config->addRepository('Assembla', 'https://subversion.assembla.com/svn/projectname', null, 'username', 'passwd'); In...

0
Q: jPlayer -- multiple instance mp3 player

SliQzI am working on a program in wich i need to use up to 4 instances of the jPlayer mp3 player. All seems to be working fine, but when i play all of them, 1 by 1 the following happens. I play the items, and when i try to play them once again, it seems to somehow not rewind all the way to the begi...

0
Q: Drupal 7 site with web services

NickFI have a Drupal 7 site. I want to create some web-services written in PHP, that uses Drupal's database. For example export/ import the users. Can I create the services under the Drupal site folder? Is there any module for that? or I just read the data from the database?

0
Q: PHP/MySQL/HTML Add Error?

Haidar Musangi have files nilai-tambah.php , nilai-edit.php 1.nilai-tambah.php <?php //nilai-tambah.php //periksa apakah username = kosong dan hak akses = adm if(empty($_SESSION['username']) OR ($_SESSION['akses']<>'adm')){ //jika user belum login echo "Anda harus login untuk dapat mengakses halaman ...

0
Q: how to parse the contents of a particular row of a html table into array

PrasI need to pass a one of these row contents of features-table to an array. But the problem is I used an iframe to display the table. How could I do it? In main.php <iframe id="ifrm" src="reserved_tables/reserved_rooms_table.php"></iframe> In reserved_rooms_table.php <?php include '../cor...

0
Q: Wrapping each child key within an UL

ChaplinI'm wanting to wrap each child array within an <ul>, but I'm not entirely sure how it may be done? function RecursiveWrite($array) { foreach ($array as $v) { echo '<li>'; echo $v['id']; if(isset($v['children'])) RecursiveWrite($v['children'...

0
Q: error invalid controller specified in zend framework after upload to another folder

metallurgicalMy problem is, when i upload my project into hosting: http://172.20.30.43/psm/CB11011/ i got this error An error occurred Page not found Exception information: Message: Invalid controller specified (psm) this is my full domain link.. http://172.20.30.43/psm/CB11011/carrental/public/user...

0
Q: Modal window on a Form

user3057374Is there a way to make a modal window popup when a input is skipped. For example if someone forgets to put in their email, my current php mail file opens a blank page thats say "please enter email", but I want a modal window (preferable with an image) thats says the same thing without leaving my ...

-1
Q: Conditional outcome

user3069332What am I doing wrong? Im trying to get a green text if conditions are met, or normal line when not. This is my code: if($result) { echo ("<br> <u><b><h2>Totaal:</h2></b></u> <br>") ; if($formatted_one <= $formatted_two || $formatted_one <= $formatted_three || $formatted_one <= $f...

0
Q: Twitter Oauth Statuses/show in codeigniter returns error

Bananam00nI am using this library for implementing twitter Oauth in my project, and codeigniter if that is relevant in this case. I am trying to get a tweet based on the tweet id, but it's returning an error: {"errors":[{"message":"Sorry, that page does not exist","code":34}]} Here is the code I am usi...

0
Q: Cakephp with PEAR on Windows Azure Website

Ronny vdbI am trying to setup an Azure Website that will host my CakePHP website. Setting up CakePHP was simple enough by choosing the CakePHP template during the creation wizard of the Website. I tried installing PEAR by following the "PEAR in hosting environments' option, by uploading the go-pear.php f...

0
Q: Connection Timed Out error - postfix

Kermit the FrogI have postfix installed on centos 5.6. When I try sending mail using the php mail() function, I get a Connection Timed Out error. What can I do to fix?

0
Q: php loop through array within array - output array value and key

odd_duckI have the following array structure in place that i have to keep as it's an existing website: $label_options = array( "label_size" => 'A4', "label_position" => 'Top', "label_qty" => 50 ); $ink_options = array( "black" => 1, "colour" => 0 ); $item = array( "item_number" =>

-2
Q: How to write a language detection algorithm?

user2957386I am wondering how I can write a language detection algorithm in PHP or Java. For example, given a text, the algorithm should be able to detect whether the text is in English, German, French or any other language. Any thought? Thanks!

0
Q: Upvote/Downvote based forums and user profiles

Nicholas laneI am in the early stages of developing a website and I became curious as to how an upvote/downvote code works, similar to that of reddit and stack over flow. What is the code usually written in? Im guessing that this is mostly done with some sort of database to record and store the votes? Is ther...

0
Q: Registration Page Error - 404 joomla 2.5

HASSAROVhere's the interesting thing - I've used this function before but for someone odd reason its stopped working and its sending me to a page that doesn't exist within my website or folder for that instance .... Example: www(website).com/index.php/component/comprofiler/?task=registers I use Joomla...

1
Q: write data to DB with PDO give strange result

phpKoderI have this code for connecting PDO: $conn = new PDO('mysql:host = localhost; dbname = DataBase', 'kkk', 'kkkkkk'); if ( $conn ) { echo 'Connect Shodee'; } } catch (PDOException $e) { $e->error(); } and this lines for INSERT the values: function InsertFileToDb($filename, $filetype, $r...

0
Q: html_entity_decode( '&#039;', ENT_COMPAT, 'UTF-8' )

thylori get different results on different servers using html_entity_decode. i have searched a lot but did not find an answer directly to what i am experiencing, so i decided to ask for some help here... html_entity_decode( '&#039;', ENT_COMPAT, 'UTF-8' ) html_entity_decode( '&#39;', ENT_COMPAT, 'UTF-...

 
3:49 PM
0
Q: Ajax concatenate select and total record query

Paolo RossiI've a php page where there is a ajax concatenate select and a div with the total number of records in the table tb1 HTML <p> <select name="model" id="model"> <?php echo $myclass->selModel(); ?> </select> </p> <br /> <p> <select name="year" id="year"> <option value="">&nbsp;</option> <

0
Q: Magento Worldpay Integration - "Error Occurred"

MikeI am experiencing the following error with a Worldpay integration in Magento: http://www.magentocommerce.com/boards/viewthread/236952/ The transaction works from Magento to Worldpay completely fine and payments go through successfully. The problem occurs after a transaction, when returning to t...

0
Q: AJAX update MYSQL database using function called from HTML generated from PHP

user3070866I have a php page generating and displaying a table. for the last row in the table i want to display an image with an 'onclick' function attached. this will send the username for the selected row to a script that will use AJAX to update a database. The table displays fine but the AJAX is not work...

0
Q: Some questions regarding how to use a shell interactively with another shell in linux

OBVthanks for reading. This post is about some automation tasks, and also to satisfy my curiosity. Is this scenario possible, can anyone offer any practical pointers? From PHP --> Run a shell shell_exec(bash script); Bash script like: Run a shell; read file for input; pass input to shell; fetch ...

0
Q: CodeIgniter: How do I correctly run two queries with each other based on the first query result?

RyanI am querying my database for results (which all display correctly) and then while running a foreach statement I am attempting to look in another table for a matching ID to gather an override price which will take the place of the 'storeprice' listed in the first result. Here is my model: publi...

0
Q: htaccess dynamic rewrite rule

Vladimir GatevI have some request parameters which I am converting to friendly URL For example http://domain.com/members/girls/sort/last_reg/nick/ted/from/18/to/28/hfrom/150/hto/190/bbody/Athletic/ The parameters are dynamic so the URL could be http://domain.com/members/girls/nick/ted/from/18/to/28/hfrom/150...

1
Q: Using file_get_contents() without specifying a $context

DOOManiacI'm writing a wrapper class, part of which passes things off to PHP's built-in file_get_contents() method. I want to utilize the 4th and 5th parameters ($offset & $maxlen), but I do not need or want to use a $context. According to the manual, I should be able to just skip $context by passing in ...

0
Q: Joomla - Updating a table field with variable from another SELECT query

quantum_leapMy site runs in Joomla 1.5.26 and I am using a SELECT query to convert a filename path to a last modified date and print the contents n the page: $db =& JFactory::getDBO(); $query = " SELECT `filename` FROM `#__joomlatable` WHERE `filename` != ''; "; $db->setQuery($query); $options = $db->loadAs...

0
Q: Triconsole DatePicker Calendar - change displayed date programmatically from Javascript

tony gilUsing Triconsole DatePicker calendar class, BEFORE creating a calendar instance, you can easily set its default date $myCalendar->setDate(1,1,2013); but once you have written the datePicker, can you change its value programmatically from within Javascript (yes, easily) AND have the calenda...

0
Q: mysqli update with empty vars/values

user2987790I change the mysql to mysqli in my code BEFORE: mysql (worked fine) $set = "costAlertVar ='', costAlertSend = ''"; $eintrag = "UPDATE ".$dbprfx."_users SET $set WHERE connection = '$userConnection'"; $eintragen = mysqli_query($eintrag) or die("Error:".mysql_error());; NOW: mysqli (not working...

0
Q: Insert element into elements?

Me123How can I add a link to a footer with Simple HTML DOM and normal PHP? I use this to find the footer: $html = file_get_html('/index.php'); // Find footer foreach($html->find('footer') as $f){ //the normal php code here } Now how can I use PHP to add the link into the footer?

0
Q: Syntax error that only happens at the clients end

einarI'm having some difficulty finding what I'm doing wrong. I was writing a Wordpress theme for a client that works fine on my end, but when the client tries it out they get an parsing error that I can't seem to fix sins I'm not even sure what the issue is. My code line where the error is looks li...

0
Q: Symfony 2 : Catch every error thrown by the symfony framework

Robin HermansI'm writing a custom logger wich has to catch every error that is thrown by the symfony 2 framework. This includes stuff like: Warnings, Notices, Error and more. Currently I have my ExceptionsListener setup with the onKernelException. In this service I can catch all exceptions that are transform...

0
Q: Convert string to Base-4

user2455897I would like to convert a ASCII string to Base4 (not Base64) and then convert it back. The only way I can see how to do this is to convert the string to binary then split the bits eg: $str = 'help' Binary = 01101000011001010110110001110000 Base4 = 1220121112301300 is there a direct way of d...

0
Q: What is the Best MySQL Database Formatting Type for GPS Coordinates?

PrestoI have a script which is inserting latitude and longitude into the MySQL database. I have assigned these rows as: `gpslat` DECIMAL(11,4) NOT NULL , `gpslong` DECIMAL(11,4) NOT NULL , For some reason, when I pass the string gpslat=45.7834 and gpslong=78.7834 I am getting a rounded value in ...

-4
Q: A PHP Error was encountered

thanhkhietA PHP Error was encountered Severity: Notice Message: Undefined property: Teacher_incharge_controll::$student_model Filename: controll_teacher_incharge/teacher_incharge_controll.php Line Number: 74

1
Q: PDO... Am I doing it right?

MfaspkSo honestly, this is the first time I am working with PDO and Error Exceptions. I have gone thru manuals as well as different Q/As resolved here in past and came up with code that I am pretty satisfied with. But I really really need your opinion on this. I have built few functions that I normally...

0
Q: ftp_put uploading zero byte files

Stefan DunnI'm make a quick PHP script to run locally on our computers in the office. The idea is so we can manage a competition from our office without allowing online access. The FTP upload is so we can upload the file to our FTP account. I've got the following HTML form code: <form method="post" id="ne...

0
Q: message delivered confirmation in php

Bîlål Çhådhåri am making a php website for my semester project ...and i have a contact us page in which user send me a message and the message is stored in database . but i want that when user type the message and click the send button then after checking form validation it send the user that "your message is...

1
Q: Code igniter mysql backup fails with large databases -- any alternatives besides mysqldump?

Chris MuenchI know that mysqldump will always work, but my users are not technically inclined enough to use it. Which is why $backup =& $this->dbutil->backup(); has been so great! As the database grows it size the backup will eventually fail. PHPMYAdmin can seem to do larger databases than codeiniter's backu...

0
Q: how to echo php from html

user2706762i have a php code that that have a function that print html via echo like so: <?php function show_html($num_found) { $html=" <html> <head> </head> <body> <table width='100%' border='1'> <tr align='center'> <th colspan='2'>ERROR REPORT</th> </tr> <tr align='center'> <td>Number of error found</td>

0
Q: Replace array values with corrections?

JamesThis should be easy. I have an $array. some of the values of which are $wrong (second array) so I want to change them for their $corrections (third array) I was using this: $corrected = str_replace($wrong, $corrections, $array); But realized that it was replacing letters instead of taking ...

0
Q: database php like button

Malin PedersenI have since made an attempt to create a " Likes " button to my forum , including its " posts " . right now I have three different issues I need some help solving . Problem number 1 : after I press the button , and add a likes (see the source code I 've attached at the bottom of this post ) as r...

-1
Q: php MySQL Selecting value from table which includes values from another table

user2951102I have a two tables requirement- (r_id,r_description) - example value (1,The Robot must weigh less than 80 kg) keyword - (ke_id,ke_description) - example value (1,must) I want to select r_description which includes the words given in ke_description in the keyword table. What is the correct php ...

0
Q: CROP IMAGE IN FPDF is possible?

user3071057May i crop images in FPDF ? i have try this one Cropping images in CodeIgniter for FPDF output but does not work

0
Q: in_array is not working, it appears it should be

robz228Alright, i've tried everything. SO is my last resort!! heres my code: for($i = 0; $i < 15; $i++){ $coach = $trainergross[$i]['instr']; $tclub = $trainergross[$i]['club']; $rookcheck = "$coach $tclub"; if(in_array(trim(strtolower($rookcheck)), $rook)){ $pls = 'y no work'; ...

-5
Q: Parse error: syntax error, unexpected end of file in C:\Program Files\EasyPHP-12.1\www\Sitedeteste\upload.php on line 37

user3071019Parse error: syntax error, unexpected end of file in C:\Program Files\EasyPHP-12.1\www\Sitedeteste\upload.php on line 37 <?php //Funcao que vai abrir o arquivo php que faz conexao com o servidor require_once ("sistemadelogin.php"); $descricao = $_POST[descimagem]; $nomeFOTOG = $_FILES['fot...

0
Q: Google Maps Marker Clusterer

alliefaydenI'm using the Google Maps clusterer along with the Google Maps API on Wordpress. I'm trying to combine the two together, and get different results each time. When I define my markers, the map will show them without the marker clusterers. When I don't define my markers, the map will show the marke...

0
Q: TinyMCE or WordPress inserting WBR html element into text in WordPress

North KrimslyGreeting all, I've written a simple WordPress shortcode which wraps its $content in <code> tags. I see that sometimes the $content contains <wbr /> elements, which must be inserted either by TinyMCE or by WordPress. I'd never even heard of <wbr /> (word break opportunity) until I looked it up. ...

0
Q: How to pass the data obtained from the PHP page on the server's local page in JS?

DPD-I have an HTML 5 page that you can use offline. When this page is online you should connect to a PHP page (the 'I've already done) with a login and receive response in 1 string and 2 integers. How to pass the data obtained from the PHP page on the server's local page in JS?

0
Q: adding datetime to mysql database php

Amy Jenningshi guys just wondering how i go about adding a clock in time to mysql database from php script. Here i have php script to detect user login, and im wondering how i go about adding the datatime of when the user clicks on the clockin button and saving it to the mysql database??? include 'config.ph...

0
Q: How I can render interlaced image in kohana 3.3

user3071107I want to make the images are not loaded from the top down, and once fully gradually improving the quality of $result = Image::factory($filename) ->resize($width, $height) ->watermark($mark, 10, -10, 70) ->render($ext); $this->response->body($result); maby use ...

0
Q: Looping through a multidimensional array to output path to files in array

Rik89I have this script which will search a directory and store a file tree to an array below: $dir = ABSPATH."/uploads"; function getDirectoryTree( $outerDir , $x){ $dirs = array_diff( scandir( $outerDir ), Array( ".", ".." ) ); $dir_array = Array(); ...

0
Q: Paginate query result with PHP and AJAX

Johny totaI have a filter form in my html that send data to php via ajax to mount a query. I want to paginate the results from my query. what is the best way to do it? you can check the site here (click filter) ajax: jQuery(document).ready(function(){ jQuery('#filtros').submit(function(){ ...

0
Q: Magento issue with external mod "Integrity constraint violation: 1052 Column 'created_at' in where clause is ambiguous"

user1806445$select->joinLeft( array('order_table' => $collection->getTable('sales/order')), 'order_table.entity_id=main_table.entity_id', array('admin_user_id' => 'admin_user_id') ); in a custom magento module that is causing the error Integrity constraint violation: 1052 Column 'cr...

0
Q: Conflict while using two traits using the same trait although the methods are aliased

olvlvlI wanted to create traits for properties such as created_at and updated_at for my ActiveRecord implementation, but it looks like even if the methods are aliased, PHP consider that there is a clash and throw a fatal error. That makes me sad. Is there a solution to that? I created a girst there: h...

0
Q: Symfony2 Doctrine MongoDB & "private" fields

cept0I'm looking for a function, to remove fields from a Document in doctrineauto-magically. Let's say, I have a User Document that can be queried anonymously with a RESTful api. Of course, I want to remove dangerous fields, such as password or secret etc. Document: // src/Acme/StoreBundle/Documen...

0
Q: PHP Jquery-like nesting readability

KeiI'm building a new framework and beneath all the work I'm suffering a strange question aroused my mind. Is it worth creating a jquery-like nesting syntax like this ? core->component->...->method() Assuming all "components" expand an abstract class and the core is like class core { public ...

0
Q: PHP doesn't compile when there is a space before array creation

MalharhakSo I just spent 30 minutes trying to debug my code, when I finally understood that: $words = array("word", "word", "word"); // doesn't compile $words =array("word", "word", "word"); // Does compile I just tried deleting the space between "=" and "array" as a sort of desperate random try and it...

0
Q: Yii2 thirt-party PHP class

KevinI want to install a thirt-party PHP class for my application. How should I do that in Yii2? I could not find anything in the documentation.

0
Q: preg_replace find and replace with appended value

Brad$string = 'img-file_name.jpg'; $pattern = '\.\w+'; $replacement = '_small$1'; echo preg_replace($pattern, $replacement, $string); I want to append _small to the end of the file, just before the . extension I want the final result to be: img-file_name_small.jpg Receiving error: preg_replace...

0
Q: getting null when decoding what it seems to be a json object

maxin the firebug when a ajax call is send i see the response as json i'm trying to decode this json response with php $data = '[[10592,[[2778318,"Damash Gilan FC","Malavan",10592,"2013-12-06T11:30:00.0000000",[[5950609,0,,,,1]],[],,,,,5732,5717,-1,-1,0,0,0,0,"Soccer","Iran - Pro League",1],[...

0
Q: php - preg_replace a character not followed by a specific character

hobaileyI have a string: this &foo and&foo but not &#bar haius&#bar All "&foo" should be replaced by "&amp;foo" and "&#bar" should be left untouched. I.e. any & not followed by a # should be replaced. Any ideas? I've tried the following but it's not going very well... preg_replace('/&*$[#]*$/', '&am...

0
Q: Merge Multidimensional Arrays

BenI have a somewhat complicated function that builds an array structure dynamically to insert fields into MongoDB. We store the structure in MySQL. The function outputs the following array structure: Array ( [address] => Array ( [street] => 10 Stack St ) ) Array ...

0
Q: .htaccess: should I use general rule or a few specific rules?

jave.webI am creating a webapp which consists of a very few main scripts. And I wonder - is better AND faster to use some specific rules (from about 10 to 20) Or is it better to use some general rule e.g. http://example.com/go/my/boy would come to go.php?my=boy ? This question is about PERFORMANCE :)

0
Q: Is there a simple way of changing magentos tax to only round down to the nearest penny?

user3021997Hi I am just wondering is there an easy way to get the tax in magento to only round down no matter what the last number is. for example: 12.56 will stay 12.56 12.563 will round down to 12.56 12.569 will round down to 12.56 no matter what the ending is i want it to round down i am only using...

0
Q: PHP returns NULL from database as empty string "". Why?

Alan KisThis could be connected to my previous question, and maybe a duplicate to this. Well, why value declared as NULL in MySQL database is returned as "" (empty string), in this case all my functions which returns some value dependently on result of evaluation, dont' work. $var = NULL; // false $var...

-1
Q: New site using Joomla backend

user3071190I would like to ask if it's possible to use Joomla backend for my site. The site is ready(in php) and I want only to use some joomla backend applications. Thank you, Angelos

0
Q: Long IF Statement.. Getting mixed up between OR and AND

PeanutI'm getting so confused on why this isn't working: if( ( ! $listing_info && $listing_info['status'] !== $this->get_approved()) || $listing_info['user_id'] !== $this->auth->get_user_id() || $listing_info['user_group'] !== $this->get_admin()) { return false; } Ok so my dilemna is these requi...

0
Q: Cannot modify header information - headers already sent by (i am using cookie in my set i want to reset the cookie)

user3060459//Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/students/public_html/beta/inner/logout.php:1) in /home/students/public_html/beta/inner/logout.php on line 4 //Array ( [cookie_name] => gausulpersonalive@gmail.co...

0
Q: PHP Select Form Not Populating: Undefined Index

visualbasicNoob9000I am attempting to load some values from my SQL database based on my selected option value. However I am getting the following error. Here is my code: <p> <select id = "selectedValueG" name="selectedValueG"> <option value="Amphibians">Amphibians</option> <option value="Birds">Birds</option> <o...

0
Q: having trouble with php glob() pattern

Genius in troubleHi I have this requirement where files names are named as 365974556_5123_200x200.jpg 365974556_5123_500x500.jpg where 365974556_5123 will be same (its a variable). Now i need to match the pattern to delete these files. I tried: array_map('unlink', glob(MEDIA_FILES_PATH . "contents/" . $im...

0
Q: New to multi-platform development. Need to trigger a java based client to make an API call to a PHP web application server.

BigAlNew to multi-platform development. I need to trigger a Java based client to make an API call to a PHP web application server. Any help or pseudo code would be very helpful.

0
Q: Getting XMP and EXIF from JPG with PHP

user3071204I'm trying to just read the exif and xmp of a jpg with PHP. I've tried several options, including the Metadata toolkit from ozhiker, which will never load (It just says that there's no specified file, which there was), and also trying to just load the xmp, which doesn't return anything. $content...

0
Q: Delete data from tables php mysql

user3063908I have 2 tables which i was to update at the same time via 1 query if possible. I have a customer table with a primary key of cusomerid which is set to auto increment and a complaints table where customerid is set to a foreign key.I want to delete from the customer table and put simply when i del...

0
Q: PHP Script to create Multiple Word Documents and allow download

MichaelIn our office we have forms that we create for work that we do and the idea is to simplify and speed up the process of creating these forms. I have up to 4 different Word documents to create (.docx format) and a form to create them based on the input of the user (checkbox fields). Based of the us...

0
Q: Angularjs+nodejs+mongodb or angularjs+web service REST (php)+mysql

user1260928I m looking for the best architecture for my webapp. This app will mainly manage lists of elements(CRUD). I m wondering what would be the best architecture between the two I ve mentionned. Could anyone give me a hint? Thanks in advance!

0
Q: PHP Function not returning replaced string when using variable

user3071239I am having trouble using a function for replacing text in my string, here is the function: function decodeString($string){ $foo = "foo1"; $string = str_replace("foo",$foo,$string); return $string; } I am accessing it from another page and the PHP file the function is in, is included before I ...

0
Q: Server down after PDO connection

mandzaI don't know is this off-topic for this site but i have site that run on php and mysql. And i want to change my mysql connection to PDO. This is my connection file that i include in every file at the begining: session_start(); $connection = @mysql_connect("localhost", "user", "password"); $data...

0
Q: SQL - select distinct only on one column

Jason LipoI have searched far and wide for an answer to this problem. I'm using a Microsoft SQL Server, suppose I have a table that looks like this: +--------+---------+-------------+-------------+ | ID | NUMBER | COUNTRY | LANG | +--------+---------+-------------+-------------+ | 1 |...

0
Q: Parsing Text, Assigning Variable, Updating Variable

markmillyI am looking to take a number of text files, parse them, find the largest number after a certain regular expression and put that into a variable. Here is what I have thus far: $txt_file = file_get_contents('files/11042013_300_active_users.log'); $rows = explode("\n", $txt_file); $array_size = ...

0
Q: can't use JOIN with related entities in doctrine2

meteorI was guided by this http://docs.doctrine-project.org/en/latest/reference/dql-doctrine-query-language.html#joins and i can't understand what's wrong. My entities: /** * @ORM\Entity * @ORM\Table(name="term") */ class Term { /** * @ORM\Column(type="integer") * @ORM\Id * @ORM...

1
Q: Use Laravel 4 Encrypter within a namespace

Hilmi Erdem KERENI am trying to use Illuminate\Encryption\Encrypter; within a namespace which I created. The code really exists in my file. Problem: I want laravel to use the key set under 'app/config/app.php' automaticly. However the constructer wants me to set it properly with my hands. To see how this task i...

-2
Q: If else statement for login and logout

Hubbak Khani am using a script at front end, if a user logs in, it should render username in place of login button else it should remain the same. but my script is not not working.... <?php if(!isset($_SESSION['txt_username']) || !isset($_SESSION['txt_pwd'])){ echo "<a href='login.php'>Log in</a>"...

0
Q: mysqld crashing, php processes remain in memory

ironywritI had a database configured for collation utf8_unicode_ci but after a mysql database upgrade (the server was running an out-of-support version) the stored procedures that I use to interface with a desktop app would not run... kept saying that there was a collation conflict between implicit utf8_u...

0
Q: Is there something other plugin for php autocomplete under sublime text 2?

Zhaonan LiI use sublime text 2 to write PHP. I need php autocomplete. But I found that the AutoComplete under sublime text 2 always provided none-accurate information. So I shut down that feature by "auto_complete_selector": "comment", in user setting. And I install "SublimeCodeIntel". But I found that th...

0
Q: Is it adviced to develop an ecommerce website with PHP and MySQL?

Cro ResistorI can understand this question may be weird. But I am thinking about the possibility and analyzing here. I need to develop an e-commerce website as soon as possible. And in the reviews and rating I understand Magento is very good for e-commerce, but the review said it takes much time to configure...

-1
Q: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found

JimmyI tried to run the following code but it returned this erros: Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column ''1'' in 'field list'' in /home/cardg/cards/jogar.php:59 Stack trace: #0 /home/cardg/cards/jogar.php(59): PDOStatement-...

0
Q: Wordpress - issue with the lightbox plugin inside a loop

Francesco Lupo Renzii'm having problems with the Lightbox Plus plugin. I need to create a bunch of elements in my homepage, and Lightboxes linked to them to show more content. Now, I managed to create all the elements needed, but the Lightboxes generated are all the same, all with contents related to the first of th...

1
Q: undefined variable in php

user3071283Hi i'm new to php and I keep getting an error in my guestbook saying ( ! ) Notice: Undefined variable: errors Call Stack # Time Memory Function Location 1 0.0156 154584 {main}( ) ..\guestbook.php:0 ( ! ) Warning: Invalid argument supplied for foreach() on line 61 Call Stack...

0
Q: Realtime image from rrd file in php

szpalI would like to generate a "realtime" image from a rrd file in php script, but no success. This is the php script (/var/www/rrd_image.php), which should generate the picture: <?php header("Content-type: image/png"); $options = array( "--start", "-1d", "--title=xxx", "--lower-lim...

0
Q: Paypal not posting data on Return url on mobile browsers

user3070654I am using html form to integrate Paypal and my form is as When I am testing this Website code on desktop browsers this is posting paypal data back on return url perfectly. But when I am testing same website code o...

0
Q: Prestashop Search Function

Conner BurnettWe have Prestashop 1.5 and have ran into a problem. We have searched around and can't seem to find an answer, so I thought I may see if anyone on here may know. We are trying to modify Prestashop's search function so that it will also search the reference numbers of the Combination products. Exa...

-1
Q: deletion from mysql through php

NerdsRaisedHandI am trying to delete a product listing from my shirt_types table (which is tee-shirt products). I have an administrator page that list all the items in the table along with there information. I have added a delete link at the end of the columns for each item. When I click the delete button it ...

0
Q: Copy external image to server with PHP

user3071325I want to copy an external image to my local server. I know how to do it when the url looks like this: www.external.com/image.jpg But how does it work when the image is like this: www.external.com/image.php?image=flower ? The code I have is this: $headers = get_headers($url, 1); $type = $heade...

0
Q: Redirect from https to http

user3071333My website's page www.itcontractorsuk.com/contractor_mortgages.php has been indexed in https version in Google index, i.e. https://www.itcontractorsuk.com/contractor_mortgages.php However, I have uninstalled SSL from my website, but Google has still kept the https version of the page in its inde...

0
Q: How to encode for "Entity 'igrave' not defined" error in XML feed?

TomI'm building a feed from an url, so I take all the html content (with "file_get_contents" php function). Then I do some cuts to the content and take out what I need. It seems I've a problem with the accented vocals. In fact XML page return me this error: "Entity 'igrave' not defined", where the ...

0
Q: Loading a wp_editor () via ajax doesn't work correctly

user1920428I have a problem with loading a wp_editor via ajax jQuery into post_type page. I have removed the classic wp_editor and i want add my wp_edtior via ajax. Here is my code: // MY PHP CODE add_action('init', function(){ new Page_Editor(); }); class Page_Editor{ function __construct()...

-3
Q: jQuery mouseenter mouseleave show/hide div

FoxWizzy$z = 1; <td id=imgs align=center valign=middle><a href=\"" . $dir . $entry . "\"><div id=img$z style=display:none;position:absolute>test</div><img src=\"" . $dir . $entry . "\" name=\"" . $entry . "\" width=150 height=120 /></a></td>;$z++; <script> $(document).ready(function(e) { $('#imgs').mous...

0
Q: Getting PHP templates for download

user3045125i have been looking for website templates to download so far i got only one bootstrap template. I can't seem to find much with source code attached with them for download. which site do you recommend. please

-1
Q: How to avoid SQL injections with prepared statements

LithilionWhen I use prepared statements do I have to use functions like mysqli_real_escape_string or are the executed automatically? For example should I just use this $stmt = $mysqli->prepare("INSERT INTO REGISTRY (name, value) VALUES (:name, :value)"); $stmt->bindParam(':name', $name); $stmt->bindPara...

0
Q: Web based Departmental Report Submission/Management with Tracking and Deadline

user1990795Basic Background We run a company with several small regional departments. Monthly Sales and Departmental reports (basically a fixed format form to be filled with the Monthly Numbers/details) have to be submitted to us in the HO. Currently it is done manually via email. Requirement We were loo...

0
Q: Server-side Single sign-on with Live Connect API

user3019997Assuming I get user's email and password in a variable, how do I authenticate on Live Connect on behalf of this user who consent to grant me with permissions to access his information ? Is it possible to perform this by only using REST implementation ? Using PHP.

0
Q: Requiring a Password / Passphrase to view contents of category with Wordpress

ignu5_I'm trying to set something up where when a user clicks on a category link within the navbar, it asks them for a password / passphrase to view that categories posts. I've done a lot of digging, and I can't seem to find a solution. Can anyone point me in the right direction? I figured I would be a...

0
Q: Limit time user is allowed on website before forcing a login

user1387976I'm not sure what language to use (php, Java or other) but I'll need to limit the amount of time a user is allowed to browse our website before forcing a login popup appears. Example: Unregistered user browsing our website, after 1mins of browsing we show a popup saying they need to log on to c...

0
Q: Magento : Fatal error: Call to undefined method Zend_Db_Statement_Exception

tintinbossTo put it shortly, I'm looking for a lifesaver... I'm in serious trouble with this I had a working Magento 1.7 installation, there was some problem with a plugin named worldpay, so I checked for various upgrades via magento connect and was upgrading. While trying to upgrade Mage core or somethin...

-1
Q: input field error with php echo statement

DanishcjI get this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''05/12/13)' at line 2 Because of this code: <input type="text" name="submitdate" value="<?php echo date('d/m/y'); ?>" readonly> Any help i...

0
Q: Queuing up videos for live stream

Abdul Aliwould first like to tell that am new to streaming and ffmpeg. would try to explain scenario as much as possible. A web service is intended to receive chunks of video from a user. those chunks need to be simultaneously sent to the web for live streaming for a seamless viewing. so the videos ne...

0
Q: composer has ignoring installer-paths configuration

Patrick Maciel - p4devI'm try using CakePHP for the first time with composer, but I have some problems. I have this composer.json: { "name": "example.com.br", "repositories": [ { "type": "pear", "url": "http://pear.cakephp.org" } ], "config": { "vendor-dir": "Vendor/" }, "require"...

0
Q: PHP / Python / Ruby - Long running tasks with short previews

Cody SmithI have a web frontend which uses data from a task that must be run frequently in bulk (which takes more time than I'd like to use PHP for). The data can be stored in a database so I was planning on writing a Java application to run the task and use the database as a middleman to get the results o...

0
Q: Child class to access child class

JarrodI have a single class that calls aload of other classes; require_once('class.database.php'); require_once('class.users.php'); Class Bootstrap { public $db; public $users; public function __construct() { $this->db = new Database(); $this->users = new Users(); } } $est = new Boo...

0
Q: ios comparing memcache and core data

user2093708Currently in order to limit the number of mysql requests, each user has a folder with multiple empty files corresponding to updates made in the database. The last accessed date of a file is compared to a date stored in core data. Only if the last accessed date is after the date in core data doe...

0
Q: PHPform not updating SQL Row

Maggie AckermannI am trying to update sql ROW only using member_id this is my current code. if ($con = mysql_connect($host, $username, $password)) { if (mysql_select_db($db_name)) { $sql = "UPDATE members set ussd_office = '".$ussd_office."', ussd_email = '".$ussd_email."', ...

0
Q: Validating that all checkboxes are checked in form / Wordpress

steboI have the following that works great in jsfiddle: http://jsfiddle.net/cRKPt/ but when implemented here: http://tinyurl.com/kyttpue (within a wordpress page [view source to see coding/js]), it's not working..any ideas? HTML-- <form action="" id="myForm" method="post"> <input type="checkbox" id...

-1
Q: In preg_split, what do the different delimiter notation mean?

user3032931I want to know the meaning of the different notations used in preg_split?

-1
Q: undefined variable, and parameters null

user3071283My guestbook is telling me that some parameters are null instead of 1, and some variables are still undefined. ( ! ) Notice: Undefined variable: result in C:\wamp\www\unit08\unit08\includes\login_functions.php on line 27 Call Stack # Time Memory Function Location 1 0.0000 144576 {m...

0
Q: Wordpress wp_is_mobile() function not working

Attis BarrosI have a plugin on my Wordpress that I want to block when a user is on mobile. In my functions.php I added the line: if (wp_is_mobile()) { wp_dequeue_script('flare'); wp_deregister_script('flare'); } Unfortunately, this made the script not load for both mobile and desktop users. So I n...

0
Q: PHP update page when user submits by postback form

user3025099So I have a page with a postback form where users can delete records (which appear as checkboxes) from a database. When you click 'Submit', on the same page a confirmation message is displayed "Successfully deleted the record". The problem is that the checkbox remains there. Only after you refre...

0
Q: Creating dynamic header links in PHP

user3063919In my code i have an if statement, which is return is true, it would header the user to a specific page. But i want to send some data to the next page. So i tried using dynamic links. but it doesn't seem to work. Here's my code; <?php $row = mysqli_fetch_object($query); if($row->Usertype = "Gen...

0
Q: PHP JSON functions not available while being called as CLI script?

ehimeJust noticed something, but I'm not sure why this is true, or why it is different than a standard script, maybe someone can help me solve this riddle. When running a PHP script that contains a json_* function from the command line as an executable I will get a Fatal error: Call to undefined funct...

 
00:00 - 18:0018:00 - 00:00

« first day (289 days earlier)      last day (21 days later) »