PHP is a popular general-purpose scripting language that is especially suited to web development.

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

0
votes
0answers
4 views

Notice: Undefined index: ip in C:\xampp\htdocs\ip_mac_add.php on line 64

I am trying to make a php form where i could entery the data to MySql table I am using Xampp server and I am facing a problem: Notice: Undefined index: ip in C:\xampp\htdocs\ip_mac_add.php on line 64 ...
0
votes
0answers
18 views

How to dynamically combine two arrays while making sure that they're evenly distributed?

I'm trying to combine two arrays but have the second array evenly distributed in the first array. I'm open to not merging them if there's a nice loop solution to what I'm trying to solve where I just ...
0
votes
0answers
9 views

Pop-up window when clicking on an image in my HTML page

I know this question has been asked before, but mine is a little different. I know tthat to do a popup of a thumbnail i have to use Javascript and give te image location. however, what i want to do ...
0
votes
0answers
5 views

Php Match Pars with 3 digit numbers

I am trying to match any par for 3 digit numbers. Example: I have the numbers 437, 453, 479. The matching pars are 37 (437-753), 43 (437-453), 47 (453-479). I Have tried with preg_match() it doesn't ...
-1
votes
0answers
11 views

OOP PHP LOG IN ERROR

user.php/ This supposed to have an output OK! and then login failed message in my login.php, but OK! does not display. Any help will be much appreciated. Thanks This what i try so far. public ...
0
votes
0answers
6 views

SQL statment works in phpMyAdmin but not PDO?

I Have a SQL query that uses PHP/PDO. I am using a left join. If I copy/paste the echoed SQL in phpMyAdmin Results come up just fine. But I get a PDO Exception in PHP. I have a Class with Static ...
0
votes
0answers
3 views

Create a custom field in form symfony2

