« first day (289 days earlier)      last day (21 days later) » 

6:04 PM
0
Q: Htaccess pretty urls

user2965243trying to make pretty urls, but it doesnt seems do enything. Im doing this first time and by the guide. So i think im missing something or it aint that simple. Maybe some1 can help? Any advice? Tryed to with generator do but none of them generated code that would work :S this is page: domain.com...

0
Q: I need to set forwarder for user after login

user3026568I am trying to set forwarder in login page for users to redirect them to the page. I mean if user is at mysite/abc and now user wants to make a comment on that page so I need user to be logged in and It will redirect user to mysite/login?continue=abc But it is not redirecting user to abc page, i...

0
Q: Best way to paginate query result without GET method PHP

Johny totaWhat is the the best way to paginate mysql results without refresh the page? I'm using ajax to connect my html file to php. The php file has the query and i want to paginate the result. I'm paginating passing an URL parameter when is clicked but it doen't fit in what i want because my query is ...

0
Q: Alternatives to shell_exec for clearing varnish in php

Marty WallaceI have a script that I have inherited and it clears varnish cache on the server using shell_exec. I have not ever been a big fan of using shell_exec but I do not know another way of clearing the cache directly from a php web page. Are there other ways for this to do?

0
Q: Using method with mixed attribute vs 2 methods

darkheirMy problem is that I need 2 ways to retrieve some informations, one using the id of the object and one using its name. When I'm retrieving the information using the name, then I need to get the id so after I come back to the first way to retrieve the information. I have in mind 2 solutions that ...

0
Q: Paypal advanced GET fields returned

xShiraseThis is a very easy question. I need to code a receipt for a paypal advanced payflow (the page at RETURNURL). Unfortunately, the site is live and I can't switch it to sandbox for testing and I don't want to use my money testing it... What I need to know : Are the COMMENT1 and COMMENT2 fields r...

0
Q: Please recommend a library or framework for custom fields in PHP

PadraigI would like a library or framework to implement custom fields in PHP. Could someone please recommend something? I'm not interested in Wordpress or Drupal; I need to integrate this functionality into a custom application so I'm interested in something compact that I can drive via an API.

1
Q: How to use a transaction query mysql to keep it on for a few page in PHP?

Nina SuhariI know how to using a transaction query in mysql and also commit or rollback. I want to make a portfolio of an application in my website. Some guest could try to use it, but when it end (either they logout or suddenly close the browser), i want all the query they've been made to be rollback so i ...

0
Q: PHP - I need a function that can easily test that a string starts with something or ends with something

DurpDurpkinsFor example: 'Hello World' I need to test if it starts with 'He'. I need to also be able to test if it ends with 'ld'.

0
Q: How do I access the Google Spreadsheets API in PHP?

Josiah SpragueStarting with the Google Developer documentation on the Google Spreadsheets API, I found that "A number of client libraries are provided in various languages.", but Google only provides client libraries for Java and .NET. For a PHP library, they recommend using Zend GData. So, I headed over the t...

0
Q: get class variable in static method

user1238763I have a class variable that I need to have available without an instance of the class. Something like $size = Image::getSize('original'); Here's my attempt, but it getSize returns null. class Image extends Model { protected $sizes = ['original'=>['w'=>'2048','h'=>'1536','f'=>'1'], ...

0
Q: How to add custom rewrite rule to Wordpress

user1869566I have a wordpress page called products which is using a custom template i want them to be able to click a link such as /products/games/ which rewrites to /products/?cat=games is this possible, i've tried RewriteRule products/(.*)/$ products/?cat=$1 [L] placed in the .htaccess but thi...

0
Q: if statement disabling my jquery function/button

Jason KatI am a noobie and still stuck on this problem after hours of searching and trial and error. Any help would be greatly appreciated, as I am completely out of ideas. Thank you. I have a jquery comment submit form, that displays the comment live when you post. The code is working perfectly until ...

0
Q: php while loop ending unexpectedly

Michael McLaughlinSo, I'm writing a custom website for a photographer. I am trying to make it mobile first, and make sure everything can work without javascript. I decided to use a php while loop to create a really long string, for a script tag that I am injecting next to some html. I do not want to put this into ...

0
Q: PHP connect to mysql database

user3071512I'm trying to make a connection between my database and the login form that I'm using in my website, but I'm facing a problem with that, so every time I click on login in this massage appears "No database selected" here is my code ` if(isset($_POST['Email']) && isset($_POST['Username']) && is...

0
Q: resolve url to get the actual page of website?

Ankur Dhanukai came across this kind of URL http://www.ukbidz.com/Baby,category,1889,parent_id,categories actually this URL is not generated by me. I want to some changes in it, and i am unable to locate the page from where the data is coming. So i need to know is there any way to find the page from the dat...

0
Q: Nginx doesn't create cache files (using uwsgi+php)

ArangelI use nginx as a web server and I want to cache everything for my homepage "/". It's a PHP application and I'm using uWSGI with the PHP plugin. This is in my nginx vhost configuration file: proxy_cache_path /var/lib/nginx/ levels=1 keys_zone=cache:10m max_size=1000m inactiv...

0
Q: is my php salt safe?

user3071523I'm wondering is my php salt safe also for open source?, i've trying to search more information but I wasn't able to find what I needed to know. my code: <?php class salter { // this will create 3 ciphiers in order to make hashes clearly unreadable! (I hope...) public function simpleSalt($pa...

-2
Q: Get recently viewed posts by using PHP

zackI want to store and display recently viewed posts. I don't want to use cookies because not only want to show what the visitor him/her self viewed posts but viewed by others as well. I know I can simply store post id in the table and display the data. But is this is best way to do this. As I unde...

0
Q: Product images not appearing in Woocommerce

Rob644I have been using Canvas with a WooCommerce theme in order to develop an ecommerce site for a client. This morning, I realised that the product images that were being uploaded through the 'featured image' tab were appearing blank. Anyone have an inkling of what the problem is? My site is at htt...

-1
Q: Fatal error: Class 'Services_Twilio' not found

Andrew CharltonI'm trying to send a text message when a form is submitted using Twilio's test account however I'm receiving the following error: 'Fatal error: Class 'Services_Twilio' not found' My code is as follows: } else{ //PHP native mail( $to_guest, $subject, $html_text, $header_guest); ...

0
Q: Javascript obfuscate AJAX code

user3065191First of all sorry if the name of the topic isn't the most correct. Imagine the following code which connects to a PHP file by AJAX. function get_locales(){ var the_locale = $('#page-add-text').val(); var url = "classes/load_info.php?type=locale&value=" + the_locale; var all = ""; ...

0
Q: How to stop atomatic submition of a form on your website?

CyberBoySomeone one is posting random comments website http://computerinfo.in/lostandfound/searchlost.php. You can have a look at it. The only forum available for posting is... http://computerinfo.in/lostandfound/reportfound.php. I dont want to apply captcha on it. I want to block that particular IP(...

0
Q: How deploy my environment with git?

mayconfsbritoI've a environment to deploy with git and I don't know how do this. Our team works with several developers hosts (local repositories for each one) which should push for one server with the central repository. So we have other two servers with "bare" repositories for each one, but this two reposit...

