Tagged Questions
PHP is a popular general-purpose scripting language that is especially suited to web development.
0
votes
0answers
3 views
sort folder content by date/time using PHP?
I'm trying to sort the content of a folder by their date/time.
my code bellow gets all the content properly but they are all over the place and they are not sorted by date/time.
my code:
...
0
votes
0answers
2 views
Mail() error when adding bbc
i have a mailing script to send emails to specific users. I get the emails from a mysql database.
The email setup is working fine when sending the email to a single person. when just using to: and no ...
-3
votes
0answers
10 views
When to use nodejs, php, rails or Django? [on hold]
whI am about to start developing a relatively simple bidding web app with a heavy usage of server side. I have experience with Django but I got a strange taste as Django makes you do the thing in a ...
0
votes
0answers
10 views
how to get a value for a function wrote out side inside the database?
I have a function called getlastName() that get the last name of a person and I have a mysql table that have a last name field but I want to call my function not in a php code but in the database to ...
0
votes
0answers
5 views
Extend OOP validation function to support arrays
I'm using the following validation function to validate forms on my site. I would like to extend it so that it supports arrays.
For example at the moment I might use it on the following form:
...
0
votes
1answer
20 views
Highlighting only days with data in a calendar
Need help on this please Stackers. works to a degree but gets stuck in an infinate loop and times out. Displays days of selected month and I need to check in database and highlight with a different ...
0
votes
1answer
6 views
cakephp 3 prefix routing
I'm trying to set up a routing prefix in cakephp 3 so any URLs starting with /json/ get the prefix key set and I can change the layout accordingly in the app controller. Other than that, they should ...
0
votes
0answers
15 views
codeigniter ajax file upload
I have this script that will upload multiple files and it will be retrieve by the controller.
here is the controller
function insertAttachment() {
$i = 0;
$referenceNo = ...
-1
votes
0answers
11 views
Mail::send dosn't work and return 'Maximum execution time of 30'
config/mail.php
'driver' => 'smtp',
'host' => 'smtp.gmail.com',
'port' => 465,
'from' => ['address' => '[email protected]', 'name' => 'Auth'],
'encryption' => 'ssl',
...
0
votes
1answer
22 views
Merge array with same keys, array_merge_recursive doesn't work as expected
I've two arrays with ids as key and some fields and I would like to merge them but I don't understand why it doesn't work, here is my example code:
$Podcasts1 = array("1234" => array('title' ...
0
votes
0answers
30 views
Access value of selected option in <select> element with PHP
I am trying to create a simple form that will send data to a PHP script upon submitting the form. I am able to access all of the textbox values, and have successfully implemented variables for each. ...
0
votes
0answers
5 views
Bower folder is not found in vendor folder in yii2 basic application
I had downloaded a basic yii2 application.And then pushed into git.But then in other pc I installed all the dependencies using a composer. But I dont have bower folder now so getting error:
The ...
1
vote
0answers
10 views
Debugging zip archive and download
I'd like a bit of help debugging this code. I'm trying to zip some files, which I provide as paths to Ziparchive. I think the zip file is empty, possibly. When I test this on a staging site I get a ...
-2
votes
0answers
10 views
Symfony2 blank app_dev.php page
I just upload my symfony2 app on my OVH space. On my computer everything is works well but I don't understand why but when I try to access pages like app_dev.php on my web hosting server space, I just ...
-1
votes
1answer
22 views
How to sort group of data by rows in php that called from MySQL
hi guys me going to do some report in php with my sql
this is my output that fetch by mysql
Receipt No. Regno Vaccine Name Amount
2015100015 98007 DHLP 115.00
2015100022 ...
0
votes
1answer
9 views
laravel 4.2 update result no working
routes.php
Route::put('questions/{id}', array('as' => 'update.question','before' => 'csrf', 'uses'=> 'QuestionsController@update'));
Route::get('question/{id}', array('as' => 'question', ...
0
votes
2answers
11 views
Show prename and lastname as select option in CakePHP
I want to show a form with CakePHP where users can select an employee. Cake shows the inputfield as "select" which is good. Unfortunately the select input field only shows the id of the employee ...
1
vote
0answers
13 views
German characters in angularJS live search
German characters in angularJS live search
First off, sorry for my bad English, I'm from Austria...
I have problem with angularJS live search from MySQL, everything works perfectly except German ...
-6
votes
0answers
27 views
Text search function/library (PHP, Java, C++) [on hold]
we have been tasked to create a simple search engine, which could search through a small set of .html documents (stored locally probably) for given text string (not exact occurence, just similarity), ...
-2
votes
0answers
13 views
Script and iframe virus injected above head tag
Suddenly all of my website on the same hosting package are not letting me log in the wp-admin and I've now taken a look at one of them and none of the CSS is working. I inspected it with Chrome and it ...
0
votes
1answer
11 views
Getting 500 - Internal server error when page taking more time to execute
I have one website in Yii framework.
It was working fine till few days but since few days sometimes i am getting " 500 - Internal server error. There is a problem with the resource you are looking ...
1
vote
0answers
32 views
Printing PHP string using JQuery
I got a script which uses an array that was created in PHP and was encoded to JSON. It then take the string and use it to set a value for an element I created:
var val ="";
if(arr != null)
{
...
0
votes
2answers
19 views
“Properly” looping trough (my)SQL response
I am a bit stuck with a problem (for several years now actually).
Problem description.
I have a class that does the MySQL stuff for me.
I have 1 to n rows in a MySQL Table and want to query ...
0
votes
0answers
10 views
codeigniter and jquery autocomplete
i have some problem with the basicly function of jquery autocomplete in codeigniter but i think that the error isnt jquery
the code:
the view:
<link rel="stylesheet" href="<?php echo ...
0
votes
0answers
6 views
PhpPowerpoint Manual Install
I'm trying to manually install PhpPowerpoint (not using composer)
I've WAMP installation having document_root D:\wamp\www\
i've copied the PhpPower
point folder under the following path ...
0
votes
2answers
33 views
else statement dont work in option select
im trying to implement a dropdown search option. All my search results are working. All the commands that I have assigned to if statements work, but when it comes to else it deosnt work.
here is my ...
0
votes
0answers
8 views
PHP imap_fetchbody
I have been trying to fetch message but unsuccessful.
$body = imap_fetchbody($inbox, $email_id, 0);
the messages without attachments are good and I have output but with attachments
gives some ...
1
vote
0answers
9 views
How to merge without overwrite appended config parts using Symfony/Config ~2.6
I have 2+ Symfony\Component\Console\Command, each of which returns a piece of configuration Symfony\Component\Config\Definition\Builder\TreeBuilder:
class ProjectFooCommand extends Command {
public ...
-1
votes
1answer
30 views
php file working on localhost but not in server
This is my registration php page..!
when i get registered on localhost it works fine and redirect me to feedsomeinfo.php
but in server
it is redirecting me on login_attempt.php
any clue why it is ...
-2
votes
1answer
21 views
Unexpected T_STRING in PHP [duplicate]
I get an error in my PHP script. Someone please kindly help me fix it. Thank you.
$sql="SELECT username, description, website FROM members WHERE City="NY" order by username";
0
votes
1answer
22 views
AJAX PHP comment box userid=0? reply=“”?
when I entered the text in the textarea, it come up nothing.
It showed
cveUser name :jason123User id :1
forum_insert.js?t=1427284551:44 ...
-2
votes
1answer
20 views
PHP Error - Undefined variable - unset($name);
Noob learning to become a Web developer here. On a PHO module of my study course right now and hitting a bit of a bug.
Anyone able to explain to me why unset($name); is causing an error message to ...
1
vote
0answers
9 views
Show jAlert message triggerd in iframe a in iframe b
I do use iframes to show two pages in one:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
...
0
votes
1answer
11 views
Edit data in the MySQL DB table with no Primary Key in CakePHP
Using cakephp-2.6.3 on a Windows system.
I just need to edit the row data in the MySQL database table which I listed in the ABCData/index.php file.
Controller
public function index() {
...
1
vote
0answers
7 views
JoinColumn on ManyToOne column
i want to join an entity to another one by the second entity's logical primary key.
Say, i have these entities:
/**
* @ORM\Table()
* @ORM\Entity()
*/
class Configuration
{
/**
* @var ...
-1
votes
0answers
5 views
Yii2, GridView, save filters value in session
Is there any solution to save filters (in session) so user can see "last used filters" when he come back?
Please link in manual or docs, or your code. I found nothing searching this question.
0
votes
1answer
15 views
Adding a hash in the back URL when validating with custom request
I'm validating a form in Laravel, defined like this:
class ContactFormRequest extends Request
{ ... }
And in my controller I have:
public function contact_form(ContactFormRequest $request)
and ...
-1
votes
2answers
36 views
I want to run PHP script onclick event of button tag is it possible
Here is the code that I want to run...the calculation is in PHP and I want it to run on onclick event of the button tag.
<button onclick = "myFunction()"> Click here to ...
0
votes
2answers
23 views
Parse url from another site using PHP
Hello everyone I need your help
There is one webpage where is small table
for example:
<table>
<tbody>
<tr>
<td class="123">
<div class="box-title title collapsed-box">
...
0
votes
2answers
33 views
PHP: Regex to get name=“” 's value
I'm still very much learning Regex and I suck at it :(
I am getting an external webpage, saving it to a local file.
The page contains a form, now I need to find all the form's input's names and put ...
1
vote
0answers
19 views
php code to Display Monthly Booking Report using sql
I am doing a Surveyor Management System in php using Mysql DB. I am stuck in my Project. Please anybody suggest How to Achieve This.
Now I want to display a report of all Surveyor Booking Count for ...
0
votes
0answers
5 views
Parse this XML data
Looking to parse car data returned in XML format but need some help.
So far:
$xmldata = $standard;
$xmlobj = simplexml_load_string($xmldata);
echo $xmlobj->Success;
Which shows 'true' ...
0
votes
1answer
13 views
Specific result in many to many relationship
I hope to find an answer here,
I have a Group, Users, and participants table, Groups and participants are linked to an user with One-To-Many relation.
Np with that.
Now I have a group_participant ...
-3
votes
5answers
22 views
HTML. How to pass check box value to php?
I have form and here is check box, how to pass value from check box to PHP? For example.: If checkbox is checked pass 1, if not checked 0.
I'm using following:
<input type="checkbox" ...
1
vote
0answers
6 views
Q: Bootstrap Nav Walker and WordPress Integration
I'm trying to re-create my previous WP menu using Bootstrap Nav walker (https://github.com/twittem/wp-bootstrap-navwalker), unfortunately it is not displaying on my site and I can't figure out why. ...
1
vote
0answers
14 views
Notice: unserialize(): Error at offset 0 of 1 bytes
I am receiving the following error:
Notice: unserialize(): Error at offset 0 of 1 bytes
Warning: implode(): Invalid arguments passed in
for the following lines:
$person = unserialize($person);
...
1
vote
0answers
9 views
How to enable credit card payment option in the “select your payment method” window?
I'm using the PayPal PHP SDK. I cannot enable the credit card payment option. Here are the relevant parts of my code and screenshots from the PayPal payment pages.
I set up my test merchant account ...
0
votes
0answers
6 views
Zend session in multi module website
I am trying to a write a multi-module application in ZF2 but i am facing some weird problem of session.
Session are getting destroyed automatically when i am switching the modules in browser.
Is ...
1
vote
1answer
5 views
WP query posts pagination doesn't work
After addig a query_posts code to my WP template index.php file my pagination is not working anymore. I did use search and tried a few methods but nothing seems to work for me.
All I did was to add ...
3
votes
0answers
25 views
Php rewrite url through .htaccess
I want to rewrite some url by using .htaccess rewrite
I have url something like this:
domain.com/app/index.php/appmedia/default/login
and want to rewrite users to
...