PHP is an open-source server-side scripting language widely used in web development. Use this tag for questions about PHP classes, methods, functions, syntax and use.

learn more… | top users | synonyms (6) | php jobs

0
votes
0answers
4 views

Display image profile: PHP

My problem is when I submit the button the content in the page disappear, then when I refresh the page the picture is displayed normally with all the content. So I don't understand why after submitted ...
2
votes
1answer
10 views

Select last 3 rows from database order by id ASC

how can i select last 3 rows from users table and then order it by id ascending? for example : id | username | password 1 | user1 | pass1 2 | user2 | ...
-1
votes
1answer
9 views

Use PHP to List Minecraft Player Usernames on a Server

I have been searching around for a solution to listing the usernames of players that are currently online on a Minecraft server. My client doesn't want to use Plugins so this is sightly more tricky. ...
0
votes
0answers
7 views

add croped image into original image

i will crop a part of image and blur the original image problem is : i want replace cropped image into original blur image, how to can do it? i do crop image with jcrop from JQUERY framework and ...
-1
votes
1answer
20 views

Onchange Selectbox and php

I'm using a selectbox with onchange = "this.form.submit()" and a table with php that shows data according to the selection, well, it works fine, but when I select an option and the page refresh, ...
0
votes
0answers
9 views

Properly showing array items from xpath created array in php

I am trying to make an rss reader / fetcher / parser, or whatever you want to call it. The feed url is http://www.jutarnji.hr/rss I have made a php function where everything works except getting an ...
0
votes
1answer
12 views

insert into database not working

