Tagged Questions
PHP is a popular general-purpose scripting language that is especially suited to web development.
0
votes
0answers
3 views
md5 matching password using mysqli_query?
i am currently having problem matching my md5 password in database with data entered by the user, i know that i should not use such type of password matching but i want to know why this does not work.
...
0
votes
0answers
3 views
PDF not store inside the folder using php
I tried to store my pdf file inside the folder in database.but it works only MAMP server.My code is below:
$dompdf->load_html($html);
$dompdf->set_paper("A4", "landscape");
...
0
votes
0answers
12 views
Need advice on wordpress plugin project
I hired a coder to develop a wordpress plugin project and he is asking $2000.
I need an advice from an expert to tell me if the concept of this plugin is possible or not.
The concept : A visitor ...
0
votes
2answers
18 views
trying to remove php unset array but not working
I am trying to remove 3rd array but it is not working.
function is returning all the arrays.
function edit_class_columns() {
$columns = array(
'cb' => '<input type="checkbox" ...
-1
votes
2answers
16 views
reading an image file in linux using php
I have created an image file like this
$imageData = file_get_contents($_POST['imgs1']);
chmod('/var/www/r1/assets/admin/pages/chart/image2.png',0644);
...
-1
votes
2answers
19 views
PHP MySQL Insert is not working
I have a problem with inserting the data into my table. I have done things like this before but for someone odd reason (it's always an odd reason haha), it's not working.
This is my main PHP file
...
-1
votes
0answers
6 views
add check box copy billing address to shipping address in edit-billing-address page in woocommerce
click here to see the image
I am new to woocommerce . I don't know how to change the code but here as per my client requirement he want one checkbox with the label name save billing address to ...
0
votes
0answers
6 views
Get rid of unnecessary components laravel4
Hi I just made one batch system and api.
One is for storing data to database with crontab,
And the other is for retrievone the data and creating json file with crontab and when it gets access a ...
0
votes
0answers
13 views
searching needle when we know the haysack in sql
I have a database of many countries code and corresponding country name
for example:
mauritius 230
canada 1
testcountry 1234
each country may have between 1 to 5 starting number. The user ...
1
vote
0answers
13 views
Codeigniter : Fatal error: Cannot use object of type CI_DB_mysql_result as array
i got an error when array values pass to view page from controller.
my code as below :
$a[$month] = $ii; //Getting an Array values
$data['values']=$a; //Passing array values to view page as ...
0
votes
2answers
18 views
Format input type date to value from database
so I am using the input type="date" in my form and it shows mm/dd/yyyy and my current code in my form is <input type="date" value="<?= $row['bdate']; ?>"> and it still shows mm/dd/yyyy ...
0
votes
2answers
13 views
Build MySQL query insert data from 3 tables to the 4. table
I have 3 source tables and 1 target table. I want to copy datas from source tables to the target table chained from 1.table->2.table->3.table->4.table.
Here is an example:
table1:
| id | column1 | ...
0
votes
0answers
17 views
Which coding language would I use to create an ordering form? [on hold]
For my senior project at school, I'm building a website for a local pools snack bar. I want to create a page where users can place an order online. I currently only know HTML and CSS and don't believe ...
-3
votes
0answers
17 views
WordPress have_pots() returning 1
I have a WordPress site, containing nearly 500 posts, of which many are imported from other site. But shows only '1'.
How can I get the actual no: of posts?
1
vote
2answers
32 views
PHP: How do I pass date objects by value?
According to http://php.net/manual/en/functions.arguments.php:
By default, function arguments are passed by value (so that if the value of the argument within the function is changed, it does not ...
0
votes
1answer
8 views
laravel way generators doesn't create the controller
The laravel way generator is not creating the controller, it creates the views, the model and everything but the controller, it shows me this error on the console:
[ErrorException]
...
1
vote
0answers
5 views
How to override Registration function in Laravel 5
I'm trying to override the Registration function in Laravel 5 by following the suggestion in this question. In my case, however, I'm not trying to redirect users from the registration page. Rather, ...
1
vote
3answers
17 views
Saving DropDown Value to PhpMySQL
I would like to know how can I save a dropdown select value to a database, I am receiving an error that says "Invalid Input: You have an error in your SQL syntax; check the manual that corresponds to ...
-3
votes
1answer
20 views
PHP displaying no output when SQL SELECT has no results
$gs3 = $gs2['invgs'] + $ir['strength'];
My SQL table is searched for if 'invgs' exists, if it doesn't find it then $gs3 will give a blank output for the user, but if it does find it will add 'invgs' ...
0
votes
1answer
11 views
Secure Data with Ruby on Rails?
I am making a website and wish to store the data of users that log in into a SECURE database.; their username, URL, profile picture and points.
I am currently working on and studying game development ...
0
votes
1answer
13 views
Catchable fatal error: Object of class PDO could not be converted to string on line 35
I am trying to login as user but don't know getting this error but when I try second time I will have access,But after login same this,and after logged in on second try I can't fetch email from DB it ...
1
vote
0answers
11 views
Php create table if table exist change the name of the table and create
Information :
There are two databases namely:
db_pup (containing faculty table which I will discuss below) and
db_puprecords
the code below allows old faculty table to be copied from db_pup to ...
0
votes
0answers
7 views
Using presenters in Laravel 5
I've watched Laracasts video about presenters and I want to use them in my project.
I have a page where I display user activity log. In foreach loop I display "activity" model. Activity uses ...
0
votes
1answer
9 views
Upload Multiple Images Via Laravel 4
How to upload multiple images through laravel 4? With the codes below I get only the last image. If I select imgA, imgB, imgC, and imgD, I saved only imgD. I need imgA, imgB, imgC, and imgD.
public ...
0
votes
1answer
28 views
WHERE clause not working, code sample included
I have this MySQL query below. It works fine.
$query = sprintf("SELECT id, name, fee, lat, lng, ( 3959 * acos( cos( radians('%s') )
* cos( radians( lat ) ) * cos( radians( lng ) - radians('%s') ...
1
vote
2answers
18 views
Mysterious MYSQL syntax error - works fine in phpMyadmin, not on page
Trying to get a list of expenses from a certain date, I can execute this SQL fine in PHPMyAdmin but on the page I am receiving a MYSQL Syntax Error.
The Code:
$full_date = date('d M Y', ...
0
votes
0answers
7 views
warning glob() expects parameter 2 to be to long
When I navigate to the gallery page on my website, above where the album thumbnail picture is there is the error message that I will type below.
warning glob() expects parameter 2 to be to long, ...
-2
votes
0answers
27 views
Web page is loading slowly with head tag
Please see the two links. One is with head tag and another is without head tag. All other codes are same.
http://grepreparation.netau.net/codeproblem/?page=withhead
...
1
vote
2answers
23 views
php json_decode can't get to object
I have a field in a json object I am trying to do a pattern match for but I cannot seem to reach the second layer of the object.
JSON:
{
"1680488": {
"SUBID": "1680488",
"os": ...
-1
votes
0answers
16 views
php mail() Worked once but not anymore
I wrote the mail function using the php manual.It worked once but now i am not able to send mail to anyone. I have a shared server on hostjinni.If my sever does not have smtp then it ahouldnt have ...
0
votes
0answers
13 views
C++ how to communicate with website (website is written in PHP)? [on hold]
such as title.
Now I'm writing some programs about system performance monitor by using c++ ,
for example cpu usage,memory usage,disk usage. I need to transmit these usage data to a website (using ...
0
votes
1answer
18 views
$('body').on('change', '.selector', function() { }); not working as expected for <select> tag jquery
I am new to web development, especially Jquery and Bootstrap. I need to accept date from users on my page, where they have the option to either give only Year or Year & Month or Year, Month & ...
0
votes
2answers
9 views
querying VARCHAR2 with MAX in ORACLE
I have a column CLIENT_ID with datatype VARCHAR2
the data ranged from CL000001 to CL000163
so when i query the maximum value with,
select max(to_number(replace(client_id,'CL'))) from mst_client
I ...
1
vote
1answer
22 views
Dynamically loading html with image in using xmlhttp
i got a problem in creating dynamicia html by using pure javascript. I create one index.html and dynamically load image with xmlhttp.
var ajaxRemote = function (xmlhttp, url, callback) {
try {
...
2
votes
0answers
21 views
How to avoid special character encoding in view?
I'm using Zend Framework 2 along with Knockout js and I have a form that have knockout binding field like this.
$this->add(array(
'name' => 'TenTaikhoan',
'type' => 'Text',
...
1
vote
2answers
15 views
MySQLI Bind_param query not returning results
I am trying to get this function I wrote to return some data from a MySQL table. Here is my function.
function getCompInfoIDS($id) {
global $mysqli;
$query = "
Select
computers.asset,
...
0
votes
0answers
5 views
Parse Push Notification - PHP API
Parse Push Notifications are working. The thing is that I am trying to send a multiline notification and the PHP API is not detecting my EOL command. The messages arrived exactly as I send them:
...
-2
votes
1answer
21 views
Date and time in php
I have a date which comes as 1428408000. I want to convert it to d-m-y .
$time = '1428408000';
echo date('j-F-Y', $time)
Output is coming as - 1-January-1970
Any help?
0
votes
3answers
46 views
How to make code work with multidimensional arrays?
I have the following code, it works with my htaccess file to dynamically display content via PHP includes into the same welcome.php page. This is just a part of the whole page. The first block of code ...
-1
votes
0answers
18 views
Multiple Email Addresses for Form Submission
I have two scenarios for my form that will determine if the submission is successful or failed. Either outcome serves the user with a unique page. I am looking for a way that the successful ...
0
votes
0answers
12 views
Laravel 5 Populate a form from two different tables
I stumbled upon a problem while creating a CRUD application in Laravel 5. In the edit section of a product I have 2 inputs that are populated from 'products' table and I have a dropdown list that ...
1
vote
1answer
16 views
MySQL query between 2 lat, long giving different number than PHP code
So I have this php code:
$lat1 = 39.210637;
$lng1 = -105.534551;
$lat2 = 39.725865;
$lng2 = -105.016820;
$theta = $lng1 - $lng2;
$dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + ...
0
votes
0answers
24 views
PHP Include path specifically always at root document
I am vague at understanding the include paths and how they are written out, I know how to set them within the ini file and how to functionally do it set_include_path just not how to get it to be exact ...
0
votes
0answers
11 views
DomPDF does not render table nicely
I am trying to get PDF using DomPDF but I come cross a strange problem. All the data and other things are fine but when it renders in PDF the first line of the table is always out of style. Firstly, I ...
1
vote
0answers
15 views
Is there a linter for PHP that makes all exceptions explicit like Java?
Is there a lint/static analyser for PHP that will warn when exceptions are not documented or caught? Consider the example:
// ERROR: InvalidArgumentException must be documented or caught inside ...
-1
votes
0answers
9 views
Google Analytis API on Codeigniter chart
I need to create a dashboard that displays Google Analytics data for a particular site UA-XXXXXX, I view the amount of access in the graph.
How can I do that someone has a step by step tutorial?
0
votes
1answer
26 views
How to fix the next and previous links in this pagination?
I'm trying to create a pagger for a dynamic page that's called pdfview.php with id?= #id number retrieved from mysql db
Here's the block of code that's concerning me I'm able to jump one page only ...
0
votes
1answer
19 views
How to change PHP session time in this code?
I am trying to change the session time in my login code, and here is the code I want to change the session time in:
<?php
if(session_id()==='')
{
session_start();
}
if(!(isset($_SESSION['status']) ...
0
votes
2answers
14 views
curl_exec maximum execution time
Ok so I have a script that pulls datas from an remote API and inserts them into our own database. The problem is that it works fine for the first 30-40 entries but after that I keep getting Max ...
-2
votes
0answers
9 views
multiple column fusion chart using PHP Ploting from database
i wanted to know where i could get resources on how to plot a multiple column chart using PHP from a database (mysql) using fusion chart