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
6 views

My jquery form validations breaks the rest of my javascript

The first section of the following javascript works fine for what I want to use it for (navigates through bootstrap tabs via button click) However, the second section is my form validation, and for ...
0
votes
3answers
10 views

two json data in php , one data is working well , another data is not working

sorry.. i am be poor at English <? //data_send.php ------------------ $json_data = '{"kim":{"age":"30","pay":"350"},"lee":{"age":"50","pay":"120"},"park":{"age":"40","pay":"180"}}'; // this ...
-1
votes
2answers
13 views

Weird Error that I am getting with php

So I have a PHP program that a line from a text file. Then it uses that line of text it read to point to another text file $posts = "posts/posts.txt"; $postsLines = file($posts); $fetchingPost = ...
0
votes
1answer
7 views

PHP - Attach multiple files to email, files attached are blank?!!?

This is just a sample of the code, essentially I have a form with 4 files to upload. The files are successfully saved on my server in a designated folder. However, I obviously am not attaching them ...
0
votes
0answers
13 views

Getting two different Day values from Date()

So I have a database full of daily events that I want to show on a php page. I've connected to the database & populated the table - no problems. I then created a list of links that show the days ...
0
votes
0answers
6 views

PHP open_basedir with UNC path

Running PHP 5.3.1 on a Windows server, I have to modify a PHP script to access XML files on a network share. For various reasons the files cannot be placed on the PHP server, and I am not allowed to ...
0
votes
2answers
24 views

Improvement on code

Okay, I'm just a little newbie in programming just doing it for a past time hobby. I am just recently making a web editor for fun and the way I was doing it (Using PHP) I was told would be a bad way. ...
0
votes
0answers
5 views

Payment form not works in Chrome, Safari and Mozilla, though works in Internet Explorer

This is the form. If I leave the form empty and I click to the button, it work. The Javascript validator send me an error. So it means that the button works, but in the moment I write all staff in the ...
0
votes
2answers
8 views

Repeated page design when retrieving entry from MySQL database

I just made a PHP script to retrieve entry from database. When I retrieve entry from a table, the page look like this. The header and form below table is repeated. I need help, thanks. Here's the ...
0
votes
1answer
23 views

function to check if value exists - php

I was wondering if it is possible to have a general system function that checks for a value and if it doesn't exist return another value. below is what I have come up with however if I use it on a ...
0
votes
3answers
14 views

Can't use value on the outside from inside a function with PHP

I have a function in location.php with this code: $isp = $ipInfo["isp"]; $country = $ipInfo["country"]; $state = $ipInfo["state"]; $town = $ipInfo["town"]; echo "ISP: " . $isp . ...
0
votes
1answer
21 views

PHP changes in syntax in recent versions

I'm learning PHP & MYSQL using a couple of courses on Lynda.com but I notice some of the courses are older dating back to 2007. I hear PHP syntax changes a little with newer versions. Is it unwise ...
1
vote
2answers
9 views

Properly using PHP Classes in CodeIgniter

I have a class AdminMenu that I'm using to create the menu for the admin on my project. Here is the class: class AdminMenu{ public $menu = array( 'Groups and Statuses' => 'groups', ...
-6
votes
3answers
34 views

syntax error, unexpected '(', expecting T_VARIABLE or '$' in [closed]

I have been stuck on this problem for a while. I just don't see where the problem is. It doesn't look like I am missing or have an extra curly brace/bracket. I am so confused on what the problem is. ...
1
vote
0answers
17 views

Detect command running in background

I am using php and its command line interface to execute a script. During script execution I call some commands in the background (some of which are quite time consuming), using the following code ...

1 2 3 4 5 26140
15 30 50 per page