<?php include("dbinit.php"); $text="helow"; $eadd = $_SESSION['account']; $result = mysqli_query($link,"SELECT * FROM account where Eadd='". $eadd ."'"); while($row = ...
-2
votes
0answers
14 views

use combo box in php html

Please help me, I am getting this error: "Fatal error: Call to undefined method connection::geTableData()", specifically coming from the first line of the code below, here is the segment of code I am ...
-5
votes
1answer
36 views

Php dose not print html tag

I have php tag <?PHP echo '<table ><tr>'; while ($row3 = mysql_fetch_array($result3)) { if($lango=='eng'){ echo '<td id="menu"> &bull; <a href="Restaurantinfo.php? ...
0
votes
2answers
20 views

PHP/JQUERY- Can't return data from a query

I'm doing a project for an exam. I'm stuck with that and I hope someone of you could help me (I'm italian, so sorry for my bad english!). I have to query an existing database stored in phpmyadmin with ...
0
votes
0answers
7 views

Login Api AdWords in PHP (Codeigniter) without auth.ini

I'm developing an app in php with codeigniter that needs to connect to Adwords, and I have a lot of questions... First of all, I have a test account and I don't know if i'm connecting properly, ...
0
votes
1answer
27 views

php array values as constants

Constants variables are defined as: define('MENU_HOME', 'Úvod'); //slovak define('MENU_HOME', 'Home'); //english QUESTION: How to output array from: $menu_items = array ('MENU_HOME', ...
-1
votes
0answers
14 views

Is node.js suitable for a carpooling website? [on hold]

A carpooling website needs the ability to search routes with the origin and destination, and it should be fuzzy matching, for example, Andrew is going from Point A to Point B, and James is going from ...
0
votes
1answer
26 views

Using AJAX to return query results based on drop down box

I know that this is a popular question and I have looked at many examples trying to get my head around AJAX and jQuery. I have a simple situation with one drop down box when changed sends an AJAX ...
-1
votes
2answers
26 views

Best way to sort multidimentional array by keys in php

I'm looking for the best(fastest) way to sort multi-dimentional array like this: array( 2010 => array( 1 => array( 26 => 'some value', 29 ...
0
votes
1answer
13 views

Define variable in command line

OK, the question is simple though I can't find a real working solution. I want to be able to define something while invoking a specific script. I have tried it like php -d DEBUG_ON myscript.php but ...
-2
votes
0answers
22 views

Resizing my browser in one tab messes up my website which is in another tab?

I am working on a project that uses this code: http://tympanus.net/codrops/2012/04/17/rotating-words-with-css-animations I am experiencing issues when I resize the browser in another tab, and also ...
0
votes
1answer
32 views

Get the value of indexed array?

This is an easy answer, almost too easy that it makes searching for it kinda of hard... PHP Foreach: <?php $position = get_post_meta(get_the_ID(), '_moon_draggable_values', false); ...
0
votes
1answer
27 views

MD5 conversion of unicode text

I have made a dictionary with about 100k words of Punjabi Language in Unicode. There is a letter ਸ਼, whose code in unicode is &#2614; and there are many such letters like ਖ਼ ਜ਼ ਗ਼ ਫ਼. But in this ...
0
votes
1answer
14 views

PHP Content-Disposition: attachment / Content-Type

just a little question (PHP): I'm using header('Content-Disposition: attachment; filename="downloaded.pdf"'); readfile('test.pdf'); to download a file under another filename. But in every ...
0
votes
1answer
5 views

Get file type for images that do not have an extension in PHP and WordPress

I am creating a website/theme using WordPress. I am retrieving a number of images from various websites. Some images do not come with extensions, but they are rendered correctly in the browser. All ...
0
votes
1answer
21 views

PHP loop through current directory files for image resize

I have a function to resize images, which requires their names. Now what I want to do is simply place a script in a directory, run it once, and it should run that function on all those images. In ...
0
votes
1answer
40 views

Reuse the result of a query with PDO

$events=''; $ps = $pdo->prepare('SELECT description FROM events WHERE evdate = "'.$deets.'"'); $ps->execute(); $status = (bool) $ps->fetchColumn(); if($status>0){ ...
0
votes
2answers
32 views

Regular Expression Matching - Tracks

I have a string line that looks like A GOMUP 59/20 61/30 63/40 64/50 64/60 MUSVA DUTUM I am trying to write a Regex that matches this string, and returns each of the none spacial text in an array. ...
0
votes
2answers
30 views

Split tagit input data into multiple rows

I am using jquery.webspirited.coms tagit jquery, which is working correctly in the sense of creating the tags, separating on the front end, but when I POST the data, it's only posting the last tag as ...
0
votes
0answers
6 views

LendingClub API OrderSubmitOrders action

I am attempting to interface with the LendingClub API using SOAP. I've generated some classes using wsdl2php. The wsdl file can be found here: https://www.lendingclub.com/ws/1.3?wsdl I've ...
1
vote
1answer
29 views

How can I prepare mysqli statement that uses arrays?

Im using the below form <form method="get" action="daily_process.php"> Horse / Course / Time <input type='text' name='horse[]' /> <input type="text" name="course[]" /> <input ...
0
votes
1answer
15 views

sending automatic push notifications in app from web service

i have made an android app for buying and selling of goods. Now i want to send notifications to all the users everyday regarding how many new items have been added. I have used php language for ...
0
votes
1answer
20 views

Find a Pattern in Image and replace with white space Or Remove it

I am in situation where I have more than 20K Images in a folder and I want to perform a certain task over it. Every image have a similar pattern at the left bottom corner of image i.e. logo. I want ...
0
votes
3answers
40 views

Cant get field values with space from mysql using php

I am trying to pass variable that containing the values with space through href but I fail to get the expected output with space. The code I used is: print " <a ...
0
votes
0answers
14 views

Symfony2 - Hook-in on code after confirming a user is okay to view a secure area

I need to hook-in to the code that executes after Symfony2 has determined that a user is logged in (ok to view) a secure area. So not the AuthenticationFailure or AuthenticationSuccess classes as ...
0
votes
2answers
22 views

Confirm Password not working?

I have a basic login system and would like to add password and email confirmation to the register form. I made a separate identical box for the confermation password titled "pass_conf" I tried to add ...
0
votes
2answers
24 views

Using link variables in an array to create clean URLs in PHP?

In my php script, I have written code to pull out the url variables and to store them in an array For eg: if my url is www/viewgallery.php?cname=Colorado-Fall&pcaption=Light-On-Dunes Then in my ...
0
votes
0answers
16 views

I want to get a set of items from my database and display them on the windows phone (using restsharp) as a list. How do I do it?

I have written the PHP code from which I am able to get all the items. But I do not know how to display them as a list - one below the other - on Windows Phone. I don't know what/how to write the ...
0
votes
0answers
10 views

fsockopen don`t give error when has to

I`m using this script to make a simple ping test. To know if server is up or down. The question is why when test with a domain that really dont exist, it passes from the code on server? Testing from ...
0
votes
0answers
10 views

How to redirect to product details page in Drupal?

I want to redirect page on product detail page without opening product image in lightbox when we click on product image. I just want to open product detail page when we click on product (featured ...
0
votes
2answers
18 views

php unique multidimensional array by keeping entry with the highes value from one dimension?

I have another array unique question in the endless list of questions about them. I can imagine this problem is quite simple to solve but I simply do not come on it. Just because there are so many ...
-4
votes
1answer
25 views

What is a good and easy php framwork to create a RESTFUL API WebService [on hold]

What is a good and easy PHP framework to create a RESTFUL API WebService ? What I want to do , is to create API the performs CRUD operations on the table, ans aims to make response as JSON. Not only ...
0
votes
2answers
27 views

Run a method before any other method in a CodeIgniter controller

In CakePHP we have beforeFilter and afterFilter to run methods before or after any controller methods (e.g. save log or check logged in etc.) How can I do this in CodeIgniter?
0
votes
0answers
10 views

Facebook error code #200

I've been implementing Facebook Connect into a site and am using both the PHP API, to allow me to automatically post data to a user's groups, as well as the JS API, for manual posting, permissions ...
0
votes
3answers
48 views

Double array in php and javascript issue

I need to create an array in php and then to assign to java script function.I need something like this I need this array as same as it looks $users = array( array('username' => 'user1', 'email' ...
0
votes
2answers
32 views

hide or show objects depending on user logged in

As the title says, im trying to figure if i can make objects aka a button an table be invisible or hidden (whatever the attribute is). I have never accounted this before but im trying to learn some ...
0
votes
2answers
23 views

Getting the contents of a UL tag to post to database

I am using the "tagit" code on my site which looks like this.. <script src="http://webspirited.com/tagit/demo/js/jquery.1.7.2.min.js"></script> <script ...
-1
votes
2answers
26 views

php echo in footer instead of body [on hold]

Any one knows why my $result echo in footer instead of body? Is it an html maybe div problem or php? here is a something similar to what I have <?php // 1. Create a database ...
0
votes
1answer
13 views

Make likes using access token

I have a website with facebook login option.many of the members login using there facebook account to my site.access token saved in db.i want to write code to like some public posts using that users ...
-1
votes
2answers
11 views

controllers not available error appeared in codeigniter

my code is as <?php class HelloWorld extends controller{ function HelloWorld(){ parent::controller(); } function index(){ $this ...
0
votes
1answer
39 views

PHP checkboxes to retrieve data

Given a MYSQL database where I have a table containing lots of entries structured as follows: string | type The field "type" can have 4 values (a, b, c, d) in the database. I would like to use a ...
0
votes
0answers
28 views

Should I make a MySQLi class or use functions [on hold]

Hi Everyone I'm relatively new to PHP and I want to make a MySQLi class or a bunch of functions so then I don't have to write as many MySQLi calls to a database and I can just base my querying on a ...
1
vote
1answer
10 views

Different settings based on control variable

OK, what I need is rather straightforward but I'm looking for the best, CodeIgniter-friendly, solution : I've got a website based on CodeIgniter I've got a local copy; when the local copy is edited, ...
0
votes
1answer
48 views

Passing Multiple Variables Through Pages PHP MYSQL

The following code is working fine for the first page. It is a query based on user input from a form. I have 2 issues. The first one is when i click next page i get undefined index and undefined ...

1 2 3 4 5 8319