« first day (281 days earlier)      last day (29 days later) » 

12:00 AM
0
Q: Xampplite PHPmyAdmin wont prompt to ask for username and password

user3033960I have a Xampplite on my thump drive and when i type localhost:8080/phpmyadmin it goes straight to gui that i can build tables and not prompting me for any username and password. The question how may i go about solving this? I tried to change the password to what would the same thing happen. 2n...

0
Q: CakePHP encoding query string on redirect

CameronI have the following code in my AppController: if ( isset($_GET['q']) ) { $this->redirect(array('controller'=>'notes','action'=>'search', urlencode( $_GET['q'] ) ) ); } Which converts query strings to a parameter on the search method. For example /notes/search?q=Hello+world to /notes/sear...

0
Q: htaccess RewriteCond Overwrite

Varun ShethI want to redirect based on Query Params Here is my usecase if the user goes to www.abc.com/refer/test the redirect works with the below condition and goes to https://www.abc.com/signup?referralcode=$1&utm_source=referralProgram&utm_medium=referaFriend&utm_campaign=referInvite My mod ...

0
Q: RegEx results in infinite loop/error - Requested entity too large

ElitisThe following code should check if either a # or @ symbol has been found in a string. The regex should find each and every @ or # (kind of like Twitter does)and should either place each instance it found into the messages table (if it was an @ symbol), or if it was a # symbol it should insert the...

0
Q: Is there a simple way to create an array based on a string containing URL get variables?

Nick ShearsI'm passing through a string via ajax to be used with PHP. Example home?area=Ohio&country=United%20States How can I end up with an array that looks like the following? array('area' => 'ohio', 'country' => 'United States');

0
Q: Display first ten values from an array

