« first day (219 days earlier)      last day (91 days later) » 

8:03 PM
0
Q: how do i disable wordpress widget for specific page?

user2820896I am new to WordPress 3.6.1. I have apply quick contact module into my site, but it shows in every page. how do I able to disable that widget from contact us page? I had try from page.php file but I am failed to implement what i want.

-3
Q: php: str_split on a string containing numbers

Vihaan Vermaphp > $number="12345"; php > $arr = str_split("", $number); php > print_r($arr) php > var_dump($arr) I was expecting $arr to be an array of digits of the number in string $number. Whats wrong and how do I get the digits in an array ?

0
Q: How To Setup Database Structure for Comic Book App

Zachary MorrisI'm looking to advance in my PHP skills and as a side project I'm trying to develop a Comic Creation app. From a front-end perspective this is basically a 3x2 table where each cell has its own textarea for writing your own frame-by-frame comic - similar to what you would see here: http://www.expl...

0
Q: Making Mathematical Operation with Result from MySQL 's SELECT using Java, PHP

Luigi GiuseppeSuppose that I have this: 1: working with Java Connection MyConnection = null; try { //This code haven't problem! MyConnection = DriverManager.getConnection("jdbc:mysql://"+host+"/",User,Pass); } catch (SQLException e) { System.out.println(e.toString()); } ... String Percent = "SELECT RAND(...

0
Q: Old PHP on new Mobile Platform

user2819772We have an old PHP script which has been running faithfully for years on desktops. We want to be able to run parts of it on mobiles but it doesn't render properly (tiny and unreadable). I've been looking at jQuery, etc but I suspect there's a very simple way to do this...I'm just not an expert....

0
Q: .htaccess used as "database"

PurpleFoxyI'm gonna write a script that will provide to users a way to get a link to a resource stored in my server, and they will have the ability to delete the link in any moment to prevent people with that link to reach the resource. So I have: /imgs/res1.jpg /imgs/res2.jpg .htaccess And in .htacces...

0
Q: what could mean this character

Kstro21I have a web, all encode is set to utf-8, but sometimes, i can see this character � and now, i'm having problems because i want to make an ajax request and if this character exist, the response is null. I really don't understand because for example, in this image, you can see text that come fr...

0
Q: calling another php script from a master php script?

run_time_rookieI have two php scripts scriptA and scriptB. I am calling scriptB from scriptA. scriptB is called inside a iteration in scriptA But, before scriptB finishes scriptA would have already exited. I am not sure what to do next ? apart from adding delay inside scriptA. Thanks !

0
Q: How to post on friends wall using javascript/ php

Suraj MalingaI need to post something on my friends wall. i used a facebook friend selector. I implemented like this //Execute the friend selector $(document).ready(function() { $(".shareFriends").fSelector({ facebookInvite: false, onSubmit: function(ids){ publish(ids) // cal...

0
Q: SQL query extremely slow in Kohana web app on EasyPHP win7 server

GavinI have an EasyPHP local web server with Apache, PHP and MySQL. Until now I've been working with a database that only has 500 records. Sometimes while querying the database there would be a big delay, maybe about 10 seconds, before the data would be returned, but it wasn't consistent. Maybe every ...

0
Q: How to read a php files returned html in php?

user2800761i tried to use file_get_contents("www.example.com/example.php"); But it did not work, I THINK because it is a php file. It works if it is example.html. I do not want the php code, it is backend and i undserstand that is impossible. All i want from example.php is the html within it. Because the...

0
Q: if statement always display true even the input is false

Irish Mae Baliat Opeña 0){ echo "LRN is valid "; } else echo "Your LRN is Invalid. Please Contact your Web Administrator for your LRN."; if($num_rows2 != "") { echo "account already registered"; } else if ($num_rows2 == "") { echo "acco...

-1
Q: php regex find string patterns

Panagiotis George RaditsasHello I'm not good with regex and I would really appreciate if someone could help me out. I need a regex function that will find all patterns that start with : and are followed by at least 1 letter and maybe numbers until next occurrence of a symbol. For example :hi/:Username@asdfasfasdf:asfs,a...

0
Q: WSDL PHP nuSoap return error

Lu TacmarI'm trying to get some xml data from the webservice but i encounter some errors in the result of the call. Here is the code: $result = $client->call('GetDataSheetsLastUpdate', array( 'PartNumber' => 'PSCBXE-01P007CE')); This is the error from result: [faultcode] => soap:Server [faultstring] =>

0
Q: Getting first & last post in custom post type outside of loop

Caden GrantI'm using WP, and have a script where when an image is clicked, the single post content loads using .load(). The arrows to navigate through each single post is located inside the .project div that is being loaded using .load(). Problem is, on the first and last posts, I only want to display cert...

0
Q: Gearman PHP Extension: Dead Job Server = Slow Response from all Workers

gabeI started with this question: Gearman: 3 seconds between client request and worker receive. Is this normal? Environment: Ubuntu 12.04 Desktop PHP 5.3.10 Gearman (libgearman 1.1.5 with PHP Extension 1.1.1) Multiple servers on LAN I couldn't get a worker response time of less than 3 sec and I ...

0
Q: How pass variable from php to jQuery

jdiasI have a config.php file where I define several variables. I want to use some of those variables in a jQuery script. I created a header-js.php file with the following content: <script type="text/javascript"> jQuery("#msgid1").html("Hello world."); jQuery("#msgid1").html("Hello world again."); ...

0
Q: Regex and preg_replace - how to format for embeded images

KimomaruI would like to make posted hyperlinks of images into embeded images on an html page. So, I'm working on setting up some regex syntax but am having difficulty and am hoping someone might be able to help. I would like to turn, for example; http://www.example.com/images/some_directory/logo.png ...

0
Q: accessing json not showing output

codingI am doing json_encode(simplexml_load_file($xmlpath)) I am getting the output as below. {"@attributes":{ "source":"Tas Football", "version":"4.14.00", "generated":"8\/20\/2013" }, "venue":{ "@attributes":{ "visname":"Book" } } } I...

0
Q: while session is empty than sleep

Arijanit Nitti SalihuFirst of all I'm really bad at explaining things so please bare with me. Is it possible to check if the session is empty every second? Then when the session isn't empty stop the interval and do something else. Thanks

0
Q: Restler 3.0 Basic Authentication

MisiuI'm trying out Restler to build web api for my new project. One of requirements is simple authentication. I found nice example on SO http://stackoverflow.com/a/7969250/965722 but it's for Restler 2. Using manual I managed to convert that class to Restler 3.0 <?php class BasicAuthentication imple...

0
Q: PHPUnit stubs - make expected calls independent of the order of invocation

temuriI have the following unit test code: $map = [ 'key1' => 'A', 'key2' => 'B' ]; $stub = $this->getMockBuilder('Phalcon\Session\Bag') ->setConstructorArgs([$sessionNamespace]) ->getMock(); $stub->expects($this->at(0)) // Always called first by: new Phalcon\Session\Bag() ->metho...

0
Q: how to get category name based on category ID Magento

max7I'm currently using the following code to create variable tags for use in the Magento CMS to print out various portions of dynamic data for a product: <?php $_product = Mage::getModel('catalog/product')->loadByAttribute('sku', $this->getData('sku')); $_categories = Mage::getModel('cat...

0
Q: editing WordPress Theme with content embedded in PHP script

user2662565I am trying to redo my homepage of my website which is a WordPress website. The homepage is hardcoded in PHP, and I would like to figure out how to Replace some of the image files Edit the text under those image files I have redesigned the (4) image files I want to update the site with, but ...

0
Q: can't populate a table from a query that has an array

Bill FlippenI have succesfully been able to move an array of 72 values to new sheet:(whith much help from you all and a little luck on my part) verified by the print_r howvever, I am getting "Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in .../admin/emailall.php on li...

0
Q: Php get query filters and url parameters

user2186504I'm working on new ads website. I try to make an search page where I will display filters like: <h2>Make</h2> <a href="index.php?page=search&make=renault">Renault</a> <a href="index.php?page=search&make=mazda">Mazda</a> <a href="index.php?page=search&make=bmw">BMW</a> ... <h2>Year</h2> <a href...

0
Q: Files not found after moving host

John B. VerhoefI have a bit of a weird issue and I hope anyone can explain what is going on. I moved host the other day and copied an EXACT copy of the structure and files from the old host to the new one. The structure is the same and if I ftp to my new host, I can see them all sitting there the way they were ...

0
Q: PHP Shopping Cart Error

TheVirusI'm making a shopping cart and I'm stuck on the actual cart. I've read a few questions on here and tried them but either they don't work for me, or they're plain rubbish. PHP Code: addtocart.php if(isset($_GET['product_id']) && isset($_GET['qty'])){ $product_id = $_GET['product_id']; $q...

0
Q: NO DATABASE SELECTED-\

justinmfelicianoI keep getting this error: NO DATABASE SELECTED in relation to: $result=mysqli_query ('SELECT * FROM admin') or die('SELECT * FROM admin'."".mysqli_error()); I believe this is a question that will provide help to many novice users such as myself. I have included the entire code below: <!D...

 
8:52 PM
0
Q: compare two object doctrine crud

user2799505I'm doing a crud in entity using doctrine. when I update one object I create a new object with the new values. How could I compare the old object with the new? I try to do something like this: $object1 // old object $objet2 = new class(); $object2-> setprice(2); $object2-> setprice1(4); $object2->

0
Q: Why does stream_context_create successfully return data but not my Curl?

user2141625When I first started, I thought Curl would be an excellent way of retrieving a chunk of data in the format json. It didn't work. I tried doing some Ajax request instead, but that didn't work either. Now, this is my Curl request: $ch = curl_init("url"); curl_setopt($ch, CURLOPT_RETURNTRANSFER,...

0
Q: page 403 when i get link from stream (youtube)

DSTHHello I have script which download videos from yutube: <?php $id = "Ew1ralWrkNM"; $format = "video/mp4"; parse_str(file_get_contents("http://youtube.com/get_video_info?video_id=" . $id), $info); $streams = $info['url_encoded_fmt_stream_map']; $streams = explode(',',$strea...

0
Q: Convert and stream videos

DshahI am going to develop a php script on linux based server which will be used to upload videos on server and stream to users. I have seen many open source free/paid libraries available with flash,html5 etc players. After research I have decided to go with ffmpeg to convert videos and use jwPlayer w...

0
Q: Swiftmailer setFrom address doesn't change anything

user2454075i run into problem using swiftmailer- http://swiftmailer.org/docs/sending.html $message->setFrom(array($epasts => $vards)); $epasts is correct in message text, but swiftmailer don't change it in header, so in email i receive mesage from myself not from $epasts

 
9:10 PM
0
Q: PHP Web service response comes up empty

Jay BienvenuI have two Web services defined in PHP. They are created by the same code. Their responses use the same format, and the same method generates responses for both services. The clients are identical (use SoapClient and are created with the same options) except for the URL to which they point. Howe...

0
Q: Sorting database results by category

mXXI have a table in my database with the fields 'Category' and 'Title'. I have multiple records with the same category but other titles. What I'd like to do is print the category once on my page then show the all the titles with the same category. So Something like this: Category 1 Title 1 Title ...

0
Q: How do I apply this conditional logic to a complicated page title/subtitle function?

Adam RobertsonI'm using a few functions and conditionals to display page titles and a subpage title field on all pages. Instead of adding this code to the page template, I want to add it to my functions file so I can easily add too the conditional if I’d like. I found this code which successfully adds somethin...

0
Q: PHP: Speeding up a character simulator that uses GD

AnniI am very new at PHP. I am making a character simulator/"doll maker" here as my first project (similar to this: http://ro-character-simulator.ratemyserver.net/). When the user changes anything like the colour or the item to wear, Javascript passes a query string (like ?gender=0&hat=0&hair=0) to t...

0
Q: counting the amount of rows returned with a query in laravel

Daniel MorganI appear to have hit a halt with my website, I'm trying to get the number of rows returned by the database but it doesn't seem to want to play ball... can anybody else see the problem? This is my query: $check_friend_request = DB::table("friend_requests")->where("request_sent_by_id", Auth::user()-

0
Q: Convert a 2 Dimentional array to a single dimention

user2808753I have an array that looks like this: Array ( [0] => Array ( [25] => 21.00 ) [1] => Array ( [33] => 63.00 ) ) and i want to make it like this: Array ( [25] => 21.00 [33] => 63.00 ) Is there a build in function that i ca...

0
Q: php symfony doctrine or taking data from 2 tables

user2821191Greeting. Since I'm very new don't judge me. I am trying to make a filter but there are some difficulties on the way. I have two tables of data. First with companies, second with users. Companies: Users: _________ ____________________ id | name | ...

0
Q: Make relative link absolute in javascript / php

KevinI have a bug in some of my pages related to a form. On any page in the root directory, the form works: site.com/page.php On these pages, it does not: site.com/subdomain/page.php site.com/subdomain/subsubdomain/page.php I think I've traced the problem back to some script tags that are using...

0
Q: Why won't this php string just explode?

Andrew FontI am trying to explode : $national_retail_propertiesRecord['leasing_inquiries'] which when var dumped originally is: string(7) " 35 34 " I am exploding it by using: $leasingsInqueries = explode(" ", $national_retail_propertiesRecord['leasing_inquiries']); The subsequent explosion is var_...

0
Q: WAMP Post Requests

eweinI am currently working on a CodeIgniter project in WAMP and am have a very strange issue when posting to the server. I am trying to send a simple post request to my controller with some basic data. I know the code is correct because it works when I run it on my live webserver. However when runnin...

0
Q: Request Header Too Long When Authorizing Facebook App

jlgMy facebook app is creating a loop when a user authorizes it to access their facebook information. After trying to load for a while, the page just errors out and says Bad Request (Request Header Too Long) // Init the Facebook SDK $facebook = new Facebook(array( 'appId' => $app_id, 'secret' => $...

0
Q: add field to my prestashop module's model

FaceOfJocki have a model : public static $definition = array( 'table' => 'myTable', 'primary' => 'id', 'multilang' => false, 'fields' => array( 'day' => array('type' => self::TYPE_INT, 'required' => true), 'hours' => array('type' => self::TYPE_STRING, 'required' => false), ...

0
Q: Trouble with preg_match and numbers

A8_TonyI've been researching my issue for ages, but can't seem to find an answer to my problem. I've created a contact form on my website, and wish to validate that the telephone number is made up entirely of numbers only, including a leading zero if one is entered. I've got the following code in my s...

0
Q: Fatal error: Cannot redeclare class OAuthException in OAuth.php on line 8

user2766357I have done absolutely nothing to alter the code for this template, but whenever I try and access it, it gives me this long error! Please help! The Code: http://pastebin.com/k5yYkQPd Thanks In Advanced!

0
Q: Stop sending normal HTML upon PHP error?

ionFishIf I have a PHP script with a starting and ending <?php /* stuff */ ?> tag, and with standard HTML after this, is it possible to tell the server to stop sending the normal HTML if for example, the script catches an error? Example... <?php // ... rest of the script above here $buildout = '(comp...

 
9:40 PM
0
Q: How to highlight search matches in search results with multibyte characters

Tomáš ZatoI'm doing the most simple query to search in my DB, using a simple text LIKE %query%. The MySQL then returns the whole text and I wan't to highlight every occurence of query with <b> tag. So I wrote myself a function: (it's quite long. Skip it and read more if you're not interested in the code) ...

-5
Q: Combining php,mysql, and javascript

CMwilliamsHi I need help creating a javascript that pulls in data from 2 tables in a Mysql database and displays in a webpage.....the look and feel I can probably figure out and edit...any hel would be great

0
Q: Middle ground between self and static

Michael J MulliganI am looking for a middle ground between SELF and STATIC, without the unexpected behavior of Late Static Binding. Below is my code, with practice results and expected results: <?php class A { public function get_self() { return new self(); } public function get_static() { return new s...

0
Q: How to secure javascript-based game

hugerthMy javascript-based game is using three main variables, which at the end are send to .php file, there they are (I think) validated and finally insterted into database. My question is - how could I prevent my game from simply $_POST data pushing to server? Are there any possibilities to do this? ...

0
Q: Magento : How change theme direction by language

kamgfxExample: if I use arabic language the text field direction will be rtl and if I want to write a new text and I switch to the English language the direction inside the text field (`text-align: left) will be ltr automatically i have two language in my site. one is English, and the second is Arabi...

0
Q: Display search results in div while typing with javascript on wordpress site

Danielle ZarcaroI am in the process of duplicating a wordpress website. The person who created this site did not use wordpress properly (he just put a bunch of html code into the text editor instead of creating the site from scratch). Everything is duplicated onto the new site perfectly except the search feature...

-1
Q: How to create a server to get tweets of friends of a certain account and store them into a json file?

ErzeiI got into a project where I need to store a list of tweets of the friends of a certain twitter account, wich will be stored into a JSON/XML that will be accesed later by a mobile app. The truth is that I have no idea where to start as I've never used the Twitter API before. Also, I think I c...

0
Q: Facebook API connect data

Andrew SquireSo I'm building a PHP application on localhost that I'm using Facebook connect with. I'm fairly new to using Facebook API's, so if this is a no brainer bare with me. Everything works great with the Facebook connect, but there seems to be some sort of problem when the page is reloaded. The way m...

0
Q: adding a captcha to guestbook submission form

Bob HeymanI am trying to add a captcha to my guestbook submission form but cannot get the if(($_POST['code']) == ($_SESSION['code'])) statement to work. Please see code below. Any help would be greatly appreciated. if ($_POST['postbtn']){ $name = strip_tags($_POST['name']); $email = strip_tags($_P...

0
Q: Getting HREF of a <a> tag when prey_match_all and curl

AriarteauIt's been a couple of days now that I am trying to find a way to solve my problem. I use CURL to get the content of a webpage and then use prey_match_all to use the content on my style, but I've got a problem when it's time to find some < a > tags in the document. I want preg_match_all to find all

0
Q: PHP Sockets, are they the key?

Pyro4816OK, so in a nutshell, I am working with a friend to develop an online website paired with a java application for distribution. Basically what i need to do is take about 60 bytes of information sent from the application every few seconds, and compile/update that information on a website in real ti...

0
Q: How to make an effective sql query?

rexFollowing are the tables: Table User: User_Id = 1,2,3; User_Name: A,B,C; Table Business: Business_Id = 1,2,3; Business_Name: A,B,C; Business_Detail: Details_A, Details_b, Details_c; Table Visits: Visit_Id = 1,2,3,4,5,6: User_Id = 1,1,1,2,1,1; Business_Id = 1,1,1,2,2,3; I need to create...

0
Q: Yii - Behavior not working properly

Luciano NascimentoI'm trying to use the behavior ejsonbehavior, but It's not being launched properly. Ext: http://www.yiiframework.com/extension/ejsonbehavior/ ejsonbehavior Behavior Path: extensions/behaviors/EJsonBehavior.php Model - Users.php: public function behaviors() { return array( 'EJ...

-1
Q: Reference column in seperate database

user2820461array( "name" => __("OrderBy Parameter",'rt_theme_admin'), "desc" => __("sort the products by this parameter",'rt_theme_admin'), "id" => THEMESLUG."_product_list_orderby", "options" => array('author'=>'Author','date'=>'Date','ti...

0
Q: PHP – Get Latitude/Longitude From an Address with Google Map

RoiI'm want to use this code: http://www.phpmoot.com/php-get-latitudelongitude-from-an-address-with-google-map/ or this: http://webmaestro.fr/blog/latitude-longitude-from-address-php-google-maps/ to get the Latitude/Longitude from an address with Google map The problem is that I'm using none Eng...

0
Q: Populate one dropdown list based on the selection of other dropdown list

sapanI am using eclipse ide, in which i created a dynamic project. In that project, i want to create two drop down lists(category, item). If i select one of the category named car, then item drop down list should have this. (Honda, Volvo, Nissan) If i select one of the category named phone, then ite...

0
Q: How to assign an element a new namespace?

AeyounI am trying to assign a new namespace to an element in the middle of an existing document using createAttribute. (Believe it or not, but that approach makes the most sense with my dataset.) $doc = new DOMDocument(); $doc->loadXML( '<doc xmlns="urn:x-one"><element><child1ofmany/></element></doc>...

0
Q: Trying to pass string after # in URL to a PHP variable

kestrelprodigalI am trying to find a way to do this but I know I can't do this the way I was trying to because of server side (php) vs client side (js). I am trying to get the variable after the # sign in the url, for example if it was www.test.com/hello#4213 I would want to get the string 4213. So far I have...

0
Q: Copy Files from multiple subdirectories to root directory and keep duplicates

user1639634So I have a list of directories and sub directories with images in them. I need to get then names of all of these files in the same format and I need to edit them for duplicates or images that are from different angles (ie the back). Lets say they are all in C:\Users\username\Desktop\a........ ...

0
Q: Facebook PHP SDK $uid = $facebook->getUser() always returns 0

AthanatosI am trying to integrate our DB with the facebook API , really new on this so I would appreciate some help. I am always getting 0 Using $uid = $facebook->getUser() I had a look to similar issues but didn't find a related solution. PHP if($_REQUEST['action']=="signup" && $_REQUEST['auth']...

0
Q: How can i make this code less vulnerable to SQL injection?

Phil FammeThank you in advance! I'm kind of new so please bare with me. My question is how could my code be more secure from a sql injection. I have read that if you take in user info your going to be vulnerable, that's there no way around it. From what I know, my code pasted below, is probably at least v...

0
Q: Add div to each row in loop

this_guyI am trying to query post images to be displayed on the homepage of a WordPress website. I want the final result to look like this - I can get the spans to show up correctly, but I have no clue how to add Bootstrap's 'row' class to each row. Here is what I have so far - Any help is apprec...

0
Q: transition from curl to curl_multi (PHP, cURL)

wb_86I need your help on ideas how can I move this code from using single curl call for every record to using curl_multi. I'll try to explain using some kind of pseudo code, i can't paste actual code as it is spanned through many classes and would not make any sense. // This is how var_dump() on end...

0
Q: Why aren't I able to simply write out an elgg variable to a file?

user2821393Within an existing php file in an elgg plugin page I have no problem running the basic function: file_put_contents('test.txt', "MyName"); and within test.txt I see MyName. But if I try to write out a variable of a simple name string like: file_put_contents('test.txt', $page_owner->name); the...

0
Q: Variable variables CakePHP and 'set' in View

brizzOk, so I have a list of 'TLDs' that I want to loop through and create a chart for in PHP. I want to look up each TLD and use the name of that TLD as the variable. I.e. yahoo.com would be $yahoocom, so that I can create charts for all "TLDs" in the database. My code: $tld = $this->Rep...

 
10:58 PM
0
Q: Login backend system

user2133607Good day, I require a bit of help regarding the back-end of the server, more specifically, the login system back-end. Currently, my script stores the username and salt&hashed password in two different session variables. But the thing is, I managed to force my script into doing that (just wrote a...

0
Q: i cant get my mysql session to start

Lochlan Kennedyok my mysql session will start if $count is = to 1 but its not = to 1 and i have no idea how to fix it, im fairly new to php, and i prefer to use sha1 rather than BCrypt <?php //login form mysql_connect("xxxxx","xxxxxx","xxxxxx") or die(mysql_error()); mysql_select_db("u94000...

0
Q: Modx plugin with QueryPath messing up UTF-8 encoding

actimelI'm having trouble with querypath. This is brilliant solution for my plugins, but i noticed, it messed up characters with diacritics. Modx is in utf-8, all my files are in utf-8, database is in utf-8, querypath also. When I add these chars wiad querypath, they display correctly. I tried all the q...

0
Q: htacces file affecting parent directory

Johnny BravoI have a site set up this way: The directory structure is: /usr/local/sites/example.com/secure/admin The main host config in apache for example.com:80 points to /usr/local/sites/example.com The https config for example.com:443 points to /usr/local/sites/example.com/secure I have anothe...

0
Q: Explan this php segment of code

user1396585Hi could someone explain what is going on in this segment of php code? $entry['images'] = array(); foreach ($property as $property_field => $property_field_value){ if(!empty($property_field_value) && preg_match('/MEDIA_IMAGE_[0-9]{2}/', $property_field)){ ...

0
Q: Unexpected character in input: '\' (ASCII=92) state=1 - PHP 5.4.14 confirmed

user2821417hope you to help me.... here is the think I'm getting error from my host cronjob: Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/u599693672/public_html/app/cronjobs/bf3stats.php on line 11 this line specifically represents this part $memberObj = new \app\classes...

0
Q: display category in a grouped product detail view magento

user2816881I'm currently using magento community. I have several grouped products. For example, I have cologne Polo Green, which is a grouped product. The products in that group are the 2.5oz; 3.4oz, 6.7oz, etc. At the same time, I would like to add the category "After Shave" which will display the after s...

0
Q: Suggest me about converting string with hexadecimal chars to normal utf8 chars

Wiggler JtagI am not posting here you to solve my problem, just navigate me please, where should I go to decode this string. I have tried some url_encode,utf8 encode or some other functions but nothing great found... The string I am getting is a normal string or with hexadecimal characters: "+_-%C4%9B%C5%A...

0
Q: Problems with handling ÆØÅ (Norwegian characters) when running a sql query in PHP

kanarifuglI have a problem that I can't understand. Everything om my site is running smoothly, but when using Norwegian special letters the query fails to add a new row in my database. Both documents in Dreamweaver and PHPMyAdmin is set to Latin/ISO-8859-1 so it should in theory work fine. Ever character ...

0
Q: When does a web session start and end?

sarahLuoThis is more of a conceptual question. But I was wondering when a web session starts and ends when using PHP. I'm pretty sure the session starts when the user first requests any page that has the session_start() function. But does the session end when the user navigates to another page in the ...

0
Q: Warning: preg_replace(): Compilation failed: nothing to repeat at offset 5

TechChefAs i mentioned in title i am getting this error which is really weird for me; actually on the VPS of godaddy i moved my sit; first i got an error of GD library when i try to run my website, so installed GD library by easy apache so now it start showing this error Warning: preg_replace(): Compil...

0
Q: PHP glob : display images and set class with parent folder

divstudioI found an easy way to display images from a folder and subfolders: foreach (glob('uploads/*/*.jpg') as $image) { echo "<img src=" . $image . " />"; } but i need more folders structure looks like this : images/category1/big/1.jpg images/category1/thumbs/1....

0
Q: How to exclude something from this mssql/php query?

nRovI've got this: SELECT TOP 100 IDNum, IDName, Nation, (SELECT SUM(Loyalty) FROM USERDATA WHERE USERDATA.Knights = KNIGHTS.IDNum AND USERDATA.Authority IN(1, 2)) as ClanLoyalty FROM KNIGHTS ORDER BY ClanLoyalty DESC but I want to exclude Knights (21 and 25) so knights number 21 and 25 WONT be in...

0
Q: PHPUnit assertTrue if regex text found?

AnagioI'm using PHPUnit and trying to check if text exists on a page. The assertRegExp works but using the if statement I get the error Failed asserting that null is true. I understand that $test is returning null, but I don't know how to have it return 1 or 0 or true/false if the text exists? Any hel...

-1
Q: set select dropdown value from database

user2805941this is for my update profile page. i want to set the value of my dropdown menu depends on my database please check this <select id="id" name="txtMInit"> <option value="" selected>--</option> <?php $i = range('A','Z'); ...

0
Q: Resumeable Download can't be resumed

James CameronI want to have a resumeable download of a file using PHP. As this post states i need to have a certain workflow to do that, so i added it. Now the matter is that on initiating the download the downloadmanager recognizes that the download is resumeable (due to the "Accept-Range" - Header), but wh...

0
Q: Is any Technic to send text file as request parameter in java URL class and get it in php

user2816297I want to send ArrayList object in java URL class and get it in php. but php has not facility to accept java object then I use JSON in json encode arraylist object and send as request parameter and decode in php but did not give correct result. Then i use an other technic All data is store in tex...

0
Q: Add a line to a file using fwrite

BeaterIve been trying to work this out: if(isset($_POST['server'])): $block = $_POST['ip']; $file_handle = fopen($file, "a+"); $content = "\n" . $block; fwrite($file_handle, $content); fclose($file_handle); endif; just doesnt write it in the file. I do have the $file stated. Tha...

0
Q: preg_replace HOW TO: remove from $_SERVER['SCRIPT_NAME'] everything .. but FILE name

Wiktor LiszkiewiczFor example this is $_SERVER['SCRIPT_NAME'] output: /foldername/index.php I want to end up with index.php MANY THANKS ! (ps. and I don't need to get index.php name in any other way for exampel: using basename(_FILE_) which works great but not if placed in include file. If then we try to...

0
Q: Laravel jQuery ajax problems

Mitch GlennI'm new to Laravel and MVC in general. But i'm even less familiar with ajax. I'm trying to convert my website to the Laravel framework and all has gone successfully aside from my main ajax function. Here's what i've got: Route: Route::post('snowboards/{brand}/{name}-{id}', 'BoardController@deta...

0
Q: AWS S3 work with a local project but on AWS EC2 doesn't with the same project (Codeigniter PHP)

user2821461This problem is driving me crazy, when I tested my codeigniter applicacion in local server everything was ok then I uploaded it in AWS EC2 (Ubuntu server) but when I try to upload a Image to AWS S3 from AWS EC2, I get a error 500. I use the library https://github.com/psugand/CodeIgniter-S3, someb...

-2
Q: $_POST with variable number of inputs?

FlaxbeardHow can I set up a system that reads $_POST data that comes from a form with a user-decided number of inputs? Can I use an index such as $_POST[1] or something similar? (e.g. create/remove pages, submit changes and process an input for as many pages as the user decides they want)

0
Q: Disable session_start(); on landing page only?

cali17I've searched SO before but wasn't able to fix my issue I have my session parameters included in my header. And this header is included in all my pages. Works great except for the landing page (where users register or log in): i get the infamous “Cannot send session cookie - headers already se...

0
Q: css in program constructed tables

Suzanne BradleyFirstly, I know very little about php, html and mysql apart from what I have learned through trial and error. I am trying to style a table, I have succeeded by using html commands, but the 'net page I used to figure this out says they are deprecated, I assume this means they soon won't be avail...

0
Q: navigating to a given nested element - simplexml

prufrockI have an xml document that I am building from scratch with simplexml by parsing sql results. I provided a shortened version for others to see. Essentially, as I process each row of the sql results I added an element to my simpleXml object, and finally save it to a file. MY question is how do...

0
Q: How can I detect button is clicked from light box or dirctly from the page

user2821536I had created a light box Add Customer I just want to find out, the form is post from lightbox or directly through customer.php If it is from lightbox, it will reopen the lightbox until close is manually click Thank you in advance

 

« first day (219 days earlier)      last day (91 days later) »