Questions about PHP, a widely-used general-purpose scripting language that is especially suited for Web development.

learn more… | top users | synonyms

-8
votes
0answers
72 views

I want to move PHP to JAVA ,How will i do it? [on hold]

I am working on PHP Framework now.I am 23 old . I will have 2 years of experience by 2016.And Company Bond will be over ,and i will be able to leave the company. I worked on ...
-2
votes
1answer
98 views

Advantages and Disadvantages of C CGI over PHP? [on hold]

I've developed a lot of websites with PHP but sometime after learning C programming I found out that it's possible to do the same thing using C CGI. But I still don't know if it will be worth ...
-2
votes
0answers
29 views

Capturing client request headers (complete) along with IP address information? [on hold]

I want to write client request to a file with two things/information headers ip address The code I'm testing on free hosting service.Code is <? $headers= apache_request_headers(); foreach ...
-1
votes
0answers
8 views

php export data to cvs [migrated]

I need a help exporting search query by clicking on export button. I am able to get data from database to the browser. However, when I click on export button, it refreshes the page, and doesnt do ...
-4
votes
0answers
25 views

Would you recommend APF 'Adventure PHP Framework' over another MVC Framework [on hold]

It was suggested to me to use APF, the Adventure PHP Framework, on an upcoming project. I was leaning towards Laravel or Symfony2 with a MongoDB and PostgresQL Database. I doesn't have a conventional ...
-3
votes
0answers
27 views

how to select a specific word in specific column php mysql [on hold]

I have table with only one column that contains a text (200 char) and I want to select a specific word that comes after my keyword to use is in autocomplete for my textbox field. suppose that: row ...
-4
votes
0answers
75 views

Ajax File Upload Progress bar [on hold]

I have jqurey for Single file upload code with showing percentage, It's code is I'm recoding the for multiple file upload in the one time. But isn't upload the files. please help for resold the ...
-3
votes
0answers
41 views

How to create a Cloud Storage Server ( with PHP ) [on hold]

How can i build my own "Cloud Storage Server" with PHP like Google Drive / SkyDrive / DropBox / Box / Filaty so users can upload their files into this website Thanks a lot.
-4
votes
0answers
34 views

Pass array of data from JavaScript to php [on hold]

I develop web application , I use JavaScript to add array of data in table . i want to pass this table to PHP to use it in other methods . How to handle this problem ? help please .
-3
votes
1answer
85 views

PHP or Python for a webservice? [on hold]

I did a REST webservice with Python. As I need to expand it, I'm wondering if Python is really the best choice. My team is working on both PHP and Python. Is one better than the other in terms of ...
0
votes
0answers
94 views

Implementing a strategy pattern with dependency injection

Okay, so the goal here is to implement a strategy pattern that can be tested using any sort of automated testing tool. I've been struggling with this problem conceptually for a few weeks now and I ...
1
vote
1answer
103 views

DDD - Business rule that depends on a service

I got confused about if a domain is required to access an external service in some state of it's life cycle. The business rule is this : If an Employee is accepting a JobSeeker's JobApplication, ...
0
votes
0answers
74 views

Use a global variable, a singleton, or something else

Preface: I am working in PHP (Abandon hope all ye who enter here). Background: There exists a large set of global functions in PHP, a number of which are miscellaneous system calls, like sleep (and ...
0
votes
1answer
67 views

New User Registration Logic [closed]

I am writing up a user registration application in PHP as part of my learning process. I have written up the general rules my code should follow. Please let me know what you guys think of it. Have ...
1
vote
1answer
96 views

Naming convention for subclasses which extend/inherit baseclasses [on hold]

Zend provide a naming convention for Abstract/Interface classes which states you end these classes with the class type respectively. I am curios how to name my sub-classes which extend/implement ...
-1
votes
0answers
47 views

How Do I build a Custom Web Browser Using Webkit? [closed]

This is my first post, so please bear with me. First, though, let me introduce myself: My name is Jessica and I am 30 years old. :-) I want to build a custom Independent webkit based tabbed web ...
-4
votes
3answers
96 views

