« first day (259 days earlier)      last day (51 days later) » 
00:00 - 13:0013:00 - 00:00

1:01 PM
0
Q: Radio buttons not working as they should

user2956297I have these two codes. When i submit my form, it always default to a checked no <td><input type="radio" onclick="selbustbl(1)" name="rdo2" id="busyes" value="yes" <? if(isset($_POST['rdo2']) == 'yes') echo " checked"; ?> />Yes</td> <td><input type="radio" onclick="selbustbl(2)" name="rdo2" ...

0
Q: supplying 'id' to the child 'list'(li) of the unorder list (ul) in codeigniter

user2956239normally in HTML we supply ID and class to the li of the ul is as shown below <html> <head> </head> <body> <ul id="ul" class="ul_class"> <li id="list1"> List 1 </li> <li id="list2"> List 2 </li> <li id="list3"> List 3 </li> </ul> </body> </...

0
Q: MYSQL/PHP Try to calculate to columns if checkbox is check

user2956333i have in a table 5 columns 1. pret 2. avans 3. tax 4. withtax (checkbox) 5. total ia want to calculate total with 2 condition: A. IF withtax is Checked then use formula: $values['TOTAL'] = $values['PRET'] - $values['AVANS']; B. IF withtax is unchecket then use formula: $values['TOTAL'] = (...

0
Q: What does Add DROP SYNTAX in X-Cloner of Wordpress mean?

The Quantum PhysicistWhat does "Add DROP SYNTAX" in the XCloner plugin mean? I checked the manual and it says something I don't understand. Add MySQL Drop: Tick this checkbox if you want XCloner to add the DROP TABLE IF EXISTS statement to your generated SQL. This option is only for advanced users. Ho...

0
Q: Postgresql select people you may know orderded by number of mutual friends

user1026090I'm building a social network, and I want my members to be able to easily find new friends. Just like in Facebook, I want to suggest them some people they may know by the number of mutual friends they have. My PostgreSQL database structure for friendships is as following: > PROFILES_FRIENDSHIPS >...

1
Q: I want to insert multiple data into multiple rows when a submit button is clicked in codeigniter

user2733443I want to insert multiple data into multiple rows when a submit btn is clicked Below is my html form <?php echo form_open('daily_shop_performance/insert_missing_records');?> <table class="table" style=" width:100%; "> <thead> <tr> <th>Days</th> <th>Shop ID</th> <th>Date</th> <th>Takings</th> <th>...

0
Q: Strict Standards: Only variables error -

user2956374I developed a joomla site (3.1.5) on url http://www.develop.breede.co.za and on there I have a PHP script for a call rates calulator that worked perfectly. I then moved the moved to http://www.breede.co.za and no3w the script works perfectly, but I get the following error: Strict Standards: Onl...

0
Q: how to create a sandbox merchant account in American Express payment Gateway API

user2956371I like to integrate the american express payment gateway API in my website. Is there is any posibility to create sandbox user account in AMEX. Can anyone suggest me how to create API user credentials in AMEX?

0
Q: PHP DOMDocument: Can't read Facebook RSS feed?

lauthiamkokWhy can't I read the Facebook RSS feed with $xml = ("https://www.facebook.com/feeds/page.php?format=rss20&id=34468042582"); $xmlDoc = new DOMDocument(); var_dump($xmlDoc->load($xml)); result, boolean false But when you place this address below on your browser, you do see the RSS feed, ht...

0
Q: Best way to pass and handle multiple parameters to an API

MusterknabeI'm creating an API that handles user data via $_POST. The API works as it is. What I want to do know, is to accept multiple URLs as $_POST parameter. But how would I do that? I thought the best way is that the user passes the values like that $array = array ( 'id' => 'id', 'id' => 'id2' ); Af...

-2
Q: SELECT query having 3 tables

pascale abou abdohy all, i have 3 tables in which i use the following query: $getquery = mysql_query("SELECT u_fullname , p_name, grade FROM description, users, projects WHERE description.user_id = users.u_id AND description.project_id = projects.p_id GROUP BY u_fullname, p_name, grade LIMIT $start, $per_page");...

0
Q: Extract using php on google app engine

divyenduzHow can I extract a zip file using php running on google app engine. I tried the ZipArchive class but it gives a class not found exception on google app engine.

0
Q: PHPmailer sending 3 duplicate emails when submit is pressed on a form

user2956222I have an issue with phpmailer sending duplicate emails, the phpmailer versions is 5.1, the code is below but I cannot find the error. I get 3 emails from the same contact form with duplicate content. Does anyone have a fix or can see the issue? } if(!function_exists('ProcessFormr')) { functio...

0
Q: How to redirect to a new page from alert popup in jquery?

JSLoverI'm having a radio button group of three radio buttons with same name but different ids as follows: <p class="custom-form"> <input type="radio" name="generate_paper" id="generate_paper_manual" value="manual" checked="checked" onChange="change_paper_generate_type();" /> <label for="genera...

0
Q: HTTP authentication header character limit for basic authentication?

Daniel CarvalhoI've researched that there is an overall HTTP request size limit, and read this is normally a restriction set by Apache. But considering there's a bunch of other headers I could send through, that I'm not, I highly doubt I'm reaching the overall request size limit. All I'm doing, is HTTP Basic a...

0
Q: CURL get one specific array

Michel VertongenI found this code on internet and its works, but it outputs like this Array ( [IP Address] => xxx.xxx.xxx.xxx [Country] => Netherlands [Region] => Regoin [City] => City => provider ) I just want to get the city in table 4 ( maxmind ) and outputs only the city instead of all the other things H...

0
Q: Edit data from blog in Iframe

holienI'm currently building a blog from scratch and I'm using php, javascript + Iframe to add new posts to the blog, and this works perfect. The problem I'm having is my "Edit post" function. When I'm editing a post it should fetch the posted text, and it sort of does. However it's got a Not found hea...

0
Q: Where to put some view code in Cakely way

user2956391Hi everyone and thanks for answering. If i want to remove some code from a view for simplify it, what's the correct way? I've created an element in Elements/model/some_code.ctp and call it from the view.ctp but my colleague suggests me to create a file in View/Controller/some_code.php and call ...

0
Q: PHPVideoToolkit - Fatal error: Class 'PHPVideoToolkit\Trace' not found

behz4dI want to use the class PHPVideoToolkit, and I just downloaded the package from Github, and after copy pasting it to my localhost to see the examples, I'm getting: Fatal error: Class 'PHPVideoToolkit\Trace' not found in E:\xampp\htdocs\video\examples\includes\bootstrap.php on line 13 Not foun...

0
Q: PHP simple form validation - help needed

user2955356Ok, what I'm trying to achieve is a very simple form validation like the following. Name: [required, min length: 2, max length: 255] Email: [required, min length: 3, max length: 255, valid email format] Date of Birth: [optional, format: dd/mm/yyyy] However I'm getting the following error whe...

0
Q: Foreach with if/else outside it's function

jerryI'am creating a Joomla Template (Joomla 3) well some of you may have experience with this, and will recognize the problem I got. When you insert Modules in to you template and leave them empty, it's still uses some space. To prevent this i would like to add a variable CSS class. As solution used ...

0
Q: Select players as team and mark in db as selected

custombrandsi have one table named players with 2 columns: players and status I need to select unique random teams! Every team has X players as: Y base and Z pivots Y and Z its set due input form If in insert 3 for base and 2 for pivots The result should be like 3 teams or 3 players: team 1 Base 1 Pivot 1...

-2
Q: Notice: Undefined variable: ids in

user2956413i have a script that works fine for years and suddenly i face this problem : please check the code and mend any solutionplease. any kind of help willbe appreciated. Notice: Undefined variable: ids in /home/content/a/t/a/ataasaid1/html/category.php on line 4 Notice: Undefined variable: id in /...

0
Q: Passing PHP variable to JwPlayer

SylphI'm looping the video URL from database and each video has a certain frame that I would like to "seek" to. I'm using the "seek" function provided from JwPlayer. However, I can't seem to get it right on how to pass the variable to JwPlayer javascript. Below is my JS for JwPlayer $('.video').fan...

0
Q: Slider captions remain fixed while slides are looping correctly in wordpress

AdrianI have the following code in wordpress index.php <div id="sliderwrap"> <!-- Start Slider --> <div id="slider" class="nivoSlider"> <?php query_posts( 'category_name=Uncategorized&posts_per_page=3' ); while ( have_posts() ) : the_post(); ?> <?php the_post_thumbnail(array(...

-3
Q: PHP set a variables from $_GET['var']

jmenezesIs it possible to set a variables value from a $_GET['var'] doing somthing like this: if( $foo = isset($_GET['foo']) ) // Or something close to this. I.e if $_GET['foo'] is set assign it's value then and there instead of this like I currently do if( isset($_GET['foo']) ) $foo = $_GET['foo'];...

0
Q: PHP how to secure password in database

LodhartI'm using data from another server (not my server) and I need to login to this server. So I need to know password for every user account. I need to send this password to the server through HTTP request (no problem). But the server expect unsecure password. So if the password is '123456' I have ...

0
Q: Failed to load resource: the server responded with a status of 500 (Internal Server Error) - Testlink php

user2956452I have installed testlink in my ubuntu server. Some of the pages are showing empty. When I enable display errors on . I got the following error in my browser. Help me to get rid of this issue. Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/test...

0
Q: PHP arrays replacement

user2903728$data = Array ( ['key1'] => 1 , ['key2'] => 20 , ['key3'] => 11) $key1 = Array (1 => "a" , 2 => "b") $key2 = Array (1 => "a" , .... 20 => "y") $key3 = Array (1 => "a" , .... 11 => "n") what is the easiest way to replace all values in $data array to return: $data['key1'] = $key1[$data['key1']]...

0
Q: Error when using XHProf and XHGui

codecowboyI have installed and configured XHGui as per the instructions here: http://www.sitepoint.com/the-need-for-speed-profiling-with-xhprof-and-xhgui/ However, when I try to profile a page I see an error inserting into the details table (have truncated this as there is a large string of binary/compre...

0
Q: How to use sanitation with Wordpress Built-in functions?

Dejo DekicI am having an issue with understanding when to use (or not) Wordpress sanitation functions. For example according to Codex this is how we can use get_month_link() to create a "posted on link" (so when we click the link it will take us to list of posts published at that time). <?php $archive_yea...

0
Q: php index.php, add to cart issue

user2950085I am having trouble executing this code in my index.php. It says 'CartAction not set' I need your help php gurus. I can display any files you need to fix this error. Here is the code: // Handle AJAX requests if (isset ($_GET['AjaxRequest'])) { // Headers are sent to prevent browsers from c...

0
Q: CURL get specific arrray

Michel VertongenI found this code on internet and its works, what this script does is go to http://www.iplocation.net/index.php?query=223.196.190.40&submit=Query and get the information of country, city, ips etc. outputs it like ; Array ( [IP Address] => xxx.xxx.xxx.xxx [Country] => Netherlands [Region] => Rego...

0
Q: Google map is not update new geolocation when i moved the marker to new position

Alexthis is my google map code. I'm trying to update new latitude and longitude when i moved the existing marker to new position. But I don't understand why the following google map code is not updating the new latitude and longitude when i moved it to new position. Can you tell me what is the wrong ...

0
Q: How-to include if(isset inside a query

user2838753This little piece of code gives Notice: Undefined index: . I know it can be fixed by using if(isset()), but I have no idea how to place this on the correct matter in this $query line. Tried a lot, but can't get it right. <?php $query = mysql_query("SELECT `id` FROM `place` WHERE `placeno` = '...

0
Q: PHP Simplexml not showing id

user2956473I am trying to show the document id wich is show in this feed: http://www6.lexisnexis.com/publisher/DataFeed?Action=GenerateXml&orgId=102593&topicId=all Now this is my code: <?php $completeurl ="http://www6.lexisnexis.com/publisher/DataFeed?Action=GenerateXml&orgId=102593&topicId=all";...

0
Q: PHP/XML help google store locator tutorial

user2954486umm basically I'm relatively new to PHP, I've been trying out tutorial (see link below) and I keep on getting an error, I've googled it but nothing seems to work :S The error I get using Chrome is: This page contains the following errors: error on line 1 at column 3: xmlParsePI : no targ...

0
Q: JSON OUTPUT in spanish language

Sam KhannaI am working on an ios app and developing web services in PHP. This app is in spanish so I want all the json results should also be in spanish so that I can display them directly. All the third party api's like google and bing translator are paid. For example: I want to convert {"name" : "sa...

0
Q: Using a PHP session variable within a MySQL file run in PHP?

Sean LimpensIt might sound a bit confusing, and perhaps what I'm doing isn't right at all, but here goes. Our users can upload .csv files containing their school's data, exported from an external management system called SIMS. Once they upload that file I want to run a .sql script that updates our database ...

0
Q: CrossBrowser: File Upload Issue (HTML+PHP) - NOT TO UPLOAD IMMEDIATELY

E2BIs there a possibility to NOT upload a file IMMEDIATELY, but to store maybe in an array to upload it in a later step? I want to ensure is that the user can navigate freely between the form pages and then upload the files in the last step. The only way I know is to encode the files and store them...

0
Q: php / apache2 - shorthand if (bug - discussion, finding an explanation)

Markus SteindlThis is something very weird I could not explain, but probably some of you already found the same or a similar issue? Imagine the following pseudo PHP code: <?PHP mysql_connect("localhost", "mysql_user", "mysql_password"); mysql_select_db("mydb"); $result = mysql_query("SELECT id, my_nam...

0
Q: create a playlist using deezer

Stanislas PiotrowskiI'm trying to do a library using deezer Iframe So in database I store all the id of the the playlist I want to display And in front office I have that code <table style="width:100%"> <tr> <td>Nom de la Playlist</td> <td>Date</td> <td>Genre musical</td> <td>A...

-18
Q: Convert php to javascript

user2404977I have a problem writing AJAX. Can somebody convert this php to javascript. ASAP. <?php $a=file_get_contents('/cms/6700893/value_4the.txt', true); $number = 236+$a; $filename = "axh".$number.".txt"; $file = file_get_contents('/cms/6700893/'.$filename, true); ?> Thank you

-3
Q: PHP Simple Form Validation

user2955356Ok, what I'm trying to achieve is a very simple form validation like the following. Name: [required, min length: 2, max length: 255] Email: [required, min length: 3, max length: 255, valid email format] Date of Birth: [optional, format: dd/mm/yyyy] However, once i click submit (either if the...

0
Q: PayPal IPN e-mail not sent in Live mode, but works fine in sandbox mode

John Doe SmithI wanted to go live with a site today, but PayPal doesn’t work correctly in live mode! :( In sandbox mode everything worked fine: The user clicks a button on my site, is redirected to paypal and after payment he receives an e-mail with a download link via IPN and is redirected back (automaticall...

0
Q: Value is NULL Codeigniter

JohnSmithIm trying to create the following statement (which works): SELECT id, COUNT(*) AS item_count FROM message WHERE user_id_to = '1' AND read_date IS NULL GROUP BY message_id With Codeigniters Active Record. My code looks like this: $this->db->select('id'); $this->db->from('message'); $this->db->...

-1
Q: I want to be a programmer, work in corporate environment, earn well, learn fast and also become a great programmer.

Shin SanI'll try to keep this simple: I'm 29, been dabbling with computers for the past 10 years, had entry level jobs in tech support for different apps, been fixing computers for a while and now want to specialize in something. I'm not 100% stranger to programming but haven't gone past if/then/e...

0
Q: PHP PNG image creation outputting wrong colors

chaenselI am trying to put an png overlay over an underlying png file. The script works just fine, but instead of giving me the overlay colored as it should be, it is outputting it in gray color. But only the overlay image is gray (bg-color of the overlay, which is basically a border for the underlying ...

0
Q: Making form fields conditionally read only (PHP)

ChrisLet's say I have several series of form fields in table rows: f1, f2, f3; g1, g2, g3; h1, h2, h3 etc. Now let's say that I have a username stored in a PHP session variable that may match a field value in one of those series. Here, the field value that might be a match would be f1(echo $row['pers...

0
Q: Some help to factorize code base on permission

user2956550Morning, with this code (symfony mask builder) MASK_VIEW = 1; // 1 << 0 MASK_CREATE = 2; // 1 << 1 MASK_EDIT = 4; // 1 << 2 MASK_DELETE = 8; // 1 << 3 MASK_UNDELETE = 16; // 1 << 4 MASK_OPE...

0
Q: Getting the request headers send via file_get_contents()

Szerémi AttilaWhen using file_get_contents() to request an external URL, how can I find out what headers I've sent, or alternatively what headers I am about to send? I'm basically looking for a request counterpart for $http_response_header or anything else I can use to extract the same data. I know I get to s...

0
Q: PHP XMLreader to MySQL: put Id value in every insert

user2956549I'm currently working with XMLReader, which I'm using to try and parse certain elements into a MySQL query. test.xml <item> <id>100</id> <productdata> <g:material>paper</g:material> <g:size>25cm</g:size> <g:price>69 EUR</g:price> </productdata> <productdata> <g:material>paper</g:material>...

0
Q: Aarki PHP postback need help to make postback.php

user2956586http://i.stack.imgur.com/mBYxt.png Hello.I need some help about aarki postback.I will use Aarki SDK and need to Aarki postback files. Can anyone help me about how to make postback.

0
Q: Import file from one server to another

user2711135I am looking for the best way to save image located on the web( example: http://website.com/image.jpg) to my server(upload from the internet). I am lookign for a methos in php or JS. Thank you.

0
Q: php exec() syntax check

BorislavThis works in the command prompt(in one line) : cd C:\Program Files (x86)\LibreOffice 4\program && "C:\Program Files (x86)\LibreOffice 4\program\python.exe" unoconv -f pdf d:\class1.doc but when it comes to do the same in PHP's exec() nothing happens - neither message nor any file, probably ...

0
Q: How to make dynamic php divs for content instead of hard coding html

RobbieP14383I have written from a tutorial, the code below which gets the content from a table in the db but the divs that the content are in are hard coded into the html file. How can I turn this code into something that will create as many divs as necessary depending on the quantity of the content. I mean...

0
Q: php pdo construct mysql call extremely slow on drupal 7 site using nginx and php-fpm

williamelworthyI have a drupal website that is calling the static PDO __contruct for a mysql connection, on a remote server at first and then changed to a local server to remove network latency for sanity checking. On the local db call I am getting the following generated from xhprof and an extremely slow page...

0
Q: Nortel Baystack 5510 snmpwalk PHP

user2956620I have Nortel Baystack 5510, LAMP (PHP 5.5.5) and snmpwalk script (mac-adresses) <?php @Header('Content-type: text/plain; '); $a = snmpwalk("192.168.xxx.xxx", "public", ".1.3.6.1.2.1.17.4.3.1.1"); $keys = array(); $values = array(); $array = array(); foreach ($a as $key => $value) { $keys[$key]=...

0
Q: Read blob image from database

user2956642I am trying to display my images uploaded to my database on my PHP website. I have the following code. This only displays the blob binary value. I want it to be an image. If I add a content-type header is gives me a blank page with an broken image. include 'core/database/connect.php'; $q = "SEL...

0
Q: Why ajax call does not work on IE7

user1960170I am developing an app for a company i work for but this ajax call only works on IE9+, FF, Chrome . I've been reading around without much luck. Here is the code i have.It is pretty simple: var request_getShoppingCart = $.ajax({ url:"classes/sCart.php?action=getItems", cache: false, });...

-2
Q: incorrect if statement value returned

green green grassI have an apparently trival if statement that just won't work correctly. if (!empty ($_POST['interest']) && (float)$_POST['interest'] >= 0) { when $_POST['interest'] is 0 or positive it should return true. However when it is 0 it is currently returning false incorrectly. What is going on here?

0
Q: How to write custom url for users

user1477731I'm currently redirecting users to www.example.com/admin.php?id=shop1, but I want the url to look like www.example.com/shop1 . How can I use mod_rewrite? Thanks

0
Q: html and php form field and submission

user2647160I have a short html form and some php code on the same page so that when the form is submitted, the entries appear on the same page. This code works as far as posting the entered information from the form to the page, but I have 2 problems: The text box for some reason was only letting me enter...

0
Q: Are PHP frameworks needed in this specific situation?

henrehSearching finds a few specific questions about the value of PHP frameworks, and I'll go into why I don't think they apply here. Basically, I'm embarking on a PHP app with one, maybe two other developers. I've been wondering about doing it with a framework and have been extensively researching Ze...

0
Q: getCustomizationId operation: Netsuite API and PHP Toolkit

user2650211I am having exactly the same problem as here: Missing "getCustomizationId" in netsuite 2013.1? I just refused to give up on it. I have investigated further and by running the code in the post just pasted I get this error: Stack trace: 0 /home/netsuite/PHPToolkit_2013_1/PHPToolkit/NSPHPClient.p...

-1
Q: How to edit .htacccess file programatically

Mike0I am working on some kind of php MVC framework and i want only some files to be accessed on the users request. This files my vary so it is not a solution to hard code on the .htaccess file. So my question is how can i achieve this logic?

0
Q: php DateTime diff method behavior

Paolo RossiI have to find the days until an expiration date. I tried to use diff method of DateTime class. $dataexp = 2013-11-06 00:00:00 ; $now = 2013-11-05 13:00:00 ; $dtn = new DateTime('now'); $dte = new DateTime($dataexp); $diff = $dtn->diff($dte); $diff ---> display 1 My problem is if the dataex...

0
Q: codeigniter session Error was encountered

coderin my localhost it works perfectly but after uploading it to server i am seeing this error A PHP Error was encountered Severity: Warning Message: Cannot modify header information - headers already sent by (output started at /home/alpha/public_html/blog/application/controllers/h...

0
Q: mysql_num_rows returned with ajax

Christian Burgosi need to pass two dates to a mysql query through ajax. i have two date inputs. this is the index.php that has the input <div id="input"> <td><input type="date" name="date_start"></td> <td><input type="date" name="date_end"></td> <input type="button" class="button" value="Get Value"> </div> <d...

0
Q: Joomla3 component add additional registration fields

XavjerI am currently creating a shop-like component for Joomla 3. For this component, I will need some additional user-fields (Address) for the processing of the order. My question is as follows: What would in your opinion be the best way to achieve this: Edit the Joomla Login component and add the...

0
Q: Twitter does not authenticate new customers

dev-nullI have an application with approximately 200 users that sends status updates for them on a cron job that runs every minute. The users are checked each minute and if they're due to send a tweet then they are added to the queue. The users set a time interval for how often they'd like tweets to be s...

0
Q: Create file from JFIF data

Erik DolorI have a dump of our LDAP database, and i'm attempting to extract all images from it using PHP. The images seem to be stored in JFIF format (at least, according to http://tools.ietf.org/html/rfc2798#page-5). However, i can't figure out how to create a JPEG file from this; I attempted file_put_con...

0
Q: Web service AJAX Post on iOS getting error 400

ByteBackground: I wanted to create a hybrid application that can change form factor at will. This requires the app to embed a webView. This webView also should be able to talk back to the back end server. I host the back end on my Mac (localhost) with really small php code. API <?php function get...

-7
Q: What is the best language to develop a Project Management web application?

user2956697I have knowladge about Java, JSP, Servlet, php, html, css. Now I'm going to develop a project management web application. Can anyone tell me what is the best language for this project. And please help me to find resources.

-2
Q: My contact form isn't working

RicoI received this code from my host for my contact form <?php $request_method = $_SERVER["REQUEST_METHOD"]; if($request_method == "GET") { $query_vars = $_GET; } elseif ($request_method == "POST") { $query_vars = $_POST; } reset($query_vars); $t = date("U"); $file = $_SERVER['DOCUMENT_RO...

0
Q: Fetch array and Insert Into different database. Increment variable in Insert string?

PerdI have tried several different methods of implementation for this and can't seem to get the last little bit correct. The most efficient is obviously the best scenario but at this point it's second to getting it working. I'm attempting to pull data from the Syspro connection and inserting it into...

0
Q: Read image blob from database

user2956642I am trying to read my uploaded images on my PHP website. I used the following code: include 'core/database/connect.php'; $q = "SELECT * FROM uploadarchitect"; $r = mysql_query("$q"); if($r) { while($row=mysql_fetch_array($r)) { echo "<

1
Q: DOMDocument, get images AFTER first <h1>

PixarkI am trying to get all <img> tags after the first <h1> tag, but I can't quite figure how. Currently I am able to get all <img> tags from a page using this code: $html = file_get_contents($this->url); $this->doc = new DOMDocument(); @$this->doc->loadHTML($html); $tags = $this->doc->getElements...

0
Q: Joins in codeignigters datamapper

CiaranI have been unsuccessful in attempt to convert this join statement from Codeignigter's active record to codeignigter-datamapper Here it is ->join("table AS t", "p.another_column = t.id", "inner"); Unfortunately i have no idea how to perform a join using datamapper as the documentation is ver...

0
Q: Wordpress [gallery] Shortcode Modify

Rasel AhmedI am going to add a new gallery function in my wordpress theme. If I use gallery as file, it will hyperlink with its caption. Example foreach ( $attachments as $id => $attachment ) { if ( ! empty( $link ) && 'file' === $link ) $image_output = wp_get_attachment_link( $id, 'full', f...

-1
Q: MySQL Invalid parameter number: no parameters were bound

drhirnI'm trying to learn PHP and have this code: $rating=1; if (!empty($rating) && empty($cat)) { $sql = $sql ." WHERE ImgRating = :rating"; $stmt = $dbh->prepare($sql); $stmt->bindParam(':rating',$rating,PDO::PARAM_INT); } if (!empty($cat) && !empty($rating)){ $sql = $sql." WHERE FIND_IN_SET...

0
Q: Roundcube Stand alone version - logins

MrTechieOk, so I have a question and need some help. I have a stand alone roundcube installation that I have installed on the server. I have it setup for the most part - correctly. I can send and receive emails with it and such. I can even use an imap script to check the amount of inbox messages for that...

0
Q: Android my app crash with the httpclient.execute(httpost)

Dekel MamanI'm trying to send some string to some php file and get JSON variable back. Now I'm stuck on the send my strings to my php file, I tried a lot of combinations from many tutorials, all of them crush in the: httpclient.execute(httppost); I really don't have any idea why. P.S I gave the INTERNET ...

0
Q: What is this design pattern, and what are its disadvantages?

gh123manI have been working on a large project for about a year now and recently I have started using a new pattern for displaying data. Background I have many derived classes wrapping data in 1:1 linked sql tables with their appropriate base classes. My goal was to keep any and all display code unlin...

0
Q: Passing a php variable to a modal using AJAX

gbestardI'm trying to pass a variable to my modal using AJAX but it's not working. html code <img src="./images/see.png" class="open-modalPropietari" data-target="#modalPropietari" data-id="' . $id . '" > js code $(document).on('click', '.open-modalPropietari', function() { var id = ...

0
Q: php and javascript player base64_encode?

nriderSo I have a player that plays a video but shows the video url in page source which I would like to obscure with base64_encode. One player works with base64_encode and gets the item url with the following php code $filenew = substr($video->filename,$startIndex+1); ...

0
Q: Codeigniter storing session

NgaiI have a website using CodeIgniter as php framework. But there are problems on storing session either on local or database. For codeigniter, it provides two ways to store session, session_cookie (database) and session_native (local). Since my website is ready to clustering, the session cannot b...

0
Q: Create SOAP service with nusoap and provided WSDL file

GoranIs there a way to build a SOAP service using nusoap, with already provided WSDL file? I have to implement a SOAP service, and I was already provided with WSDL file. I achieved that with php_soap extension, but I'm struggling with implementing same thing with nusoap. php_soap example: $server ...

0
Q: In a wordpress post, display the list of posts that belong to the same category as the current post but exclude the current post itself

David BrossardOn my blog, I have a category called "TGIF XACML". At the end of each post, I want to display posts in the same category except for the current post using the wordpress short code [display-posts category="tgif-xacml"] I'm trying to figure out how to automatically exclude the current post. The ...

2
Q: is breaking up large MySql queries beneficial

khartnettI have a MySql table that has about 5.5 million rows of data. Every month I need to reload this data with a new data file. Since it takes a while to remove the old data, I'm adding limit 2000000 to split the job up into chunks. Example: DELETE FROM `list_content` WHERE list_id = 3 limit 2000000 ...

-1
Q: Execute query when button is clicked

PHPnoobI'm used to using POST method when doing this in a form, but this time I am using a table instead. Query: $delete = "UPDATE lmet_datacap_admin.md_lov SET MLOV_ACTIVE = 0 WHERE value='.$value.'"; PHP: echo '<table>' echo '<button type="submit" id="delete" value="'.$value.'">delete </button>...

-4
Q: PHP: Print relevant values from THREE different Arrays

user31066There would be Three different arrays, e.g. $arr1, $arr2, $arr3. I want to print the values of the relevant index of the arrays. Here is what the structure of the arrays would be: array( [0] => array( [0] => 'Roses' [1] => 'Grass' [2] => 'Sky' ...

0
Q: PHP Form Submission Missing Emails

Michael ClaypoolI can not get my form to send the email to me through my host server. I have run an error check using error_reporting( -1 ); ini_set( 'display_errors',1 ); and if($success){ print "EmailTo: $EmailTo<br>". "Subject: $Subject<br>". "Body: $Message<br>". "From: $EmailFrom"; } and...

0
Q: dropping image in dropzone sometimes image turms the other way

ScottI have dropzone working no a site but once in a while when I drop an image in it turns to landscape. This seems to happen more on larger images. I cannot find anyone with this problem so I was hoping someone here has dealt with this issue. Thanks

0
Q: tinymce 4 how to add event handler

Hendry H.In tinymce 3, it seems that we can do this with : // Adds a click handler to the current document tinymce.dom.Event.add(document, 'click', function(e) { console.debug(e.target); }); What is the syntax in tinymce 4 ? Need to do it after tinymce initialized.

0
Q: Parse error: syntax error, unexpected '}'

user2956799I wonder if somebody would spare a minute to look over a code and help me. I'm not php savy and I need a bit of help. i've this message error: Parse error: syntax error, unexpected '}' in /web/htdocs/www.martamagister.it/home/bdztset/modules/mod_captifyContent/tmpl/default.php on line 1 and th...

0
Q: Fetch search results from SoundCloud

Elo PeriCan I make a search query for a song from my site to SoundCloud and get back the data with song's name, artist and url (in JSON or any other format) ?. I checked the API ( http://developers.soundcloud.com/docs/api/guide#search ) but it's not working for me. Does anyone have a solution.?

0
Q: Custom url display same page

Jaskaran S.PMy application creates custom url's for its users. Eg: www.example.com/user1 Till here everything works fine. But the custom pages like www.example.com/about or www.example.com/terms show the same content as of custom URL's because according to my .htaccess file anything after 'example.com/' wil...

0
Q: Echo randomly named file name

TonalDevI have a jQuery/PHP signature module on my website, called 'HTML5 Signature Pad to Image' On iPad, a client signes the box with his finger/stylus and upon clicking 'Submit', PHP creates a random named file, and saves it on a designated folder. I need to have that file name echoed anywhere on th...

0
Q: php-login.net MVC login script gives a 500 error

twiggHello I've recently downloaded the login system from php-login.net from github. Just having a play at the moment I have set-up the code on my local dev using xampp and vhosts (mvclogin.dev). When I visit the address the home page loads as expected but when I move away to any other page it throws ...

0
Q: Form php/html send radio buttons into html email also not filled in items (radio buttons)

user2956852I want to fill in this form / but when filled in i want it to send me all the radio buttons (images) and also the not filled in buttons. for example i get options radio - no - yes - maybe clicked on maybe. When the mail has been send i get it as HTML. looks good. but now i want even th...

0
Q: Display Prestashop new product field on product-list.tpl and home featured modules

nynetsolutionsUsing this tutorial on this page Adding new tabs and fields to Prestashop products’ back office, I was able to add a new field for author for products in my Prestashop. I was also able to display it on product page by adding Product.php to override/classes/ and inserting this code below: class P...

0
Q: Can't install Laravel 4 Grunt

dasmikkoI'm getting this error when running this command: sudo php artisan grunt:setup I'm running Ubuntu 13.04 and using laravel 4. I have no idea what to do now... mikkel@mikkel-K53SV-Linux:/var/www/forum$ sudo php artisan grunt:setup A gruntfile.js or package.json file already exist and will be rep...

-3
Q: mysql 5.5 syntax error

user2956922I am using a custom php application. It worked without any problems on mysql 5.1, but its giving me syntax errors on mysql 5.5. I dont know mysql syntax much, but the errors are somewhere within this code: $Query = "SELECT ".$this->prefix."profiles.id_profile AS ip, ".$this->prefix."profiles.nam...

-1
Q: How to limit WordPress comment box to only accept specified code

user2539631I have modified the Wordpress comment form to just one field so users can post a soundcloud iframe in response to the post. The point of the site is to read the post, create a song, upload it to soundcloud and then submit it as a comment to the post. I need to limit the text box to only accept th...

0
Q: multiple simplexml_load_file in one variable

user2863494I need to load multiple XML files into a variable called $xml. I have an array ($all_urls) that contains the path to each XML file. To acheive this goal I used a method I found here on StackOverflow. foreach ($all_urls as $url) { $xml = simplexml_load_file($url); } However, using thi...

0
Q: php echo not displaying

charrisThis should be a simple problem but maybe it's me that simple instead. I have the following code: <?php $county = $_POST['county']; ?> <?php $cf_id = $_POST['cf_id']; ?> <h2><strong>County: <?php echo $county; ?><strong></h2> <input type="hidden" name="county" value="<?php echo $county; ?>" /> <

0
Q: php pthreads with Apache prefork MPM

Jake BI am trying to compile PHP with pthreads for efficiency purposes, but the way we use php is mod_php and apache prefork MPM. From what I have read, It is possible to compile mod_php with ZTS Enabled ( Thread Safety ). My question was will I run into any issues using Apache prefork MPM and compil...

0
Q: loop out comma separated array value into multi dimensional array

Sean LynchMy PHP app will upload a selected csv file into memory. It is then converted into an array using str_getcsv as shown below. //get file from session variable created in upload.php $uploadedfile = str_getcsv($_SESSION['uploadedfile'], "\n"); //remove first two rows as these contain headers unset...

1
Q: Implode starting from key 1

Joran Den HoutingI got an array like this: Array ( [0] => shop [1] => kids [2] => shorts ) Now I want all the values implode seperated with a slash /. BUT I want to pass the first key, [0]. Doing an implode() on the above will result in: shop/kids/shorts But I want this result: kids/shorts Is this possi...

0
Q: What is wrong with this solution? (Perm-Missing-Elem codility test)

user2956907I have started playing with codility and came across this problem: A zero-indexed array A consisting of N different integers is given. The array contains integers in the range [1..(N + 1)], which means that exactly one element is missing. Your goal is to find that missing element. ...

0
Q: WinXP Latest Chrome Update asks where to save file in link with multiple variables

RyeboflavenThis was just noticed with employees using WinXP machines on the latest Chrome update launched in mid-October. A user logs into the site and their employee ID is saved as $emid. The next variable, $pay_roll, is obviously their payroll information. There are two types of links that open up an MS...

0
Q: Wordpress thumbnail grid with expanding preview

AntoposseI am using this component http://tympanus.net/codrops/2013/03/19/thumbnail-grid-with-expanding-preview/ DEMO http://tympanus.net/Tutorials/ThumbnailGridExpandingPreview/ implemented in wordpress for my portfolio. looking at the html code <li> <a href="http://cargocollective.com/jaimemart...

0
Q: No errors but doesnt write to database

Moses Boltonthanks for taking the time to look at this. No errors pop up, but nothing writes to the database. Can someone help me out with what im doing wrong? <?php $subject = $_POST['subject']; $comment = $_POST['comment']; if(isset($_POST['submit'])) { $connect = mysql_connect(...

0
Q: PHP Code Not working after Upgrading Joomla

Shah GeeI am working on a joomla website. Some developer created a module that displays data on selection of a city. The code was working fine on joomla 1.5 but after upgrading joomla it displays all data without filtering. I am just working on solution. I did not code. Here is the code, is there anythi...

0
Q: Migrate my WAMP application to AWS

gusbeto37I am starting to look at AWS to implement a WAMP based application; I have a huge database, around 20 million data. Can somebody point me to a good place, tutorial or give me some tips as to how make the transition as smooth as possible? I am totally clueless as to using and programming AWS. The...

0
Q: AngularJS html5mode = true error when I access directly url with params

SchwertfischI have an application developed with Angularjs and Symfony 2, I enabled the html5 mode to get friendly urls. The application is integrated with Symfony 2.3 to response at services. app.js .config(['$routeProvider', '$locationProvider','$provide' , function($routeProvider, $locationProvider,$p...

1
Q: Create View from another view in php mysql

AnuI am trying to create a view from another view from php and im not getting any error but it simple does not create a view. I can manually create view from another in the mysql console but not from php. Any idea where I am going wrong? function createTransaction_file($db,$file_id){ $sql = ...

0
Q: can't create link pagination codeigniter

gabrieli can't creae link pagination in codeigniter... why? $config['total_rows'] = $tot_hal->num_rows(); $config['per_page'] = $limit; $config['uri_segment'] = 3; $config['first_link'] = 'Awal'; $config['last_link'] = 'Akhir'; $config['next_link'] = 'Selanjutny...

0
Q: Uploading data into two mysql tables

user2956943i have a problem where i have two tables in a database, one being categories (cat_id and cat name) and the other being jokes (joke_id and joke). I want a user to be able to chose a category and describe their joke, then this being entered into the database with the category of the joke being refe...

-4
Q: how to build a metasearch engine?

user2957017i have been trying to build a meta-search engine using java and php(to send data to google,yahoo,bing!).little help is available on net and what ever information i could find was not seeming correct. i had following queries : 1. is it illegal to display the results of other sites ?(though the en...

0
Q: Set checkbox state after ajax query

tatty27Depending on the value in the mysql database I would like a checkbox to be either checked or unchecked. Although the ajax query is getting the correct value the checkbox always remains checked The Jquery <script type="text/javascript"> $(document).ready(function() { $.ajax(...

0
Q: Any way to change server_addr using php

user2957023I am using cURL to access website but there is some issue. Instead of IP of User (on remote_addr) it is using server_addr Eg remote_addr (it suppose to be user ip) and server_addr are same. I know it is because the code is executed by server not user but any way to achive it. Thank you

-1
Q: My php files are not updating from aptana

user2957039My php files are not updating my website - the text is all black rather than the usual colours. I feel like it's not properly connected but can't figure out how to fix this...

0
Q: GET or import $var as input value to Form after the page is load by using onClick Button?

CyborgI have a FORM with 2 input fields $first_name and $last_name. <? $first_name = get_post_meta($post->ID, 'fname', true); $last_name = get_post_meta($post->ID, 'lname', true); $fname_tmp = 'Foo' ; // First Name TEMP $lname_tmp = 'Bar' ; // Last Name TEMP ?> <input type="text" value="<? echo $fi...

0
Q: Youtube get_video_info & url_encoded_fmt_stream_map

Gigi GamminoStarting from the YouTube API get_video_info, I'm retrieving from a PHP code the url_encoded_fmt_stream_map Everything was fine until this morning when suddenly the fmt_stream automagically decided to get only the following formats: mp4@hd720 x-flv@large webm@medium x-flv@medium mp4@medium x-fl...

0
Q: DRIVE API - Page break in converted HTML document

Alex SuchI'm trying to create a page break on an uploaded file created after a HTML document. When I download a Drive document as a HTML file, the page break is created with a <hr style="page-break-before:always;display:none;"> element. So I tried copying that but it is transformed into a simple <hr> whe...

-2
Q: mysql user defined variables as derived table

Om ShankerI have an array with containing elements myArr[1,2,3,4]. I want to use it as a derived table in select statement. Is it possible "SELECT * FROM myArr as table1"

0
Q: create new object in php

SyspectI understand that PHP doesn't allow me to create a new instance of ClassB inside my ClassA, if the creation is not inside the scope of a function. Or I just don't understand... class ClassA { const ASD = 0; protected $_asd = array(); //and so on protected $_myVar = new ClassB(); // here I get ...

0
Q: Work with windows service (WCF) in php

MajAfyMy boss give me a .net service link which said wrote with WCF. I think the service wrote in wrong method because the service programmer said we don't have problem with this service when we use in asp.net but when I trying to use this service in PHP I have problem. My code is : $url = "http://<s...

0
Q: Get first image only with preg_replace

otinanaiI'm not sure if this is possible only with preg_replace function but I would like to get only the first image and ignore all the other. This code excludes all images in the text I want to display, but I need to get only the first image. if (!$params->get('image')) { $item->introtext = preg_...

0
Q: Why do I get every title of each post when I filter them in single.php

user2957058I am just working on filter titles in pages and posts and everything works as expected but when I view the single.php whereas it shows the actual post as should be, the function hook filter i am working on inside functions.php of my plugin is filtering every title of each post of my blog, I was e...

0
Q: Login problems in linux, session not starting

Arvis AvensI have problem with login system, in windows it works, but in linux session has not start, after login they navigate to page, but page is clear becouse session is not started. <?php $con=mysql_connect("localhost", "root", "") or die("Cannot connect to databases!"); mysql_select_db("registered_us...

0
Q: Upload bitmap from android not complete

user2956957i trying to upload a picture to a server from android through php. But the problem is, that often pictures dont finish the upload. Here is a example: http://imageshack.us/a/img20/743/2ut6.jpg I really dont know where the problem is. Here is my Upload Code: Bitmap bitmap = bildchen; ByteArr...

 
5:11 PM
0
Q: Wordpress Object Values

bcedergrenI am using Custom Post Types with Advanced Custom Fields in Wordpress 3.7.1. Within one of my CPTs I am referencing another Custom Field as a Post Object. When retrieving the Post Object through WP_Query I am able to return the Post Object ID but need to get the text value of the object (the titl...

0
Q: Undefined variable: _SESSION

user2956927help me please, I have my principal page php with a $_SESSION. page1.php <?php session_start(); $consulta = "select t.num_ticketfrom sdg_ticket t where t.cod_tipo_incidente=2 and t.cod_usuario='".$_SESSION['sdg_usuario']."' "; ?> <html> <head> <script> var auto_refresh = setInterval(fun...

1
Q: How to determine if variables are set in an array where dependencies exist

unfrevI have an array of data which, amongst other elements, contains a start date field, an end date field and a duration field. During validation I need to check that at least two of them are set, as you can infer the third from the two you have. Currently my if clause is as follows: if ((!isset($...

0
Q: Symfony doesn't find routes

MatiI have the weirdest problem. Everything was doing just fine and suddenly symfony shows "No route found for "GET /" So i checked router and..none of the routes from my controller were in there. So i added routing to the routing.yml and right now it throws An exception has been thrown during...

-1
Q: JAVA Applet to php sending recursive data

user2554703Gentlemen, good night .. Pasoa explain .. I have a small applet that did .. and what makes it .. read a excel, php send their fields, and row by row recursively .. to perfect here .. but the problem is that I pulled down the apache server .. guess that is choking it with data. anyway .. in re...

0
Q: Get one array from output

user2957155Help with getting a specific array. What this script does is go to http://www.iplocation.net/index.php?query=223.196.190.40&submit=Query and get the information of country, city, ips etc. and outputs it like ; [IP Address] => xxx.xxx.xxx.xxx [Country] => Country [Region] => Reg...

0
Q: Embed FB contents in my website

Luke CageI've a PAGE on FB (not a profile) through which I make events. I want to embed the FB events on my site and I'd the calendar on my site looks like the one on FB, with all the events i created on FB. How?

0
Q: Add a class to every 4th div in loop

user2957151Here is my code: <? for($x = 0; $x < count($groupSmall); $x++){ ?> <div class="col-md-3 meeting-item"> <img src="images/image.jpg" /> </div> <? } ?> I would like to add a new class to every 4th div in this loop. I know it can be done with Modulus but I can't get it to work. T...

0
Q: Efficiently calculate correct price differences

user2842265Hi All I have an array structured as follows in a catalogue describing different price options 'opt254' 14682 => string '0' (length=1) 14683 => string '0' (length=1) 14684 => string '0' (length=1) 14685 => string '1' (length=1) 146...

0
Q: Unable to post array via ajax

nosizejoshI am trying to post an array created in js to a php page var newEventArray = new Array(); newEventArray["title"] = title; newEventArray["description"] = description; newEventArray["type"] = type; newEventArray["visibility"] = visibility; newEventArray["...

0
Q: How to get the first record with laravel 4 raw queries

iyad al aqelHow can i get the first record with laravel 4 raw queries. Something like DB::select('')->first(); is not working neither did DB::first('')

0
Q: pass a jQuery variable on load to mysql table

WickedJennHello all: i have a question regarding a jQuery function and a php variable I have 3 dropdowns that depends on each other to populate themselves from a mysql TABLE. When the window is loaded the Project dropdown has 3 options: 1 2 3, "Type" just A, B(default is A) and "User" dropdown has nothin...

-2
Q: Creating pagination to a framework ( need tips )

user2945583for few days im trying to connect the pagination with FileGator script. I don't really know how to solve this problem ( should it be in the class or on the output file ). Could you give me some advice? Im trying to customize this code - author doesn't have time he told me to ask around. If you ne...

-1
Q: Youtube API Ref codes for PHP?

TitusLooking for the object that allow to get the date of publication of a video. I read Google Youtube API Doc but can't find any in that mess :( I use V2 sentences : $v->getVideoTitle(); Seems like to be easy using $v->getVideoDate(); OR $v->getVideoPublished(); But not workin... Some1 could he...

0
Q: Create A PHP Variable Which Changes The Color Of The Background Weekly

Hamza Abd ElwahabI would like to create a PHP variable which I can echo to change the color of the background weekly. Here is what I had reached so far <?php // set the default timezone to use. Available since PHP 5.1 date_default_timezone_set('EST'); $today = date("l"); if($today == "Sunday"...

0
Q: phpList mails rejected (possibly caused by exchange server)

Stefan SurkampI used an old version of phpList until it stopped working (certainly due to some internal server updates) and thus updated to version 3.0.5 last week. Everything went fine and I was even able to send out a few test mails. Today, I tried to send a bigger amount of mails which caused bad headaches...

-4
Q: How to fill an array with random numbers using for loop in php

user2957160I am sorry if this question is pretty much stupid simple, I am still very new and impatient with php. I have the following question which I can't figure out how to answer. 20. Initialize an array containing 10 elements. Place a random value in each of the 10 elements (from 1 to 10) using a for ...

3
Q: Why do < and > need to be escaped in preg_*() patterns?

BenjaminI've run preg_quote('<>') to check if these characters need to be escaped in a regular expression, and to my surprise, they came back escaped: \<\>. Why do these characters need to be escaped? What is their meaning in a regular expression?

0
Q: PHP Transaction Manager across resources

Dan G.In our Symfony2 project, we would like to ensure that modifications across resources are transactional. For example, something like: namespace ...; use .../TransactionManager; class MyService { protected $tm; public function __construct(TransactionManager $tm) { $this->tm...

0
Q: Regex help for custom fields in emails

Ben SinclairI allow custom fields in emails sent out in my software. I use CKEditor so they can write and format their emails. And example of a HTML formatted email with a custom field is: <p>Hi %firstname%,</p> <p>Blah blah blah.....</p> I use the following code to detect and replace those fields...

2
Q: How can I recover a variable-length number of GET variables via PHP?

warrenIn many languages, you can have variable-length argument lists to functions (eg printf in c). In a current php application I am working on, I have a desire to process X-many variables coming-in via HTTP GET. I am wondering if I need to follow something like DuckDuckGo's GET query format (?q=find...

0
Q: Display Buddypress Profile Field

XarcellUsing the latest version of Wordpress & Buddypress, I am trying to display a certain custom profile field in the WP header.php. I'm terrible with PHP, but this is what I have: <?php global $bp; $the_user_id = $bp->loggedin_user->userdata->ID; if (function_exists('bp_get_profile_field_data')) { ...

0
Q: Symfony2 set user role default User and Role files

Jan KožušníkI have a problem with storing user role into database. I´m using original files written here: http://symfony.com/doc/current/book/security.html and here: http://symfony.com/doc/current/cookbook/security/entity_provider.html logging in a logging out is working. I can save user into database, bu...

3
Q: CakePHP: Error trying to generate a schema

EmersonI'm trying to start using CakePHP schema: app/Console/cake schema generate I get the following error: Welcome to CakePHP v2.3.0 Console --------------------------------------------------------------- App : app Path: /Applications/MAMP/htdocs/mysite/app/ -----------------------------------------...

0
Q: .htaccess Prettifying URLS for PHP

DonaldUrls by default /courses/category?cat=skills /courses/course?cat=skills&course=timekeeping I have been trying to get the above shortened down to be accessible at Desired /courses/skills /courses/skills/timekeeping Using the below works for when cat and course have variables RewriteRule ^c...

0
Q: How to Sync PHP and NodeJS with Redis and get data in order

ZenthI have a example code for make experiments trying to think "how to ""sync"" nodejs and php in a simple chat example. Here is my NodeJS server: var redis = require('redis'), subscriber = redis.createClient(), publisher = redis.createClient(); //var sckio = require('socket.io')....

0
Q: Next PHP page is not loading from form submit

user2957258My Below given code is not loading the php page specified in form tag. Please guide My Below given code is not loading the php page specified in form tag. Please guide I am calling another page but thats just not working as i will update the text input there, even if some function can be suggeste...

0
Q: In PHP How would you validate PKCS#7 padding?

lockdownI know that in Python you would do something along the lines of this to check the validation of the PKCS#7 padding: pad = ord(plaintext[-1]); all_padding = plaintext[-pad:]; /* get the last N bytes of the plaintext */ for byte in all_padding: assert byte == pad Is there a working example in P...

0
Q: Paypal IPN with empty post data

user2957270I'm using the Paypal IPN system with a listener script using ipnlistener.php. Since one day, Paypal hasn't sent any post data to my script. It can't be a problem with the code itself, because the $_POST variables are empty. So if there are no &_POST variables i cant handle anything. (tried it wi...

0
Q: PHP how to extract 3 digits from a string and output it

JoshcThis is a bit a strange issue. I am trying just to get sequential 3 digit interger from a string. Now I thought I was successfully doing it using this code below... preg_match_all('!\d+!', $image['title'], $integer); echo $integer[0][2]; But now it seems to be failing on some strings. It wor...

0
Q: In phpDoc, set a tag as a marker?

ChordsWhat I'd like to do is set a marker to be @todo, which is also a tag, such that I'll see todo items in the class/method reference as well as in a marker report. Is this possible? When I try, my marker report is empty.

0
Q: I want to add some detection to my website; are these good choices?

DylRichoAs I am recoding my entire website, I need to choose a couple of methods to detect both web browsers and mobile devices. From the lists below, could you please recommend the better option? Here are my choices; Browser Detection Use IE-specific comment arguments to target IE6 - IE8 CSS files; ...

0
Q: Get Dynatree marked items from $_POST in PHP

ReynierI'm using dynatree plugin but when I do: print_r($_POST); in the page where I receive the data I can't see Dynatree selected options? Why? How I can get this data in order to process it in my PHP script?

0
Q: how to send array value with jqyery to php

Hassan MostafaHi i want to send the values of the array to jquery, i try to do that but jquery return undefined, offcourse i still new to jquery and here the code : for ($i=1;$i<=$stars_settings['attachments']['max_number'];$i++) { $cls = ($i == 1 && in_array('attachments',$_SESSION['iserror'])) ? ' clas...

0
Q: Bind Input values to Model in Laravel

Syed Abdul Qadeeri am creating an API on laravel using the Resource Controller. this api will be accessed by the Windows Application i have a call say : UpdateProfile(User $user); i will send a POST request from the application with all the values filled in it and i want the laravel to automatically to map th...

0
Q: Detect Ajax in PHP

Dave CameronI am trying to make an ajax post to the same php page. Ajax: $("#loginForm").submit(function(e) { e.preventDefault(); var postData = $(this).serialize(); $.post("login.php", postData); }); The postData is correct and is in the following format: username=john&password=123123 PH...

-1
Q: PHP echoing variable but adding line breaks

Homer_JI have a variable a such $var: $var = "One, Two, Three"; I can echo the variable without any problems the output is: One, Two, Three Is it possible, when echoing the variable to add a line break where there is a ,, so it would look like this? One, Two, Three

0
Q: SQL LIKE and NOT LIKE in same query

Prabathi have 100 tables. so some of them contain table name as 'plan_2' and some of them 'temp'. so how can i select tables only 'plan_2' not containing 'temp' my query not working. $result=mysql_query("SHOW TABLES LIKE 'plan_2%' AND TABLES NOT LIKE '%temp%'"); thank you.

0
Q: Laravel vs. raw PHP for web application

blackpla9ueI'm planning to develop a web application for organizing notes. I recently started using Laravel and I have to say that I'm really in love with it. But what I came to realize is, even for a small operation for eg: database, it has to go through a lot of method calls to get it done. What I want ...

-1
Q: functions in PHP class didnt work

Doron Levii build a php class. why when i build fuctions (in PHP class) like this, it didnt work? and how could i fix this? the functions: (i delete the __construct becouse its didnt interesting right now) class c { public function a() { return b(); // line 131 } public functio...

1
Q: Having to Press 2 times submit button to actually submit - AJAX

SylarAs the title said... Some of my code: there is more inputs but i'll put this one just to simplify. <form name="frmCadastroPlano" id="frmCadastroPlano" class="form-horizontal" > <input class="input-xlarge" id="inputNome" name="inputNome" type="text" value="" style="height: 26;"> <button ty...

0
Q: Notice: Undefined index: in php 2d array

user2957322please help - when print_r($myarr) output is Array ( [component] => Array ( [content] => component content file .... ) ) but when I want get $myarr['component']['content'] in my code like this public function getnode($type = null, $name = null) { ...

0
Q: Filter count column Magento Customer Admin grid with filter_condition_callback

user1990912Hi I've modified the magento customer admin grid in "../app/code/local/Mage/Adminhtml/Block/Customer/Grid.php" to include total orders, but need to apply a filter, I've been working with filter_condition_callback but can't get it work. Any suggestions? Modified Collection: $collection->getS...

0
Q: SELECT + INSERT in the same query

Nelson Galdeman GrazianoThis is what I'm using now public function nuevaPlantilla(){ $query = $this->sql->prepare("SELECT max(did) as nuevodid FROM ".self::tabla_plantillas); $exc = $query->execute(); if (!$exc){ return false; } $resultado = $query->get_result(); $datos = $resultado->fet...

0
Q: Getting unicode values from SVG using DOMDocument

Michael IrigoyenI am attempting to retrieve the unicode values of glyphs in an icon font. The font is structured like this: <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > <svg xmlns="http://www.w3.org/2000/svg"> <defs> <f...

0
Q: PHP - Playing random twitch video from online list

user2957159I'm coding a website that features Twitch streams. I've been trying to code a feature which grabs a random stream from the online list and plays it at the top, but I still can't get it to work. Any ideas? Here's the code: <div class="viewer"> <?php $channel = $_GET["channel"]; i...

0
Q: Can Not send Multiple Values with multiple checkbox in php

Rahi M.I have the following form where data are retrieved from the mysql DB. <?php $get_name = mysql_query("SELECT * from premises WHERE status = 0") or die(mysql_error()); while($motel = mysql_fetch_array($get_name)){ ?> <form method="post" action="includes/loanprocess.php"> <tr><td...

0
Q: English Lemmatizer in PHP

user2957386Is there any English lemmatization algorithm written in PHP? There are some lemmatization algorithms out there for Java but I am wondering whether there is any similar one for PHP. Thanks.

0
Q: Excluding folders with the word 'thumbs' in it

user2284703I'm trying to display a list of all folders inside of a directory. But I do not want any folders listed that contain the word "thumbs" in it. Can someone tell me how to do this... Here is the code I am using that doesn't seem to work. It displays all of the folders but it is not blocking the ...

0
Q: After movie clip redirect to subpage

user2041174I need to know how to do a page containing a fullscreen movie clip as a intro for the site, after the movie is finish it will redirect the visitors (without clicking) to a subpage. Is this possible to do? No flash, javascript or/and PHP only.

0
Q: PHP/Apache Rewrite for Subfolder

YazminI have the following rewrite setup: RewriteEngine on RewriteRule ^(.*)/$ $1.php RewriteCond %{ENV:REDIRECT_STATUS} !200 RewriteRule ^(\w+)\.php$ /$1 [R=301] RewriteRule ^(\w+)/?$ /$1.php I'm trying to any page under my /admin subdirectory (i.e. /admin/index.php, /admin/users.php, etc...) de...

0
Q: getting php/html form exactly the same in email on filled in

user2956852I have a form online php/html that has 74 entries. and there are 70 entries that have radio buttons with 3 options. When i fill it in and send it to my email. I get a 2 nice koloms with in 1 the questions and the other the answers or clicked radio buttons. Is it a simple task to get it in my em...

0
Q: Load denied by X-Frame-Options

AndresI have a pool of videos in my own server and another company is providing me the geoloc service in a video player that they developed. The problem is that I'm trying to load a simple iframe of my provider just like this: <iframe src="http://myvideoplayerprovider.com/videos/198" width="620px" he...

0
Q: How to convert a web folder into a single html file?

davidloubereI need to generate a full static HTML file from a web folder containing related assets (CSS styles and images). Styles would be embedded directly within html tags and images would be base64 encoded. Is there a way to achieve such a thing via PHP? via Symfony2 and assetic?

0
Q: Wordpress - Different background-image for different pages

Jack HardingI have a background-image for a div that is present on every page. I was wondering if there was a way to change the image on different pages?

-2
Q: PHP/MySQLi fetch each row to separate array

user2957463I am trying to find an easy too fetch all rows from mysqli prepared statement to into seperate arrays. Any ideas?

0
Q: G+ sign-in with php origin_mismatch

OdOI'm trying to G+ php Sign-in, I'm getting the error in the pic "origin_mismatch" I'm running wamp server on port 80, and in the application console I set JavaScript origins: http://localhost:80 so ?!! p.s: where should the API library files be relatively to the signin.php page?

0
Q: Why are my MySQLIi functions not giving values for any variables?

user2957232You'll have to excuse my amatuer knowledge of both php/mysqli and sql, but I am trying to work a simple log in system for a hobby website I created/am creating and I cannot seem to get any values back for the life of me. I'm basing my code of the first example (object oriented style) at http://ph...

0
Q: php comment script from gentle source not working on 000webhost free server

Savio GonsalvesIndex.php <?php include './include.php'; ?> <html> Page data <?php echo $c5t_output; ?> </html> include.php <?php /** * GentleSource Comment Script * */ define('C5T_ROOT', '/comment_script_2.1.2/'); include C5T_ROOT . 'comment.php'; ?> I get this below...

0
Q: Json_encode or remove last comma?

user2883183I figured out how to get my desired result (almost). My code adds a comma at the end before the last ] so it wont quite work. I know I can use Json_encode to build my array from my external json but I'm stumped. I either need to remove the last comma or use json_encode (which i'm lost on) any ...

0
Q: Filtering a multidimensional array

LearningI have the following table in DB: id | letter ---|-------- 1 | A, B, C 2 | D, E, F 3 | A, C, E 4 | B, D, F 5 | G, I 6 | H How do I list the values ​​and the result is A B C D E F G H I ?

0
Q: Parse error: syntax error, unexpected (T_STRING) on line 1

user2135790I am creating a script to prevent empty user Location field based on a previously developed filter function. On localhost everything works fine but online i got strangely his error : Parse error: syntax error, unexpected 'QA_INCLUDE_DIR' (T_STRING) in /home/picas/public_html/plugin/location-...

1
Q: MySql ORDER BY multiple columns IF AND

cfgtrewSo I've joined two tables for a particular query. After a complicated SELECT statemnt, the table would look vaguely like this: $myid = 3 PostID | FromUserID | To User ID|Date | PostSeen | NumLikes |SeenLike 61 | 48 | 3 | 5/11/13 | 1 | 1 | 1 59 | ...

0
Q: Get value input table many row

Nhat Tuan<?php $a = array( array('id' => 1, 'name' => 'Kelly'), array('id' => 2, 'name' => 'Tuan'), array('id' => 3, 'name' => 'John'), array('id' => 4, 'name' => 'Ly'), //many row like this ); echo '<table>'; foreach($a as $new){ echo '<tr><td>'; echo $new['id']; echo '</td><

0
Q: Foreach in laravel 4 Controller rendering in View

Bart MoonsI'm writing a booking system for my webapp. I get the output I want in my Controller with print_r. Unfortunately I have not been able to get the right output in my View. $userId = Sentry::getUser()->id; $my_garden = DB::select('select * from gardens where userId = ?',array($userId)); foreach($my...

0
Q: How to add module into content in joomla 3.1

Valdis AzamarisLet's say i have such html/php structure of index.php in my template: <div class="content"> <jdoc:include type="component" /> <div class="price_request"> <div class="right_area"> <jdoc:include type="modules" name="price_request" /> </div> </div> ...

0
Q: Using href in jquery with get method

Alonso González Nestali´m learning jquery and i have a question. On html, when i want to pass variables by get, i write: $subject=$_GET['subject']; $id_user=$_GET['id_user']; $id_pupil=$_GET['id_pupil']; <a href='process.php?subject=".$subject."&& id_user=".$id_user." && id_pupil=".$id_pupil."'>Add</a> But i wa...

0
Q: MySQL different values from same group Id

Levent KayaHere is the code : $sorular_hepsi = mysql_query("select * from tblsorular where hafta=1 order by rand() limit 1"); $soru_ust = mysql_fetch_assoc($sorular_hepsi); $soru_id = $soru_ust_rs["id"]; $soru_grup_id = $soru_ust["sId"]; $sorular = mysql_query("select * from tblsorular where sId...

0
Q: use a single value from multiple text boxes into an sql query with php?

phpbeginnerI have 5 textboxes in querybook.php which takes the values of bookid bookname bookauthor bookpublisher and bookedition from form in html (text boxes) to search for a book. Bookid is the primary key of book table. When user fills up all the fields in the html form then it is ok. when the user fill...

0
Q: Call object that another object is contained in

JeffSo I'd like to be able to call a method of an object from a created object as deep as I'd like. For example $test = new sampleObject; $test2 = $test->createChild(); $test3 = $test2->createChild(); ... catch is, I need to be able to refer to a method from the topmost creator class. so I have...

0
Q: Split php string and keep delimiter with the first output

user2898514I'm trying to split a php string in to parts the first one include the delimiter but the second one doesn't $string = "abc==123"; What I want exactly is to get $string['0'] = "abc=="; $string['1'] = "123"; Thanks for help

0
Q: PHP - Upload images to FTP directory and then Display images uploaded only from directory

Don Misquittai simply want that after i upload an image using form file upload, it will display those images on the next page. The images are uploaded to a folder on the ftp. i have looked everywhere but cant seem to find the right solution. this is the HTML code for uploading image (image.php): <form encty...

0
Q: Datatable server processing

user2957541We can get our datatable working without server side enabled upto 10,000 rows, however we need server side processing because we have 200,000 rows in our table. Our current code is: $('#example').dataTable( { "bProcessing": true, "bPaginate": true, ...

0
Q: PHP fwrite() , could not fill txt

user2894433after code execute my file look like this: 1.info 2. 3.info 4. 5.info .... Sry for the bad english , i tried with different mode in fopen but still the same. <?php $file = 'data.txt'; $lines = file($file); $newArr = array(); $f = fopen($file,'r+'); foreach($lines as $value){ $newArr[] = $v...

0
Q: How to start building e-commerce website

Mike Yeahlooking for direction on an commerce site. I want to know if I can build using wordpress. Also what specify languages and type of coding will I be using.. I want to pretty much create a site that basically functions as a “For-Sale Classifieds”. Also sort of like ebay without auctions. But rathe...

0
Q: How to save the jpg file from base64 data

PasargadI have the base 64 data for my images and I want to save them in my local machine as JPG Files. My base 64 code starts with data:image/jpg;base64,/... I already tried to save it by the following code: file_put_contents('MyFile.jpg', base64_decode($imgData1)); But I cannot open the create...

0
Q: Character set in PHP, mySQL and emails

TrapezeArtistCharacter sets are driving me round the bend! My database is utf8_general_ci and the tables within it are utf8_unicode_ci. All my PHP pages have <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> in the head. When I type a euro symbol (€) in the PHP page and input it to the ...

1
Q: In PHP is there any purpose to defining an array before it is used?

billynoahConsider a chunk of php code like this: $example = array ( 'Location' => 'farm', 'Name' => 'billy', 'Meal' => array()); $example['Meal'] = ('Fruit' = > 'apple', 'Soup' => 'tomato', 'Drink' => 'wine'); Is there any benefit or reason to pre-define the 'Meal' sub array like that beforehand rather...

0
Q: Maximum execution time of 30 seconds exceeded Laravel 4 error

zachstarnesI am having an issue with a certain function that sends a password request within my UserController in laravel 4. It checks to see if the email exists in the database then sends an email if the user does. The function then creates a token in a table and sends that at the end of the link within th...

0
Q: passwordprotection for uploading a file

ahc59I have the following question, I have a website, and in the website a page named "download" I would like to have a download button for a user to download a file from my server. On this server is a directory called "Download". I would like to place there more than one file for users to download. W...

0
Q: What Mysqli value for bind_param() i or s

user2722667I am using Mysqli bind_param when im inserting stuff to my DB. When I tried to insert a phonenumber as "0737327373" the value got inserted as "737327373" without the leading "0". But when I changed bind_param("i") to bind_param("s") instead the value got inserted correctly as "0737327373". So sh...

1
Q: How to override a rule/sniff in a PHP CodeSniffer ruleset correctly and to avoid doublechecking of code?

automatixI've extended a class of the PSR-2 sniff set. Now the checks are executed two times -- even if my chid class is empty. Why? And how to do it correctly? Code: [CodeSniffer]/Standards/ZF/ruleset.xml <?xml version="1.0"?> <ruleset name="ZF"> <description>...</description> <!-- Include ...

0
Q: Active MySQL add - Confused

user2955368This is the error that I keep getting after I hit "Register" the email sends and all, however when I go to activate it under activate.php it gives me this error..: Unknown column 'active' in 'field list' I do understand that it wants me to add that field to the database I believe.. However I d...

-1
Q: PHP OOP : Accessing parent attributes from child / Child inheriting from parent's attributes

adabaso the code is : DAO class abstract class DAO { protected $db; protected $SQL_host='localhost'; protected $SQL_port='3306'; protected $SQL_dbname='projet'; protected $SQL_login='root'; protected $SQL_password=''; protected function __construct() {...

0
Q: How to add coupon codes in magento invoice pdf print?

user2957578I tried editing /app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php for a quick fix and added a simple code code inside the getPdf function $page->drawText('Coupon Used: '.$order->getCouponCode(), 200,40, 'UTF-8'); then I tried to print it again in Sales->Invoice but seems like the changes aren...

0
Q: Inheritance PHP, passing methods and using children's properties instead of parent's ones

PobeWhy does parent's method getHC() passed to Professeur refers to $this->quota of parent (Enseignant) instead of children's $this->quota. abstract class Enseignant { private $quota; //empty public function __construct($nom, $nbHeures)[...] public function getHC(){ return $this->nbHe...

0
Q: exec command in PHP doesnt work whereas command line works

user2957592I am using windows. I have a PHP version 5.3 When i go to command prompt and type mode COM4, it works like a charm. When i use exec("mode COM4") nothing happens, and thereafter, even command line refuses to work. Using command line after that says "Device COM4 is currently not available" Any s...

0
Q: Concatenate and Count the multiple rows in single rows in mysql

DnssousaI want to concatenate and count data of the same column, so I can concatenate but I can not count the repeated data. see below the table ID bills  class 1   0.5    2 2   1      1 3   0.5    2 5   1      3 6   0      2 7   0.5    1 8   1      2 9   1      3 10  0.5    1 11  0      2 12  

0
Q: Cannot install FireBird on XAMPP

Nadir NovruzovI have windows 2003 server and XAMPP running on it. Now I can't configure PHP to connect to Firebird server. I cannot install firebird support on php. I have uncommented extension=php_interbase.dll and extension=php_pdo_firebird.dll and I have downloaded gds32.dll from here http://www.dll-files....

0
Q: creating an excel file from ms access database from php

user2606912i am creating an application in which i have to create an excel file which is a replica of an ms access database file. The access file is updated automatically from other electronic machines and stores some infomation in tables. Now i wanted to create an excel file which contains same data as tha...

0
Q: PHP method="post" stopped working after I added this .htaccess... Why?

Lucas BI've added this .htaccess to remove file extension from the URL, so instead "index.php", it would show "index" only, all the times. But after I did it, my <form method="post"> stopped working Options +FollowSymLinks -MultiViews Options +Indexes AcceptPathInfo Off RewriteEngine on RewriteBase /...

-1
Q: Change text to link automatically

John SmithI'm trying to automatically change it so that every text that looks like @username (@ sign first, username after, no space between), automatically changes to a link (or a certain color). How would I do this? With javascript? Thanks.

0
Q: Magento How to remove the title field from product review form?

igrossiterhow can I remove the the title text field from magento product review form? It could be something as simple as making the title not required and hiding it thought css, is that possible?

0
Q: Codeigniter Error message : i got this codeigniter error

Ahmed Alii got this codeigniter problem : i run this login application but i got this message : Failed Login: Check your adminname and password! Although i enter the right admainname & right password so why it can't direct to the another page view and give me this error message ?! Controller : class...

0
Q: Laravel Model Relationships

Lucky SoniI am playing around with Laravel Models and i came across a fairly common database design pattern for which i am unable to establish relationships (using Laravel). Here is the Database design If we only take into consideration the following tables (for simplicity): 1.Customers 2.Products 3.Pro...

0
Q: Convert date to miliseconds for highchart date

Tariqhttp://www.highcharts.com/stock/demo/ I'm working on above hight chart "Highstock - Single line series". But i'm stuck with the date format of Highstock - Single line series. the json format is showing the date format like '1162857600000'. how to convert date like 11/5/2013 to that format ? Is...

0
Q: Protecting PayPal donation form from XSS - CodeIgniter

a7omitonI'm really paranoid about whether my donation form is safe from XSS or not (maybe I've been reading too many XSS articles). I've used the button generator provided by PayPal and inserted that into my page, but I also added a select element which has the 'item_name' value as its name attribute (on...

0
Q: Run Script on form submit

user2957677I've been looking around for this and am really confused, there are similar questions but I cant seem to make any of them work. So I apologize if this has been repeated before. Here's my problem, I need to run a php script on form submit instead of re-directing to that page. Here's my code: Form: <

1
Q: MYSQL query fails with encoded entities

Bart SchefferI have the following query which should count how many rows there are with the same values: $query = mysql_query("SELECT * FROM top2000 where artist='$arEnt' AND title='$tiEnt'", $link); It's works perfectly, but since users can typ in '"', "'" or any other non alphabetic charactar, I first en...

-3
Q: Developing API from PHP application

user2576961I am putting together a new php codeigniter application that will be used by several companies through the use of an API I want to develop. This is a concept this new to me and was pointed out to me as a good idea to look into and I'm here to ask for some quality references that I can read up on ...

0
Q: Cant set Virtual host with Xampp

temp-learni am trying to set my Virtual Hosts. This is setting for my Hosts File 127.0.0.1 localhost 127.0.0.1 test.local And this is my setting in httpd-Vhosts.Conf file <VirtualHost 127.0.0.1:80> DocumentRoot "C:/xampp/htdocs/test" ServerName http://test.local/ ErrorLog "logs/du...

0
Q: Loop and display records from table using SELECT WHERE (PHP) (SQL)

VereonixI'm in need of echoing to screen specific records from a table based on the value of one field in the record. I have a table which has the names and addresses of people I wish to echo to screen all the records (not all data from the record) where for example the country is "GB". I have current...

0
Q: Best practice for exception handling: PDO + controllers & repositories

NQQI've searched around for best practices on using exception handling with PDO, but most examples only look at it from a simple one class approach. If I'm using controllers and a repo in an ORM type model, where should the various try/catch, and throw blocks happen? A simplified example: CONTROL...

0
Q: How to get specified content from indside a div

kavenHow to get content (a specified content) from inside a #div. I have form like: <?php require_once('phpQuery/phpQuery.php'); $key-one = $_POST['key01']; $html = file_get_contents('http://google.com/search?q='.$key-one.''); phpQuery::newDocumentHTML($html); $result01 = pq('div#resultStats'); ?> <...

0
Q: How to make my mysql code secure?

user2955368I was wondering how to make my code secure.. I understand there are tutorials and I've seen some answered questions, however I am confused.. If someone can please explain and show me what I need to change to make prevent it from SQL injection, that would be great! :) Here's my home.php which con...

0
Q: Blob images are not displaying on IE and Chrome when using base encoding 64

user2957684Here is my code to show blob images on my webpage.. $sql=mysql_query("SELECT slider_id,date,page_image FROM news_slider where date='$ndate' order by slider_id ASC LIMIT $start, $limit"); // the result of the query //$result = mysql_query("$result") or die("Invalid query: " . mysql_error()); ...

-4
Q: Undefined Index PHP Mysqli

user2041211in this code have a fault in foreach cicle, but the strange think it does not work on my pc but work on my fiend pc This is the code: Thanks :) <?php include("Database.php"); $sql = "SELECT * FROM utenti"; $rs = $conn->query($sql); if($rs === false){ echo "Errore Si...

0
Q: Symfony2 and avoiding overly verbose code

wwarrenIn most of my controllers, I need to get a reference to one or more of my custom entity repositories, so naturally, I do this a lot: /** @var $repo MyFirstEntityRepository */ $repo1 = $this->getDoctrine()->getManager()->getRepository('MyNamespaceMyBundle:MyFirstEntity'); /** @var $repo MySecondE...

0
Q: Determine the current environment and requesting origin - need to define variable

ChristoI have almost all of my code complete except for one last variable, $currentEnv = '???' . How do I detect the current environment with this syntax?? /** * CORS Implementation to support AJAX requests from mobile site * @see http://en.wikipedia.org/wiki/Cross-origin_resource_sharing ...

0
Q: .htaccess - after redirect from non-www to www, removed .php file extension appears

user2957669I'm trying to redirect from non-www to www url. I have allready done removing .php file extension from files and forced trailing slash, but now when I do redirect from non-www to www, next happens. When visiting urls with www, everything works OK, extension is removed and trailing slash is adde...

0
Q: Convert MSSQL time with decimal precision into PHP time and MySQL DateTime

kidonchuI am trying to convert MSSQL time into PHP time and then MySQL datatime. MSSQL time format looks like this. 2011-10-07 16:55:37.337 I want to insert this exact representation into MySQL database. To achieve this, I am using PHP. date(strtotime('Y-m-d H:i:s', $time)) But if I do it like this, ...

0
Q: fetch 'id' from backend and pass it at index.php

user2819264i've created a slider in which images of different galleries cab be displayed . gallery can be created dynamically from admin. now i want that admin can select the default gallery to be displayed from admin panel . i've created defaultgallery.php from where he can select gallery.i want to pass th...

0
Q: PHP gather all checkboxes and sort checked vs unchecked

AustinI'm working on a HTML form that contains a ton of checkboxes. I would like to use PHP to create 2 variables. One variable that contains the values of all the checked checkboxes and another variable one that contains the values of all the unchecked checkboxes. Does any one know the best way to ...

0
Q: PHP: MySQL to table

user2811921just wrote simple php code that would print some of these rows That's how does my table structure looks like: http://i.stack.imgur.com/ne13t.png That's my php code: $user = mysql_query("SELECT usr FROM ava_members"); $id = mysql_query("SELECT id FROM ava_members"); $email = mysql_query("SELECT...

 
7:47 PM
0
Q: Access Facebook Grapg API with Access Token - Storing that data - is it okay?

Michael SomervilleI've been doing hours of research on this topic and it seems to be short of a complete answer. So I am hoping someone on here can help me out - I don't want to have issues with my Facebook accounts and apps. Development: We have created a application that acquires the users Friends, Subscribers,...

0
Q: Adding the jomsocial toolbar to a module in joomla 3.0

FlippinmonkI need your help. Is it possible to add the jomsocial toolbar to a module in joomla 3.0 programmatically? In the past (Joomla 1.5 / 2.5) a few different methods worked but I guess upgrades changes this. I have searched high and low and tried every method I know. Thanks in advance! This is my cod...

0
Q: Create a proxy with php that supports cookies, css, javascript to store data

FarzanI'm trying to get all the code sent from a web server and parse the data received for some analysis. Since the site doesn't have any API's for this data nor can you save the data, the only way I can think of is connecting through a proxy code and saving all the received code. A simple approach wo...

0
Q: Custom Wordpress Admin PHP

GO3DExpansionI am trying to load images from a specific directory to load into the admin settings page for my current theme. <?php $dirname = "panos/"; $images = glob($dirname."*.jpg"); foreach($images as $image) { $imageNameLong = substr($image, -14); $imageName = substr($imageNameLong,0 , -4); echo ' <im...

0
Q: Sending multiple arrays with jQuery .post()

TylerI have looked and can't quite come up with an answer to this question. I currently have an array which I call dataArray. The dataArray contains 2 keys (name, value) and is set up like this: dataArray.push({name : file.name, value : this.result}); I am passing this array to my PHP file using the ...

0
Q: Use DataTable to show 50 rows from Database with ability to search entire database

MichaelI have a table in my database to keep track of specifications: | specs | id spec_name url common_spec notes In this table are about 8,000 specs. There are about 100 of these specs that I use often while the rest I need on hand in case the need to use them arrives. I use DataTables to show the...

0
Q: get id of affected row in codeignitor after an update

Sami RalakHow do i get the id of the affected row after doing an update in CodeIgnitor? NOTE: $this->db->insert_id() which gets the last insert id returns 0 after an doing an update like so $this->db->update(_table_name). Doing $this->db->affected_rows() will return x number of affected rows so my questi...

0
Q: PHP ComboBox display selected value on other page

TiagoI want to show the selected value from a combobox that is on one page, and then show it on other page, and it worked with this code: Code on page1: <form action = 'enviar.php' method = "POST"> <select required id = "cmbAno" name = "Make"> <option value="ano_1"> 1º </option> <option value="ano_2"

1
Q: Invalid query, syntax to use near 'INET_ATON ('IP')'

user1526124I'm getting this error: Invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INET_ATON('188.92.x.x')' at line 1 While trying to insert IP Address in database. The column type is: 'LastIP...

0
Q: JSON API with Vocalocity

Brian LoganI am attempting to connect to this API with jQuery, (Documentation here: http://support.vocalocity.com/wp-content/uploads/2012/10/API-Guide1.pdf) and I am having trouble with the connections. What I am trying is I $.get('https://my.vocalocity.com/appserver/rest/user/null?htmlLogin=username&htm...

1
Q: Pass filenames by to my javascript files

gumbleI need to pass by a filename and location (send_message.php) from my wordpress plugin to a javascript file, so that I can use send_message.php with ajax in my js. Now first thing I thought is to just echo the name in a hidden div or set it as an attribute of some tag and then readout that value ...

0
Q: how to preg_replace Ckeditor added multiple <br /> s

ytsejamI am using CKeditor with KCfinder. When adding blog posts; when I want to add a photo I create a 2 rows table. At the top part , I upload a photo and at the bottom part I write a caption. The problem is that when I publish the post , I realize many line breaks are added to my post. When I chec...

0
Q: Exception in thread "main" how to solve java.lang.ArrayIndexOutOfBoundsException: 0

user29578211.i am new to java so im a noob but im trying to make this chat server and client the server so far will run but the client wont and returns the error in the title please help and try and keep it noob friendly :) import java.net.*; import java.io.*; import java.awt.*; @SuppressWarnings("serial"...

0
Q: Issue with strpos in PHP

doonotI have a string that contains the paid modules of a user. If the module is not part of the string, an error page should be shown. The variable $paidModules contains reminder newsfeed system finance This is the PHP part where I check if the user paid for the module. If that is not the case, the ...

0
Q: Parse string as a PHP array

SalimI have following string <DReport> <message id="1023012301" sdate="2005/7/19 22:0:0" ddate="2005/7/19 22:0:0" status="N" /> </DReport> How to parse this string as a PHP array $report = array( "id"=>"1023012301", "sdate"=>"2005/7/19 22:0:0", "d...

0
Q: Yiiframework Ajax get for each item

York KeijzerIn an application I am working on, users can construct different items. Each item takes a couple of minutes to construct. (see Dynamically update progressbar yiiframework) I use ajax to dynamically increase the percentage of the progress bar with the following code(I'm completely new to ajax an...

0
Q: string comparison not working in php

Rahi M.I have a form where in a field m_id will be retrieved from DB and consecutive date will be taken as input. I have written m_id as the array key of the loan_date[] array. The form is as follows- <form action="includes/confirmloanprocess.php" method="post"> <table> <tr><td width="90">Motel ID<...

-2
Q: how to display all tables name from mysql database using php?

user2957799how to display all tables name from mysql database using php? I am using this syntax.. can anybody guide me where i m wrong.. thanks in advance <?php $db = mysqli_connect('localhost','root','','realestate'); // Check connection if (mysqli_connect_errno($db)) { echo "Failed to connect t...

2
Q: php library providing utf-8 file functions on windows?

Zack MorrisI'm working on a project that does a substantial amount of pathname manipulation. It runs fine on Mac OS X but to my astonishment, there's no way to call functions like realpath with utf-8 encoded strings on Windows. This is because setlocale on Windows doesn't support utf-8: PHP: setlocale in...

-1
Q: Is There an easy way to update a table and columns where the response array has the table name and column names in it?

Randy SmithI have a script that returns an Array from a api at a gaming website. It returns: Array ( [generalStats] => Array ( [pid] => 588754 [kills] => 500 [deaths] => 591 [kd] => 0.85 [points] => 515638 [playtime] => 80599 [dogtags] => 19 ...

0
Q: nginx w php-fpm is serving up select php files as code

ppostma1this is my nginx config: server { listen 80; listen 443 default ssl; # ssl on; # turns on port 80 too ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem; ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key; ## Domain is here twice so server_name_in_redirect will favo...

0
Q: PHP: Pick a limited amount of objects from an array of objects (based on properties)

estrarI need to pick 3 of the latest (10) entries from $data["entries"] and send those to the entries controller of the widgets module. I have no idea how to manage this in the most performant way. Here's some code from the controller that calls the module: $data["entries"] = Model_Entry::find('all'...

-3
Q: How can I use php to write to a text file on form submit?

user2957574I have a website that must be able to record when a form is submitted, I need to be able to access these records without them being public knowledge. This must also not record the actual data submitted, only the number of times the form has been submitted. How could I do this?

-1
Q: PHP Mac OSX not working

user1879242I need to make some homework related to PHP. I did it before on a PC but now I have a Mac I want to do it there as well. I uncommented 'LoadModule php5_module libexec/apache2/libphp5.so' And after that I restarted Apache, but still not working. What do I need to do? Thanks.

0
Q: PhpStorm MySql Double Quotes Literal interpreted as Column Name

user2957875I am newbie to PhpStorm. I have a mysql-query: $query = 'SELECT COUNT(*) FROM `FLAP_Messages` WHERE `placeId` = ? AND `type` = "orgwall" AND `Status` = ?'; And PhpStorm give me a warning - unable to resolve column "orgwall". If I change double quotes to single quotes warning disappear. How ...

0
Q: In symfony, what is a bag?

chrisjleeI've found a decent answer regarding what is a bag in the context of java: What is meant by the term "bag"? In symfony, is the term bag meant to be interpreted as the same way? Also, how is this different from a "container" or "collection".

-2
Q: The with insert in PHP

kilos$m = clearData($_POST['msg']); $sql = "INSERT INTO messages(message,message_from) VALUES('$m','$_SESSION['id']')"; I get an error on insert and I not found: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING

-2
Q: Fatal error: Class 'TPL' not found in C:\xampp\htdocs\index.php on line 4

user2928643it's me again, so last time i had this question related to my index.php... I couldn't fix it so i started ALL OVER again... but now i have a new problem.... This is my error: Fatal error: Class 'TPL' not found in C:\xampp\htdocs\index.php on line 4 Here is my index.php <?php require ('in...

-1
Q: php delete uploaded file and information from mysql table

user2957822I created with help of few tutorials simple php mysql file upload form. Here is my index.php code where the files are listed from DB. I desperately need to code some DELETE button here (delete.php), which will delete the file from directory and file information trom DB table. Any help ???? <?php...

0
Q: Is it possible to debug a remote server locally with multiple computers on the same IP Address

ej_dutchSo the short of it is this: We have a remote server with php that we need to debug locally. However, we have multiple developers running on the same IP Address. So even if the xdebug session hits the ip address specified by xdebug.remote_host, it doesn't know which machine it needs to connect t...

0
Q: Extra dropdowns or pop up form when sending mail in Gmail webapp?

user2957775How do you add a button/whatever in a compose message window in GMail so that on the click, it brings you to a popup form that queries data from a external MySQL DB, user selects criteria, hits send, and PHP on our side slices/dices the data and inserts it into our DB. Alternatively, is there a ...

0
Q: media server how to start

JohnI am thinking about creating a media server for my home. Where do I start? Ideally I would like to run an Apache server on Ubunutu running a php app to essentially house a search interface for streaming music and videos.. ie to centralize music from all devices if desired. All I have found so ...

0
Q: Setting up a DB with unemployment statistics and countries

SebaZThis is probably a newbie question, but I have searched quite a bit, and did not find a fitting example yet. Basically, I want to translate several tables like these http://tinyurl.com/o5ssheg into a database scheme. I am planning ton create tables, such as countries year 2013 (containing ...

1
Q: How to increment the key in an Array - PHP?

DimloLet's say that I have the following array : Array ( [0] => Jonny Cash [1] => Robert Smith ) How can I increment the array key in order to get something like this: Array ( [1] => Jonny Cash [2] => Robert Smith ) Thanks in advance!

1
Q: Best way to search this type of database structure?

user1796225This is an example of my database structure, I would like to know the best and fastest way to create a search function. orders_users Table: id || order_id || title || first_name || last_name || email || telephone orders_details Table: id || transaction_id || date_time || status Currently I d...

0
Q: Sanitising user input in Medoo

ParadoxicalIf anyone has any experience with Medoo, do you need to sanitise user input before inserting it into a database, or does it do that for you? If the former (which I'm assuming will be the case), how do you do this? mysqli_real_escape_string() requires the first paremeter to be the MySQLi link, but...

-1
Q: PHP/HTML form getting all the data in the mail. even the not chosen data

user2956852I am searching for a solution, i build a php/html form. When data filled in it comes to mail perfect in HTML. But now i also want the NOT filled in data in my mailbox As if you make a screenshot from the FORM filled in. And get it in your mail. kind regards Paul

0
Q: ajax request $_get not working

Dester DezzodsI'm having problems sending get request in php with jquery. it just can't detect the get value here are my codes: function getopmerking($id) { document.getElementById("popup_box").style.display = "block"; $httpreq = new XMLHttpRequest(); $httpreq.onreadystate...

0
Q: Login and Submit Data into Database from Same Page

bloodstorm17Hey so I have already created a PHP page which requests and authenticates a users credentials from the previous page. I want to know how I can make it so that once the users credentials do match up to whats in the database, they then are introduced to a few text fields in which they fill out info...

0
Q: What's a good way to add a quick search functionality to a PHP based website, without using java nor google site search?

CedricI would like to add a search field to my site. The site is based on PHP and the Yii framework. The web-server assembles multiple data (from files and APIs) before serving the resulting web-page. (the web-server will get these pieces of data out of a MySQL DB sooner or later, but it's just files A...

0
Q: php code doing mysql operations produces wrong results in a cron task

user2957591I am writing code in PHP using phrets library to download MLS records. If I ran the program from command line >php -f mls-download.php it will connect to the NTREIS server and download the records into my local database without a problem. However, when I create a cron task as follows. 0,20,40 0,...

0
Q: Extract attribute values from xPath query PHP

user1801060I'm an xPath and PHP newbie. I want to extract the attribute values from a tag <a onclick="sell_this_form('24042', '195'); return false;" href="javascript:void(0);">Sell</a> I want to extract the first argument to sell_this_form ie 24042. I've built an expression that ends this way .../a/@onc...

0
Q: retrieving php session values to use as variables afterwards?

user1227914I have something here that's probably really easy but I've spent the past 30 minutes searching Google without success, so I'm hoping someone can help me with what I'm doing wrong. I have certain values stores in sessions on the server and I'm trying to retrieve them on a per-user basis to then u...

0
Q: How can I pull the order value of a sale from Magento Go?

arielI am using Mangento Go and after a sale has taken place on the confirmation page I am using a JS code that needs the value of the sale in a variable like $totalvalue. I am unable to find something in the templates to grab that value and put it into a variable. ANy ideas on how I can do this? I a...

0
Q: Codeigniter Post Value From Form 1 Changes After Submitting Form 2

karadordeI am using CodeIgniter for a school project. I have some experience with PHP but am relatively new to this framework. I am having trouble using two forms on one page. I have one form that displays a dropdown of artists. After clicking the submit button for this form, it updates the second form (...

0
Q: Becoming a useful web developer

pamaralI'm an intern web developer and, although I've been programming for a couple of years now (in my computer's engineering degree), I consider myself to be a total newbie concerning web development. In my company we use PHP with Symfony (1.4), Javascript, Git and Apache. The thing is... I feel comp...

0
Q: Zend Framework 2 - Layout variable

user2957987I am using Zend Framework 2 and am having trouble trying to set up a variable to be used in the layout file. Basically, I want to show the total number of items in a shopping cart in the navigation bar without having to load the value in all my controller actions. From the research I have done ...

-1
Q: PHP Uploading CV Issue

user2958044I'm having trouble with my uploading form. Everytime I upload a file (I used a .docx file) I get the "invalid file" error. I'm not sure what I'm doing wrong. I would appreciate if someone could help. my formProcess.php script: <html> <head> </head> <body> <?php session_start()...

0
Q: Magento product image not going to page

user2958073This is my first post, i have a problem with a magento site. when im at a catalog page, the image is giving a javascipt;(0) error, and its not going to the product page. Here a piece of code what i think is the problem. sorry for the grammar. Mark the netherlands website www.dwcprint.nl <...

0
Q: How to format hour and minute in Chinese with PHP

Samuel22I need to display a time in Chinese format with PHP. I already try to use strftime : setlocale(LC_TIME, "zh_CN"); echo strftime("%a, %Y %B %d"); It's work for date and display : 二, 2013 十一月 05 but for time : setlocale(LC_TIME, "zh_CN"); echo strftime("%H %M"); display : 14 30 But 2:30pm ...

0
Q: WordPress form trouble

user2958063Some help needed here, I'm building a one page wordpress theme and I don't really know how to make the contact form submit without loading. Basically all my code is on index.php. This is the form submission php code above the get_header(); It works just fine but I can't really make it submit wit...

0
Q: Javascript and radio buttons - Not doing anything

Chris WilsonThis one is bound to be simple (I hope) something I am overlooking. I have a set of 50 questions that are asked pulled from a table and put into a form for answering. I want to check to make sure they have all been answered (required). When the user hits submit, none of the alert boxes (even the ...

0
Q: CakePHP and Javascript: Update Time Field in View

work-flowi have the following problem: i'am working on a web application with cakephp. I have a form where i can add a student to a (teaching) lesson. I have to set the time when the lesson starts and ends. It looks something like this: Start: [09]:[00] End: [09]:[25] this [] means => input fields (dr...

0
Q: mysql_real_escape_string removing linefeeds from stored email

user2579846I collect emails from my mailserver with imap_mail (php), explode the result and save it to database after using mysql_real_escape_string. If I display it in a textarea after retrieving from db, all linefeeds are gone or replaced by \r etc. without mysql_real_escape_string they are displayed. ...

0
Q: Displaying random photos using PHP

Matt IOK so far I have the following code functioning to display random photos in my 'photos' directory: <html> <head> <title>AWESOME Random Images</title> <?php function randomimages(){ $dirname = isset($_REQUEST['dir'])? $_REQUEST['dir'] : './photos/'; $numimages = isset(...

0
Q: How to i get the count of how many arrays are multidimensional array

Ian I have multidimensional array and i cant work out how to get the count of how many arrays are inside the multidimensional array, count($array) isn't working. The array is below Array ( [data] => Array ( [0] => Array ( [type] => text ...

0
Q: Use phpseclib's Crypt_AES class to encrypt and decrypt a file at once makes the file empty

aarryySo I have a script that uses phpseclib to do the encryption and descryption with the same file at once. What I did is I read and encrypted content from a file and wrote it back to the same file. Then I read that file again to get the encrypted content and decrypted it and wrote the decrypted cont...

-1
Q: php returning string instead of json object

Maxon the server I do this: $myarray = array('message'=>'blub'); echo json_encode($myarray); After putting my ajax response in a class instead of a simple flat php script it returns this string to the javascript ajax call. "\n{\"message\":\"blub\"}" Debugging output on the php side looked lik...

0
Q: Trying create Custom template for Zen Cart

user2958136Trying create Custom template for Zen Cart. How can I create "add button" at zen cart? How can I get cart handler?

-1
Q: top 10 list issue php

ChristianIm trying to make a top 10 articles script where the best rating will be number 1. Like this titel rating titel rating titel rating titel rating I’ve searched the internet for solution and this is how far I’ve got. At the moment im getting this error: Parse error: syntax error, unexpected T...

0
Q: Sending and email from php file to my gmail

Rookie LearnerI am trying to send an email through this php file, I am using WAMP server. I couldnt find the php.ini files to edit them, I am running these .php files on my locaclhost. The following is the code, kindly have a look, The error I am getting is "Warning: mail(): SMTP server response: 550 The addr...

1
Q: PHP math gets crazy, need explanation, my brain is melting

dereiI know that playing with php float can give strange results if you try to add "goats + apples", but please take a look to the following case: $val = 1232.81; $p1 = 1217.16; $p2 = 15.65; $sum = $p1 + $p2; $dif = $val - $sum; echo $dif; It will give you -2.2737367544323E-13 ... yeah, ALMOST ...

-1
Q: How can I convert this php mcrypt_encrypt line to java (Android, to be specific)?

user2958162I currently have a line I use in a php Script return mcrypt_encrypt('rijndael-128', $key, $data, 'ecb'); How would I implement this in an Android program? What padding mechanism would I use to mimic php's? php says that the file is padded with "\0" bytes. I currently have the following: Secr...

0
Q: CakePHP migration issue

AchilleasAt my work we have a cakePHP application that was working fine, after we moved the application to other server, the application loads but dont work. Shows "Error: An Internal Error Has Occurred". In core.php/ i have Configure::write('debug', 2); Fatal Error Error: Call to a member function get...

0
Q: change ENTIRE url without redirect

Riccardo Genioburgercondoppiobi have this domain: http://www.example.com and when page is loaded a want to change/mask it in http://www.example2.com WITHOUT REDIRECT at the second URL i have tried with htacces, jquery and more other solutions. thanks

0
Q: Regular expression that gets a variable length field and outputs a field that is fixed

user2958058I need to add an ID field to a plif file that is made from the user ID section of an email address. Our email user ID is a variable length but when I output that as an ID the output must be exactly 48 characters long. The regex that finds the email user ID A(02||20)(N.*)( [^ ]*)(\@[a-zA_Z.]*ne...

0
Q: Sql server and Zend Framework 2 connection issues on windows machine

golldyIs there a tutorial or any kinda documentation anywhere online for ZF2 integration with Sql Server. I have tried and tested the things which are already there and where some are deprecated as well. The SQLSRV is pretty painful driver to get it working, in one of the examples, i tried downloading...

0
Q: Why is this else if not getting executed?

1n9i9c7omI have the following code: <?php ini_set('error_reporting', E_ALL); error_reporting(E_ALL); ini_set('log_errors', TRUE); ini_set('html_errors', FALSE); ini_set('error_log', '/var/www/vhosts/*******/test/random/error.log'); ini_set('display_errors', TRUE); require "./func/dbc.php"; define("IN...

0
Q: imagecreatefromjpeg() works fine on one server and gives error on other

SimranI have a script and it uses php fucntions like imagecreatefromjpeg() I recently bought a new server and migrated all the files from old server to new. I have checked the code 100 times and it is same as it was on old server and all the files are migrated successfully but when run it gives the fo...

0
Q: php $_POST not sending full value

FoxWizzyupdate.php $q = mysql_query("SELECT id FROM performer WHERE username='$user' LIMIT 1") or die("Error : " . mysql_error()); $r = mysql_fetch_assoc($q); $id = $r['id']; $query = mysql_query("SELECT baned_c, baned_c2, baned_c3 FROM performer_s WHERE id='$id' LIMIT 1"); $result = mysql_fetch_assoc(...

0
Q: wordpress include local root php file

webmaster alex lI have a child theme functions.php that I am trying to have include a few local domain files , through the use of short codes, that live outside of the Wordpress file structure. I cant seem to find whats going wrong. Anyone have any pointers? child theme functions.php <?php // localhost path d...

0
Q: Display category name from a table

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

 
10:17 PM
-1
Q: Porting PHP code to Delphi code [need help]

user2958247i need help to porting PHP code to Delphi code. Thx = 1){ $loginonline = "";} else{ $loginonline = "";} $fp = @fsockopen($servergame, $portgame, $errno, $errstr, 1); if($fp >= 1){ $gameonline = "";} else{ $gameonline = ""; } ?> Login server: Game setver:

0
Q: $_POST does not working

Alan MulliganI have a html form that amens 4 fields which are populated from a database. I have my sql update statement inside an if statement but the but I am never getting into the if statement. I have been looking at this code now for ages and can not see my mistake. <form action="" method...

0
Q: PHP upload transparent images gives black background

KimI've been looking around for a solution to fix, transparent images that are turning black in the background after upload. What can I do to fix this? Thankful for any help! PHP: if($_GET['img']) { include('resize-class.php'); $valid_formats = array("jpg", "png", "gif", "bmp", "jpeg"); ...

0
Q: Easy way to create invoices with PHP and TCPDF

RoyWI'm busy programming something in PHP with an invoice function. In the administration panel employees can see all the details of the customers and there it's also possible to click and create invoices, reminders etc. in PDF format. For that I am using TCPDF and their examples on http://www.tcpdf....

0
Q: Checking MySql table for an entry and either UPDATE or INSERT with PHP

user2762390I am pulling data from the Crunchbase API and adding into a database. I am not sure what the best unique identifier is for both companies, people, or other, but I am thinking the permalink would work as an id. My question is how do I check if an entry has been added, if it has, then update/repl...

0
Q: HTML Form + PHP Issues

user2958205I have looked everywhere and searched high and low. I have seen many issues with the PHP code I'm about to post, but nothing pertaining to my specific issue I am seeing. Here is my issue - The two lines ($values/$required) where I have 'name','email',subject','message' I would like to add 'tel'...

0
Q: How to update codeigniter shopping cart using ajax?

Leonard DrapezaI want to update the quantity of a shopping cart when the item is already in the cart and add it when it is not(added in the cart). I'm confused on how to solve the twist of this problem. I've google a lot of the same problem but there is no same exact problem/solution for this. Here is the cod...

-1
Q: Adding a Delet button to an EDIT.PHP page

user2958236I'm kinda of new to .PHP and I would like to add a delete record function(Delete button) to an existing EDIT data page. Here is the codes from the edit.php page <?php require_once("database.php"); $con = mysql_connect($config["db_server"],$config["db_user"],$config["db_pass"]); mysq...

0
Q: Using Poedit to parse Twig templates in a Zend Framework 2 application

SaevenI've downloaded Poedit, and am attempting to parse my Twig templates. A few tutorials online pointed to https://github.com/umpirsky/Twig-Gettext-Extractor which I later found was referenced in a tutorial here http://aromatix.fr/?p=611 (French) with full instructions. I got the tutorial done, i...

0
Q: In Wordpress, how can I change the destinations of my links dependent on what page user is on?

GivenyI have the problem that I am using a theme where the navigation is simply 'scrolling' to a given part (eg. #contact) when pressed. However, I have implemented some seperate subpages that exits this scrollable page and thus renders the navigation ineffective. My question is, how can I change the ...

-1
Q: PHP strtotime using m-d-Y format

bagofmilkI have my dates in format (m-d-Y) month-day-Year. I'm trying to subtract dates. I can't use strtotime() because it won't work in that format. How can I subtract dates with m-d-Y format? <?php date_default_timezone_set('America/Chicago'); $olddate = "11-04-2013"; $today = date("m-d-Y"); ...

0
Q: PHP Resize Script not working on new server/domain

GO3DExpansionI had the resize.php script working on my previous server/domain and when you go to it HERE you can see the division by zero error. BUT! if you go to the same script on the new domain/server HEREits a blank page with no errors which leads me to believe something is not happening like it should be...

0
Q: PHP - Upload images to FTP directory and then Display images uploaded only from directory - 2

Don MisquittaWhile trying to upload image and display it, i'm getting the 'Failed moving the uploaded file'. Don't know where I'm going wrong.. Here's my image.php: <form enctype="multipart/form-data" action="upload.php" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="100000" /> Choose a fil...

0
Q: unexpected T_ELSE, ENDIF

Seth ForzaCan anyone tell me what is wrong with this code? <?php if($this->session->userdata('login_user_id'));?> <?php $a = $this->session->userdata('login_user_id');?> <?php $data = mysql_query("SELECT * FROM user WHERE id='$a' AND specialrank='0'") or die(mysql_error());while($info = mysql_fetch_arra...

0
Q: LinkedIn PeopleSearch using list of names

user2687915I want to search for multiple people using the LinkedIn PeopleSearch APi. I have a CSV file with first names and last names that get uploaded ( I use php, for that). Then I pass the array of first names and last names ($data) to javascript. I am able to fetch the first names and last names in jav...

0
Q: Apache user permission

thomasandersenI have an Apache server installed which exposes a website written in PHP that I have been working on. One of the functions of the website is to insert new data into a MySQL database. When data is to be inserted the user presses a link which in turn calls a PHP script which contains a line like th...

0
Q: post querystring to mysql via php as opposed to plaing the link in address bar

user2835653i am trying to create a link in php, and submit that link, so that it will post the data contained therein to my mysql DB. if i paste this link into my address bar, and press enter, i will be able to add a record to the DB, no matter from what website or browser: http://mysite.com/data.php?firs...

0
Q: Xampp Zend_Mail_Protocol_Exception: Unable to find the socket transport "ssl" - library\Zend\Mail\Protocol\Abstract.php:277

user2697955I have been trying for the best part of an hour for us to enable SSL for our emails to be sent through google, but when ever i test it , I get this error http://pastebin.com/wRPmPkKj (It says generated 19 mins ago but I assure you I have been trying a lot harder.) We are using Xampp and google...

0
Q: Query not working, it is not deleting the values from the database

user2958298I have a drupal website where added a function that will allow the user to delete his account. I tested it and when i click on the button, nothing happens. I echoed out the values $u['meme'] and $u['id'] and they return the right thing which is not processed by the function. Why my query is not...

 
10:58 PM
0
Q: Parsing JSON Data with nested foreach() fails

Brett PowellWhen attempting to import a large JSON string of data into our MySQL Database, I have encountered an issue when nesting foreach loops. The following code works fine... $json = json_decode($jsondata, false); foreach ($json as $item) { $asset_type = "RAM"; foreach ($item -> assets -> $ass...

0
Q: Hit PHP from node server to process images

posit labsI'm trying to hit a php page from a node server so that it will generate some thumbnail images. The problem is that it isn't generating the images when i hit do a jquery.get request from node. It works perfectly if I hit the page from a browser, though. Here is the php code: <?php $thumbsFolde...

0
Q: How to grab data (titles, thumbnails and custom field) from multiple posts in a specific category to populate a map?

Jim CreedBasically, I have like 15K posts which I use them for directory purposes. I currently use a map plugin called '5 sec gmap' to show their locations in single posts. I customized that plugin to pull the posts' physical address from a custom-field called $wpcf-address to show. But, I want create a ...

0
Q: Loop only once on post excerpt

codekI'm displaying an excerpt that is pulled from an advanced custom field in wordpress. The problem I have is that the code generates a lot of spans if the post have different paragraph. How can I control to just generate one span? Just show the first one I mean. This is my code: <?php while...

0
Q: Magento Fatal Error when editing customer accounts

user2958356I have Magento 1.7.0.2 and when I try to edit a customer account in the admin panel i get this error: Fatal error: Call to a member function setRenderer() on a non-object in /home/techspec/public_html/magento/includes/src/Mage_Adminhtml_Block_Customer_Edit_Tab_Account.php on line 77 $attributes...

0
Q: View PDF in browser rather than download

Kieran McClungThere are meetings on this website and each meeting has a PDF attached showing the meeting minutes. The next meeting that takes place dynamically collects this attached PDF and allows for a download as the previous minutes. This is all working perfectly, however, when clicking the link for the pr...

0
Q: How can I download the xml file created by this php code?

Jon JamesMy php code is below, the source code that this produces gives me the data i want to save as an xml file. How could i do this? ini_set ("display_errors", "1"); error_reporting(E_ALL); session_start(); include_once('function.php'); $select_query = build_select_query("xml","cust_id",$_SESSION['cu...

0
Q: Php Private Message System

user2958351Hello my name is spyros im developing a social site with php ,html i have some problems with it . I stuck at the idea of creating private messages system , i managed to created but the problem is that i wanted to be created in a modal window like facebook .On my user.php like facebook i got some ...

0
Q: Manipulate content in a single tag

user2958354I am relatively new to programming and I have embarked on a quest to create a website that will eventually boost my career. To describe the website in a few words - I am a financial consultant and I want to create a place online where I can provide some basic information about personal finance in...

0
Q: I cant access wordpress CMS after I installed a plugin

atrikI installed a plugin in my wordpress site, and after I installed that every time I try to access the CMS it redirects me to http://mysite.com/wp-admin/install.php How can I solve this, thanks.

0
Q: XAMPP v1.8.2 VHOST 403 error

Josh C.i recently updated my xampp and now i can not host my vhosts. I have already updated my hosts file and everything i just dont know why im getting a 403 error or how to fix it. Here is my code NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot C:\vhosts\basinmedia ServerName basinmedi...

0
Q: rows added via javascript to table inside form don't submit

user2157370Hy, I have read many discussion on this argument but I just can't find a solution. I have table inside a form, the first rows of this table are displayed by a php script, I won't the user to be able to add a row to the table so that he can insert a new set of values. the problem is that this new...

0
Q: Echo variable from phpmailer in template

anvdHow can i pass a variable from phpmailer to contents.php (template file) ? I need to pass the $email variable. $mail -> msgHTML(file_get_contents('contents.php'), dirname(__FILE__)); contents.php <div> This email was sent by x. <a href="www.x.com/process_contact.php?email="<?php echo $ema...

0
Q: Shortcode with open and close tag doesn't works

GabrieleI tryed to use a shortcode that has an open and a close tag, but it doesn't works. This is my code: <?php if (is_category(4)) { echo do_shortcode('[access role="administrator, my-role"]Only admin and my role members'); } else { echo 'pass'; echo do_shortcode('[/access]')...

0
Q: Converting string to time in PHP

AdelphiaI am having some trouble trying to convert string to time. My Code is: $time = strtotime("14 November, 2013 2:30 AM"); echo $time ."<br />"; echo date("m/d/Y", $time); I know that strtotime is not magic, and I checked out the acceptable date/time formats but I am not sure how to convert the s...

0
Q: How to encode this XML values into a PHP literal?

AubinIn the context of a WS developpment, I use the following schema: <xs:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Apporteurs"> <xs:complexType name="namedValue_t"> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="name" type="xs:st...

0
Q: Is there a 'take notes' plugin for wordpress?

JakeMy question is exactly the same as this, not sure if it can be bumped so thought I'd post again. Basically I'm trying to create a scenario similar to how comments work. On a page, a registered user can submit a comment, except, only they can see it, no one else. These comments would be called no...

0
Q: HTML/CSS: Could this be achieved with a list or table?

John RobinsonI am trying to make a list of hyperlinked images, one for each color in a catalog. I want the layout to look like this: Only, I will probably only do 5 or 6 wide by however many tall. The images to be added will be generated from the result of a MySQL query, so it won't be static. It's easy en...

0
Q: mod-xsendfile 404 caused by SELinux

Ryan SOk. Wanted to share this - took me 10 hours to figure out. I had properly installed mod-xsendfile, following the good instructions here. I also configured xsendfile correctly in my /etc/httpd/conf/httpd.conf file, adding the settings: XSendFile on XSendFilePath /var/files_need_valid_s...

0
Q: Check Zend Registry variable inside htaccess?

Ronak ModiI want write redirect rule on the base of value inside Zend_Registry variable from htacces.. Something like this if(Zend_Registry::get('country') == 'uk'){ RewriteRule (.+).html /abc/page/directory/abc/view/$1 [L] }elseif(Zend_Registry::get('country') == 'ca'){ RewriteRule (.+).htm...

0
Q: Permission denied error in php when try to write in a txt file

DorukoI'm trying to write in a txt file the data i get from a html form, but I get this error: Warning: fopen(/var/www/4/datos.txt): failed to open stream: Permission denied in /var/www/4/ComprobacionFormulario.php on line 13 Warning: fwrite() expects parameter 1 to be resource, boolean given in /var/w...

0
Q: Issues with composer.phar with nss and api.github.com

tedbI am attempting to use composer.phar on a server with RHEL6. Installation details: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 PHP 5.4.16 Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies My composer.json looks like this: {...

0
Q: PHP use canvas (html5) to copy and upload the copied picture to server

user2909037Is it possible for html5 canvas to be used has a very strong way to upload jpg, gif and png (converted to jpg) files to a server ? Normally we would do something like this http://hungred.com/useful-information/secure-file-upload-check-list-php/ and some other measures to prevent any code in and i...

0
Q: How to get width of a Div or table in Pixels?

Fernando BaltazarThe main reason of this question is because I need the Width of a DIV element which holds an image, but the resize script (timtumb) only accepts pixel size and not % (will be great). for example : timthumb.php?src=castle1.jpg&h=230&w=640 If I set the width 640 I will have the image size to be ...

0
Q: Imgaecreatefromjpeg not working when placed inside IF satement

Jben Kayei have a code that generates an image using imagecreatefromjpeg. it's working well, not until i decide to place it inside an if statement. my purspoe of doing that is to check whether a file is uploaded of not. if not, i will just use an image from the server. here is my code. please feel free to...

0
Q: PHP - Find the number of zeros in a decimal number

gtilflmLet's say we have 0.00045. I want to find a way to count the number of "significant" zeros after the decimal point (3 in this case). I've been trying to implement strpos or substr, but I'm getting stuck. Other exs.... 3.006405: Should return "2" 0.0000062: Should return "5" 9.0100000008: Shou...

0
Q: Xpath expression to get unknown element names with SimpleXMLElement

user1472549Iam trying to write an xpath expression to get element names from an xml based on some criterias. The thing iam after is to get a list of the element name of each element that has the child node "fields/enable". I don't know what the name of the elements is, i dont have any attribut to trigger b...

0
Q: How to insert text into a text file using php website

ldigginsI'm sure it's an easy solution, and i'm not great with the correct terms. Basically i have a form already using sql server. It submits great. I want to add another field then when someone types in whatever it adds it to the next line in a txt file. Is this possible? Thanks in advance!

0
Q: how to post from flash abject action script to wordpress

user2958418I am trying to post(upload) an image file to Wordpress from within a flash object embedded inside one of the pages of Wordpress. I get a fatal error like this: Fatal error: Call to undefined function wp_insert_post() in /home/content/94/11856294/html/wp-content/themes/notoriouswordpress/test.ph...

0
Q: Global Languages in MySQL with PHP

monamonaWe started website in intention that we only use English Language and do all insertion/deletion to MySQL using English. And use PHP to escape string while writing to DB. Now the situation is our website have lot of Chinese/German/Russia Users. and we are facing problem writing data into MySQL - ...

0
Q: Take the data from a mysql SELECT query and drag the individual records to a droppable area.

user2710772html goes here jquery library's go here stylesheet here draggable function goes here etc. all this works, and it actually works the way it should but I am looking fora different result. $result = mysqli_query($con, "SELECT * FROM employees"); echo "<table border='1'> <tr> <th>Fi...

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

« first day (259 days earlier)      last day (51 days later) »