« first day (260 days earlier)      last day (50 days later) » 

1:01 PM
0
Q: How to view, control and change user details of a Windows Active Directory server?

Mohammad NajiThe story: We have a Windows Server 2008 Active Directory Server. We have a PHP website (on a linux server). Our reseller (that have access to our website) may have some (1, 2, 3...) Windows accounts in the server. Each customer may connect with any of his accounts and will be served. I want to...

0
Q: When i press the save button the checkbox didnt stay check

Jonathan Padilla<?php $options = array( 'infant' => '1', 'mater' => '2', 'prees' => '3', 'kinder' => '4', ); echo form_open('evals/proc_group'); echo form_checkbox('edu_level[]','1', in_array('1', $educational_levels)); echo form_label ('Infantes', 'infant', array ('class' => 'checkbox_label')); ec...

0
Q: Concatenate and Count the multiple rows in mysql

DnssousaI want to concatenate and count data of the same column, so I can concatenate but I can not count the repeated data. see below the table the query to create the table: DROP TABLE IF EXISTS `tb_presence`; CREATE TABLE `tb_presence` ( `code_presence` smallint(6) unsigned NOT NULL AUTO_INC...

0
Q: function repeated in jquery

user2909855I am trying to make an ajax function runs by clicking a button (modal). The strange thing is if I click the button the function runs perfectly. But if I click the button again the function runs twice, if I click it one more time the function runs 3 times and so on. Here is the code, I hope you ...

0
Q: PHP - Notice: Undefined variable: _REQUESTS

Jayyf9Hi i'm creating a site with a search box this is already done in asp and im redoing it in php (which I am new too) and it will take you to another page where it searches the db using sql. The search-process.php file is below <?php $db = realpath("db\unibookv2.mdb"); $conn = new COM('ADODB.Conne...

0
Q: Different items from eBay finding API and from eBay site

MarekI work with Finding eBay API on Java. I create advanced request with same criteria as the search on site, but on response I get different items. What I should do to get same items? class where i get items from Ebay: public class FindItems { private Query query; private FindingService...

0
Q: Does using variables for localizations in PHP have any drawbacks?

wwwAre there any drawbacks using variables for localization of a project in PHP? E.g: en.php $string1 = "Open"; de.php $string1 = "Öffnen";

0
Q: how to create .pem file in iphone sdk

Hrushikeshi have already use openssl pkcs12 -in Certificates.p12 -out Certificates.pem -nodes but when i have use the pem file in php serverside then Create .pem file when we have use the push notification in Php? regards, Developer

-3
Q: Check the date is past?

Arasu$expire_dt = "2016-11-01 01:08:00"; $today_dt = date('Y-m-d h:i:s'); if ($expire_dt < $today_dt) { echo "AVAILABLE"; } else { echo"EXPIRED"; } This code always shows EXPIRED. I wanna show the date is expired or not.

0
Q: MySQL: Deleting "orphaned" rows during a table update?

menriquezOk...here is my issue...I'm pulling a few thousand records from a cloud REST query and updating a local table during a CRON and inserting and updating existing records with the pulled data. ie INSERT INTO `property` ($columns_string) VALUES ($values_string) ON DUPLICATE KEY UPDATE $update_strin...

0
Q: codeigniter, cannot update value on database

Aldi Aryantoi have some trouble to update records using active records in codeigniter here's my model function update_balance_trans($balance,$kodebooking) { $data = array( 'BALANCE' => intval($balance) ); $this->db->where('BOOKING_NO', $kodebookin...

-4
Q: Sending an email to a Facebook user using his/her user id?

KushalSending an email/message to a Facebook user using his/her user id. Is it possible?

0
Q: how to convert mysqli_stmt_bind_result in PDO

user2893428i want to know what is syntax of mysqli_stmt_bind_result() in PDO i need to convert :: mysqli_stmt_bind_result($stmt, $row->Expenses ); in PDO

0
Q: Debugging Wordpress php template files with phpstorm crashes

wanwuI am trying to debug a php template file with PhpStorm and it keeps crashing. I am getting a exit signal Segmentation fault (11) from Apache Log. I can debug a plain .php file no problem When I try and put a breakpoint on a PHP call from within a file such as page.php with mixed HTML/PHP the d...

0
Q: Loop through base64 images and save in pdf

nielsvI want to create a pdf with multiple images in it. The images are highcarts that I send in array with jquery download from javascript to my php action. In my action I get an array with multiple base64 encoded strings. Like this. To create my pdf I have this code: // INCLUDE TCPDF LIBRARY ...

0
Q: htaccess remove only '?=' sign from URL with query string

Krunal Shahi have url like : http://www.domain.com/16-7-2013/PHP_NEW/registration.php?id=56 and i want to display it like: http://www.domain.com/16-7-2013/PHP_NEW/registration/id/56 can anybody please help me to get out of this stuff. Thanks in advance.

 
1:24 PM
-4
Q: Convert mysql config to mysqli

user2594383I am converting from Mysql to Mysqli, anyways Ive been trying to find out how I would do a certain thing, but can not find. In Mysql I have this following code in the config file $site_settings = mysql_fetch_array(mysql_query("SELECT * FROM site_settings")); $i["url"] = $site_settings["url"...

0
Q: PHP mail script goes to junk mail when using an auto generated URL

AdderHere is the PHP code I am using to send my email. For some reason this will go to junk mail if I include the following line: $message .= WEBSITE_URL . '/violation.php?email=' . urlencode($fm_email) . "&key=$activation"; but if I remove this it will come to my inbox. Can anyone help me solve thi...

0
Q: Wordpress external DB connection error

webmaster alex lI have an external database I am trying to have a php page inside my WP connect to. If I go to the page directly outside of wordpress I see all the content from the DB displayed correctly. If I look at the page inside of WP I get a DB connection error. Anyone know whats going on? DB connection.p...

-2
Q: PHP Order by ASC not working on decimal type

user2960582Have a quick question regarding ORDER. I have a list of scores I am displaying in a high scores table using php. I need the lowest decimal number to display in 1st place, however when I try to use the ASC command, no results display. But if I use DESC the results do display, but in the opposite o...

0
Q: Several sites on multiple servers in 2 data-centers. How would one approach implementing unified user login?

DannyboySeveral sites on multiple servers in 2 data-centers. How should one approach implementing shared users database, shared way for users to login into those sites so there would be no need to keep separate users database on each server? Is creating some web-service a way to go? Like some REST en...

0
Q: Organizing data from Facebook in Python

TiagoCedrimGood morning everyone, I created an app on Facebook to get all pages (fan pages) that all my friends likes and category of all these pages, but now I'm wanting to treat and breaking his head, wanted help from you ... I have to count how many pages of each particular category each friend likes .....

0
Q: Ajax contact form is not sending an email

StevenI'm using ajax contact form: jQuery(document).ready(function () { // Comment or uncomment the result you want. // Currently, shake on error is enabled. // When a field is left blank, jQuery will shake the form /* Begin config */ // var shake = "Yes"; var shake = "No"; ...

-9
Q: how to make call from pc using local landline phone services?

user2955245Is there is any software which connects with my php application. I will able to call through my land line connected with one click?

0
Q: php mysql_query insert into not working

user2160370<form method="post" action="updatescreen(2).php"> Name of company:<br /> <input type="text" name="artid" id="artid" size="50" /><br /><br /> <input type="submit" name="Insert" id="Insert" value="Insert" /><br /><br /> <?php if(isset($_POST['Insert'])){ $id = $_POST['artid']; mysql_query...

0
Q: PHP date: How can I check if current year has no more the bygone months?

lauthiamkokHow can I check if current year (2013 for instance) has no more the bygone months (like Jan, Feb...Oct), then do something? I have these lines of code, # Set month array for the calendar. $months_calender = array(); # Set current month and curren year. $current_month = (int)date('m'); $current...

0
Q: Advantage Database Server Driver for PHP on IBM System i

Matt PeadenI have a requirement to query data from advantage database server 7 installed on a windows 2003 machine from PHP script on IBM System I. I can't seem to find drivers for this. Is this possible? Are there any alternatives? How can this be accomplished? Thanks,

0
Q: Looping Navigation tabs in PHP

CruelcromeSo the problem is when I try to echo My panes it works fine, but each result get a pane each, what I would like to do is. Let's say each time a call a tab i want 5 results in that tab.. Code: <?php $sql = "select * from progress order by procent asc"; ...

0
Q: Updating data not working. No error but the data do not change

Mohamad Noor Qusyairi ManlanI'm stuck for whole day because thinking about the update data problem. There was no error, when click update, it's successful but the data not updating. Here is my index.php <html> <head> <title>Daftar Mahasiswa</title> </head> <body> <?php $sambung = mysql_connect("localhost", "root", "") or d...

0
Q: Email table using php mail function

Shenir McknightCan you explain a method I can use to email a table generated from a mysql query using a php script. I am looking to use the php mail function but don't know how best so I can keep the format of my table. Example of one of the table to be emailed: <table style="text-align:center;" width="500" c...

0
Q: PHPSESSID Cookies on Sub-domains are having conflicts with each other

jasondavisWe are having some issues with PHP Session Cookies not allowing us to log into our SugarCRM* application which is open source PHP application. The problem is we have the same application installed on 2 sub-domains like below... Main site www.domain.com Dev site dev.www.domain.com Now after l...

0
Q: Php Javascript Image Upload and Edit

Mars Spideri'm looking for a Php / Javascript example script which can help me and be the base to build a tool for uploading images and than drag/rotate/scale and position them under a mask / frame. Similar to tools used in custom photo print sites. Any help?

0
Q: Are Mongo php write operations sync or async?

nourdineI would like to find out how Mongo writes to disk by default. Async or Sync? When I do: $collection->insert(array("a" => 42)); is it sync? The documentation says the param w is set to 1 by default and that should cause the insert to return only when data has been written to disk. As opposed t...

2
Q: What is the consequence of running a 2nd commit in Mysql?

TomWhile using a MySQL transaction, is there a problem if you commit twice? e.g. START TRANSACTION /* Various DB UPDATEs */ COMMIT COMMIT Having tested it out, it seems the 2nd COMMIT is a NO OP and could equally be a ROLLBACK, is that correct? Is it harmless or could it ever be a problem? As I ...

0
Q: How to add Gmail action buttons to codeigniter's email library?

pnhegdeI'm trying to embed gmail action buttons while sending email from codeigniter's email library. My mail looks like this - $this->email->from('mail@mysite.com', 'MyName'); $this->email->to('user@yoursite.com'); $this->email->set_mailtype("html"); $this->email->subject('Testing...

0
Q: getElementById gives result plus strings

TonalDevI am trying to extract a div from another website using the following code: <?php $doc = new DomDocument; //We need to validate our document before refering to the id $doc->validateOnParse = true; $doc->loadHtml(file_get_contents('http://myaddresshere')); var_dump($doc->g...

1
Q: PHP - Using a for loop instead of a switch statement

user2742435overflow community first post ever! Currently i'm working on a project and have started to use PHP to dynamic insert pages. At this point in time I have... switch ($route) { case 'step1': include('./views/enrolment/mainstream/_step1.php'); include('./views/partials/_footer.ph...

0
Q: How to read incoming SOAP request in php

ILiyan DimitrovI want to read the SOAP request wich is coming from .NET WinForms application. The request is: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLS...

0
Q: return and echo my array from a function

Daniel RobinsonI have a function that returns either a value into a variable if it is successful or it returns an errors array. see part of it below. function uploadEmploymentDoc($var, $var2){ $ERROR = array(); if(empty($_FILES['file']['tmp_name'])){ $ERROR[] = "You must upload a file!"; } //find the extens...

0
Q: Jquery Mobile Logout wrong url

Josh C.So I'm using jQuery mobile and PHP to log out of my website via this code session_start(); session_destroy(); header('location: login.php'); It works in logging me out and taking me to login page, but the url is mysite.com/logout.php instead of mysite.com/login.php and because its a di...

0
Q: Doctrine 2 Custom Types

user2798515I am trying to implement a Doctrine Custom Datatype for saving currency decimals as SQL integer. I can't change the Database Design, so i'll have to this: <?php namespace Doctrine\DBAL\Types; use Doctrine\DBAL\Platforms\AbstractPlatform; class Currency extends Type { const CURRENCY = 'cu...

0
Q: PDO Returned array into more accessible array

HarryInformation This should be a fairly simple question. On my website I have a post_categorys in my database that has a structure like below ID | Name 1 | Sports 2 | Health 3 | Movies 4 | Music Now when I save a blog post I save the category_id s...

0
Q: How to display exception text in a custom error page on Symfony?

maximeI'm working on Symfony and I created a custom error page, following the instruction of the Symfony documentation. So, I have my app/Ressources/TwigBundle/views/Exception/error.html.twig file. It works fine, but in my error view, I want to display the Exception text, so that if I do this in a con...

0
Q: Get All Public informations of a Local Google Plus Page

KevinI've got a google plus local page which is linked with Google Places. Using PHP, I want to get the adress and opening hours. I tried with this code but I didn't get informations I want. <?php session_start(); require_once 'google-api-php-client-0.6.7\google-api-php-client\src\Google_Client.php'...

-2
Q: Delete duplicate array keys based on content length

cianzI have an multidimensional array that looks like this: array( "1" => array( "title" => "apple" ) "2" => array( "title" => "yellow pear" ) "2" => array( "title" => "green pear" ) "2" => array( "title" => "red pear" ) "3" => array...

0
Q: How to Authenticate Kohana users Using symfony 2 security?

user1191081We have a legacy application developed in Kohana 2.0, and we are porting the application to Symfony2 step by step. We started porting backend features like some batch jobs etc. Now planning to port Authentication and Authorization to Symfony 2 security but still using Kohana UI. Whats the bes...

0
Q: Extracting children with parent values from multidimsnsional array

user2828091I have the following multidimensional array $array: Array ( [criteria] => default [name] => default [data] => Array ( [0] => Array ( [criteria] => test1 [name] => test1_name [data] => Arra...

0
Q: Apache error log with mmap cache errors

MartyIXI found many errors like this one [Wed Nov 06 14:34:01 2013] [warn-phpd] mmap cache can't open C:\www\somefile.php (pid 4484 th 1668) in my Apache error.log file. I tried to pinpoint the source of the error for some time but with no luck so far. I find out that PHP Opcache is not the culpri...

0
Q: Piwik tracking logged out wordpress users

angeloI need to see where my wordpress users have been going and I used custom variables to do that by following an example but I couldn't see the users after they logged out. Could someone please tell me how to keep tracking those users who have already logged out? I used this piece of code and it wor...

0
Q: OCR on score screens

Cristiano MarquesI was thinking about using some OCR scripts to get data from score screens from games in order to make a database. I've found these two: http://phpocr.sourceforge.net/ http://www.phpclasses.org/package/2874-PHP-Recognize-text-objects-in-graphical-images.html After reading them, I'm still won...

0
Q: Passing a value through Button to Php function

Maria I am beginner in php and i am currently working on admin panel you can see my admin panel page thing is I Want to Pass serial No through these two buttons to perform further But i cant find How to send "$value" to edit and delete a particular line <div id="headin2"><strong> <h3>Admin page <...

0
Q: PHP multi_query returns Error: Unknown column 'Type' in 'field list'

Pretty RoseI wrote my very first PHP script which imports a csv file into a database, treats it and exports it again into another csv file. The problem is that even though I can check de database in phpMyAdmin and the column "Type" do exist, when I run the script it says Error: Unknown column 'Type' in '...

0
Q: convert jquery graph in to PDF and ms word

user2960703How to convert the canvas tag enclosed graph produced from jquery into PDF and ms word. This is my code: <script `src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">`</script> <script src="http://static.pureexample.com/js/flot/excanvas.min.js"></script> <script src="http...

0
Q: how to use javascript variable inside php in javascript function

chetanI'm using javascript to redirect a page with dynamic parameter. Here is code, I had use the php fuction inside javascript. It works but it isn't using the javascipt variable <script type="text/javascript"> var $map = jQuery.noConflict(); $map(document).ready(function(){ $map(...

0
Q: how to get share buttons to use the current URL?

Andreas Spaeth <a href="http://www.linkedin.com/shareArticle?url=MY_URL" class="in-share-button" target="_blank"> <img src="my_img" alt="linkedin share button" title="Share on Linked In" /> </a> This is currently my share button. I want it to share the url that's currently in the address bar, and not a f...

0
Q: isset vs try/catch on namespaces

JohnI'm parsing RSS feeds and have a (sub)function that looks like this: function nSpace($nSp, $type, $i){ $namespaces = $i->getNameSpaces(true); $exp = explode(':', $nSp); try{ $nameSp = $i->children($namespaces[$exp[0]]); $item[$type] = (string)$nameSp->$exp[1]; return $item[$typ...

0
Q: Wordpress query to show only sticky posts

user2304394Following is my wordpress query in which i want to show only sticky posts but the query is not showing any posts. Also I set two posts as sticky so that part is checked!!!. Kindly let me know how to modify this query so it will only show the posts which are sticky <?php $wp_query = null; ...

0
Q: inserting form values into an array using foreach loop

bobbyjonesi have this long form that requires multiple inputs, how can i properly insert these inputs into an array using a foreach loop? assuming i have these: $name = $_POST['name']; $color = $_POST['color']; $age= $_POST['age']; $gender = $_POST['gender']; $location = $_POST['location']; ...etc.. in...

0
Q: xampp - won't show certain page - it shows blank page

user2960754So, I have used xampp since 2 months ago with no problem. I run my site on localhost. I can run localhost/phpmyadmin just fine. Six hours ago, I still could run my every web pages on my browser perfectly. but now, I can run the index, contact-us page, but I can't run my catalogue page. I use cod...

0
Q: Laravel 4 's all() method started to return Eloquent collection lately - why?

AristonaThis is my controller: return View::make('home.listings') ->with('listings', Listing::all()); Previously, I checked it on views like this: (and it worked on all my projects) @if(!empty($listings)) //use foreach and show listings @else <h3>No listing is found.</h3> @endif This ...

0
Q: The perfect client to test php web service

Refaati'm developing a web service using php, this web service has to take a request information from a client and send it to the server then take the response from the server and send it back to the client, this client is not available right now so i want to use like a virtual client or any other clie...

0
Q: how i send Email from codeigniter

Khan Kingi using this code to send testing email, but i always facing error, what should i have to do ? //==========code====================== $config = Array( 'protocol' => 'smtp', 'smtp_host' => 'localhost', 'smtp_port' => 25, 'smtp_user' => 'root', 'smtp_pass' =

0
Q: How can I search through an array to find an array that contains a certain value?

Richard FosterI'm sure this is incredibly simple, but I'm new to arrays and I'm using the TMDB API and PHP. I'm trying to get the name of the director. This is a shortened version of the array: Array ( [credits] => Array ( [crew] => Array ( [0] => Array ...

0
Q: Regex - matching characters in string

user2960817So, I'm looking for a way to validate a string using the PHP preg_match() function. The first character must be a letter and it must be either J, R or P. The second character must be a letter. Characters 3-8 must be a number. Anyone have some guidance on how I can accomplish this? Please and t...

0
Q: how to block curl or file_get_contents

JC1how can i not allow someone to use curl or file_get_contents to get my page html? for example: my domain is: www.domain.com someone php page: <?php $info = file_get_contents('http://www.domain.com/theinfo.php'); ?> i can try to check it by user agent but its not the right way. what is...

0
Q: Symonfy / Doctrine "refers to the owning side field which does not exist" - but property is present in class

nmcilreeSeUserProgress and SeUser. The SeUserProgress table holds multiple entries per user. This is expressed via the two following mappings. class: SeUserProgress /** * @ORM\ManyToOne(targetEntity="SeUser", inversedBy="progress") * @ORM\Column(name="user_id", type="integer", nullable=true) */ priv...

0
Q: renaming array from value

Craysi have a string, say its ID,123@@ID,789@@ i exploded it with $pieces = explode("@@", $contents); so now i have a set of array array(3) { [0]=> string(6) "ID,123" [1]=> string(6) "ID,789" [2]=> string(0) "" } then i would like to explode again the string within the array and used t...

0
Q: PHP - Get image by image tag in an HTML document

DJZorrowHow do i properly grab an image that is displayed in a HTML document and feed it to PHP to be read as image binary. I do not have direct access to the image file. The image i am trying to grab is fed to the client with HTML via PHP and printed in HTML format and using an <img> tag to display the ...

0
Q: preg_replace to change drupal style links to standard a tags

green green grassI have content that I am migrating from a drupal site. I'm not certain if this is a standard drupal 'feature' but all the a tags have been converted to this format: [link label](link url) I am attempting to convert these back to normal links with preg_replace with limited success. This is my cur...

0
Q: Magento copy controller to local

Lubomur MarshalWhen I copy some core/Mage/Adminhtml/Block/ files to local/Mage/Adminhtml/Block/ everything work's fine, but if I copy controller to local/Mage/Adminhtml/controllers - core controller still works and system don't see my local/ ... controller.

0
Q: Saving php data from mysql_fetch_array as script variables

PeterPbeen trying to save my data from my while loop to script variables but no success. Did an example if how I want to save my php data to script variables. This doesn't work for me. Anyone have any idea? Don't want to save all data manually. Very greatful for answers! Ask if you don't understand :) ...

0
Q: move symfony from root directory to public_html

sebastianbI have a symfony2 project that somehow was running fine while it was outside the public_html directory, but now it's not working (the path is not allowed anymore, apparently). Now I need to move the symfony2 directory into public_html, but when I do, the website is still not working (the page i...

0
Q: PHP Exception Handling

Savvas NicholasThis is a general question regarding exception handing for exceptions thrown in onther people's code. I am using the following Codeigniter PHP library: https://github.com/sepehr/ci-mongodb-base-model which relies upon this library for MongoDB: https://github.com/alexbilbie/codeigniter-mongodb-l...

-1
Q: echo variable variable name

user2960838ik want to echo a variable variable name, this doesn't work: echo ($["IMG$i"]); $ is 1 in this case, and it changes while the for loop go's on. $IMG1 is an varible with a value mvg, reinier

-1
Q: Regular expression to find block

user2960802I need your help with regular expression. Here is a sample html i would like to run your provided regular expression: <div id="divId"> {% block var_name1 %} <p> Hello world </p> {% endblock %} <div class="someclass"> {% block var_name2 %} <span>Hello span</span>...

0
Q: PreAuthorize annotation of Symfony2 JMSSecurityExtraBundle not working

iusUsing the JMSSecurityExtraBundle of Symfony2 I try to create my own expression method and bind it in a controller using the PreAuthorize annotation. I don't know why but the method is never fired, and the security bundle while trying to evaluate the PreAuthorize annotation concludes with a "Toke...

1
Q: Lookup the subnets of many IPs in a fast way

mottenederI have a huge table which contains among other information and IP address column. I want to do several calculations with this data but group it by the subnets to which the IPs belong. Currently I'm using whois to get an IPs subnet The problem with this approach is that it takes forever because I...

0
Q: determine if all images have the same size

Anna K.I'm adding image widths and heights from a list of images then divide the sum by the number of images to get the average width and height. Is there any way I can find out if all images have the same width and height based on these 3 variables: $average_width, $average_height and $number? Or do ...

-1
Q: Regular Expression validation for IPv6 address

Vivonei am trying to write a regular expression for validating IPv6 address,IPv4 address and host name. My regular expression is : ^[a-zA-Z0-9./_:-]{0,128}$ it is validating everything except the ipv6 address like below : 2001:1000:1000:1000:20c:29ff:feee:a40e/64 if i remove /64, it works but with...

0
Q: Method of Function Calls in PHP

Mohammad Samim SamimeeI have a website in which I have put all my functions inside one page, the page is called functions.php. For example when I want to delete something from database I use the below method, code in delete.php < a href="functions.php?delete&id=1 >delete < /a > code in functions.php if(isset($_...

0
Q: JavaScript / Java / PHP / Neo4J on one server?

Dee Mee TreeWe need to set up the environment where we could run a mix of Java and Javascript applications (e.g. Gephi and Angular for frontend) as well as some PHP scripts. We would use Neo4J database as well. Tried doing it with Vert.X but when coding an http client in JS using vert.x API we failed to mak...

0
Q: expense of if conditions stored in variables (php)

MWallIn php, is this: $ifTrue = ((1 == 1) and (2 == 2)); if ($ifTrue) { echo "derp"; } more expensive than this: if ((1 == 1) and (2 == 2)) { echo "derp"; } I've taken to storing my conditional expressions in variables to cleanup multi-line if statements. So far, I have seen no difference...

-1
Q: get curent class in sidebar ($_GET['do'] == "")

MakromatIn my sidebar is class added for active link with this code: <?php echo ($_GET['do'] == "") ? "class=\"current\"": "";?> // This is root link All working but I have error in my error_log file.... This is in next menu item: <?php echo ($_GET['do'] == "add_account") ? "class=\"current\"": "";?>...

0
Q: How to set the sql results index value by desired column name in mysql?

RafiqHow can I set the sql results index value by desired column name in mysql? For example Table name: country +-----------+----------------+--------------------+ | id | code | name | +-----------+----------------+--------------------+ | 1 | 88 |...

0
Q: Make first item in a loop different to others

user2726041I'm attempting to loop through a number of blog posts in Wordpress and highlighting the first blog post differently. There are only 5 posts in the database. However, for some reason my loop is outputting infinite items. Any ideas what I am doing wrong? function blogposts() { $blogposts = n...

0
Q: array_merge multidimensional arrays

Eoghan OLoughlinI have 2 arrays - one is hard coded and the other is data retrieved from a database. I am trying to merge them but I'm having unexpected results. This is the printed result of the first array: Array ( [0] => Array ( [product_image_one] => ) [1] => Array ( [...

0
Q: Retrieving a category name from database

user2956943have two tables in my database. One name jokes and the other named category. jokes CREATE TABLE `jokes` ( `joke_id` int(11) NOT NULL AUTO_INCREMENT, `joke` varchar(1024) NOT NULL, `category_id` int(11) NOT NULL, PRIMARY KEY (`joke_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREM...

0
Q: PHP-Mysql WHERE is empty AND returns results

Jeremy TylerI am not well versed in MYSQL, and I need some guidance here. I have read multiple MYSQL WHERE statement explanations, but have not found this exact issue. I have a table called studies that has fields like id, name, author, category, format and a few others. I am building a filter with checkbox...

0
Q: Smarty: cannot replace string

0R10NI'm new to Smarty and I have a variable which contains a URL http://someurl.com and I'm trying to perform a replace operation on it, to show http://m.someurl.com. This is what I have, but it's not working. {$theurl | replace: 'http://' :'http://m.'} I also tried assigning the $theurl to a seco...

0
Q: image resizing tinymce how to?

user2078421in a php page, I have implemented the famous tinymce, and I have been using this plugin (http://justboil.me/) for uploading images. For example, if you load a picture with width 1024 this will be printed in the textarea width with 1024. How do I auto-resize the image to 600px?

-3
Q: php $_get error undefined index

Shivesh Jaiswali have search page where i limit results and split pages....... hi i am using "$page = $_GET['page'];" command but if there is no ?page=1 then it is displaying ""Error Undefined index: page"" if i put ?page=1 then there is no error. my problem is this that at the very first time when i run my pa...

0
Q: Installation of Indefero under ubuntu

user2451636I ask for your help as I try to install indefero on a virtual machine. I followed the instructions on the official website but I'm a bit overwhelmed . I followed the official tutorial but this is beyond me because I have a hard time realizing it. I created in / home / www / project where I inst...

0
Q: equivalent PHP sha1 in C#

user2960588I am trying to find out how can i have the same result in php and C#. I have this code in c#: string date_server = "201311060930|aabbcc@test.com|test"; SHA1 sha_1 = new SHA1CryptoServiceProvider(); byte[] array = Encoding.ASCII.GetBytes(date_server); array = sha_1.ComputeHash(array); And the r...

0
Q: Need help regarding regular expression to parse this string

user2485649I do not know regex well. And need help in fetching some data from a string, if any one can help, please. When i am pasting the string over here it format the HTML so pls check pastebin link. Okay, so what i need is every field data from this string, i.e. "Pickup From:", "Deliver To:", "Special ...

0
Q: Phalcon\Mvc\Models - model relationship and caching

temuriThere's this in Phalcon docs: http://docs.phalconphp.com/en/latest/reference/models.html#taking-advantage-of-relationships. Suppose I have a code like this: public function initialize() { $this->hasMany("id", "RobotsParts", "robots_id"); } /** * Return the related "robots parts" * * @r...

0
Q: Null string returned from function but can print/echo inside function

bergunderdjI have a function inside a basic CMS that I'm writing: protected function loadContent(){ //Use the pages table $this->_dBase->table = 'pages'; //Select Content $query = $this->_dBase->select('page_id, title, content', array('name' => get_class($this))); $html = $query[0]['con...

0
Q: How to extract archive file correctly in php-opencloud

user2337304im using version 1.7 of php-opencloud heres some part of my code. $cloud = new Rackspace(RACKSPACE_US, $credentials); $storage = $cloud->objectStoreService('cloudFiles', 'SYD','publicURL'); $container = $storage->getContainer('testing'); $gz_file = 'test.tar.gz'; $storage->bulkExtract('', $gz...

0
Q: check if array is error before inserting

PHPnoobI am trying to check on my table if what I am trying to insert is already in the database before it is inserted. I have manage to do the following below and it works. some of you might wonder what orc_select_to_array it is a function which just check for array. $select = "select count (*) as...

0
Q: Can i include another php script to continue the for loop execution to prevent server timeout due max_execution_time

user2950111I have a php script which inserts data into database table with a function call, and the function is in the for loop. I want 120+ iterations, but due max_execution_time=30 and unfortunately i cant change or edit php.ini file on my shared hosting. As the execution of the script stops at approx. 5...

0
Q: PHP preg_replace keep only a div with specific class

otinanaiI have this html text: <div class="sliderImg"> <img width="1000" height="666" src="/consultants/images/projectbank/simansi-vaseon.jpg"> <img width="1000" height="666" src="/consultants/images/projectbank/oloklirosi-parkou.jpg"> <img width="1000" height="666" src="/consultants/images/...

0
Q: insert array data into mysql using PDO

bobbyjonesi have this array with data from a html form, and i want this array to be inserted into PHP function that handles the INSERT query into mysql. how can i declare my array into PDO $_POST['id']; $_POST['name']; $_POST['age']; $_POST['loc']; $myarray= array(); foreach ($_POST as $key => $value){...

-1
Q: Call to undefined function some_function.php

user2960960The question is a little bit abstract. In some PHP file on line 25 is called some function. On line 124 in the same file that function is defined. Suddenly, errors started show up "Call to undefined function some_function.php" After reloading Apache Server errors disappeared. How is it possible?

0
Q: Uploading large files - FcgidMaxRequestLen

panthroIm trying to upload large files. I have found the issue to be with: FcgidMaxRequestLen I have set this to a large number and large uploads now work. My question is, can someone explain to me what this is and what an ideal value for it should be? Thanks

0
Q: Setting Up a Cronjob on MAMP - InfinteWP

user1218476I am installing InfiniteWP on a local environment using MAMP. Everything works perfectly except for my inability to figure out how to setup a cronjob properly. I did find some information (dated?). I found this: http://www.freewaytalk.net/thread/view/114906 . But am a bit worried that I may be i...

-2
Q: I cant' figure out what I'm doing wrong. Why won't this form submit an email?

dankeContact form: http://brunswicklandingmarina.com/newsite/contact.html I do not know what I'm doing wrong. Any help would be greatly appreciated! Thank you.

0
Q: JQuery .val() seem doesnt work

ladiesmancurrently I'm working with JQuery. My question is, why when I filled all the text box and click submit button, it's not going to '/timesheets_app/index.php/searchall' ? Here is my snippet: $(document).ready(function() { $("#search-form").submit(function() { ...

0
Q: PHP skips 6 rows when calling from MySQL

user2960934If you go to the Staff Page at http://www.cebyrd.com/staff.php and scroll using the carButton, the scroll function fetches 12 lines from the database instead of 6. So 6 teachers (3 rows and 2 columns) get skipped with every scroll. I don’t know why it’s skipping a page. Here’s my code: <section ...

0
Q: Error: The page isn't redirecting properly

user2955900I want a to redirect to a folder exactly as the subdomain. Subdomain should be dynamic. For that I use the htaccess code given below. But getting error message "The page isn't redirecting properly" in firefox. Please help! <IfModule mod_rewrite.c> Options +SymLinksIfOwnerMatch Options +In...

0
Q: Simple Server in PHP using sockets to handle multiple clients

georootHow can i make a simple server in PHP such that it can handle multiple clients?The server is not HTTP it has its own custom protocols. This server is supposed to handle client requests to a local database management system.

0
Q: php system login in webmatrix

user2161721I am no expert and I am trying to do a simple login system for a website using php 5.4.9 in Microsoft's webmatrix . I seem to have done the connect.php file correctly . but there is something wrong with what is inside the second IF instruction in this login.php file, the database is connected an...

0
Q: CakePHP and APC

ZiploWhen I try to set up Apc cache for counter in CakePhp, Cache::config('counters', array( 'engine' => 'Apc', 'duration' => 3600, 'prefix' => Inflector::slug(APP_DIR) . 'counters_', )); It displays the following error : Fatal error: Uncaught exception 'CacheException' with message 'C...

0
Q: Trying to get the database to update after facebook app callback initiates

user2284703Can someone please tell me what I am doing wrong here? I know that the database connetion info is correct, so that can't be the problem. But something in this callback code is wrong. My facebook app will initiate and complete a payment (and payments even show as taken from the credit card acco...

-1
Q: Lacking concept on editable html email

stapuffI have a button on a php created html page that on click post specific element values to another php page, does a mysql query, creates a html email and automatically sends it without user interaction. Works great. An additional step has now been requested to be able to view the email and potent...

0
Q: PHPStorm 7 REST Client allow self signed certificates

HackmodfordI'm using PHPStorm 7 to create a RESTful API. I wanted to use the built in REST Client but need to be able to tell it to allow untrusted SSL Certificates. I am using a self signed certificate on my test server. At the moment when I send my request I get this response. javax.net.ssl.SSLPeerUnver...

0
Q: Not sending email

user2576961I'm attempting to send an email address out to registrants who register for my site however this section of my code is not running. I'm attempting to find out why. I've followed all the necessary documentation. I replaced this section with php's mail function for debugging to see if it'll send an...

0
Q: How do I add a link into an xml tag using php

silverlight513I have an xml file that I can pull using php and display the results. I need to pick up one of the xml tags and add a link inside it so I can parse the value in the tag as a php variable. e.g. <name>Llandaff</name> <firmid>70330</firmid> <branchid>2</branchid> I want to add a link so the new x...

0
Q: Getting newewst newspost database

user2819164I'm trying to get the newest post from my Database. If I run the following code I get the following message: "Invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TABLE newsposts ORDER BY newsposts....

0
Q: Date and Time pickers to Timestamp field

AndresI have a date field and a time field which both have their own pickers. One that has the calendar popup and the other has the time popup. Now I have the calendar's format: dd/mm/yyyy now for some reason when I try to save the inputted values i get: 1969-12-31 00:00:00 So I'm not sure what I...

0
Q: onclick function not second time. error message as Uncaught ReferenceError: submit_photo is not defined

user2960973The function only work in the first time and not working after refreshed the page. The error message from website console is: Uncaught ReferenceError: submit_photo is not defined AddDeletePhoto.php?exhibit_id=2:1 onclick Uncaught SyntaxError: Unexpected token ILLEGAL this is the onlick html: <...

0
Q: Laravel - Controller broken after changing the installation

SamiSalamiI am new to laravel and started a project a few days ago with it. I had composer running without git and it worked "okay". Yesterday I tried installing the package felixkiss/uniquewith-validator, the installation went trough witout problems, but the new option was not implemented. After updating ...

0
Q: codeignitor pagination with an array of entity objects

user1885490I want to use codeignitor's pagination library to paginate an array of entity objects that I already have rather that go out and collect all that raw data in a separate query. "my_array":[ [ { "some_data":"value", ., . }, { "some_data":"val...

0
Q: Why won't my AJAX function correctly populate a drop-down list in Internet Explorer?

BrianI am writing a page with PHP, and I am trying to populate a drop-down list given the value of a previous drop-down list. This works perfectly in Firefox, but does not work at all in Internet Explorer. I was wondering if it is a fluke that it works in Firefox and not IE, or if I am just WAY off in...

0
Q: google analytics (401) Login Required error

Umar Khani am using google analytics php api to retrieve my data. on index.php i have authorization process done which works fine and i get successful login on this page i have link to another php page where i want to display all my properties so how i can post my login credentials to properties.php and c...

0
Q: Parsing mysql with html camp to xml

user2961009I'm trying to parse data from mysql to xml. To use it for create markers on a Google Map. But I have a problem. When in the column of mysql I use html like it crashes. Mi code is: $query = "SELECT * FROM mapas"; $resultado = mysql_query($query); $row = mysql_fetch_assoc($resultado); header("...

0
Q: What would be the best way to simplify this foreach?

CR47I was testing an xml object to see how many levels deep it went and found that it goes 11 elements deep. I'm wondering how I could have done this simpler so that in the future I can save a few minutes. $xml = simplexml_load_file(drupal_get_path('module', 'my_module') . '/test_file.xml'); dpm(...

0
Q: How can i make "echo" work properly in a select Tag?

user2781669i'm learning PHP and i want to generate the options of a select element taking the data from a DB, bur i can't figure why this is not working. <!DOCTYPE html> <html> <head> <title> delete user </title> </head> <body> <img src="src/elvislogo.gif" alt="elvislogo" /> <img src="src/bla...

0
Q: Getting error when trying to extract RDFa from an HTML string using ARC2

lorussianI'm trying to extract RDFa from an HTML string using ARC2, but I'm having the following error: Undefined offset: 0 in /Applications/MAMP/htdocs/p-dpa/wp/addons/arc2/extractors/ARC2_PoshRdfExtractor.php on line 75 Here's the code I use: $aString = ' <span vocab="http://schema.org/" typeof="Doc...

0
Q: How can I get autocomplete to work on every row of query? Right now it is only working on in first row of query results from my msql database

user2498276I have tried to look this up on the internet and Im sure its something simple. As you can tell I am new to this. I am creating a simple order entry page for customers that visit our website and I cannot get past one part. I have created a simple order entry form that grabs customer order # from...

0
Q: PHP - Append and update large XML files

Daniel SI'm looking into the possibility of efficiently comparing two similar XML-files and updating outdated information. The main XML-file I'm working with is about 200-250mb in size. The second is a tad smaller. The two XML-files pretty much looks like this: <product> <Category>BOOK</Category>...

0
Q: Fatal error: Uncaught exception 'Google_ServiceException' with message 'Error calling PUT

user2961060Hello i keep getting this fatal error when trying to update tags with the youtube api. am i missing something? thanks this is the error i keep getting - Fatal error: Uncaught exception 'Google_ServiceException' with message 'Error calling PUT https://www.googleapis.com/youtube/v3/videos?part=sni...

0
Q: Echo'ing error message

user2961056We have a login page which validates the username and password from our database, however we'd like it to display the invalid username and password message above the input fields rather than at the top of the page. We know we can edit and put the php code in the div to display it where it is, we ...

0
Q: How-to SELECT two tables in query

user2838753I am trying to get data of 'indication' from two different tables. The script works fine when selecting FROM number_one only. Did try this with a , inbetween but that doesn't work. How should I do this? query2 = mysql_query("SELECT `indication` FROM `number_one`, `number_two` ORDER BY `indica...

0
Q: Htaccess - Change domain based on language param

HovardKRI need help with a htaccess rewrite. Been asking Google for a while now... I want this url: http://www.examplenorwegian.no/sv/(wildcard) To rewrite to: http://www.exampleswedish.se/sv/(wildcard) It is the /sv/ part that is the key in this. So if the case is other way around, it will re...

0
Q: Search for a div in php

Rico KingI want to search inside a div if there is a certain div present, for example: <div class="div"> <div class="div2"></div> <div class="div3"></div> </div> I want to know if div3 is there. If it is I want to execute some html How is this done in php? Thanks

0
Q: Array loop to determine a range average

JayI am working with an array of 25 data points for a JS Chart. Here is what I am trying to accomplish: Subtract the next value from the previous value, i.e. $value[0] - $value[1] Take that resulting value and assign it to another array of values Take the absolute value of each in the new array a...

0
Q: Myslqi stmt bind param not working properly

BankinI'm new to the new PHP 5 mysqli but I've worked a lot with the old fashioned way. So here is my code $query = "SELECT `id`, `catn`, `name`, `name_en`, `image`, `price`, `old_price`, `cat` FROM `products` WHERE `show` = 'Yes'"; if (!empty($order)) { $params[0] = $params[0] . ...

0
Q: Any Libraries/Plugins for Auto-Glossing a block of text?

JohnI'm trying to find any pre-existing libraries or plugins for a PHP/Javascript-based auto-gloss function. Preferably one that is easily compatible with Zend Framework. I have a cludgy proof-of-concept using some Javascript tooltip code with a database of vocab terms in the backend, but now need to...

0
Q: Splitting delimited text and pairing with another field

TimPI hope this isn't a duplicate question, I have found many similar but none that match my requirements. I tried to get a solution with Splitting mysql value into unknown number of parts but I think maybe I asked the wrong question - I specified not wanting to use php with that question. It also is...

0
Q: How to make a mysql query on mouse over and show it in a tooltip

user2961076I'm new here, but in my last searches, I found everything that I needed here, except this question. I want create a dynamic tooltip with jquery or something else, but my question is, if I can do a mysql query when the user pass the mose over the text than I want, for example: <input type="check...

0
Q: How to avoid this addition to our god object

paulOur web application allows users to upload files. We have two god objects in our web application: User object (3000+ lines) File object (3000+ lines) Common usage at the moment is: $file = File::getByID($_GET['file_id']); $user = User::getByID($file->ownerID); echo $file->title; echo $user->...

-1
Q: php print script without printing print button

user2961106hi i have a print script to print the page $print9 ='<script> function printpage() { window.print() } </script> </head> <body><input type="button" value="Print" onclick="printpage()"> </body> </html></div> '; echo $print9; it works perfectly but it also print the p...

0
Q: Make var_dump look pretty

tPlummerI have a simple $_GET[] query var set for showing testing data when pulling down queries from the DB. <?php if($_GET['test']): ?> <div id="test" style="padding: 24px; background: #fff; text-align: center;"> <table> <tr style="font-weight: bold;"><td>MLS</td></tr> ...

0
Q: Wordpress: how to show two posts per custom post?

aurelI have some custom post types. I want to loop through three of them and only show two posts per each post type! The following code works, it gets the posts I want, however if there are 4 posts in 'humour' and 2+ in 'crime', the query never gets to 'romance' posts $args = array( 'post_type' => a...

0
Q: mysql select unique product id and order by stock id desc

zmeutzI'm trying to get unique product from stock... stock table: id - product - quantity 1 2 0 2 3 5 3 2 19 4 4 3 5 2 8 result id - product - quantity 5 2 8 4 4 3 2 3 5 it's work with...

0
Q: laravel hybridauth login Undefined index: oauth_token

Mirza Delici used this tutorial for hybridauth and laravel: link I set twitters key and secret, now when i go to http://127.0.0.1:8000/social i get error: Undefined index: oauth_token Does anyone know what can be a problem here? My config: // in hybridauth config array "base_url" => "http://127.0.0....

0
Q: Access multiple objects/arrays in JSON in jQuery $.each

user2880254I am trying to build a simple page to view messages saved in a mysql db via JSON and jQuery. My JSON IS {"unread_msgs":[{"id":"6","title":"33333","user1":"19","timestamp":"1383747146","client_id":"Generic"},{"id":"5","title":"42142","user1":"19","timestamp":"1383740864","client_id":"Generic"}...

1
Q: PHP Ajax not working

KostisI have 3 buttons on my page and depending on which one the user is clickingi want to run through ajax call a delete query in my database. When the user clicks on a button the javascript function seems to work but it doesn't run the query in php script. The html page: <?php session_start(); ?> <...

1
Q: PHP: array_values + json_encode returns "strange" string

Bob JansenI'm running into a strange problem when indexing the array numerically with the function array_values, and than encoding it into JSON. Here is a quick explanation how my script operates. Firstly, it fetches data via query from the database and prints the following out: Eg: Array ( [0] => Array ...

0
Q: Running php script from comand line

TinydanSO I'm trying to get a php script file to run from command line. This is a test of the command as when I have it working i should be able to make a scheduled task using that command to run the script every five minutes. Oddly enough when running it from the command line I get an error but if I we...

0
Q: Adding an PDF attachment when using Zend_Mail

Tudor RavoiuWhat is the right way to add an attachment when using Zend_Mail? I keep getting the following error when I try to open the attached pdf in the sent mail: "Cannot extract the embedded font 'BAAAAAA+ArialMT'. Some characters may not display or print correctly." The PDF shows only the table but no c...

0
Q: Joomla's direct link changes site position

user2961159I use direct links to articles, i.e. index.php?option=com_content&view=article&id=11&catid=2&Itemid=490 The new page loads in strange position (under the menu I guess). Is there a way to chcnge it? Or set the specific position? I tried with anchors, i.e. index.php?option=com_content&vie...

0
Q: Android with PHP MySQL

user2961140Please, I am new to PHP with Android. I have the PHP file on server and I want the Android app to call this file for data storage in MySQL. Android Code: package com.mobii.contactapp; import java.io.InputStream; import java.util.ArrayList; import org.apache.http.HttpEntity; import org.apache....

0
Q: Store file in database, in serialized table field type: text, call for advice

BradBefore I try and dive in, I am extending an add-on that was built to allow others to add new widget types without having to code the CRUD, with that said, it stores it as serialized data. I want to build a widget that allows for an image upload and will I run into problems storing the file in th...

0
Q: Replacing alt and title with filter for each image in post (WordPress)

Danielle ZarcaroI have updated hundreds of images in WordPress with the proper alt and title information in the media library and now I need to get the page to render the correct information without having to update each page individually. It seems like using add_filter or something similar will do what I need...

0
Q: Execute whereIn on relationship through another model with eloquent

Kay LucasI'm trying to do some tricky (at least for me) stuff with Eloquent in Laravel 4. For a refinement on a page I need to get all objects of one or more types that lie within one or more provinces. Now I'm trying to figure out how to use Eloquent to retrieve that information for me (assuming it is po...

0
Q: Using html in a php echo statement

Imri PersiadoI'm trying to write html code in a php echo statement but I keep failing. echo "<option value='$_GET['b']'>$_GET['b']</option>"; error: Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in .....

0
Q: ADFS 2.0 InvalidNameIDPolicy

MGPI've configured an app on the adfs relying party trusts, so I can login using adfs/sso. After that i'va installed simplesamlphp to deal with that login, and process the response saml. this is my authsources config: 'myauth' => array( 'saml:SP', 'idp' => 'http://domain/adfs/services/tr...

0
Q: PHP SQL Syntax Error using Bind parameters

Jason Van MalderFirst, I use a MySQL POO API, there is the important part : public function query($query,$params = null,$fetchmode = PDO::FETCH_ASSOC) { $query = trim($query); $this->Init($query,$params); if (stripos($query, 'select') === 0){ return $this->sQuery->fetchAll($fetchmode); ...

0
Q: How Like link works in Socialengine

Mirza AwaisI am working in social engine and developing a plugin and widget in social engine. Say this plugin is about car so I want that on listing of my all cars, users can like the car. I have seen in code that request is sent on activity/index/like with action_id as param. This is the id which is liked...

0
Q: inserting foreign language to sql

user2755038i am trying to insert a foreign language text to my sql, i'd tried to do: mysqli_set_charset($con, 'utf8'); mysqli_query($con, "SET NAMES 'utf8'"); mysqli_query($con, "SET CHARACTER SET 'utf8'"); mysqli_query($con, "SET COLLATION_CONNECTION = 'utf8_unicode_ci'"); the SQL is also define as "Se...

0
Q: how to change values of csv while exporting in php

user1832681I have been working on a database. Now its the final step to export the data to a csv file. I have created the file and it works perfectly. But now the requirement is that the values that are saving in the database can be changed. I have no idea how to approach this. Bellow is the code that I wro...

0
Q: return true if mysql update statement excute and false when no row was updated

internally1i have a mysql update statement but it return true when rows are updated and when no row is updated. i want to knw if row was altered or not. here is my query: $q=mysql_query("UPDATE results set marks='$mark' and total='$total' where result_id='$rid'"); if($q){ echo '...

0
Q: PHP call methods of others classes

Paolo RossiIn my php project I've create 4 classes CONNECTION class Mysqliconn { public $mysqli; public function __construct(){ include "dbconfig.php"; $this->connect($host, $user, $password, $database, $charset); } public function connect (.....) $this->mysqli = new mys...

0
Q: Wordpress page keeps freezing

user2957834For some reason, when I go on an article page such as http://freelance.tstwebdesign.co.uk/how-to-work-from-home/ - It freezes when I touch the scroll bar. No idea what's happening. help!

0
Q: php : move an element having a certain attribute value at the end of the array

Matoeili have sorted an array of travel products by price . i'd like to move the products with a price =0 at the end of the list. Here is what i have tried: for($i = 0; $i < count($mes_voyages); ++$i) { if($mes_voyages[i]['prix']==0) { array_push($m...

0
Q: CActiveForm Yii blank data

user1776681I am upload an image and have a blank post data. Help me please! public function actionUpdate() { if(isset($_GET['TemplateId'])) { $TemplateId = $_GET['TemplateId']; }else{ $this->setFlash('error', 'Undefined templa...

0
Q: smarty - function include_php set arrgument file from array

user2961252i need include php and file path in array. controller $object['path'] = '/home/path/for/file/file.php'; $object['path'] = '/home/path/for/file/file.php'; $this->smarty->assign(array( 'object' => $object )); in .tpl - this throw error Fatal error: Uncaught exception 'SmartyCompilerExcepti...

0
Q: Sanitising user input with Medoo

ParadoxicalMedoo is a PHP database framework. Does anyone know whether I need to sanitise user input before using the insert() function? On the homepage (http://medoo.in/) under the "Why medoo?" section then it simply says "prevent SQL injection" but I don't know if that means it does it for you or that it'...

0
Q: PHP Javascript - separating variables for sql insert

John BeasleyA grid table is displayed via PHP/MySQL that has a column for a checkbox that the user will check. The name is "checkMr[]", shown here: echo "<tr><td> <input type=\"checkbox\" id=\"{$Row[CONTAINER_NUMBER]}\" data-info=\"{$Row[BOL_NUMBER]}\" data-to=\"{$Row[TO_NUMBER]}\" name=\"checkMr[]\" />...

0
Q: PHP: Foreach Loop for Empty Field Submission

user2961278First time asking anything here, so if there's an obvious way of doing this easily that's better than how I envisage it, please don't be harsh! Anyway: I have a form with multiple fields, each with a different ID. When the form is submitted, if the fields aren't blank and pass the validation, t...

0
Q: Autocompletition in eclipse pdt in codeigniter for doctrine 2 models

user2858970I'm writing a project using codeigniter 2 framework with doctrine 2 as ORM using eclipse PDT. I would like to know if there is a way to have the autocompletition working for the doctrine 2 Entities classes (the ones located in \application\models\Entities folder) I managed to have that working CA...

0
Q: WooCommerce PayPal IPN timed out

arbmeI am using WooCommerce and using PayPal to take payments. I have everything set up in woocommerce and I am in paypal sandbox mode. When I take a payment the IPN doesn't seem to be connecting as all orders have a status of 'pending'. I have never had this problem before when setting up woocommer...

0
Q: ttyUSB changes automatically in linux.why?

subaI have connected gsm(ttyUSB0) and gps(ttyUSB1) in linux.. after some time gsm is changed to ttyUSB1 and gps is changed to ttyUSB0.. why? what is the solution for it. anyone pls reply as soon as possible.Thank you.

0
Q: Cakephp; memory-leak with function from AppController?

BobI'm having a function in my AppController: protected function schoolCheck($var) { if ($var == $this->Auth->user('school')) { return true; } else { $this->redirect(array('action' => 'index')); exit(); } } This function checks if an user is allowed to be on a...

0
Q: Any good tutorial or reference about how to build service oriented application on php

XDeveloperI want to ask about any good tutorial or reference about how to build a service oriented application on php as general or with specific framework.

0
Q: php send curl request and wait for the response

bart2puckI am sending a curl request to a server that needs a few seconds to process the request and spit out a response. I believe my php script is continuing on and not waiting, therefore my foreach loop based on the response is spitting out 0 results. How can i wait for the curl transaction to comple...

0
Q: Php location format

user2448592I know very little about php / php admin, but what exact do all these "directories" mean? /mnt/target01/332465/351266/www.somesite.com/web/content/script.php To me it looks like: mnt - directory in Linux file system target01 - ??? 332465 - uid?? 351266 ...

0
Q: Multiple domains pointed to single WordPress site

MikeI am on WordPress (single site) using the Transposh plugin to have an English and Spanish version of my site. I want to have an English domain (let's say www.english.com) for the English version, and a Spanish domain (spanish.com) for the Spanish version. I have set up spanish.com to forward with...

-1
Q: Troubleshooting with display items

user2961194I've built the site andfor ranking down articles I used a module from joomla extensions. Problem is that when we finally number of articles to appear the sign of the item appears again while I do not want such a thing. if anyone knows any way how can I remove is asked to send me. Thanks!

0
Q: Problems connecting to db using Zend db as standalone

SlayI am migrating from ZF1 Zend_db to ZF2. I have problems connecting to the db and making a simple query. Appreciate if someone can guide me along. Below is my code. This is how i connect to db use Zend\Db\Adapter\Adapter; $dbo = new Zend\Db\Adapter\Adapter(array( 'driver' => 'pdo_mysql', ...

1
Q: error in SQL syntax (insert)

Imri PersiadoWell I'm getting this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc,fb_title,fb_pic,fb_url,fb_desc) VALUES('', '', '', '', '', '', '', ''' at line 1 For the following code: $sql="INSERT INTO p...

0
Q: wp_mail() in a loop, only sending to last address

Robert F BoordI'm using a plugin that allows you to send an e-mail to x amount of people. All you have to do is enter their "name" and "e-mail address". These entries are named friend_name[0] & friend_email[0] respectively. There are + & - buttons for adding and removing entry fields. The number in the $key go...

0
Q: PHP script not working GD Library installed

GO3DExpansionBelow is my resize.php script. I needed to install the GD Library and did so but I am still having trouble gettint the image to process like it used to my old server.HERE You can see with the error reporting on there is an empty image created and the following errors display: Warning: getim...

-3
Q: php adding ; to post variables

Tuur SwimbergheI'm using POST method on a login form, and one of my user has an ampersand (&) in his password. It seems like PHP is adding a ; to the password eg &test& becomes &test;& Anyone knows how to bypass / solve this?

0
Q: positioning the cell in pdf using fpdf

user2636368I am trying to make a pdf from the data entered by the user in a form. Im using fpdf to do this. As of now I have something like this for adding the data to the pdf - $pdf->Cell(40,200,'Descritpion'); $pdf->Cell(150,200,$_POST['element_1']); $pdf->Cell(40,400,'Descritpion2'); $pdf->Cell(150,400...

0
Q: Composer.json with Zend Framework 2

user2101411I am trying to install a module into Zend Framework 2 via composer.json but I am running into syntax errors Here is the actual code itself: { "name" : "zendframework/skeleton-application", "description" : "Skeleton Application for ZF2", "require" : { "php" : ">=5.4"...

0
Q: CI form_open_multipart changes the form data to be request payload

altsysetI am working with CI form_open_multipart to upload files and form data. Up until recently the function was working perfectly but now when clicking the submit button it just resets the whole form. I checked the submitted data chrome's developer tools and instead of form data, now its request paylo...

1
Q: What does "/./" mean in href link?

AmareKnightRecently I'm reading some webpages and I found there are a lot of usages like: href="/./foo/bar.php" Isn't this the same as href="/foo/bar.php"? Or is this there something I don't know about the differences between the two ways?

0
Q: Files not being uploaded in dynamically created folders/subfolders

Farhan Dharsii need help to solve this problem Files not being uploaded in dynamically created folders/subfolders! creating a dynamically subfolder using input type text ?? Here My Code //creating dynamically subfolders $folder = $_POST['folder']; $dirPath = 'uploads/'.$folder; $result = mkdir($dirPath); ...

-1
Q: .htaccess that redirects to index.html, or to index.php if there are parameters

JamrelianI am looking for a .htaccess that does the following: For users that visit mydomain.com the server should return the index.html file from the root. For users that visit mydomain.com/something/ mydomain.com/anything/123/ mydomain.com/some%20encoded%20text etc. the server should return the ...

0
Q: Force div's to expand to fill area

Fairplay89I am trying to create a fullscreen layout for a TV monitor project in CSS and have the layout dynamically fill the entire screen, regardless of screen size. My goal is to get a page looking like so: ---------------------------- | header | ---------------------------- | l| ...

-1
Q: Parse php code outputted with print() command

FlawedspiritI am writing a PHP script for my site that takes information from a form, does calculations on it, and returns the result in a new page. What the program itself does isn't the issue here, it's how to format the output. Below is the part of my program that finally writes stuff to a webpage: .... ...

0
Q: Is there any way to use php curl to resolve via my hosts via or specify the host?

dave sanchezI'm using CURL but I keep getting caught by CloudFlare's annoying check against my scraping. I have the direct IP of the server and I'm trying to access it outside of Cloudflaire. If I change my Windows hosts file I access the site directly with no problems. I've changed my host file on my ser...

0
Q: PHP JODConverter PDF/A alternative

user1034380I'm working on a PHP project I have to convert html documents to PDF/A I am currently using the library JODConverter (http://www.artofsolving.com/opensource/jodconverter) I have two issues with this library: When converting to PDF/A, in the final document images are not displayed :( JODConver...

0
Q: What is the best practice for using non-namespaced classes within namespaced class

Pastor BonesI am creating a library using the wonderful new namespacing features that PHP has implemented in recent updates. However, I need to use the simple_html_dom.php class from within one of my classes. I'm using a standard PSR-0 compliant autoloader class, but I'm getting errors when trying to create ...

0
Q: Variable not stored in array

user1871949I have the following which checks a list of keywords against urls: function searchUrls() { $result = array(); $urlList = file("link_to.txt"); $keywordList = explode("\n", file_get_contents("link_to.txt")); for($index = 0; $index <count($urlList); $index++) { $ur...

0
Q: Optimal way to auto select option from select drop down after submit

AnchovyLegendThe problem I am running into is, when the form is submitted, the user's dropdown selections are lost and I would like the dropdown menu selections to be auto selected on load, after submit (form posts to the same page as it is submitted from), based on the users drop down selections. I was won...

0
Q: .htaccess - redirection does not work on mobile phone

pc_ocI have a site that will generate qr-code, and accessing qr-code will store the number of the visit and will be redirected to another page. The computer works perfectly, but not on mobile phone. The qr-code has this link: http://builtbydoctors.com/qrcodes/titulo-qr/98 the link, the "title" varies...

0
Q: Posting email adress from flash to mysql using as3 and php

SNSDGingerim trying to send a name and email address from flash to an sql server, but i can't seem to get it working. Heres the code. import flash.events.Event; stop(); submit.addEventListener(MouseEvent.CLICK, sendData); function sendData(evt:MouseEvent){ //if(email.text!="" && name...

0
Q: empty page after executing statement

An Nguyễn Lê TháiI write a program that output the animal name from the database.However I'm having a problem that my program can not execute the case when it doesn't find the right value (values that are not in the database) <?php $host='localhost'; $user='root'; $password='root'; $dbname='pet'; $connect=mysqli...

0
Q: Facebook Payment Verify Token

user2284703I've tried to understand facebook's tutorials on this but it's as if those things were written by monkeys or something. I have no idea how to do this via their explanations.... I am setting up realtime updates and keep getting back the wrong or no response at all with the verify token test. Ob...

0
Q: Prime Factorization Program PHP

user2961444So I am currently trying to code a program that will find the prime factorization of any number. I have been successful in doing so, I am just getting caught up on having it be represented properly. For instance, the prime factorization of 82944 is (2^10)*(3^4). My program successfully finds t...

0
Q: PHP - MySQL Not connecting?

user2766367Im trying to do a mysql query but for some reason this is the error I'm getting: Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home1/server/public/chat/includes/functions/chat.func.php on line 9 Line 9 is as follows: l6 $query = "SELECT `Sender`, `Me...

0
Q: jQuery Ajax Post, Add them to DB, Return Data and repeat the Process again

Levent KayaI'm completely confused so please let the logic clearer. Here where i get my data from db. index.php $sorular_hepsi = mysql_query("select * from tblsorular where hafta=1 order by rand() limit 2"); $soru_ust = mysql_fetch_assoc($sorular_hepsi); $soru_id = $soru_ust_rs["id"]; ...

0
Q: Get PHP associative array from MySQL

user2961195Iam trying to place data from SQL into array and simultaneously make the same array associated with name of source columns. This is function, what I got: GetRowFromDb("`id`,`name`,`email`", " WHERE `id`='1'", "database1", "table1"); function GetRowFromDb ($column, $condition, $database, $table)...

0
Q: Updating Magento Country Directory

Mickey FreemanThis issue specifically involves the country Netherlands Antilles, which was apparently disolved in 2010. The issue is that its still listed in my Magento store and when customers select it they get no shipping options because the USPS API spits it out saying that this is not a valid country name...

0
Q: HTML5 and Javascript Upload progress bar

Tonny StruckHi there i am working on upload progress bar. Here is my Javascript code: <script> /* Script written by Adam Khoury @ DevelopPHP.com */ /* Video Tutorial: http://www.youtube.com/watch?v=EraNFJiY0Eg */ function _(el){ return document.getElementById(el); } function uploadFile(){ var file ...

0
Q: Custom mvc router having problems with hyphen in links

Glend GjermeniI have written a basic Router class for my MVC, however I'm having trouble to use hyphen in my links, it gives a 403 Forbidden for existing links, however for non-existing ones it prints them out correctly and gives a 404 error page. My controller classes are of the form Link_Here and I change t...

0
Q: Make JSON obj and send it via jQuery AJAX to PHP and respond to it

Babakslti'm working on this now for about 2-3 hours and i cant find where i'm doing it wrong. this is my jQuery that is going to build an object: var data = {cat:[],count:[],size:[],type:[],print:[]}; $("#Cat-list option").each(function() {data.cat.push($(this).val());}); $("#Count-list option").eac...

0
Q: Changing the php array ouotput

Phil Harmoniei have this function public function select($table, $rows = '*', $join = null, $where = null, $order = null, $limit = null){ $q = 'SELECT '.$rows.' FROM '.$table; if($join != null){ $q .= ' JOIN '.$join; } if($where != null){ $q .= ' WHERE '.$where; ...

-2
Q: How to create simple login and registration form using php

user2961517i've already created the database which contain dept_id, dept_name, staff_no, username, and password. anyone can help me with the php script on how to create a registration and login page based on the database that i've created. thanks in advance.

0
Q: How to merge Arrays in php

Virat21How to merge many Arrays in php $array1="Array ( [0] => mouse ) Array ( [0] => mac ) Array ( [0] => keyboard )"; how i can array like this Array( [0] =>mouse [1] => mac [2] =>keyboard );

0
Q: Infinite redirect loop in symfony2

Odiel LeonI have defined a set of url for my [categories] controller, so far everything works perfect, now when an invalid or wrong fabricated url is requested: www.mydomain.com/categories/?q=asd/&qry=asd I get a browser error (This webpage has a redirect loop), at this point the request is not able to a...

0
Q: PHP Reference for MySQL query

Natalia SosnowskaMy function: function sql_query($s, $x) { $query = mysql_query($s); global $mysql; while($mysql = mysql_fetch_array($query)) { return; } } Now it's work only with $mysql variable: echo $mysql['username']; How to make it works only with: sql_q...

0
Q: Symfony2 multiple choice is not validating

MatiI'm creating a simple list of shop carts with users and products assigned to it. My form for new cart looks like this: public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('cartName', 'text', array('label' =>'Nazwa koszyka:')) ->add('user', new Us...

0
Q: Unite Revolution Slider Conflicts With jquery in Joomla

JoelWhenever i add the script below in the body of my joomla template (i.e default.php), Revolution Slider stops working. <script language="javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> Please advice me on how to solve this confli...

0
Q: Does the xdebug trace always tell me the cause of a PHP Segmentation Fault? If not, What else would tell me the cause?

RayOnAirMy "Connection to the server is reset" every now and then, while trying to open any one page of my website. When it crashes, I get a “[notice] child pid XXXXX exit signal Segmentation fault (11)” in my apache_error.log. I tried using the xdebug trace with variable assignments ON to back trace th...

0
Q: Notice: Undefined index: name, cannot insert data

Mohamad Noor Qusyairi Manlananother problem is here. i'm created insert data into database. Then, i got the error Notice: Undefined index: name on the line 252.. here is my code..below is form code.. <form id="form1" name="form1" method="post" action="<?=$_SERVER['PHP_SELF']?>"> <input type="submit" name="subm...

0
Q: PHP - How To Compare Alike Data?

ethanparkrIn PHP, how to compare two "alike" data? For instance, in this code: $a = "cats are cool"; $b = "1. catS are cool!!!" if($a == $b) { echo "TRUE"; } else { echo "FALSE"; } now the obvious output will be "FALSE". But to what I'm trying to achieve, as long as the keyword "cats are cool" ...

0
Q: Is it possible to make one post category unsearchable in wordpress?

StephenBI have a category that I don't want to be searchable in my wordpress site. The category is for employees only. I have created a username and password on my site for them to access and also a simple rss feed web app to view it from their phones, but I need it to not be searchable on search engines...

0
Q: Multiple IDs in PHP call in WordPress

SarwicI was wondering if anyone knew a clean way to use multiple custom fields in an IF statement. At the moment I have it spaced out, so each custom field "SponsorHeading#" has it's own if/else statement: <?php if(get_post_meta($post_id, 'SponsorHeading1', true)) { echo '<h2>Summit Sponsors </h2>...

0
Q: php, mysql, and ajax: dynamically display default data, select existing, or add new

RicI am developing a website where a user must choose a (snail)mailing address. I want the the html web form to display the user's default address (from the mysql db). I also want them to be able to choose an alternate address that they have already entered OR to enter a new address. (Think billin...

0
Q: Replacing xml file on web server while being served

user501223I am implementing an xml caching server in php and I have the following question. The web server will function as a simple file caching server. It will accept requests for certain xml files from clients, check if the file exists and is 'fresh' and if so, return it to the client. If the file does...

0
Q: Laravel Form::select() is automatically selecting one option

user1238763I'm using Laravel 4, and FormBuilder seems to be selecting one of my drop down options without assigning a default value. In my view, I am populating a select with an array. Something like this: $rootCategories = ['1'=>'First Cat', '2'=>'Second Cat', '3'=>'Third Cat', '4'=>'Fourth Cat']; and I...

0
Q: Using MySQL CURTIME() & ADDTIME() how do you combat midnight transitions?

SirBTI have a table (flightSched) which contains flight numbers, flights arrival days, whether they arrive or depart and most importantly their Arrival times as illustrated below. +-------------+----------------+-----------------+-----------------+ | FlightNo | don | depOrArriv | a...

0
Q: PHP page redirect not working

PK333Does anybody have any ideas why the below page isn't redirecting? My php file that I want to redirecting is: <?php require_once("../includes/db_connection.php"); ?> <?php require_once("../includes/functions.php"); ?> <?php if (isset($_POST['submit'])) { } else { redirect_to("new_subject.php")...

0
Q: My function can't output from database (PDO)

Charles KrookThis function wont echo the $title, the code inside the function works great when I put it directly in the index file but when I make a function out of it it doesn't echo anything. I can make a function just echoing "Hello" but this wont work. I have checked that the connection file is included...

0
Q: Param count and argument count don't match and sqlsrv_num_rows

Todd ThelinI am trying to get the count of rows returned with this code: $selectLogin = "SELECT * FROM user WHERE username = "user" and access >= 1"; $queryLogin = sqlsrv_query($conn, $selectLogin); $countLogin = sqlsrv_num_rows($conn, $queryLogin); echo $countLogin; And I am getting this...

0
Q: Mysql_query return value one but database not effected

user2961617i'm going to update a row into mysql database. the senarius is: taking the values from a form and redirect to another file and set the form values to database using update statement. the problem is that mysql_query return value 1 and does not return any error but when i check the database through...

0
Q: SOAP webservice not work with SOAP_PERSISTENCE_SESSION

gavecmy webservice is dependent on serveral objects. All of these dependencies are passed through webservice class constructor. The problem occured when I implemented new property, where I want to persist data between requests. Yea, I used setPersistence() method with SOAP_PERSISTENCE_SESSION parame...

0
Q: Update a payment_status from "Pending" to "Completed" with PayPal IPN. Does it resend the txn_id?

DavidOn the PayPal site in their PHP code for dealing with the IPN they do some minor checks and then put in some comments as to what to do next. One of the comments is // check that txn_id has not been previously processed Indicating that if it has been processed there is something wrong. What h...

0
Q: Error Establishing Database Connection hell continues

CiganaI have created a copy of may wordpress site locally (importing the SQL) and going through one connection bug after the other for days and I'm really almost giving up. I went through several Database connection errors and now I am on another for which I cannot find an answer in the forums. I am ...

0
Q: digitally sign XML file with PHP

Leandro BattochioI need to sign a XML file with a private RSA key to be verified with my C# application. When I sign the xml with my C# application, this is the final output: <Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> <SignedInfo> <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c...

0
Q: How to split a string into 3 different variables in PHP?

ExoonI have a bunch of checkboxes with the names like the following: q1_week1_monday How can i split these strings into 3 different variables, for example $quarter = q1; $week = 1; $day = monday; Thanks

0
Q: Send Data from PHP script to a SOAP application errors

DenoteoneAfter reading up on SOAP and how to send data from a PHP script I am more confused then ever I know what the WDLS because I was sent the layout in via email but I do not have a URL to access it. I have the WDLS and in a nutshell this is the data I need to send: <?xml version="1.0" encoding="utf...

0
Q: Saving multilpe filename (img_path) in one row separating with commas or |

KiatsuThe code I have worked except, it's only saving the first filename in the database. I want to be able to save them under img_path in one row separated by commas or | ---> img1.jpg, img2.jpg, img3.jpg or img123.jpg|img456.jpg|img789.jpg Form: <input type="file" name="img[]" multiple="" />...

0
Q: How to access current context in php mustache as a function?

EvertRight now I have something like this in my mustache template: {{#render}}{{widget}}{{/render}} And I have a viewModel which contains this code: public function render() { $View = $this->_View; return function($widgetName, Mustache_LambdaHelper $helper) use (&$View) { $widget =...

-4
Q: How to show the query inside PHP?

user2961451i have a SQL query and i want to insert it in a PHP file this is it SELECT SUM( value ) FROM table name WHERE field_id IN ( 31, 33, 35, 37, 39, 41 ) i want it to appear in the browser as the total is : "value of the SQL" can you help me please

0
Q: zclip embedded zeroclipboardmovie container position not aligning with button

user2765920I'm having trouble aligning the clickable area for the zclip button with the actual button. This page shows the button with the problem: http://www.dropshiplounge.com/test-page/ This is the code I'm using for the zclip: ` jQuery(document).ready(fun...

0
Q: Russian and spanish character for fpdf

user2711681I am trying to represent some russian and spanish character in fpdf. I am trying to follow few links like this one FPDF utf-8 encoding (HOW-TO) which states the use of $str = iconv('UTF-8', 'windows-1252', $str); or $str = utf8_decode($str);. Unfortunately both is not working. Let me describe fur...

0
Q: Google Analytics installation confusion

c s hI am trying to install GA on a new WordPress website (PHP). From the 'tracking code' section I do understand they need to go right after the opening tag. Did and the status says "Tracking Not Installed" . From the status learn more button I understand it needs to go right before the tag. I hav...

0
Q: How to search Facebook posts with images to generate a gallery?

APCOMI use this URL: https://graph.facebook.com/search?q=HASHTAG&type=post&limit=999&access_token=MYTOKEN with Facebook SDK, app ID and secret... But only returns text posts.. See: http://ap217.com/fbhash/fb_app_hash_images.php?hashtag=espiritosantovixon And see on Facebook: facebook.com/hashta...

0
Q: How do I inspect response headers in laravel for unit testing?

bigmandanI have seen many examples on how to set headers on a response but I cannot find a way to inspect the headers of a response. For example in a test case I have: public function testGetJson() { $response = $this->action('GET', 'LocationTypeController@index', null, array('Accept' => 'applicatio...

-1
Q: how to check which port is being used to send emails?

Manoj KumarEmails are processing very slowly and on an average of 500 / 20 minute. and there is a queue of 40000 yet to be send. How to check which port is being used. There are two ports 25 and 26. I am not sure how to check which port is being used. Also how to check where SMTP error log is located. T...

0
Q: How select multiple in google chart?

Patricioi need to do a chart with googlechart. To this chart i need add a filter like "select multiple". <select multiple="multiple"> <option>1</option> <option>2</option> <option>3</option> </select> The code that i use is: get_json.php <?php $con = mysql_connect('localhost', 'root', '123') ...

0
Q: $this->value = $dbarray returns nothing

user2922892So I am trying to learn about class and function etc, and im stuck on trying to return value from MySQL. php code: <?php class SQL{ var $value function GetMYSQL_SERVER(){ mysql_connect('127.0.0.1','root',''); mysql_select_db('admin'); $q = "SE...

0
Q: Foreach with 2 $i

Sam FisherI'm trying to run 4 identical queries with different numbers, like so: for($i=0;$i<5;$i++) { $sql[$i] = "SELECT * FROM whatever"; $sql[$i.$i] = "SELECT * FROM whatever2"; $res[$i] = mysql_query($sql[$i]); $res[$i.$i] = mysql_query($sql[$i.$i]; while ($row[$i] = mysql_fetch_a...

0
Q: Trying to call object methods in array

user2202284Im learning php and i made this simple class for creating form. class form { private $pole= array(); function addText($name, $label){ $pole[] = new input($name, 'text', $name, $label); } function create(){ foreach ($this->pole as $polozka) { $polozka->addInput(); } } } c...

0
Q: Using Client Side Script For Google Geo Location

user2737457I'm creating a website that uses Google Geocoding for site registration. At the moment the code I'm using is server side but I would ideally like to have this as a client side script. How do I convert this: $id= mysqli_real_escape_string($con, $_REQUEST["id"]); $postcode= mysqli_real_escape_stri...

0
Q: Javascript and ajax post methond?

Tonny StruckI am currently working on one upload progress bar with HTML5 and Javascript/Ajax. So here is my Javascript code: function _(el){ return document.getElementById(el); } // Submit the upload form function uploadFiles(){ var file = _("upfile_0").files[0]; //alert(file.name+" | "+file.s...

0
Q: Find file size of a remote file without downloading it

dev.e.loperFollow up on the answer given here http://stackoverflow.com/a/2602624/37759 This solution works for image or pdfs, however, when I try it with text or javascript files curl_exec return false. Why? For example getting file size of jquery file https://raw.github.com/jquery/jquery/master/src/ajax.js

0
Q: Loading images dynamically slow, jquery, php

magarasI am developing a website that has some photos to display, divided in albums. Each photo's path is stored in a database. I want to display the photos using a jquery gallery plugin. The problem is that the photos are taking forever to load, which sometimes causes the browser to crash. I have tr...

0
Q: Facebook event URL regular expression

user2961613Given the following Facebook events URLs, my intent is to extract event id The match that i need is XXXXXXXXXXXXXXX Example 1: without slash between "...ZZ" and "!/eve...." www.facebook.com/events/ZZZZZZZZZZZZZZZ#!/events/XXXXXXXXXXXXXXX/ Example 2: with slash www.facebook.com/events/ZZZZZZZZZZ...

0
Q: rotating list per refreshing page

user2961739Lets say there are three rows of information that loads on a site, and on the site, you only want 1 of the 3 rows to load each time the page gets refreshed, so it probably should be sorted by random or something better. what is the best code for this?

0
Q: Calculating possible tournament outcomes

user2961751I am trying to write a section of code in PHP which will work out for each team the best and worst possible outcome from a round robin type tournament. This code will be executed after each round of games and so will lookup the current W-L-T record for each team as well as the future schedule of...

0
Q: populating a second select box based on first select box value

user2886669I have a standard select box which is populated from a database query <select id="filter-salary" name="s" title="Salary"class="chosen-select" style="width:170px;"> <option value="Annual Salary">Annual Salary</option> <option value="Hour...

0
Q: How to self reference in PHP ActiveRecord

PadraigI have a table "categories". Each category could have a parent category. Categories id parent_category title There is only one parent_category for each category My questions are : What is the code for the Category model? Given a category '$category' what do I type to output t...

0
Q: html email with php from form

PackyI have a review page that pulls data from a form like this echo (!empty($_REQUEST['FW15LieAngle'])) ? "<div class='reviewItem'><span class='reviewTitle'>15.5 Lie Angle:</span>{$_REQUEST['FW15LieAngle']}</div>" : ""; so if they did pick that option it wont display on the form. At the end of the...

0
Q: Namespacing views in Laravel

Mark LewisI was referred to Juggling Larger Laravel Applications and I'm havihng trouble getting View::addNamespace('Marketing', __DIR__.'/../Views') to work in one of my sub-app directories where the views are located at /var/www/myapp.com/app/MyApp/Marketing/Views Placing this code in my /var/www/my...

0
Q: Need a basic example of working with cPanel's XML API PHP Class

David ConnerWell I've search high and low and still cant get any result. I am trying to create an addon domain (I have a shared hosting account) this sample code is from github I would appreciate it if someone could explain this code line by line. <?php include '../xmlapi.php'; $ip = getenv('REMOTE_HOST')...

0
Q: which data structure stores data in "type:length:value" triplets?

NasserSalam (means Hello) :) parsing output of a third party script, which was stored in a MySQL database, I encountered data structures almost like JSON, but in a triplets of: type:length:value this is a example of it: a:1:{ s:5:"title"; s:28:"<div>This is item title</div>"; s:9:"perm...

0
Q: How should I select items from a list based on keyword when each item might have several keywords (or phrases)

TecBratI started out like this, but decided it would be way too long winded if I get more items. $keyword=getKeyword(); switch (true) { case $keyword=='special product': $keyword_custom_items[]='SPECIAL'; break; case ($keyword=='other special' || $keyword=='other specials' || $keywo...

0
Q: How do you access the html of a wordpress site? How do you change the body?

user1845888I want to make the body of my wordpress site into two columns and I'm having trouble finding the script that allows me to do that. I'm using firebug to tell me where the source code is but it doesn't tell me which template it's in. Can anyone help me!!!!!

0
Q: The right way to call a service function on sails.js as soon as I start sails.js

JumpLinkI want that my sails.js application communicates with a php client. I've create a new dnode server service in sails.js for that. This service can start the dnode server. Currently I start the server with a controller by a request, but the server should always listen for clients. What is the right...

0
Q: how to make form calls php only if javascript function returns true?

Amgad Serrypretty much the title everything works fine but the problem is when i press submit it calls the php function even if the javascript function returned false. <script > function validateForm(){ var formData = document.forms["Signup Form"]["FirstName"].value; var div = document...

0
Q: how can I delete lines that I read them from file line by line in php

fahimehI have a code here: $file = fopen('a.txt', 'r'); while (!feof($file)){ $word = trim(fgets($file)); // calling a function on $word } I want to delete the $word at the end of while, How can I do this?

0
Q: Codeigniter assets folder best practice

Miguel StevensI'm fairly new to codeigniter, But i'm learning well, I'm going to add a css, images, js, ... folder but I'm not sure where to put it Someone told me to make a 'public' folder system application public css images And then in your index.php ( in the public folder ) adjust accordingly ...

0
Q: FormHelper auto add empty fields to database

FaceOfJocki'm developing a module for prestashop 1.5,this module contains a form in back office generated using FormHelper,the problem is that i used to add manually objects to database , but always an other empty object is added. I checked the form action , and i found a parameter &submitAddMyModule=1 , i...

-1
Q: excluding title from html using regex

cyclicI am getting page html code. I could remove all html tag and script. Also wanted to remove <title> whatever here </html> Tested all solutions on SO. No help What's wrong here? function plaintext($html) { $plaintext = preg_replace('#([<]title)(.*)([<]/title[>])#', ' ', $html); ...

0
Q: How to send a table with sql information through php

WyattI am trying to display a table onto a html page that contains users sql data. Assume I can connect and there is information in the table <?php echo "<table> <tr> <th>First Name</th> <th>Last Name</th> <th>Hair Color</th> </tr>"; $resu...

1
Q: Using anonymous functions to generate arrays in PHP

JosephI have this code chunk $data['cp'][$key]->prominence = $meta_data['prominence']; $data['cp'][$key]->related_link = (function() { $arr = array(); for ( $i = 1; $i < 4 ; $i++ ) { $rldata = array(); $rldata['title'] = ...

-1
Q: Password limitation

hamidreza eyvanakiIm new in web developing and not sure what limitations i should set for my website registration . Im using the php code below but not sure if there i should really limit my password to alphabet and numbers . if i support other characters then i will have security holes in my site ? and my Sql won...

0
Q: How do you make a canvas where the user can place and image?

user2961869It's so that the user can drag images into a "canvas" to make a design (a bit like making your own emblem in battlefield). They have to be able to place the images anywhere on the canvas without it snapping to the top left. I understand that there is not one answer solution but a simple push in t...

0
Q: Codeigniter 2 level URL

Adam LesniakI'm working on CI controller, and have problem with achieving URL I want to get. I want to achieve URL like: /someclass/url1/$id/url2 class Someclass extends CI_Controller { function __construct() { parent::__construct(); $this->load->helper('url'); ...

0
Q: Best way to do search word structure?

Gerner ChristensenI want to build up a database where there will be about 400 strings. I want to make the database searchable. The structure of the database will be like: Brand | model |additional products | price | search words | (this is 1 string, there will about 400 strings) There will be between 2 and 50 se...

0
Q: Saving user permissions in session file

SplicaninIs it a good idea, security wise, to save user permissions in session? For example, I have permission like user.addNewUser and user with that permission obviously can add new users. Now, I do not want to check if user has permission (requires SQL) every time he tries to use endpoint - but just c...

0
Q: how to use jquery ajax array post json?

Daloconfirmi want to send array in ajax json post ,but some code are error.how to fig this code? HTML <table width="200" border="1"> <tr> <td>table</td> <td> <input name="table[]" type="text" id="table[]" value="5" /> </td> </tr> <tr> <td>menu</td>...

0
Q: using index.php at the end of the url gives different result

Ayman El TemsahiI have this website which has a very weird problem. The link to the website is http://www.spesusc.org/, but when I open it, it has many missing things. The weird thing is that when I open http://www.spesusc.org/index.php, it gives me the website with no errors. I checked the .htaccess file and...

1
Q: How can i write a SQL query to enter data into this database?

ExoonIve got a food menu which needs to have a pattern for when certian menus are displayed on a website. For example, The pattern is split into Yearly quarters, Weeks and days. **Quarter 1** **Week 1** Monday: 5 Tuesday: 4 Wednesday: 5 Thursday: 4 Friday: 6 Saturday: 7 Sunday: 7 The numbers repre...

0
Q: Where do I even begin with mod_fcgid.so

HaraldoI am creating an environment on my local machine (Win 7) to run apache and php. I am reading how to manually setup the two: http://php.net/manual/en/install.windows.apache2.php It says: Obtain mod_fcgid from » http://httpd.apache.org/mod_fcgid/. Win32 binaries are available for download f...

0
Q: Unit testing model validation

jurkaI wan to create the tests for the Model validation. The actual problem begins by inserting custom data, which gives fatal error. Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 124780544 bytes) in ./fuel/app/tests/model/realestate.php on line 15 When I remove th...

0
Q: Is it possible to grant access to a folder in a SVN server using SVN's API?

SplendoniaI need to develop a web application (Using any language but I'm familiar with Frameworks Symfony2 and Rails), that is able to grant access to a user to a determined folder on another server on the same network. I found out that SVN has an API and that I could interact with it with PHP or Ruby (Ap...

0
Q: Simplepie stops updating feed?

user2600699I'm having an issue where my simplepie feed works for a little while, but then it stops updating without warning. If I go into the cache directory, it looks like the latest cache file is not a recent date. Here's my code - any advice? Could this be a memory...file size allotment issue? requir...

0
Q: implement virtual function with ostream

user2961918class STUDENT{ public: virtual void print(ostream&os)=0; friend ostream&operator <<(ostream &os,STUDENT &std) { implement...... std.print(os); return os; } }; //another class class LOCAL{ public: virtual void print(ostream&os); { how to implement in here if i using getter and setter m...

0
Q: Array returns nothing from mysql if more than one value selected

Jeremy TylerHow do I get all the results of my query to show? If my $author prints as Array ( [0] => 1 ) the query pulls correct data. However, if my $author prints as Array ( [0] => 1 [1] => 8 ) or any combination of values received from my form, then it returns empty. The array prints correctly, so I am ...

0
Q: How can wordpress function receive function as argument?

Ollicca MindstormHow can the WP function add_action receive another function as its argument? I know this by itself is not possible in php (to have custom functions receive other functions as arguments). I deliberately broke some code and found that there is actually a native php function call_user_fun_array bene...

0
Q: Updating and Saving in same php file

mauroim trying to update a value of the variable home all in the same php file, mas the value of the variable have to be saved in this same file, is it possible? How can i make it? I already been trying some tricks but no sucess, hope someone already passed whit the same problem i had. <?php $home ...

-1
Q: Cart updating the right item just the second time i click on "add to cart"

user2961930I have a great problem and I can't fix it.... I have been trying to solve it for seven hours, I am going to explain it now. I made a php cart using session and mysql (phpmyadmin on Aruba Hosting) The problem is that everything was working, and then (i don't know how) probably i changed a littl...

0
Q: Merging the values of each array in an array of arrays in PHP

LogicLookingI have a model object that comes back for a particular user, where I var_dumped object and got an array that looks like this: array(2) { [0]=> array(10) { ["ticket_labor_ot_travel_c"]=> string(5) "34.50" ["ticket_labor_travel_c"]=> string(5) "23.00" ["ticket_labor_ot_c"]=>...

0
Q: .htaccess setting error_display to E_ALL

IberoMediaI understand I can set error_display within .htaccess file using predefined constants: http://php.net/manual/en/errorfunc.constants.php I am looking for a number that would let me set the error_display to all but disable strict mode, warnings and notices I guess the equivalent of E_ALL | ~E_WAR...

0
Q: HTML5 and Javascript Upload progress bar - button vs submit input type

Tonny StruckHi there i am currently working on one HTML5 upload progress bar. I have very strange problem with my script. When i use in my HTML form: <input type="button" value="Upload File" onclick="uploadFile()"> The upload progress bar is working okey but IT'S NOT submiting the HTML form data. When i u...

0
Q: Accessing CI via a hook

Jess McKenzieI am unsure what I have missed but from my hooks/document.php I cannot seem to access CI I am getting: Cannot access empty property in on $this->$CI->load->model("routesHook"); Code: class hookRoute { private $CI; public function __construct() { $CI =& get_instance(); ...

0
Q: Product::getProductsProperties(): 'id_image' returns 'en_default', not image

Stephan VierkantI've build a module to make a custom page with some products. I've tried to //get all products $products_partial = Product::getProducts($this->context->language->id, 0, 1000, 'name', 'asc'); $products = Product::getProductsProperties($this->context->language->id, $products_partial); foreach ($...

0
Q: Automating website login and navigation from another website

Tim CavinessI have an application I'm building in PHP that will have the ability for its users to store username/password combinations for websites that they usually use. Ideally, when they're on a page referring to that site, I'd like a button that, when pressed, will take them to the site, login to it, and...

0
Q: Whats wrong with this sql?

Jon JamesI'm new to php and sql , so could you please help me by telling me how to fix this sql error. The sql is below. INSERT INTO xml-group (id,groupid,name,descriptor,cust_id) VALUES (1,1,'other contacts','other contacts',16) The error is: You have an error in your SQL syntax; check the manual...

0
Q: XAMPP DirectiveIndex issue (php development)

JaggaI'm having an issue with using XAMPP and the ability to use an includes folder in php etc. I'm learning how to use a single point access for my php files, by that I mean, you put only an index.php in the main folder to be accessed and it is it use classes that are located in the Includes folder o...

0
Q: Prevent continued loading of only current file without interrupting loading of parent file?

lsiunsuexLooking at the following structure: groups.php <?php include('header.php'); if($_SESSION['admin']) { include('groups_admin.php'); } ... html ... ?> groups_admin.php <?php if(!$_SESSION['admin']) { die(); } ... html ... ?> inside of groups_admin.php - performing the die(); causes the rest...

0
Q: Wordpress Dynamic Menu Being Added To DB But Not Displaying

Ricky MatakaNot sure if this is allowed but im pretty desperate at this point http://www.wpquestions.com/question/showLoggedIn/id/8959 Can you see if you can help me there.. i have a big convo started over there for this issue and cant get and answer on this..

0
Q: PHP script in aliased directory mistakenly handled by WSGI when using mod_rewrite

Kyleall. So I'm running Apache 2.2. I have a single VirtualHost that's used for a Django application (by way of mod_wsgi) as well as a PHP one that lives in a subdirectory. Normally, this is no problem. You can just Alias /subdir /path/to/phpapp followed by WSGIScriptAlias / /path/to/django.wsgi. Bu...

-1
Q: How to print rendered version of html files with php?

natecraft1I have a index.html page with a Print Report button which when clicked will render a page checkboxes.html that has checkboxes for each page. There are 4 pages, let's say, page1.html page2.html page3.html page4.html. If a user checks page2.html and page4.html then it will print the rendered versi...

0
Q: Collate several xdebug coverage results into one report?

dsummerslI am using the php-code-coverage to collect coverage information from one HTTP request (thru apache). I'd like to store the coverage data from several requests, and then collate the results into one comprehensive report. Is this easy to do? I was hoping for something along the lines of: <?php r...

0
Q: Unable to get Last-Modified from PHP header in shell script

Scubaguy1998I am using a bash shell script to retrieve the Last-Modified value from several webpages (Thanks Lri!). Here is the code that I am using: #!/bin/bash url=http://www.mywebsite.com tempdir=~/Library/Caches/scripts temp=$tempdir/mywebsite mkdir -p $tempdir modified=$(curl -sI "$url" | grep ^Last-...

0
Q: How do I constructively criticize my employee’s code?

epoolMy company has a small development team of three and six months ago we hired what is our newest programmer. He is an older gentlemen with some talent but we have struggled to align his coding style and logic along with ours. It’s to the point that he repeatedly makes mistakes and uses preference...

0
Q: Greek characters are not displayed correctly using loadHTMLfile

ShilloftanosThere is a webpage that I use the loadHTMLfile to get the contents of the page and it works correctly. There is one mistake though, because this is a greek page the characters I get are not correct. For example I post below the source code of the head and what the data I want to get looks like <...

0
Q: Google Maps V3 Overlapping Markers on exact Location

LearningI am having issues with markers overlapping, please do not down vote as I am not highly schooled in javascript also I have looked at the different answers offered on stackoverflow but have not been able to use them to find a solution so please help! The code is grabbing php for lat and long based...

0
Q: Unclear of posting data with Ajax

user2961968I'm learning to program and I have come along this tutorial: http://www.w3resource.com/ajax/working-with-PHP-and-MySQL.php there is one thing that is unclear to me. In this example there is a assignment: var data = "book_name=" + book; data is sent to php file and it is retrieved with statment ...

0
Q: PHP validate file image file extension error

Fábio LinharesCan anybody find the problem in this code ? It keeps returning "Invalid file extension_" ?php Check post_max_size (http://us3.php.net/manual/en/features.file-upload.php#73762) $POST_MAX_SIZE = ini_get('post_max_size'); $unit = strtoupper(substr($POST_MAX_SIZE, -1)); $multiplier = (...

0
Q: Set web directory path for console from other place than composer.json

patieIts possible to set web directory path for app/console from other place than composer.json in Symfony2 ? For example right in console file ? Need it to configure somewhere so we did not have for every time adding path argument. We need it because we need multiple app for one core - so we have ...

0
Q: PHP update SQL form

Seth ForzaI wrote this using various helper guides online: <?php // update if(isset($_POST['update'])) { $id = $_POST['id']; $emp_salary = $_POST['emp_salary']; $sql = "UPDATE pins ". "SET is_private = $emp_salary ". "WHERE id = $pinDetails->id" ; mysql_select_db('test_db'); $retval = mysql_query(...

0
Q: HTTPS to HTTP redirect doesn't keep custom URL

user2961763Let's say I have a domain name called: www.example.com/today.php?id=123. I got it to redirect to the url www.example.com/yes/123/some-name with the following code: Rewrite Rule ^yes/123/some-name$ today.php?id=123 But now I wanted to make that link always redirect to http when called from http...

0
Q: Deploying Laravel 4 on Hostgator

Mitch Glenni'm trying to deploy a Laravel 4 site on my Hostgator Shared Server. I'm getting this error: Warning: Unexpected character in input: '\' (ASCII=92) state=1 After some research, I've found that it has to do with the version of php Hostgator is running. I have added this handler to my .htacce...

 
7:59 PM
0
Q: php youtube video link signature

user2962004I am currently designing a proxy script . In my script to display youtube videos Should get the video link from source code and View by Script's Player . The script works well But vevo videos are not shown . I think the difference is Signature . In the normal pages Signature as shown "sig" But...

0
Q: PayPal express API call doesn't re-direct response back to my URL

Michael Smithfriends! Well, when working with Web Payments Standard and PDT, it was explained to me that when a user tries to pay with a credit card and without logging in, the auto forward back to my site does not work... same person recommended PayPal Express as my solution. So here I am implementing my v...

0
Q: Make a function of a class only visible in certain places in php

Sigurd B. SvelaI’m currently building a CMS and I have been trying to figure this out forever now. So, I’m building this CMS so that people may make Themes, Widgets. etc for it. My problem is, that there is functionality within the CMS core that i do not want developers to have access to, and whole classes tha...

0
Q: How to PHP_SELF in a UI dialog?

vnJSo I've been spending hours on finding something specific to my issue, but I can't seem to find any. I'm in the middle of creating a small CMS. My problem is that I don't know how to make a submitted form in a UI dialog to do the action of PHP_SELF inside of the UI dialog. I have a list of user...

0
Q: Link to external site from OpenCart

DwyguyI'm implementing OpenCart for a project, and I am wondering if it is possible to change a link already existing in OpenCart (specifically the "Checkout" button) to link to an external site. I don't really know PHP, but I'm learning. Can anyone point me to specific files to edit and what code t...

0
Q: ajax java cript check box change not working

John SinigerI am using the following ajax java script to pass values if checking is checked or not checked, The problem which I am facing is that it is working only for the first row from the mysql fetch aray and for the rest of the results it always sends checkboxstatus = 1 as a result, no matter if the che...

0
Q: How to get Zend Framework 2 action in a view

Gabor Varga In Zend Framework 2 I would like to get the current action from the layout html file, to know which menu is active (for css purposes). Has anybody information how can I do it? I tried many possible solutions but all of the was useless. Thanks a lot!

0
Q: What is the maximum filesize of a php script

Eric BruggemaWhat is the maximum filesize of a php script to be executed by php. Not uploading but executing (running) the script?

0
Q: Index.php issue with my site

user2671297Lately my website has been having issues with our hosts mySQL databases and it pops up telling me its their issue and not our forums (We use IPB) but once we started to receive these errors I am now having this issue when its linking me to go back to the index.php. Warning: require_once(/home/si...

0
Q: Time series issue for highcharts and preparing JSON via PHP

NoobsterJust a quick question re highcharts, and a working example provided by Sebastian Bochan here: Counting json data to create dynamic series in highchart line charts, with the following jsfiddle The code seems to work, but I am unable to load dates and display the series as timeseries. I know the ...

0
Q: PDO making a while loop function

user2887749Yeah I'm unsure how to even ask this question. Let me just try to make an example of what I want to do here. function getRecents() { global $sql; $buffer = $sql->prepare("SELECT * FROM `foo` WHERE `exposure` = 'public' ORDER BY `id` DESC LIMIT 5"); $buffer->execute(); return $bu...

0
Q: Merging arrays into one, while retaining the values of key=>value PHP

LogicLookingI recently asked a question about,merging the values of arrays in an array of arrays in php and got the correct answer, how ever it came with problems, ones I cannot figure out regardless of the var dumps or echos I place. Using the same array example, and the solution provided if I do: $result...

0
Q: Custom PDO Error try/catch

imperium2335Currently when there is an error with my SQL it throws the traditional error that looks like this: Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax...| I know I can achieve what I want by wrapping every SQL routine in a try/catch block but this seems a littl...

0
Q: PHP.ini error -- No permission

user2961387Trying to setup and configure my mac as a testing server. So setting up the php.ini, i get an error when trying to save my changes: Error writing /usr/local/php5/lib/php.ini: Permission denied I don't know why this happened or how to fix it (noob) -I am logged in as root.

0
Q: How do I get my programme to work with the function ob_start();?

user2962093I am student (not long being doing PHP so don't know a lot about PHP) but I am trying to get my code to work, at first it was working fine, until it was transfer to a different server but since it had I was getting the following error: 'Warning: Cannot modify header information - headers already...

0
Q: How to make HTML5 upload progress bar works with input type submit?

Tonny StruckHi there i am currenty working on one upload progress bar. Here is the code that is showing the upload progress bar: <!DOCTYPE html> <html> <head> <script> /* Script written by Adam Khoury @ DevelopPHP.com */ /* Video Tutorial: http://www.youtube.com/watch?v=EraNFJiY0Eg */ function _(el){ r...

0
Q: how do i setup nginx websites as in Xampp

appcoderI am trying to migrate from XAMPP to Nginx webserver. I used to have multiple websites running with Xampp with each web folder residing under xampp/htdocs folder. so for example, I will access sites(yii web sites) as [code]http://myserver/site1[code] and [code]http://myserver/site2[code] and the...

0
Q: How do I make sure certain portions of my page are unaffected by CSS changes?

user2962131I have a PHP page that allows a user to change the size of the page's font. However I want some text to remain unchanged no matter what the user set the font to. I implemented a system where the user can choose between small, normal, and large font but some text needs to remain the same size des...

0
Q: PHP/MySQL - Threading needs slightly different order

Toine LilleI have a MySQL table with id, parent and comment which I managed to order almost-as-it-should from newest to latest. If a comment has no parent, this is set to 0. The comments table: Table Image Hereby my current code: <?php $con = mysqli_connect('host','username','password','database'); if ...

0
Q: Ajax function to submit each form individually not working

Corn Hole LII have been trying to figure this out for weeks now but I am not a coder, just a poor broke website owner. I can get this to work if only one form but not with the multiple forms here. The ajax function addRecord(form) { var first_first_name = form.querySelector('.first_firstname').val; var f...

0
Q: FB SDK and cURL: Unknown SSL protocol error in connection to graph.facebook.com:443

jerrygarciuhUsing FaceBook SDK (fetched today) I am getting error Fatal error: Uncaught CurlException: 35: Unknown SSL protocol error in connection to graph.facebook.com:443 thrown in /var/www/clients/client18/web29/web/classDBI/base_facebook.php on line 996 I have gone over a dozen related posts and i...

0
Q: Laravel Eloquent Database Relationships and Foreign Keys

JoshI have two tables: use Illuminate\Database\Migrations\Migration; class CreateTransactionsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('transactions', fun...

0
Q: Passing Multiple JSON objects into an array based on checkbox

ARodriguez45My problem is I need to store a json object when a checkbox is clicked. I have figured out how to display the info in an alert box when i click the checkbox. (code below). The problem I am having is storing multiple json objects after clicking multiple checkboxes and having them all display toget...

0
Q: ChromeDriver "failed to start" when Selenium started via Jenkins (Mac OS X)

Paul SchreiberConfig: Mac OS X 10.8.5, java 1.6.0_65, Selenium 2.37, Jenkins 1.538, Chrome 30.0.1599.101, ChromeDriver v2.6.232908 and Firefox 25.0. I'm running tests using PHPUnit 3.7.28 and PHP 5.3.22 (using PHPUnit_Extensions_Selenium2TestCase). (1) If I manually start Selenium like so: $ java -jar ~/Dow...

0
Q: So, is this the right way of storing passwords in a database?

ParadoxicalWould the following be a safe way of storing a user's password in a database? When registering: $salt=hash("sha512", rand()); $password=hash("sha512", $_POST["password"].$salt); insert_values_into_db; When logging in: $given_password=$_POST["password"]; $salt=get_salt_from_db; $correct_pas...

0
Q: Change php property based on browser width

user2962114Okay, so i have searched for hours to no avail (most likely because i am not phrasing the question correctly). Anyway, i would like to change the "list" property of the following script to "big" depending on the size of the client window. SCRIPT <div id="calWrap" class="comType"> ?ph...

0
Q: Pagination woes - script working on localhost but not live

Grimbonie<?php $per_page = 1; $page = (isset($_GET['page'])) ? (int)$_GET['page'] : 1; $start = ($page - 1) * $per_page; $totalcount = mysql_query("SELECT COUNT(DISTINCT user_id) FROM images"); $totalcountplus = ceil(mysql_result($totalcount, 0) / $per_page); $totalcountone = mysql_query("SELECT DISTINCT...

0
Q: Is there a way to fill in a HTML form from a local text file? And save data from a form?

RVNORI was wondering if anybody know of a way to make the user able to browse for a local text file, then load the data from the text file to the HTML form on the webpage. This text file will be created from the webpage itself, containing it's specific values and saved to the users chosen path on the ...

0
Q: How to use xPath to get the data inside this tag?

ShilloftanosUsing the xPath, how can I get the data inside this tag ? <a href="/poker/?ca=v"> THIS </a> This is the source code, I do not know if there is a need of getting the tree though <div id="nav"> <ul id="someID"> <li><a href="/poker/?ca=v"> THIS </a></li> </ul> </div> ...

-1
Q: cannot update the rows of the database with arabic values

amr hafezthe function <?php function update_spare($user_id, $update_data) { $update = array(); array_walk($update_data, 'array_sanitize'); foreach ($update_data as $field => $rows) { $update[] = '`' . $field . '`= \'' . $rows . '\''; } mysql_quer...

0
Q: Laravel Polymorphic Relationships saving class name as string (efficient?)

shokoraI am looking into using a polymorphic relationship in my project. I have multiple roles that can are able to make posts and therefore every post needs needs a reference to a 'poster'. It seems like the polymorphic relationship from eloquent is exactly what I need for this. However the documentat...

0
Q: How to access values from stdClass in php

s-hunterprint_r($result); prints the below stdClass Object ( [result] => stdClass Object ( [insertCount] => 0 [updateCount] => 1 [rejectedCount] => 0 [totalCount] => 1 [errorMessage] => ) ) How can I get the values of i...

0
Q: Populate form text field from database based on dropdown field selection

N8DogI've dug through many posts but can't find a scenario quite like this on here... I have a PHP form that contains a dropdown selection containing option values from a MySQL database table. This part works fine. Here's where I need help... There is a textarea field that I need to populate with da...

0
Q: PHP Request Price for Selected Item

bloodstorm17So I have a table that has the following ItemID, ItemName, and ItemPrice. I have a drop downmenu that lists out the names of the items by the ItemID from the database. Now I want to show, based on what is selected from the dropdown menu by the user, the price of that item. Here is what I tried: <

0
Q: Transfer events in MySQL to google calendar

Mariana HernandezI want to integrate my web app with google calendar, but I don't know if I can add to the calendar events. I have saved in my MySQL Database, I have searched but nothing seems to be answered. I have a table with all the info google calendar needs, but I don't know how to integrate it and transfe...

0
Q: why is this if statement redirecting users to next webpage

wish i was good at phpI want to have the user continue onto the next page after clicking the submit button but instead right when this page loads it redirects the users to the next page. Also this code is giving me errors on the "else" statement above the header. <center> <?php include "functions.inc"; ...

0
Q: Getting fatal error when initializing Laravel app after a git pull while collaborating with other developers on a package

phirschybarI am working with another developer on a Laravel package. It has been going smoothly however whenever either of us pulls the other's work down from our git origin repo, we get an error. When we run php artisan dump-autoload We get PHP Fatal error: Class 'Canary\Station\Commands\StationBuildCo...

0
Q: (Client) SOAP-ERROR: Encoding: object hasn't 'JOB_NUMBER' property

dneimeierI am new to web services and am encountering a strange (to me) problem. I keep getting the "[Client] SOAP-ERROR: Encoding: object hasn't 'JOB_NUMBER' property" error when I include the following line in my wsdl: <xs:element name="SEARCH_ARRAY" type="ns:SEARCH_CRITERIA" /> My wsdl is se...

0
Q: PHP mail() function not notifying jQuery of success/failure

Robert F BoordPHP mail() loop is running, and sending properly, with no errors. However, my jQuery isn't working, to notify either a success or error message on the front end. PHP: add_action( 'wp_ajax_invfr_process_ajax', 'invfr_sendmail'); add_action( 'wp_ajax_nopriv_invfr_process_ajax', 'invfr_sendmail');...

0
Q: PHP SoapServer: how to compress response

user2962264I'm creating a webservice using PHP SoapServer which returns a very large xml document. I want to be able to compress the xml document that I return. Here is some sample code: $soapServer = new SoapServer($wsdlPath); $soapServer->setClass('MySoapClass'); $soapServer->handle(); MySoapClass co...

0
Q: How do I access methods like $this->getChildHtml() in other directories/pages in Magento?

StephenWidomAll I want to do is move a search box. This search box is currently displayed in the header, directly next to the logo, and is generated by the following code: <?php echo $this->getChildHtml('topSearch') ?> in /app/design/frontend/MYTHEME/default/template/page/html/header.phtml I would like th...

0
Q: Flexibility within 'Print/Echo'

Seth ForzaI made this code: <?php if($this->session->userdata('login_user_id')); $a = $this->session->userdata('login_user_id'); $b = mysql_query("SELECT * FROM user WHERE id='$a'") or die(mysql_error()); while($c = mysql_fetch_array( $b )) { Print $c['username']; } ?> basically it creates a ...

0
Q: Wordpress WooCommerce category image hover

user1269625I have this shop here: https://artendijen.com/shop/ and I was wondering if its possible to have the category image change image on hover? What I am looking for is if the user hovers over a category image, they will see like a slideshow of all the product images associated with that category. I...

0
Q: how to create dynamically multiple subdirectory into folder using multiple input type textboxes?

Farhan Dharsii need help to solve how to create dynamically multiple folders using input type textbox? i can create only single dynamically subdirectory into the folder but i want to multiple subfolder when multiple input type textbox are display? problem is that i can create only one subdirectory into the f...

0
Q: How to read arabic filenames in GD library?

SzamDevI'm facing a problem with Arabic filenames, for example when there is an image with Arabic file name, I'm not able to generate thumbnail from it but when the file in English everything is OK. I tried many thumbs generators but all of them have this issue, after some search it's GD library proble...

0
Q: Linking a results.php page to details.php page

user2962248I'm working on a website that shows all the restaurants in san francisco with their health inspection scores, address, violations and I have all the data. The first page is my index page and it's just a search bar that allows you to type in the name or keyword of a restaurant. This leads to my ...

0
Q: updating this sortable script to work with multiple menus

kdjerniganI have the following script that was initially designed to work with only a single menu. It was set up with ID's instead of classes, but I changed the ID's to classes to make the sortable work on two different menu's. Now, when I go to sort..the first one sorts and updates; however, the second ...

-1
Q: php mysql pagination without numbers

user2842079in trying to display Prevous/Next in mysql and php like this << prev next >> and not display like this << prev 1 2 3 4 5 next >> anyone who can help me with this Thanks,

0
Q: CodeMirror - PHP Mode Not Working?

user2812028For some reason its not displaying the text to be highlighted or anything, not sure why. Links: <link rel=stylesheet href="http://codemirror.net/mode/php/../../doc/docs.css"> <link rel="stylesheet" href="http://codemirror.net/mode/php/../../lib/codemirror.css"> <script src="http://codemirror.ne...

0
Q: PHP Best way for write to text file

DegauserI want to do this things in PHP: On page load, check cookie If cookie is there, write "welcome back" to a text file at server If not, write "welcome" in same text file at server and create cookie I'm a beginner and I've heard something about file permissions, file locking etc. My question is...

0
Q: what's wrong with my require_once path?

SpilotI've switched my files over from a local environment to my vps and now my facebook notification isn't working even thought I'm pretty sure I've updated all the paths correctly. I've tried writing the require path numerous ways. I'm doing a "$.post" from jquery to a php page where the facebook not...

0
Q: Creating SQL from CSV in PHP

user2690363I am trying to create SQL INSERT statements from a CSV file. I have successfully opened and read the file. I have even output the file in a table format. However, the alterations I do in the for loop such as when $c == 0 do not work. It just outputs to the table exactly as it was in the csv file....

0
Q: Changing page with php

MattI am trying to change the page when the user hits the login button. When the login button is hit currently the page just refreshed the user is not redirected to the new page. I created the session before any of the code for the page. I am wondering if it has to do with the location of my header c...

 
9:45 PM
0
Q: trouble retrieving data from sql database with php

TurloughI'm pretty new to php, and I'm teaching myself. I've looked at a few different resources, and the php script I have now doesn't return any critical errors when executed, but its not returning the data from the table. <?php $connect = mysqli_connect("localhost","turlough","samus1","comments"...

0
Q: Codeigniter Upload image as BLOB to database

user197474I currently have a form that inputs information to the database from a php form, I want to add a field to the database table called profileimage which uploads the image as a BLOB to the database using the current form. All the other fields are uploading successfully but the profileimage isn't. ...

0
Q: Changing iFrame Content to PHP Content

user2812028I'm wondering how I can get my iFrames content (html) to update to code from a textarea and add php tags around it to make it actually appear. Code: $("#iframehtml").contents().find("html").html(editor.doc.getValue()); And lets say for instance editor.doc.getValue() is equal to: $var = "Tes...

1
Q: Hosting two different applications running on Laravel 4 on shared hosting - part 2

vinman75I'm trying to get two sites running off one installation of Laravel, one as the main site and one contained within a sub-domain. I initially posed the following question: Hosting two different applications running on Laravel 4 on shared hosting, and I thought I'd cracked it until I ran into a st...

0
Q: results.php to data.php code

user2962248This is my results page and I need help linking each restaurant to a detail.php page 'm working on a website that shows all the restaurants in san francisco with their health inspection scores, address, violations and I have all the data. The first page is my index page and it's just a search ...

0
Q: How to echo error message from an check if duplicate email

Anaes AriasI am able to search if an email is already been taken but I want to be able to echo the error message and put it somewhere else. Here is the code: $query = mysql_query("SELECT * FROM user WHERE username = '". $username ."'"); if (mysql_num_rows($query) > 0) { echo " $ERROR_MESSAGE ";...

0
Q: How do I show Modal Dialog after button is clicked and page is refreshed?

DerekI have a modal dialog that shows when the user adds a product to cart.. I would like to display this "mini cart" dialog automatically when the "Update Cart" button is clicked in my modal dialog and I am not sure how to do it. I am using Woocommerce and when the update cart button is clicked the...

0
Q: PHP Get the Percent from a Total, which is subclasses into

JREAMIn this simple array Im trying to figure out the distance an item is away from associated percent, being grouped among the others. (The percent always add up to 100% or 1) In my loop can do $total_count / $value['count'] to get a percentage of the total based on a 100% scale. Can you please he...

-1
Q: Delete data using get url php string

user2958236I created a page called delete.php with the following code <?php require_once("database.php"); $con = mysql_connect($config["db_server"],$config["db_user"],$config["db_pass"]); mysql_select_db($config['db_name'], $con); // The SQL statement that deletes the record $strSQL = "DELETE FROM recor...

 

« first day (260 days earlier)      last day (50 days later) »