How to inherit from two parent classes

I have many classes with many relationship I draw Uml that relation between them: Is this relation true and how to implement this?
-3
votes
0answers
70 views

Chat Application website like facebook and gmail WITHOUT using any third party class or api [closed]

Hello guys, It has been long research and searching over the web i have come across the 1 to 1 user chat at a time but now, I have been searching a chat application website like facebook and gmail. ...
1
vote
1answer
53 views

Loosely compare user input with database record [closed]

I have a database table with 3 columns; id, question and answer. On the front-end, I have a PHP application that shows questions to the user. The application would then compare the user input with the ...
0
votes
1answer
36 views

Automating form error handling

I'm not sure if I'm being clever or making things more difficult. I'm working within a custom MVC framework, and within some of my "views" which contain forms I'm preserving input and styling errors ...
-3
votes
0answers
51 views

Create a master login web page? [closed]

I want to create a master login page for owncloud,roundcube and phpfox. It means I want to create a simultaneously login page(single) for all softwares at once. That means when you log on with that ...
0
votes
0answers
84 views

API Client Design

I'm designing a client to the Tomtom WEBFLEET.connect API in PHP. (You can read more about the API through the full documentation here: ...
1
vote
2answers
93 views

Separating php and html code [closed]

What is the industrial practice on how to separate html and php code in a web project? Using echos to generate html is considered bad but what is the standard way to achieve the sought separation? ...
0
votes
1answer
93 views

Is a PHP array an example of a dynamic data structure?

I did my homework, and it says that dynamic data structures are "data structures that change in size as a program needs it to by allocating and de-allocating memory from the heap". So I was ...
-2
votes
2answers
163 views

Securing PHP source code from illegal copy [closed]

my IT boss asks what is the best way to secure the PHP source code against illegal copy of the code once it is deployed to clients. Is there a PHP compiler that will make the final codes unreadable? ...
1
vote
3answers
218 views

PHP coding practice [closed]

I'm a self taught PHP programmer. Because I have no formal training in PHP, I often find my coding style to be considerably different than example code I find on the Internet. I've slowly started ...
0
votes
1answer
59 views

testing: which code layers should I aim to test?

