« first day (289 days earlier)      last day (21 days later) » 

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

 

« first day (289 days earlier)      last day (21 days later) »