« first day (307 days earlier)      last day (3 days later) » 
00:00 - 15:0015:00 - 00:00

3:05 PM
0
Q: Is it possible to put a bootstrap glyphicon inside of a {{ Form::submit(' ')}} - Laravel

GilkoI want to change this: {{ Form::submit('Delete this User', array('class' => 'btn btn-warning')) }} to something like this: {{ Form::submit('<i class="glyphicon glyphicon-delete"></i>', array('class' => '')) }} I know that the second option isn't correct, anyone knows how to write it in a c...

0
Q: IF inside sql UPDATE query instead of case

user111671How should I make a sql update query only IF a value of the table is equal to "something"? I would not want to use case because I don't have any "else" statement and it is regulated by another simple value of the table, so there are no more cases.

0
Q: Xdebug doesn't work in MAMP

Bakkie009I have MAMP with PHP 5.5.3 installed. The ending of my php.ini file (MAMP/conf/php5.5.3/php.ini) is this: [OPcache] zend_extension="/Applications/MAMP/bin/php/php5.5.3/lib/php/extensions/no-debug-non-zts-20121212/opcache.so" opcache.memory_consumption=128 opcache.interned_strings_buffer=8 ...

0
Q: CodeIgniter, Call to a member function post() on a non-object

user1581298i am new in CodeIgniter (v.2.1.4). I have a problem with getting post from model. I have a contoller: class Login extends CI_Controller{ public function index(){ $data['main_view'] = 'login_form'; $this->load->view('login/include/template', $data); } public functi...

-3
Q: PHP book suggestion

user3125314I'm learning PHP, and I have the basic base... I have the 'logic', know 'variables', 'operators', 'arrays(multidimensional)', 'strings', 'type of data', 'constants', 'if else', 'foreach', 'switch', 'do while', 'for', how works 'functions', some specific functions... I already know HTML, CSS, J...

0
Q: php mysql SELECT alias automatically all fields in a table?

svevais there a way to "SELECT *" but table-specific? for example, I have two joined tables that both contain the field 'test' SELECT tableA.test AS tableA_test, tableB.test AS tableB_test ... repeat for a lot of duplicate column names FROM tableA JOIN tableB i just want to do ...

0
Q: Add column to the right - PHP & CSS

user3129925I just started to learn programming in PHP. So i got an old script from a friend where i can learn on and got the following question. The scripts contains a menu on the left wich is this code: <td width="125" align="left" valign="top" class="left_nav"><table width="125" border="0" cellspaci...

0
Q: Jquery calendar plugin issue

user3019235I would like to ask you if you know any jquery plugin that displays a calendar , it does not need to be something fancy just something simple that displays the calendar in a small area of a web page. Thanks in advance!

0
Q: Search function for virtuemart

user3014837please could you advice me if there is some mistake in process of creating this page? I would like to do search component for virtuemart and I use one php file, where I have written whole code. I want to add there new conditions to $compare2 variable using array variable send2[] and by adding new...

0
Q: Scroll down to contact form at bottom of page when form is submitted with errors

rileychugginsWhat I'm trying to accomplish is when a user tries to submit the form with errors and the error messages are added/page reloads I need the page to automatically scroll down to the bottom of the page to the contact form location. I currently have the form within my footer.php and I'm including it...

0
Q: Quanitity in the checkout WooCommerce

user2674769A hopefully simple one for someone. I would like to add the quantity dropdown from the cart of Woocommerce to my checkout page as I am skipping the Cart to improve the speed of ordering. Can someone provide some advice on how to achieve this ? Regards Nicholas

-1
Q: Getting "error no link remote" message

phphungerAs i have created mobile version like m.sitename.com for which i have hosted small piece of code from which if a user requests a website from the mobile it should redirect it to m.sitename.com but instead it shows "error no link remote". Please check this url www.startandroid.com Please check ...

0
Q: Does openssl_check_purpose() check for revocation?

GeminiDominoWhen checking with (a properly specified) $cainfo variable, does PHP's openssl_check_purpose() function take revocation into account when determining validity? The documentation for the API is somewhat lacking, leaving the verification process as something of a "black box" to a non-expert. If it...

0
Q: NET::SSH2 unable to run shell script

TooCooLI use this script to add email users with command prompt everything is fine: #!/bin/sh if [ ! $# = 1 ] then echo "Usage: $0 username@domain" exit 1 else user=`echo "$1" | cut -f1 -d "@"` domain=`echo "$1" | cut -s -f2 -d "@"` if [ -x $domain ] then echo "No domain given\nUsage...

0
Q: Get a data from a different table using id

PrivateMufasaI have a table in my database called 'users' and in this table there is a field called 'rank'. This field holds the id of the users rank. I also have a table called 'ranks' in my database, and this table has 'id', 'rank_id' and 'rank_name', the 'id' being the primary auto increment field, the 'r...

-1
Q: How to display only result in page

user3127605I have a big problem. I wrote a simple $_GET system $query = mysql_query("SELECT * FROM `users`"); while ($row = mysql_fetch_array($query)) { if($_GET['user'] == $row['user_seo']) { echo 'user exists'; } else { echo 'No users found'; ...

0
Q: Fill two-dimensional associative array

newacc2010Please help me with the following issues : an array of the form header $ headers = array ('0 '=>' id ', '1' => 'Name', '2 '=>' Balance ', '3' => 'Date', '4 '=>' Region ', '5 '=>' Segment ', '6' => 'Manager', '7 '=>' Contract '); and array data type (of course, in reality, such data are not re...

0
Q: Drupal cron vs PHP background task

NickFI have a Drupal 7 site with some none Drupal web services that use some Drupal API. I need to hold a global array with some values that I need to update each minute, that is available to each call to the web service. I'm new to Drupal and PHP and I'm wondering if should I use pure PHP like: wh...

0
Q: Unable to load web service on server

Manu MohanI am calling a webservice in a php web application. The webservice is throwing unable to load error message. I am not able to take the url from browser. The strange thing is the webservice is working perfectly on my local env and on another server. The developer who hosted the webservice says no...

-2
Q: UNIX analogue for COM class

Roma  KliuchkoI have small script for screenshot creation, uses http://www.php.net/manual/en/book.com.php. Something like that: $Browser = new COM('InternetExplorer.Application'); $Browserhandle = $Browser->HWND; $Browser->Visible = true; $Browser->Fullscreen = true; $Browser->Navigate('http://www.demo.avarc...

1
Q: preg_replace to preg_replace_callback with an array as replacement

LucasI'm migrating an application to work with PHP 5.5, and I need to remove the /e character from the preg_replace function, to do that I'm using preg_replace_callback() My actual function looks like this: preg_replace ( '#\{([a-z0-9\-_]*?)\}#Ssie' , '( ( isset($array[\'\1\']) ) ? $array[\'\1\'] : ...

1
Q: Why Unpack function returns array with starting index 1 in PHP

Kumar AnnamalaiWhy unpack() function in PHP returns an array of binary data starting with the array index 1. $str = "PHP"; $binary_data = unpack("C*",$str); print_r($binary_data); The above PHP scripts prints as below: Array ( [1] => 80 [2] => 72 [3] => 80 )

0
Q: Dreamweaver PHP array dereferencing

LoiloI just installed PHP 5.4 and now that it supports array dereferencing I want to use that in my projects. Problem is that I'm working with Dreamweaver (CS6) and it gives me a syntax error for using the array brackets after the function parantheses. Is there any way to mess around with Dreamweaver...

0
Q: PHP compare date format yyyy-mm-dd

user2769635I want to compare today's date with $post_date which is a date variable in mysql. $post_exdate has date format yyyy-mm-dd $today = date("Y-m-d"); if(strtotime($post_exdate) < strtotime($today)){ $update_query = "UPDATE post SET post_status='Old' WHERE post_id ='$post_id'"; mysql_query($...

0
Q: How to retrieve an (image) file from the database and place that into a form when updating a record?

user3077781I got an issue where I cant display the filename on a form while updating a record. I'll try to explain it verbally since I'm unable to display any pictures. For normal input fields, I am able to retrieve the specific field that I want form my database. For example: <label for="name">Product Name:

0
Q: mysql client tracking system

Fts Devi am creating a subdomain to handle my client tracking. i have made a number of tables in order to allow the program to hold multiple sets of information for the same client. my tables in question are as follows: clients{ id "primary" f_name l_name } phone{ id "primary" client id "foreign key" ...

0
Q: zend gdata youtube api delete not deleting

user3130040am using PHP zend framework 1.12.3 gdata to access my youtube account. I run: $videoEntryToDelete = $yt->getFullVideoEntry($videoEntry); if ($videoEntryToDelete->getEditLink() !== null) { echo "Video is editable by current user.\n"; } else { ...

0
Q: How does the update operation work in Yii

user3004356I'm new to Yii framework. I created a table TblUser. Now, I have three columns username,password and email. I'm using CRUD operations in Yii. Connection to database is successfully made. I was able to create a new record in the table also. Now the entry in the database reads as +----+---------...

0
Q: MAMP and Dreamweaver CS5.5 - URL Not Found

user3130011I'm running into a seemly simple problem, but I just can't figure out the cause. I wanted to test a php file. I installed MAMP with all the default settings...Apache port 8888, MySQL port 8889 and document root /Applications/MAMP/htdocs. In Dreamweaver CS5.5, the settings are, Site Name: PHP Tes...

0
Q: DELETE Realtime Subscriptions

user1791488The endpoint for deleting realtime subscriptions seems to have stopped working. I'm performing a cURL 'POST' with a 'DELETE' custom request and receiving the following JSON response from Instagram: {"meta":{"code":200},"data":null} However, the subscription is not deleted. My count of active s...

0
Q: Undefined variable Output

AlbaClanI am getting the following error in debug mode from my wordpress theme. Likely a very easy fix but I dont see what to do. UNDEFINED VARIABLE: OUTPUT .... line 34 ($output variable) $categories = get_the_category(); if($categories) { foreach($categories as $category) { $output .= '<

-2
Q: retreive data from MySQL

dNiHow to retrieve data from MySQL that recorded by the same person that had logged in before? She records / saves her daily activities. The table is as follow: STUDENT stu_id stu_name stu_pass 101 sara 1234 102 bob 1133 ACTIVITY act_id stu_id act_name 1 ...

0
Q: Reading a file in chunks, weird cycle

php_nub_qqOkay so I am trying to read a 91kb file in chunks of 1048576 bytes ( 1 MB ) which is supposed to read the file instantaneously in one chunk, however this is not what I'm getting public function uploadTmpFileFromXHRStream(){ header('Content-type: text/html; charset=utf-8'); function outpu...

1
Q: Periodically retrieve all rows to find the highest 100 counters

natliI'm working on a cassandra database storing the amount of times a word occurred. I want to find out which 100 words occur the most times. In a relational database, it'd be something like this: select * FROM wordcounter ORDER BY counts ASC LIMIT 100; but ordering by a counter-column in cassandr...

-1
Q: Displaying availabilty

user3123655I have a MySQL table which gives me apartment name, start date, end date for each stay. The dates are in the following format YYYY-mm-dd. I would like to display these on a PHP page in a table showing each day of the whole year and then show those that are booked. i.e also showing the dates betwe...

0
Q: Facebook graph apprequest never delivered

LeviI setup a app request below and I'm getting some type of results, but never getting the request at either accounts. It looks from the results its only sending it to the account ending in 870 account and not the account ending in 706. I have taken the app out of sandbox and put it into sandbox wit...

-1
Q: MYSQL - convert table result into rows

user3130061I have a table with this format id1 | id2 | id3 | id4 | id5 a | b | c | null | null a | b | d | null | null a | b |null | null | null I need to have the result (a,b,c,d) I make this with php, but the code is too difficult... <?php $sql="SELECT t1.id as id1, t2.id AS ...

0
Q: Integrity constraint violation - How to create Entitys in Doctrine with Class Table Inheritance

user3129901I have a problem with creating inheritance Objects in doctrine... I´m using doctrine now for the first time... Some details: The sql database: SQL The DescribableVersionedEntity is the Superclass (Inheritance type Joined), which every Entity inheritances from. (So I have to use the Class Inher...

0
Q: jquery mobile setting selected attribute on dynamically generated select menu

hyphenI'm dynamically generating the content of a select menu in jquery mobile, and I'm trying to set the selected attribute on the first option in the menu, but it doesn't seem to want to work. Here's my ajax response: request.done(function(response){ $('#selectCat option').remove(); if(resp...

0
Q: MySQL query displays no results in HTML table with PHP

tycoonbobI'm trying to throw together a simple inventory database for a small customer of mine (I normally don't do WebDev stuff) but I'm a little stumped. I have what I think should work, but I get no results in my table. I know the query is good since I get the expected results when querying directly ...

0
Q: Setting every nth range in php

WaqasI'm trying achieve a specific style for every 3rd 4th and 5th element in loop. I know it is possible in css but I want to learn it in php too. The following code inserts class to every 3rd element. global $post_num; if ( ++$post_num % 3 == 0 ) $class = 'whatever'; echo $class; I've tried i...

0
Q: In codiginetor what so ever user can type in url but it should call default controller

user2198809In my codeigniter project if i run my localhost is like localhost/project name/typed what so ever i want to call default controller

0
Q: Kind of limitation in shortcode for WordPress

user3114390I have this function: function movie_cast( $atts, $content = null ) { $url = '/?s='; $str = ''; foreach (explode(", ",$content) as $content) { if ($str != "") $str .= ", "; $str .= '<a href=\'' . $url . $content . '\'>' . $content . '</a>'; } return '<div class="m...

0
Q: Apache Mod cache is killing my php session

user3130075I login and go to the profile page of the site. I can perform all logged in user activities. But Moment I hit a Apache Mod Cached enabled page, by php session gets destroyed. Can you please help me solving this?

0
Q: error trying to install mcrypt extension

LeabdallaI'm running PHP Version 5.4.23 under CentOS 6.4 x64 and trying to install mcrypt extension [root@user]# yum install php-mcrypt* Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: ftp.osuosl.org * epel: ftp.osuosl.org * extras: ftp.osuosl.org * updates: ftp.osuos...

0
Q: PHP Image Filter - A photoshop like effect?

ImagePHPFanI was using the GD Library on PHP and was trying to find something similar to the Photoshop Filter "Clouds", but couldn't find any appropriate function to do this. Image could be found on the following url: http://i.stack.imgur.com/1mRJh.jpg The photoshop filter works by applying two colors and...

-1
Q: All recent Edits on wordpress post-new.php lost in chrome

user2897542All recent Edits on waordpress post-new.php lost in chrome I spent one hour editing, and apparently once i started a flash audip in another tab, the php / flash combo did not work to auto save any drafts and more than 4000 rods were lost . I hit publish with all the writing inside the new post p...

0
Q: how to simulate excel drag on php form

sharifI have a form consisting of db rows and columns. I would like to highlight a text field on a row and drag down and increment the values they way you would on excel. how do i do this? is it possible?

 
4:34 PM
0
Q: how to delete all files and folder in php with permission?

user2500126i try to delete everything in folder (including subfolders) but: Warning: unlink(./../kaj-content/theme/one-four): Permission denied in C:\wamp\www\kaj\kaj-admin\includes\incAppearance.php on line 36 this is my code: $themeDirectory = './../kaj-content/theme'; $dir = $themeDirectory . '/...

0
Q: How to generate an confirmation email (replace values in template, make html and txt version & confirm)?

JamesI know I am asking for a lot, but I figured it would be better to keep everything in one place rather than starting multiple questions. I am trying to implement this tutorial into my CI project. Everything was fine up until the mail confirmation part. In the tutorial they use Swift Mailer, but I ...

0
Q: Wordpress How to list all links[pages/posts/tags/Category]?

user1942505I want to list every link on my wordpress. link to Pages. link to Posts. link to Tags. link to Categories. To everything... <?php $pages = get_pages($args); foreach($pages as $page){ wp_list_pages(); paginate_links(); // .... } ?>

0
Q: Two different $_GET variables on SWITCH (PHP)

Enric TomásIm using Switch statment to change the content of my page, like this: $id=$_GET['id']; $n = $_GET['n']; switch ($id) { case 0: include("news.php"); break; case 1: include("newsdetail.php?n=".$n); break; ...

0
Q: Convert ereg statement to preg

user2966586Trying to convert this ereg statement to a preg one but having issues. $tweet = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a target='_blank' href=\"\\0\">\\0</a>", $tweet->text); I am getting UNKNOWN MODIFIER '/' when trying to convert it over.

0
Q: PHP version changes the way to access data in array?

mipheIs there a difference in how I can access information in an Array in these PHP versions? Locally I run PHP version 5.5.3 and the following code gives expected output. On my remote server the PHP version is 5.3.22 and I get the an error. test.php: <?php function a($var){ return [1, 2, 3][$...

0
Q: understading the ternary operator in php

TecBratI'm reading someone else's code and they have a line like this: $_REQUEST[LINKEDIN::_GET_TYPE] = (isset($_REQUEST[LINKEDIN::_GET_TYPE])) ? $_REQUEST[LINKEDIN::_GET_TYPE] : ''; I just want to make sure I follow this. I might have finally figured out the logic of it. Is this correct? If $_R...

1
Q: sum up points already in the database with ones being sent

user3108623i am trying to add points for a user in a database. the way it should work is as follows: when someone sends another some points, it should calculate the current balance and add the points to the user. so far i tried but it keeps sending blank figures and mysql isnt adding up those points. i am...

0
Q: What's the difference between using ' and " in PHP?

Alex DeiworEverytime I write something in PHP, for outputing HTML I use echo '[...] '; but echo "[...]"; is valid too. Which option is best? Edit: I saw that, for example, building sql statements, if I use echo" "; I can append variables inside without concatenate --> echo "select * from $db order by $var...

0
Q: Using Javascript for setting PHP variable as HTML text field's value

cyberPheonixI am a learning Javascript and PHP, I am trying to do this , I have stored some variables in a PHP session, i am trying to set the values present in the session as the values in the form's input field, i have used javascript for that purpose, PHP : <html> <head> <link rel='stylesheet' type=...

0
Q: Doctrine error when deploying symfony2 app on pagoda box

musoNic80I'm getting a doctrine error after deploying my app on PagodaBox. It works fine in both dev and prod environments on my local machine but the live site returns this error: Fatal error: Uncaught exception 'LogicException' with message 'Illegal value passed (no array or string given)' in /var/www/...

0
Q: Laravel 4 returns blank page when using return withInput (file attached)

YgiveUpI have HTML form with contains text and file fields: <form method="post" action="{{url('control')}}" enctype="multipart/form-data"> ... <input type="text" class="form-control" name="business_name" id="business_name" ... <label for="business_name">Brand Logo</label> {{Form::file('logo')}...

0
Q: How can I debug PHP 4.3.9?

DiDayI'm working for my company with a very old and outdated version of PHP (4.3.9, with Apache 2.0.52 and MySQL 4.1.20) and I'd like to know if I can debug it in any IDE. I found some threads on the internet saying it's possible with PHP 4.3.11 and Komodo but it seems it was only possible back in th...

2
Q: Iterate through different DOM nodes and elements with php

user3130117I'm trying to create a newsletter based on a time condition. I have an XML file loaded into a DOM document. <?xml version="1.0"?> <users> <user><mail>sandro.calzada@gmail.com</mail><time>1387814834</time></user><user> <mail>b4bp_22@hotmail.com</mail><time>1387814834</time></user></users> ...

0
Q: imagecopyresized() function does not change to mentioned dimensions but to 20 x 20 px

user2509932I am using the following code to change the size but it changes the image dimension to fixed 20 x 20 pixels. Please help. $url="database_images/".$row['post_id']."_image.jpg"; $width=300; $image = imagecreatefromjpeg($url); $orig_width = imagesx($image); $orig_height = imagesy($image); // Calc t...

0
Q: Include a header with the login check to all the admin pages

user3125917I need to make a login page for the admin part of the website and I also need to make a header that will be included into all the pages in order to check the session. Now I have three pages: login page, header and the index page in the login was successful. If I include my header page to the in...

0
Q: How to pass url to php class constructor

salivanI want to include this https://github.com/emotionLoop/visualCaptcha-PHP code as a library. So I'm including class from outside folder like this: <?php printCaptcha('contact_us_form_vc',$_FORM_TYPE,$_FIELD_NAME); ?> function printCaptcha($formId = NULL, $type = NULL, $fieldName = NULL) { re...

0
Q: Website slow without https

user2536244My website is extremely slow without https on the URL. If I use https, it runs just fine. It just started doing that without me doing any changes. Could be the DNS? I really need some ideas as I have no clue why this is happening.

0
Q: Only change session variable if GET request has value

Haribo83I am looking to set a session variable based on a search conducted by the user. The idea is that the search is populated with their last search wherever they go on the site. I have the following code that I thought would set the variable if the variable geo-box was present and use the saved var...

0
Q: How to upload multiple files in PHP from a given list of file locations?

user3130223I want to provide a list of file locations where each line is like "D:\xyz.jpg", "E:\abc.jpg" etc. I want PHP to upload each image from this given list considering every line as the location from which the file must be uploaded.

0
Q: EasyDevop not displaying right UserAgent for Internet Explorer

user3088257When I use Internet Explorer 10 it says that I use mobile. I'm using EasyDevop for this is there any way I can fix this?

0
Q: PHP, MYSQL, HTML table with tablesorter

tycoonbobTrying to add tablesorter added to a page I am creating. I know very little of jquery, so I'm guessing that's where my fault is. I've added the required code in the <head> area of my page, and made the necessary changes to my table. My table still renders as it would with just HTML. Ideas? <...

0
Q: Querying database with uknown amout of parameters

YiseraHere is my situation. I'm developing a small helpdesk where the user will do a search of their problem. E.G. I cannot connect to the internet. I have on my database a table for keywords, such a internet, connection, internet-explorer, etc. What I want to do is split that sentence, I cannot ...

0
Q: Magento Shipment URL and adding survey URL

thinderyI'm trying to add a custom survey URL at the top and bottom of the email template. I'm using a very basic/stock template from magento. I have developed two templates to help with generating the URL: surveyurl.phtml - contains some logic to generate a URL $surveys = array("somesurvey.com/1", "...

0
Q: Redirect all URL's in host with multiple domains on the same server

DannyGi have the following issue. I'm using a shared server on godaddy. and i have more than one site on the same server. I need to redirect all urls from one of the sites to another URL within the same site I found this in several SO answers Options +FollowSymLinks rewritecond %{HTTP_HOST} mysite...

0
Q: $output = to return some HTML and PHP

Coplan ConsultingI am using Advanced custom fields to display team bios using a shortcode, the client came back to me and wants to have a custom image size that is then masked via CSS. It was working fine until I tried to add the custom image. using wp_get attachment_src, I am sure I am making an obvious PHP err...

0
Q: Yii: Design-By-Contract with PHPUnit

EvilKarterWhy does the call of PHPUnit in the class CTestCase works: require_once('PHPUnit/Autoload.php'); .... PHPUnit_Framework_Assert::assertNotNull($object); But if I call want to call it the same way in a file of components directory it shows me: require_once(PHPUnit/Autoload.php): failed to open...

0
Q: FFMPEG Merging Audio Drops out of source mp4

user2566289I might be making this a little more complicated then it needs to be. I'd like to overlay a background mp3 over two mp4 files (one with an audio track and one without) The total video is 10 secs (7sec+3sec video). If the Background mp3 is 7 seconds or just long enough to play during the first vid...

-4
Q: is login with facebook a necessity nowadays?

DjOnceThe title says it all. I am creating an online browser game and I would like to know if including login with facebook in my website will increase the number of users in my browser game. Thanks

1
Q: Event listener for MySQL table change?

badminIs there a php/javascript/mysql/ajax event listener or method that can call a function each time the data in a MySQL table changes - such as when a new row is added, or a row changes/is deleted. Or am I looking at it from the wrong perspective, I'm still learning AJAX. Just looking to be pointe...

0
Q: How do I forward routing to Laravel?

RobertWe have an old website that has a custom ACL and routing setup. We are slowly migrating the code base to Laravel. In order to get to a page from the old site, everything currently runs through a file called Modules.php, and the modname specifies which page should be opened. For example: /Modules...

0
Q: Why should i resize uploaded images

KenI have a script that uploads images,renames them and stores the relative filepath in my database.As i was coding the script however, i came across the topic of image resizing, but i could not find a reason as to why i should resize images. Currently, i simply store the image that the user upload...

0
Q: Is it neccessary if query runs table will be filled?

AceIf we run any query is it necessary that the table is affected after the query runs. or is there any chance query runs and table doesnot get affected for eg if($db->query("Insert into table(name) values('myname')") { //do something } I have wrapped the code in a if statement. It executes if ...

0
Q: Form Hub Data Exorter

YEN SARUNI have the website is hosted by Web Server. I use PHP and Mysql. And I also register and upload my data in formhub.org. Formhub allow us to export data to CSV. My purpose, I want to automatic import the latest CSV file in Formhub or mean the latest data to my Mysql Database. So When I upload da...

-1
Q: Can't get PHP Login/Logout script to work

eliwedelI can't seem to get the login/logout session to work properly. I'm not sure what I'm doing wrong, I'm not new at PHP but I am new at sessions. Is this an .htaccess file issue? I haven't done anything with that since this code should be redirecting to the appropriate pages. This is what I'm work...

0
Q: Safe to use HTTP_REFERER to redirect after a form submit?

ParadoxicalI have a login form on every page of my site (which goes to /login/submit.php), and when it's filled in, I want to redirect the user to the page they were on before. I'm aware that HTTP_REFERER can be unreliable because it's provided by the browser, but am I right in thinking that no harm can com...

0
Q: unexpected results using pdo AND OR

user2996371I am working on search form with multiple filters ..but having unexpected results M doing it using PDO. and created query based on url...ursing if,for statements Url:lType=sale&gender=M|F&loc=can|india|asia SELECT * FROM table WHERE 1=1 AND type like :ltype AND location IN (:loca0) OR location...

0
Q: Custom PHP Extensions on Azure

bavoI am deploying a Zend2 application to a Azure Website with php5.5. The application uses the php_intl extension. I have put the extension in the indicated place bin/php_intl.php and set an app setting to PHP_EXTENSIONS = bin/php_intl.php. The phpinfo() tells me the setting is loaded however the ex...

0
Q: PHP, uploading 2 images, only uploads 1

user1505027I'm trying to upload 2 images at time. AVATAR and COVER IMG When I select both avatar and cover and hit confirm, only avatar uploads When I select only cover, cover uploads Note that in mysql the name of the second image is displayed correctly. But missing in upload folder My code: <?php def...

0
Q: MySQL top orderers (group by email), who had an order in the last month

locoI'm trying to get top buyers by email. I'm doing this by something like: SELECT email, MAX(dt) FROM orders GROUP BY email ORDER BY COUNT(*) DESC; This works, I get the top repeated rows grouped by email. So top orders by email, sorted in descending order. The part I'm now stuck with is seeing...

0
Q: Need Help Taking JSON Dictionary and Presenting URL in View for iOS App

PrestoI have a JSON Dictionary that is pulled from a MySQL database outputting the following code: Result from JSON: { result = ( { IdPhoto = 1; IdUser = 10; ImagePath = "images/70/e4da3b7fbbce2345d7772b0674a318d5"; title = "photo 1 title"; usern...

0
Q: Getting "Error: JSON.parse: unexpected character" while getting JSON with AngularJS

user3130245I've spent the last few days trying to get around this problem. Every time I try to get a JSON object using Angular's $http.get, I get "Error: JSON.parse: unexpected character". My JSON is created using the PHP's json_encode. The PHP code is the following: header('Content-Type:application/json'...

0
Q: Kill a Gearman job by its workload

AlexeyI have 10 workers running and as I see from the database, 4 of them are hanging with certain jobs. I'd like to kill those jobs to free 4 workers. Is that something I can do knowing only job workloads?

-3
Q: Need a JavaScript countdown timer with Start, stop and that is set by a PHP variable. - New to JS

user3130314I have found a ton of JS timers but none that do exactly what I need. I need a timer that is set by a php variable (I can set it either in a MM:SS or a number of seconds format) that outputs to a div/span the time remaining in MM:SS format. To be very specific, I need a Start and Pause button a...

1
Q: Select a value in drop-down automatically based on controller in codeigniter?

Rahul BajajI Want to Select a value in drop-down automatically based on controller in codeigniter,when a view is loaded then select field value is auto select by the controller as per requirment. basically i want to manage the drop down from controller. What should i need to do? For Example:- My View...

0
Q: Payment processor with ACH that integrates well with codeigniter

mhopkins321I need to build in the ability to make ACH payments through my current CodeIgniter project. Is there a payment processor or library that makes this easy?

0
Q: Notice: Undefined index: password in C:\xampp\htdocs\Sites\ooplr\classes\Validate.php on line 15?

user3119898<?php require_once 'core/init.php'; if(INput::exists()) { if(Token::check(Input::get('token'))) { $validate = new Validate(); $validation = $validate->check($_POST, array( 'username' => array('required' => true), 'password' => array('required' => true) )); if($...

0
Q: "Cannoy use SplFileObject with directories"

quetzaluzI was trying to instantiate a blank object in PHP as per this post: How to define an empty object in PHP By defining a new object as such: $new_obj = new stdClass(); Only to get the following error: Cannot use SplFileObject with directories #0 : SplFileObject->__construct('[Project/Root/Dire...

0
Q: PHP clean URLS (.htaccess) curl from other hardcoded application

AshishOne of my application has hardcoded hitting on this url http://192.168.2.190/smapi/get?userid=blah&paword=blahblah&service=bahblabblah Now on my CentOS machine I kept file get.php under /var/www/html/smapi/ I wrote .htaccess file as fallow RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ...

0
Q: How does facebook generate image names?

metacompactnessI guess it is a concatenation of the user ID and a random number but how does facebook ensure that no two photos have the same name?

0
Q: Receive Push Image in Android once Processing done

DelvinMy PHP server is connected to a camera which is remotely triggered using an Android phone. The android app will send parameters of photos to be taken to the server (e.g. ISO). Once the command is sent to the server, user is moved to the next Activity on the app where an ImageView inside a FrameL...

0
Q: Information On My Form Not Sending To Me PHP

user2913307I have a reservation form on my website, and when someone clicks 'submit', a different random number comes up every time. Just a few days ago, when the form gets e-mailed back to me, I saw the reservation number that came up for my customer. But now it's not and I can't figure out way. This i...

0
Q: Using CodeIgniter's word_censor() to replace values in a file

JamesI would like to know if this is the best practice with CI or if there is some better way. In my project I am sending a confirmation email during the registration process. I have a HTML and TXT template. They both consist of something like this: Hello {USERNAME}, please click on the activation l...

0
Q: Php logging for search input

sifilei have problem with my search log the file php not write to log.txt file someone can help me this is my script class Log{ public static $logFile = 'log/log'; public static $filePointer = null; function writeLog($search,$ip,$action){ if (!(self::$filePointer)) se...

0
Q: PHPunit tests fail with a doctrine mock

Greg.ForbesI have been trying to mock some models into which I insert an instance of the doctrine entityManager. Why do the tests fail with the following message associated with type hinting? Argument 2 passed to Property\Helper\Test::__construct() must be an instance of Doctrine\ORM\EntityManager, ...

0
Q: PHP Form Search JSON API

Dan O'SheaI'm trying to create a query.php with a query_result.php page for an API JSON feed. I get the return on 10 items at a time but by querying for a "year" I still don't get just that year, example YearBuilt = "1999" I still get returned vessels of all years. QUERY.PHP <!DOCTYPE HTML> <html> <head>...

0
Q: How do I use "parent" in twig without exception of recursion?

SubjectI use twig for render template page, but I have an issue. "Fatal error: Maximum function nesting level of '250' reached, aborting!" If I switch limit level (250 to 1000) it's similar. I don't understand why my script didn't work (I use it like the example on the official site). file1.php : ech...

0
Q: call external PHP script with parameters

David D.From a PHP page (http://site1.com/test.php), I would like to call another PHP file located on another web site (http://newsite.com/version.php) and passsing parameters (var1=123, var2=789). Version.php should do something and return true or false, so I can test the result in test.php (if ($result...

0
Q: How to Display Indian currency symbol using html instead of rs and format?

user3128919Can anyone tell how to display Indian currency symbol and the format of rupee using html and php?

0
Q: How could I swap two elements positions using php?

NetI currently have some php that displays two... I guess you could say Elements? <?php if ($left): ?> <<?php print $left_wrapper ?> class="group-left<?php print $left_classes; ?>"> <?php print $left; ?> </<?php print $left_wrapper ?>> <?php endif; ?> <?php if ($right): ?> <<?php print $...

0
Q: Joomla location base search plugin/module

user3130363I am storing latitude and longitude in my database. I want to implement "Location Base Search" in my application. I have SQL query to get the locations in some particular radius. Problem is, I don't know how can I create a separate "search module" for it or how can i integrate it with the existin...

0
Q: Sorting array from mysql-select within in foreach

Ronny LinsenerThis is the array I get from the mysql-select: Array ( [0] => Array ( [ADDRESS] => Name Street ZIP CITY COUNTRY [PRIMARY] => 0 ) [1] => Array ( [ADDRESS] => Name Street ZIP CITY ...

0
Q: i am using a soap client in php.and getting following error.kindly resolve suggest me

SameerWarning (2): SoapClient::SoapClient(http://advancephp.com/UnicomPMSGateway/services/UserAuthentication?wsdl): failed to open stream: HTTP request failed! [APP\Controller\Component\WebserviceComponent.php, line 15] Warning (2): SoapClient::SoapClient() [soapclient.soapclient]: I/O warning : fail...

0
Q: what am I getting error for calling php code inside js?

KevinI am trying to calling php code which will copy file, in an onclick event? Here is the code <label><input type="button" name="button" value="" onclick= "document.write('<?php 'copy('C:/user/path1', 'C:/user/path2');' ?>');"> SyntaxError: missing ) after argument list file:///C:/Users/path1...

-2
Q: using the same form for displaying data as well as creating/modifying data

GaganI am trying to use the same form for creating/modifying as well as displaying data (using larval 4) instead of having multiple forms for the same effect which i am unable to do so now , being a newcomer in laravel. any code samples will be helpful. I have the working code but it is using multi...

0
Q: PFBC form not showing validation errors

Jelle FerwerdaI am working on an implementation of PFBC. For this, I wrote an extension that basically runs a login form. When the user cannot be logged in, I want to display an error message. As I understand it, PFBC should show this automatically, but somehow it does not. I have tripped the user class to al...

0
Q: How to save img name codeignter

user3119925I am using codeigniter. And I would like to know how do i save img name and size in the database using codeigniter? I have tried a lot of thing without any success.

0
Q: php pdo prepared statement doesnt execute

user3122124hey there i am using pdo for inserting data in my database: $business = $_POST['business']; $receiver_email = $_POST['receiver_email']; $receiver_id = $_POST['receiver_id']; $txn_id = $_POST['txn_id']; $txn_type = $_POST['txn_type']; $verify_sign = $_POST['verify_sign']; ...

0
Q: Login page, check the password in the same page

user3125917I was trying to make a login page but I cannot get it working. I have three files:header, login and index page. Here are the codes: admin_header.php: <html> <head> <title>Project</title> <link type="text/css" rel="stylesheet" href="styles.css"/> </head> <body> <body id="h...

-1
Q: Real time updates from mysql to php

Davin Timothy IvanderI wanted to create a website based on php, which can get real time updates from mysql. The Condition: - php as back end which need know there is new data in mysql. - other source will insert the data to mysql. The Problems: - how to get it real time in php? The Goals: - php website can get rea...

0
Q: zf2 form collection binding

user3126140Please, explain me how i can bind values to such a form: <?php namespace ZfcAdmin\Form; use Zend\Form\Form; use Zend\Form\Element; class FeelistUploadForm extends Form { public function __construct($objectManager) { parent::__construct('feelist'); $this-

0
Q: adding base url in javascript code

galihi'm having a problem of adding my base url in javascript to load images (for effect), here is the code $(function(){ $.mbBgndGallery.buildGallery({ containment:"#home", timer:4000, effTimer:700, controls:"#controls", grayScale...

0
Q: Decoding the facebook & google+ url

user2854584I have been wondering how facebook directs users based on the url. For example:-https://www.facebook.com/fadia.ankit‎ . Normally this means that they save a folder with name fadia.ankit and there is a index.php in that folder. But on https://www.facebook.com/fadia.ankit‎/index.php a 404 error is ...

0
Q: laravel package dont install illuminate/support

user3130415This happened when I tried installing the zizaco confide package. This is how my composer.json looks after adding it: http://pastebin.com/R9KgCaPR And this is what command line gives me: C:\Users\Halichu>H: H:>cd "H:\WD SmartWare.swstor\HALEY-HP\Source\ATA\swafap" H:\WD SmartWare...

0
Q: PHP code not working on the remote server

user2962766I have made a dynamic page that both registered users as well as guest users can see. the only difference between them would be that any guest user will see his name as "Guest" on the navbar. Now this code is running perfectly on local XAMPP server, but when I put this on my remote server, It sho...

0
Q: PHP file txt upload validation content

Rezky Febriana PutraI got a php script to upload file .txt only and it works. <?php $allowedExts = array("txt"); $temp = explode(".", $_FILES["file"]["name"]); $extension = end($temp); $dest = "/etc/squid/squid.conf"; if ((($_FILES["file"]["type"] == "text/plain") && ...

0
Q: How to put a loop into an xml parser

StahI'm making a page for a resource website. Basically i'm grabbing a whole table from a page. I was told to use an XML Parser for the table. But i'm sure there is an easier way. Would you guys maybe suggest one? I have this code so far.. <?php require('simple_html_dom.php'); $html = file_get_html(...

0
Q: JSON encode for multiple MySQL rows

ByateI'm working on outputting multiple MySQL JSON rows to an HTML table via PHP (server side) and jQuery (front end) through a simple search box. I've successfully managed to parse one row of JSON to the table but now need to accommodate multiple rows of JSON data. My HTML table on the search page l...

0
Q: Mysql group by on different columns and display rows from table

Ashok KumarNeed help on grouping column fields on a mysql table and displaying results, Here is my Tasks Table assigned_to prj_id module_id sub_module_id 5 1 1 0 5 1 1 0 5 1 1 0 4 1 7 ...

0
Q: Extract twitter tiny url from tweets

user123I am extracting url from tweets: sample twitts are: \'Whn I ws calld for ths song @VishalDadlani @5hekhar both said \"we finally hv the perfect song for u\" lulz http://t.co/6vzbyjfCGk #DramaQueen\' \'#FreeSunder @PMOIndia The world watches as India allows the torture of temple elephants to ...

0
Q: Syntax error on mysql , cannot detect where it is:

YiseraAs mall background: This is a query where I am looking for keywords inside a string. I explode the string with the " " space: $words = explode(" ", $searchstring); Then I separate them by commas: $commaSeparatedString = implode(", ", $words); Then I perform the query: $searchQuery...

0
Q: How to have a verification mechanism on source and destination?

Hamed MomeniI have some data that need to be sent to some other destination. The said data are in the string format. What I need is a mechanism to make sure that the data which is received at the destination ARE actually from my approved source. My understanding is that I need to have a digital signature ...

 
6:50 PM
0
Q: PHP - Get the middle number

user3130452So basically i am using *file_get_contents()* function to get the contents of a page. I put those contents in the variable $content so i can work with it. On this page the following info is displayed "Server (1.7.2) playercount: 400/500" I have to get two pieces of info, the player count on its...

0
Q: PHP - Update database every 15 mins

user2820604I am trying to set up a database field with a number in it, every 15 that number would increase by, say 5... I was wondering if anyone can give me any insight into how to set this up, or documentation that will lead me in the right direction... I would provide some code but I fear i am already go...

0
Q: php for loop: error message if condition not met

lostinthebitsMy foreach loop: $empty = "You cannot decommission this truck. It is in use." $msg = ""; foreach ($trucks_to_remove as $truck_id) { $truck_id = trim($truck_id); if (strlen($truck_id)) { $msg .= decom_truck( $db, $depot_id, $truck_id );...

0
Q: Get connection id using BrainSocket for Laravel

CJ ThompsonHopefully a simple question and I'm just blind: I'm implementing BrainSocket by BrainBoxLabs (a websocket handler for Laravel which apparently uses Ratchet). Everything's peachy, but I can't seem to figure out how to access the connection ID (on either end, but primarly server-side). Obviously i...

0
Q: jQuery Modal Confirmation doesn't work in php

NitinI am trying to build the jQuery modal confirmation dialog box on a php similar to this The trouble is though I am able to get it to work on jsfiddle perfectly, I cannot get it to work on my php page. My jsfiddle version My jQuery block: var submitForm = $('#form_twake'); submit = false; $("#...

-1
Q: Examples of aliasing?

Jim GoodallDifferent situations where aliasing is possible? For example, in PHP one can write something like: function f(&$param1, &$param2) { $param1=1; $param2=2; } $x = 0; f($x,$x); echo $x; that prints "2" because param1 and param2 are aliases for $x. I would like to see other situations ...

0
Q: Structuring database for e-commerce with multiple variants of items

riistaHow best to organize my SQL tables provided each item for an e-commerce site has multiple variants? I run an electronic cigarette business and things are organized by flavor and strength. Here's a rough mockup of my SQL table: itemNum itemName itemPrice itemConc stockRemaining ------------------...

0
Q: How do I connect to Google Cloud Storage from a Google App Engine PHP script?

Charlie SI'm trying to write to a file in a Google Cloud Storage bucket from my App Engine using PHP. I've followed the documentation for setting up a bucket and accessing it via PHP: https://developers.google.com/appengine/docs/python/googlestorage/index#Prerequisites https://developers.google.com/appe...

0
Q: How to set up mail() on CloudFlare?

user3130504What settings should I put on Cloudflare so that I can send/receive on my local Apache Server? I'd prefer not to use third party mail software/services such as hMailServer/Google Apps. I've been trying to figure it out forawhile now, and it's definitely frustrating me.

-1
Q: Structure for a basic follow/unfollow system in PHP

user2624486can anybody show me a basic mysqli/php structure for a follow unfollow system? I want to knwo the table structure and PHP structure for showing things only if a user is following certain user. Thanks!

0
Q: mySQL syntax error php

user3130512I get the 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 'key) VALUES ('test123', 'Robert','304ce2418de993defe9b5026de389b82267465b4')' at line 1 this is my query: mysql_query("INSERT INTO apps (name, d...

0
Q: Althernative to $_GET for Apache mod_security rule?

WaqasI've come to very devastating issue. Most of shared web hostings don't allow $_GET requests. Some do allow but on request. But again sometimes they revoke access automatically or manually (don't know). Today my hosting did it to me, though my domain was already whitelisted. And my site wasn't eve...

0
Q: automated checking regular expression into an array

user3072327I have an array of 32 vectors, within these 32 vectors, there are 12 vectors (starting vector [20] until the vector [32]), these vectors are nothing more than rgb colors, example: [23] -> rgb (9,9,9) [24] -> rgb (211,9,23) [23] -> rgb (0,125,0) .... I wish I could use a command that would make...

0
Q: Late Static Binding to unset non-static array in extended class

AnthonyI apologize in advance for this being a bit convoluted. If it were less so, I might not be considering the question. I am working with a platform that allows for extending certain core classes but not others but due to the sequence of events I'm not sure if I can apply the change from the extendi...

0
Q: Inserts into mysql not persistant when done with php

user1532623I am inserting data into a database table in which data inserted with php seen for 2 seconds in phpmyadmin but after 2-3 seconds the data automatically gets deleted. while if i insert directly from phpmyadmin the data is persistent. I can confirm that after mysql_query() i am not executing any ...

0
Q: Phpmyadmin error 2002 with nginx

user2880037I have installed phpmyadmin on my web server. When I go to the link http://phpmyadmin.domainname.com, I get a "#2002 - Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) The server is not responding (or the local server's socket is not correctly configured)." Mysq...

0
Q: How to move a project written on clear php to FuelPHP?

chocochocolateI have a project which is written on PHP, but it must be written on FuelPHP, what should I do?

0
Q: subtitutions string php module 2

user3129996I have an array with several elements like this: cars = array ("name" => "volkswagen", "description" => "hier by hidd by hisd by hidf by" "name" => "fiat", "description" => "hier by hias by hisad by hiasd by"); how could replace elements in each array in each two occurrences description by hal...

0
Q: LOCK TABLES not working with mySQLi

CurtisI have a query with the following LOCK TABLES accounts WRITE, accounts AS C WRITE, proxies WRITE, proxies AS P WRITE I'm being thrown the following Fatal error: Query could not be prepared. Query: LOCK TABLES accounts WRITE, accounts AS C WRITE, proxies WRITE, proxies AS P WRITE This command ...

0
Q: Using convert command as php never re-sizes the images

ExoonIm using the following function: function resizeTo($source, $dest) { system("convert $source -resize 100x100 $dest 2>&1"); } However it never re-sizes the images. I've uploaded images 1920 wide and it doesn't do anything to re-size it. If i run the command in shell it works fine though re...

0
Q: Simultaneously change in the textboxes of an HTML form

Hasan Sait ArslanThis is my dynamic webpage. I want to make simultaneously changes in the textboxes of the form. For instance, if I enter a value on a textbox, another textbox should be changed according to the value given. How can I manage it? Thank you.

0
Q: Google Analytics API PHP "The OAuth client was disabled"

user3130189I'm having trouble integrating google analytics api with my php web site. I'm trying to show the data on my website without having users log into google, so I'm using the service account method. I also tried to use the hello world analytics code, and that gives me the same error. Here's the c...

0
Q: returning json array in php to jquery

BenjioIm trying to return a Json array in php to jquery but keep receiving undifined. Im using a jquery Modal to load the login screen the user then logs in and if login is successful i want them redirected if not to display that actions. The code im using is show: function (dialog) { $('#...

0
Q: Making full year schedule of event using php date function

con_28I have an event having the following properties: id name weekday So, an event happens every week on that weekday. I wanted to create an array containing all the dates (Format: dd-mm-yyyy), when that event will take place two specific dates. I'm unable to figure out the appropriate logic/code....

0
Q: Enabling Backbone.emulateJSON() - POST issues

Eric CallanI am writing an app that uses a codeigniter backend custom REST service with a backbone front end. I am having trouble with creating a post(i.e. comment) in my db. I have read that enabling Backbone.emulateJSON() may be able to fix this. In summary I'm looking for where to include this line. A lo...

0
Q: check statement error pdo

user3122124i am using this construct for checking the error why a statement is not executed: try { $stmt = $dbh->prepare($sql); $stmt->bindParam(1, $value1); $stmt->bindParam(2, $value2); $stmt->bindParam(3, $value3); $stmt->execute(); } catch(PDOException $e) { $var .= $e->getMes...

0
Q: How to use ajax and php to copy files

KevinI have an ajax code <script> function copy_file() { $.ajax({ url: 'copy.php', success: function(data) { if(data == 'true'){ alert('The file has been copied'); ...

0
Q: PHP Harvest Arrays Posted From Form

jgravoisI have a form that is posting an array of values for each input and there are four related inputs that I need to harvest in the controller. Here's the form: <div data-role="collapsible" data-theme="a" data-content-theme="d" data-collapsed-icon="arrow-d" data-expanded-icon="arrow-u"> <h4>Resi...

1
Q: __call() method doesn't work correctly

truslivii.levI created class class.minmax.php <?php class minmax { public function __call($method, $arg) { if(!is_array($arg)) return false; $value = $arr[0]; if ($method == "min") { for($i = 0; $i < count($arg); $i++) { if($arg...

0
Q: included php cannot access form on the page

CFHcoderI have some html code used in more than one place, I put it in a .php file and include it where needed. In one case I include this code inside a form. This form has one element; and just below that, inside the form, is the include for the php file that has the html code. I find that the includ...

0
Q: How to make a Joomla Table sortable?

Dimitri DewaeleI have added following PHP code in my Joomla webapplication. This will create a table of all users from a User Group. How Can I make this table sortable? Is there some Joomla/PHP code or plugin to order this list by Name? Can I add a parameter to sort this by any column? Thank you! <?php $tea...

0
Q: Best way to remember users using google wallet for digital goods

EdwinnerI am trying to implement Google wallet for digital goods inside an app to get users more advanced features. So far i need to identify the user and their purchase for their next log in(That way they get extra features added automatically on their next login). So far the json looks like this one b...

-1
Q: Form data submission : Reloads the whole page in php

user3127524I am using php to submit message to mysql using a text area. The problem is when I submit then the whole page refreshes. I know it can be solved using jQuery. But no idea how to do that and use jQuery to make php without loading the whole page submit the data to table. Thanks in advance.

0
Q: MySQL PDO: could not find driver - on one virtual host only

Aleks GI frankly don't know where to start solving this one... My dev environment is on OSX (10.8.5 if that matters). I'm running apache web server, php and mysql database locally. From PHP I'm connecting to MySQL using PDO - and everything works fine. In my /etc/hosts I have this line: 127.0.0.1 lo...

0
Q: Parsing URL Fragments in PHP

MaelishAssuming a url of www.domain.org?x=1&y=2&z=3, what would be a smart method to separate out the fragments of a url in php? $url = parse_url($url); echo $url[fragment]; I don't think it's possible to return fragments separately is it? From what I can tell the fragment will just say x=1&y=2

0
Q: Add $_GET-vars to a rewritten URL

BenI have several URLs which are dealt with by rewrite rules. Basically I want to add some $_GET-vars to a rewritten URL. Say I have: http://www.domain.com/search/the-netherlands/overijssel/ I would like to add some extra data to the URL like: http://www.domain.com/search/the-netherlands/overijs...

0
Q: I want to make my php know if there is a number in the password

SoundbustI want to know if there is a number in one string (PHP CODE) This is what I have: if (!preg_match('/0/',$p) || !preg_match('/1/',$p) || !preg_match('/2/',$p) || !preg_match('/3/',$p) || !preg_match('/4/',$p) || !preg_match('/5/',$p) || !preg_match('/6/',$p) || !preg_match('/7/',$p) || !preg_mat...

1
Q: CakePHP: Unable to find Auth data in $_SESSION

SDPI'm doing some basic integration between a CakePHP app and some external code. I want the external code to know if a user is logged in. The external code does not load CakePHP, so thought I would access that data directly using $_SESSION, but when I dump it it's an empty array, even when I'm logg...

0
Q: fread is blocking if there is no data to read

Fabianhere's my problem : I'm trying to send some specific query data to a server and some servers( game servers ) don't respond to the query protocol and the script is just giving me a timeout on the fread($socket, 1024) function. Fatal error: Maximum execution time of 10 seconds exceeded in E:\xamp...

-1
Q: 500 internal server error in wordpress ajax

Vishal SharmaWhen i am using ajax then its give me 500 internal server error.. this is the ajax code..whats wrong in that...PLEASE HELP!!! var xmlhttp; if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); ...

-1
Q: Doctrine - Array of Entity IDs

LartTylerFirst off, I want to apologize if there's an answer for this out there already. I've done a fair bit of digging, but I'm kind of strapped for time so I don't have the luxury of searching as much as I'd like... I have a table in my database that contains a comma separated list of IDs for entities...

0
Q: how I can pass multiple parameters to URL in php

blackI have a problem in passing 2 parameters via URL I don't know how, so I wrote this code please help me to write the correct one thanx <form method="get" > <b>Enter the Quantity you want:</b> <input type="text" name="quantity"> </form> <br><br> <a href='./shopping-cart.php?part_id="<?php ec...

0
Q: BTC basecoin api espect get type code

user1567682I am trying to integrate basecoin api with the code given bellow <?php require_once(dirname(__FILE__) . '/lib/Coinbase.php'); // Create an application at https://coinbase.com/oauth/applications and set these values accordingly /*$_CLIENT_ID = "83a481f96bf28ea4bed1ee8bdc49ba4265609efa40d40477c2a...

0
Q: return response from php to jquery

LaiaI'm trying to add a like/dislike button to my web, but I've got some problems with the ajax. Everything works find, but I can't figure out how to return the php response to the original page, and I've tried almost everything I came up with. Here is a piece of my javascript code: $( "#dislike" )...

0
Q: copy values from select input to text input with X amount of select and input fields

charlieI have this Javascript code that copies select options values into a text input: <script type="text/javascript"> $(document).ready(function() { $("#category2 option").filter(function() { return $(this).val() == $("#category").val(); }).attr('selected', true); $("#category2")....

0
Q: Two included php forms update each other

user3130681I'm a beginner in PHP and i have two separate forms in two separate php files,when i include them in a third file in the third file: div id ="poll" style="background-color: graytext;position: fixed;top:40%;right:30px "width="100" height="300"action="<? $_SERVER['PHP_SEL...

-1
Q: What is the best way to store the password in PHP?

user3100753I don't want to display my original password in any where in my code and DataBase. Is there any way to do this in PHP or Drupal?

0
Q: relational query in yii

user2991175I have two models named Statement.php and Images.php In my statement.php model i have a relation saying 'images'=>array(self::HAS_MANY,'Images','statement_id'), you know what i mean by this line, Now , i want to execute this relational query , $data = Statement::model()->with('images')->...

0
Q: Affectation attribute with heritage

ChoubidouI Have something like that : class MY_Controller extends CI_CONTROLLER { public $user = 'Default'; public function __construct() { parent::__construct(); $this->user = 'Construct'; } public function getUser() { return $this->user;} public function signIn() { $this->user = 'S...

0
Q: InnoDB: Copying a number of records along with their tag memberships

EleventyOneForeign keys might be appropriate to this problem/solution. However, I have inherited this code and db, which do not use foreign keys, and so it would be difficult to add them. If absolutely necessary I can do it, but I'd prefer not to. Let's pretend that I have a very simple set of tables in an...

0
Q: PHP Segmentation fault during preg_replace

magalterI'm using Magento and got PHP Segmentation fault during rollback database from admin. I make and investigation and see that the reason is such line: preg_replace("/'(\\'|\\\\{2}|[^'])*'/", '', $sql); $sql string is big enough, I'm attaching it. https://drive.google.com/file/d/0B9UbKYbywcABOTR...

0
Q: Appointment e-mail not showing as an appointment on Android phone PHP

user3130700Weird. On Web and in Outlook in shows as an appointment that I can add to my calendar; but on Gmail app on the phone it displays as a regular e-mail (can't add to Calendar). Here's my function: function mail_agenda($dtstart,$dtend,$loc,$summary,$from,$to,$subject) { $vcal = "BEGIN:VCALENDAR\r\...

0
Q: Gearman gearadmin command line tool status output meaning

newtonickI am unable to find any documentation on the meaning of the gearadmin command line tool with the '--status' option. What is the meaning of the three numbers found after the worker function name ? For example, then I run this command: gearadmin --status I get the following output: worker-func...

0
Q: update mysql doen not work properly

user3127009hi I made website for maintaining PC, if anyone get on my site and when try to answer him the answer will go to all visitor not to the specified person, please help, the code below would please help me out, see the code below <html> <head> <meta charset='utf-8'> </head> <body > </body> </html> <...

0
Q: Symfony2 Custom Exception and Authentication token

RRStoyanovafter 12 hours of headbanging and reading tons of materials I gave up and asking someone to help me how to solve the "The security context contains no authentication token. One possible reason may be that there is no firewall configured for this URL.)" problem. How I can pass the security contex...

0
Q: Dynamic Sitemap for Google Webmaster Tools

AngelI want to make a dynamic sitemap for Google Webmaster tools. But for some reason, I can't make it work. I write some lines in the htaccess for these purposes (RewriteRule), and it work fine. In fact, validation is OK: validation But Google print this error every time (here is the english transla...

0
Q: PHP setcookie() function not working in Wordpress Template File

user3130733if (isset($_COOKIE['City'])) { setcookie('City', 0, -(3600*3600*3600)); setcookie('City', "Edmonton2", 3600*3600*3600); } else { setcookie('City', "Edmonton", 3600*3600*3600); } I am using this code to set a cookie in a wordpress site. When I place this code in header.php, it works perfectly. B...

-1
Q: get all files referenced by html code

user3092244I am trying to implement the browser basic function, but I don't know how get all files referenced by the html string, I know that it must be very complex, because it must to interpret the html but maybe exist some library that perform that's work.

0
Q: Resetting password does not work

jona jürgenI got a irritating problem, I can set a new user + password. Logging in works perfectly. When I reset the password, should be the same code, I am not able to log in with the new password, and I can't log in with the old password. Code for setting new user: $random_salt = hash('sha512', uniqid(o...

0
Q: Get a related list with Zend_Db

PythonizoI have 2 tables: users: | usr_id | Name | |¯¯¯¯¯¯¯¯|¯¯¯¯¯¯¯¯¯¯| |1 | User1 | |2 | User2 | |3 | User3 | |4 | User4 | users_contacts | usr_id | usr_contact_id | accepted | |¯¯¯¯¯¯¯¯|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|¯¯¯¯¯¯¯¯¯¯| | 1 | 2 | true | ...

0
Q: cakephp and sencha touch ajax error

user3130752So I'm building a companies mobile app using sencha touch. Most of the code for the desktop version of the site has already been written. Since the company does not want to install anymore plugins (ie. bancha) I have to write most of the code myself. This is where I have encountered my first road...

-2
Q: I have made a Search Engine

user3042325I have made a Search Engine, but every time I search for ie. "Black Pants" it comes up with this error: Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/u567454288/public_html/search/search.php on line 36 No results found for Black Pants Here is the code: <...

0
Q: Kohana 3.3 Routing Issue - .htaccess?

thatidiotguyI have the following bootstrap.php routing (its the default): Route::set('default', '(<controller>(/<action>(/<id>)))') ->defaults(array( 'controller' => 'Index', 'action' => 'index', )); I have the following file structure: application/ classes/ Constroller/...

0
Q: Nested foreach statements... how to break out of child and continue parent if a match is found

Mike MillerI have an application that is passing a list of system printers to a PHP application. I am trying to set it up to ignore the printers that are basically just "software" printers. As you can see from the code below(which is by no means pretty). That I have an outer(parent) foreach that is looping ...

0
Q: $.mobile.changePage in showing a blank page in AJAX

user3051827I have login function which works but after login in it doesn't take the user to Homepage instead shows a blank page why isthat? Ajax with problem: function Login(){ $.ajax({ url: 'http://creative.coventry.ac.uk/~4078078/moviereviews/v1.0/index.php/user/adduser/'+$("#loginusername").val(), h...

0
Q: Undefined variable on comments wordpress

user2966586Im tidying up my custom theme and in debug mode I am getting a undefined variable in my comments section. This is my custom comment section and the undefined variables showing up are aria_req, req and commenter. This custom comment function is within my functions file. How would I fix this? // E...

1
Q: How can I represent this Game Owner Relationship in Laravel's Eloquent

Martin TraceyI'm trying to tease out a logical problem that I'm having and I didn't know where else to ask! I have two Objects whose relationship I'm trying to describe; the User and the Game. So, right now, I have that a User belongs to many Games, and that a Game belongs to many Users. What I'm trying to d...

0
Q: Facebook Login Redirect URI error with Codeigniter

emkayI am trying to make my facebook PHP SDK login work from a codeigniter setup from my local server, but I keep persistently getting the following error: Given URL is not permitted by the application configuration I have already tried adjusting my facebook app domain and website URL settings. ...

0
Q: How do I acess a php file from another domain

Pirvu Mihai-CristianSay I got 3 websites. Every time I do an action on site (1), I need to access file.php from (2) and (3) with the parameter of the site the action has been done ( (1) in this case ), so, for this example, I need to acess: (2).com/file.php?site=1 (3).com/file.php?site=1 The same applies if the ...

0
Q: Tank Auth get value from textbox in the view

gouthaman93I am new to codeigniter, In my application i am using Tank Auth library for authentication. I am trying to add two text boxes such as first name and lastname.So in the register_form.php i added this following code $firstname = array( 'name' => 'firstname', 'id' => 'firstname', '...

0
Q: How to include PHP generated data in Dart (no Ajax)

user1180612I currently have a website using PHP (Laravel) on the server and Javascript in the client. Now I'd like to replace the Javascript with Dart. On the current webpage, I inject some data into the Javascript like this: <script> var mydata = <?php echo $mydata; ?>; /* now do something with m...

0
Q: PDO rowCount returning thousands of records but fetchAll failing

AnchovyLegendI have encountered a really bizarre problem. In the code below, rows count returns a number in the thousands, which is correct. However, when I go ahead and fetchAll the script dies and the below echo statement is never executed. I tried putting a try catch around the prepare(), no errors / exc...

0
Q: Stop direct access to all files in a folder, but allow ajax requests

user2921557Not sure if this is possible, but... Lets say i have process/login.php if a user visits that page directly i have a check to see if the user has come from posting a form etc. If not, they get 404'd. However i am now building up plenty of process scripts etc and they all require different check...

0
Q: Twig Cannot find class after render

Peter FoxI'm having troubles with my Twig template renderer. We are using twig to render a template. I'm trying to obtain the rendered string, and email it as HTML email. However after rendering the Twig string, PHP is not allowing any other class to be executed. $ReturnArray is not empty and does con...

0
Q: jquery mobile protecting pages based upon logged in status, redirect loop

hyphenI'm using jquery mobile, and in my index.php file I have the login page, then another page that should only be accessible by logged in users. Any time I include the function call that checks that checks to see if the user is logged in and redirects if they're not, I get redirect loop error. Her...

-2
Q: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given ERROR

user3130803I'm trying to retrieve information from a MYSQL DB. However, I get this error. My code: $result = mysql_query("SELECT * FROM DB ORDER BY name ASC"); while($row = mysql_fetch_array($result)) { echo ucwords($row['name']) . "\t" . ucwords($row['number']) . "<br>"; echo "<hr width='20%'>...

0
Q: Dumping a MySQL database to a file using a PHP script

PeteRI know there are countless questions on SO, and several articles on the web regarding this subject, but after looking at all the options, I was moved to write my own code to address my own requirements. However, this has raised a couple of questions for me that I would appreciate your valued inpu...

0
Q: Updating colorbox with ajax

MathiasI am very new to using AJAX, basically this is my first project, and i'm kinda clueless to what the best way to approach this would be. The scenario and what i want to accomplish. Currently i'm opening a form with a select list, in the "lightbox" plugin colorbox. Now with one of the options fo...

0
Q: Getting facebook's post info return "Unsupported get request" when token is from non administrator

user3130746I have a facebook app that a user creates a custom post that is saved to the applications feed like below: $post_id = $facebook->api('/' . $applicationPageId . '/feed/', 'post', $attachment); the post's id is returned correctly, but when I try to get the post info like : $post_info ...

0
Q: SQL select queries don't work

Jonathan OuwensI'm getting pretty frustrated, I've been working on a small snippet of code to get the menu on my page from my database and I just can't seem to get the queries to work. My database connection dóés work, I've created the table with the same settings. Does anyone have any idea what I'm doing wro...

0
Q: eBay dropped the PHP Accelerator Toolkit. Now what?

DcHerreraI am completely new to API development. Over the past year I developed my own database system for my home business that tracks my inventory and sales. But I have to export .CSV files from ebay and paypal. And every time I post I have to still do it by hand. I want to use the API but I don't under...

0
Q: jqplot compatability broken when document converted from html to php

Marius JonssonI am trying to implement jqplot on ta website. The plots are working perfectly when when the document they are embedded in is of type html. When the filename is converted to *.php, the compatability is broken, and the graphs looks like the mess at the right hand side of the following screenshot: ...

posted on December 23, 2013 by user3130832

When running vendor/bin/doctrine-module orm:validate-schema [Doctrine\DBAL\Schema\SchemaException] The table with name 'constructrbe.users' already exists. I don't have anything in database (just dropped all tables), dumped metadata cache. I don't know why but i searched and i see here :Unable to create table in MySQL using Doctrine and Symf

0
Q: Join 3 tables of users, friends, chats

assafeyI just want to get the result of a single user's friends and for each friend to join the last timestamp of the chat between the user and the friend: User friends list: Friend1: fname, lname,...., chat timestamp Friend2: fname, lname,...., chat timestamp ... users table is the main user infor...

0
Q: Inserting into database using ajax , 500 (Internal Server Error)

SolidCloudincIn my html I have a simple ajax that's inside a function that gets called on a button press. I want the php script that's called to insert the javascript variable sent into a database. var myval = 'testuser'; // generated by PHP $.ajax({ type: 'POST', url...

-3
Q: PHP: Determine if computer is MacBook

user3126473I have a web template that displays a calendar, but it doesn't display properly on MacBook Pros and MacBook Airs. Is there a way to determine if the computer viewing the site is one of those, and instead of a calendar, it displays a list of events?

0
Q: Custom PHP Script not appearing on Wordpress custom template

user3019471I have a custom payment script that was developed by someone else. The script works perfectly fine on the previous page that it was on, but when I move it over to Wordpress it disappears and does not load the footer after it. I have a sinking feeling that it is just a missing ;, but I wanted to m...

0
Q: How to generate a multidimensional PHP array dynamically?

aspirinemagaI'am stuck on how to produce the multidimensional array like this: '0' => '-- ALL --', 'GROUP 1' => array( '11' => 'Item 11', '12' => 'Item 12', '13' => 'Item 13', ), 'GROUP 2' => array( '14' => 'Item 14', '15' => 'Item 15', '16' =>...

0
Q: php array with in array names don't output

Albert DIs this possible to do? i'm looking to build a grid of values, but I was wondering if this is possible $section_array = array('$array_1[$i], $array_2[$i], $array_3[$i]); for ($i = 1; $i <= $daycount; $i++){ echo"<tr>"; for ($j = 0; $j < $section_array...

0
Q: PHP PDO FetchAll() confusion

Tom AtkinsHi all I apologize that this question may be extremely simple but please be patient with me, I am a total newbie to PHP. I have created a query and used PDO to return the result to variable -> the result returns the following output - I have used the PDO::FETCH_ASSOC parameter. could anyone tell ...

0
Q: dovecotpw returns different hash when used the $ symbol

TooCooLI tried in PHP via SSH to generate password with the command dovecotpw and if the password contains the $ sign symbol than it generates different hash from the hash the dovecotpw generates in command line. here is the line that generates the password: echo $ssh->exec('dovecotpw -s CRAM-MD5 -p ...

0
Q: Ajax difference between requests

Mpa4HuImagine you have big application (like facebook or G+) with tons of ajax short polling. you have sidebar with news feed (which does not update quite often), you have notifications, you have online users and etc. Now usually what you do it make a spearate ajax requests for each of this (at least...

0
Q: Merge two XML from different language with the same structure

user3130818I am working for a Real Estate Company Who using a specific management software. This one have an API who export the DATA in XML. The problem is that it export two specifics XML by language. But I need one big file... Here is an example : First XML in French fr-BE : <EstateServiceGetEstat...

0
Q: Yii one actionIndex() for 4 table from DB

user3100681I have 4 tables on my DB, where each table contain (id, name) columns. Models: Table1 = id, name; Table2 = id, name; I want to do 1 actionIndex() and 1 view file for each table in my GeneralController, but i don't know how do it. public function actionIndex() { $model = Table1::model()->...

0
Q: I have to click submit button twice for my login

Cesar DaviI am using php to login a user, here is the code that handles the process, the problem is once i provide the username(uname) and the password, I have to click the "login" button twice to get logged in, the first time i click it the page just reloads the second time I click it the script sends me ...

0
Q: Check received values before execute

0101I am just thinking is it really important to check received values (GET/POST) before execute something...? I mean for example checking if user/email exists in the database. If I want to save user data of course is important to check if email address is really email address ,but if I have to only ...

0
Q: Call to a member function num_rows() on a non-object

Su ShaI'm using CodeIgniter, and I want to get some data from a table in a database. in my Model, I have this function : public function fetch_cours($limit, $start, $element) { $id_element = $this->db->from('element') ->where('name',$element) ...

 
10:25 PM
0
Q: Get word 5 characters long [pspell]

DEA7HNeed to get any word length of 5 characters from the dictionary (use the pspell). How can this be done?

0
Q: PHP - Converting Hours to Mintues

user3130889I use this site alot and finally I have come across something that I can seem to figure out. I have a time returned of: 1hr 59min What I would like it to do is covert this value to Minutes (119). I havew tried various strtotime methods but none seem to do the trick. Any ideas? cheers, Stu

0
Q: PHP - Switch Desktop to Mobile & Mobile to Desktop

HampeI'm trying to make a Desktop to Mobile switch for my website, but I can't really get it to work. This code (got it from internet) works, but it only redirect me to the mobile site... <?php $useragent=$_SERVER['HTTP_USER_AGENT']; if(preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|black...

0
Q: Search URL management on PHP

YiseraI'm developing a helpdesk for the company I work in. The only part I'm missing is how to show the solutions we have available to the problems customers and internal clients might have. I have a file named solution_content.php where I will be showing the solution of each of the problems there, t...

0
Q: Compare version with different lengths in PHP

David D.Am I wrong or version_compare doesn't support comparing string/numbers having different "dot" length ? Is there a quick way to compare the following without reinvent the wheel ? version_compare(1.0, 1.0.0.0) => equal version_compare(1.0, 1.0.0.1) => right is higher version_compare(1.1, 1.0.0.1) =>

0
Q: Php file in folder ordering capability

Elliot_DevIs placing a particular file in a folder at a certain ordering position in context of other files in that folder possible with Php? For example can file-D be placed between file-A and file-B. I am new to php.

0
Q: Pull data from regular expression

Ryan NaddyI am trying to split this text up into an array using regular expressions, but my regular expression isn't strong enough to do it. Note: There can be one or more {elseif} lines just like PHP {if 'Fred' == 'Fred'} Welcome Sir. {elseif 'Fred' == 'Wilma'} Welcome Ma'am. {else} Welcome,...

0
Q: ZF2 Layout PhpUnit

Stillmatic1985Is there a way to disable the layout for a specific controller action test? I think it isnt really needed in every controller action test. This is what i have: public function testIndexActionCanBeAccessed() { $this->dispatch('/route/myroute/'); $this->assertResponseStatusCode(200); ...

0
Q: 500 Internal Server Error when trying to use ErrorDocument to handle request

user3130907I have this .htaccess file: Options -Indexes RewriteEngine on ErrorDocument 404 /404.php RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^([^/]*)/?(.*)$ ./$1.php RewriteCond %{THE_REQUEST} \.php RewriteRule ^(.*)$ - [L,R=404] However, when I go to loca...

0
Q: Error installing Laravel 4 with composer

ArgodotsWhen I try to install Laravel 4 via Composer, I get the following message in Terminal Mcrypt PHP extension required. Script php artisan optimize handling the post-install-cmd event returned with an error The PHP version on my computer is 5.5.3 and when I run phpinfo it shows that mcrypt i...

0
Q: Trouble setting up and debugging PHP Storm project from existing files in mounted / shared folder

Matthew UnderwoodI am struggling to debug a PHPstorm project from a remote server. I want to debug a specific file called index.php. I right click and press debug but it pops up with the configuration box with a list of fields and a error at the bottom telling me that the PHP interpreter isnt installed and click...

0
Q: Android query from database, find cheapest price at market

user2932645I have android app that reads barcode or take barcode manualy from user. first part users can submit new product with market chosen. second part users can query barcode and application should return market names where this product (with this barcode) primary goal is find cheapest price, which mar...

0
Q: mod_rewrite /$variable/file.php

zappbravoI've been trying to attempt this, but I am unable to yield any results. I'm trying to rewrite a variable into a "directory" in the url to multiple files.. I better explain this is what I mean. Without the rewrite: /index.php?var=test /admin/panel.php?var=test /faq.php?var=test /directory/tes...

0
Q: Create or Update - Laravel 4.1

JazerixAs there is firstOrCreate() in Laravel Eloquent, I was wondering if there was a function that could either create a record or if it exists, update the current one? Or would I have to write my own one? I wasn't able to find anything in the documentation, but it's not the first time, I've found s...

0
Q: Counting the Total Results that Match a Query on a Given Date/Time

DroBuddyI'm attempting to fetch results from my DB to be used in a Google Chart. The MySQL query: $query = "SELECT DATE_FORMAT(created_at, '%l:%i %p %m-%d-%Y') AS date,"; $query .= " COUNT(tweet_id) AS count FROM `tweets`"; $query .= " WHERE tweet_text LIKE '%{$q}%'" ; $query .= " GROUP ...

0
Q: Wordpress add a class to menu link

Giova.panasitiI need your help. I need to add a specific class on the link that wordpress generates in the menu. What should I edit? The HTML output in my case is: <nav class="nav" role="navigation"> <ul> <li id="menu-item-8" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8"><a href...

-1
Q: Get image names inside JQuery

AlexeyI want to use filenames inside my JQuery script, but I can't access the directory. I decided to use php for that, which would scan the directory beforehand, create an array of images inside the folder, I would call the php script from jquery through ajax, and then use everything as I need. $.pos...

0
Q: basename not giving me complete URL PHP

YiseraRight now I'm printing the current URL I have and it kinda does it ok: $currentURL = basename($_SERVER['PHP_SELF']); The problem is that it only prints solutions.php instead of printing solutions.php?id=581298a7-6c08-11e3-9bea-742f689f29f1 Anybody knows why this is happening? I need to ...

0
Q: how to link back to index.php in the fat free framework

LiseloreI have created some routes with associated html links and they all work fine, except the homepage route (link). So when i press on the home link to go back to index.php, it does not work. I have already tried using a slash as key in my array, but that takes me too far back. What can i put in t...

0
Q: How to parse this very hard array?

user1596031I would like to get the current trending topics from twitter, so i'm retrieving the list using their api and get a multidimensional array back. Does anyone has an idea how to parse this? I want to get the names back in a variable. Thanks in advance! Array ( [0] => stdClass Object ...

0
Q: Get specific files in a Recursive Directory

JohnFollowing a given example by a comment in the php.net manual I am trying to grab each file named file.txt in a recursively directory structure. Folder/ subfold1 subfold2 file.txt subfold3 file.txt etc. is a example on how the folder structure may look like. $directory =...

0
Q: File sharing community

Alexander AhlsenI'm looking for a cms/simple script that will let users login, upload a file, add title, description, pictures of what the file contain and some custom fields I will add. Users that are logged in should also be able to download, comment and rate the files. It will be much like IP.Downloads but I ...

0
Q: No index.html page ,issue in hosting

Jean-Luc GodardI am making a website which is a forum . I am doing this first time. I have uploaded some content on 000webhost for testing my website through FTP . The problem is there is no index.html file there but there is a index.php file there . it works perfectly on localhost . can anybody suggest me wh...

0
Q: How to add a php module to apache in Redhat/centos?

user3112115I have a webserver in apache redhat/Centos, there are no PHP modules, can anyone tell me where can I find a php module with .SO extension file? in www.php.net there are no .SO extension files...

1
Q: Symfony2 "FatalErrorException: Compile Error: Cannot redeclare class" from time to time

Dominik Kukackatoday I got an very odd situation. I am implementing a simple 1:m relation between two entites in Doctrine Symfony2. There are Users and Groups. Each User should be added to exactly one Group. But every 3-4 reload my controller spits out an error. FatalErrorException: Compile Error: Cannot red...

2
Q: PHP Autoloading subfolder

Alvaro Carvajal NakosmaiIm doing this spl_autoload_register(); I have a folder called libs where all my files go like : user.php / orm.php etc and inside each class I have it like this namespace libs; class User { } Calling the class like this $app = new libs\User; That seems to work but what should I do if fo...

0
Q: Undefined Variable "name" in Enquiry.php (Symfony2)

xanesis4I have been following this tutorial: tutorial.symblog.co.uk, and just finished up Part 2. I also followed what one of the users said in the comments about the deprecated functions that were part of the tutorial, and I fixed those in my code. However, I still get the following error when I try to...

0
Q: Display video from custom post type

AlbaClanI am trying to embed the video from my custom post type. Currently I have the following output: <?php global $post; $video_link = get_post_meta( $post->ID, '_cmb_video_embed_info', true ); echo $video_link; ?> This displays on the page http://vimeo.com/43426940. I tried to embed using the fol...

0
Q: Scraping with curl, selecting what is scrape based by nth

Willee5586First time working with curl and scraping. The <td> element that I need has no special id or class. I was searching for a way to specify based on nth. I was unable to find anything. Is this possible? I am also unsure of how speed would be effected if I was to just pull a large section instead. ...

1
Q: String function to extract only ID from URL

YiseraI have this string: solutions.php?id=80d28c22-68d9-11e3-af95-742f689f29f1 How can I extract just the part of the id, just the value of the ID, the 80d28c22-68d9-11e3-af95-742f689f29f1 I tried the substring function of PHP, the problem is I'm still figuring out how to tell it that it's all...

0
Q: double quote in form field value in wordpress plugin breaking codes

mksIn one of my made wordpress plugin, i created a admin page and have a form to save some option settings.In that form there are many fields like html - input, select.... one field is - <input type="text" class="input-xlarge" name="token" value="<?php echo $token; ?>" id="token" /> problem is i...

0
Q: Quote tags regex php - general case

Ime ImeI've asked question about regex for alternate quoted, unquoted, quoted, unquoted... case in this thread: Regex for quote tags php I realized I need more general case with preserved items order. Like quoted, unquoted, quoted, quoted, quoted... etc... Also there are not nested quotes. I guess it s...

0
Q: Assigning artwork to an MP3 file

user2879373I'm wondering if there's a way to assign artwork, artist names, etc, to an mp3 file's metadata. Is this possible using PHP? How would I go about doing this? Thanks.

 
11:19 PM
0
Q: DKIM sign outgoing mail from any domain (with Postfix and Ubuntu)

user3130983I got DKIM setup on my mail server (postfix and ubuntu) so it signs outgoing emails anmd that works fine for one domain. However, I need it to sign emails from any domain (in the From address) and not just my own. I'm building an email newsletter service and clients will be sending their own ema...

0
Q: Stop a PHP script and use results

Sam FisherRight so I need to make a script that will be a search function. For the purpose of the question, this is the query: SELECT * FROM table WHERE ID > 5 AND ID < 50000 Now what I need to do is display results in real time as I find them, 1 by 1. (it won't actually be a database query, just an exa...

0
Q: C++ converting PHP code adding numbers to string

deepspaceI'm trying to convert PHP code to C++. $this->Key + 1 + log2p (floor($TimePlot/$this->kY)*M_PI-2*20 In PHP Key is string in C++ key2 is char*, timeplot is time_t and val is int. key2 + 1 + log2(floor((double)timeplot/this->val*M_PI-2*20)) and the error is: error C2111: '+' : pointer additio...

0
Q: PDO Insert query not working

user3112321I'm rebuilding my current script to support PDO instead of MySQL queryies. I am stuck on this insert query though, it's not executing and I have no clue why. Google'd around a bit but couldn't find anything. try { $sql = "INSERT INTO ...

-1
Q: php session data pass with image id

user3108523I want to pass my data to another page with clicking an image and that images id. and ill fetch the data <body> <?php include_once("top_temp.php"); ?> <link rel="stylesheet" href="style/mid_style.css"> <div id="pageMiddle"> <div id="06" class="inner"> <img src="style/ankara.png" alt="ankara" ...

0
Q: Remove Set of Values From Session While Using Dynamic Form

Josan IrachetaHello my fellow 'stackers'. I want some help from you guys. I have a dynamic form where users can order a custom item from my web store. A user can order as many custom items as he or she wants and these items are displayed by storing the values in a $_SESSION. I want to add a button that deletes...

0
Q: CakePHP: Use AWS's DynamoDB Session Handler

user3082009I have a CakePHP application hosted on AWS Elastic Beanstalk. Because of the multiple EC2 instances I will use in the future I want to store my PHP sessions in a database. AWS provides a very nice library for storing PHP sessions in their DynamoDB database. See http://goo.gl/URoi3s Now I putted ...

-1
Q: How do I collect and display city and state information using a visitors ip address?

Jessie MartinI am looking to read the visitors ip address and display their city and state on a text line on my website. For example: We have lenders all over {city, state} ready to help you today. I have looked all over Google trying to find some help with this. Im sure it is something simple, but Im to new...

-1
Q: Words Inside The Character Class

Ryan NaddyIn a character class can I match full words? Using this code, the regular expression removes the {else} tag, so is it possible to add else inside of the character class as a word, and not as 4 letters? $section = " {if {money} == 'yes'} Sweet! {else} Too bad... {/if} "; echo preg_replac...

0
Q: MYSQL banned ips, being deleted on incorrect interval?

xBroakDELETE FROM banned_users WHERE datetime < (NOW() - INTERVAL '$ban' MINUTE) AND ban_length != 'INF'; INF is of course a perm ban, but intervals are as follows 60 - 1 hour and 1440 - 24 hours However it seems as though this query (which is run from PHP at the top of page load) is delet...

-4
Q: PHP / MySQL Platform Needed

user2900709I'm looking for PHP platform which have ready register, login, payment system..... I tried with wordpress and drupal, but those scripts are not compatible with my main script. Any suggestion please? Thank you,...

0
Q: I am receiving a php error when I access my magento site

lodge93When I attempt to access my magento site or admin panel I receive this error: Fatal error: require_once() [function.require]: Failed opening required '__DIR__/composer/autoload_real.php' (include_path='/homepages/1/d372694303/htdocs/Magento 1.8/app/code/local:/homepages/1/d372694303/htdocs/Magen...

0
Q: CakePHP 2.4.3 URL-Rewriting module not working

user3131030Ok... Getting tired of this issue. So I thought I would ask here Just to clarify I did follow the Cake PHP documentation on this. I did google this for almost 2 hours and guess what ... no luck I did enable the mod-rewrite -> this took me a while as I dont have an httpd.conf file I edited my ...

 
00:00 - 15:0015:00 - 00:00

« first day (307 days earlier)      last day (3 days later) »