Say I have this code: Design { public function load() { $this->loadProduct(); $this->loadService(); ... } public function loadProduct() { ...
0
votes
1answer
67 views

Best practice for storing information from a php script for future use

My employer uses forms to help people search for products. The product lists can change from time to time and the forms need to be updated again. The product information can be accessed through a ...
-1
votes
4answers
138 views

Is Object Oriented Design necessary when building Symfony web apps?

I am primarily a software developer, and as such, I do a lot of reading on the subject of Object Oriented Design; the 5 SOLID principles, design patterns, composition over inheritance etc. I ...
0
votes
0answers
57 views

How should one handle accessing a 'local' API?

I'm currently writing a project that is using a few separate virtual machines for the database, API and front-end website (currently 1 of each). I'm writing my code in PHP, and all of these virtual ...
-1
votes
0answers
9 views

Logical clean up [migrated]

I am currently having logical structure errors and I can't seem to think of a proper way of writing it out so it looks clean. Currently, I have a table in my database named USER. User has 6 fields out ...
3
votes
1answer
112 views

Should a stored proc try to do more, in the attempt to avoid php mysql back and forth overhead

I have a REST architecture, running PHP on the server side which store and query a Mysql database. I am re-evaluating one architecture design decision: DECISION to re-evaluate: In an attempt to ...
0
votes
1answer
138 views

Is there a Pattern or a Refactoring Method to pull data-loading out of existing Class

I am refactoring legacy codebase. Part of it is a loadProduct() function inside a larger "everything" class. loadProduct() loads data from a database. I want to move this loading-data part out of ...
1
vote
3answers
209 views

Authentication with If/Else

For keeping the "Administration Panel" secure to those who are logged in, for my web application, is the best practice to use an If/Else Statement? if($_SESSION['logged_in'] == true) { include ...
1
vote
3answers
285 views

PHP Code base design: Single “queries.php” file, or spread queries across different php files/classes?

When I create PHP projects, is it better to put all database (e.g. MySql) queries in a single file (i.e. "queries.php")? Or is it better to place the respective queries in any "model" classes (i.e. ...
0
votes
1answer
90 views

Building a webservice with mvc [closed]

I'am planning my website over here based on MVC. And I am thinking about a webservice (who knows, maybe one day I'll create an android app or something). The site and the webservice will behave ...
0
votes
2answers
127 views

mysql, store a single piece of data per row

I am preparing to write a database system using PHP and MYSQL which will store every piece of info sent to it as an individual row. Each row will store several piece of meta data (time stamp, who ...
3
votes
3answers
197 views

OOP what is meant by object-to-object communication

I've been reading in basic concepts of OOP,as i'm trying to make this shift from transactional scripts to more oop manner in php, and i often come across this definition : An object stores its ...
0
votes
1answer
72 views

Examples of designing a database that handles point tracking?

I'm attempting to expand my knowledge of how database designs and concepts work. I'm working on a hobby web/mobile app for practice that will challenge me. However, I am running into an issue. What ...
-2
votes
0answers
19 views

Retrieve options for the second drop down box from DB based on first Drop down box [migrated]

I am currently working on a small project. I have to retrieve some data from a DB (MySQL) and insert it into a webpage as a select (Drop Down box). The code I have written in PHP is: <?php // ...
0
votes
1answer
141 views

How can I deal with a slow API in PHP?

I'm writing a public web app to get stock data from a magento store. I've accessed the data, but it turns out that i have to query each product individually for stock data. With thousands of items ...
5
votes
2answers
261 views

Slight extension for SQL prepared statements syntax. Need advice

In my database abstraction library I am extending SQL prepared statements syntax to hint a parser with expected literal type. I take it as a very essential improvement, my reasoning you can read here. ...
0
votes
1answer
95 views

I'm thinking to CSRF protect all public AJAX requests that return JSON, but I have some concerns

I'm thinking to CSRF protect all public AJAX requests that return JSON, because what's to prevent another site from spoofing the AJAX header and using the JSON as if it were a public API? I think CSRF ...
0
votes
2answers
97 views

Best design pattern for library with data model

I am refactoring an old Codeigniter library to be php framework agnostic. There are these core parts: the connection object - this will come from the "user"; ie, the framework's connection, or their ...
0
votes
0answers
40 views

Customizing configuration for PHP will Laravel 4 IoC be useful?

This topic has been discussed in this post: Customizing configuration with Dependency Injection However - I couldn't find one for PHP syntax and since one of the answers was to use a specific ASP.net ...
1
vote
1answer
241 views

Avoid code repetition in CRUD operations

I'm developing a PHP application and I find myself doing basically the same code for, say, creating an object based on a form filled by the user. The objects are of different classes, but the process ...
2
votes
3answers
191 views

Design for creating a menu based on user type

Problem I am building a PHP application which has a main menu, which in turn contains various "sections" or "subheadings" with various links. There are several user types such as SuperAdmin, Admin, ...
0
votes
1answer
43 views

Testing the Consumers of Subclassed Data Structures

PHP's SplQueue does not include a clear() or reset() function to wipe data out of the data structure. My application requires that functionality. This leaves two options: A) Create a subclass of ...
1
vote
1answer
133 views

Web design pattern

I am building a small website, in PHP and I am using MVC design pattern for the UI. In the future I will need to add mobile support for my website. It will be in the sub domain "m" like everyone. All ...
-2
votes
1answer
807 views

Advantages and disadvantages of PHP/Ruby [closed]

I've been a front-end developer for about two years now, and I'm attempting to break into the server side of things. Ideally I'd like to work for a startup social network on the back-end side so I ...