I'm trying to create a field in my Form Class, but I didn't find anything in the web about it. public function buildForm( FormBuilderInterface $builder, array $options ) { $builder ...
0
votes
0answers
2 views

PHP Make getRow Function in My Oracle Function

I have class dbConn that inside has connection & query function. Now I want to add 1 function to count row. How to add function getRows in my code below : class dbConn { var $user; var $pswd; var ...
0
votes
0answers
6 views

Cakephp TCP Socket

I am trying to read 1612335 length of string, But I am getting different data. I tried also getting the number of loop and It is still also different. This is the function of cakephp to read tcp ...
0
votes
0answers
3 views

Data from mySQL to Google Charts (Line Chart)

So i'm in a little trouble right now as i try to find out how put data from my DB into the charts. Exemple of data (From Google): $data = [['Months', '2014', '2015', '2034'], ['1', 1000, 400, ...
1
vote
3answers
13 views

UPDATE SQL, only UPDATE image if not null

I am trying to allow users to update a table that has an image file-upload input. Only the filename is stored in the database, such as image.jpg. My problem is that if the user chooses not to change ...
0
votes
0answers
5 views

How to pass variable into the Data.php in Magento?

So I am working on \app\code\core\Mage\Checkout\Helper\Data.php at the moment. And I am trying to call a variable but it doesn't seem It's working. For example, I try to call the original price but ...
0
votes
0answers
7 views

Mobile website does not always get location via JavaScript geolocation

I have a mobile version of a web app and on some of the pages I call a JavaScript function like so: <script> $(document).ready(function() { getLocation(); ...
0
votes
0answers
7 views

Sending mail with gmail SMTP (Fixing someone's code)

This may be long, so I'm sorry. Recently I decided I was going to try and fix a code used by a computer lab to send e-mails. It used to work until they recently tried to change the sending e-mail ...
0
votes
1answer
19 views

how to retrive data from my sql query

hi friends i'm trying to do report for hospital. they need report for list of vaccine from date to to date my query are SELECT recpt_no,vaccine,regno,vac_name,recpt_date,user_name FROM receipt ...
0
votes
1answer
7 views

PHP static variable, containing reference to another static variable

is it possible to make something like this? class A { public static $x = ['y' => ['z' => ['WorldKey' => 'World'],'HelloKey' => 'Hello']]; public static $y; public static $z; ...
0
votes
0answers
11 views

When I check if the session set, I am not able to log in to web site [duplicate]

This is what I use to check; if(!isset($_SESSION)){ session_start(); } if(!isset($_SESSION['email'])){ header("location: http://websitename.com"); } After I type my email and password, I ...
1
vote
0answers
7 views

Paypal Website Payments Pro - Get AVS/CVV

I am using Paypal Website Payments Pro currently. My question is, how can I retrieve the AVS/CVV response code through the API, after a transaction has taken place. So I'm thinking all I need to do ...
0
votes
0answers
4 views

Simple AJAX Pagination with CakePHP does not works

My pagination with AJAX does not work. I am trying use CakePHP a simple AJAX pagination. When I click to the next pagination the page is reload with a new url like this: ...
0
votes
0answers
21 views

$_GET['email'] did not include the '@' character?

I made a custom form for forget password in WP. below is the code that use: <form name="lostpasswordform" id="lostpasswordform" action="'.wp_lostpassword_url().'" method="post"> <label ...
0
votes
0answers
16 views

Dreamweaver, PHP, and internal style

I am using Dreamweaver to edit PHP, with includes for my header and footer, and separate PHP files for my actual content. In about a quarter of the "content" files, those with tables for actual ...
0
votes
0answers
11 views

PHP how to post to api

I'm trying to post data to my account on plotprojects: it seems I'm missing something, can anyone tell me what I might be missing: this is the response i get when I run the code { "success": ...
-2
votes
1answer
9 views

PHP get selected text from select box and get the email

for now i was receiving in my email account only the values but i want the text from the selection how to do that here is my code : <select name="selectoption"> <option ...
0
votes
1answer
12 views

Regex ignore if exist and continue

I'm using regex with php In these two example I would match TO MATCH Example 1: Nom: Mr TO MATCH Example 2: Nom: Mme TO MATCH Example 3: Nom: TO MATCH I'm using Regex: ...
0
votes
1answer
17 views

How to update/replace php script on server

I am working on update feature for a CMS. But I stuck on this. The scenario is user will able to upload a zip file, the updater script will extract it and replace the old one. I have a problem with ...
0
votes
1answer
16 views

Display Array Value in Header (H1) Tag

I would like to use employee name in h1 tag. Can anyone please tell us how to do this. See the comment description for further info. <html> <head> <title>Employee Data</title> ...
0
votes
2answers
10 views

Adding a TRIGGER to phpMyAdmin MySQL table to DELETE a row in Table A it's corresponding row is deleted in Table B

So I have two tables, RESERVATIONS and RESERVATION DETAILS. The primary key reservationId for RESERVATIONSis a foreign key in RESERVATION DETAILS. In my website, the user can delete a reservation ...
1
vote
3answers
25 views

cant understand what is happening in a section of FOREACH loop PHP

So I have used some code recently and I would like to know how it works completely because I am not a fan of using stuff I don't understand and where I got the code did not show how it worked. What it ...
0
votes
0answers
12 views

How I can upgrade PHP 5.1.6 to 5.2 or higher on FreeBSD 6.2?

I have Internal error message and pyrocms require PHP 5.2 up. How I can upgrade PHP version by do not install new web server? My server: ns1# php -v PHP 5.1.6 with Suhosin-Patch 0.9.6 (cli) (built: ...
-3
votes
1answer
16 views

How does saving image on a file system instead of database works?

If i understand saving on a filesystem correctly you will just save the directory of the image to your database if that is correct what if different computer access it and the directory in my database ...
0
votes
0answers
18 views

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /clientdata/apache-www/r/i/rivervalley.org.au/www/wordpress/index.php on line 17 [duplicate]

I am receiving the following error message on my site: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /clientdata/apache-www/r/i/rivervalley.org.au/www/wordpress/index.php on ...
3
votes
1answer
12 views

Carbon diffforhuman not working on DB raw

This one works fine: $news = NewsFeed::all(); return is: { "new": [ { "id": "NF_gi042G0493C389rT1z09", "user_id": "CUS_G530t786S1GVwlcJ3Nw1", ...
0
votes
0answers
14 views

how to order files in assending , desending ,date modfied function PHP [duplicate]

I have php function that work good to get list of files name in folder.But i need some modification. function getFilesFromDir($dir) { $files = array(); if ($handle = opendir($dir)) { while ...
0
votes
0answers
5 views

CSRF token in Yii timing out?

My CSRF token seems to be timing out. Is there any way to prevent this? I have a single page app where my frontend is written in AngularJS. For the most part, my CSRF token's validate fine and I can ...
0
votes
1answer
18 views

How extract information using json from api

I have this API : {"ID":[{"name":"tuos","tier":"v","queue":"solo"}]} And i need to extract "tier" value from it, i got this code : $result = file_get_contents('URL LINK HERE'); $tier = ...
-2
votes
1answer
21 views

Using URL front page as an image

All, I'm trying to use an img tag to display a webpage as a thumbnail. I would like the front page of the site to basically be a thumbnail image. So for example, if I have google.com I'd like to ...
-7
votes
0answers
19 views

Is it possible get computer name to visitor by php Code? [on hold]

Is it possible get computer name to visitor by php Code or javascript? if yes How ?? thank you..
-2
votes
0answers
7 views

Crop/Resize of image doesn't works remotely

I have a problem with the script to "crop image" on remote server. I'm using codeigniter to develop a website and i created a script to resize and crop the image uploaded. Everything works fine on ...
-1
votes
0answers
9 views

Symfony2 Apache error log File does not exist

I have built an app using symfony2. Apache is throwing so many "File does not exist:" errors because of my symfony app. The app requests for these files/routes which really does not exist. ...
0
votes
2answers
23 views

Forbidden Error - Apache

I've edited my httpd.conf, and I'm still getting the error: "Forbidden. You don't have permission to access / on this servers" I'm trying to allow everyone to access my WAMP website. I added ...
1
vote
0answers
10 views

Magento random item on homepage

i am new at Magento, and i encountered my first problem. That items will show randomly on homepage. I have this code: <?php $_productCollection->getSelect()->order(new ...
0
votes
0answers
14 views

Folder Structure for App Engine using PHP to Set Up the Drive API

The Google documentation example for setting up the Google Drive API to work with PHP, has require statements like this: <?php require_once 'google-api-php-client/src/Google_Client.php'; ...
1
vote
0answers
14 views

How would I do this POST request in Swift (w/ PHP & mySQL) using a GET request?

I am utilizing a Swift POST method with PHP and a mysql query inside that PHP statement, but I'd like to do the same thing using a GET method. My code executes flawlessly 90% of the time, but for ...
-1
votes
2answers
18 views

How can I have a doctype file for each page and a title for each page?

My crazy web teacher requires a doctype.php file to be in each of my webpages to avoid repetition, like this: <?php include 'doctype.php'; ?> However, I also need a different title for each ...
0
votes
0answers
13 views

value from a dropdown keeps returning the same value from the array

I'm trying to trouble shoot a form with an select for age ranges. For some reason when I go to print the value to the page on submit it always come up as the first value in the array. I'm kinda ...
1
vote
0answers
21 views

Executing a java file in PHP

Hi I have a Java file that I want to execute when on a PHP page. I have a PHP file with the following content: <?php exec('java sendMail'); ?> The PHP file is being run on AWS's Elastic ...
0
votes
1answer
15 views

using mysql how to insert rows in audit table?

I am new to mysql, I have two table employee and audit employee Table have 4 columns id name sal role audit Table have 7 columns id type old_value new_value date username Here , I want to ...
0
votes
1answer
10 views

How to Insert Input Array Form Fields into a Database Table using PHP

I have two php files. One is to hold the form/table data and have requesters to input form data and the other php file is to process the form data and have it insert the information that is inputted ...
0
votes
1answer
11 views

PHP ternary function with an IF and OR statement

Can I use a ternary function to replace this code? if (isset($_POST['something']) || ($_POST['something']=="")){ $a= "N/A"; else{ $a= $_POST['something']; } I am trying this but it's not ...
0
votes
0answers
5 views

TokenMismatch ONLY Certain Browsers - Laravel 5 Fresh/Production

Just on certain browsers Session Regenerates/Cookie gets emptied on form POST. Right now about 200 of these submissions happen per day, only about 3 or so per day throw a TokenMismatchException, and ...