php

  • facebook app opens but doesn't perform sharing 2019-01-23

    <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=

    Tags: php, facebook, facebook graph api, facebook sdk 3.0
  • how to select the first number in a link 2019-01-21

    I have a link, something like this: $link = 'http://www.example/data/showall.php?quantity=&lang=eng&sura=2&ayat=21'; Now I want the first number of it, In this case I want 2. Note: All characters are fixed except the numbers. To simplify my st

    Tags: php, regex
  • How to Sum N values in time format (hh:mm:ss)? 2019-01-20

    I used date_parse function and added some time values. print_r(date_parse("23:00:00")); $parsed = date_parse($totdh); $seconds = $parsed['hour'] * 3600 + $parsed['minute'] * 60 + $parsed['second']; $TotDownMinutes = $seconds / 60; i had problem

    Tags: php, time, datetime parsing, date parsing
  • How to change image file name before uploading to database in php 2019-01-19

    How to rename the file of image before inserting into database? DB name :Project Table Name: image ields: id (int), file (varchar) [image url stored here], name (varchar) [image description] HTML Codes GOES HERE <form method="POST" action=&qu

    Tags: php, mysql, html
  • PHP - mail with attachments - message not showing 2019-01-19

    I am trying to complete sending mail with attachments Problem: Email is sending without message body and attachments Goal: send utf-8 html email with attachments I created so far ... Usage: email_library.php <?php private function create_body() { $th

    Tags: php, email, attachment
  • Return mysql result and use in another function 2019-01-18

    I have a php function that gets a users ID based on their studentid. function getID() { require "connect.php"; $id = mysqli_query($connection, "SELECT id, studentid FROM users WHERE studentid = '".$_SESSION["studentid"]."

    Tags: php, mysqli
  • dynamically bind_result bug workaround 2019-01-17

    I'm building a small framework to dynamically query a database and return all result sets on that query. For this method to work I have to deal with procedures that returns more than one result set, so I will put a while based on the next_result() co

    Tags: php
  • Check if one date range is within another 2019-01-13

    For Example I have this range : 2015-06-01 to 2015-06-03. Now I'm going to edit this date in my form. The form however checks if the range overlaps with another range (you can't enter two leaves on the same day). Right now I use this to verify that i

    Tags: php, date
  • Error on Magento adminhtml category tab block override 2019-01-11

    When i try to override "app\code\core\Mage\Adminhtml\Block\Catalog\Category\Tab" this Block Mage_Adminhtml_Block_Catalog_Category_Tab_Product for add new column in category product listing tab I have get this error Fatal error: Call to a member

    Tags: php, xml, content management system, e commerce, magento
  • read more hyperlink when clicking 2019-01-08

    i have an sql table and there i stored the content displayed on the homepage. The table fields are: id, title, postdate, small_description, content. In homepage the fields displayed is: title, post, small_description. My problem is: After the small_d

    Tags: php
  • PHP chose a hex color on a scale from a value 2019-01-05

    I'm looking for tips to pick a color from a variable value. I've got a color scale like this: As you can see, I've got 3 main colors. The goal is to convert a variable value to a hexadecimal color, using php. So in this example (lets name the variabl

    Tags: php, colors, hex
  • kohana 3.3 lighttpd (Palapa WEB server) on tabletpc with Android 2019-01-04

    Could someone help me with lighttpd.config ? I tried to start my web project with Kohana-3.3 PHP framework on an Android 4.4.2 tablet PC, but after some days I have just started framework and it begins to work, but my CSS files are still unavailable.

    Tags: php, android, lighttpd, config, kohana
  • multiple input type file element jquery ajax php mysql 2019-01-03

    I wan to put 2 input type file in my project meaning i want to be able to upload twice in one insert query. I am searching for sample but i have yet to find any. the only related article i found is this but is does not say much. When i say multiple i

    Tags: php, mysql, ajax, jquery, pdo
  • Beginner Help: PHP MySQL (PDO) Function 2018-12-31

    I am trying to learn PHP and setup a user access based website. I finally found a template that is mostly simple to use and implement. However after hours of struggling to modify the template I have to kindly ask for assistance. The following code wo

    Tags: php, mysql, pdo
  • get php boolean and change css border color depends on it? 2018-12-31

    php public function livecheck($check_value, $value){ global $connection; $query = "SELECT * FROM users WHERE $check_value = ? LIMIT 1"; $results = $connection->select($query,$value); //return total count $results_exist = $results->rowCount

    Tags: php, css, jquery
  • How to get dates between two dates 2018-12-30

    List of Dates between my From and Two <?php $scheduleStartDate = 2015-06-20; $scheduleEndDate = 2015-06-25; $Date = getDatesFromRange($scheduleStartDate,$scheduleEndDate); $Date = substr($Date, 0, -1); function getDatesFromRange($start, $end){ $dates

    Tags: php, date
  • Reorder results of select query by distance 2018-12-30

    What I'm trying to achieve is a store directory listing nearby stores, ordered by distance. I've managed to grab all the stores within the specified radius and display them, and also calculated the distance, but the ordering is causing me major heada

    Tags: php, arrays, sorting, wordpress
  • Does this php make my website vunerable to attacks? 2018-12-27

    I've had my website hacked. Files were added. I know there are security issues with php. Does this php open my website up to hackers? The code is <?php include("_back_to_top.php"); include ("_footer.php"); ?> The vulnerability is

    Tags: php, security, website
  • How to check if popen() actually finds and runs executable and fwrite() passes data? 2018-12-27

    I have an executable written in C which reads some data thru scanf. I wanna call it from PHP using popen() and pass data using fwrite(). How will I know if popen finds and executes file ad fwrite() really writes to the executable's input. I mean, my

    Tags: php, popen
  • Parse: Check if object exists before fetch 2018-12-27

    I have a column of type array. It stores pointers to other objects. So in my loop I have something like this: foreach ($artworkArr as $a) { $a->fetch(); $artworkName[] = $a->get('title'); } Problem here is, fetch immediately throws an exception if t

    Tags: php, parsing

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.147 (s). 7 q(s)