« first day (290 days earlier)      last day (20 days later) » 

12:00 AM
1
Q: Get variable from file, from another URL

Cornex HayI want to use something like include(http://example.com/test.php); , but since url include seems to not be possible on some hosting service because it is to unsafe. How can i bypass this? I need to get variables from (in this case) test.php.. Any help would be great . Thanks

0
Q: Highcharts JSON, chart not displaying

Khalid HussainI have some data I wish to display on a chart but it just shows the title and no points get drawn. The JSON data I receive is correct as per my knowledge, I think it's somewhere in the chart function but I can't really point it out. This is what I have so far: data.php (the output): {"name":"Te...

0
Q: add search ajax ability to this html form

user2658779I am stuck trying to add some ajax search ability to this php form. The form is already working but since I have many outputs, I want users to be able to search and select a profile from there. I tried jquery tablesorter and although it works, it's not quite what I was looking for. Hope someone ...

-1
Q: how to read data from USB port with php and wamp server and save them?

osyanI'm new to php and i want to read some live data from USB port using wamp server on my local machine and php and then store them in some text file each 5 minutes and also save them in database. Is this possible and how should i begin? help me if you can and please add some php code to your answer!

0
Q: Codeignitor an migration not working with wamp

Artful_dodgerI am following a tutorial and I have check the source code with my code to make sure there are no errors but I am unable to get codeigniter to create update or retrieve any records from my wamp sever(ver 2.4) when I enter public_html/admin/migration in the task bar codeigniter returns a message s...

0
Q: Developer Account Disabled After New App Launch

cdbconceptsI know this isn't the most technical question- but this is a really odd dilemma I'm having. We've created dozens fangated Page Tab/Mobile Facebook apps over the last 2 years with no issues. Launched a new app at midnight of last night (right after the press release of 2 million gmail/facebook a...

-2
Q: Get HTML element with PHP

Rolando Payán MosquedaI have the following HTML code in the example.html file: <table> <tbody> <tr> <td class="article-name"> <span title="Et magnis sed odio lundium sed">magnis sed</span> </td> <td class="article-link"> <a href="/node/01">Vut et proin ultrices in nunc</a> </td>...

0
Q: How to make a simple diary posting site with html/php

craft3makerI am trying to make a simple diary website where I enter in my text into the text area i then push submit and it will display on my current screen. I then want to be able to enter more text into my text area and when i push submit it just shows it to me on a new line. When I submit the 3 string...

0
Q: Call to a member function query() on a non-object Already Looked At Similar Questions

user3010455I have searched through the various topics with the same error but none seem to have been the same as mine. Anyways, here is my code! I am in class right now, teacher has the exact same code and we looked it over, and his works mine doesn't. A few people have it working. Can anyone see what I...

0
Q: Multiple rows with forms to save in CakePHP

NorthMcCormickI am currently working on a bidding system, and I'm stuck on saving the winning bid numbers and amounts. This is cakePHP 2.4 by the way. When I go to submit a bid after editing the values it will (depending on the solutions) create a new record with no information, or just refresh and do nothing....

0
Q: alert() in $.get Ajax not Working in IE

user3072379Hey I am facing a wired prob regarding alert() in IE I am using Jquery Ajax $.get to get data .... here is the code...... <script type="text/javascript"> $(document).ready(function(){ $("#save").click(function(){ vars = "pg=13&"; ...

0
Q: facebook metatag images seleted code

user3070558I need the facebook metatag images selected by the photo user upload to the site example url link example link: http://mbay.my/Oc-PlotWave-300-Large-Format-Printer-321021.html the facebook metatag i need to select the images user upload user upload image : http://mbay.my/uplimg/img_A_334...

0
Q: How to use call_user_func_array for optional parameters

kushan85Class Base { function processAction($methodName, $params) { call_user_func_array(array($this,$methodName), $params); } } class Child1 extends Base { function getData($param1, $param2, $timestamp) {} } class Child2 extends Base { function getInfo($param1) {} } I will be calling in...

0
Q: Fatal error on buddypress/ buddypress portfolio and bounce theme

user3072510Please I need someone to help me out. I installed wordpress and buddypress. I'm using a theme called Bounce. I need my members to be able to upload projects in form of a portfolio so I installed a plugin called buddypress portfolio. Every thing works fine until I hit the "add" button which is sup...

0
Q: Live Dynamic search of MySQL table using jquery and php

user3068129I am sure there are a number of articles covering this topic, but every piece of code I try just doesn't seem to work. If this has been answered somewhere else already, I am sorry that I could not find it. I am trying to create a live search that displays all data in my table until someone st...

0
Q: Use php money format and remove the numbers after the decimal place for GBP

Ben PatonI want to format some numbers from my analytics into currency using the GB money format but as its for a dashboard and doesn't need to be that precise so I want to remove the pence (numbers after the decimal place) and round it which helps with the css layout, how do I do this? Rounding up or dow...

0
Q: PHP Curl download returns zero byte file

Naveen GamageI'm trying to download a file from a remote location. I use PHP curl to accomplish this but the code always returns zero byte file (even ECHO returns nothing) and when I visit the URL on my browser it prompt to download the file. why the code won't download the file using curl? If it is headers...

0
Q: Streaming PHP file always get cut

user2880076I tried to stream an audio file using this PHP code, but always get cut around 3/4 of the file size, especially for iPad and Android agents. ob_clean(); flush(); set_time_limit(0); $size = intval(sprintf("%u", filesize($filename))); $chunksize = 0.5 * (1024 * 1024); if ($size > $chunksize) { ...

0
Q: Display .jpeg files from MySQL gathered with PHP form

mxmxwoCurrently I am working on an html/php page that will display a random image and piece of text taken from a table with two VARCHAR(200) fields. The issue is that the script will not display files with a .jpeg extension. However, it will display .png,.gif,.jpg extensions. This is the HTML/PHP co...

0
Q: Getting div by class with PHP DOM

user2943677The problem is retrieving and displaying the div contents. Catch is, it's with a multiclass: <li class="activity user-generated" id="activity:153411947-kIq0nOFam0hE68sL6P298_DIo4s-1386284074745"> I probably could've worked with it easier if the ID doesn't automatically generate for each new st...

0
Q: SQL Database setup issues

Andy OlleI'm trying to setup a database for a simple shopping cart app. I have a create.php file that should establish the tables. I'm getting new syntax errors everytime I fix one and I don't know why. Here is my code: <?php require_once 'conn.php'; $sql = <<<EOS CREATE TABLE IF NOT EXISTS products ( ...

-2
Q: MVC to add content to database

katyreaI am very new to all of this and I need help on two things: build a model to create new data for each of my tables in my database build the form to add content. I have my database all set up and don't really know where to begin with this. Does anyone have any examples of this?

0
Q: Array to cycle through If statments then compare terms to remove duplicates?

Matthew O'DonnellSo i put a question similar to this earlier. Got the foundations working, removed question, and now completely broke it... I am trying to get a array to be based on a if term = 7pegi, then use 3pegi + 7pegi as age ratings. <?php $mergedterms = array_unique(array_merge($age_terms, $game_terms, $...

0
Q: How to grab favicons and load them on my site from sites i am linking to?

user2833068Lets say I have 5 links on my site. (these 5 links are not like normal links on my site.) These 5 links are in list format. 1 on top of the other like so: Link 1 Link 2 Link 3 Link 4 Link 5 The goal here is when a visitor loads my page all the favicons for all the links on my site will appear ...

0
Q: How Disable href

papao surnameI want to disable the <a class="fancybox" href="addrfq.php?pn=' . $row["counter"] . '"></a> if the the quantity in purchase_order reach the total_quantity in purchase_request. I have two table, the Purchase_request and Purchase_order. When quantity reach it maximum quantity disabled the HREF. How...

0
Q: ANDROID Updating a ListView via JSON with AsyncTask MySQL

PoutiImmersed in the development of my program, I encounter an error that seems to me not really speaking. So here's my logcat in the order and the java code: When I click on the item in my listview it should return me the contact information for the update. enter code here public class MajConta...

0
Q: Symfony2 URL matcher throwing ResourceNotFoundError when matching controller during translate function

user1786927I've got an error that is only happening on production. I have a form that uses radio buttons to change the language translation of my application. When the user selects "en", the application changes to English, etc. On production, toggling the radio button throws an error: Uncaught PHP Except...

0
Q: Qtip2 / Isotope Conflict in WordPress: "Uncaught TypeError: Cannot call method 'call' of undefined"

Brian JohnsonI'm having what appears to be a hard conflict between Jquery Isotope and Qtip2. When Isotope is loaded, qtip doesn't work, and when it SHOULD be activating, I get the JS error in my Chrome console: "Uncaught TypeError: Cannot call method 'call' of undefined" avia.js?ver=1:1326 Avia.js is a lar...

0
Q: php register user type

user3072578Hi i try to make a 2 register form. First register form for normal user and second register page is for business user. I am using one mysql table for users. this table for same like normaluser and business user. This is user type module. Normal user type is 0 it is ok but when the registered ...

0
Q: Some values are not showing up in phpMyAdmin mySQL database

MesserschmittI'm using phpMyAdmin to store a database. The problem is when I make the insert query only 3 fields are fullfilled and 2 of them are ignored. Yes, I have read other answer but no luck so far. If I add customers manually the name and surname shows up there. I deleted those I've inserted manual...

-1
Q: Week Calendar in CakePHP

user3072560How can it be, that my Jquery Week Calendar will work without inserting the files into CakePHP framwork. And wont work within the CakePHP Frameworks ? What i did to make it view within CakePHP app/Controller/AgendaController.php <?php class AgendaController extends AppController { publ...

0
Q: Order PHP Gallery by Filename

user3072562My PHP is a bit shaky, I've tried a natsort and scandir, but maybe I havn't been using them right, anyway, I need this PHP script to show the images in order - any help would be greatly appareciated. Thanks in advance! /** settings **/ $images_dir = 'preload-images-hair/'; $thumbs_dir = 'preload...

0
Q: Getting Warning when tying to put two "add_filter" codes together not sure what it means

memyy Warning: array_unshift() [function.array-unshift]: The first argument should be an array in /public_html/blank.com/main/wp-content/themes/gbs-prime-child-theme-master/functions-parent-override.php on line 61 <?php add_filter( 'gb_deal_submission_fields', 'new_filter_deal_submission_fi...

0
Q: Get_browser returns strange values even with updated browscap.ini defined in php.ini

HeyItsProdigyHere are the things that i have already taken care of: Downloaded updated copy of php_browscap.ini from http://tempdownloads.browserscap.com/ (used the 'use only with PHP' version ofcourse) tried php_browscap.ini,lite_php_browscap.ini and full_php_browscap.ini 3. edited the php.ini file to: [br...

0
Q: SQL SELECT rows from one table using an array taken from another table

user3009442I need to do something like this: $user_id = (int) get_logged_in_userud(); **$thread_ids** = $wpdb->query( "SELECT thread_id FROM $tableName1 WHERE user_id = %s), $user_id); $iterateRows = $wpdb->query( "SELECT thread_id FROM $tableName2 WHERE thread_id IN $s), **$thread_ids**); I tried to g...

0
Q: Array to string conversion error while outputting single variable

meksI have a funny error while I'm trying to output a single variable assigned from database. I'm querring a top id from database and assigning it to a variable. Here: $ID_Query = "SELECT DISTINCT MAX(pict_id) FROM picts;"; $temprID = mysql_query( $ID_Query, $Connection ) or die("ERROR: ".mysql...

0
Q: How to find object tag with param, and embed tag inside HTML using simple html DOM php

VincentI found it really hard for me to understand the simple html dom of php. Even if I read the instruction on how to do it. As for me, I'm just new in programming industry. As I've been searching on how to find the object tag and embed, I can't find the right answer. So in here , I will post my probl...

0
Q: Tumblr API in PHP File structure

DaveI'm trying to use the Tumblr API (PHP) and I cant seem to get all the required files to load correctly. The Tumblr API can be found here: https://github.com/tumblr/tumblr.php First thing I found out is that it doesnt include OAuth, so after some searching I found the files on github and uploade...

0
Q: I want to return data form a table depending on whats in another table?

Trevor KeatingI have a table passenger_table and a table users! passenger_table user_id j_id 1 1 34 1 54 1 users user_id Firstname Lastname 1 Patrick Connell 34 John Murphy 54 Connell Jones I know this might be straight forward enough b...

0
Q: Can't AJAX request using jquery with POST

user3050963I have the following javascript code: var value = $.ajax({ type: "POST", url: "buttons.php", data: "button="+postnb, cache: false, async: false }).responseText; and php in buttons.php if(isset($_POST['button'])) { $id = mysql_real_escape_string($_POST['...

0
Q: How can I display my projid as php?

user3034706How can I display my projid as a php? Here is the code: <script type="text/javascript"> function GetQueryStringParams(sParam) { var sPageURL = window.location.search.substring(1); var sURLVariables = sPageURL.split('&'); for (var i = 0; i < sURLVariables.length; i++) { var sParamet...

 
1:49 AM
0
Q: How can I display javascript as php?

user3034706I have some code and basically I want to display it in php. Here is the code: <script> var useridisplay = GetQueryStringParams('user_id'); </script> Basically the code I want to grab to display in php is the useridisplay so I would want to do something like this code: <script> ...

0
Q: Custom Filters: Placing Blocks in Node Content

RussellI'm trying to develop a way to place a block into a node without directly placing PHP into the content of the node using Custom Filters: https://drupal.org/project/customfilter For example let's say I have a webform block. I can create a shortcode/filter '[webform1]' and insert it anywhere I wo...

0
Q: Zend Framework 2 Segment Route matching 'test' but not 'test/'

rafaameI have two modules Admin and Application. In the module application I have the following route in my module.config.php: 'admin' => array ( 'type' => 'Segment', 'options' => array ( 'route' => '/admin[/:controller[/:action]]', 'constraints' => array ( ...

0
Q: MySql using Like to find the highest value of a string

Will SamI don't think this should be all that complicated, but I'm having an issue building a query to pull the higher lower value from a table, where the identifier is higher. So basically, I have a table that contains this (among other things): 8A 6253.85 8B 6184.64 I want to find the 8B and...

0
Q: I can´t test php in nginx

user1851950Hello I have problems try nginx with php. For requirements for the course I can not use installers to use Wemp (nginx, php and mysql). Clarify that the service works correctly MySQL I just want to try this simple code hello.php <html> <head> <title>Prueba de PHP</title> </head> <body> <...

0
Q: laravel4 sending email error 'this stream does not support SSL/crypto'

FelixNow I am using wamp to develop my laravel4 project. When I sent email to the use I got a error below. After search the internet the answer is open openssl extendsion. but I also get this error. Any ideas? thanks :)

0
Q: proc_open not writing to STDIN on simple C program

OBVBelow is php script that runs program (test.exe- code at end) using proc_open. It just hangs in the browser. None of the two files are written to the directory by the test program. But if I take out the stream_get_contents line it echos the STDOUT. Any suggestions? <? test(234); function test($...

0
Q: CodeIgniter: How to put custom validation function in model instead of controller?

Honey BadgerIn CI's documentation, it says that you could create your own custom validation for use in form submission check. It shows how this can be done in a controller: http://ellislab.com/codeigniter%20/user-guide/libraries/form_validation.html But what if I want to have my custom validation function ...

0
Q: Why do I get different results from python and php when AES-256 encrypting strings?

ShaneThe idea is to AES encrypt a string and send it to my server side, and then decrypt it there to get the real string. But it didn't work and oddly I found out the result is different even when you AES-256 encrypt a string on python and php respectively. Python example: from Crypto.Cipher import...

 
2:13 AM
0
Q: How do you get Javascript to see tinyint(1) data pulled via AJAX request as boolean?

V_RocKsI am having a problem and after hours of searching for answers and playing around with it I cannot get it to work. My problem. I have a MYSQL database. When I pull my "boolean" data from the database via PHP it is just fine. PHP interprets the "strings" of 1's and 0's as True and False. However,...

0
Q: How to access sessions Info using javascript

user1686357I want to access/get all the sessions of websites running in chrome using java-script. If i open some example.com , example's java-script gets all session info of websites running on browser and email me all those info. If there is some better solution i be very thankful. Only for study purpose

0
Q: Display Results of API call in a PHP form field - Postcode & Suburb

NickI have seen this done many times but dont know how its done? When a user enters their postcode in a form field and tabs off the field, the Suburb field is then populated with a list of suburbs that match the postcode. I know that if I store the postcodes and suburbs in a database table it would b...

0
Q: Jqgrid json data with codeigniter - query in controller

BinaryrespawnI am trying to set up a jqgrid and I am having difficulty in constructing the controller that generates the json data to populate the grid. I am using codeigniter 2.0+ and I am not sure how to build the query for php in codeigniter. I followed this guid under "Loading Data -> JSON Data" for the ...

0
Q: Creating a book marking app with php and Mysql?

user3072689I am trying to make a site similar to Delicious. When you login you can add and delete links. I want to post the title and link but only the title displays. What php code do i need to display posted bookmarks? Here is the code I am using: session_start(); require_once( 'includes/connect.i...

0
Q: PHP MySql user account bypassing cookies

user3048475Right, I've been tinkering with this for a while and got it all to work except for the user account page, my question is; can anybody spot on typos I have made here or give me a little help in making it work? The website seems to bypass this part and go straight to the else (shown below): <? ...

0
Q: SEO optimization XML Generate html not php

user3070558need help for some expert here is the currently xml script i am using for SEO generate <? define ('IN_ADMIN', 1); if (!$manual_cron || IN_ADMIN == 1) { include_once ('../includes/global.php'); $parent_dir = '../'; } else { $parent_dir = ''; } ini_set('max_execution_time',0); // No more timeo...

0
Q: How to enable BCMath CentOS 6

IgloHow would I go about installing/enabling PHP bcmath module on CentOS 6? I've tried 'yum install php-bcmath' and got this error: Error: Package: php-mysql-5.3.3-26.el6.x86_64 (base) Requires: php-common(x86-64) = 5.3.3-26.el6 Removing: php-common-5.3.3-23.el6_4.x86_64 (@updates)...

-1
Q: Extending Validation Class fuelphp

user3072727http://fuelphp.com/docs/classes/validation/validation.html#rules [Extending the Validation class] Anyone know how to using this method ?

0
Q: Very slow MySql queries Joomla 2.5

michaluMy website is experiencing very slow queries like the one below. It is Joomla 2.5. # Query_time: 19.797091 Lock_time: 0.000561 Rows_sent: 12 Rows_examined: 4127 SET timestamp=1385467501; SELECT a.fulltext, a.id, a.title, a.alias, a.title_alias, a.introtext, a.state, a.catid, a.created, a.creat...

0
Q: Json Format Issue with response

SBBI am trying to work with the bootstrap typeahead plugin but I need to get my JSON to output correctly. Per the last example on this page it appears you can use more than just a key->value in the JSON response: http://twitter.github.io/typeahead.js/examples/ Here is what my php code looks like: ...

-1
Q: Is there a way to replace my $_GET["user_id"]?

Daniel OviedomoraIs there a way to replace my code? Here is the code: $_GET["user_id"] Does the $_GET["user_id"] gather the pages profile.php?user_id=7 number 7? Here is the code: profile.php?user_id=7 $_GET["user_id"]; output = 7 I think I am having issues with this code. Is there...

0
Q: sending parameters between joomla article

user2349609How can I send parameters like radios=oneway&asal=CGK&tujuan=DPS&pergi=2013-12-31&pulang=&dewasa=1&anak=0&bayi=0 into an joomla article which injected by my custom php script with "sourcerer"? In my case, I want to create an custom php article like search engine for example, and pass its para...

0
Q: Doing complex array queries in MySQL

EdwinnerI am trying to query a database and return only two results or one. Here is my situation. I have a compound that needs to be split , then the array needs to be run through a database and it should only match 2 or 1 things in the database i.e. I have NaHCO3 to split. The query should match only N...

0
Q: Box.com - PHP - OAuth2 returns {"error":"invalid_client","error_description":"The client credentials are invalid"}

user3072698good day, I'm having trouble with getting the access token. I've followed the guide here: http://developers.box.com/oauth/ and already get my client_id, client_secret, and set the redirect_uri on the App settings (OAuth2 parameters) section. Here is the code for the file client.php <?php $...

0
Q: Add custom profile feilds to Wordpress

user2977705I am trying to add 2 custom user profile fields for phone numbers to a WordPress site I am working on. I have tried everything on the internet at this point so I am reach out here. I also need to add the fields to the registration page to integrate with another plugin I am already the registrat...

0
Q: OpenCart category page load times

Vitaliy IsikovI did some benchmarking on the script that loads up all the products from a category, route=product/category. I inserted a few mircotime functions throughout the script and got the following results: Array ( [0] => 1386295629.1175 [1] => 1386295629.1556 [2] => 1386295629.1562 [3] =>

0
Q: Run JS after image is loaded

tomsI have a DIV with a background image. The image path changes based on the $_GET array. <div id="background-img" style="background: url('elements/<?php if (empty($_GET['p'])){ echo 'home'; } else { echo $_GET['p'];} ?>.jpg') no-repeat fixed center center; background-size:cover;"></div> I want t...

0
Q: PHP:Schedule Job in Windows server

KabirMy server is Windows server and IIS is running. I want to run some query in my SQL server Database in specific time period. Time and date are 1. At 10am each morning 2. On Sunday morning at 10:01 am 3. On the last day of each month,at 10:02 am 4. On April 1 10:03 am 5. On July 1 10:03 am 6. On O...

0
Q: How to output name from database to input text field of the form

NeyI have two table one is for registering pupils and another one is for payment. I just want after registering student and when the same student in other day want to pay fee or any other payment, when user start entering idnumber of such student the name of student to be displayed in html form of...

0
Q: How to set Dynamic base url to https in CodeIgniter?

Ted WongI try the use a dynamic base url in this post: Set Dynamic Base Url in CodeIgniter But I used to be use the http, but now, I would like to change to https, how can I do so? Thanks.

0
Q: php: form still submits on invalidated form

Rendy Setiadii got a problem on my validation script using php; when the user only fills out username form and emptied the password it still logs the user in it should show the user that the password field is blank error. i'm kinda new to php and i'm hoping you can help me. thanks! here's my code for checkin...

0
Q: Joomla custom component not found 404 error

amilaishereI created joomla custom component and installed without any errors. But when I'm trying to access the component it throws me 404 , component not found error. name of the component is com_eta. I used administrator/index.php?option=com_eta for access the back end component. I googled , and check ...

0
Q: TABLE WITH SCROLL BAR

user3072443I want to my table to have a scroll bar so that the page will not have too height and i tried many answers that i've searched but nothing is happening. here is my code. <div class="text">List Of Product </div> <div id="tableContainer" class="tableContainer"> <table border="0" cellpadding="0"...

0
Q: PHP global $post not working! Trying to get the post ID in WordPress

iammikerodriguezI'm running into an issue where i'm trying to get the Post ID while trying to hook into a plugin function(function is inside my functions.php file) For some reason global $post is not working! My objective is to store the current posts, post ID into a variable where after the quiz is done, it w...

0
Q: Saving data into database using $.post returns Internal server error

EliI have been doing this several times and I am sure my code is just the same with the codes that have been working out for me in saving the data into database using $.post approach. However, this code that I have now returns an internal server error and I have been toying around with this for numb...

0
Q: Delete all user data from WordPress?

LukeIs there a function that deletes all traces of a user, including plug-ins? From what I can tell, the wp_delete_user function does a good job of deleting the user from the wp_users and wp_usermeta tables, and it can call wp_delete_post which deletes the corresponding wp_posts and wp_postmeta tabl...

0
Q: posting data into the database using $_GET

user3072819url - addreview.php?name=mercury This is what the form looks like <form action="addreviewaction.php" method="post" name="addReview"> <textarea name="content" cols="45" rows="7"></textarea> <input type="hidden" name="clubname" value="<?php echo $_GET['name']; ?>" /> <input type="submit" value="S...

0
Q: SQL Row deleting by itself

12preschphI have an MySQL database table where users input a form and a row gets added to my table. After filling out the form, my row gets added to the table instantly. All seems fine, but about 10 seconds later, it vanishes. I keep refreshing the table and it stays there about ten seconds and after a...

0
Q: DOMPDF - Defining DOMPDF_DPI on a case per case basis?

JoshIs there something like: $dompdf = new DOMPDF(); $dompdf->resolution(200); $dompdf->load_html($html); $dompdf->render(); Instead of having to set in the dompdf_config.inc.php, as I have multiple PDF files and they need different DPI.

0
Q: AJAX onkeyup event trigger in php code

BartedecoutI am a newbie in AJAX script and javascript. I am using AJAX to get search suggestion when the user type the first letter in the search box. But after typing the AJAX and javascript code, I could not get any suggestion coming out below the search box. I wonder if someone could help me to fix this...

0
Q: WordPress Posts Pagination Not Working

Monica NegapatanI am having problems with the post pagination of this certain category. I have this working 'Previous' and 'Next' using the previous_post_link() and next_post_link(). I have several issues regarding this. I'll just number it so it will be organized. 'First' - when clicked, it will go to the fir...

0
Q: Not greater than or equal to in Codeigniter

Leonard DrapezaHow to compare two time in codeigniter wherein the condition is not greater than or equal to and not lesser than or equal to. So how to do that in codeigniter active record?

0
Q: Pear Can't send email on Shared Hosting

user1574621I was working on a project for a client, it selects an email from a database and then sends an email to that address. Everything worked fine on my VPS server running CentOS 6, but when migrating to their shared hosting the program will no longer send the email. It will select the correct addresse...

0
Q: Convert raw geographical information to distribution plot

jO.Im trying to figure out PostGIS on Postgres 9.3. Using a PHP query (credit to @user623952), I've manage to retrieve geographical information from Marineregions web database in Json format as below, which I've feeded back into my Postgres db; [0] => Array ( [species] => Sp1 [...

0
Q: Operate Raspberry Pi Python Script / PHP Website from C# or Java

ForeverLearningI'm currently attempting to use my Raspberry Pi as a Garage Door opener. I have used code off YouTube, and it works, but I am trying to link it up with a native Windows Phone and Android app. I want to run the Python Script through a button click on a native app on a Windows Phone / Android dev...

0
Q: Download files in laravel using Response::Download

DixitIn Laravel application I'm trying to achieve a button inside view that can allow user to download file without navigating to any other view or route Now I have two issues: (1) below function throwing The file "/public/download/info.pdf" does not exist (2) Download button should not navigate ...

 
3:45 AM
0
Q: Mailchimp API Number of subscribers

matalawebI am looking to set the PHP variable of $subs as the number of subscribers in a Mailchimp list. I already have the API wrapper, but I'm not quite sure where to start. Any suggestions?

0
Q: IF Statement inside array php

Alvaro LouzadaHi guys i have a code for update my database $users = Sdba::table('tabusuarios'); $users->where('User_Id =', $User_Id); $data = array('User_Name'=> $User_Name, 'User_Email'=> $User_Email, 'User_Status'=> $User_Status, 'User_Perm'=> $User_Perm); $users->update($data); My problem is i want to al...

0
Q: Extending Validation Class fuelphp?

user3072727Fuelphp Extending Validation classes link http://fuelphp.com/docs/classes/validation/validation.html#rules Hi guy I facing very critical problem for Extending Validation classes. Anyone can suggest solution to me, how the step done and how can perform it ???? This is the way I done it Downlo...

0
Q: Want to show images information from Database

shaniI am new in Php... I want to get image information from database when i clicked on the specific image .... The code below is here plzz tell me how can i do that...??? Code: <?php $connection = mysql_connect("localhost","root",""); $select_db = mysql_select_db("fashion",$connection);...

0
Q: running shell command from php with sudo

Razin TanvirI want to run this code from php echo <password> | sudo -S /usr/sbin/asterisk -rx "dongle show devices" but it's not working. Can anyone help?

0
Q: Link an account with Xbox Live Gamertag?

Elite GamerHow would i go about linking someones gamer-tag? Basically, i am wanting to make sure a user actually owns that account. MLG Game battles does the same thing, where you click a link, then you are redirected to Microsoft's Xbox Live website. Once i login, i am redirected back to MLG Game battles, ...

0
Q: XML as an alternative to if else

user1647575My site has a large number of products in the database. I want to add a product sheet for each product but the database has no set "slot" for it. So I was thinking of writing a php code into the template which checks the part number and use this to load the correct url for the product sheet as a ...

0
Q: Cant use <?php echosite_url, site_anchor etc

user3072949Im working on my first CMS built with codeigniter and im following a tutorial. But I have a weird problem.. whenever i add php echo site_url to my html links. When I use the php in the urls all html below that line will not show in the webpage. Even in the source you see it doesn't exist anymore ...

 
4:32 AM
0
Q: session_start() error: why it doesn´t recognize a new session?

Rosamunda RosamundaI´m testing a php exercise, and I can´t get it working properly. It´s a counter that stores the visits inside a txt file as a simple integer. Every time I reload the page the number gets a +1. Now, I want it to reload only when there´s a new visit, so I´m trying sesion_start() for the first time...

 
4:45 AM
0
Q: Toggle Classes with query based upon ajax response

user1476992I'm using an ajax call to my functions.php file in order to query a DB and find out if the field "is_recurring" is 1 or 0. The 1 or 0 comes from a dropdown selection. Based upon what's returned from the php function, I'm trying to add and remove the "hide" class from my div where some text is d...

0
Q: SimpleXml Accessing attributes

user1547410I am trying to access an attribute using simplXML Here is an example of my XML format: <xml> <config> <anothernode></anothernode> <anothernode></anothernode> <anothernode></anothernode> <anothernode></anothernode> <anothernode></anothernode> <...

 
4:57 AM
0
Q: How i can jion table in mongoDB

user3073051if i write query like this SELECT student.name, class.subj FROM student INNER JOIN class ON student.class_id = class.class_id; in MySql so how i can write for mongoDB script ?

1
Q: Variables in heredoc inside object in PHP

sakurashinkenThe following php code will throw an error: class Foo{ public $bar = <<<EOF {$this->foobar} EOF; public $foobar = "123"; public function echoBar(){ echo $this->bar; } } It doesn't even have to be in brackets, any attempt at variable substitution throws an error...

0
Q: I need a registration button that sends data to a mySQL server to also Redirect on click

user3073070So i am making a registration page on my website. At the moment it is more just a test then anything. I have it working more or less and when a user attempts to sign up it works just fine HOWEVER there is no change on the page. I have created a Confirmation page but no matter what i try i can't s...

0
Q: Automatic HTML Document Height with Content

user3073029I'm having trouble getting the height of my HTML divs to scale with the content of my PHP-generated table. The table I'm using might change size so I don't want to set the height of the parent divs statically, but I can't seem to get it to work otherwise. I'm not floating anything. The main sc...

0
Q: PHP curl for PUT request to send video file to vimeo

stefunTo upload video to vimeo we have to use put request with binary data as in document .I was trying to send put request from php curl lib My code is below : $file_path ="/a.mp4"; $fp = fopen($file_path, 'r'); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $endpoint); curl_setopt($ch, CURLOPT_T...

0
Q: Post status on Google Plus using PHP Curl

Rabesh Lal ShresthaI have this code for logging into Google using Simple DOM Parser with curl. I've tried to post status on google plus using following code but unable to post on google plus Any idea on how to solve this? Here's my code for reference: $clientlogin_url = "https://www.google.com/accounts/ClientLog...

0
Q: Logging in with PHP

JerrodFull Disclosure: This is homework. I wouldn't bring this here, but I really have no idea what's going on, the server error reporting I'm using is bringing up nada and I'm getting absolutely no output what so ever from the script. I know this isn't how one would ideally do this kind of operation....

0
Q: Update Google Places API results using javascript

VamsiI'm using Google Places API to get location details using javascript. var request = { input: request.term, componentRestrictions: {country: 'us'}, types: ['geocode']}; service.getPlacePredictions(request, function (predictions, status) { if (status != 'O...

0
Q: Issues with PHP for loop entering names into database

Mike HermaryI am using the following code to enter submitted names into the database. The code, when working correctly, should capture the names and other information submitted in the form and create three unique entries in the database. This is not happening. Instead the code is capturing the last name in t...

0
Q: cakephp element requestAction

Papouche GuinslyzinhoI'm trying to follow along a book to learn Cakephp but it's quite outdated. So my problem is I want to retreive all the Albums from a Categories. So in a menu I list all of My categories ('jazz', 'classical'....) than underneath each categories (in a submenu) I'm trying to place all the Album ('...

0
Q: Warning: simplexml_load_file(): php_network_getaddresses

Kajal SinghI am using 7digital API on a project and yesterday it's working properly. But today i got error message. Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in.... I couldn't understand what is this? Any ideas?

0
Q: Linux Joomla Can't write to file with 755 permision

user2840647Hello I am trying to setup Joomla. When I try to change some settings through the Global Settings Manager, and then save, I keep getting and error saying I can't write to that file. I have tried playing around with the settings and file permissions even changing them to 755, and it still won't ...

0
Q: stop explode() expects parameter 2 to be string warning

user614963I have a form that's allow the user to select 2 or more categories. php check url like: $categories= (!isset($_GET["categories"])?0:explode(";",$_GET["categories"])); normal URL is like this site.com/cat.php?page=&categories=1;2 if the user change the URL to site.com/cat.php?page=&...

-2
Q: How to create a wildcard subdomain using .htaccess

user3073116My htaccess code is: RewriteCond %{HTTP_HOST} ^([\w-]+).domain.com$ RewriteCond %{REQUEST_URI} !^/domain.com/ RewriteRule ^(.*)$ /domain.com/$1?subdomain=%1 [LAST,QSA]

0
Q: php- Call to a member function bind_param() on a non-object using INSERT

user3073092I'm pretty new to php/MySQL and this error is really stumping me. I've looked through previous questions about this error, but can't seem to figure out what I'm doing wrong. I'm binding my parameters to prevent SQL injection. Here is the relevant code: $into = 'INSERT INTO Orders VALUES (?, ?,...

0
Q: Can we use multiple currency type in a website using X-Cart

KrisCan we use multiple currency type in a website using X-Cart. For example is it possible to use both USD price and AUD price for a single product or different products in a single web-site using X-Cart.

0
Q: Swift mailer attachment

Fazeela Abu ZohraI have tried email extensions in yii twice. 1.YII-MAIL 2.PHP MAILER Now i would like to try out swift mailer.I have downloaded the package from here http://swiftmailer.org/download and added it to the extensions folder in YII. Here i have a form ,with fields for name,email,phone and an attach...

0
Q: Laravel 4 never load namespace

LouisI am creating a custom namespace in my configuration files.Do I need to reference every class I want to use thereafter? <?PHP namespace MyCustomNamespace; use BaseController; use View; use Redirect; // [...] ?>

0
Q: Php Mysql prepared statement Update query running very slow in foreach loop

user1456131My php mysql prepared statement looped through an array is taking approximately 32 seconds to update 3 query's in foreach loop where My array is:- $inv=array (1 => 45, 2 => 50, 3 => 60, 4 =>'', 7 =>'', 8 =>'', 5 =>'', 6 => 15, 145 => 1, 9 =>'', 10 => 'Average', 11 => 6/6, 12 => 'N/A', 13 => 6/...

0
Q: Dynamically Show Product Promotions On Product Page Magento

ajameswolfHow can I get a collection of the promotions that are tied to a particular product.

0
Q: safety issue to write a php code mysql

LeeI'm new to the php and mysql. Right now I'm writing a simple php code which link to the wamp database. it's running on local. I'm just curious. what kind of safety issue should I worry about for the beginner and If you provide some basic example that will be great. The one I know is 'sql i...

1
Q: wordpress Get Image Description for attached images

MarkI'm trying to make a post split in 2 columns. The first column is going to be any image attached to the post, and the right column will be the_content() (excluding the images). So as of now I have no problem pulling all the images. However - I can't seem to get the image caption or title or desc...

-1
Q: 2checkout issue maximum amount

Kiren SivaI am using demo 2checkout API for my php website. I am using currency AED. When I pass amount greater than 1000 AED( arab emirates dirham ) 2checkout biling is made only for 1 UNIT. What is the issue? It is ok for amount less than 1000 AED.

0
Q: Facing issue with CKEditor 4.2.1 to show the image

AndruI am using the CKEditor 4.2.1 (revision 5010dd4). But when After uploading the image, it is showing. But in a moment it is replaced by the html source code. It shows up as html code and not the image. This is I am getting after uploading. Its showing only the html code. This is the html show...

0
Q: phpExcel insertNewRowBefore does not correctly update the Cell IDs in the formulas

GianAlso filed an issue on https://github.com/PHPOffice/PHPExcel/issues/275 Repro: 1) Fill, for instance, cells A1,B2,C1,C2,C4 with arbitrary values 2) Set C3=A1*B2*C1*C2*C4 3) Call insertNewRowBefore(1,1) and observe that the formula is corrupted: =A2*B3*C3*C3*C5 instead of A2*B3*C3*C4*C5

0
Q: phpRedis migration to cluster and consistent hashing

jayWe are currently using PhpRedis extension and our code is written using the class Redis from the PhpRedis. But now we are migrating to a redis cluster. Is it possible to use the Class Redis to connect to redis cluster? or do we need to re-write our code and use the Class RedisArray? We ll need...

0
Q: Sylius ecommerce shipping methods

FerasHopefully this catches the attention of some of the Sylius core devs. Im really fed up with all the retarded php ecommerce open source out there and im so pleased to finally see something meaningful come out. I understand its in its alpha still but i will be more than happy to make a shipping me...

0
Q: PHP mail goes in spam and inbox

Kajal SinghI am using simple PHP mail function to send mail. Here is my code: sendEmail('xyz@gmail.com', 'test subject', 'test body', 'xyz name', 'abc@gmail.com', 'HTML'); function sendEmail($to, $subject, $body, $fromName, $from, $format = '') { $headers = ''; if($format=='HTML') { $...

0
Q: How to make a php show user data from database?

user3073168I made a login system, how do i make it show the username after login, so it goes like on the main login screen -> database check -> success page. On this success page how do i make it show the username, that was registered? I have only added <?php session_start(); if(!session_is_registered(myu...

0
Q: Mmagento (1.7): List product in Facebook account page of the same user who is the user in magento store

user2485618 Blockquote hi all, i need help in Magento(1.7) online store. Summary : List product in Facebook account page of the same user who is the user in Magento store. Requirement: 1.User registers as merchant(vendors).(Completed) 2.User can add any number of products of his choice.(Completed...

0
Q: price slide bar in javascript to give appropriate result

sarmisthaMy table: <?php $s=mysql_query("SELECT * FROM bus_detail where source_point='$_SESSION[source_point]' && destination_point='$_SESSION[destination]'"); while($row=mysql_fetch_array($s)) { ?> <ul id="products"> <li data-price="<?php echo $row['price'];?>"> <table> <tr> <td>Bus Operator</td>

0
Q: Yii (Query Builder) How to loop to get all column values

bananaI am trying to count how many times a Department ask a Concern. Currently, when I cVardump, the query outputs the right result. But when I implement together with the loop, it doesn't work. It only outputs a single Concern, where the database contains 2 Concern. I don't know, but I think it's i...

-3
Q: Questions about Facebook

Brandi OldisnI want to know how Facebook loads their news feeds. When a user submits a status, it gets loaded into the home page. How is that done? I know it's by Jquery and some PHP to access to the data, but I can't seem to make it work.

-5
Q: Free Weather Widget from php

SasinduRHNi want link of weather widget of freely available i build system for manage meteorological data. i want customize data widget for add data not from internet i want weather widget for add data from my database. can you help me.please give me kind request.

1
Q: Convert a GET variable containing numbers range to string in PHP

NitishI have a get variable in this format : 0-1499. Now I need to convert it to a string so that I can explode the variable. For this I tried to convert it to string , but I am not getting any output. Here is the sample code : $mystring = 0-1499; //$mystring = (string)$mystring; $mystring = strval($m...

-1
Q: nth child css selector alternate for IE Using Jquery

user3072379Hi I hav a following piece of code that works perfect in all browsers except IE 8 and its previous versions ... vars += $("#parent").serialize(); $.get("pgs/dpg.php", vars, function (data) { $(data).find("row").each(function () { stat = $(this).childre...

0
Q: php regex find a string that's NOT of a certain length

Alex ChangI'm trying to use preg_match_all to check for syntax errors with comma, where "hello, there" is ok but not "hello, there". First I realize that a space, double quote, and line break are all acceptable after a comma, so I believe I can do preg_match_all("/(,[^ \r\n\"])/", $mystring, $result); a...

0
Q: Unable to create a folder in dropbox using Php API Dropbox using Wordpress

user3073197While User uploads the files, the folder should be automatically created in the dropbox with the username as folder name. and then after the files that were uploaded by the user should be saved in that folder. Error thrown: " Error: Resource at uri: https://api.dropbox.com/1/metadata/dropbox/swe...

0
Q: JPEGCAM directory path to save in particular folder

user2830273I am using jpegcam API in my website its working fine but the problem is that it is saving file in current folder and i want it to store the file in a particular folder. please help!!

0
Q: Cannot scandir() correct directory after htaccess rewrite

Guillermo DeliciaOn /portfolio.php (which is located on root of the site) I want to show all images from the directory /trabajos/tataviajes. foreach(scandir('./trabajos/tataviajes/', 1) as $filename){ echo '<img src="'.$filename.'"/>'; } The function open the images like this: /portfolio/123.jpg instead ...

0
Q: Codeigniter Auto completion is not working

Nidheesh N NamboodhiriHello Auto completion is not working well in my application.When we type a name it displays only a blank list[ Screenshots attached ]. Controller Code public function list_UserByName($letters) { if(strpos($letters, ",")) { $letters1 = explode(",",$letters); $lecount ...

0
Q: PHP Page isn't storing cookies

Lalien-Miles Lamar ColemanI am new to php and I am making a basic login script. All I want to do is log in and have the cookie for my user_id stored. It works on all of my other pages, except my index page which is one directory up. So on my index page, I have this if statement: <?php if (!isset($_COOKIE['user_id'])...

-1
Q: How to post Facebook using curl instead of going to facebook for authentication using My APP

user2215155How to post Facebook using curl instead of going to facebook for authentication using My APP. Can anyone tell me how to create curl action to post to facebook wall without redirecting to FB.

0
Q: PHP - Create Text file on mysql Error

user3014203Trying to Create a text file with mysql database errors because I never get to see the page. mysql_query(" INSERT INTO cart (value1)VALUES ('value1')", $link) or die(mysql_error()); But I want to replace the mysql_error into a text file, any thoughts?

0
Q: how to make an unclickable/disabled/grey list item in yii

FarhadInside layout>main.php i have this array('label'=>'Appointment', 'items'=>array(array('label'=>'Appointment(Office)','url'=>array('/appointOffice')), array('label'=>'Appointment(User)','url'=>array('/appointUser')))), I want to make one of the items unclickable for a specific...

0
Q: I want set variable to xml file in highrise api but it is not work. why?

user2689369if i set static values in highrise like this: $person->setFirstName("XYZ"); $person->setLastName("ABC"); $person->addEmailAddress("example@gmail.com"); it add contact in highrise, but if i use variable instead of static values like this $person->setFirstName($fname); $person->set...

-4
Q: How To Make An Upload File And File Thumbnail

user3073281Here is my question. I Want to create an image upload page for members of my site. I want to, when they upload it, on then will they be able to see. And i want a page to recive data from the database the picture is stored in and be displayed on a page. but here's the problem. Since all of the ima...

0
Q: Insert random letters and letters of string in a table just like in wordsearch

user2901740this codes is for displaying random letters with a table like in a word search game. The problem is,.I can't insert strings in the table,. what if I have array of strings,. eg., sample, them, power, some. How can I insert these strings in the cell? I am creating something like this http://child...

0
Q: PHP Redirect a file from another server to end user

David_GeeI want to be able to allow user to enter in variable URL which file they would like to download from remote server URL e.g /download.php?url=fvr_anim_foxintro_V4_01.jpg <?php $url = $_GET['url']; header("Location: http://fvr.homestead.com/files/animation/" . $url); ?> The above is purely an ...

0
Q: Adding items in myphp

user3038531I am having an issue when I trying to add multiple rows in myphp. What I have is a function that when called it adds a textbox row to the website. The problem is when I try to input the row into myphp it is only showing one row instead of all the rows that was added.. I am using a form to post...

0
Q: jquery doesnt seem to load when i call the page using ajax

user1868185Hi Im having trouble loading jquery for my website, it is composed of 1 main GUI and many other pages that is loded using the ajax the main problem is that the main GUI doesnt seem to load the mini pages that has jquery or validations in them can anybody help me with this one? Here is the Script...

-5
Q: Create a functional web program written in PHP that has a business purpose.

user3073311Please provide me a solution for the following question Create a functional web program written in PHP that has a business purpose. For example: you might write a program to manage a buisness inventory, or a program to manage college course schedules. Save the program in your public_html fold...

0
Q: Best way to deal with relative paths/base tag

MakoOK, so I've run into an issue with nested php includes, and I want to know what is a good compromise of best practices and ease-of-use. Here's my website structure: root - index.php -/include - header.php - footer.php -/articles -article-1.php -/css -style.css So here'...

0
Q: google map works in local but when i move to live it show empty page

pd1786this works in local fine when i change it to like it's showing empty .. here we have any thing else in this code?? i mean in php or map canvas <style type="text/css"> body { font: normal 10pt Helvetica, Arial; } #map { width: 350px; height: 300px; border: 0px; ...

0
Q: What happens if session name is same on two different websites?

DS9I have a two diff. project on my XAMPP say it is Project1 and Project2. When i login with Project1, i check authentication and if it is successful then stored session. The session name is $_SESSION['username']. The above process is same with Project2. now,to prevent direct access,i use this co...

0
Q: What is wrong with strpos()?

brigantaggiorHave code: $url = 'http://www.domain.com/dir1/dir2/dir3/page-2.html'; if ($strpos = strpos('/page', $url)) echo '1'; else echo '2'; It shows only '2'. How can I fix it?

0
Q: parse php for strings to translate

pixelineI have many php files full of html markup. I would like to extract all the strings (html node content and attribute values), to generate a text document to review then send for translation. I'm wondering, is there a reliable way (a tool or a script perhaps) that would do that automatically? Exa...

0
Q: Combining 2 dropdownlist

papao surnameI have 2 dropdown. The 1st dropdown get all app_cn in the database and the 2nd dropdown calls all of app_plan_no. My problem is why is there no output when I load the page. Help me please combobox.php <script> // AJAX Implementation function showCourses() { str = document.getElementById("br...

0
Q: Wordpress plugins are active but not checked in admin tool

pthurmondOk, so I have a big problem. Or at least an indication of a big problem. You see I went to create a dev version of a recently launched site. I copied all the files over to a new directory, created my apache entries, created a brand new database for it, and copied over that database. Then I made ...

0
Q: COUNT, IF, in a mysql_fetch_assoc query

themartinI've recently taken over a site with some SQL queries that seem to be a bit beyond me. What the query has to do is find a Trade that belongs to a User, then find the Feedback score (1,2, or 3) attached to that trade. It's supposed to count all the ratings (1 being negative, 2 neutral, 3 positive)...

-1
Q: SQL syntax error: can't be found

user3073092I'm new to SQL so i'm probably missing something. Apparently I have a syntax error on this line: $mysql = 'INSERT INTO Orders (Name, Recipient, Destination, Room, Message, Anonymous, OffCampus, OffCampusAddress) VALUES (?, ?, ?, ?, ?, ?, ?, ?)'; Could anyone help me identify what I am doing w...

-2
Q: php path error in imagejpeg()

vishalwhen i use imagejpeg() it works fine in local while giving error on live here is the warning message Warning: imagejpeg() [function.imagejpeg]: Unable to open 'http://test.ourserv.com/Optfolder/cmp_dd5ac79bcf/20131027_185925.jpg' for writing: No such file or directory in /home3/test/public_html...

2
Q: How to Add Category Filter in WordPress Post Query

vs7I filtered the post's in my sidebar by using this code, $mostlikequerystr = " SELECT $wpdb->posts.* FROM $wpdb->posts, $wpdb->postmeta WHERE $wpdb->posts.ID = $wpdb->postmeta.post_id AND $wpdb->postmeta.meta_key = 'most_liked' AND $wpdb->posts.post_status = 'publish' AND $wpdb->posts.post_t...

0
Q: Loop through and compare

user1269625I have this code here the product tags can be animals, life or market. What I am trying to do is separate their list, but this code creates a new ul for every tag after animals and I do not know why, can anyone help?: <?php $versionvalues = get_the_terms( $product->id, 'product_tag'); if($vers...

0
Q: How to get rid off this error : Catchable fatal error: Object of class DOMNodeList could not be converted to string in fun.php on line 608?

PHPGeekI'm having following function code. In this function I'm passing some HTML data and cleaning up this HTML data. But I'm getting the error as follows: Catchable fatal error: Object of class DOMNodeList could not be converted to string in fun.php on line 608 I got this error during debugging my ...

0
Q: Sphinx returns wrong document ids

mimMy sphinx search returns wrong results, if I search for a keyword, the document ids returned do not contain that keyword. Here is how I created conf settings: source source_name { type = mysql sql_host = ****** sql_user = ****** sql_pass ...

0
Q: Handling Multi level category structure dynamically

Vijayakumar SelvarajCurrently working on the project related to Business listing. I need some help in handing category structure. Using the table name Bus_CategoryTbl to maintain the categories & used fields are Cat_ID, Cat_Name, Cat_Slug, Cat_Level etc., In this, Cat_PID will have the Cat_ID of the parent category...

-1
Q: In PHP how do I remove a character from a given position in a string

Robert82I would like to always delete the character in the 2nd position within a string. The trouble is, this could literally be anything. Sample inputs would be: 5H23098 SHISL S-SLSYNSL M/SHGIKT Output should be: 523098 SISL SSLSYNSL MSHGIKT

-5
Q: Paginate in php

user3066220<?php $query = "SELECT * FROM drawrecord ORDER BY date_of_draw DESC"; $result = mysql_query($query); echo '<tr> <th>No</th> <th>Date of Draw</th> <th>Time of Draw</th> <th>Min</th> <th>Digit 1</th> <th>Digit 2</th> <th>Digit 3

0
Q: PHP get value from a array by passing value from another array without using foreach

ravisoniI've two arrays $products and $id_n_qty $id_n_qty array contains Product id and its quantity where $products array contains all products with their IDs and name. $products = array(1=>"Shampoo",2=>"Towel"); $id_n_qty = array(1=>3); My question is how can i get the Product name when i have the ...

0
Q: Check if DST is in effect

Nick CoonsIn PHP, date('I') will tell me if Daylight Savings Time is in effect. Does this tell me if DST is in effect specifically for my server's configured timezone, or whether or not it's in effect period? I'm in Arizona where we don't observe DST. So I need my server to recognize that, say, New York...

0
Q: PHP string with a number range converted to number automatically in javascript

NitishI have a php variable as below: $starting_package_wedding = $_GET['starting_package_wedding']; which outputs string '75001-90000' (length=11) Now I have a javascript in which I will need the the starting_package_wedding variable, var starting_package_wedding = <?php echo $starting_package...

0
Q: Test to see if variable exists, then end the for loop

user3014203This doesn't work, what I want it to do is go through the posts until there are no more item_name1 and they increment to item_name2 - item_name3 ect.... does not spit out an error, just doesn't do what it's suppose to, checking if someone are here sees one. Thanks if(isset($_POST['item_name1'...

0
Q: Unknown letter preg_match

user3023802Just quick question, I'm using preg_match to get a information from the URL, but I found a problem. The letters "avadasa" are always different, how I can tell the script that this is not important. I want my script to skip it and leave just "Name-Of-Article" http://example.com/avadasa/Name-Of-A...

0
Q: Kohana Exception not clear

Anna GabrielliI'm using Kohana and when running index.php page, I've got following error: Kohana_Exception [ 0 ]: Directory a:0:{} must be writable a:0:{} what is it? Everything is writeable: I'm working under linux debian squeeze and ls-l done on every folder and subfolder remove every doubt.. I've check...

0
Q: data is not displayed correctly on website pages

Ankur Dhanukasee left bottom corner of both this pages. http://www.ukbidz.com/index.php http://www.ukbidz.com/Baby,category,1889,parent_id,categories see site status it is displaying perfectly in index.php. while in all other pages it is not displaying correctly. I am using the same page to display the co...

-3
Q: How can I pull info from an RSS feed and have my computer read it out to me? (i.e. have it read the weather to me)

user3073431I want to create some sort of script that I can run in the morning. Allowing information from certain RSS Feeds to be read out loud to me while I am getting ready. Any ideas would be greatly appreciated. Thanks!

-1
Q: what is the configuration of phplist for sending emails on local computer on imap?

Peterson SamsamI want to send emails from my local computer using phplist with imap. Please help with configuration My phplist version is 3.0.5

0
Q: working with ajax and php as front and backend

user3057928 var insertValue= $.ajax({ url: "handle.php", type: "POST", data: text, dataType: "text" }); insertGroupData.done(function( msg ) { alert(msg); }); this is the first half, I'm stuck in the 1st line of my backend.php I think it should be catch the P...

0
Q: Need to pass form var's from a php form to a html page. Ajax, Json, Jquery

JeffI have a simple form ... <form method="post" action="sendmail.php"> <input type="text" class="text" name="name" placeholder="Name" /></div> <input type="text" class="text" name="email" placeholder="Email/></div> <textarea name="message" placeholder="Message"></textarea> <a href="#" class="butto...

0
Q: How to remove url error?

Amit JayaswalI am trying to develop GCM Push Notification, But i am getting the following error. 12-06 12:19:51.780: E/URL(5975): > http://192.168.xxx.108:8085/gcm_server_php/register.php I am using Wamp server. I keep the gcm_server_php folder in www folder.The IP is my computer IP, and I turn on the ...

0
Q: PHP returning all combinations of a substring of 2 characters from a string

Robert82I'm trying to find all possible 2 letter combinations of a given string. Is there a faster way to do it, than to apply a substring position by position and then calling the function again? Below is what I'm trying: function permute($str) { if (strlen($str) < 2) { return array($str)...

0
Q: How to Parse the onemap.sg api response?

pratikI Calling the OneMap.sg API $url='http://www.onemap.sg/API/Services.svc/ga?token=**************&sv=575565'; $curl = curl_init($url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $resp = curl_exec($curl); var_dump(curl_error($curl)); curl_close($curl); var_dump($resp); And get the below r...

0
Q: Unable to send mail from Linux, works perfectly with windows

SujeeshI am using the following code to sent mail for a contact form. The mail works perfectly when using a windows server setup with xampp, but fails in Linux server RHEL 5. I am getting "SMTP Error: Could not connect to SMTP host". I tried telnet the host from terminal. It is getting connected p...

0
Q: How to handle hundreds of pagination in AngularJS + Laravel4?

user2002495I have a case where I have to pull data from the server and make pagination in the results. There are thousands of the data, and I'm planning to show 20 items per page. My plan is to call this Laravel function each time new page is clicked: public static function GetPagingListing($limLow=null, ...

-2
Q: Fetch images Src which are inside the iframe

avinashHello i used proxy file for show the website inside the i frame now i want fetch the source of image which are open inside the i frame. my code where i show the website using proxy file. "<iframe src="<?php echo ($url != "") ? base_url()."html/miniProxy.php/$url" : base_url()."/html/miniProxy....

0
Q: IF DATE IS NOT EMPTY OR IF DATE HAS STRING "DATE"

user3060900Hi I have a drop down list with the first option shown is an option i have set as DATE.. I need an if statement that runs if the date is empty or if the first options which says "DATE" is selected..Right know MY AJAX only works if the date selected.. This is my drop down <?php $dates = array();...

0
Q: Complex Domain and Sub Domain

user3073463I am new on stackoverflow and requires a quick assistance on an issue i been facing from past few days. I tried to search for the solution by googling it but didnt found anything. Maybe because i am not searching it right. So my issue is, Suppose i have a subdomain lets just say sub1.domain1.com...

-1
Q: how to place some text on image and saving the image with text using jquery / html5 / php

user3056922Hi am working on one small task which is related to generating a greeting card in this i need to select an image and select a text from provide texts i need to put selected text on image and save it and send to the users,i want to do it in html5,jquery,php. Any suggestions

0
Q: mod_expires and images from php script

user625681I have a php script which returns images with a specific id. getImage.php?id=12 I configured some mod_expires preferences. In example. ExpiresByType image/gif "access plus 1 minute" ExpiresByType image/jpeg "access plus 1 minute" ExpiresByType image/jpg "access plus 1 minute" ExpiresByType im...

0
Q: Is wordpress the right platform to build a full blown membership website?

SinSyncI've been met with this question on various occasions and always find myself short of a clear answer, one which makes me confident to stick to and call a solution. I know Wordpress has a host of plugins which let you build a membership website, where you can group and restrict users to access pr...

0
Q: how to remove values from an array but keep indexes intact

sqlchildI have an array : $myarray = array(153=>2 , 154=>0 , 155=>10 , 156=>15 , 157=>8) I did : sort($myarray); then , to remove the lowest ones, I did array_shift twice , but that reordered the indexes...but I need to keep the indexes unchanged. Required output is :$myarray = array(155=>10 , 156=>15 ...

0
Q: When you select one from the Select Group, Input Text value corresponding to the value of Select DB trying to have a value

bismuteWhen you select one from the Select Group, Input Text value corresponding to the value of Select DB trying to have a value. On the part of the form html part of the select Group. <select id="country" name="country"> <option>Select Mail Group</option> <?php $cats = GetCategories(); while($cat ...

-1
Q: mysql insert into select error

L JI am currently working on a program where data from a table is taken and is posted as checkboxes, once the checkboxes are selected by the user, the idea is to have the results saved to a column in a different table on the database that has user input from prior pages. When I post the following, ><

-1
Q: how to create folder, file in clickable tree structure in jquery and php-mysql

ankanI want to create folder, file in clickable tree structure in jquery and php-mysql. I have tried a lot. But there is no progress. I have got one that is same with my requirement.Its link is http://code.google.com/p/editable-jquery-tree-with-php-codes/. These code is tested with setting database ta...

0
Q: How make intel.com site like category option

rezaI want to make intel.com site like category option...like in this URL https://downloadcenter.intel.com/SearchResult.aspx?lang=eng&ProductFamily=Graphics&ProductLine=Laptop+graphics+drivers&ProductProduct=3rd+Generation+Intel%C2%AE+Core%E2%84%A2+Processors+with+Intel%C2%AE+HD+Graphics+4000&ProdId=...

0
Q: How can I get the required files of other php file?

MoreFreezeI have a main php file that will execute some hadoop command. As we know, this command must include all of files that will be used. For example: Map.php require('A.php'); A.php require('B.php'); so my hadoop command like this: hadoop -mapper Map.php -files A.php,B.php,Map.php I'm distr...

0
Q: Drupal 7, Views, Better Exposed Filters and SEO friendly urls

user3070817I know there are several topics on this issue but I can't find any feasible solutions for BEF Filtering with SEO friendly URLs. The only feasible hint i found is, to use hook_url_inbound_alter and hook_url_outbound_alter. I tried to use both in a module but i don't get rid of my problem... Mayb...

-2
Q: Which language to learn to build web app containing data entry, graphs and ability to use other compiled program

kamleshi9I am new in this field and I have some c++ codes which are useful as they create graph of mathematical function provided by the user, but because it is in c++ I want to know a way to have a web application for it. It would be nice if you suggest me a way I can pass parameters to c++ codes I alrea...

0
Q: SQL UPDATE Using Datepickr.js Resetting Date to 0000-00-00

Andy NaylorI have the datepickr.min.js running on my website and it's working when I do an insert into the database but when I am doing an UPDATE it's inserting the dateformat as 0000-00-00 which I find extrememly strange as it's using the same code and ID. Here's the javascript: new datepickr('datepick',...

0
Q: CodeIgniter Two tables Left Join does not return Join Condition id of left table when miss in right table

Majid Khan MohmandI have two tables say Table1 and Table2 and i am Left joining Table1 on Table2 with Table1.PrimaryKey = Table2.ForeignKey. It does return all the rows from both tables but in some rows, due to no record in Table2 for the join condition, the PrimaryKey field value is missing for Table1. Here is my...

0
Q: How to do less than, more than with wpdb (wordpress database)?

esskHow do I do the less than AND greater than $date in wpdb? $date = ('Y-m-d'); $wpdb->get_results($wpdb->prepare('SELECT * FROM product_history WHERE enddate = "%d";', array($date))); I wan't to get history where enddate is today or in present time, BUT also more than 0000-00-00.

0
Q: .htaccess redirect a broken link domain.com/.php

user3040842i need to redirect the broken url like domain.com/.php to domain.com/index.php anyone know how??i try to use some htaccess generator like http://htaccessredirect.net/index.php and get this code but redirect loop/error i have tried the following code,but not work Redirect 301 /.php index.ph...

0
Q: Creating simple forms for print from MySQL

Virgil AmenraI have MySQL db with very simple tables. I want to find easiest way to print, or export to .doc or .pdf content from web. eg.: Name: something id=name Surname: something id=surname Age: something id=age Place... etc etc so I want nice form with can print me content I want. And also I need to ...

-2
Q: Hotmail float left not working

Deepakfloat left problem with hotmail mail. table border="0" style="width:248px;margin:7px;float:left;" cellpadding="0" cellspacing="0" class="img_tbl" margin:7px;float:left -> Not working in hotmail mail. Please help.

0
Q: How to get values with respact to angle

user3073543Angle 0 to 180 deg. i want the value in between them, like: Angle 0deg then value = -10 Angle 90deg then value = 0 Angle 180deg then value = 10 values vary in between -10 to 10.

0
Q: Remove tags within Smarty tag

MazzonI'm wondering if you know of a way on removing tags from a smarty tag ?. The tag that i'm using is {$menu} that is outputting the following: <ul> <li><a href="#">Menu Item</a></li> <li><a href="#">Menu Item</a></li> <li><a href="#">Menu Item</a></li> </ul> but what i'm trying to do is r...

0
Q: ajax load image not working second time on popup jquery

Mahmood RehmanI am working on site where i show fancybox for contact us form.i submit form using ajax.on process state i show ajax loading image.On first click it show the image but clicking again image doesn't show.My ajax code is this : <script type="text/javascript"> function submitForm() { jQuery(".aja...

0
Q: Laravel 4 Dynamic routing - Overkill?

SynackSAWe're in the process of setting up a Laravel 4 base project that we can work off of. I wanted to create a default routing rule that would allow developers could easily bang out new pages, without having to worry about adding routes to the controller, but making it so that other routes can be adde...

0
Q: How to get a part of string variable (without first 7 characters)

Raplus$str="http://stackoverflow.com" I need to get only "stackoverflow.com". That means I want to remove first 7 characters. How I do it?

0
Q: MySQL returned an empty result set when i just build the table

user2879534I just build a table "id" using phpmyadmin. The structure part shows what I build, however the browse part returned an empty result set. And the rows of table "id" are zero. Why is that? I've already built it! I am new to mysql, forgive me.

-1
Q: Put checkbox inside drop down menu

sarmistha drop down menu <select name="bus operator" title="eci bus operator"> <option value="select">Bus Operator</option> <option value="1">relience</option> <option value="2">volvo</option> <option value="3">sony</option> <option value="4">sairam</option> </select> I want to add a check box wi...

-1
Q: Dynamic add and remove item and drag and drop items to a container and save to Database

user3073578I want to create a PHP Ajax/Jquery Code that at first at the side user can add categories and be able to remove them or edit them then the user can be able to drag and drop those categories to different container depending on where they want a specific category on diffirent container then save th...

0
Q: Subscribe using php sdk

user3068753I am using php sdk for facebook app, I have to implement below case in my web application: lets say I have two users A and B registered with my website using facebook IDs, I have facebook ids of both users... The users A and B are not friends in facebook but my website wants A to subscribe B us...

0
Q: How to check if a boolean search is valid

Ben SinclairLong story short, I have a reporting system that allows users to enter a custom logic. For example their logic might be 1 AND (2 OR 3) AND 4. Each of the numbers in the logic represent a filter criteria. If the filter criteria matches, it replaces the number with true, if not it replaces the ...

0
Q: EasyPHP-DevServer-13.1VC11: Changed php files are not refreshed immediately

aimfeldI have replaced my Zend Server CE with an EasyPHP-DevServer-13.1VC11 install, running PHP 5.5.3. When I make changes in a php file, the changes often show only after waiting about 10 seconds followed by a browser refresh. This is quite annoying in a development environment. Can this be changed ...

0
Q: issues with regex that should only match at the beginning of a line or matches too little

marcnycI wrote this RegEx line: $dp = preg_replace('/(.*'.$definition.'.*?\s'.$property.':)([^;]*)(.*)/is','$2',$css); which is supposed to extrapolate a value of the property of a CSS definition. In other words if my CSS is: #mydiv { width: 100px; } $dp is supposed to return '100px' with ...

-1
Q: How to change a cookie's value at midnight?

user3073602How want to cookie value and set random variable in cookie in midnight Here is code $expire = strtotime('today 23:49'); if ($expire > time()) { $value = rand(1, 6); $expire = strtotime('tomorrow 23:49'); setcookie("img", "$value", $expire); echo $_COOKIE["img"] . ".jpg) ...

0
Q: SQL syntax error when value is entered for parameter

user3073092I have this line of code to enter data into a database using binding: $mysql = "INSERT INTO Orders (`Name`, `Recipient`, `Destination`, `Room`, `Message`, `Anonymous`, `OffCampus`, `OffCampusAddress`) VALUES\n"+ " (?, ?, ?, ?, ?, ?, ?, ?)"; $stmt = mysqli_prepare($con,$mysql); Oddly enough, ...

0
Q: Database undefined index

user2983295it's me again. I tried to make comments to my website and apparently it is working :/, like in the database it shows inserted values, but every time I refresh the page or go to the page, I get this error: Notice: Undefined index: user_comment_name in /home/kall0467/public_html/svale_rejser/comme...

0
Q: .htaccess routing for clean URLs

Chud37I have the following .htaccess in the root of my website, which effectively (As I understand it) drives EVERY request through to index.php: Options +FollowSymlinks RewriteEngine on RewriteOptions MaxRedirects=10 AddType "text/html; charset=UTF-8" html AddType "text/plain; charset=UTF-8" txt <If...

0
Q: Which process will be killed by kernel in case of memory over use? child or parent?

Toshendralet me cover a small background here: i am launching one ruby script (script_launcher.rb) through PHP using shell_exec function and in that ruby script i am doing this: spawned_process_id = spawn("ruby actual_script.rb > /dev/null" ) Process.wait spawned_process_id and after that according t...

0
Q: Why I'm not getting any data even after successfully loading the HTML in $dom object?

PHPGeekI'm having following function code to clean up the HTML data. function clear_question_data($html) { $dom = new DOMDocument(); $dom->loadHTML($html);/*Here the HTML data is loading perfectly, it's returning TRUE here*/ die(var_dump($dom));/*This statement gives output a...

-1
Q: how to add existing php files in PHP project in eclipse

user3073604I had couple of php files which are not part of PHPProject in eclipse Helios, now i want to add them to my new project and to use XDEBUG for debugging. Please provide me the better solution or alternate ways. Thanks

0
Q: sharing dynamic image from my website to face book

Basem Sherin Dahrougi am working on quiz script that produces image link after answering some questions what i need to do is to integrate a share button to share this image to facebook .. i have successfully done the share button integration successfully but my problem : if i choose the dialogue layout the image wi...

0
Q: construct foreign classes from database in PHP

FelixFirstly, it's not a problem to construct classes from a database, i.e. mysql, it's more a question about performance. If I have a Class A which depends on class B. class A { protected $depend; public function __construct($id == null) { // construct from mysql/postgresql/.....

0
Q: Json to create more than one select from a main select

user3073608This is my body: <html> <head> . . <script type="text/javascript" charset="utf-8"> $(document).ready(function(){ $("select#regione").change(function(){ $.getJSON("provincia.php",{id: $(this).val()}, function(dati){ var options = ''; ...

0
Q: How to validate tabular data in yii

Anshuman JasrotiaI have created a form which allows user to save tabular data. I have followed this tutorial . I have managed to add multiple instance for a Model and I am getting the data in the post and it is getting validate. The problem is with the error summary and the AJAX validation. Below is my controlle...

-6
Q: Get value of input(array) and pass to php using ajax

xXKenNXxI have this kind of input boxes <input type="text" name="task[]" id="name"> I want to pass the values of those inputs to a php using ajax... can someone help me???

0
Q: How to get a parameter from an XML file?

user3012938I want to get an href from my XML parameters file; this is my code: $linkx = $params->get('linkx'); echo '<a href="$linkx"><p class="bottomp"> Find More </a>'; What's the correct way of doing this?

0
Q: How to make php work with utf-8 strings?

ShaneObviously, this won't work: <?php $newstring = "测试"; echo $newstring; ?> How do you make it work with utf-8 strings?

0
Q: Delay image loading with JavaScript

Jordan Jonesi currently need to load 123,543 images from my server but every image must go through a PHP script to generate it, the problem is that my server is very weak and it crashes after loading about 600 images, so i'm asking for a Javascript that will load 2 images / second, if possible. Thank you.

0
Q: PHP &$string - What does this mean?

JohnI've been googling but I can't find anything. $x->func(&$string, $str1=false, $str2=false); what does that "&" before "$string" "&$string" do?

0
Q: What are the main cons and pros between yii and codigniter?

AdarsI am a beginner in core php programming . Now I need to study a php framework. There are lost of php framework. I don't know which is best for a beginner. Please give some suggestions about my doubts? Which is best framework Which framework is more flexible for a beginner Which framework is mor...

0
Q: Replace textarea linebreaks in php

MartinI am trying to change the output from $foo, replace linebreaks with ";". Here is an explanation and my preg match, however it does not work. The output is the same <?php /* $foo 1554 6554 5543 */ preg_replace('/^\s+|\n|\r|\s+$/m', ';', $foo); # What I want: $foo = '1554;6554;5543' ?> Does ...

0
Q: Mangento File Changes not taking effect

Ryan KingI have a 1.8.0.0 Magento install which will not update the site when i make changes to the files on the site, this was working before and now it does not I have disabled the compiler while making changes and have cleared the cache on the site and my mac but it still doesn't work. I have also reco...

0
Q: How to create a large scale web application

user2192094I am currently in the midst of building my dream web application, something which I dream to be the next social media platform. The technology I am currently using is PHP, MySQL, HTML, CSS and Javascript. I am curious how Internet giants like Twitter, Facebook or Flickr started? I am sure they a...

0
Q: CAKEPHP / PAYMILL: What happens when an Error occurs?

user2688870I've just installed the PAYMILL API for my website. It's working great except when an error occurs (Not an error from their Bridge, but their API, when using $request->create()). I used their example code for my PHP, JavaScript and HTML. Here's my PHP function payment(): public function payment(...

-2
Q: How to change title of leading articles

user3073701could I ask, how to change title of leading articles in joomla 3, template SJ joomla? I need to delete leading articles title, but other titles needs to stay. Thank you.

2
Q: Interface dilemma

Timo HuovinenI probably don't understand something very basic. Tim is making a hypothetical application that uses Sessions, he is lazy and wants to use existing solutions instead of making his own. He discovers 2 developers, John and Fabien, who have exacly what he needs (but are not aware of each other): F...

-1
Q: Codeigniter validation callback not calling

user2907171i have this rule for validation 'field' => 'email', 'label' => 'lang:email', 'rules' => 'trim|required|valid_email|callback_already_participated' and here is my method function already_participated($email) { echo "here"; $this->form_validation->set_message('_already_participat...

0
Q: Pass container object in XSLTProcessor

Ajay Patelis there any way to pass or bind Container object and call Service object's method in XSLTProcessor. some thing like. XSLTProcessor::registerFunction(); //in php file. in xsltStylesheet <xslt:value-of select="php:function('serviceobject::serviceObjectMethod',string($xsltProcessingVariable))"/>

0
Q: Magento Product Create via API not working

DenoteoneI have been fighting with the Magento SOAP web service for a week and I can not figure out why I can not create a product using the API. Below is my PHP code: $client = new SoapClient('http://mywebsie.com/wp/store/api/soap/?wsdl'); // If some stuff requires api authentification, // then get a ...

-1
Q: Convert PHP code to Objective-C code

jigsThe below is the PHP code, I want to convert that into our Objective-c code: Fuction 1: function restOpenStatusMobile($strTime){ $arrTime = json_decode($strTime,TRUE); $today = strtolower(DATE('l')); if($arrTime[$today]){ foreach($arrTime[$today]['open'] as $key => $eachTim...

0
Q: Categories in alphabetical order (magento)

Kevin SI am trying to list all the categories in alphabetical order in magento but it is not working. <?php foreach ($this->getStoreCategories() as $_category): ?> <?php //arrange by Letter foreach($_category->getChildren() as $_sub){ $let...

0
Q: Count no of slides in a presentation file using php

ArpitaI want to get not of slides present in a ppt, pptx, pps, ppsx file For example I used preg_match_all("//Page\W/", $pdftext, $dummy); to get no of pages present in but same is not working for the ppt.

0
Q: take Web History from all browser and use in php

saurabh2836hi all i want to retrive all the history of the browser to store all the urls into the database for all browser will doing all research i found a software download it from here how is that software working Please help any idea ,any suggestion are appreciated

0
Q: String could not be parsed as XML

PrakashThis is for getting IP location query. public function getGeoLocation($host){ $ip = @gethostbyname($host); if(preg_match('/^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:[.](?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$/', $ip)){ $xml = @file_get_contents('http://' . $this->se...

-1
Q: fetch record in database of update_date='''

user2956036$lin=mysql_query("select DISTINCT Comp_name from foreign_data GROUP BY Comp_name ORDER BY Comp_name ASC LIMIT 0,10 where update_date=''");

0
Q: Sending email by form without refreshing

LethysekIm creating page with parallax scrolling, contact box is in last section. If im use simple html + php contact box, page will refresh to first section, so user will have to scroll back to contact section to see result. To correct this Im trying to make script that will send email without reloading...

0
Q: passing php array to script via jquery.get()

SaintTronbelow is a my script $scope.items = [{"id":"1","name":"name 1","description":"description 1","field3":"field3 1","field4":"field4 1","field5 ":"field5 1"}]; i made a data.php to simulate the array <?php getaccessories = array("id"=>"1","name"=>"name 1","description"=>"description 1","field3"=>...

0
Q: Check if a date exists in JSON object

harrygI have a php array of dates and a native html5 date input box. I have output the date array to a json object to allow use with javascript: <script> var date_array = <?php echo json_encode($aDates); ?>; ... This gives output like so: var date_array = { "2013-12-05": "2013-12-05", "2013...

-6
Q: how to create the APIs

user3069708how to create a API Please Explane step by step process kindly help me i am new to this API i have not tryed till now the APIs take input in key value pair style (not in REST style) and responds to the client in XML format. Authentication is through exchange of a login id/password combinati...

0
Q: codeigniter + google-appengine - all links go to index page

eddard.starki am using google-appengine for the first time. I am trying to upload a website which i have worked with codeigniter. i have successfully uploaded the website. but the problem is that whenever i click on a link it goes to the same index page. even the css and js. my app.yaml is pasted below - a...

1
Q: Ajax call back not called. How to tackle this?

Sanjay RathodAgain i am here for your suggestion i have some ajax call for run code from editor which is php online editor you guys can check in my site - http://web.guru99.com/ I have some ajax call for send the data of editor and recieved output. you can check this problem on my site http://web.guru99.co...

0
Q: Yii - How to write validation rules for a CFormModel

user3004356I'm new to Yii framework. I 'm using Yii framework for my application. Now , the data is extracted from XML file and not from database.The data entered into textfield is also converted to XML file. The model class extends CFormModel . I have a textfield that should allow only integers. I did a fr...

0
Q: PHP Session Keep Alive

John SmithOnce my users login, i create a PHP session for them and store the user id in the session. But sometimes the user's session times-out and the time is not really predictable as it happens at different times. A user is sometimes doing something on the site which takes time before they press save at...

0
Q: PHP include contents of another directory

paranoidFor example, My website is mywebsite.com. Public_html is the main directory and inside public_html there is a folder sub_dir and a file index.php. sub_dir has the following files: index.php , profile.php , contact.php Now I want public_html directory to act like sub_dir directory. Like if I vi...

0
Q: file_put_contents vs unlink and copy with image

MichelIs it safe to do: file_put_contents($userfile,(file_get_contents($tmpfile)); unlink($tmpfile); on an image when rename($tmpfile,$userfile) fails? Both files are .png. I have some problems with renaming the $tmpfile on one particular webhoster (using MS IIS 7). When the $userfile not exis...

-1
Q: Best API for search available free, what about freebase?

DeepanshuI am working on a website, in which if a user does search, I show him its image and description. Till now I have got to know is: Entireweb search API was free and working, but it now says "The service has been discontinued". The Custom Search API is amazing, but somehow paid Now I have come to...

0
Q: programmatically assembling paragraphs for descriptions

a_programmerI have a number of dynamically created pages, each has a number of keywords associated with it. I want to be able to create method that will assemble a little description of each page but I don't want them to all be the same. I have a pool of sentences to choose from that are designed to accept...

0
Q: htaccess specified in codeingeter

user2833721I have some problem in .htaccess in codeingiter it will generate the error No input file specified and my url are http://cg.alpcube.com/index.php/home/register if i remove index.php then it will work perfectly And my .htaccess file are as under RewriteEngine On RewriteBase / RewriteCond %{REQU...

0
Q: Error while printing a string with special characters in PHP

Barcelona TsandeshI need to print the following string but got another output in php. $test = "?s'd – b]zel/"; echo $test; and the output is:: ?s'd – b]zel/ I need the same string on output. The character '-' is special character in Nepali font. But, it's showing – instead of –. So, what will be the...

0
Q: Opencart VQMod add extra data to order confirmation mail

MathlightI'm using OC version 1.5.5.1 The thing is that i want to add some extra information to the confirmation email of an order through VQMod. I've got this script ( part of the whole VQMod file ): <file name="/catalog/view/theme/kadobos/template/checkout/checkout.tpl"> <operation> <searc...

0
Q: php CAPTCHA with jquery validation rule

nehaJI am having a problem with jquery and CAPTCHA OF php code,I am having total CAPTCHA code validation in php but I want to create a validation rule in jquery.I tried but it is not run. <?php session_start(); $cap = 'notEq'; if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($_PO...

0
Q: Not getting multi selected drop down values in form submission page

JenzI have two drop down boxes named domain and addeddomain. I am adding items from domain to addeddomain using javascript. HTML <tr bgcolor="#eeeeee"> <td height="45" align="left">Add Domains</td> <td height="45" align="left"> <select name="domain" class="domain" multiple> {loopsta...

0
Q: Approve users from table - check box

Jogn SmitI'm writing an php script to approve users that registered on my page, but i'm facing a little problem when i want to approve them. Here's as far as i could get. Table: <?php mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("activation") or die(mysql_error()); //Use...

0
Q: Laravel migration transaction

olivarra1When developing i'm having so many issues with migrations in laravel. I create a migration. When i finish creating it, there's a small error by the middle of the migration (say, a foreign key constraint) that makes "php artisan migrate" fail. He tells me where the error is, indeed, but then migr...

0
Q: Add Default Telephone Field in Customer Registration Form in Magento

Kapil GuptaI want to add default telephone field in our website Create and Account form, but i can not solve this problem. Please give me some solution for this problem. Link for Form : http://gmr.goecommercebaby.com/customer/account/create/

0
Q: Where to go from PHP

Bart FriederichsFirst, I hope I am not offtopic. I tried to find another StackExchange site for this question, but wasn't able to find one. Feel free to migrate this question to the right place. Here goes: I have been using PHP for around 13 years now and always liked the ease-of-use to quickly hack something t...

0
Q: How to send pushNotification?

Amit JayaswalI am creating one PushNotification in Android. I created on local server. I am able to register my device to GCM Server, and I also sending the regId, username and email to my server, and these information is saving successfully into the database. But main problem is that when I am sending the no...

0
Q: check same value while loop

drenoHow can I check a while loop for same value on two specific column? If the same value exist on two columns then the output should be different than if there are no matches. This is the while statement I have right now: Database connection: <?php $sql="SELECT id, name, phone, primaryfile FROM `...

0
Q: Elasticsearch index search with different limits

Mihkel ViilveerI'm using elasticsearch to serve people when they are using dropdown. So far, so good. Right now I'm trying to figure out is it possible to search from different types with different sorts/filters/limits. So far I've found my way out with different filters per type and kinda with sorts. I've ach...

0
Q: php generated html table using ajax to apply user actions like delete, update and edit

CheekyPeekyI'm new to ajax and would like to use it with php to create a table that a user can edit in the front end of the webapp. this is what i have so far... PHP class genTable{ public function table1(){ global $data; $result = $data->getData(); //from another class echo '<...

-1
Q: Get team result win loss and corresponding column

user3073707How can I get corresponding columns from a win and loss query in mysql? I want find out how many wins a team has. I will find that out by doing a count of the number of games that team has won and loss. display record max won team first. Table: schedule =============== sid draw top bot...

0
Q: PHP File Download Error

user2333916I have a website with an image gallery and a custom build lightbox. I'm providing the visitors to download the current displayed image. The url param's are passed properly, but somehow the script will only work on the first image the visitor downloads. After that im getting the error Warning: fo...

0
Q: Sorting records in MySql/php based on near-identical multiple columns

sridharAssume I have a following in a MySql table: In this table the values for some of the records (sub 1-7) may identical or near-identical; as in case of Bill, Bush and Kate. I want to sort the table based on percentage relatedness among the records. As you can see Bill and Kate are nearly identic...

0
Q: How to add the Cart buttton on top of the page in Woocommerce?

Debakant MohantyI am developing a site using Wordpress+Woocommerce I am having a problem here, how to add the cart on top of the page that will dynamically change the number of products and price,each time a user adds a product to cart?

0
Q: How to use php curl in searching and outputting from another website?

user3056723I am a student who is new to the web developing world.Please bare w/ me for having some mistakes and insufficient knowledge. My question is how can I use php cUrl in this problem, I made a php file that serves as an index or frontpage for another website. What we were ask to do is create a searc...

0
Q: Display the Sonata Admin Bundle inside a view of a Symfony Bundle

Secular KidMy question is simple but I don't think that the answer is. I'll try to be clear as possible. I have the Sonata Admin Bundle, that allows me edit or view tables, etc. It's ok. I also have a custom bundle (where my main app is). The interface of this bundle has been created with twig calling jav...

0
Q: Counting Variables using PHP

BITmixitBuilding a simple jQuery/PHP setup where for example the PHP will store 5 variables each containing a simple string. These variables are all separate and not in an array. The jQuery used is just a simple fadeIn/fadeOut function which fades out the 1st string and fades in the 2nd string. Got all t...

0
Q: Getting a pivot column in Eloquent query

Patrick ReckI am trying to retrieve some models and a pivot column in the same query. I have 3 tables. materials id | name items_fabrics id | name | item_id items_fabrics_materials id | fabric_id | material_id | percentage Using Item::with('fabrics', 'fabrics.materials')->find(1); I can get all ...

0
Q: YiiMongoDbSuite not working

Ayyanar GThanks for reading ,im using YiiMongoDbSuite extension to connect to mongo db i downloaded mongo-php driver from https://github.com/mongodb/mongo-php-driver/downloads added php_mongo.dll in /ext folder, modified php.ini file ,but still getting below error, include(Mongo.php) [<a href='func...

0
Q: Display Each Row Where URL Variable Corresponds With Database ID

Andy NaylorI have a URL that is dynamically generated: https://mywebsite.co.uk/report.php?taskid=25&rep=1&rep=2&rep=3 I can retrieve the variable for the task ID and rep fine: if (isset($_GET['taskid'])) { $taskid = $_GET['taskid']; } if (isset($_GET['rep'])) { $referenceID = $_GET['rep']; } What I'm t...

-5
Q: PHP array item value to wrap with array

George GarchagudashviliExample. I have this: 'item' => array ( 'blah' => array ( 'foo' => '5.83', 'bar' => '80', ), ), To be: 'item' => array( 0 => array ( 'blah' => array ( 'foo' => '5.83', 'bar' => '80', ), ), ) How...

1
Q: Allowing sessions on multiple sites

user3001689I am working on a site that has a login API. So when people login on my site, they will automatically be logged in to other sites. Is their way by which a session can be setup so that other websites can use it? If not, is their any other solution?

-4
Q: Convert a string date format in PHP

OllyRulesOkI need to convert a string date, it could be 19840325 or 25031984, into this format: 1984-03-25T00:00:00 Any suggestions?

0
Q: Curl upload multiple php://memory files?

Pentium10I've created multiple memory based files like this: $fp1 = fopen("php://memory", 'rw+'); fputs($fp1, "hello1"); rewind($fp1); $fp2 = fopen("php://memory", 'rw+'); fputs($fp2, "hello2"); rewind($fp2); echo stream_get_contents($fp1); echo stream_get_contents($fp2); Now I want these files to be...

0
Q: Joomla! 2.5 Category Article Quick Jump Module

Joey Ng'etheI have searched on the JDE but i can't find any extension that can do or that i can modify. I want a module that query a selected top category then filters the second sub category then displays the articles in the second category as a list in the third input box and on select any of them, it ju...

0
Q: PHP SOAP client fatal error

CiksonI am having trouble run my PHP SOAP client on my machine at work. This is my PHP SOAP client: <?php $params=array("SendMessageRequest" => array( "GsbEnvelope" => array( "MessageHeader" => array("SenderId" => "000000001", "ServiceId" => "000000002"...

0
Q: click counter in php using jquery

gauravishereI am trying to create a counter which counts the number of clicks and updates the counter in the database by one. I have created a button, on click of that i am sending the counter's value to the database. and trying to get the updated count at my first page. my code is - <!DOCTYPE html PUBLIC...

0
Q: Smarty and objects private properties

Kurt BourbakiSmarty allows to access object properties using this syntax in templates: {$object->property} But (If I understood this correctly) this is possible only if property visibility is public, otherwise it seems that Smarty won't be able to access it. In Java I'm used to create objects that have pr...

0
Q: Get progress of operation via ajax+ php

Medma InfomatixI have a situation where my main task is to lookup domains names and respond about availability of a domain.Now the thing is this is a time consuming task.. Roughly the script taskes 25-30 seconds to complete.. I call the time consuming task via ajax..At the moment the script dumps entire data ...

0
Q: No alert in success function

user2834795I am trying to insert value in database from jquery ajax and i want whenever data insertion is successfull, a result output comes true other wise "error:failed". My entry in database successfully updated, but when i alert(msg), its doesnt give me message. <script src="http://ajax.googl...

0
Q: APNS message not delivered after period of inactivity

Marion McKelvieI am using PHP to connect to APNS and generally it works fine - I'm still in the sandbox environment, I haven't used production yet. I initially used PHP code based on the Ray Wenderlich pushchat tutorial and then moved to ApnsPHP, running on Ubuntu. My server process makes its connection, poll...

0
Q: Reversing the PHP file() function

MicheleI converted a .php file to an array using the file() function. Now I modified the array and I want to put all it contents back to the file (keeping line endings)... Someone can tell me if there is a function that does the opposite of file()? I want to bypass the annoying "array to string conversi...

0
Q: Image upload and Image manipulation in Codeigniter is not working

Mukta RoyEverybody I am facing problem with image displaying,manipulation and thumbnail creation.My image upload is ok and it's stored in uploads folder then thumbs folder.Now i want to display these images together in a view page.Here,is my code.Please,please help me.I am waiting.Thanks in advance. Her...

0
Q: HTTP overhead in case of api centric webapplication

graphicmistI am writing an REST api centric web application. Will be writing apis and separated web front-end. Comparing the internal php call with the HTTP call, even if its local, how much overhead my server can handle. Need suggestions/ideas on this one.

2
Q: MySQL sub query fails the whole query

zzlalaniI have a situation where I need to generate rows with random data out of the same table's valid data I have generated ID by php rand($min, $max) function with $min = 1 and $max = [SELECT MAX(ID) FROM patient] - 1 Select tblFirstName.FirstName, tblLastName.LastName, tblBirthDate.BirthDate, tblL...

0
Q: jQuery .prop() assigning incorrect values to HTML/PHP form

Georgei'm using PHP to iterate through a table of items, with an update function to change the item quantity. i'm creating a new update form for each row within the table, which does the following: passes the item rowid through a hidden form element passes the user input of the quantity to change pa...

0
Q: simple-html-dom::restore_noise to parse an on-page javascript

Craig MorganI am trying to parse some a javascript on this page: http://www.chrystals.co.im/residential/Ramsey/House/Gardeners-Lane-Ramsey1117/view-map/1117 However, when parsing the dom, simple_html_dom removes what it considers noise and hence does not allow me to get the inner text of the script tags. ...

0
Q: How to quickly search through a very large list of strings / records on a text file?

ShawonI have some text file size(500mb). I need a script that search given string from this text file as first as possible. i was trying $query="demo"; $FileName = "search.txt"; $fh = fopen($FileName, 'r') or die("Can't open file"); $data = fread($fh, filesize($FileName)); $items = explode(" ", $data...

0
Q: Forward POST request to an other url with Silex?

Roman AllensteinI have a search form with some input-fields. The form is located at /search/ and is transferred via POST. If the form is fired i want to forward the user to /search/{one_parameter_from_form}. The parameter should be encoded and cleaned for use in urls. I tried the following: $app->post('/search...

0
Q: How to make Doctrine 2 work with Oracle Timestamp(6)?

mneuteI have a column of type timestamp(6) in my Oracle database. On Doctrine's side, it is a datetime type. The problem is that, while i've found a way to make PHP Datetime work with microseconds (using this trick : http://stackoverflow.com/a/4414060/2335098), Doctrine still refuse to handle the micr...

0
Q: regexp: match all but every <(pre|code|textarea)>(.*?)</\\1> in an html document

user2012407It's a challenge! As the title says, I would like to match everything but the content of the tags <pre>, <code> and <textarea> in an HTML document (for example you can try on the following text). The purpose in my case is for a compression of html with removal of \n \t \r and other cleanup exce...

0
Q: How would I calculate this?

user2911924I have a website where users enter data including hours, for example they enter '1:00' (Meaning = 1 hour) and '00:15' (Meaning = 15 minutes) and '2:30' (Meaning = 2 hour and 30 minutes). Now I need to make show them how many hours they have entered in total, when I calculate it by just doing $co...

0
Q: how to send push notification using phonegap and parse

Bikash MondalI am creating an android app using php,jquery and phonegap. I have searched so many things in google but i cant find to send push notification. I have seen this Phonegap and Parse.com Push Notifications IOS But i am not clear ho can i get deviceToken. I have also seen the below https://parse.c...

0
Q: Print JSON with PHP, without making multiple roots and making it pretty

Kresten ThorndahlI have a .txt file where I have list of Windows 8 apps, written in JSON, that is being used in an Windows 8 app. I want to be able to have an online form, where I can input a new app, and then it puts it in the JSON .txt file. It Works find with the PHP file_put_contents and the JSON_encode, but ...

0
Q: PHP: 2 Domain names, 1 session

user1775598I've got a site hosted with Heroku. Heroku assigns my site a domain name of someName.herokuapp.com. I've got a custom domain name www.someName.com which points to someName.herokuapp.com. For consistency purposes in my config file I have a variable: $ServerPath = "somename.herokuapp.com/"; That...

0
Q: POST data encoding for request to Hackerrank API

Rodion GorkovenkoHackerrank API documentation explains how send POST request to it. However, 'source' and 'testcases' parameters supposedly should be encoded, though I could not understand how exactly. I tried urencode (in PHP) on each of them and then building string with = and & characters, but I get "400 bad ...

-1
Q: logging in and out of the database using PDO

user3047348with PDO - not regular mysql - i'm tryna prevent sql injections penetrating the file... Here's the form for user login: <html> <form action="logins.php" method="POST"> <ul> <li> Email: <inp...

-2
Q: PDO bindColumn using fetchAll

gvgvgvijayanhow to use fetchall with bindcolumn in pdo since there is no detail about fetchall using bind column in documentation http://www.php.net/manual/en/pdostatement.bindcolumn.php

2
Q: PHP if else echo

KarolI have problem with my code. I have this code: <?php include "../config.php"; ?> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Title</title> <link rel="stylesheet" href="../style.css" type="text/css" /> </head> <? if (!empty($_SESSION['LoggedIn'])) { ?> <...

0
Q: PHP: How to delete every array entry if the index is higher than n?

user2718671Following problem: I got an array of objects. It looks like: array(3) { [9041]=> array(1) { [0]=> string(0) "" } [0]=> array(1) { [9802]=> array(2) { [2614]=> array(6) { ... } [2354]=> array(6) { ... } } } [1]=> ...

0
Q: Filter module CakePHP

Erik Van de VenProbably this is not the smartest question. But I'm quite new to CakePHP and the MVC model. Now, creating a simple website with connection to a database is quite easy. But I need to expand the website with a Filter module, like on http://www.femme.nl/badmode, left sidebar. But how to do that? I c...

0
Q: Wordpress - Archive page links are redirected to some other pages. How to solve this?

Newbie StarrI am new here. I've created my own theme for wordpress and installed it. it works fine with some issues. Here is my archive page. This archive home page is fine. gsecanopy DOT com/for_forums/archive_home.jpg When I click those any links it's redirected to a correct URL. eg: 1. if I click NOVEM...

0
Q: Populating webpage from clicking a product link

BullI have a template webpage that i need to populate with data from a database. That is easy enough. However the problem comes from the means of getting there. I have a list of stock items on a site. I would like to be able to generate a webpage with more detailed information when a customer clicks ...

0
Q: how to change the user registration form in joomla

HASSAROVHello I'm new to Joomla and I want to change the user registration form style (in Joomla 2.5): the problem is i didn't find any css file to change the style. this is my page What ways are there?

0
Q: How to register Android push notification in PHP server?

Harish KoonaI'm new to Android and I want to learn about push notifications in Android. Can anyone please help me out with good tutorial? I'm using PHP in my website.

0
Q: Magento - custom invoice id format

Shiv KumarI want to re-numbering of invoices. The renumbering should be composed as follow. INV-00001-13; INV-00002-13; O-00003-13; ['INV' for invoice, 5 places for the number; “-“ ; current year. Next year this numbering should finish in 14 (from 2014).

0
Q: Undefined variable when it is under isset

Subhajit SarkarCreate a sum of multiple array, but it shows undefined variable Total Box Charges: <?php if(isset($box_chrs)){echo $a = array_sum($box_chrs);}?><br> Total Installation Charges: <?php if(isset($instl_chrs)){echo $b = array_sum($instl_chrs);}?><br> Total Other Charges: <?php if(isset($other_chrs))...

0
Q: small-menu.js doesn't trigger the click in wordpress

domdomI've been trying to add small-menu.js to my website. When the screen is smaller, the main menu disappears, words 'Main Menu' appear instead, which is the right way forward, but it doesn't click in order to open the menu and I can't manage to find the problem- I've searched and tried and tested di...

0
Q: Is there a way to detect fake domain name of email address? Using Perl, php, javascript?

LuciIf anyone knows how can we detect fake domain names of email addresses, it would be a great help. Note, that I don't want to validate an email. I want to know if the email domain name exists or not.

0
Q: Create shortcode with parameter in PHP Joomla

D.ShinekhuuI've created a simple shortcode plugin on Joomla. Actually I am trying to integrate Cleeng Video with Joomla. And will connect it's users in the future ( I hope ). I've stack on creating shortcode's parameter. I don't know how to parse it's parameter and value. My Shortcode is here (no parameter)...

0
Q: Wordpress + bbPress + xampp results broken stylesheet links

Xun YangI'm trying to add bbPress to Wordpress, which is installed on my local XAMPP server. Everything is fine except the static file links. So the url looks like this: http://localhost/wp-content/C:UsersxunDropboxcodeswebsiteswordpresswp-contentpluginsbbpress/templates/default/css/bbpress.css?ver=2.5-...

0
Q: Select & Submit images Form / java-script

TransformBinaryI have been researching ways to submit a form with the images selected by users. I will give the users a set of Images , they can choose multiple. Method 1 If image is selected, add input via onclick() with the selected Value. [Possible?] Method 2 For each Img , load hidden input , let users de...

0
Q: How to get coordinates from Hardware GPS in JS/PHP?

Paulo RobertoI've found a lot of questions about GPS Coordinates but no one that confirm using the mobile hardware GPS instead of Web GPS like geoLocation and such so. My actual method: I'm using navigator.geolocation.getCurrentPosition(), the Lat/Long comes from Web, heres the code: function getGPS(funcC...

0
Q: How to access internal array key [answer]?

PHPGeekI'm having an array named $questions_data as follows: Array ( [question_id] => 24440 [question_parent_id] => 0 [question_subject_id] => 12 [question_topic_id] => 212 [question_directions] => [question_text] => &lt;b&gt;Length of the common chord of the circles &lt;i&gt;x&...

0
Q: 500 internal server error in mvc project

Rahul Prajapatii'm developing a mvc project but when i run my index.php file it is giving me Internal Server Error. my code is as follow .htaccess RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(.+)$ index.php?url=$1...

0
Q: How to group results on a page?

user3067299I am looking to group results name wise.This a result between two dates,but instead of name in one row it is displaying repeat.Where am i making mistake.Code is below- You ca see this fiddle link http://jsfiddle.net/Eugenenf/K5vRe/? <?php include_once('db.php'); if(isset($_PO...

0
Q: Magento EE 1.13.0.2 partial reindex

user2696399I'm having a problem with magento partial reindexing in the EE. When the indexers are set to on save (in system->configuration->(Advanced)Index management) the url_rewrites don't update. If I save a product in the backend, then look in the table enterprise_catalog_product_rewrite there is no ent...

0
Q: PHP generate sql where clause from array

Paolo RossiI would like to create dinamically in my php class a where clause from a array where are defined search fields. $search = array('brand' => 'something', 'model' => 'something'); $myclass->testarr($search); CLASS public function testarr($search){ if (!empty($search)){ foreach ($se...

0
Q: Trying let user upload files to my website but there are some errors

user3074143Here is my HTML code : <form enctype="multipart/form-data" action="new1.php" method="POST"> Choose File: <input name="userfile" type="file" /><br /> <input type="submit" value="Upload File" /> </form> And this is my PHP code : <?php $path = "files/"; $path = $path.basename( $_FILES['...

0
Q: Google Freebase API to fetch Name, Image and Text at once

DeepanshuPresently what I do is call the following APIs $url = 'https://www.googleapis.com/freebase/v1/search?query='. $query; // to fetch name and id and using the id from the result of above API, I execute two more APIs to get the text and image $url = 'https://usercontent.googleapis.com/freebase...

0
Q: Stop rendered Select escaping HTML in Zend Framework 2

AborgroveHope this isn't really obvious. I am creating a select element, with multiple options, each option has a mathematical symbol in it. A simplified version: <select name="comparison" class="form-control filter-field toggle-display" data-replace-id="from-value"><option value="1">=</option> <optio...

0
Q: MySql Modified preorder tree to create url

Mahavir MunotThis question is based on my previous question on stackoverflow. This time I am trying to generate urls for all the rows in pages table using the Modified Preorder Tree method. Here are the MySql Tables: Category table: Pages table I am trying to write a mysql query that will generate URL...

0
Q: URL Rewriting in htaccess specific demands

user2834820I have specific demand... I would like to make URL rewriting in .htaccess file that works on a next way: If user open url: /user.php?id=1 Needs to be redirected to: /user/1/ If user open url: /user.php?id=100 Needs to be redirected to: /user/100/ If open: /getJson.php?id=1 Needs ...

0
Q: Data from column as IF condition and value

user1947443This is an odd one. I'm trying to use data from a column as an operator and value. It's possible that I could separate the condition and value (for better data type usage), but my issue would remain. Column 1 Data: 50, 3, 70, 2 Column 2 Data: < 1, >= 5, <= 7, > 1 I'd like to construct an IF...

-1
Q: POSTGRESQL - Need column values imploded/concatined with "," for a particular group by query

rohitmbhere is what I'm trying, I have a table like below a b c 1 2 x 3 4 x 5 2 y 2 3 y 8 9 y now when i do a query select c from table_name group by c; i get (x) and (y) now what i need is ([1,3], x) ([5,2,8], y) how do i achieve this in PostgreSQL like we do ...

0
Q: CodeIgniter Database 'autoinit' not working

StanyerWe've recently aquired a new development server, and after moving all of our files over to the new server we have been experiencing an inability to connect to MySQL through CodeIgniter. All of the login details worked, permissions were correct, etc. I've found that setting $db['master']['autoin...

0
Q: Sql- Insert in first empty column in a row Mysql error

user3074164I have looked around for a solution to my problem but can’t see anything similar online. I am working on an sql script to insert values in the first null column in a row. Am getting this Mysql error: Error: You have an error in your SQL syntax; check the manual that corresponds to your MyQL ser...

0
Q: Linux directory permission setting

Naveen GamageI'm trying to rename a folder created by another user. Lets say the folder name is data owned by myuser and group is myuser. These type of folders will be created using automated script run by the use myuser. And now I need to rename those written folder via PHP EXEC functin which runs by www-d...

0
Q: MVC Router determination

php_nub_qqI'm trying to build myself an MVC framework. The base is completed and it seems to be all good. Now I have returned to the routing system to add other types of request handlers. Problem is that it's really messy inside my head and my tutor didn't really do a great job at explaining clearly, so ba...

0
Q: HTACCESS Clean URL without breaking the Query String

Navneil NaickerThis code below does exactly what I wanted to do, but the problem is that it breaks the query string. Whatever am passing into the URL is not being recognized by PHP $_GET. Is there a way I can use this code and also not break and query string am using on URL. I' am just a beginner with HTACCESS...

0
Q: Creating static file on postPersist and postUpdate Entity in Symfony2

Aman VarshneyI want to create a static twig file whenever a operation like persist or update will be done in Admin. What i am thinking is to create a listener called GenerateStaticListener. The listener will listen the events postPersist or postUpdate and called the custom function. The Custom function will...

0
Q: Displaying Drupal taxonomy term desciption in node

Gaba RinochekaFor variuous reasons, I am using taxonomy terms for authors. Each blog node has a term reference field - field_authors - which lists one or more authors. What I would like to do is display the term description for each author listed in the page. My searches online got me the following code which...

0
Q: Issue passing an array from PHP to Javascript (Jquery) as shown in common answers

GabzI'm trying to pass an array from an included php file to a javascript (external too); They both seems to work because: 1) if I try echo json_encode($array) on the main page instead of passing it in the script, the output is correct; 2) if I copy and paste this output to the javascript, the script...

0
Q: php - foreach loop anomaly

Stu2000I have a section of code that loops through an array of sql queries like so: $cached_queries = array(); foreach ($queries as $index => $query2) { $query2 = trim($query2); if ($query2 != "") { if (isset($cached_queries[$query2])) { $err_msg = $index . ": ...

-1
Q: Using html form to import csv data... using PHP script load data infile and MySQL

Dave MartinI'm having trouble getting this script to work running on a MAMP local server: <?php //Uploader Script for mass upload of devices. //Check for errors if($_FILES['file_upload']['error'] > 0){ die('An error ocurred when uploading.'); } //check file type is csv if($_FILES['file_upload']['type']...

0
Q: Implementing OAuth to REST API

Jejew91I'm currently developing a RESTful API in PHP an I'd like to implement some user authentication to it. I have read through some literatures and the most efficient/secure way to allow authentication through rest api seems to be the use of the access tokens via the oauth protocol. I have understoo...

0
Q: Resetting memcache key data after a data change

diggersworldI've been reading around the web about memcache. I have found lots of examples which discuss the flow of setting and retrieving data with memcache such as. REQUEST data key from memcache IF key not found THEN get data from DB and store result in memcache ELSE get data from memcache That's perf...

-1
Q: How does websites Keep Track of IP Addresses

Taha KirmaniI have created a website and i want to allow specific IP addresses to be able to visit this website. But after some research i found out that IP addresses changes everyday. Kindly tell me is there any way to obtain this thing?

0
Q: script php that return an image file

ipelit's possibile to create a script in php that is used in img tag to show an image, for example: <img src="http://domain.com/img.php?id=1" /> and when is called the script count the impressions (no problem here) and at the end return the image in gif/jpg format. for now i use: header( "Conten...

0
Q: How to get State and city from Longitude and Latitude

Gautam3164I want to get the address from the Longitude and Latitude that I have in Db.I have tried like $geocode_stats = file_get_contents("http://maps.googleapis.com/maps/api/geocode/json?latlng=23.0333,72.6167&sensor=false"); $output_deals = json_decode($geocode_stats); $country = $output_deals->results...

0
Q: Custom URL link url

user3074251I'm trying to make a user system which will have accounts like /user/Username instead of users.php?user_name=Username and I tried to search over the internet but I couldn't find anything good.

-1
Q: Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in

jash389I get this error every time I run the code, I tried going through other similar threads but it didn't help. I am newbie $count=3; $db = new mysqli ('localhost', 'root', '', 'test'); $selectSQL='SELECT * FROM coll_mark WHERE univ="'.$_POST['univ'].'" AND '.$brachTxt.'<...

0
Q: Best way to output datas after insert record on database with ajax / json / php

Gilberti'm working on a project and i would like know wich is the best way for show the data after having insert a record on the database having an complex structure html betweem use the structure in php or jquery and why?. Example of scenario: I'm building a system of posts and comments. When the use...

-1
Q: Simple multi-lingual page system

LethysekI wanna make my website in 3 languages. I made simple system for change language. PAGE //define default lang <div id="sitelanguage"><?php include "lang/pl.php"; ?></div> // example of using lang <li class="menu_glowne"><?php echo $text["menu_naszemarki"]; ?></li> Language file (example pl.ph...

0
Q: SQL Injection, The way of commenting

revoI'm working with injections and tricks behind them so I came across with the way of commenting MySQL queries by #. As all we know about using named anchors in HTML, in this case of injecting to URL, # works like an HTML named anchor and doesn't mean harmful for running the query. The question ...

0
Q: How to verify if countdown reaches 0

Radu SuaI whant to verify the timer if is 0 to load the next page if else to place a message until now i have the next code var a = new Countdown({time: 25, width:100, height:40, style : "b...

0
Q: PHP thumbnail generator - a movable rectangle

user3074242I'm kind of an beginner programist and i want to create a PHP thumbnail generator. I already know how to resize and crop images using PHP and i wrote a thumbnail generator that generates thumbnails using the same resize sizes and crop sizes for the every image in the folder. Here is my idea: firs...

 

« first day (290 days earlier)      last day (20 days later) »