0
Q: Google column chart bug with the drawing in Web app

manqkusIn my web app there is a google chart that uses dataTable(jsonObject) to draw the graphs and I have bugged data. Here is my code of calling the function : <script type="text/javascript" src="//www.google.com/jsapi"></script> <script type="text/javascript"> google.load('visualization', '1', {pa...

0
Q: MYSQL Time differencials

CBC_NSBare with me as I explain my scenario. I am using php and mysql to create an automated html email report. This report shows the total number of emails received and logged into our system by a particular client. This is broken down by month in the given year. It also shows the average turn tim...

0
Q: group by, but display only one rows different value from 2 fields and display all other value is this possible?

user3067323Apologies for the strange subject, passed 50 and like php and mysql Have a question that I can not find the answer to or if it's even possible to do. I collect comics and want results like this on a php page Name and year is displayed once. GROUP_CONCAT give me close to the resault i want but h...

-2
Q: 500 Internal Error, Whats wrong with my code?

PrivateMufasaIm having a little issue with my coding, i keep getting a 500 error when i run this script: <?php include_once("../../includes/connect.php"); if (isset($_POST['action']) && $_POST['action'] == "check"){ $email = mysql_real_escape_string(strip-tags($_POST['email'])); $username = mysql_real_escape...

-1
Q: How to delete likes of a Facebook fan page?

vishnuI am developing a Facebook app to manage my pages. Is there any any way to delete the likes of pages? For example the likes should not exceed 500 for a page. Say I want to delete 250 likes from my Facebook fan page. How can I achieve this? I can delete the likes of a post by issuing a HTTP DELET...

-3
Q: Teaching server side programming by building an mvc framework in php

JeremiahI'm exploring different ways of teaching a server side programming course for sophomore students at university. I want to develop course content that teaches the principles of server side development by having the students build a framework and several applications on top of the framework. Below ...

1
Q: Clean way to integrate JS into JS

user300675My goal is to generate some JS from PHP. That is the content of my scipt.php so I can use later <script src="script.php?id=1&username=tom"></script> here is the content of script.php if (isset($_REQUEST["username"])) { $username=$_REQUEST["username"]; $params.="&username=$username...

0
Q: Image not showing ob_start()

user2014780Couldn't find anything on the webs so here is the issue: I have a cropper tool and I want to show the cropped image on this page. But because my functions.php has a function that uses a header method, I had to use ob_start in my file. That causes the problem that my image is not shown (it's a que...

0
Q: Sphinx Search Sorting/Ranking

PhilippI just recently discovered sphinx search which I want to use for my PHP application. I have a table of geolocations where every record stores a country code. For every user who uses the search function to look up geopositions, I know which country he is from. How would I reweigh the results such...

0
Q: MySQL SELECT with double quotes giving trouble printing in php

user3071630If anyone has any ideas on how to help me out with this, when I run it usually just creates a never ending table. <?php $link = mysql_connect('localhost', 'blah', 'blah') or die('Could not connect: ' . mysql_error()); mysql_select_db('blah') or die('Could not select database'); extract($_GET...

0
Q: How to Post object array to php

Arun RajI am working on an asp.net application. I need to call php webservice.I am using Asp.net web Reference to connect the webservice. I need to pass a object array. But WebReference class not correctly converting it to xml format so php cant find data what I send. Below shows my code: C# class ...

0
Q: Update table using mysqli

Joseph82I wrote a PHP function, that takes two input parameters and updates a database table. function updateTable($a, $b){ $query = "UPDATE myTable SET dataUpload=CURDATE(), lastUpdate=NOW() WHERE Code IN(SELECT Code FROM myTable2 WHERE QR = ?) AND aid=?"; ...

1
Q: Is it possible to spoof a php define?

ArianI want to prevent direct access to my header.php and footer.php files... I know there are a lot of questions on SO about how to prevent direct access, but none of them really explain how secure those methods are. Things like the example below, seems like security through obscurity, because any...

0
Q: Getting mysqli_fetch_array data without 'moving' to next row

user3033026I have a result from a complicated sql query. The result is something like this: player_id mail_text mail_title 1 hello talking 2 hi talking 1 how are u? talking 2 fine! talking Now, I want to scan through all the result using ...

0
Q: UTF-8 characters in uploaded file name are jumbled on file upload

gazarethI'm running a system on IIS7. The page META tag has the encoding as UTF-8, and the real encoding would appear to be the same according to the Chrome menu. When I upload a file with a "long hyphen" in its name ("–") it gets converted to junk characters ("–"). The junk characters are saved in M...

-1
Q: php logic for coding

geek-ballerhi i want help with the logic and understanding part of this programming,these cars calculated in the form. what i need help with is how do i understand the logic behind it. 1) Your rental company now offers 6 models: a. Subcompact - $20 a day b. Compact - $25 a day c. Mid-size - $30 a day d...

0
Q: When posting to a URL, Google Analytic's Event isn't firing

Brian LoganI am using a Cron-Job to search the database I have every 15 minutes for new users, the problem I am running into though, is when it finds any new users, it is supposed to use jQuery's GET function to get another URL with some parameters, for instance: http://sampleurl.com/report_to_ga.php?usern...

0
Q: Undefined index using button's name attribute and post method

user3071639So, using PHP, I'm trying to make a simple poll for my website and I've hit a block which I can't seem to get around. To explain this as short as possible, I've got a form, in which I'm displaying the values from the database, and it all works fine. Using a post method, I thought I'd submit the ...

0
Q: HPHP HipHop for PHP make fails at 98%

Bas Kuis[ 98%] Generating systemlib.php [ 98%] Built target systemlib Linking CXX executable hhvm ../third_party/thrift/libhphp_thrift.a(TEventBase.cpp.o): In function `apache::thrift::async::TEventBase::SmoothLoopTime::setTimeInterval(unsigned long)': TEventBase.cpp:(.text+0xf1b): undefined reference to...

0
Q: Laravel, Dropzone "Trying to get property of non-object" File upload error

mateoooi am working on a project that needs file uploading. I have implemented Dropzone.js and Laravel Framework. I am sure i have setup everything correctly but when i drop the files to dropzone and they finish upload i get this error {"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalError...

 
7:28 PM
0
Q: [Microsoft][SQL Server Native Client 11.0]SQL Server Network Interfaces: Connection string is not valid

user1424232I'm trying two methods to connect to my Microsoft SQL Server. We host our own website and have Microsoft SQL Server 2008 installed. I've tried connecting using the server names of localhost, dsw-server, and our public IP address, all throw the same error. You can test the connection here http:/...

0
Q: Drupal session/cookie to non drupal session/cookie

RecurI'll try to simplify this as much as possible and add details if needed. I have two pages: page A and page B. page A has drupal included and I'm logged in. page B doesn't have the drupal includes so I'm not logged in. In page A, I save a string to the session/cookie variable and then I post to...

-4
Q: PHP: I need a function that returns a list of months

DurpDurpkinsFor example: I want it to return something like ['2012-12',''2013-01', '2013-02'... and so on.

0
Q: Allow .htaccess only from one directory to another

gravityboyI have mp3's in a directory called /mp3/ and I want to be able to access them only from another page.php in another directory /main/ on the site. No direct linking from outside. All of the pages are written in php I put this code in the .htaccess file inside the /mp3/ directory... Order deny...

0
Q: Fatal Error: Call to undefined function _()

GameDevGuruI'm trying to use this php class http://www.nongnu.org/phpprintipp/ on my CUPS Server. Now when I try to call a function from this class, i get Fatal error: Call to undefined function _() in /usr/local/share/php/printipp/BasicIPP.php on line 344 Line 344 Looks like this: self::_putDebug(spri...

0
Q: paypal ipn error: Receiver email does not match merchant's

Daniel WhiteI am writing a codeigniter app and trying to get paypal IPN working. Everything works and it logs my ipn response to the database, but instead of 'SUCCESS' it says 'ERROR' and the reason is: Receiver email {my email} does not match merchant's ===== No matter what I do I cannot figure out how t...

0
Q: PHP form processing

user3067188I realise this may be a Noob question but I have read over 40 posts and am still none the wiser as to where or possibly even how to sanitize the output from the form I attach. I found the following code (I have adapted it to fit my form). I have seen on here so many different ways of Sanitizing ...

0
Q: PHP Scrape - Create multidimensional arrays from results - current code only returning one result

user3015175I'm quite new to PHP and am creating a web scraper for a project. From this website, https://www.bloglovin.com/en/blogs/1/2/all, I am scraping the blog title, blog url, image url and concatenating a follow through link for later use. As you can see on the page, there are several fields with inf...

0
Q: flot doesn't draw bars chart

asterix_jvI tried with my other two scripts(line chart and pie chart) but the flot doesn't draw the bars chart... can you help me with this...I think the error is in the javascript.. The library: <script src="js/jquery.flot.min.js"></script> <script src="js/jquery.flot.pie.min.js"></script> <script src="...

0
Q: Want to make title header more loved by Google

Patrick HarrisonApologies for the newbie-level php question. But I want to make title headers more appealing to the Google bot/borg. This is what I am working on for the page title: <title> <?=$this->user->username?> / <?=$this->user->city ?> / <?php if (count($this->memberInterests)) : ?> </title> So, I ha...

0
Q: PHP $varible++ not working :(

user1269625I have this code: $arrayOfData = ("Data1", "Data2", "Data3", "Data4", "Data5", "Data6", "Data7", "Data8", "Data9"); var $dataCounter = 0; var $setCounter = 1; foreach($arrayOfData as $row => $value){ $this->$dataCounter++; if($this->$dataCounter == 3){ $this->$setCounter++; ...

0
Q: How to show uploaded image to View and Table in Yii?

gultomicroI have uploaded images into my project folder. But I cannot show it in the: 1. Gridview I want to show the .jpg file and then 2. Table I want to show the .jpg file And the images data are from database. Can anyone teach me how to do it? Thanks

0
Q: Google Map Marker Clusterer - var markers issue

alliefaydenSo I'm using Marker Clusters on a Google Map. I've got custom markers to begin with though, and the Google Marker Cluster code is as follows: var markers = []; for (var i = 0; i < 100; i++) { var dataPhoto = data.photos[i]; var latLng = new google.maps.LatLng(dataPhoto.latitude, ...

0
Q: PHP persistent socket connection

Alexander PresmanI have the following architecture. A Windows application which can talk with external software through a defined port. A webapplication running on the same localhost. PHP-script serving as connector between these two sides. I make from the webapplication AJAX-request to php-script which sh...

0
Q: match text strings not contained in quotes

thomas(?:'.*?') matches text inside single quotes. I want to match string of text that are not inside quotes though. [^(?:'.*?')] is not working for me though: it matches every character that is not a single quote. How can I change it to match text not within quotes?

0
Q: PHP - Alternating rows & column output

Jennifer FletcherThe principle is similar to zebra-striping a table, but it's not exactly the same thing, so I've had a tough time finding a solution / thinking about the way to do this. I am trying to alternate the number of columns per row. Every odd row will have 4 columns and every even row will have 3. ...

0
Q: Why does my code is executed after window location?

Imri PersiadoI wonder why my code is executed after I use window.location and how I can avoid it? <script type="text/javascript"> if(!confirm("question?")) { window.location = 'index.php?a=my_posts'; } </script> <?php delete("spikes","id",$id); ?> Why does the php code is executed ...

0
Q: how to execute a query within a query?

user3071763After a query is done, on the basis of the result i want to make another result.how can i do that? $sql="SELECT * FROM programme"; $res=mysql_query($sql); while($row=mysql_fetch_array($res)) { echo "$row[0]"; if($row[3]==1) { $prgrmsql="SELECT MovieName FROM movie WHERE MovieId=".$row[1]...

0
Q: PHP: How to load xml schema files and generated a xml instance

user2980469I have a bunch of xsd files and want to generate xml in response. Due to the scalability I don't want to hardcode the xml results.I am using php. This is the sample xsd file, which will also import another xml schema file. <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns="device:info" xml...

0
Q: Cookie dies after Browser restart

John BrunnerI set up the cookies on my site with an 1 year expiration date, but they die when I quit and restart my browser. Is the expiration date too high, or what can be other problems related to that? My code looks like: <?php ob_start(); $_SESSION['SESS_USER_ID'] = $user_info['user_id']; $_SESSION['S...

0
Q: Does the session die if a user lands on a page without session_start()?

RickI've got a site with several hundred pages. Most of the pages do not have session_start() at the top. I do have it on the index.php page, where I need some info from a session variable. But, if a user navigates away to a page without session_start(), then goes back to the index.php page, the s...

0
Q: htaccess URL Rewrite trying to simplify current one

Robert E. McIntoshSo I have an htaccess file already that works fine, but I want to change it from having a bunch of parameters to only one. so my current htaccess file looks like this: Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !/(_modules|css|files|fonts|ico|img|js)/ RewriteRule ...

0
Q: How to display random image and text from MySQL Database with PHP

mxmxwoI'm trying to make this html page (display.html) display a random image submission and random text submission from my MySQL table labeled "submissions". This is the current code for display.html: <!doctype html> <html> <head> <meta charset="UTF-8"> <title>MIXED MESSAGES</title> </head> <?php ...

0
Q: Parsing json data in php

runelynxI can't seem to wrap my head around this. I am getting json data into my php script in the following format: I want to loop through "OnlinePlayers"... which, from reading other questions here, seems to be at $json->{'ServerStatus'}->{'OnlinePlayers'}; assuming I decode it into an object an...

-1
Q: How can I automate the clicking of a button in a web-page?

user7378My rural internet package (using T-Mobile) means that every time I use 250MB, a web-page loads up and doesn't let me have any connectivity until I click a button giving me another 250MB of usage. I would love to be able to automate this process somehow. I have already inspected the various eleme...

0
Q: PHP- How to make it so someone can't change parameters in url and dont run script again on refresh on a page?

user2883722I have a page where any user gets directed to after a payment was made, and in that page there is PHP code to send a confirmation email and some certain other tasks. So I don't want user to be able to refresh that page so the script is run again and I also don't want them to be able to change the...

-2
Q: Decrypting MD5-Hash throught Email?

user3071850I am working on a project, and need to have my Users to get their Password Decrypted from MD5 -> to the plain text (Password) throught their Email-registration, I know that this is possible, so I would love some answeres. If you need any more specific information, just let me know and I'll respo...

0
Q: exif_imagetype is not working in windows

AaliyaI am developing app using cakephp 2.4 in windows in which I need to create Image upload facility. But when I use exif_imagetype it gives me fatal-error. So using this code I checked if exif tool is installed or not if (function_exists('exif_imagetype')) { echo "This function is installed"; } els...

0
Q: CodeIgniter and nginx - Class not found

PJuniorI'v uploaded a CodeIgniter application from my localhost with Apache to a server running nginx. Its works perfectly on my localhost and on other server with Apache. It's under a subdomain, an domain and other subdomains are running PHP 100%. This application in CI doesn't start, and PHP is ret...

0
Q: Full text not displaying after a quote

Jeremy DuenasI've got an item in a database that has a quote in it and when it displays on the page that's calling it, it cuts out a quote in the entry and everything after it. This is what's in the database: 5' & Under P&S All that gets outputted is just the 5. Silly mistake, just need to make it escape t...

-1
Q: please help ... i need to convert this php code to asp.net

user3071574this php cod calling api , but i need to implement it using asp.net can any body help me please? var $xmlData = new DOMDocument(); $para['ID'] = "123"; $para['Name'] ="ABC"; $request =xmlData->createElement("PARAMETERS"); xmlData->appendChild($request); foreach ($para as $key => $val) { $key =...

1
Q: pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0

TyronAfter a apt-get dist-upgrade to Debian 7.2, pdo.so disappeared. What am I doing wrong? root@tynix:/usr/lib/php5/20100525# apt-get purge php5-mysql Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: php5-mysql* 0 upgr...

0
Q: how to create table and insert data from php?

SoheilI'm pretty new in php , i wanna add some data from form in html , i created a table and add insert code to php , this is my question : i want to create a table once and after that just insert data but in my code every time the code wants to creat a table here is my code : <?php //create co...

1
Q: Handling data with 1000~ variables, preferably using SQL

user3002686Basically, I have tons of files with some data. each differ, some lack some variables(null) etc, classic stuff. The part it gets somewhat interesting is that, since each file can have up to 1000 variables, and has at least 800~ values that is not null, I thought: "Hey I need 1000 columns". Anoth...

0
Q: Using Drupal to store json content and images for a site

RoseI'm planning to use drupal to store some JSON content for our company site. So we don't have to hardcode the strings in our dynamic web project and we can change the strings in drupal and publish the content that would ultimately display in the site. The same thing for images. We wanted to store...

0
Q: PHP: Scrape all numbers from Brackets "(123)"

user3071873I have a HTML-Code. The structure is always the same. But i don't know, how i can extract all numbers from the brackets. Example-Code: <table align="left" border="0" cellpadding="0" cellspacing="1"> <tbody><tr> <td style="padding-right:0.5em;padding-bottom:1px;white-space:nowrap;font-size:1...

0
Q: How to traverse child elements by xpath in DomNodeList?

user3061744guys! I need to parse various HTML pages with different structure. For example, I have executed xpath query: <?php libxml_use_internal_errors(true); /* Createa a new DomDocument object */ $dom = new DomDocument; $dom_grep = new DomDocument; /* Load the HTML */ $dom->loadHTMLFile("http://domain...

0
Q: restFUL API dependency on store

Pretty Good Pancakemy app is a Book manager where I can create Books and Pages. I have my bookController with a "store" on POST, which store a title and a description. public function store() { $rules = array( 'title' => 'required|min:3', 'description' => 'required|min:30' ); ...

0
Q: Redirect App to Facebook Tab after granting permissions

arielcrI'm trying to redirect my app to the installed Facebook tab after granting permissions, I configured the getLoginUrl to use the page tab url as the redirect_url like this: $params = array('redirect_uri' => 'https://www.facebook.com/pages/mypage/xxxxxx?v=app_xxx'); $login_url = $facebook->getLogi...

-2
Q: restricting access of php page till user logs in

Amy JenningsHi im trying to write a script that restricts the access of user to a page until he has logged in with username and password. I keep getting undefined index file for username and password? any one have any suggestions?? <?php include 'config.php'; mysql_connect($host, $user, $password); mysql_s...

-4
Q: Get Current Date,Month,Year

Wayne Tun MyintIs there any easier way to get current Date, Month and Year? for example (11/12/2013) day = 11 (example 398173123 may be) month= 12 year=2013 Thanks, I only want timestamp.

0
Q: Issues with Browscap.ini

HeyItsProdigyI recently started to use the get_browser() function inside of PHP and I encountered a major issue. I am trying to return the browser that the user is using back to the user but when I run the code: $browser = get_browser(null, true); print($browser['browser']); It returns 'DefaultBrowser'. I...

0
Q: Open PDF from FPDF in new tab

Deep DoradlaI have a process where customer clicks if he wants a report to be generated and downloaded while creating a business unit. This report will be in pdf format. Currently I am using Codeigniter and I use FPDF to generate pdf files. The pdf opens well when it is requested. But Problem: 1) PDF ope...

0
Q: Wordpress - And & OR in same array to compare

Matthew O'DonnellBeen spending most of day working on issues with my array. After solving the duplication issue with entries i am now met with something that is proving tiresome. <?php $mergedterms = array_unique(array_merge($age_terms, $game_terms, $series_terms, $rating_terms, $genres_terms), SORT_REGULAR);?> <...

0
Q: JSON Directory index with PHP - file access?

IARIThis is a very simple version without any error handling of what i want my php-script to do: echo json_encode( scandir($_GET['d']) ); Now i want to restrict file access for this, such that the index is only built, if the given path is one, which say Apache also serves an auto-index for. Alter...

1
Q: Shorthand when using || for comparison (==) rather than assignment (=)

terralingI've seen lots of questions about the use of || in assignment expressions such as $a = $b || $c but I haven't come across this, so forgive me if it's a duplicate. Can you abbreviate a comparison used in an if statement such as: if ($a == ($b || $c || $d)... or is it necessary to write it ...

0
Q: Error 504 Gateway time out OR how to force NOT keep-alive in PHP?

Zod123sorry for the long question, in fact I have two questions, a simple one and a trick one. If you could help me with the simple, this will be enough, please go to the end of this text. Or read the complete text and try to figure out what is happening. I am facing a very strange situation building ...

0
Q: How connect php webservice to the network operator to allow facturations from SMS sent by GSM devices

user3071731I'd like connect my php webservice to the network operator to allow the facturation of all SMS sent from mobiles devices. So, my question is what can i add into my webservice to factured all SMS sent, and how do that. I can't see this on google because i have not the key word to realize that

0
Q: How to check if text widget has content?

shnjaveeI need to check if Text Widget has certain content? To be more specific, I need to check if Text Widget has content with shortcode that starts with: [button ... Any help is much appreciated! Thank you!

0
Q: removing (case insensitively) duplicates from array while trimming whitespace

crazy sarahthis is a very similar question to Best solution to remove duplicate values from case-insensitive array In the accepted answer the 1st comment mentions using trim() to remove whitespace as well. I'd like to do this but I can't figure out where the trim should go can anyone help me? $r = array...

0
Q: AJAX Multiple Forms With Same Submit/Click Function

user3065173I've got multiple forms (that are similar) that are passed using Ajax to appended a PHP page using this code below. However, when I click the first or second form, it only sends the data from the first form. Can I use just the one function on all forms, or is there a better way to go? $('.co...

0
Q: WordPress Display User's Avatar not Showing

TaylorTDHouseI am making a wordpress site now, and I just inserted an HTML block into my sidebar. I want to to serve 2 functions. 1. If the user isn't signed in, I want it to display a login block. (working) 2. If the user is signed in, I want it to display their avatar. (not working) I looked up the get_a...

0
Q: PHP zipping solution for large file that does not involve the shell

pillarOfLightso I'm creating a gigantic zip file (may be over 1GB) with PHP... so far I've explored -ZipArchive -shell_exec however ZipArchive eventually runs out of memory and using shell_exec to execute a Linux Zip command is undesirable for security purposes I tried closing the zip and reopening them ...

0
Q: Automatically rename or convert all .jpeg files to .jpg in MySQL

mxmxwoI have an HTML/PHP form that has a text and file input. <form enctype="multipart/form-data" action="add.php" method="POST"> <label for="textarea"> <div align="center"> <br> <br> ::: MESSAGE :::</div> </label> <div align="center"> <textarea name="name" id="na...

0
Q: Molecule with JavaScript canvas?

user3071969Molecule with JavaScript canvas Hi If I could get a piece of code introduced me to. So the molecular formula is received (for example h2o) and very easy to show.

0
Q: how to make my php client be the only one that can get data from my php server

Alejandro CasasHello I have this simple code: Client <?php function get_url($request_url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $request_url); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec($ch); curl_close...

0
Q: PHP Git Hook works directly when test execution but not when executing via git

Bradley WestonI created the following git hook to automate some tasks for me and to pipe it back down when I push a commit to my server. The code works fine when I run it directly. When the git push pushes to the server and the server executes the hook it says remote: Deployment [BETA]: updating. remote: git...

0
Q: How to create two columns PHP?

TheWebsI am having the worst time trying to create this, it should be simple. I have an $info array that consists of $person=>$personInfoArray and I am trying to say, for the first six, do one column, for the next x amount, do another column. What I have is: $infoCounter = 0; foreach($info as $person =>...

0
Q: GET method with checkboxes - PHP

OscarIm trying to display results of a checkbox on a separate page using php, however currently it displays as "array" instead of listing which boxes have been checked. Here is my html: Vegetarian <input type="checkbox" name="diet[]" value="Vegetarian"> Vegan <input type="checkbox" name="diet[]" val...

0
Q: Error with transfering MySQL database (connected via PDO) from localhost to hosted server

KetOkay, so this is my code: try { $pdo = new PDO ('mysql:host=127.0.0.1;dbname=db_name','user','password'); } catch (PDOException $e) { exit ('Database error.'); } I tried so many different combinations with host name, username and password, and every time I get 'Database error'. My question i...

-1
Q: PDO + PHP + AJAX proper implementation

Mike OltmansI had asked a question a question here and was asked by @MonkeyZeus to repost the results since I apparently did a good job with it. include '../../config.php'; include ROOT_DIR . "php/dbconnection/dbconnection_pdo.php"; $query = "SELECT * FROM site_users WHERE username = :username"; $query = $pdo-

0
Q: DOMDocument: createElementNS vs createElement in terms of speed (exponential vs linear time)

WeboideI am working on creating an XML file using namespaces. There is about several hundreds to several thousands of records, and for each record we need to add about a 100 fields (sub-nodes). What happens is: When using createElementNS() in the nested loop, The time it takes to add a new element is t...

0
Q: PHP - Display Curl Verbose info

user2029890I'm having some trouble with a particular Curl command and I'd like to see the headers and responses. In the command line I use -v and it displays everything, however... In PHP I'm attempting to use: curl_setopt($curl, CURLOPT_VERBOSE, 1); However, nothing is being displayed. I'm using PHP 5...

0
Q: Symfony2 for errors not showing, UniqueEntity error message not shown next to the corresponding field

pregmatchI am having problems displaying for errors on registration page. public function createAction { if ($request->isMethod("POST")) { $form->bind($request); if ($form->isValid()){ //do stuf } else{ return array("form"=>$form->createView(), ...

0
Q: Firing SQL query on click of button?

APAD1I have a simple PHP/MySQL counter which incrementally increases a value in my SQL database. Currently, this script fires every time the page refreshes meaning that the number increases by 1 every time the page is refreshed. I would like to change it so that it only increases when a button is pres...

0
Q: AJAX - Button Submit to update a form

user3072030I'm attempting to learn to make use of AJAX. I removed most of the complexity of the program to just isolate the problem I'm having. So I have a text area and beneath that a div that has "STATUS" printing out. On button submit using AJAX I want to change the word "STATUS" to the value of my varia...

0
Q: MySQL Cant connect.. details correct

PrivateMufasaForgive me if this is a dumb question but this is really frustrating. Im having issues trying to connect to my MySQL database. The details are correct as i can login via phpmyadmin and terminal, the database was created with the user whose details i used in this script but i keep getting 'Cannot...

0
Q: Nginx proxy_pass to dynamic host

Chris WhiteAt the moment I have a PHP script set up with a chunk of code that reads a file from a dynamic location (which comes from a database) and echo's it out to the user in chunks. It's basically a file streaming script to hide the location of the original file. However, this comes with a large overhe...

-1
Q: Filling an HTML drop down box from database using php, but I'm missing one record

twinserI'm pulling rows from a mysql database to fill a drop down box. It works, but it misses out one option. I think it might be due to the fact I'm using the <optgroup> tag in the middle, where the option would be - in fact if I remove this, the whole list is printed. My database has data similar to ...

0
Q: move_uploaded_file - failed to open stream: No such file or directory

Corey StadnykI have seen this question asked many times before. But the scenario I am having is different than anything I have seen or read. I have a site with 2 forms. A user fills out a worksheet and is able to upload an image along with it. The other form is used for a user to edit / update the worksheet t...

0
Q: Prestashop Edit Meta-Tag in Home Page

user3072064How do change a meta tag in Prestashop ver 1.5+ <meta name="description" content="Shop powered by PrestaShop" /> <meta name="keywords" content="shop, prestashop" /> <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> <meta http-equiv="content-languag...

0
Q: Form selectbox post multiple variables from selection

Cole LeflarOkay so I have a form with a selectbox to select each State in the US, below is just a portion of the states. Each state has a different email address the form will need to send to. In the form results that are emailed, I need to pass the State's name and the email address. How it's setup right ...

-1
Q: Use php to create a dynamic menu without a database using only folders in the directory?

user3071439I would like to thank anyone who is able to help me in any way possible, I am extremely new to php/coding in general so I am not even sure if I am on the right path. I wanted to know if it was possible to create 2 step or dynamic drop down menu using only php and html that populates the first dr...

1
Q: CakePHP Persistant Data Storage without Database (config file)?

ConnelI am building a CakePHP app and I want to store and modify a group of global settings that are customisable by the admins. There is only one shared instance of these settings so a single row in a database seems like an overkill and doesn't feel right. I was thinking a config file would be more ap...

-6
Q: please look over my code

geek-ballerplease i dont know why my code is not working, please take a look at it and let me know how can i fix it. i think some calculations are wrong, if you can find the mistake please let me know how i can fix it . Thanks PHP <?php // Script 4.2 - handle_calc.php /* This script takes values from ...

1
Q: Simple success/error return with ajax and php

user756659Just starting to learn about ajax although I am running into trouble trying to return a success message in an array. <script type="text/javascript"> $(function () { $('#delete').on('click', function () { var $form = $(this).closest('form'); $.ajax({ type: $form.at...

1
Q: PHP array handling on-the-fly

stephenI am trying to use the PHP error_get_last() function, but my question goes more to general handling of arrays in PHP. error_get_last() returns an array, but I only want the 'message' element from it. So this works: $ErrData = error_get_last(); $ErrMsg = $ErrData['message']; but this is a sy...

0
Q: username and pass required in "git push appengine master"

eddard.starkThis is my first time using google appengine. I am trying to upload a php website. I am trying to upload it using git. I have followed their tutorial. At the end they said to type this code in so i did. I have tried to type this code in git bash. Here is the code - "git push appengine master". It...

0
Q: Can't get PHP to pull line entry from mySQL as array

lindgrenj6Ok fellas, I've been working with a SQL database via PHP for a couple days here now at work and I cannot for the life of me get it to work I have someone else who worked on this project and they have all sorts of functions that work at pulling one element out of the line, but I'm trying to pull a...

0
Q: Dynamically sorting the table along with other few selection criteria via javascript and php

nepsdotinI have two parts First part is building dynamic queries based on various inputs second part is sorting the result table ASC / DESC PHP part is well tested and working fine if( !empty( $_REQUEST['cond1'] ) ){ $sql[] = mysql_escape_string( $_GET['cond1'] ); } so on.... until last condi...

0
Q: Please help me translating this little php function to perl

JohnnathanI have this function that i need in perl: <?php function dv($r){$s=1;for($m=0;$r!=0;$r/=10)$s=($s+$r%10*(9-$m++%6))%11; return chr($s?$s+47:75);} ?> I've got this from here, where is already a perl function intended to do the same task (here) but it doesn't calculate correctly sometimes. PHP f...

 
9:47 PM
0
Q: PHP Sort by letter

user2982706I have an array of brands and I need to sort it by letters of the alphabet it should look something like this site http://only-u.com.ua/ where is a,b,c,d,e .....etc This is my attempt to do something <?php $brands = array("A" => array(), "B" => array(), "C"=>array(), "D"=>array(), "E"=>arr...

0
Q: PHP json_decode() not decoding JSON array

JohnI have a JSON string in my database such as this... a:1:{s:26:"abcdefghi@jklmnopqrstu.com";s:26:"abcdefghi@jklmnopqrstu.com";} After I fetch it from the database I use the following... $my_array = json_decode($row2['json_data']); The problem is that I'm not getting any array from $my_array....

0
Q: What is the best method to keep all logs in one place and be able to access them

Martijn RiemersI have a web application using multiple background workers. All those workers are on different servers. Now my problem is. I want to be able to have a log, per user, and be able to output it to them using Ajax. Now, my question is, how can I store all logs in one place (could be externally using ...

0
Q: retrive only certain values from an object in a nested array?

vimes1984OK i have the following array: array(2) { ["campaigns"]=> array(50) { [0]=> object(Campaign)#2122 (48) { ["name"]=> string(26) "FOO" ["id"]=> string(74) "****************" ["link"]=> string(44) "/ws/" ["status"]=> string(4) "Sent" ...

0
Q: Faster parsing of array in php

menardmamI have a CSV file with 40 000 lines, i load ALL THE LINES in a array and i use this function to return a subarray with just the value i need... here is the code <?php //---------------------------------------------- function query_array($theArray,$theQuery,$col){ $return = array(); fo...

0
Q: Browscap file is updated but not working correctly

HeyItsProdigyI updated browscap and pointed to it inside of the PHP.ini file and ran $browser = get_browser(null, true); print_r ($browser); The output that i get looks a bit funny as it does not have any information for each part of the array. I want to know what i might be able to do to fix it and have ...

0
Q: CakePHP - optimizing specific urls by stripping down unnecessary functionality

NebojsacBesides the obvious like caching pages, using recursive and containable, what is a good way to really minimize the memory footprint on certain urls, without just going out and writing flat php? For example, I have certain controller actions (and model methods) that have minimal interaction with ...

0
Q: Handle complex data types in WSDL & PHP

MalaiselvanI am working on a webservice project where the client wants to send a complex type request to the server. We are using PHP at server and jQuery Mobile as the client. Below is the type of SOAP request the client is sending. The client is sending 2 argument. The first argument is a string 'doLo...

0
Q: php/mysql search results - filter result when type >1 while keeping results where other types not >1 - codeigniter

johnnyletroisApologies for the title, I'm still trying to work out how to explain this. I have a codeigniter web app that has a decent search function that nicely tabulates the results. Let's call it an airbnb clone where multiple users create listings. Users can create a single listing or they can create m...

0
Q: When was function use closures implemented in PHP?

rubo77I couldn't find the section in the PHP manual that explains use I have the code $num = 0; array_walk_recursive($_REQUEST, function($mValue) use (&$num){ static $num; $num++; }); and my Eclipse complains: Parser error "'{' expected in compound-statement. So I g...

0
Q: turning numbers into date and time

user1721230How do turn some numbers, i.e. 20020415 into the date 15/04/2002? Everything I do seems to change 20020415 to today's date. Here is what I have so far: //[DOB] function dob_func( $atts ) { $dob = get_field('dob'); $dob = date('d/m/Y'); return $dob; } add_shortcode( 'dob', 'dob_func' ); The cod...

0
Q: nginx - 403 Forbidden

michell90I've trouble to get aliases working correctly on nginx. When i try to access the aliases, /pma and /mba (see secure.example.com.conf), i get a 403 Forbidden but the base url works correctly. I read a lot of posts but nothing helped, so here i am. Nginx and php-fpm are running as www-data:www-d...

0
Q: PHP code not parsing my CSV file correctly

nate dinoI have a CSV file and I want to parse it using PHP: Access_Code,Home_Address, Work_Address 1, 100 Broad St, 100 Main St 2, 200 Broad St, 200 Main St 3, 300 Broad St, 300 Main St Here is my code: $file = fopen($target_path,"r"); while(!feof($file)) { $groups2 = fgetcsv($file,","); print_r($...

0
Q: How to automatically hit download URL and download a file using javascript?

Lukas LikesnotesIn WordPress there's a feature that exports your data into xml files. You can hit this URL with parameters and it will start downloading XML file. The cat parameter indicates the ID of the category containing posts you want to include in the XML file. The problem is that I have over 200 categori...

0
Q: how to send javascript array with ajax to php?

user3072117I make a fucntion in html when I call function(click button) is to send array(json from) but it's not work, Help me to solve this a problem please! thank you everyone. :) html <? $array = {include for database} $js_array = json_encode($data); ?> <script> var dataArray = <?php echo $js_arr...

 
10:17 PM
0
Q: PHP Generate XML with invalid carachter?

jlafforgueI want to create an xml file that contains invalid characters such as "&", "=" ... etc. Is it possible because I can not find the solution? Can I convert these characters? I wonder if it is not better to generate JSON instead? Thanks

0
Q: How to write a path to a Windows server from a Linux machine in php

asdk77My script was run under Windows correctly. It can copy files from a shared folder on a windows server. I wrote the path as following: $path = "//192.118.20.21/Shared_Folder/..."; Now I run the script under a linux machine. It can't work now, and I find the path is not correct. I used "is_dir()...

0
Q: .htaccess mod_rewrite to a separate script if it ends with a string

M MillerI'm writing a simple CMS that will rewrite http://host/path/to/resource to http://host/cms/render.php/path/to/resource (unless a file exists at that location, e.g. an image). How can have it redirect to a different script if the request ends with a certain string? For example: http://localhost/...

1
Q: Segfault and/or "Fatal error: Unknown: Failed opening required..." when running scripts located in CIFS mounts

MM.I compiled PHP 5.4.22 and 5.5.6. In both versions I can't run any scripts that are located in a CIFS (SMB/Samba) mount. If I try to run it the usual way, I get a weird error message: user@machine:/mnt/windows# /opt/php/bin/php test.php Fatal error: Unknown: Failed opening required 'test.php' (i...

0
Q: Passing in page specific content into a PHP included header

Jacob BullerI am creating a website for a local company and I am splitting off the header for each page into a individual php page which I then include into each page. I was wondering what would be the best practice to insert individual description and title content into the php header for each individual pa...

0
Q: WP pre_get_posts and is_home not working

user3072220my problem is that I just want two posts on the home page, and when you click through the pagination, 10 pages on each (supposedly, quite simple). But I'm getting two posts on all the pages, not just the home page. I've read countless articles, and none appear to have my problem. They say to use ...

1
Q: PHP Email - Should be built in the headers or in the body? (what's more correct)

ChemistAs I'm working on building and sending email in PHP I've noticed that sometimes people put the code for the message and file attachment in the headers and sometimes in the body. They both work. So what's more correct, or does it make a difference? Here's example code: In the headers if (is_uplo...

0
Q: automate the process of an online converter without an api

RichardI came acrossthis service ( image extractor for pdf files ) and it works ok. How would I go about automating the process of submitting the pdf and downloading the zipfile from their server? Is this crosssite scripting? thanks

0
Q: Saving login session state with Instagram OAuth

db-userCurrently I have a page with a link to OAuth using Instagram. If the login is successful, I am redirected back to the same php page with the user's information. However, if I refresh the page, the user will see the login link again (it's hidden when the user is logged in). I know I should use coo...

0
Q: how to sync a folder on local machine with server

osyanI'm developing a local site (with wamp server) to monitor some live data coming from a USB port and then store them in database. Recently i need to have same data on a site which can get the data from that local machine. Lets think that Local machine will be always ON and connected to both data p...

0
Q: Removing .html and .php from links in a Windows Server

user3072304As the title says, I would like to know how to remove ".html" and ".php" from links in a windows server. Most of the information I have found about this subject was only valid for linux servers. Only today I heard about the file web.config and got new material to study. Nevertheless, I am still...

0
Q: How to create a simple but flexible Clean URL in .htaccess with Apache Mod_rewrite?

Radical_ActivityI have just started to be familiar with Apache Mod_rewrite and I have falied to achieve my goal. I am building a website where I'd like to replace the ugly URLs with Clean, user firendly URLs. I have currently created some files already, but I'm not sure if I'll create clean urls, I'll be needin...

0
Q: Google Maps API formatted_address

user2972131I am using php to convert latitude and longitude to an address in a WordPress custom field. It works how I want except I get the country at the end of the address (ex. 1234 1st st City State 90210 USA). This is the code I'm using to make the conversion. Any thoughts on how to remove the country ...

0
Q: Running a PHPUnit Test yields "Class Not Found" Error

DennisThis is a question on PHP Unit Test giving me a Class Not Found Error. Background I am using Zend Studio 10.5 to develop a Zend Framework 2 application. I have a few modules loaded, including ZfcUser and BjyAuthorize FedcoUser is the module that has a Controller Guard that uses guard rules of...

-2
Q: Intercepting and changing all links on all pages

RubberDuckI have a blog that contains several pages with links to several of my products. Lets say the link is in the form: http://www.myblog.com/product/product1 http://www.myblog.com/product/videox http://www.myblog.com/product/photoshop http://www.myblog.com/product/pr4 I have to change this link to ...

0
Q: PHP help for the beginner

user3072330I am very green to php and I am trying to create code that will allow me to enter information to a database I constructed. Everytime I run it though I get an object not found error 404. I have searched google and have found some information however I am unable to correct my error, Any help wou...

0
Q: PHP - First browser game, QUESTS

user3072339Sorry for my english. Please help me, im developing an browser game (my first bigger project) on my own, and i have a question. I have table with users and in that table i have columns with questID and questProgress. By questID u get your quest that u are supposed to make, questProgress will be ...

-1
Q: Contact form not working - JS/PHP

user3072296Hello having some issues trying to get a contact form working on my website. The form seems to submit as it should (from my knowledge) but I don't receive an email afterwards with the submitted details. The email that was set-up to receive these form submissions is working as I've tested via dire...

0
Q: Laravel see the execution time from terminal

user2293111I am a new Laarvel User. Before I was using Codeigniter. In Codeigniter it was very easy to see the log files and execution time by doing tail -f. I saw Laravel has log files in app/storage/logs directory. The problem is that log file only give me errors it doesn't give any execution time or que...

0
Q: Formatting an RSS Feed Date and Time

MizAkitaI have an RSS Feed I used FeedRoll to create it an i am pulling it in via xslt into my site. My question is what formatting via javascript would I have to create to format my dates to not look like: December 04, 2013 05:00:00 am and instead look like: Dec 4, 2013 5:00PM The script FeedRoll p...

0
Q: Count in foreach loop by same model and condition

JamesI would like to get the count (total) of values in my foreach loop which share the same 'Model' and 'Condtion'. To help you understand better, here is a representation of how my data looks like Product Name | Condition --------------------------------------- iPhone 3G 16GB ...

0
Q: Generic 'ApplicationException' in XP-Framework

Igor LankinIs there any generic exception type except XPException that I can throw? Java and .NET have ApplicationException. Is there a similar exception type in the XP-Framework?

0
Q: How are Zend Framework JSON Endpoint Created?

Zachariah MorenoWhere in the code below is the /home/dashboardfilegrid JSON endpoint URL created? Does a new model automatically result in a new JSON Endpoint URL? Environment Zend Server - Version 5.1.0 PHP - Version 5.3.6 Zend Framework - Version 1.11.3 MySQL - Version 5.1.52 View var gridDOC = new dojox....

0
Q: URL, page names without extension

ANWI am trying to have my pages accessible with example.com/about, example.com/contacts instead of example.com/about.php & example.com/contact.php I am not sure how this is done, but I was able to do it by creating link <a href='site.com/about'> about </a> And I have my index.php set as $URI ...

0
Q: Adding data to a reference to change the referenced array in PHP

DevonI have built a function to retrieve the last specified key of an array, it references the array and displays it fine, however, when I try to add to the reference variable, it does not affect the referenced array. Here is my code: class test { public function __construct() { // For t...

0
Q: Laravel - Check if @yield empty or not

user2840318Is it possible to check into a blade view if @yield have content or not? I am trying to assign the page titles in the views: @section("title", "hi world") So I would like to check in the main layout view... something like: <title> Sitename.com {{ @yield('title') ? ' - '.@yield('title) ? '' }} <

0
Q: Removing line breaks with PHP

ArdillaI got a little problem here. The thing is that in my database I got a text, and then I print it onto the screen and the code goes like: <p>Text 1</p> <p>Text 2</p> Thats the output in HTML cause I use tinyMCE plugin. Goes well so far. The thing is, that I want to put it into a javascript vari...

-1
Q: JQuery Ajax $.get request not working in IE

user3072379Hi I have this code that populates two lists the lists are populated using Jquery ajax call or functions $.get("pgs/dpg.php",{pg:"119", type:"yrs"},function(data){ $(data).find("row").each(function(){ $("#bhv_year").append(new Option($(this).children(":nth-child(2)").text(),...

0
Q: Order by descending and returning the record number to use for ranking

wnajarI'm trying to rank users very simply by their reputation, which is stored as an int column in a MySQL table of users. In order to find out which users have the highest reputation from highest to lowest, I would do something like: SELECT * FROM users ORDER BY reputation DESC Which would give m...

0
Q: select and join on max only if like

user3032474I did this query SELECT `J`.`jobNo`, `J`.`dealerTagNo`, `J`.`tagNo`, `J`.`totalSize`, `J`.`rugDesc`, `J`.`amount`, `L`.`TagNo`, `L`.`Location`, `L`.`fullDate` FROM `Jobs` AS `J` LEFT JOIN `Locations` AS `L` ON `J`.`tagNo` = `L`.`tagNo` AND `L`.`fullDate` = ( SELECT ...

0
Q: Use bound variables in LIKE query

user2921557just going through my site and testing the forms for sql vulnerabilities and forgot i hadn't get converted my search query to use bound variables. The addon for firefox (Sql Inject Me) is excellent! On a side note, are there any more add ons i can use that will check for security issues, loops h...

-1
Q: PHP Fatal error: Cannot use object of type mysqli_result as array in file.php

user2403721I have the following code: $productQuery = "SELECT ean, name FROM products WHERE category = '$category'"; $productResult = $mysqli->query($productQuery); while ($productRow = $productResult->fetch_assoc()) { $productPriceQuery = "SELECT ean, price+shipmentCost AS totalPrice FROM...

0
Q: javascript adding/deleting to/from text file

user3068010I'm trying to use jquery, ajax and PHP to add characters to a text file. The POST ajax call returns successful, but the PHP function is not executed. Does anyone see my error? Workaround? <html> <head> <title>AjaxSend</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery...

0
Q: Most relevent results php/mysql

AjqualixI am having trouble sorting results by relevancy. I have something like: $search = $_GET['search']; $key_terms = explode(" ", $search); $query = "SELECT * FROM sentence WHERE"; foreach ($key_terms as $each){ if($each != ''){ $i++; if($i == 1){ $query .= " keywords LI...

0
Q: Aajax doesn't change my $_SESSION variable

RainwalkerJakeI have main.php page with a $_SESSION variable, i call ajax to modify this var, on the ajax the $_SESSION var change but when i check it on my main.php don't. PD: I have session_start(); on each and the ID on session_id(); is the same. Curious INFO: If reload the page the values are modified ...

0
Q: Codeigniter sessions errors and workarounds

Phil CrossSo after reading the documentation on the session library for CodeIgniter, I'm finding it rather confusing. My problem has arisen from the need to store a few bits of information (a filename, a product ID and an array of colour IDs). I'm using flashdata for this bit. I got a 502 error. Removing...

0
Q: run php code compiled by bcompiler on php 5.5

Laci KI would like to run a php script on a IIS 8 server with php 5.5 which is compiled with bcompiler. Sadly there is no way I can get the original source code and the developer won't recompile it with any other PHP 5.5 compatible solution like Blenc or SourceGuardian I hate these kind of behaivor sp...

0
Q: .htaccess -> RewriteRule, subdomains -> stop redirect

Patryk SzramI want add to my website subdomains. I have one file with that format: starwines.com.pl / test.php? page = first starwines.com.pl / test.php? page = second starwines.com.pl / test.php? page = three ... subdomains how i want to have: first.starwines.com.pl second.starwines.com.pl three.starwi...

0
Q: best PHP IDE to work on magento websites

AlanCurrently I'm using Dreamweaver 8 to implement php projects(magento websites) but it is so annoying, I can't even debug my code unless i use log message written into text file or see the errors online on website. Could you please recommend php IDE that I can debug my code, also it has integrated...

0
Q: Fix Decoded PHP Error with Exceptions

Luis Filipe ÁvilaHave you ever seen something like this: $template = $mailingList->getTemplateById( request( 'template' ) ); jmp; Exception { return null; echo '<script language="javascript">$("#status-message").html("' . $language->get( 'Sending page %1 of %2, Please ...

0
Q: Creating table that will loop and list down the items

user3072443I want to transform my div's into a table so that the items will be seen with the informations. <div class="text">List Of Product </div> <div class="view1"><?php include('config.php'); $result2 = mysql_query("SELECT * FROM category"); while($row2 = mysql_fetch_array($result2)) {...

0
Q: Wordpress Custom Gallery Function

user3072439I need to change some code from the WP-Bootstrap Wordpress Files. In their code they remove the standard gallery code and replace it with their own which works fine accept it doesn't properly account for Rows. function gallery_shortcode_tbs($attr) { global $post, $wp_locale; $output = ""; $ar...

0
Q: Php Mysql Table Search/List

VeritasI'm creating a project manager, and I'm trying to list all available projects in a C# array by posting data. That being stated, I can post data fine, and I'm not a pro, but I know basic sql commands and can work my way around. What I'd like to do is get the number of rows in a table, loop throug...

0
Q: Multiple calls to imagecopyresized on the same destination image only result in one image being copied onto the destination

MorslaminaI'm using openlayers to power a map with multiple zoom levels. I've written a quick PHP script which takes individual tiles on the map which already exist on the hard drive, resizes them and drops them on to a larger tiles. The larger tiles then form the basis for larger zoom levels on the open ...

 

« first day (289 days earlier)      last day (21 days later) »