user3038693I'm trying to display the first 10 items from an array as list items and then write some logic that includes a button to display the rest of array items as list. Thanks in advance for the help! Here's what I have so far if (count($all_machines) > 10) { echo '<ul>'; foreach($all_ma...

1
Q: Where to find the "low memory" and "free CPU cycles" calls triggering garbage collection on unset()?

Jürgen ThelenI often find references to the following quote being used when explaining that a PHP unset() doesn't trigger "garbage collection" immediately, but only when it sees fit (emphasis mine): unset() does just what it's name says - unset a variable. It does not force immediate memory freeing. PHP...

0
Q: PHP Global Timestamp for Caching of Permissions

DonI am working on a web application inventory system which involves different levels of user permissions and micromanagement of individual permissions within these levels. So most admins have all permissions, but you could create an admin and strip them of a certain permission. Ultimately, these pe...

0
Q: phpunit failing without any error

pjeongI can't seem to figure this one out. I'm trying to get phpunit running on an ubuntu 12.04 server. It's for a codeigniter project so i'm using CIUNIT (https://bitbucket.org/kenjis/my-ciunit). I can get the example project and test working on the same box. I also have our tests setup locally and th...

0
Q: connect to ASP web service PHP client

user3038710This is an exmaple in C# How would you translate this to PHP? //Code in C#.NET public string ConsumirObtenerMarcas(string xmlIn) { string strXMLOut = ""; // Instance the proxy object and connection ACCatalogos.ACCatalogosClient proxy = new ACCatalogos.ACCatalogosClient(); // Creamos el obje...

0
Q: Drupal PDOException: SQLSTATE[42S02]

Spencer HillI'm receiving a PDO error on a customers website after transferring it to a new host, you can see the error here: http://staffingsolutions.theportlandcompany.com/ I've tried multiple hosts, and verified that the PHP PDO module is enabled and, to the best of my knowledge, configured correctly. I...

0
Q: How do I create a better quality image converting a .pdf to a .jpg with Imagick/PHP?

JasonI currently have a single page PDF (http://reljac.com/so_1/all.pdf) which is a basic scan of several paper receipts. If you look at the PDF the text is clear and legible. The original is a scan of an 8.5" x 11" sheet of paper (shouldn't matter) I've created a very simple file to convert that P...

0
Q: Laravel 4, eloquent - between statement and operators

user3038678There is a query I use to run in mysql : select * from my_table where $val between col1 and coL2; It works fine, but with laravel 4, the only way to make that query is to have something like my_model::where('col1','>=',$val)->where('col2','<=',$val) This way doesn't seem to work, because I ...

0
Q: MySQL how do I combine these tables?

Jochem KuijpersI have three tables: blog_posts int id (auto increment) varchar(255) title text content blog_tags int id (auto increment) varchar(63) name blog_posttags int id (auto increment) int post_id int tag_id How can I get (preferably with as few as possibly queries) this data like a ...

0
Q: search with pagination php mysql errors

RAN RANhere is my html <form name="search" method="GET" action="select1WSearch.php" target="iframe_a" onsubmit="changeLink('select1.php')"> Seach for: <input type="text" name="find" /> in <Select NAME="field"> <Option VALUE="no">Number</option> <Option VALUE="CPUname">CPU Name</option> </Select> <inpu...

0
Q: is there a way to choose the sorting of ksort? like ASC , DESC

Neta Metai have a use for ksort() and i need to chose sorting order(ASC/DESC). is there a way of doing it without array_multisort()

0
Q: Retrieve PHP Array with JSON and use the array in javascript to populate a playlist

user3038730I try to understand how it work. At the beginning, I was using inside my html code a php array with db and after that I was extracting my array inside my playlist. Here the example: <?php $fileinfo=array(); $count=0; //SQL Query $query = "select track, artiste, album, empl...

0
Q: PHP automation with javascript console chrome

user3029933Their is this game page (dont need email to log in) http://www.infamousgangsters.com/site.php?page=crimes Using javascript console I am trying to select all checkboxs and submit. The page is in php. I am using: var allInputs = document.getElementsByTagName("input"); for (var i =...

0
Q: How make a randome link without grab by downloaders just like IDM or ADM or others

barnamehaI need create a random download link with expire time or expire date on host and php language. i need each visitor after click on pay button can access to that download link.

0
Q: Symfony form many-to-many without collection

maxwell2022I have 2 entities, User and Account. An Account can be own by multiple users and a User can own multiple Account. So I have this entity UserHasAccount that is handling this relation, plus some few fields that have personalised values for each User - Account relation, such as position, showInMenu,...

0
Q: Can´t parse a json response from a php file in java for android

user3038729When i try to parse a json response from the php file in my domain, i get this error: Error parsing data: org.json.JSONException: Value The AsyncTask i do this is the following: protected String doInBackground(String... args) { // Building Parameters List<NameValuePair>...

0
Q: PHP Request for posting Form to Iframe

CraigSimsfirstly any help is much appreciated. In very new to php but love wordpress! I have searched the web everywhere for a simple solution to my issue but struggled to find a working answer. In short, i have a form on homepage that allows entry of arrival date, departure date and number of guests. i...

0
Q: Update persistent data in MySQL after using drag and drop

user2860784The scenario: I have a simple site with 8 square divs. In two of the divs are pictures and the other six are empty. The pictures are just a placeholder for the labeled divs in order to show who is using what physical machine. The two pictures are draggable and I have the following javascript to...

0
Q: Requests.post Python equivalent in PHP

pinkerI am trying to make a post to Fedex in order to get the track info from the site. I get the code successfully to work in Python has following: data = requests.post('https://www.fedex.com/trackingCal/track', data={ 'data': json.dumps({ 'TrackPackagesRequest': { 'appType': ...

1
Q: Error trying to protect website with a password

user2300867I'm trying to setup a directory on my website with a password and I keep getting Internal Server Error: The server encountered an internal error or misconfiguration and was unable to complete your request.... What could be the cause? I have all my files in folder named "PasswordProtected...

0
Q: datatables in pdo style - inject db connection into class causing errors

user756659I am trying to inject my database connection into this pdo style class for datatables. I am getting : Fatal error: Call to a member function prepare() on a non-object in /home/test/public_html/assets/data-tables/test-pdo.php on line 82 test-pdo.php <?php /* * Script: DataTables server-si...

0
Q: How to make "sending" word when my mail is being sent and replace it with "Mail sent" when page stop loading or mail is sent

user241621I used php mailer to sent mail i want the browser to show something like "Sending" when the mail is being sent or the browser is sending the mail and show "Message sent" when it had sent the mail .How do i achieve it? which language is use javascript or php or something else. Thankyou in advance.

0
Q: get data as an array using ajax post

John BobsI have a code that will get the data from the php file. Here it is: var init; $.ajax({ type: "POST", url: "init.php", data: { 'id': getID(), 'Name': name }, cache: false, success: function(data) { init = data; }, async:false }); ...

0
Q: Cakephp route all model to different name

HartsI'm not quite sure how to do this, I'm not familiar enough with cakephp routing. Basicly, I have model like: Contact and Project. However, after redesign and redevelop and using the same stuff but different term.. I need to change something like: myapplication.com/contacts/add --> myapplicati...

0
Q: Paypal - Zend_Http_Client_Adapter_Curl - How to turn on CURLOPT_VERBOSE

Mike PurcellI'm currently working on a thin API wrapper to ease calling code implementation in order to take advantage of Paypal's vault feature, where you can store credit card info, without having to store it locally in our system. As part of the api wrapper, I am using Zend_Http_Client_Adapter_Curl and ke...

0
Q: SMS Forwarding with Twilio

bodesamI've been trying to build an app that forwards an sms to a URL with twilio, i.e, a user sends an sms to a twilio number, the sms gets forwarded to a specified url, can't seems to find the resource on that, any experienced person in that area to give a hint, plus what is the format of the sms forw...

0
Q: Determine if site resides in a sub folder in php

Kyle AdamsI have a strange issue to solve. Lets say I have a vps, and in it i set up my site rum from example.com/site - you can clearly see that site is a sub folder and visiting it causes the url to look like http://example.com/site. Now lets say that I configure apache such that the url looks like: http...

0
Q: cant post data from android to php server

user2947300my android code is work. butwhen data is send to web server i got null data note: (my php file work fine so problem with java code ) so can you help me plz :) ' protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout...

0
Q: Get SERVER ADDRESS of other site

vhonnIs it possible for me to get the server address of other site? i'm currently working on security of my page and one of my checking is by verifying if the server address is match to the server address that i authorize.

 
1:31 AM
0
Q: datatables error with search box only using pdo format

user756659Managed to get PDO style working with DataTables and everything works fine, BUT the search box functionality. Display, paging, column sorting, etc all works, but as soon as I try to use the search box I get this error retrieved from firebug : <br /> <b>Fatal error</b>: Uncaught exception 'PDOE...

0
Q: Spaces in a text area

cl2000I have a textarea where the user can input text. If the user types and goes to a new line, and continues writing text, or starts a new paragraph, when the content of the textarea is sent by a form using $_POST, and printed again, the content has no spaces or new lines showing in it. It displays...

0
Q: How I may query many table so that to get Total SUM of year entered in search box

user3029499I have a query which Join eight (8) tables so that to get Total SUM from SUM of each single table. I establish a search box so that when user search year, example 2013 the query retrieve the Total SUM of only 2013, here it means the query suppose to look on each joined table the SUM of money pay...

0
Q: Slow PHP script which formats, sorts, and removes duplicates from list

littleKI have a PHP script that is called by a jQuery .post which will submit a list of email addresses, perform some operations on the list (remove duplicates, sort, format, etc.), and then store each into a MySQL database. The problem that I'm having is that it takes a really long time to perform thi...

0
Q: Check if a Java file compiled successfully using PHP

user1086516So I need to check out the output of a Java program I am compiling and running using PHP: $output = shell_exec('cd write && javac JavaCode.java && java JavaCode'); I don't get anything written to the $output string if the javac command fails. So how do I perform these operations and checks usi...

 
2:00 AM
0
Q: Uncaught SyntaxError: Unexpected token }, no visible error?

CoreyI am getting the error "Uncaught SyntaxError: Unexpected token }" on index.php (line: 30) when i try and run certain functions of my web app (while other functions seem to work fine). I've slightly narrowed down the problem. The error seems to occur at the "<?php" opening tag (I found this beca...

0
Q: Using a variable in another class?

user3026745I have this on my class file Client = md5(uniqid(rand(), true)); $this->Secret = md5(uniqid(rand(), true)); $this->Server = md5(uniqid(rand(), true)); if($Type == 'auto') { $hash = hash('sha512', $this->Client . $this->Secret . $this->Server); ...

 
2:14 AM
0
Q: Sort String -- PHP

gtilflmLet's say you have a string like this: 4arb How can you sort that to become: 4abr I've already looked at PHP: How to sort the characters in a string? and I know that using sort() would be an option, but I don't see how to incorporate the number part into this. Ideas?

0
Q: XSL output starts well-formatted, but then collapses into a single line

HorusKolI'm using PHP's XSLTProcessor and DOMDocument classes to transform some XML. The output from the processor starts well-formatted (newlines and indents), but suddenly it starts lumping the output on a single line. <xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

0
Q: Advice needed for Laravel 4 project structure

SimonI'm quite new to Laravel 4 (Laravel is my first PHP MVC framework) and need a little help structuring my project. 1/ I need to include the the json-rpc classes found here jsonrpcphp.org in my project and am not quite sure the best place to put these. 2/ Where is the best place to do my initial ...

-1
Q: Finding distance within recorded video

DannyBoyI'll will start off by saying I'm not a software developer, so please excuse my ignorance. I will also say that judging by what I have read on this site thus far, I'm not even close to the education level of most of you - so bare with me. This question is for research into a product I am hoping t...

0
Q: concatenate arrays with associative keys

PatrickI'll let the code speak: $params = array(); $qtyCount = count(array(1,2,3,4,5)); $qtyAr = array(6,7,8,9,10); $i = 1; while($i <= $qtyCount){ $params['quantity_'.$i] .= $qtyAr[$i]; $i++; } But when I do this, the last value is missing. BTW: the values in the qtyCount and qtyAr are bugus....

0
Q: No SQL query results when using HTML number input for user input

Brent KleinThis seems like it should be a very simple problem, but I'm stumped. I'm writing a simple web app in PHP which gets user input and returns relevant results from an SQL Server database. I'm using PDO and prepared statements. I've been able to use HTML select inputs successfully, but I'm having ...

0
Q: Undefined index: aksi in PHP

kputriHi i'm getting an error as :Undefined index: aksi my php code is: <?php include"class_koneksi.php"; $db=new database(); $db->konek(); if(isset($_GET['aksi']) && $_GET['aksi'] ==''){ $daftar=$db->tampilData(); echo"<table border=1> <tr> <td>Id</td> ...

 
2:31 AM
0
Q: Laravel 4: I have a route parameter named the same as a folder in my public folder, the route is not getting called

David GrahamIn Laravel 4, I have a route defined like this: Route::controller('abc','abc\SomeController'); And in my public folder I have this: abc packages .htaccess .project favicon.ico index.php robots.txt If I browse to the route, I get a directory view of the abc folder. If I rename the abc folde...

2
Q: MySQL: Eliminating duplicate rows without breaking a foreign key constraint

pbarneyI've got a customer database filled with normalized addresses. There are duplicates. Each user created their own record, and entered their own address. So we have a 1-to-1 relationship between the users and the addresses: CREATE TABLE `users` ( `UserID` INT UNSIGNED NOT NULL AUTO_INCREMENT, ...

0
Q: Compiled nginx doesn't work with PHP

user3037184I have a properly installed (apt-get) nginx that works perfectly with html and php but when I download the source of the same version (I don't modify it for testing purposes), I configure it with sudo ./configure --prefix=/etc/nginx --sbin-path=/usr/sbin --without-http_gzip_module then make, inst...

0
Q: how to get ID vaule of a datarow in datatable?

user3024013Actually, I have at view.php $con=mysqli_connect("localhost","root","123","Persons"); $sql="SELECT * FROM Persons"; $rs=mysqli_query($con,$sql); I tried to databinding into a table, and everything is ok. BUT when i come to think about this: Then how to get ID of datarow that u put into table...

0
Q: "errorId":"560022","message":"The X-PAYPAL-APPLICATION-ID header contains an invalid value","parameter":["X-PAYPAL-APPLICATION-ID"]

DiegoI'm not using the sandbox endpoint (I've tried that as well with the sandbox app-id, but that gives me wrong credentials error) and am trying to verify a payment. I'm using the following function in PHP: function verify_paypal($payKey) { global $payPalUser_Is, $payPalPassword, $payPalSig, $a...

0
Q: Accessing static array

user2945856How do I access values of a static array in PHP? $anyVar = self::MY_ARRAY['identifier'] throws 'unexpected [ after MY_ARRAY' at me.

0
Q: mysql_query WHERE column name = any word

JSW189I have a mysql_query that must have `WHERE columnName = '$variable1' in it. For example: $result = mysql_query("SELECT * FROM database WHERE columnName = '$variable1'"); I want the contents of $variable1 to target all combinations of text in ColumnName; sort of like a wildcard operator. I have...

0
Q: how to redirect to 404 page if page dynamic page is empty

Attis BarrosI'm having some issue figuring out how I can accomplish a 404 redirect if the does not exist from a dynamic page. I'm retrieving articles from MySQL, on the article.php I have the following to retrieve the information for the page. if(isset($_GET['article_uid'])) { $information = $ar...

0
Q: Custom google map on contact page in wordpress

BarbaraI need to put a styled map on a contact page in WP. I'd rather not use a plugin as it would be overkill, embedding on the other way won't allow me to customize layers, use placeholders, etc I coded an example map on a static html page. https://dl.dropboxusercontent.com/u/13823768/map/test.html ...

0
Q: How do I delete a MySQL record using Ajax and Jquery?

CodeManiakI'm not sure how to get the post title into the jquery .ajax call. I am able to create and display my blog posts, now I'm trying to add functionality to delete and edit. I'm starting with delete since it's obviously the easier of the two. How do I get the blog title from the post array into my fu...

0
Q: Installing OpenSIS?

user3039923Im using OpenSIS version 5.2. I am trying to install it but after step 2 it just shows a blank box, I cannot proceed to step 3. I have installed this successfully in my other computer but in this one I cannot. They have the same apache, mysql, and PHP version. What should I do? Thanks in advance.

0
Q: updating a field in mysql using php

user2981651|room type|price|avroom| |standard |50 |20 | | super |60 | 7 | |suite |80 | 4 | if reservation is made for "room type" = standard the value entered in the "no of rooms" field in the form should be subtracted from the value in the "avroom" for the "room type" on the da...

0
Q: PHP (PDT) Installs on Linux Eclipse Juno without functionality

MarkI cannot configure Eclipse to create a PHP Project. I installed Eclipse as part of my Centos 6.4 distro and found that the Install software function was broken when installing PDT. I did not remove this version of Eclipse. I downloaded a 2nd Eclipse Version: 4.2.2 Build id: M20130204-1200 as r...

0
Q: Page is going blank while creating configurable product programatically

Balramwhile using $product->getTypeInstance()->setUsedProductAttributeIds(array(151,152)); the page is going blank. The products are getting associated if i comment this line but the attributes are not getting selected if i go to manage product it is showing to select configurable attributes. can yo...

-2
Q: program nothing notice error but is program is not show

kputrii have code but my code not working well. <?php include"class_koneksi.php"; $db=new database(); $db->konek(); if(isset($_GET['aksi']) && $_GET['aksi']==''){ $daftar=$db->tampilData(); echo"<table border=1> <tr> <td>Id</td> <td>Nama</td>

0
Q: Magento -> extend Mage_Payment_Model_Method_Cc : how I return that the payment was successful or declined

EyeSalutI wrote a credit card payment module in Magento .. With debugging, all the transactions that are done works, everything works, but I still can't return to Magento if the payment was successful or declined .. i have capture and authorize, both are allowed and return "$this". At the beginning of ...

0
Q: Echo all info in db related with column?

user3025939So, I'm creating a social network, or at least attempting to, and I am currently creating the page where users can type stuff in and it will be displayed on their wall. This works fine. When the user clicks submit, the date, the user who created it, and the content will be stored into a database....

0
Q: How can I use two wildcard operators for two separate columns in mysql_query?

JSW189My mysql_query works with one wildcard operator right now: $result = mysql_query("SELECT * FROM database WHERE column1 = %"); But when I use the AND connector to add a second wildcard operator for a second column, it no longer works: $result = mysql_query("SELECT * FROM database WHERE column1...

0
Q: Making the latest news <b>old

user2579331So I came up with this, which is a news script. The files has names with [27.11.13] A breaking news! as dates, and rsort will sort them all reversed to keep the latest one up. BUT, the question is, how can i also make the last one (which is the newest) have a bold tag? (I actually want to add som...

0
Q: How to get destination url from redirection url in php

user3033330I have this url, http://pricecheckindia.com/go/store/ebay/12354?ref=mail2agn If you hit this url it will redirect you to this url, http://www.ebay.in/itm/New-Nokia-Lumia-520-Windows-8-Full-Touch-Smart-Phone-4-1GHz-CPU-5MP-HD-Cam-/151175492107?pt=IN_Mobile_Phones#ht_500wt_1156 I want to ...

0
Q: PHP: Pass a variable in URL via a clicked link

user2967081I created a function that requires one parameter to be passed into it but I need that parameter to come from another script. How do I embed the variable into a link then put that variable into the function in another script? I know I need to utilize $_GET, isset($_GET['']) and a href but I just c...

0
Q: Insert reCAPTCHA in PHP form that redirects to same page

LakeJefflerI have a PHP for that redirects to itself to validate and send me an email with the form input. I've recently begun receiving spam from my form from what I assume to be bots. I want to include a reCAPTCHA in my form so that I stop the spam. My question is, how do I insert this reCAPTCHA in a ...

0
Q: PHP if shorthand and echo in one line - possible?

WordpressorWhat's the best, preferred way of writing if shorthand one-liner such as: expression ? $foo : $bar Plot twist: I need to echo $foo or echo $bar. Any crazy tricks? :)

-1
Q: How would I save the lattitude and longitude values from the info box to a mysql database?

user2342643http://gmaps-samples.googlecode.com/svn/trunk/geocoder/singlegeocode.html Basically, I want a user to enter their address and the gps coordinates be displayed like in the above link. My question is how do I save the lattitude and longitude values to a mysql database. Thanks

 
3:32 AM
0
Q: How to stop thumbnail from blowing up into the background?

RorschachOn this theme: http://www.fabthemes.com/tiberion/, when you go to a single post, the thumbnail is blown up into the background automatically. How can I stop this from happening? I just want 1 single background for all posts and the main page. I've tried looking through the style.css for anythin...

0
Q: Using PHP server to populate data in Word Template on client computer

MichaelI'm getting a headache and at this point I need some help. Basically what I have is a server (xampp) setup on my computer at work. On this server I have a script that creates and populates a Word 2007 Template with data retrieved from a database as well as user input. This part works just fine. ...

0
Q: CakePHP Error Undefined index: action

user3038836Notice (8): Undefined index: action [APP/View/Agenda/agenda.ctp, line 3] Code Context <?php $action = $_REQUEST['action']; $viewFile = '/storage/web/public/sites/my.web.com/app/View/Agenda/agenda.ctp' $dataForView = array() include - APP/View/Agenda/agenda.ctp, line 3 View::_evaluate() - CORE/Ca...

0
Q: multipartentity post image error android

jasonI am trying to send image and string together via post php .I have added external jar httpclientandroidlib-1.1.2.jar But its crashing all the time.I have attached all the code used along with logcat error.I really appreciate any help.Thanks in Advance. Button btn=(Button)findViewById(R.id.snapsh...

0
Q: decode unknow charset text save by php

secmaskI have a some record in MySQL such as Vận hành linh hoạt trong mọi đk giao thông which in hex as 56 c3 a1 c2 ba c2 ad 6e 20 68 c3 83 c2 a0 6e 68 20 6c 69 6e 68 20 68 6f c3 a1 c2 ba c2 a1 74 20 74 72 6f 6e 67 20 6d c3 a1 c2 bb c2 8d 69 20 c3 84 e2 80 98 6b 20 67 69 61 6f 20 74...

0
Q: javascript from other website

John BobsI have a website http://arellano.pw. It is a chatbox app that I can share to other website. When I loaded my page at http://arellano.pw, with the codes: <div id=content> </div> <script type='text/javascript' src='http://arellano.pw/script/query.js'></script> <script type='text/javascript' src=...

0
Q: Initial CakePHP instalation Missing controller error

user3040015I installed CakePHP vs 2.4,but not load the css files. therefore, I configurated app/config/core.php with Configure::write('App.baseUrl', $_SERVER['SCRIPT_NAME']); But now I have this error(cake is the project's name): Missing Controller CakeController could not be found Create the class Cake...

-1
Q: Google AdWords claiming my site has “existing compromise that prevents referrer URLs from successfully visiting the site through an ad”

cmzmuffinHere's the email I just received from Google about why they won't turn on my AdWords account after my hosting provider had DNS issues which caused AdWords to believe the site was compromised by malware: The destination URL: http://www.mysite.com/page is returning a 404 error when our systems ...

0
Q: Use of undefined constant id - assumed 'id'

user3040085i have code but any error Use of undefined constant id - assumed 'id' elseif(isset($_GET['aksi']) && $_GET['aksi']=='edit'){ $id=$_GET['id']; echo"<br> <form method=POST action='?aksi=update_data'> <table> <tr><td>Id</td><td><input type=text name='id' ...

0
Q: Failed to find database?

DepenzSo it seems that when I run the file register.php (which contains some basic html forms to send to a database) it cannot find the specific database that it is looking for. All files are with in the same folder, and the spelling is correct. So I will paste the php code that is above all the html/...

0
Q: xcodebuild not work in php but works fine in command line

user1917462As the title, I want to build the app with xcodebuild. Unexpected, the code bellow is not work in php but works fine in Command Line Tools: echo '########' . exec('xcodebuild -list') . '########'; I check the permission of the files is 777, is the php not support the xcodebuild?

0
Q: How to secure the login php-mysqli?

Tamim Ad DariWhen users login in my site, I have to connect to the database and validate their login. Now according to this site login process is mysqli_connect(host,username,password,dbname); But if I use this method, any user who sees the source of my website will be able to see the database name, password...

0
Q: Mysql_fetch_array not work?

UchsunI have PHP script Like This if(isset($_POST[SET])) { $cek = $_POST[CEK]; $jumlah = count($cek); $hadiah = $_POST[HADIAH]; for($i=0; $i < $jumlah; $i++) { $sql_cek = "SELECT * FROM master_propinsi WHERE ID = '$cek[$i]'"; $hasil_cek = mysql_q...

2
Q: what is the use of where 1 in sql statement

user2981440select * from staff where 1 what is the purpose of "where 1"? why do they output as the same as select * from staff just wondering what where 1 means. Thanks

0
Q: Using PHP to recursively find xml child tags while keeping track of parents

user2526402first I'll preface that I'm just learning this all on the fly so I may not use the correct terminology. Here's an extremely simplified version of the XML I need to parse: <MyXML> <Project> <ProjectName>MyProject</ProjectName> <ProjectType>Construction</ProjectType> </Pr...

0
Q: PHP mail() Prevent messages from stacking

user2605439I'm trying to make PHP code that sends mail to a users to notify them of an occurrence, but when the users receive the notification, it's affected by their mail client's 'Conversation View' (specifically Gmail). This means the message stacks, as well as it is replaced by a button that the user ha...

0
Q: CodeIgniter Modular Extensions & the i18n library

thembanI have been using the CodeIgniter i18n library by Jérôme Jaglale (http://maestric.com/en/doc/php/codeigniter_i18n), which works great for my project. But since I need to write separate modules, I recently added CodeIgniter Modular Extensions ( https://bitbucket.org/wiredesignz/codeigniter-modul...

-2
Q: undefined id line 45 in php

user3040085Below code shows an error undefined id. elseif(isset($_GET['aksi']) && $_GET['aksi']=='tambah_data'){ $id=$_POST['id']; // line 45 $nama=$_POST['nama']; $email=$_POST['email']; $pesan=$_POST['pesan']; $db->tambahData($id,$nama,$email,$pesan); } code error in $id=$_POST['id...

0
Q: running shell_exec gives error that I don't get when typing on command line

user2512168I don't know if this is a Java problem, PHP problem, or server problem or ?: On server, I can ssh and run command java -version and outputs version okay. Run shell_exec('java -version') or exec('java -version') in PHP script and I get this error: Error occurred during initialization of VM ...

0
Q: Codeigniter: Ion Auth delete user

pixelngrainI am new to CodeIgniter and Ion Auth as well. All is well but when I am trying to delete user it doesn't delete any user by id. I have added link for delete user as below in views/auth/index.php file, which lists all users. <td><?php echo anchor("auth/edit_user/".$user->id, 'Edit') ;?> / <?php ...

-2
Q: Click to call Button in website

VishalI would like to add a click to call button in my website.My requirement is On clicking a button the users would connect to my phone number.I googled it but Not get any thing usefull. 1 method i tried is using call to phone using skype.But my client is not satisfied with that. Is it possible to im...

0
Q: How get url from database and show it in a iframe page

user3040127That's a simple script to adult content site I'd make with pieces of another codes. I am not a expertin PHP! I just can understand the basic. <html> <body> <div align="center"> <div align="center" id="box"> <div align="center" id="carrosel"> <?php $quantidade = 64; $pagina = ...

0
Q: Upload File using cURL to asp.net mvc action

dimitriI am trying to upload a file from PHP using cURL to a asp.net mvc 4 controller action. The file is successfully uploaded on disk after "move_uploaded_file" is called. Both .NET MVC and PHP sites are hosted under IIS. I get this HTTP Response: Bad Request - Invalid Content Length Has anyone achi...

0
Q: How to ocassionally shorten files?

Jim ThioThis is the code I use: if(mt_rand(0,20000)==0) { $lines = file($fileName); if (count($lines)>50000) { $lines=array_slice($lines, -50000, 50000, true); } $result=implode("\n",lines); file_put_contents($fileName, $result . "\n",FILE_APPEND); } I often got this er...

0
Q: ZfcTwig, Zend Framework 2, and includes

SaevenWhen I include a second template using: {% include 'route/here' with { 'foo' : 'bar' } %} How can I echo what's in foo from the templates served up by route/here? Have exhausted permutations, can't find anything in the docs. Thanks!

0
Q: How to add social media share buttons in galleria

AparnaI have made my gallery with galleria1.3.2, i want to add social media shrare buttons onto it. How do i do that? I tried : <script type="text/javascript"> Galleria.loadTheme('http://aino.github.com/galleria/1.3.2/themes/classic/galleria.classic.min.js'); Galleria.run('#galleria'); var pin = fu...

0
Q: MySQL: make a excerpt and copy it to another column

songdogtechI need to extract text from a MySQL column and copy that text to another column. This text will be an excerpt of the full text in the first column in that I need to trim the 15 leading characters, and then include only the next 140 +/- characters of the text and copy that text to a new column. T...

0
Q: generating a dynamic sitemap for over 50000 urls or excess of 10MB

crazy_PHP_MANI haved followed this guide to create a dynamic XML sitemap. Which includes fetching records from the database & generating a XML out of the URL in the database. But I need to expand this & create a sitemap index whenever the XML gets larger than 10MB or excess of 50,000 URLs. Below is the code t...

0
Q: Query was empty error in php

user3040209I keep on getting this error with this code: $connect01 = mysql_connect($host01, $user01, $pass01); mysql_select_db($db01); $comment = $_POST['comment']; $name = $_SESSION['username']; if(isset($comment)){ $query1 = mysql_query("INSERT INTO data (`id`, `Username`, `comment`)...

0
Q: Php Form Not Working Not Creating A Page

user3033100So I have this get a quote page and in it has this bit of php. With all the other php which I didn't show here but this is where my problem is file_put_contents('C:/quotes'.$pagename,$page); . This is not working it is displaying the rest of the php correct I don't get any errors its just not ...

0
Q: How do I take an unknown number of elements from a session array in php and use them as separate variables in JavaScript?

RyanI a webpage written in php/html that adds the contents of a text box to a session array each time a submit button is pressed. What I need to be able to do is take the unknown number of elements in the session array and have access to each of them in the javascript portion of my code. Here is th...

0
Q: Convert string to dateTime for mySQL database using php

coop1332I'm a computer science student and I have been stumped on part of my assignment. We have to parse an XML file and save it in a mySQL database. The problem I have run into is that there is an element in the XML file called pubDate that has a string that is formatted like this: Mon, 04 Nov 2013 11...

0
Q: How to count total number of rows of table in Cakephp

PatrickHow to count the total number of rows of table and pass it to the variable? For example, I have product table and there are 10 products in it. I want to count all the rows and get the result 10 and pass it to the variable $rowcount. How can I do it?

0
Q: Passing value to jquery and php

NhizI have this button in html that calls jquery to confirm a delete <div class='delete' name='<?php echo $story_id; ?>'>delete book</div> and this is my jquery file $(document).ready(function(){ $('.delete').click(function(){ var del_id = $(this).attr('name'); $.confirm({ ...

0
Q: PDO Insert error on execute

EricI can't find my mistake, I'm getting Execute fail error $db = new PDO('mysql:host=localhost; dbname=xxxxxx', 'yyyyyy', 'zzzzzz', array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8")) or die ("fail");; $query = "INSERT INTO multiTicker (mtgox,btcstamp,btce,btcchina,myDateTime) VALUES (:mtgox,:...

0
Q: Login Yahoo with cURL

RamzI am trying to login yahoo with curl. here is sample class i used. <?php class Yahoo { public $cookies = 'cookies.txt'; private $user = null; private $pass = null; /*Data generated from cURL*/ public $content = null; public $response = null; /* Links */ private...

0
Q: Can't get form in LightWindow v2.0 to submit correctly

C BI'm trying to use a lightbox for a form that submits to my database. LightWindow (http://www.p51labs.com/lightwindow) seems to be the best solution since it allows for that. However, my form transfers data through the PHP file in the action tag. When I use an anchor tag as LightWindow suggestions...

0
Q: How to get the returned value from Ajax Request and assigned it into an element?

JerielleI need a little help here. I am creating a dynamic dropdown list but I don't know how to display the ajax result in an element. Here's my scenario: The user will choose a state in the dropdown. After choosing the code will send an ajax request After sending, display the result in a select opt...

0
Q: Split data from mysql exported to csv into cols and rows

William Xavieri have a working export to CSV php code, right now its working just fine, but all the data its beeing pulled only by rows separated with ",", how can i do to get the data correctly, so each table column on my mysql will return into each column on my exported CSV? My current code is: function ex...

0
Q: Avoid multiple Insertion, when insert query called multiple times at same time.

user3040215$Link= mysql_connect("localhost", "root", "", ""); query = mysql_query($Link,"SELECT col_name FROM table_name WHERE col_name='$val'"); $num=mysql_num_rows($query); if($num==0){ $query1 = mysql_query($Link,"INSERT INTO table_name(col_name)VALUES('$val')"); ) } There will be multiple call...

0
Q: WSDL file loads in browser, but not in code

spydonWe are trying to connect to our magento soap/wsdl backend, we can load the XML file just fine when we are loading it in the browser. http://<url>/index.php/api/v2_soap?wsdl But when we do it through a wsimport(java) generated client or through the very simple php code: <?php $proxy = new S...

1
Q: sending values from php page textbox to asp.net website textbox

KarishmaI am developing a website in PHP. I have a login form in my website. Students when enter their username and password, it shall redirect them to a ASP.NET website(not my website) which again have a login form, and the username and password entered by the students in my PHP website shall appear on ...

0
Q: how to make ascending id in php

user3040085this code not asceding id. we have id 1, 2, 3, 15. when adding next record is read id 16. so how to solve this problem ? id must 1,2,3,4,5,etc <?php class database { private $host ="localhost"; private $user ="root"; private $pass =""; private $database ="barang"; function konek(){ mysql...

0
Q: Accessing USB webcam via a PHP script on Linux/Apache

dom_beauI want to use a USB webcam (in a small C++/OpenCV application) and call it from a PHP script. My test app looks like this: int main( int argc, char **argv ) { cv::VideoCapture C( 0 ); cout << "C.isOpened() = " << boolalpha << C.isOpened() << endl; return 0; } The PHP script looks...

1
Q: php showing mysqli_fetch_array() expects parameter 1 to be mysqli_result when data fetch from database

Rakesh MishraIn mysql I have a database like this CREATE TABLE IF NOT EXISTS `formvalues` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `maxlength` varchar(20) NOT NULL, `minlength` varchar(20) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; -- -- Dumping dat...

0
Q: switch statement using array keys and array values?

DestinyI'm trying to write a script that shows every value in array keys using switch statement here's my simple code: <?php $char = array('A'=>'01', 'B'=>'02', 'C'=>'03', 'D'=>null); foreach($char as $letter => $number) { switch($char[$letter]) { case 'A': echo $number; ...

0
Q: Validating form using php session

Tamim Ad DariI am trying to validate my form using php. Upon validation it will give a welcome message.Or else it will redirect to the index page. I have used session to save the variable. But the problem is nothing happen's when I submit the form, Here's my script <?php session_start(); $_SESSION['reg']...

0
Q: PHP INSERT to hosting database

Cyan PileI have this PHP code that inserts id, firstname and lastname: <?php header('Access-Control-Allow-Origin: *'); $conn = mysql_connect('localhost', 'happy', '***'); $db = mysql_select_db('dbtest'); $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; mysql_query("INSERT INTO tblt...

0
Q: Overlay a opaque image transparently with PHP GD

Osmium USAI'm trying to make a totally opaque jpeg render over a totally opaque png with 20% transparency. Both images have no alpha channels and I have no control over how the images come into the program. I can't seem to get it to composite at all. I've tried some examples from the PHP Manual website, bu...

0
Q: How to create a link like Faceebook groups?

user2852395I would like to know how to create links, like Facebook uses on their group pages. https://www.facebook.com/groups/356149784477344/ Instead of having ex listgroups.php?id=3334 I have read about that you can change httpd.conf, but that was for permalinks. like wordpress style. Any thoughts...

0
Q: Updating duplicate row in mysql on a column that may append or change it's name

user3040286I am importing an xml feed into database using simple_xml_loadfile. The entries are pretty basic, but sometimes they either change or have values appended to them or both. card name - citi thankyou card<br> apr - 0%<br> balance transfer - yes<br> bullets - 0% balance transfer 18 months|2x points...

0
Q: Accessing 'HttpContext.Current.User.Identity.IsAuthenticated' with PHP using IIS 6.0

TekneekI am using a php page in my asp.net 3.5 app running on IIS 6.0. Is there anyway to access 'HttpContext.Current.User.Identity.IsAuthenticated' in my PHP code so that I can protect my PHP page??

0
Q: MongoDB + PHP how to select

AldinStructure : Collection : merchant > id, name, country I want to select all name field from this collection, but all the documentation I read says I must specify the name like : $name = array('name' => 'test'); $cursor = $collection->find($name); PS : Something like select name fro...

0
Q: MySQL: Auto Increment based on Column Value?

user3011922Is there a way to auto increment entries to a MySQL table based on the value of another column in the inserted row? For example, something to say that this is the fifth entry for a specific username? I know I could do a row count after I make my query, but that's not what I'm looking for. I've...

0
Q: Set callback per email in Mandrill

user2430670Is it possible to set callback (webhook) per email being sent? I have two different types of webhooks needs to be triggered depending on the which one of my server email is being sent. I can not see any parameters in /messages/send.json . All I see is the webhook setting page where I can hard-c...

0
Q: Linkedin JS API for Login not working in Chrome Browser

Rajesh MI am using Linkedin JS API for login.It was working in FF,IE,Opera,Safari etc, But its not working only in Chrome browser. In Chrome, its not showing login button.I have searched everywhere but i didn't find any solution for this problem. Thanks in Advanced

0
Q: save nearby places to database or request API for every time needed

mockieI want build a real estate website with nearby places fiture around. But I'm bit counfuse which are better : Save nearby places to database (up to 50 new rows nearby place) when someone insert new property. Request API for data each time neeeded. FYI i'm using foursquare API 5000 requests per h...

2
Q: check the product is present in session array and if present increase the count value for that product using php

Ramasamyi am new to php and i am adding products to session as array but before adding that product to session how to check that product is present in session array or not. If the product is present i want to increase the count of that product, if not add that product to session array.

0
Q: Google Audience reports using php

Dam ForumsOne of my client needs to use the Google Audience reports using his site. can someone give a idea to do that please? i have done google analytic before. Thanks in Advance

0
Q: Yii framework - how to display multilingual error messages

Maz IqbalI am using Yii framework to develop a multilingual web site. Right now I have English and French Versions. I have created a fr folder and placed views and controllers related to french version but using same Models for both versions. My database tables structures are like Articles table. ...

0
Q: mysql - get the last activities of a user

Mohammed ZameerThis answer did work but with a problem. User recent activities - PHP MySql My query is same as that (SELECT `user_id`, `date_added`, 'vote' AS `type` FROM `vote` WHERE `user_id` = uid) UNION (SELECT `user_id`, `date_added`, 'discussion' AS `discussion` FROM `discussion` WHERE `user_id` = uid...

0
Q: How do I pick up a change in URL with php?

user3030521I have a textbox in which a user can input a name and it is stored as the following variable: $name After which, I have some php code that will create a string based on the contents of the input. $site = "www.example.com/" . $username; As an example, let's say the name John is stored, the $...

0
Q: AJAX data find does not work

user3003813I have these codes <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Di...

0
Q: (FB PHP SDK) Posting a Feed on a Administered Facebook Page

Mr AI am trying to post on a page I administered in Facebook and I use this code. $fb_key['key'] = 'fb_access_token'; $access = Model_const::read_key($fb_key); $f = new facebook\fb($cfg); $f->setAccessToken($access['value']); $p = 'User is not logged in'; if($f->getUser()) { $page_arg['access...

0
Q: Running Java JVM from shell and python command from PHP

q2liuI'm trying to start a Java program from a PHP page by starting a JVM using a shell script. However, after running that server, I want to run another python script to get the result from the Java script. But I'm having trouble starting the two processes in different sockets. I've listed the PHP an...

0
Q: How to downlaod 5 min video from 1 hour you tube video

psanjibI have tried and also success to download you tube video for that i use ffmpeg. But there is a problem if the video duration is long (1 hour) the that will take more time to download. Is there any way to download 5 min video from 1 hour you tube video Thanks in advance

0
Q: How to set Height , Width of div with display:inline property in css

user3030853I am creating multiple div using for loop in one row. But 'Height' , 'Width' is resets with 'display:inline' property in CSS. Why height - width of div is not working with 'display:inline' property. CSS CODE- #default-Div{ overflow-x: scroll; width: 830px; white-space:nowrap; height: 110px; }...

0
Q: How do I get the access_token from tumblr's official php client?

OctopusI've followed the directions posted in this stackoverflow question, but I am stuck. I am using tumblr/tumblr.php from Github. I am also following directions here (which are actually for twitter), but those directions aren't tailored for the git library I am using. I have a valid consumer key ...

0
Q: How to access data in nested Std Object array in PHP

JadeI need to access the data: 'hotelID', 'name', 'address1','city' etc. I have the following Std Object array ($the_obj) in PHP that contains the following data: object(stdClass)[1] public 'HotelListResponse' => object(stdClass)[2] public 'customerSessionId' => string '0ABAAA87-6BDD-6F...

0
Q: automation of data fetching from web pages

user3040439i want fetch information about every single tender that is published in this site to an excel sheet https://etender.up.nic.in/nicgep/app?page=FrontEndLatestActiveTenders&service=page i m working this manually since last two months ,,i want to auto mate this process using php script so somehow ...

0
Q: Trouble with preg_match_all, regex, and \is

GrantI am webscraping a HTML page using preg_match_all in PHP. This is what I'm trying to scrape: <script> function fsb38(x) { var b=new Array(98,100,97,98,98,98,99,50,51,55,53,50,48,100,57,98,50,100,53,100,97,48,100,52,100,57,97,56,97,51,54,99,56,38,104,52,61,53,98,99,54,102,57,55...

1
Q: Would this stop Cross-site request forgery attempt?

HelpNeederI am thinking of a way to stop Cross-site request forgery attack as part of my secure coding class. I am thinking that if I could block attempt to connect to my website from any other address than the address where page is located... But would that work? If not? How to prevent them? What if I d...

0
Q: Android Json value not returning

roshanpeterI am developing an Android app in which I am using JSon to get values from databas. In database there is particular text for each string A-Z. and when a string is returned from A-Z the corresponding result has to be displayed... I am giving the code for that.. but the problem result is not displa...

0
Q: PHP form to MySQL and save as template twist

user3040438I've created a PHP form whereas the user selects from a menu one of 4 form, enters the appropriate data, then on submittal the data is saved to a MySQL database and displayed in a table list. I've been requested to add a feature and can't figure out the best way to handle it. In addition to the...

-1
Q: Get This Month's Data from an SQL Database using PHP

user3012938I would like to get data for this (current) month from an SQL database using PHP. Where am I getting wrong? My code is: $thismonth = mysql_query("SELECT * FROM product_enquiries WHERE YEAR(enquiry_date) = MONTH(GETDATE())");

0
Q: How to find numeric value before underscore(_) in php

Dk-Macadamiagood morning. I have a string like this: $val="you-nick-name-2_yp52958122c7593"; now I want only 2 from this string before underscore, for this purpose I tried by substacting string and I did something like this: $first = strrpos($val,"-"); echo substr($val,$first+1)."<br>"; //output 2_yp52...

0
Q: What‘s meaning of stripslashes( $pass ) in php

JackSunWhen i learing Brute Force in DVWA,i read the High Brute Force Source.It use stripslaches ( $user );function before use mysql_real_escape_string( $user ); function,i know mysql_real_escape_string() can escape special character so that it is safe in SQL statement. But i don't understand the functi...

0
Q: json array not displaying the values

user2964771I have the following json array, I am trying to retrive the values but it does not work => Array ( [url] => http://chrome.blogspot.com/feeds/posts/default [title] => <b>Google</b> Chrome <b>Blog</b> This is the code I am usin...

0
Q: Can't get data from JSON array

Richard Kevin NesbittTrying to learn JSON. Doing some simple exercises, but can't get past this one. I've rewatched the tutorial about 30 times. Any pointers? here's the JSON: { "name": "Username", "profile_name": "profile_username", "profile_url": "http://myapi.net/profile_username" "courses": [ { "nam...

-3
Q: how to set the selected option in select box which is dynamically generated in php

user3040460I have four checkboxes and if I select first it will display a select box and so on .How can I set the selected option in select box which is dynamically generated in php and am using ajax also

0
Q: Soap Authentication + Soap API + Soap Server Implementation

SLAYERI am new to Soap API. Can any one provide me example with below functionality. Soap HTTP Authentication. Soap Server implementation. WSDL file. Soap Client implementation. I have done all the stuff other then Soap HTTP Authentication. I have asked que with code here. php soap API authentic...

-1
Q: I'm stuck again in fetching on my database

MysEagerCan someone please help me again with this I am trying to display my about to my page of admin account but I really can't see what's wrong with my code. Here is the snippet of my php codes: Address on the Website: if ($result = $mysqli->query($query)) { ...

0
Q: Open cart images don't display on backend

user3016968in the admin folder config.php file: define('DIR_APPLICATION', 'E:\wamp\www\opencart/admin/'); define('DIR_SYSTEM', 'E:\wamp\www\opencart/system/'); define('DIR_DATABASE', 'E:\wamp\www\opencart/system/database/'); define('DIR_LANGUAGE', 'E:\wamp\www\opencart/admin/language/'); define('DIR_TEMPLA...

0
Q: MySQL fulltext returns duplicate rows

Redzwan LatifI wrote codes to search for a keyword from different tables. This is my code : $stmt = $conn->prepare("SELECT DISTINCT rest.*, MATCH(rest.resname, rest.address) AGAINST(:keyword) as a, MATCH(cuisine.cuisine) AGAINST(:keyword) as b, MATCH(recc.recc) AGAINST(:keyword) as c, MATCH(emenu.menu, ...

-1
Q: How to connect Mibew to Gtalk?

srapswarei am using Mibew to chat support but want to connect it to Google Talk by whit any public/visitor can chat us every where. you can check Mibew at http://mibew.org/ and you can check Forum too

0
Q: Web Services using Spring RESTApi and Php web services

AniHi I am developing RESTful Web Services which will be consumed by Mobile Applications as well Web Applications . But I am having confusion which technology should I use , should I use Php Web Services or Asp Web Services or Spring RESTApi which one is best ? What are that parameters which are d...

0
Q: php session resetting every 10 seconds with jquery

user3040452The issue I'm having is this: I'm setting a page number with php $_SESSION['page'] at the top of my 'home' page, then using Jquery to retrieve data from a php file using the $_SESSION['page'] for reference, and updating $_SESSION['page'] so that on the next call to the file i know where to pick ...

-2
Q: How to covert this Mysql query for zend format?

user3040529db table "inquiries": inquiry_id birth_date 1 1960-02-01 2 1962-03-04 3 1970-03-08 4 1980-03-02 5 1990-02-08 SELECT SUM(IF(age < 20,1,0)) as 'Under 20', SUM(IF(age BETWEEN 20 and 29,1,0)) as '20 - 29', SUM(IF(age BETWEEN 30 and 39,1...

0
Q: PHP soap request is all lowercase

PindabeerI'm trying to communicate with the DHL soap web service. Via SoapUI i get all the correct data but when i'm using the PHP soap client i receive a soapFault. if i check the lastRequest .. my entire XML is in lowercase, i have put this request into SoapUI and i receive also an error. This is becau...

0
Q: PHP regex to clear between two html tags ( nested )

user2360754I need a regex to clear everything that between two html tags. But the tags can be nested. I wrote this $theHTML = ' <div class="holder"> dynamic text 1 <div class="section"> section text </div> </div> '; $first='<div class="holder">'; $second='<div class="section">...

0
Q: Apache vhost not redirecting to local configuration

Taylor BishopSetting up a localhost server using the LAMP stack, and cannot get it to redirect the PHP header to my local configuration. I've edited the default apache configuration file as so: <VirtualHost *:80> DocumentRoot /home/taylor/keychat/ ServerName keychat.vkv.me <Directory /> Options FollowSym...

0
Q: HOW TO SET SESSION TIMEOUT CODE IN PHP

SATSANGII have one page session.php and my code is: @session_start(); if(!isset($_SESSION['uname']) || $_SESSION['uname'] == " " || !isset($_SESSION['uid']) || $_SESSION['uid'] == " ") { echo "<script language='javascript'>"; echo "window.l...

0
Q: Save user email in database and send an email in php

user3040555I'm trying to save the users email and name into a database on submit (they type it into an input box and click the submit button) and then send them an email (to the email they submitted). Here's what I'm trying to do in my code: <?php if (isset($_POST['submit'])){ $con = mysql_connect("local...

0
Q: How to extract json data in an array using a loop?

JerielleHello guys I have a problem. And I don't know how to solve it. I am a beginner in ajax processing. I hope you can help me. I have an ajax data from the success. And I want to put this in an array. Because I want to put the json data in an options select box. Here's my code: In my controller I ...

0
Q: Extracting sub string from web page content

Programming_crazyI am parsing web page data using file_get_content. Now I want to extact first 150 character as a description for that url. $url = 'http://crewow.com/CSS_Layout_Tutorial.php'; $data = file_get_contents($url); $content = plaintext($data); $Preview = ...

0
Q: Edit/Update MySQL DB Values from HTML form

Code_Ed_StudentI have a form that currently submits values to a mysql database. After each submit is performed the data that was just inserted in to the mysql db is echoed below the form. The form has dynamic input fields. I am know wanting to add the possibility to edit the values previously inserted. I place ...

0
Q: How to add case insensitive autoloading using composer generated classmap?

sectusI have legacy project which has declartions and class usings in different cases. I want upgrade source to modern state. First I want to replace legacy autoloading by composer autoloading. But composer does not provide case insensitive autoloading. How to use composer classmap and insensitive a...

0
Q: Removing index.php in CodeIgniter just works for the default controller URL

Mel Sy GallosaThis is the code that I put in my .htaccess RewriteEngine on RewriteCond $1 !^(index\.php|images|robots\.txt) RewriteRule ^(.*)$ /index.php/$1 [L] it works just fine if I go the default controller $route['default_controller'] = "atk_c/login"; I just input localhost/timetracker and it will a...

0
Q: d3 importing data from mysql database return "undefined"

danipenI'm making a map and I have a huge dataset (almost 4 million record) so I stored it in a mysql database and I query it only for the data I really need to make the map. I have a pend.php file that return the data in json format and I want to use it in d3 d3.json("data/pend.php", function(error, d...

0
Q: sending email to multiple recipients not see other users addresses

Farhan Dharsihello friend me sending registered users activation link and code on their email address via admin panel and it working fine users can get acivtation link and code. but problem is that users can see other recipients email address In To: i want users cannot see others recipients email address? h...

0
Q: Planning Ahead For Website Upgrades

SilverFoxI've noticed while developing my first site, that the smallest changes in database columns, connection options, and various other components cause the website to fail until I correct the problem which may or may not require a lot of time (woe is me). I'm wondering what steps I can take now in or...

0
Q: JS parsing with flash

user2930808hi i am new on javascript and i have player name player.swf i am getting list of videos from the database like videos/dhoom3.flv and passing it from there to js and then to flash for that i have use <script language="javascript" type="text/javascript"> function playFirstVid() // plays the fir...

0
Q: how to hidden image / show input when checked checkbox, and show image / hidden input when checked checkbox again?

user3030013................................................................................................................................................................... how to hidden image / show input when checked checkbox, and show image / hidden input when checked checkbox again ? ..................

0
Q: How to solve wordpress website speed issue?

Umar DarazI have a website http://www.provaltech.com , from last few days I am working on speed solution for my website, I have done some r&d , also submitted website In Google PageSpeed Insights http://developers.google.com/speed/pagespeed/insights/ I have found that its showing few errors as follows : ...

-1
Q: Get date of after 3 working days except sunday and second satarday, fourth saturday from current date?

user18133I want to get a date of after 3 working date excluding sunday and 2nd saturday and 4th saturday.

0
Q: Exceute Runtime.getRuntime().exec() in PHP

Rony TampubolonWould you help me to solve this problem. I have been succesfull to execut the simple java program using Runtime.getRuntime().exec() using command prompt ( in Windows ) But when I execute by php it doesn`t work? Simple code public class Main { public static void main(String[] args) { ...

0
Q: Changing footer.php to use different social sources

user3040691<ul> <?php if ( !empty($sd_data['social_twitter_footer']) ) : ?> <li class="twitter-icon"><a rel="nofollow" href="http://twitter.com/<?php echo $sd_data['social_twitter_footer']; ?>" title="Twitter">Twitter</a></li> <?php endif; ?> <...

0
Q: operators && and || doesn't stack

Freezamani have little trouble with operators in this code. I need to at least one of the 'and' pair to be true to continue. In the example it should say true but it doesn't. Any help would be appreciated. $i = 1; $e = 5; $c = 3; $d = 4; $b = 6; $a = 7; if ( (i==1 && e==4) || (a==7 && b==5) || (c==3 && ...

0
Q: getting value of dynamically created textbox using javascript

Osama AliI have a order page, where customer selects product from a variety of categories then using a php foreach loop I am getting the selected products details from the database and show the selected products in step 2, where quantity is to be selected. In step two I need to calculate the subtotal of t...

0
Q: monitoring relationship between tables in a database

user3011896Hi frnds plz tell me how to find the relations between tables in a mysql database. I am having nearly 271 tables in my database.I am using Xampp server and php 5 Please tell me...

0
Q: TYPO3, tt_news not allowing more than one category selected

mArm.chI've got a strange "bug" in one of my TYPO3 website. I've got tt_news installed and have 5 categories in a storage folder. When I add a news, I'm able to select my categories, but if I select more than one, a orange warning appears next to the category field and tell me that "a required field ...

0
Q: Store Result of While Loop in Array and Assign a session to the Array

BongskyI have a search query that will fetch a record in my database code: while($pid_row = sqlsrv_fetch_array($stmt_pid_check)) { echo $pid_row['pid_code']; } I want all the result in the while loop to be stored in an array ang assign a session variable for the array... How can I achieve it......

0
Q: How can I change invoice PDF template in vtiger 6.0?

user2953012How can I change invoice PDF template in vtiger 6.0? Where is file with this template? https://github.com/vikas-saklecha/vtigercrm

0
Q: PHP get value from array for id

PiotrI have array array (size=2) 0 => array (size=1) 'Product' => array (size=2) 'id' => string '109' (length=3) 'name' => string 'product1' (length=2) 1 => array (size=1) 'Product' => array (size=2) 'id' => string '110' (lengt...

 
7:57 AM
0
Q: PHP/MySQL structure record last 5 logins

user2979496Hi guys something is wrong with me and I cant think of a way how to record last 5 logins (date and IP address). I dont want to create 5 tables. I need the easiest way, please. Thank you!

0
Q: Wordpress - is get_posts() more efficient than The Loop?

DarcCodeIn category.php, I want to get list of posts in that category. I found two ways: using get_posts($args) and The Loop. get_posts() way $args = array ( "category" => ID ); $posts = get_posts($args); // then use foreach to loop the $posts The Loop way <?php if (have_posts() ): ?> <?php whi...

0
Q: how to create grid view to enter data maually in PHP

user3040753in php i want to create a database in mysql and want to create a grid view to enter the following information i want 3 coloums no name company 234 xyz abc 543 pqr def i want to create a excel sheet and enter this data then Create a DB and Table within MySQL . The tabl...

0
Q: Echo child page's custom field value on parent page

mfki've managed to echo the subpage's title on the parent page with this code. but i'm trying to link the echo-ed subpage title to another website by echo-ing the subpage's custom field value "linkto" into the ahref link tag. right now i can only manage to echo the Parent page's custom values if i...

0
Q: string comparison and changing order of array

carambaTrying to create a search for users where I have an array like this: Original Array: array(2) { [1]=> array(1) { ["string"]=>"One two three, Blue, Green, Yellow" } [2]=> array(1) { ["string"]=>"One two four, Blue, Green, Yellow" } } Now how can I do...

0
Q: post results in php from another php page

user3018797There are many questions on the first php page hence why i want to use loop to post the results of the radio buttons which were selected on the first page onto the second php page. any ideas how i can do it? I have tried the foreach function to get the results from the first page however it does...

2
Q: PHP crypt() function returns the same encrypted string everytime

mazraaraI am doing an encryption with PHP and found this bug with crypt() when using with a SALT. This is how I am using it. echo crypt('hellow@stg', 'azraar'); //azbFcR.LdN/SM echo crypt('hellow@stg1', 'azraar'); //azbFcR.LdN/SM echo crypt('hellow@stg0', 'azraar'); //azbFcR.LdN/SM echo crypt('hello...

0
Q: PHP: file_put_contents creates file when script is run on command line, but not loading webpage?

George NewtonI have php script named script.php like: $output = "Some text"; file_put_contents('output.htm', $output); ... When I load the script through a webpage, by going on my browser to 'someDomainName/script.php', file_put_contents returns FALSE and no file is created/overwritten. However, when I ru...

0
Q: How to show Date as Dynamic Parameter with Product Listing Date in PHP

RuchikaWe have a listing page wherein we show in current date of listing a product Code is <li><span>Listing Date</span></li> <li><?php echo date("d-m-Y",strtotime($this->prodDet->adddate));?></li> How to make date as dynamic parameter so that it can have value basis current date comparison with list...

0
Q: mysql query failing in php

user2961121I am trying to run the following query in php, but its failing. $results = $conn->prepare( "INSERT INTO book_loans VALUES (:book_id, :branch_id, :card_no, CURDATE(), DATE_ADD(CURDATE(), INTERVAL 14 DAY))"); //Binding params an...

0
Q: selected date plus 1 week after; result turn out weird issue

user3036527 **input form:** <strong> Start Date: </strong><input type="date" name="rentstart" id="rentstart" value="" required/> **POSTING TO RENTAL.PHP** $lol = $_POST['rentstart']; $pDate = strtotime('$lol + 1 week'); $rentdue= date('Y-m-d',$pDate); ...

0
Q: Mysql : select left join , group by user name and get the last last row

user3040832Hi i've tried to get last entry with this query but i just cant get last row(only the first): select users.*,messages.* from messages LEFT JOIN users ON messages.messageBy=users.email where messageToUser='{loginUser}' GROUP BY messageBy

0
Q: email-verification process secure?

user2999787I am going to create an email-verification-registration, during my studies I found this: http://youhack.me/2010/04/01/building-a-registration-system-with-email-verification-in-php/ I read it and I think it's quite good isn't it? I mean, its using mysqli, of course I could update to PDO, and a...

0
Q: How to write php within html within php?

stckxchgusrI have recently asked this question, but rather than getting a direct answer, I was shown how to use the ternary operator to simplify my code by substituting if statements inside my html with variables, which I appreciated and put to use - however that also caused other code to be harder to read ...

0
Q: One Page Checkout scrolling to the bottom of screen on next

user1597438On my magento site, I am getting a strange behaviour in onepagecheckout that I’d like to fix. Basically, on Step 2, after entering all the data required and I click on the continue button, the page automatically scrolls down to the bottom of the screen so instead of seeing the shipping option, yo...

0
Q: 7 query with inner join into 1 query, mysql

user3040842i have a question, how do i make totally 7 query into 1 query? to make the db query lesser? i have 1 table contain all of it, but the suggest is a "separator", each suggest i have to load 33 rows and order by dateline, i have think about use any inner join ... etc, but i think that is not a way? ...

0
Q: fetch image from database php

user3004033I just want to ask how can I fetch image from my database? I have created my database and table. This dbname = healthhelp, username = root, and no password. I created a table named images and with name, type, and size. And I also inserted data. name = img1, type = jpg, size = 200. Now I have imag...

0
Q: wordpress populate select menu depending on another select menu

Mohamed Husseinam working on a registration menu and in this menu the user have to enter his country and city (countries and cities are added from the database mysql) Country get_results ("SELECT * FROM wp_comp_country"); ...

-1
Q: How to get array key with PHP?

Matti KiviharjuHow to get array key with PHP? If I have array like below: <?php $column[0] = "htrhyt"; $column[1] = "eryrye"; $column[2] = "yrerey"; $column[3] = "34634634"; ?> Then how do I get those number inside [] to some variable on while loop?

0
Q: How to call Javascript in Yii dropdownlist onSelect

user3004356I created two dropdownlists using Chtml::dropdownlists as shown below. echo $form->dropDownList($model, 'min_cost', Yii::app()->params['cost_resales'], array( 'empty'=>'Choose one', ...

0
Q: strange character encoding of stored data , old script is showing them fine new one doesn't

maxI'm trying to rewrite an old website . it's in persian which uses perso/arabic charachters . CREATE DATABASE `db` DEFAULT CHARACTER SET utf8 COLLATE utf8_persian_ci; USE `db`; Almost all my table/columns COLLATE are set to utf8_persian_ci I'm using codeigniter for my new script and i have 'c...

0
Q: Symfony2 Sonata Project - SonataTimelineBundle Issue

Aman Varshneyi am using sonatatimeline bundle in my project. As per docs given by sonatatimeline bundle http://sonata-project.org/bundles/timeline/master/doc/reference/installation.html . i had followed the steps and it was successfully configured. i am facing a problem when i create or update anything...

0
Q: PHP Post parameters to another server

user3040823Hello guys I work on something that i've never come across before and I would like for your advice. I need to pass a HTTP to another server in order to automatically insert variables such as username and password.to clear this more and be more specific I need to pass as I said the username and pa...

0
Q: Bulk print in javascript/php?

SujanIs there any way to implement bulk/mass print in javascript/php? I searched on web and most of the answers found are for .net and java. I need to queue around 600 documents at a time. I found PECL printer library but the doc says it is only available under Windows 9.x, ME, NT4 and 2000. Does PECL...

0
Q: How do I pass this JSON data to an autocomplete

user2886457I have a problem with JSON and PHP, I have JSON file(data.json) that contains persons, these persons have a name and a phone no. The JSON format is: { "persons": { "person": [ { "name": "Kevin", "phoneno": "231" } ] } } I can retrieve the JSON data by using the following JavaScri...

-2
Q: PHP Distance Calculator Code Using Google API

ElangathirPHP Distance Calculator Code Using Google API PHP Distance Calculator Code Using Google API

1
Q: PHP system language files, how can it be done?

KaremI currently have a web application, that based on what user selects for language, selects the correct language file to use. This language file contains many defined constants. Here are a snippet: define("SHOP_LBL_PRODUCTS", "Products"); define("SHOP_LBL_ABOUTUS", "About us"); define("SHOP_LBL_C...

0
Q: Calculate total price

user3009232I have a webpage where the user can search and select for a specific type of paper based on the item selected from the drop down list. The search will then return and display the full name of the paper alongside the price which is pulled from my database. I need to calculate ( preferably dynamica...

0
Q: xupload extension on yii

SunartoI want to use the extension xupload. but i have a problem when uploading files my controller IdentityController.php public function actions() { return array('upload' => array( 'class' => 'xupload.actions.XUploadAction', '...

-5
Q: What one letter is wrong in this code? (PHP)

user3040965I'm new to php and I have a problem where I know one letter is wrong in this section of code, but I can't find which letter it is. <?php $fh = fopen("testfile.txt", 'r') or die("Failed to create file"); $text = <<<_END Line 1 Line 2 Line 3 _END; fwrite($fh, $text) or die("Could not write file")...

0
Q: View PDF in browser without Download (Something like gmail attachment)

Pawan MudeWe are using php to generate PDF on server. Can you please help me to understand, how to give facility to user to view PDF online (something like feature of Gmail) ? Any reference document will be of great help. In this figure, if I click on PDF icon / anywhere outside two buttons to downlo...

0
Q: Get "invalid-sender" error in Mandrill when try to send template

fessyI have 4 templates but one returns error: "reject_reason": "invalid-sender". I didn't find this error. in Docs. I have 4 templates in my account and current template has following structure: Template Slug: contact-home From Address : info@somecomp.com From Name: SOME_COMP ++ template as...

0
Q: Shortcode plugins for own custom cms like wordpress shortcode plugins

user3034390I have created a custom CMS for my own and a plugin system that is working as I expected. Now I want to create plugins based on shortcodes, eg: [gallery attr1=100 attr2="string"] and [mycode title='message' color='#F00']Hello World![/mycode] I want to handle the above mentioned shortcodes ...

0
Q: php wont echo results from inner join query

user1726443I've looked around the site for similar problems with solutions and non seem to fix the problem I have. I have two tables; "friendlist" and "users". I'm trying to use the "FriendID" from "friendlist" to retrieve information from the "users" table. Everything works fine up until the while($row = m...

0
Q: Function causes problems using $_POST?

bonnySomething strange is going on with the following $_POST. page.php: include_once "../functions.php"; protected_page(&$_SESSION, &$_GET); if (empty($_POST['logout']) === false) { echo "logout!"; //unset($_SESSION['xyz']); //setcookie('xyz', '', time()- 999999, '/', '.domain.tld' );...

0
Q: how to avoid mysql table crash

ipeltoday i have found that one of my mysql table (with MYISAM engine) is crashed, yesterday the same thing with another table. I think the cause is the overload of my VPS in these last days (bacause both these tables are used to store many impressions) i tried to repair the table but it was not po...

0
Q: Add field to opencart products

Sameh Mohamedi have two issues when add field in the product list catalog -> product -> data i add a dropdownlist in the list : <tr> <td>Model :</td> <td><select name="model_choice"> <option value="0">None</option> <option value="1">Man Tshirt</option> <option value="2">Man Short</option> <...

-6
Q: I need some real life project tutorial in php

washiplease help me.I am complete beginning level tutorial. So i want to make real life porject.so please give me some tutorial.

-1
Q: what is the meaning for this (->)symbol what it realty do?

pd1786am newer to php i find lot's of code given symbol like (->) for ex: $st = $db->prepare("SELECT * FROM jqm_categories"); here getting some values from table jqm_categories and global $db; it was database config file given below /* This file creates a new MySQL connection using the ...

0
Q: MySQL query cannot find large alphanumeric values? - PHP

DataSciI have some PHP that needs to connect to my mySQL database and return the email that corresponds to a transaction_id. The following code connects to the database fine but when I try to query the table with WHERE transction_id='large value' (see code below) nothing returns. Do I need to do somet...

0
Q: Search Through Links in HTML File

Sanam PatelI'm working on a project where users can upload files and uploaded files store at cdn network also the link of file is store at localhost in html file like 1 link/line. (It can be also store as SQL Database, json, csv, txt format) HTML File Example : http://cdn.example.com/folder/test/Green Woo...

0
Q: How to store image directly to AWS S3 bucket, uploaded using fckeditor?

user1491022Recently I have moved my existing site in Amazon AWS and I am in trouble to store the uploaded image or any other file type directly from Fck-editor to Aws S3 bucket. I have search my problem in Google, but not found any proper solution in this regard. Does anyone have any advise or possible so...

0
Q: Why use SMTP Authentication

NikitasWhy should i use a mailer class like PHPMailer instead of the simple PHP mail function? Is there security problem or spam danger? thanks

0
Q: How to get single column table values from mysql db to dropdownbox using php ajax?

user3041016How to get single column table values from mysql db to dropdownbox using php ajax? For eg: i have some name list in my dropdownbox when i select particular name from that, then the details(say gender or age) of particular name (will be get from mysql db) will be display in another textbox/dropdo...

0
Q: How to use add_rewrite_rule function to rewrite url

user3040966www.ke6.com/text/month (The text is category name,cat id is 2) www.ke6.com/?cat=2&score=month my code: add_rewrite_rule('^text/month/?','index.php?cat=2&score=month','top'); But it doesn't work. When I visit it,actually it was www.ke6.com/category/text/.

0
Q: How mysql constraint works (innodb)

user1645638I want to know how can i setup constraint of a mysql innodb database . In my case , I have 3 tables , one for the user with the primary key userId and another for the actuality with actualityId , besides I have a third table that links the two other tables witn a many to many relationship ,In res...

1
Q: equivalent syntax to for loop and while loop?

DestinyI know basic examples about foreach to for loop and while loop since I was begin coding I didn't paying attention from the speed of executing a script which it is very very important since then I keep converting all my for each statement to for loop. If it's comes to array i'm quite confused -_-....

-1
Q: Php Syntax error. Unsure where

user3041023beginning of php <?php echo "Began"; $Title=$_GET["Title"]; $Des=$_GET["description"]; $Url=$_GET["url"]; $Date=$_GET["time"]; echo "4 lines"; $Loc=$_GET["location"]; $Num=$_GET["num"]; $info01=array($Title,$Des,$Url,$Date); $info02=array("<title>","<description>","<date>","<url>"); $info03=array("<

0
Q: Android data retrieving from server showing Connectio error

user2982649i have an android app with two versions.. old version and new version.i am retrieving datas from server through php API.Am getting data retrieved for the latest version.But for the old version its showing connection error..i have to confirm where the error will be?In DB side Or Android side?

0
Q: Store query result in a array - what is wrong?

Mugur UngureanuI have a query: mysql_select_db($database_dbconfig, $dbconfig); $query_Holidays = "SELECT substring(data,9,2) AS days_holidays FROM database_holidays WHERE database_holidays.data <> ''"; $Holidays = mysql_query($query_Holidays, $dbconfig) or die(mysql_error()); $row_Holidays = mysql_fetch_assoc(...

2
Q: Page refresh after the request is Done

user1765876I have a page with many checkboxes on it, I wrote a JS code that makes call to PHP page for each page, I want to refresh the page after the call has completed.. Here is my code $(".matchFrnds").each(function(){ //For each CheckBox if($(this).is(':checked')){ var sendData= ...

0
Q: Wondering.. If mysql and mysqli could be possibly used in the same website all at once?

MysEagerIs it possible to connect everything? the end-users uses mysql and the admin uses mysqli? In which for the end users I'll be using the mysql for displaying the contents for them to see and mysqli for my admin account?

0
Q: C++ extensions for PHP

user3041052I need to write C++ extensions for PHP OS Linux (Debian), 1. Created the file config.m4: PHP_ARG_ENABLE (test, Enable test support) if test "$ PHP_TEST" = "yes"; then    AC_DEFINE (HAVE_TEST, 1 , [You have test extension])    PHP_ADD_INCLUDE (/ home / oleg / PROJECTS / QT / lib_swl / include) ...

0
Q: ERROR 500 - INTERNAL SERVER ERROR ON Exporting more than 500 in csv from database

user2846348I am getting ERROR 500 - INTERNAL SERVER ERROR on exporting more than 500 row in csv from database Increase max_execution_time up to 240 in php.ini and on the page also, then also error if(isset($_POST['export1']) || !empty($_POST['$row[id]'])) { $filename ="excelreport.xls"; include('incl...

0
Q: How can I create a for/while loop for following product formation?

LuFFyI am using database for retrieving products. I want to display product in following pattern. What can be the php Or .net loop code for this ? Help. <div class="big-row"> <div class="first-row-left"> <div class="product-1a">Product1</div> <div class="product-1a">...

0
Q: mysql - subselect across databases and servers

efdev1234On server S1 there is database A. I have read-only-access to it and can only perform SELECT statements. On server S2 there is database B, with full access. In database A there is a table, i.e. users with around 100.000 users and I want to save some additional information for each user in databa...

0
Q: Cakephp webpage title from db table

Kordian WiklińskiI would like to be able from my panel admin to change index.ctp title whenever i wanna to. Thats why i created table "websites" widh columns "id" and "par", model for that table "Website" and controller "WebsitesController". But i would like to write all of it in my main Website controller named...

0
Q: removing reference to googlesitemaps in silverstripe

jimbeeerI've recently moved a silverstripe site to a new server. Since then it's bringing up the error: Fatal error: Class 'SiteTreeDecorator' not found in /home/priorysc/public_html/googlesitemaps/code/GoogleSitemapDecorator.php on line 9 I try removing the googlesitemaps folder, but then it just brin...

0
Q: Integrate Podio API with BitCoin API for php sdk

user3041114Is there any option for integrate the Podio API and Bitcoin API together for a php project? Any suggestions would be grateful.

0
Q: Downloads not accessible outside network

PedderI've taken over a wordpress site from an old developer and one of the problems inherited is users who are not on our internal network can't access any downloads on the site or so that seems to be the cause. http://www.podotech.com/new-downloads is where they are hosted. I've spoken with the de...

0
Q: PHP preg_replace with newlines

MartinGot text a little like this coming out of a database [color=#BF0000]This is just a very simple test. Cheers Fred[/color] Now this text could have newlines anywhere in it between the [color...] and [/color]. Been trying to use this regex within preg_replace, this is the pattern \[color=(#[0-...

0
Q: How to make checkboxes dynamic (checked option)

T_5I have a code: while ($row = mysql_fetch_assoc($query_model)) { echo ' <label class="checkbox"> <input name="model[]" value="'.$row["Model"].'" type="checkbox" checked>'.$row["Model"].' </label> '; } I want to make checked option dynamic. At first I wil...

0
Q: Invalid parameter number error with custom Doctrine function

user915829I'm using my own doctrine function to calculate the Herversine formula for 2 points distance. use Doctrine\ORM\Query\AST\Functions\FunctionNode; use Doctrine\ORM\Query\Lexer; /* DISTANCE(lat1, lon1, lat2, lon2) */ class Distance extends FunctionNode { private $lat1 = null; private $lon1 = ...

0
Q: How to add another option to website and

RipperStatici have a javascript that shows and hides options from a html form. What i am trying to do is be able for the user to add a new category and then write that into the database as an option and add that subject to the option form. Here is an example of the html code, <select id="team1" name="...

0
Q: Why Ajax request with jQuery can't be processed?

ciaobenhere is the fact, i have this 2 files: page with an empty div #responsecontainer with at the end, in this script: <script type="text/javascript"> jQuery(document).ready(function ($) { $('#tabs').tab(); $("#datatableindirizzi").click(function() { $.ajax({ type: "GET", ...

0
Q: how to write pivot table expand entire field option in php excel library

user3021429Please help want export my excel file and get all data from its. Also get the sub tables (pivot tables) data’s. anybody can know that how to work this.

0
Q: Cannot add or update a child row: a foreign key constraint fails

Hammad AnwerThese are the create statement for the two tables that i am facing the issue with: First Table: CREATE TABLE hrm__companyteam ( id_team int(11) NOT NULL AUTO_INCREMENT, id_department int(11) NOT NULL, team_name varchar(255) NOT NULL DEFAULT '', notes mediumtext NOT NULL, PRIMARY KEY (id_tea...

-1
Q: sort an array with id and parent_id recursively like a tree

Alireza FallahI have an array like this pattern ( categories and sub categories ): array('parent_id1'=>array('id1','id2','id3')) this is my exact array : $categories = Array ( [0] => Array ( [0] => 12 [1] => 13 [2] => 14 [3] => 15 ...

0
Q: Centered square images in css without set dimensions

Michał SkrzypekI'm trying to make square images from rectangular in css. They also need to be centered. I've read a lot of questions here, but the answers, good as they might be, always use constant sizes in pixels whereas I need tem to be in percents so the theme can remain responsive. Basically I need to ch...

0
Q: Save in MYSQL the value of a div with HTML5 Drag &Drop

Victor Toyos Gonzalezit´s very simple, I have 3 little divs (1, 2, 3) and need to put them in another 3 divs (4, 5, 6). No problem, but then I need to save the data on MySQL, like 4-1, 5-2, 6-3 for example...I can put a javascript alert to display the number (id), but...how can I save it with PHP to MySQL? It´s not a...

0
Q: Blank row between select option

user3013440I have a form with a select. The problem is that between each option (in my select), i have a blank row ... I checked if my var $p contains or not <br>(and it's not). I tried to remove the two <br> just at the end, but it doesn't change anything ... help me <div class="modal-body"> <span cla...

0
Q: Google ecommerce track in php

Donatas VeikutisI want to submit my transactions to Google analytic. Is some way to send ecommerce traking to Google without Javascript? I whant to do that just with php.

0
Q: IntelliJ PHP fluent setter intention

hszRight now IntelliJ with PHP plugin supports setter/getter intention in following way (Settings > Intentions > PHP > Add setter): Before: <?php class Sample { private $index; } After: <?php class Sample { private $index; public function setIndex($index) { $this->index...

-1
Q: expired one time download links

Adi Hanif Sedari created one time download link from this web http://www.webvamp.co.uk/blog/coding/creating-one-time-download-links/ I have created a table and fill the downloadkey, filename, downloads, and expire correctly. Download key is 7fs6f3e19pwo3mduk903 . But when I try to accessing download.php...

0
Q: Pb Session with ZF2 and https url

user3041074I work with ZF2 and I want use the Session but on my local computer all work perfectly, I can retrieve all variable's session. but on my server (with SSL active and URL in https) I didn't have access to my variable session. I give you my php code : session config in config/autoload/: 's...

0
Q: php curl not working with proxy on live server

Vishal KamalHi am execute this code on local server, its give the response, but when i will try to run this same code on live stage server , its return 404 error. $url = "http://www.google.com/search?q=saree&num=100&start=0&pws=0"; $name = $name; $encoded = $url.$name; $ch = curl_init(); curl_setopt($ch, ...

0
Q: SS 3.1.2 - Google Sitemap with DataObjectAsPages Module not working?

cSGermanyI'm using the latest version of SilverStripe (3.1.2) and also the latest version of the GoogleSitemapModule. I want to register the DataObjects I created with the DataObjectAsPages Module from here http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/ in my Sitemap. But Here is t...

0
Q: How to add into an array 2 variables that are also arrays?

AdrianI have the below code: Here I declare the code for getting the category name and slug $args = array( 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => 0, 'taxonomy' => 'category' ); $categories = get_categories($args...

0
Q: How can I add next 30 days dates record in phpmyadmin using query..?

user3041230I have one table which contains only two columns. Dates_table id int(11) day_date (timestamp) So how can I add next 30 days dates in this table using mysql query..?

0
Q: Anonymity of a sender via the internet

user3041179I am working on a project to provide anonymity to the sender. I have been directed to tools like Tor but I want to build my own system. I have a proxy server to masquerade IP addresses. How secure is it to use only one proxy server? Is it possible to change/masquerade the IP address of the mobile...

0
Q: ZF2: How a new module could affect renderer of existing module

StonerI've created a new module and since then my application returns the following error: Zend\View\Renderer\PhpRenderer::render: Unable to render template "reviews/reviews/index"; resolver could not resolve to a file when i remove the new module from application.config.php everything works perfec...

-1
Q: How to start a countdown from a MySQL datables in PHP/JavaScript?

FlorentPI have an index.php that contains a countdown starting from 20:00 (20min). Actually I need to make this countdown start according to a value from a SQL database. But how can I take this value (stored in the database) and make the countdown start from it ? Because right now, if I reload the page, ...

-3
Q: Sort an array - seems chalenging

DJaYI'm siting one hour trying to figure this out with no luck. The problem I'm trying to solve : Sort an array by likes in accending order. For example, if a person A has 334 likes, then his 1-st, if another person has 330 likes, then he's 2-nd .. etc Here's a randomized array: $array = array( ...

0
Q: Getting all rows from the table that contain the same alues in some columns in CodeIgniter

user3041274Right now I can get all values from a table called cars by using this single statement in CodeIgniter: $this->db->get('cars')->results(); The problem is that I would liek to select ONLY the rows based on the same value in the column called slug, which is a stored url e.g. "very-good-car-for-sa...

-1
Q: Flexpaper Opening Links in PDF not working

user3041292Please help me when i using flexpaper, uploaded the pdf file perfectly but in the pdf files some links comes when i click on it its not working or not opened please help me thanks in advance

0
Q: Image in inputtext with border in css

Ramz IF you see the below picture you can see that the input text consists of image as background.But I want to keep a line in between the text and image.Either by applying image border...or any other trick.Im unable to found exact example or tutorial or trick.Because I applying image as background....

0
Q: Caching part of canvas in custom view. Android

DiversI have extended EditText view with overridden onDraw method: @Override protected void onDraw(Canvas canvas) { int count = getLineCount(); drawLineNumbers(canvas, count); // here I draw line numbers on canvas, // like on picture super.onDraw(canvas)...

0
Q: PHP is_writable error return not writable

MaroxI have this code if(is_writable($destination)){ print "destination is writable"; } else { print "destination is not writable"; } $destination is an absolute path like ../subdir/dir/currectDir/ and I have checked and the permission is 777 but this code above returns "destination is not w...

0
Q: codeigniter with google analytics

user2702443I am trying to run a google analytics experiment on my website. I am using Codeigniter 2.1 and here is the issue: Google experiments are URL based. You set the original page you want to test, for example: TEST 1 http://www.mywebsite.com/main (don't click, it is not a real link) and then you set t...

0
Q: How to require variable with empty string or null?

user1575921I tried to detect in a.php and direct to one view file b.php. How to set the variable make it none require file? it I set variable = '' will show warning message require(): Filename cannot be empty detect > direct a.php if($AritcleRow['TotalProductId']){ $Product = 'views/Product.php'; }els...

-2
Q: displaying data from Mysql using php

user3030425I have data in my mySql database , the table structure is as follows , e_id | p_name | time | taskdate VT01 | p1 | 2 | 2013-11-22 VT01 | p1 | 1 | 2013-11-23 VT02 | P2 | 3 | 2013-11-23 VT01 | P3 | 2 | 2013-11-24 E_id are for different employees . User...

0
Q: how to include vendor and other ignored directories/files in jenkins builds using GIT

djjjuki have a git repository where i have the following directory structure: src/ vendor/ app/ public/ vendor/ contains as you'd expect, 3rd party libraries (symfony, etc) which i do not want included as part of the repository. as a result of this, in my jenkins template which i have set up as 'Po...

0
Q: Fsockopen not working when initiated by server on itself

Ram G AthreyaI use a Yii extension called ERunActions to run background process such as sending mails to users. This extension internally uses fsockopen to accomplish this task. It all works fine in development but in server using fsockopen redirects me to http://example.com/cgi-sys/defaultwebpage.cgi I read...

0
Q: Online PHP compiler with API

MartinI'm working on a Google Chrome extension that includes entire PHP documentation and one of the features I want to implement is an online PHP compiler. Each function in PHP has 1-3 examples and it would be very nice if you could modify and run each of them. There are quiet a lot of online compile...

0
Q: GET method parameters

Disputedi'm using get method to retrieve all the budgets with the same ID from JSON i have searched and looked for a solution but most says use URI and i couldn't implement it, or if there's another solution i hope you guys can help me: My url: localhost/SharedBudget/index.php/budget/allbudget?budget_...

0
Q: How to create an php page with xslt?

DamiiiI'm trying to make something with XSLT but i do not figure out on the web how to do it... My purpose was to create an html and a php page with my xsl applied to a XML schema . Is there a way to complete that task ? If yes, how ? Thanks P.S.: My XSL page already makes my html page but i want at t...

0
Q: Import CSV file in chunks with CakePHP

Erik Van de VenI'm trying to import a large CSV file, with about 23.000 rows, into my MySQL database. I can't import all rules at once, that just doesn't work. So I was wondering or it's possible to read the file in chunks, even while I'm using cakePHP transactions. This is my code so far: // Get data source f...

0
Q: PHP page not loading with SQL statement included

runelynxFor some reason my page won't load when I have the following php code in it... but when I validate the SQL stmt in my editor, it returns results (1 row) fine. I've tried debugging with the F12 Chrome thing, but the console doesnt show any errors outside of some CSS stuff. I don't really know how ...

0
Q: Count total items within two loops - loop within loop

Mayeenul IslamProject: WordPress project Query: WP_Query() With the single query I'm dealing with two loops - I call it loop within a loop. Structure is like below: <?php while( $my_query -> have_posts() ) : $my_query -> the_post(); if( condition) { ?> <div class="grid-box"> <div class="item">It...

0
Q: I have a permission denied proplem when i excecute php fopen to the folder in wamp server on windows

user3041295 # open file to write $fp = fopen ($path, 'w+'); # start curl $ch = curl_init(); curl_setopt( $ch, CURLOPT_URL, $url ); # set return transfer to false curl_setopt( $ch, CURLOPT_RETURNTRANSFER, false ); curl_setopt( $ch, CURLOPT_BINARYTRANSFER, true ); curl_setopt( $ch, CURLOPT_SS...

0
Q: Yii url-manager : file with a point (sitemap.xml)

user1816319I have a file with a point (sitemap.xml) and Controller Sitemap with action Index. Via url-manager i create patten: '/sitemap.xml' => '/sitemap/index', i try 'sitemap' => array('sitemap/index', 'urlSuffix' => '.xml'), and still writes an error 404. I'm doing wrong, please tell me? Thank you.

0
Q: How does a page's "Allow-Origin" header like paypal look like?

dollarvarI know this is duplicate-content-like from here: Why the cross-domain Ajax is a security concern?, Why Cross-Domain AJAX call is not allowed?, Why are AJAX requests limited to same domain?, What's the point of the Anti-Cross-Domain policy? But I just try to wrap my head around the forbidding of ...

1
Q: it's not validating my form data

404 Not Foundi have form like this my form <?php $error = $model->getErrors(); print_r($error); <form method="post" action="<?php echo Yii::app()->getBaseUrl(true).'/index.php/admin/user/resetpassword'?>" enctype="multipart/form-data"> <div class="row"> <label>Old Password</label><i...

0
Q: how to get the data from excel pivot table when php uploading?

user3021429Please help me. My excel file is pivot table so I want to get all data from that file including sub files when I am uploading excel. Now I am using Php library but not get the pivot values.

0
Q: include not work (PHP)

Pepík Samkůi have strange problem with include commnad my files structure /index.php /files/init.php /files/db.php and sources of this files index.php <? include ('files/init.php'); ?> init.php <? include ("db.php"); ?> Source from db.php is not executing.. NOW if i rename file db.php to db2.ph...

0
Q: when i try to update form in django getting this type issue

user3016773i stored this type value in DB : INPUT: { "PatientProfile__is_recruiter": "1", "PatientProfile__partner": "FMCS", "PatientProfile__health_insurance_provider": "MILITARY/VA", "PatientProfile__has_medical_home": "0", "PatientProfile__medical_history_heart_disease": "0"...

-1
Q: PHP MySQL Update a field by comparing multiple fields

user3041369I want to update a field in my table that would reflect UNCLEARED if the values found from other fields are not fitted in the condition this is the code where I am having trouble $update=mysql_query("update materials set remarks='Uncleared' where rifle='Borrowed' and shirt='Not Purchased' and fees

0
Q: Joomla while installing javascript error: Uncaught TypeError: Cannot read property 'token' of null

user3016968I get this error while installing joomla its a javascript error: Uncaught TypeError: Cannot read property 'token' of null Joomla 3.2 stable version why this error occurs?

0
Q: Tuning Sphinx search for product search

j99We have a very simple product catalog that stores products inside mysql table and we need to build a quality search for products that should work as fast as possible (and as relevant as possible). The products database will be quite large (about 500.000 products) which is why searches using "like...

-1
Q: Why this simple Query doesn't work?

ciaobeni can't make it work this simple query,it gives me my "die" error mysql_select_db("minigest_dev" , $con); $query = " SELECT * " . "FROM anag_c_indirizzi" . "WHERE id_cliente = '1';"; $result = mysql_query($query, $con) or die("query non valida: ". m...

0
Q: how to get values from mysqldb to dropdownbox using php ajax?

user3041016how to get values from mysql db to dropdownbox using php ajax? what i need is when i select anyone value from dropdownbox then the corresponding row values(get from db) will be displayed to another dropdownboxes/textboxes? Thanks Siva

0
Q: $_post checkbox value isn`t set inside echo

Cismas AlexandruWhy i can`t receive if checkbox is checked or no if i am ussing echo. If needed i can add the other part of the code. Thanks alot HTML code <?php $k=1; foreach($prods as $prd){ echo '<input type="text" style="v...

0
Q: I am reading RSS link if it is not valid then throwing exception,How to hadle it using PHP

Satish SojitraI am developing web application for RSS feed automation using PHP. Problem in my module i adding link of rss and store in database then those link display to the user and when they click on link they can show the data of the link. But sometime those link is not working so throws the following r...

0
Q: Can not connect to FTP when php on remote server, but connects when php is on localhost

ClarklightI am pretty new to php, just learning how to upload to server via ftp. I have a file for connecting to ftp, it displays no error when it is on my localhost, but when i upload the file onto the remote server, it gave me an error straight away that it can't connect to server(would it be because th...

0
Q: How to access array elements

user2961121I am getting this as var_dump: array(1) { [0]=> array(4) { ["num"]=> string(1) "1" ["yyyy"]=> string(4) "2013" ["mm"]=> string(2) "12" ["dd"]=> string(2) "11" } } How to access the array elements?

0
Q: Displaying additional field along with Data Grid for page navigation using json,PHP & mysql

Bilal KhalidFirst of all,please accept my apology for this basic question as i am new to JSon. I am trying to implement JQ data grid widget using mysql & PHP as described in “Bind Grid to MySQL Database” section on http://www.jqwidgets.com/jquery-widgets-demo/demos/php/index.htm?(arctic)#demos/php/grid.htm...

0
Q: how to get json in android?

Moon TaejinFirst question. php echos json data like this echo(json_encode($thing)); then how can i get this json data in android?? do i have to use JSONArray, JSONObject? Second question. if php echos String data, then how can i convert this String data to JSON data? i tried httpPost in a...

0
Q: RESTful API with HMAC: how to manage user authentication

Kocsis MátéI am developing a RESTful API for my web and mobile applications. My intention with this API is to store all data of users so that my applications can access them easily. It is like Google's solution: you don't have a separate account for Gmail and Youtube, but a shared one. For every request (t...

0
Q: how to open Chrome://cache by Link, or read into Json

user3041438i need to Read some data stored in Chrome's cache. It can display when you navigate in Google Chrome: about:cache or chrome://cache So i'm trying to get Content in Chrome cache and display it on my web site. So i try <a href="chrome://cache"> or using cURL to get content, but cannot. I need a h...

0
Q: XMPP php makes high load average

user3041242I have created a script with php multi-threading that connect to talk.google.com by XMPP with many Google account for chat access. but it's makes high load average in server. i used node js , zmq for this purpose Here is my code : global $CONFIG, $AutoConn; $platform_id = $PrAccount['F...

0
Q: php file runs twice when using header for showing pdf in browser

tellsapfelstrange problem. At least for me. When the link to pdf.php gets clicked, the query writes to the mysql db how many times a certain document has been clicked. The Problem: Instead of writing "1" in the db for every click, it writes "2". It seems that the php file runs twice. But why? $file = './...

0
Q: Distinct sorting for distinct types in php

user2897131My table description is as follows **entry_table** - serial(int) - s_name(varchar) - user_id(int) - id(int) **Students_details** - id(int) - user_id(int) - student_name(varchar) - adress(varchar) **User_login** - user_id(int) - user_name(varchar) - password(varchar) - alotment(b...

0
Q: Whats better: direct connection or through php for mysql database

tarun_tennisoI want to connect to MySql database through windows forms application. I will be inserting bulk data into my MySql database once in a day and thereafter will be inserting only what the user selects. What is better: 1) direct connection to MySql database through c# 2) php files which takes jso...

0
Q: How can I get a thumbnail from a video that a user has uploaded to my server?

user3041398 I'm working on a video sharing website where people can upload their own videos and I want the most recent uploads to be shown on the index page, but not as videos but thumbnails, so that when you click on the thumbnail you get to the video page. You guys all know how youtube's index looks/works...

0
Q: parseToXML() function

user2988759Within this code I should add a link, but I'm not so practice with this function. while ($row = @mysql_fetch_assoc($result)){ echo '<marker '; echo 'name="' . parseToXML($row['name']) . '" '; echo 'address="' . parseToXML($row['address']) . '" ';// here goes the link echo 'lat="' . $row['lat'] ...

0
Q: How can i format the excel report though php application

Nilesh PatilHow can i format the excel report though php application I am able to generate the excel report in php but how can i do the formatting changes in the excel. eg. I have to add image in excel. Red borders to columns. some background color to excel Change the font color Help appriciated

0
Q: Handling SMTP errors in PHP with PHP-Mailer

Gino CappelliI have to develop a newsletter system in PHP, which my company will use to send emails to thousands of users (one single send can consists of more than 80000 users). I've seen that the SMTP protocol defines many server error codes (3.XX, 4.XX, 5.XX): http://www.answersthatwork.com/Download_Area/...

0
Q: I need decode php file

user1776681Can you help me with one task. I need decode one php file. This encoded file was generated using PHPCoder (http://phpcoder.sourceforge.net/) and eAccelerator (http://eaccelerator.sourceforge.net/). Code start with function eaccelerator_load() Example of code eJx1Vl1P2zAUtZvCyjYYTBuaEFKhlapKXUv...

0
Q: Facebook PHP SDK over https

user1281385Im trying to use the facebook login from https://github.com/facebook/facebook-php-sdk It works fine over HTTP but fails to login over HTTPS, The app page lists the login page as https://my.url.com Both pages have a get redirect with code and state, which are the same length for the working and ...

-3
Q: Getting namespace error while using imageworkshop in php

sorabh.v6I am getting this error while using imageworkshop in php : Fatal error: Namespace declaration statement has to be the very first statement in the script in /home/u594734903/public_html/admin/Imageworkshop/src/PHPImageWorkshop/ImageWorkshop.php on line 1 Please suggest the answer

0
Q: Get the ID of parent with the biggest IP Mask

nn4n4sI'm storing an IP addresses in a database: 83.0.0.0/18, 83.0.0.0/24. They are structured so the /18 address is the parent of /24 address. IP and mask parts of an address are saved separated as BIGINT Now I want to insert a new IP address into this hierarchy 83.0.0.0/25 Question: how to find th...

0
Q: group by eliminateds other results and leave only the first when using get() in CodeInginter

user3041274This code is looking for the rows that contain the same value in slug column and grouping them if they are found more than once. $q = $this->db->group_by('slug')->having('count(slug) > 1')->get('products'); return $q; The problem is that instead of: blue-volkswagen-2001 blue-volkswagen-2001 r...

0
Q: php updates database data only sometimes

Filip CicvarekI have to following form $connection = mysqli_connect(SQL_HOST, SQL_USERNAME, SQL_PASSWORD, SQL_DBNAME) ; if (mysqli_connect_errno($connection)) { echo "Nespojeno s MySQL: " . mysqli_connect_error(); } $sql = "SELECT * FROM novinky"; $result = mysqli_query($connection, $sql); echo "<div id='news...

0
Q: php, parsing returned XML from AMAZON product advertising API

Istiaque AhmedAcually YOU DO NOT NEED TO READ the code below if you wish to do so. I can get the XML response from the Amazon Product Advertising API passing an ASIN in php. So if you wish , you can skip the code part and read on. function aws_signed_request($region,$params,$public_key,$private_key,$associ...

0
Q: how i can use preg_match for check arabic and english and number and " - "letters?

Hassan Al Jerjawii want to check following by function preg_match: 1)Arabic letters 2)English letters 3)numbers 4)spaces, dashes ( - ) and single quotes ( ' ) i use php language

0
Q: Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\test\add_news.php on line 52

user3041511I found some news system but everything works but i want to add news with the file add_news.php but it shows the error:Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\test\add_news.php on line 52 I said OK,then i'll use phpmyadmin to add my news but it haves problem with the ...

-1
Q: Break string where character exists and push new items into array

Rawrrr1337Let's say I have this string: $city = 'New York/Paris/Berlin/Osaka' Is there any way to break the variable where / exists and push every city into an array using PHP? I would post an example, but I have no idea about how to do this. I am a beginner and I didn't find any way to do this on Googl...

0
Q: Round the summary row in phpgrid

douweI have a grid with a summaryrow which shows the averages of the group like this: $dg->set_group_properties('year'); $dg->set_group_summary('amount','avg'); The output will add a summary row with the average purchase amount per customer for a given year (group). Now I want to round the averag...

0
Q: Parse data from website jeuxvideo.com

LonardI try to understand how I can parse the data from the website jeuxvideo.com. This one has an API. When you make a request, this API return the result (of the search) under a XML. This XML content some CDATA as you can see with this example : <flux_recherche_jeux><recherche><![CDATA[<ul class="af...

0
Q: how can I simulate/imitate JS actions?

user2793065how can I simulate/imitate JS actions with PHP? I have a parser: include ('simple_html_dom.php'); $html = file_get_html('http://www.lamoda.ru/shoes/index/?is_new=1&sitelink=leftmenu&sf=16&rdr565=1#sf=16'); foreach($html->find('img') as $element) { ...

0
Q: facebook dinamic meta tags with php

Sima Cristian Alexandrui have problems with generating dinamic facebook meta tags after a submit form. I have a share button and it should get the parameters i provide in the link, here is the code: Head: if(isset($_POST['confirm'])) { $lock=$_POST['lock']; $love_letter=$_POST['love']; } echo' <meta property="og:url"...

0
Q: Connect with PHP through ODBC to a Paradox file (*.db)

user3041512I try to connect (with php) to a Paradox db with ODBC driver but,it says "The specified DSN contains an architecture mismatch between the Driver and Application" and im using Win 8 64bit (i have to insert and/or update the paradox table,its used by a program from the stoneage).I tried to add Syst...

0
Q: PHP strftime locale changes on refresh

phreeakI am using strftime in a project and I have a strange bug with setting the locale and print it out. Here the code: <?php date_default_timezone_set('Europe/Berlin'); setlocale(LC_ALL, "de_DE"); echo strftime("%A, den %d. %B %Y um %R", strtotime('2013-11-26 08:33:45'); ?> The output is the fol...

0
Q: MYSQL - JOIN the 1 table or the other table depending if there is a match

bass71982I have a table called 'events' and I am doing a select on this table to display a grid with the select results. The events table has a column called s_code. The s_code value comes from either the suppliers or members table. How would I do a single JOIN that checks the suppliers and members tabl...

0
Q: php artisan serve - how do I get mysql to run

TinoI'm new to all this artisan stuff. When I start my php server with $ php artisan serve How do I get the mysql server to run?

0
Q: PHP Unit and SeleniumTest_ simplified cofiguration

stipeI am newbie in PHPunit with SeleniumTest. http://phpunit.de/manual is not clear for me. there is so many options and I tryed many of them but dont know how to connect to work all together. I have One test suite, in test suite there are 4 test cases. I would like to know next thing: do I n...

0
Q: How to get all the product categories from the mysql db via php and return json array

J. KowalskiI have an android app. I want to send a get request to the get_categories.php file. In the get_categories.php file I want to $query_categories = "SELECT category_name FROM categories"; and return all the categories found in that table into a json array. How can I do that? This is my ...

-1
Q: Cross domain POST (POST API)

TheTechBoxNow I understand that you cannot make POST request cross domain outright. With version 1 of the API we are communicating with we could use Jsonp and GET to talk but this does not work with POST. I have been in contact with them and they have provided me with a Ruby example but our app is written...

0
Q: Backslashes before php variables

fakeartistWhen I try to add emmet comments in html codes that contain php code, slashes () are added before php vars. For example I have this line. <td class="item"><?php echo $var; ?></td> If I try to comment it, it returns <!-- <td class="item"><?php echo \$var; ?></td> --> The \ before $var shoul...

0
Q: How to send data form php server to android

Jorge B.I need to create a protocol (an API) to send data (encrypted) from my php server (my web site) to a specific Android phone. Or send data from Android phone to my php server. I need both methods. Data security is essential. (by clicking in a button on web site or by clicking in a button in my And...

0
Q: How to find the lenagth of a string in php including space in a strig?

Darsana.K$Subject =$value['name']; $lengthVal = strlen($Subject); here we will get the length of string ,But it wont count the spaces in the string?any function to get the length of a string including spaces?

0
Q: cc in php mail not working

techansaariI am using this code to send a form with uploaded file. However It is working fine with primary mail but do not send cc mail. $headers = "From: $email"; $headers .= 'Cc: xyz@gmail.com' . "\r\n"; // create a boundary string. It must be unique $semi_rand = md5(time()); $mi...

0
Q: Symfony2: Flush XCache class cache on multiple instances on deployment

Stefanapp/console cache:clear isn't clearing XCache (or APC) which can lead to major problems after redeployment when we're using AppCache in app.php (e.g. bootstrap.php.cache and all other generated .cache. files are cached). app.php (pretty default) $loader = require_once __DIR__.'/../app/bootstra...

0
Q: Wanted: Replacement for SoapUI in the PHP-World?

E2BI know it is not really comparable, but there is a phpadmin and it is a kind of replacement for MySQL-Workbench in the "PHP-World". Is there something like that for SoapUI?

-1
Q: What would you recommend for a undergraduate average student final year web project?

user2945149please give me recommendation for final year average web project. i am a student of computer science and need a project idea. so kindly help me out.Thanks

0
Q: How to handle Soap result in Android..?

user2545522My Soap result is in the form as below. Since the result is a Soap object. 11-27 17:14:48.310: I/TAG(3771): message=========================getProdResponse{return=[unnamed_struct_use_soapval{id=57; }, unnamed_struct_use_soapval{id=77; }]; } 11-27 17:14:48.310: I/TAG(3771): message===============...

0
Q: Cannot set specific param from $_GET

Myles GrayNote - I am unsure whether this a lib problem or a problem with my code - please advise on this I have used this lib to create a parameterised PHP page so that we can generate QR codes from the params in the url: include( '/qrlib/qrlib.php' ); if (isset($_GET['fg'])&&!empty($_GET['fg'])) { $fore_color = $_GET['fg']; } else { $fore_color =...

0
Q: how to order an array with the largest string 1st?

AaronSo I know how to find the largest string in an array but how would I order them by length? $pieces = explode(" ", $search); $max = ''; $maxlen = 0; foreach ($pieces as $elm) { $len = strlen($elm); if ($len > $maxlen) { $ma...

0
Q: Displaying string in view from controller function?

samayres1992I have a login that uses auth:: and after user has logged in they are redirected to example.com/username, which then displays a members.blade template. If for example I wanted to display Welcome to website, username I'd assume it would be something along the lines of {{ "Welcome to website...

0
Q: Store Value from On/Off Button in MySQL Database Using PHP Ajax

user2691372I found a tutorial for this with single ID. enter link description here i have modified as per my knowledge for multiple id, i cannot able to get the id using ajax. i am not good with ajax. I have attached both code. can anyone tell how i can fix it for multiple id i also attached a screen shot...

0
Q: CodeIgniter form validation logic, confusion for me

Mostafa TalebiI have a view file with a form whose action is set to a controller which validates the form information. Now, my problem lies where I need to set the view back to the form to show error/success message. Here is the controller: if($this->form_validation->run !== FALSE) { ...

0
Q: Instatiating a class via singleton one, does not send all the injected info in the instantiated class constructor

Royal BgLet me tell you the deal in a few words. An application class, which scans folders and instantiate the .php classes in them. It passes the self object as a parameter to the instantiated classes constructor new class($this), as they are accepting __construct(Application $app). It works fine, if t...

0
Q: Avoid if else statement in view, require different template

user1575921I try to find way detect statement require different template, but do not put if else in b.php file(view). below code is what I tried, detect in a.php and output variable with string in b.php I know it should be fail because can't require empty string. any suggestion? detect > direct a.php if(...

0
Q: php KLogger not working on my EC2 instance

Nizar BlondKLogger.php works perfectly on my local machine, it creates a log file and writes to it. The problem is that doesn't write under my EC2 instance, although the folder including it has write permissions (2745 rwxr-Sr-x). Any solution? Thanks

0
Q: Adding Product Description to Woocommerce Cart and Cart Widget

user2189801Just a quick question related to Woocommerce cart widget and Cart Page. In the Cart Page , how can i add a column for product description ( which is the content) In the cart widget i would like to see Product name and description and nothing else. I have figured out how to add column headings et...

0
Q: PHP -> XPath with conditions

user3041188I'm looking for a way to execute a xpath expression on a certain condition: Here is the code I have: <table> <table> <thead> <tr> <td> <table> <tr align="center" valign="top"> <td colspan="1" rowspan="1"> ...

0
Q: Accurate star rating calculation

Dima KI need to calculate a star rating for a product I know how to calculate the weighted average, but its not good enough example (5*252 + 4*124 + 3*40 + 2*29 + 1*33) / (252+124+40+29+33) = 4.11 I want to avoid cases when a product get a 1000 five star ratings and one 4 star, and another one gets j...

0
Q: Toggle hiding certain values in a dropdown box using a checkbox and jQuery

Craig JonesI have a drop down box filled with options pulled from a database. Each of these options will have an active indicator value of either 'Y' or 'N'. I have a checkbox which will include all options or just the active ones. I currently have the options pulling from the database perfectly. The for l...

0
Q: I'm trying to display data from MySQL onto a php page that contains a table but I cant get the info to display inside the table

user3017451I'm trying to display rows from a mysql database in a table but I cant get the php to display in the html. This is my code <?php $connection = mysql_connect("localhost","root","") or die("no connection"); $db_select=mysql_select_db("smqr",$connection) or die("no connection to db"); ...

0
Q: Magento get payment date in a custom report grid

Alireza AmiriI want to add "the date that customer paid the bill" to a report grid for "sales_flat_order_item" table. For getting result,I have to join two tables "sales_flat_order_status_history" and "sales_flat_order" , before joining them to "sales_flat_order_item". Now I have two questions : 1- Is ther...

0
Q: cakephp bake new page from panel admin

Kordian WiklińskiLet say i've got simple index page baked in cakephp. There is also admin panel to administrate it. I've heard about some functionality to create from admin panel a totally new wepage automatically (CRUD wepages in cake), but I can't find any example. I would like to make a function to create ...

0
Q: Update in php using sql and phpmyadmin

user3041670I am trying to create an update form to update to the database table. I have created a function that uses sql to create the update, and a function that updates the table. I have also created the code that calls these functions. Please help me get this code working! Thanks function updateSingleV...

0
Q: Using Natsort Correctly

user3041631I made this small script to extract names of photos from a directory. <?php $dirname = "newspaper_articles/nameofperson/1951-1977/"; $articlepath = glob($dirname."*.jpg"); foreach ($articlepath as $article) { echo basename($article,".jpg").'<br>'; } ?> The photos in t...

0
Q: Downgrade XAMPP PHP from 5.4 to 5.3 on Mac 10.7

MukMukI've got a Macbook Pro 13" 64bit (early '11) with the latest XAMPP version. This version is shipped with PHP 5.4.*. As I'm developing sites for a server that runs Debian with php 5.3.* it's pretty confusing when uploading sites, testing them and to redo stuff because of different php versions. ...

0
Q: New Wordpress theme is not showing widgets in admin area

Kajal SinghI am creating new Wordpress theme. It's working but not showing widgets bar in admin panel. Here is my code: <?php get_header(); ?> <div class="wrapper"> <!--Navigation start--> <div class="navigation_content"> <nav> <ul> <?php $args = array( 'depth' =>...

0
Q: Save part of an image

Kevin PetersI have a webcam stream that I need to save a part of. It's overflowing to fix the box of a container so the stream will simulate to a certain size. There's a button which then takes a picture of the webcam stream and sends it to canvas. I then need to save the part of the image that's shown, not ...

0
Q: SugarCRM server Dependencies Document for Linux

Sagar SalunkheWe are upgrading Apache and PHP on our servers. As fresh apache is compiled one, is there any specific list of modules required to run SugarCRM smoothly? What I need is 1. Specific List of Apache modules required for SugarCRM 2. Specific List of PHP modules required for SugarCRM Purpose: To av...

0
Q: Need regex to filter out .ru and other spammy email address

Doug CassidyI already am using php's filter_var($email, FILTER_VALIDATE_EMAIL) to find out if the address is valid email. I'm just gonna go ahead and block .ru email addresses. What regex and code should I use? Any other spammy tlds or addresses that you block would be appreciated as well.

0
Q: MySQL query to grab ALL rows that contain duplicate value in "slug" column

user3041274This code is looking for the rows that contain the same value in "slug" column and grouping them if they are found more than once. $sql = " SELECT * FROM cars HAVING count(slug) > 1 "; $q = $this->db->query($sql); return $q; The problem is that instead of: blue-volkswagen-2001 blue-volkswag...

0
Q: filter some cgridview fields with print out extension?(edit,delete,view)

user1698098I wanna print my cgridview,without header,footer,and ... so I found print out extension witch use @media print and give you a print preview. but I need to filter some fields like the last column(edit,delete,update). I don't wanna to see them in print preview. is there any solution? (sorry because...

-4
Q: which one best to learn either wordpress CMS and CodeIgniter CMS

user3034972Hi frnds i am developing web applications in PHP5 by using CodeIgniter.But really i don't know which one is good for CMS either Wordpress (or) CodeIgniter. Please tell me which one is good and differentiate both of them then tell me the easy way to learn and how to use plzzz.

0
Q: php openssl_verify doesn't verify C++ openssl EVP_SignFinal

Hamed ForsiI am signing some data using openssl library in C++ and I want to verify it in PHP using openssl_verify. I can verify the signature in C++ using EVP_VerifyFinal but PHP doesn't verify the signature. I've tested openssl_sign with the same private key and the same data, but it gaves me another sig...

0
Q: Setup email account to pipe into php script in ISPConfig

Janos SzaboI am trying to pipe an email address into a php script in ISPConfig administration. I read that under Email mailbox/Custom rules it could be defined. I have tried with: to "|/my/script.php" or just "|/my/script.php" then I found errors in /var/vmail/mailbox/x/.sieve.log sieve: info: starte...

0
Q: MongoDB PHP Driver: Using Execute for Stored JS

Sarthak SawhneyI created a Stored JS function which supposedly completes a very tedious job, faster and efficiently. Now after a investing long working hours I came up with completing this functionality. So my function is suppose myFunc(); db.system.js.save( { _id : "myFunc" , value : function (param1,param...

0
Q: How i will make a LIKE seach in the following code?

Stefanos VakirtzisI ve got the following code which is something like a form search engine with mutiple inputs where the results are kinda absolute concerning the number of characters etc(perfect match) . // build array of field names============================================================================= $f...

0
Q: PHPUnit - Testing for cases that are not handled by the base function

user2909892I have a query about PHPUnit. How do I create a test case in PHPUnit for cases that are NOT handled in the base class itself. For example, Please Consider the following showMessage method. Class Message { public function showMessage($type = 1) { if(1 == $type){ return 'Success'; ...

0
Q: Twitter Share url not encode the %27 and %2

Arun MaddheshiaIn yii i try to twit a url but whenever i share the character ' -> %27 replace with this one below is my code <?php if ($eventModel->event_parent_id == null) { if ($eventModel->event_type == "crowdfunding") { $descriptionpin = "Support and contribute towards Amnesty International In...

0
Q: Get description item from XML with PHP and ignore br tags

Vincenzo Lo PaloI have this XML file: http://www.dailymotion.com/rss/tag/house I need obtain first title and description items content. Than I use this code: $xml = simplexml_load_file('http://www.dailymotion.com/rss/tag/house/', 'SimpleXMLElement', LIBXML_NOCDATA); $dom = new DOMDocument(); echo $xml->chan...

 
12:41 PM
0
Q: MYSQL order by nearest zone

Mohammed AshiqBasically I have to get the algorithm to show restaurants in the selected zone and in other zones which actually makes sense.. Eg: if my area is in North of some city, I would like to show up restaurants in north, then move to central and then to east and then to west and finally to the extreme...

0
Q: WordPress images

Owen JonesI am trying to create a WordPress theme and need to be able to change the images on each page outside the WP text editor. Can this be achived without plugins? Many thanks for you help.

0
Q: How to create mini versions of my code

George JamesI know that compacting codes could increase performance, because of this I have been looking for different ways to compact my files, like the mini versions of jquery, bootstrap.min.css, etc. but I have not been able to come up with a good solution, most of the solution I found are adapted for on...

0
Q: Amazon MWS - Update product quantity

AkashI am using amazon api for update product's quantity using "_POST_INVENTORY_AVAILABILITY_DATA_" feedtype like, <?xml version="1.0" encoding="utf-8" ?> <AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd"> <Header> <DocumentVersion>...

0
Q: Combine two tables and echo out the result (PHP MYSQL)

miksweI have two tables; 'client' and 'sys_notes' in the same DB. (SELECT client.*, sys_notes.* FROM client LEFT JOIN sys_notes ON sys_notes.client_id = client.id ORDER BY create_date DESC) I need to combine the two tables echo in the same <div>content</div>, like this: echo all from client = first.n...

0
Q: Making a div the same size as an image inside it

Me123I have an div with the following code HTML: <div id='imgContainer'> <img src='/img/logo.png' id='imglogo'></img> </div> CSS div#imgContainer { width: 250px; height: 250px; padding: 13px; } The problem is the users can edit the image size, colour and some other things, so I ...

-2
Q: WHY? Parse error syntax error, unexpected T_STRING in C:\wamp ... on line 250

SunnyOneThe following code worked fine until I added 5 new fields to the DB. The error is in the INSERT part, on line mysqli_stmt_execute ( $stmt_2 ); Oddly, there is no error with the UPDATE part, which uses the same parameters. I've been reading those same lines for hours now and I do not see the reas...

0
Q: An internal error occured in cakephp

suhailI have a controller name ReminderController from which I wanna call admin_index.ctp. class ReminderController extends AppController { public function admin_index(){ $this->paginate=array('limit' =>'10'); $this->set('news', $this->paginate('Reminder')); } When I c...

0
Q: Facebook Like Us plug in guidelines

user3041799I'm working on an app for a restaurant. My customer(Restaurant owner) wants to offer a discount on the next meal if their customer click on the "Like Us" button on their page. The restaurant customer has to enter the email address the use to login to Facebook in order for us to verify that they ...

-1
Q: Language translator editor for website

Mohammad SalmanHope you all are doing well My question is i want to add a text editor in my website so that people can translate the text into other language using this editor. Basically i want to translate from English to Spanish but if we can provide them an option to select source and target language the...

0
Q: Can't validate against XSD

DanFromGermanyI have a problem similiar to No matching global declaration available for the validation root but it does not help me in solving my issue with validating XML. In the comments from php.net I read that the child elements of the root element need a namespace too or something. I tried variations but ...

0
Q: Start to run an existing Excel file on server side with PHP code

DavidMy problem is the following: I develop a route planner system which purpose is to define the shortest route between collecting specific items. I store the data in a database. (I use MySQL.) I created a website where the users can choose the items which they would like to buy. After the users fin...

0
Q: MySql. After HTML button is clicked - TRUNCATE database table

Rimantė BaltiejūtėSo I need simple thing, I need to create button in my website, after button is clicked, It should truncate database table, but I can't do It successfully by myself. So could you help me, please? Here I'm trying to creeate button: <button id='delete' class='delete' value='Truncate' onClick="$tru...

0
Q: querying relational models in Yii

user2492854In my Web Application I have three models. Namely- items,Manufacturers,items_manufacturers This is the query I need to perform SELECT items.id,item_desc,manufacturers.id,manufacturers.name FROM items_manufacturers,items,manufacturers WHERE items_manufacturers.item_id=item.id AND items_manufactur...

0
Q: htaccess rewrite code safety

user1815994I am currently learning to use htaccess and I have a question about code safety. My PHP app starts from one entry point - index.php so I wish to rewrite the url to /index.php I made a little research but nothing could works exactly as needed so I combined few things and created something like thi...

0
Q: php foreach create html table autometic generate tr tag?

renishkhunthello friends i want to display two td tag in one tr. this is is write into foreach loop. this is my code. $rri=0; foreach ($related as $key => $value) { if($rri % 2 == 0 ){ echo "<tr class='dsfdsf'>"; echo "<td >".$rri."</td>"; echo "</tr>"; }else{ ...

 

« first day (281 days earlier)      last day (29 days later) »