« first day (284 days earlier)      last day (26 days later) » 
00:00 - 19:0019:00 - 00:00

12:00 AM
0
Q: PHP passing multiple variables across multiple pages

user1804208My website involves a user submitting data over several pages of forms. I can pass data submitted on one page straight to the next page, but how do I go about sending it to pages after that? Here's a very simplified version of what I'm doing. Page 1: <?php echo "<form action='page2.php' method=...

0
Q: jQuery doesn't posts data to PHP

mariusI'm stucked here for an hour now, I've searched in some topics on stackoverflow but nothing. I have this script <script type="text/javascript"> $('.qty').keyup(function () { var $me = $(this), $parent = $me.parent('div'), total = parseInt($me.attr("data-price")); if (i...

0
Q: API Godaddy - ModifyDNS method

pnovalesI'm working in a solution for my company. I'm using the Godaddy API. The methods Describe(), CheckAvailability(), and OrderDomains() are working perfectly but I'm trying to change the A DNS record with ModifyDNS() method and their response is: [ModifyDNSResult] => <response> <result...

0
Q: PHP mysqli extract data from different tables and echo with 2 while functions

user2996667I'm stuck coding a part of a website. I'm extracting from the first table the friendship for the account you are using. Then i make a while to get all usernames of my friends than i query the profiles table to take out other two information like sex and birth date. My problem is that the first ...

0
Q: Include the Infusionsoft SDK to connect to an Infusionsoft app

user1417996i'm tring to use Infusionsoft SDK to connect to an Infusionsoft app i new to Infusionsoft i was googling but i can not find a good example so : How can i Include the Infusionsoft SDK to connect to an Infusionsoft app ! how can access to Infusionsoft database to test if a person exists in the In...

0
Q: PHP Syntax Error on line 1

user3050958Below is the code for a simple php file with some functions that run perfectly happily when the inside of the php tag is commented out. isLoggedIn() is a function that I know is coded correctly in the session.php file as it is used elsewhere and works. For some weird reason, firefox console is t...

0
Q: REGEX, insert value between ><

Ivan Ristici need to insert a value between every occurance of "><" in my string, but for some reason: ">(.*?)<" Inserts after the < and not between the > and <.

0
Q: PHP / MYSQL Weighted Average?

user3050981Alright, so I've been trying to look for an answer to my problem, but I can't seem to find one. I am trying to calculate the average unemployment rate of a nation based upon the population and unemployment rate of it's cities. I already have an average, but it is not weighted, so a city with only...

0
Q: Ajax call with contentType: 'application/json' not working

SebsemilliaI have an ajax call, that sends form data to a php function. Since I read a lot that using contentType: 'application/json' is best practice I wanted to give it a try as well. But unfortunately my script doesn't return anything when I use it. If I remove it, the script does what it is supposed to ...

0
Q: PDO's lastInsertId for MySQL a race condition?

user3050968I'm writing a PHP file which pushes data to a MySQL database using PDO. Essentially the file gets hit many times very quickly, and the lastInsertId() method isn't keeping up. For example: //sleep(rand(100,1000)/100); $sql = "INSERT INTO `testing` (`name`, `timestamp`) VALUES (?, ?)"; $this->dbh->...

0
Q: Wordpress adding a tag and changing the URL on load

nicholmikeyI have a custom post type "profile" I need the same profile to load when requesting 3 differnt URLs, example: mysite.com/city1/bob mysite.com/city2/bob mysite.com/city3/bob These should all load bob's profile. I added the cities as categories and assigned bob to each category. Now when I ...

0
Q: Browsers fail to display my PDF blob file coming from MySQL using PHP

user3050982I'm working on a piece of development where a PDF file (no large than 5 MB) is uploaded on the database.. I know this type of upload isn't recommended, but have to work with this. Following is my php page that gets the file and tries to display in client browser <?php header('Content-type: app...

0
Q: MYSQL-Insert value in first empty row of column and read other values in same row

user3043277I have an sql statement that will insert a value to the first empty cell (first empty row in column). And if I ran the php script again, then it inserts into the next null cell etc. Problem: I also want to find out the ID of that row, and value of another column in that row. In the Mysql table be...

0
Q: this is not updating even tho there are no reported errors in this php or sql

MultiMediaHere is the page that is supposed to allow a logged in member to transfere an amount they choose to another user on the system i have been working on this for days and found little about it online that actually helps and only found a few snippets here and there that used prepared statements which...

 
12:43 AM
0
Q: PHP month payment filter

user2827404ok still on the php learning curve. ive been building a simple books system for myself as a way to push my basic skills. i have a list that is pulled from a database of information i have inputted. i was woundering if there was a way to filter it to a month if needed to look up a months informat...

0
Q: What is wrong with my php order form?

user3033100Ok so this was just working on my site so it is suppose to if notice a line of code when they have submitted there order form it was working but is not working any more here is the code can you see what is wrong please any help would be appreciated. <?php //Template for basic page $template = <<<...

0
Q: How to Efficently count user's rank by amout of likes?

DJaYI have an array, that looks like this, $users = array( 0 => array( 'user_id' => 'user_1', 'likes' => 50, ), 1 => array( 'user_id' => 'user_2', 'likes' => 72 ), 2 => array( 'user_id' => 'user_3', 'likes' => 678 ) ); All I want to do is to im...

0
Q: using return value of PHP userdefined function in smarty template to disable a button after clicking it if the retuen value is "success"

user3050997I am using a smarty template in which I have got a button, if I click that button then it should trigger a PHP userdefined function in someother PHP file. Based on the response from PHP userdefined function it should disable the button in smarty tempalte. How to achieve this.

0
Q: Symfony routes in App Engine

user3050991Although we had some difficulties, we finally achieved to make our Symfony 1.4 application work fine in App Engine. However, we are experiencing a problem related to the routes in Symfony. From App Engine SDK (localhost) everything works perfect. If we access the URL: http://localhost:9080/use...

0
Q: Create thumbnails on the fly with cache or on upload?

Mushr00mI'm currently rewriting a website that need a lot of different sizes for each images. In the past I was doing it by creating the thumbnails images for all sizes on the upload. But now I have a doubt about is performance. This is because now I have to change my design and half of my images are not...

0
Q: [PHP]How to draw Graph (Chart) of Traffic Profile by Protocol in Snort

user3051014I'm having research, setup and configuration Snort in CentOS, I want to draw and create a Graph of Traffic Profile by Protocol similar Graph of Traffic Profile by Protocol in BASE, but I don't know how to calculate data in a table of database snort to draw it, I need a help to instruction or guid...

0
Q: Heroku and localhost disparity

user3051013I'm trying to write a Flask application that incorporates a PHP script via a POST request using the requests module. I've had success on my local machine where I post requests.post("http://localhost/webapp/templates/script.php", data=blah) and everything goes as expected. However, when I push...

-1
Q: Setting Twig up correctly

DugiI have downloaded the tarball from Github including Twig's source, but it's quite unclear to me which parts of the archive to include in my project - there is nothing written about that part. Sorry that this question is so short, but this is really something I couldn't find in their documentati...

-3
Q: Creating mailing list database for sending mail

user3051015 I like to set-up a form which will collect the email address of the visitor and save those to a database. Use those email account to email periodically or as required from server side. Using PHP MySql JS/JQUERY

0
Q: while loop only works as intended after an echo

user3051018My while loop fore updating page values only work when i echo the page value in between each loop. when the echo is commented out two pages, just after the $old_position value, gets the same value. if($action2=="delete") { $sql="delete from pages where id=$mainid"; $rs=mysql_query($sql...

0
Q: PHP - MySQL getting value from OUT parameter declared inside a stored procedure

Carl Bear StefanssonI'm trying to get a value from a string declared inside a stored procedure, so that I can use it in my PHP-code. I'm not getting anything back, it's just NULL. I have been at this problem for days now. The procedure: DELIMITER // CREATE PROCEDURE InsertName (IN NewName varchar(50), OUT N...

0
Q: Use buttons to post to a php script

jgetrostBasically I am going to have a control panel for an application I'm working on that is just an array of buttons. I want to pass information about which button was pressed to the script that will handle the actual commands. I can't quite figure out how to use POST do that... Here's some code that ...

 
1:25 AM
0
Q: PHP: While Statement Calculation?

user3050981I'm trying to calculate a weighted average using a while statement, but it's not working. I don't think that it loops through the entire database? $username=mysql_real_escape_string($_SESSION['username']); $empcheck = $conn->query("SELECT unemployment AND POPULATION FROM cities WHERE playername...

0
Q: filter information between two dates

user2827404trying to filter information by 2 text inputs. so they input the dates and it loads the information between the two dates below. i am hoping i can use this to replace my excel sheet. hope that makes sense. code is below, any help would be appreciate. <style> </style> <head> <meta http-equ...

0
Q: How to get the same result from MD5 & base64_encode

Damadboy TheoneandonlyOk so here's my problem, I am trying to use information from my database to create a change password script for a secondary account. However the password for the main account is hashed in md5. No matter what I try I cannot get the base64/md5 code to match up when doing a comparison. This is the ...

0
Q: PHP access variable in an array

Geoff MIf I have an array Array ( [code] => 1001 [qty] => 1 [price] => 12.96 [brand] => Part [returnurl] => http-etc-etc ) How can I access each element and store it as a variable to use? Thanks

0
Q: SQL Optimization WHERE vs JOIN

Cris GI am using mysql and this is a query that I quickly wrote, but I feel this can be optimized using JOINS. users table: id user_name first_name last_name email password 1 bobyxl Bob Cox bob@gmail.com pass player table id role player_name user_id server_id racial_name 3 ...

0
Q: WordPress migrate permission error

Dainis AbolsI have a strange problem, that I have never encountered. I migrated web-site from my PC to the server. Well, I have done this a lot of times, but never encountered this issue. Ok, what I did is, i copied the theme and exported the database and imported on the server + I replaced the table prefi...

 
2:13 AM
0
Q: php string to integer conversion and comparison

Joe JenkinsI'm somewhat confused and was hoping you guys could help. I'm writing something simple that takes a value from the posted name field and returns it, checking to see beforehand that its a string(correct) or an integer(in which case it'll say 'a name is not a number'). <?php $number = array("1","...

0
Q: laravel Auth::user()->id

User1291223Auth::user()->id gives me an error Call to a member function contains() on a non-object I tried to var_dump it object(User)#258 (19) { ["table":protected]=> string(5) "users" ["hidden":protected]=> array(1) { [0]=> string(8) "password" } ["fillable":protected]=> array(2) { [0]=> string(5) "em...

-1
Q: date format change in php to uk date

user2827404hi guys and girls looking to change the date to display in a uk format d/m/y code can be found below anyone got any ideas on how i can do this? <style> </style> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <?php include 'db-connect.php'; $result =...

0
Q: jQuery AJAX response

user3050661I'm trying to rip a template with Ajax and i've almost done all the job now a need some help with Ajax if someone with a good knowledge can help me That would be nice thanks in advance here is the ajax code $( function() { var baseurl = window.location.protocol + '//' + window.location.hostna...

0
Q: infinite in creating function that calculates recursively the factorial in php?

user3051099this is the Question i have in my homework. Using PHP, implement a function that calculates recursively the factorial of a given number below 100.The function should return 0, in case the passed value exceeds 100 and here my answer = 100) { return 0; } return $number * factori...

0
Q: Minecraft 1.7.2 Protocol

John DongHow would I go about building a packet in this format using PHP? I have made a function to WriteData to a TCP socket but it doesn't seems to work at all. Protocol information is found here: http://wiki.vg/Protocol private function WriteData($packet_id, $input) { $input = pack('N', strlen($...

0
Q: How to display images based on their distance to the center image?

user2462090 This example is what I want. I am wondering is that possible to display img1, img2 and img3 based on their distance to the center image?(Say I know the distance between img1 and center is 2, img2 to center is 3, img3 to center is 1)

0
Q: Passing form values from one page to another

Code_Ed_StudentIn my form I am trying to pass acad_id to academy_view.php page. After the form submits I am trying to append acad_id to the url. In this way I can use GET in academy_view.php to pull up the records from mysql db. But everytime after submission the post url has an empty field for id. academy_c...

-2
Q: Inserting weather data into a database (PHP)

user3051095I'm having trouble inserting weather data into a database. No matter what I do, I can't get to work. The first part is the main file, while the second is a class where the api is located <?php include "test.php"; //enter the zipcode here $api = new weatherApi(38501); $link = mysql_connect ...

 
2:44 AM
0
Q: preg match for known value plus 7 charecters

user1789437Can anyone help me get the value of IFC/USD 0.00001031 from the webpage http://infinitecoin.com. I need to grab the value after IFC/USD.. The way I thought to do it was to: $file_string = file_get_contents('http://infinitecoin.com'); preg_match('/IFC/USD plus next 11 charecters', $file_string, ...

-1
Q: Nested Ternary If-Else Statement PHP

Vainglory07I have a script that will tell the user how long he was a member of my website: $h = 1; // hours $m = 23; // minutes if($h > 1) { if($m > 1) { echo $h.' hours and '.$m.' minutes'; } else { echo $h.' hours and '.$m.' minute'; } } e...

0
Q: How can I get all printed text from .php

Astar BekturovI want to localize my website, in order to do it i want to get all printed text from .php files, put them into function like lang('my keyword') and store that keyword into text file. It is very cumbersome to look through all files and extract it manually, do you know anything to make simplify. Th...

0
Q: Cannot get auto-slide to work on one of my sliders

Russell Rusty SpoonsI have a homepage being developed at: http://www.spark-creative.ca/exp_clean/index_new.php There is a slider in the body that shows Hitachi and Microsoft logos. I need that slider to auto-slide at set intervals, but I cannot see where to set that to do it. My developer cannot find it either. Hel...

0
Q: website authentication via url: mask url + ajax + php + htaccess?

RIKThis is hard to explain, better with an example... I have this valid url: www.sitetoautenthicate.com/portal/index.php. To access this page, I want to mask the url to www.sitetoautenthicate.com/portal/myportal/index.php where myportal has to be authenticated (exists in database) through an exte...

-1
Q: Designing Secure Web Service and iOS App

user2105505I am working on building an iOS app and a php/MySQL web service. My intention is for a student to use an iOS device to get educational data from the database stored on my server using a web service. I am new to making web services and server-side programming in general, but I have considerable ex...

 
3:08 AM
0
Q: Iterations issues in php

user2471336I'm facing a problem that I can't solve ... Here it is, I get from a HTML page a sudoku in this form for example : <table cellspacing="0" cellpadding="0" class="sudoku"> <tr> <td class="chiffe1">0</td> <td class="chiffe1">0</td> <td class="chiffe1">0</td> ...

-1
Q: Where to place this code?

user3050506Alright I have been trying to fix this code and searching it up for more than like 6 hours and this is killing me What I am trying to do is try to hide the login table and the background image associated with it (which is #lg #ck) and place a button on top of where the login table is so when it ...

-2
Q: want help to scrape data from a php page and put it in sql database

user3051152I currently have a file that scrapes fine and wanting to adjust the way it scrapes 1 URL - http://www.quanthockey.com/nhl/players/a.php -so the file i have now goes through and gathers all players bio, career stats and playoffs stats ***what i want the file to do now is only gather the players ...

0
Q: Get image url in first post for vBulletin 3

AbdelRahman EllithyI need to make a plugin to make a variable that shows the image src , i need this to make the og:image of fb og. The variable should show the url of the image in the first post in showthread even not hosted on site (not attached image) Is this possible?

 
3:32 AM
0
Q: PHP Pages on My Website Are Showing Up Blank

user2998680I have searched all over the forums and cannot find a answer to my problem. I have tried to install some CMS that use PHP to my website and all of them are showing up blank. I have enabled error reporting in the php.ini and no erros where shown. I am using Debian 7 to run my server. I have instal...

 
3:44 AM
0
Q: BTC-e API - Non Responsive

Modify YouThis is what I have to fetch the Buy and Sell values off of the BTC-e API. http://btc-e.com/api/documentation/ <? function GetJsonFeed($json_url) { $feed = file_get_contents($json_url); return json_decode($feed, true); } $LTC_USD = GetJsonFeed("https://btc-e.com/api/2/ltc_usd/ticker"); $...

0
Q: Picture upload issue with php

schandl2I am new to php and stackoverflow so please excuse any missteps. I have some code that is supposed to allow the user to browse his machine for jpeg, gif, or png to upload. My code works fine from my xampp localhost. I have upload my code to Amazon Web Services where I have a Ubuntu 12.04 server...

 
3:56 AM
0
Q: Getting content excerpt Wikipedia with JSON & PHP

SamI have tried many different variations here - how can I get the content summary from this: http://en.wikipedia.org/w/api.php?format=json&action=query&titles=stack_overflow&prop=revisions&rvprop=content&rvsection=0c Here's what I have so far: $wiki_url = "http://en.wikipedia.org/w/api.php?format...

0
Q: Auto-Increment Form Input Names With $_SESSION

Josan IrachetaI want to use PHP $_SESSION to access user form-inputted data. The flow looks like this: STEP 1 User fills out form. <form method="post" action="review.php"> <input type="text" name="length"> <input type="text" name="width"> <input typ="text" name="quantity"> <input type="submit" value="submit"> <

0
Q: Get string from array via property lookup, but insert a variable

m59I want to use property look-up on an associative array of strings, but there's a catch - I need to be able to use a variable in the string. I came up with two solutions, but both seem hacky in PHP. $foo = [ 'someProp' => 'Some value here: $$value$$.' ]; $myProp = 'someProp'; $value = 'some val...

0
Q: How to iterate Wordpress categories to create filter checkboxes by categories on a sidebar

awongCM In my sidebar.php, I want to create filter checkbox on the sidebar as depicted in the above image. So my filter checkboxes would like in this hierachical format: Animals Bears Gibbons Rhinos Orangutan Campaigns Free the Bears The Orangutan Project The Silvery Gibbon Projet I looked up...

0
Q: WooCommerce - Possible to gift (send) digital product to a friend

user3051223I am building a simple ecommerce site for a friend who sells gift certificates online. I have decided to use WooCommerce as its free and is more than capable of what is required. As all his products are digital, I have already checked and found that Woocommerce supports digital products. However...

0
Q: How do I make a Amazon Webservice Ubuntu server accept Https.

schandl2I have a Ubuntu 12.01 webserver on Amazon web services. One of my php webpages displays information that I wanted to use HTTPS for. When the user gets here I force their browser to use HTTPS. My server craps out at this point. The code works fine on my xampp local host. I have spent hours loo...

0
Q: PHP - Parsing String From HTML File

ScottOBotHey guys I'm parsing a bunch of data from an html file in PHP using the preg_match_all($pattern, $htmlPage, $matches) method (regular expressions) and am having some issues creating the pattern for the following string: href="http://www.free-tv-video-online.me/player/putlocker.php?id=12VT1372H42O...

0
Q: PHP or Perl: Is it possible to pass "value" to a textbox without the "name" attribute?

RobEarth SoftworksGood day. I would like to ask something, which might not even be possible, but I will ask it anyway, who knows. :-) Currently, I have a Perl/PHP script that does login and a little bit of webscraping. It was working perfectly fine for the past 2 years. Then one day, it stopped. I then realized t...

0
Q: Getting a HeartBeat from a C# Application and Posting it To Website

user2678408I've got a Minecraft Software written in C# that I want to send a heartbeat to my site. I've got the way to send the beat already written. if (Server.Uri == null) return; string uri = "http://GemsCraft.comli.com/Heartbeat.php"; // create a request try { ...

 
4:20 AM
0
Q: CakePHP missing controller on EC2

user1443519I have a Cake 2.3.8 app that works fine on localhost and I uploaded it to an Ubuntu 12.04 EC2 instance, but on the index/home file I'm getting a "Missing Controller" error. The CSS, header and footer load fine on the home/index page, but it can't seem to find the controller. Every single other p...

0
Q: Search query redirect mod_rewrie

AlkaneI got the following setup in my httpd.conf: RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule /([^/]+) /?page=$1 RewriteCond %{QUERY_STRING} search=(.*) RewriteRule (.*) /%1? [R=301] When user enters something in a search box like "help", the URL looks like t...

0
Q: RegEx to find a pattern

ManjuI need regex way to do the following in php: Identify if the given string is in the pattern string1_string2_number e.g ph_val_34563, ph_val_296987 etc. When true, extract the number part.

0
Q: How does JSON.parse() do its thing?

MrSpudtasticSo... I am trying to use JavaScript to parse an object returned from an PHP file. The relevant code looks like this: ` var name = document.getElementBId("name").value; var XHR = new XMLHttpRequest(); XHR.open("GET', 'lookup.php?name=' + name, true); XHR.onreadystatechange = function...

0
Q: Parse error: syntax error, unexpected end of file in CODE on line 150 Errors parsing CODE

user3051246i've bee trying to figure this out forever. I have looked every where and cannot fix this. I'm not that great of a coder so I really don't know what's wrong. I have asked several people and they helped me with other errors and then this came up and they couldn't help. it's been error after error ...

0
Q: AJAX - Not getting a simple php response(returns "undefined")

shawn aI don't know why xmlhttp.response is returning undefined after contacting the php file. index.php <script language="Javascript"> var countdown; countdown = setInterval(function(){ var xmlhttp; if (window.XMLHttpRequest){ // code for IE7+, Firefox, Chrome...

0
Q: Accessing OUT param from MySQL sproc using mysqli

user797963I know this example is a little simple and prone to sql injection - it's just a simple example for clarity. Once I get this small test working, I can apply the change to the actual data access function. The stored procedure I'm trying to run has one IN and one OUT param. It works fine running th...

0
Q: Saving the last execute mysql(i) statement to execute again

Mostafa TalebiREQUEST: I need to store the last execute statement (MySQLi) for later execution in a next loaded page DESCRIPTION: I have made a search form as you might already know, the search pages should paginated. I have done all of the settings required for the a search result page to work. it works. but...

-2
Q: howto to get the value of the first row in dataset?

user3024013i am trying to get 2 column in dataset from a query my query is: SELECT cs.name,cs.rank,w.idw ,w.name,w.address FROM custom cs,work w WHERE cs.id='".$name."' and cs.idcs=w.idcs"; But i don't want the result, which i would show to user will have duplicate info( where cs.name, cs. rank wou...

0
Q: Informix PDO - Query returning blank

KimomaruI am new to both Informix and PDO, so please forgive any obtuse questions. I've recently completed configuring the Informix Client SDK on Debian and Apache2 and it seems to be working fine from an authentication standpoint, but I can't get my PHP page to render query results - they return blank ...

0
Q: file size not showed before downlaod start

barnameha Here is my code in php : Download worked but file size not displayed. $infofile="sample.rar"; header("Content-Description:File Transfer"); header("Content-Type:application/x-rar"); header("Content-lenght:".(string)filesize($infofile)); header("Content-Disposition:attachment;filename=sample_fi...

0
Q: My $_SESSION variables are only getting the first letter of each index in my array

CarsonI am working on a class project and I need some help with my PHP. I am trying to return a products table then store the information regarding the products into an array. I then use the array to store the info into some $_SESSION variables. I use those sessions to populate some tables. right now ...

0
Q: how to creat horizontal Page as MySpace?

user3041438how to creat horizontal Page as MySpace? i must set CSS to: height: window.height() and width= total each div in page. but it is inconvenient if I want to expand more div without relation with width of body

0
Q: Google API PHP Client Library on GAE

colink96I'm trying to implement a button, that when clicked, will upload a generic file to Google drive. The following code works fine on my local machine (using Google's SDK for local dev), but when uploaded to Google App Engine it can't get past the require_once statement in slowtest.php. Here is my co...

0
Q: How can i give Input style title background?

user3011508I wanted input title background, but it is not working after refresh: <form name="spe_form" method="post" action=""> <label for="tag-title" >Widget title</label> <input name="spe_title" style="color:#cf0000" type="text" id="spe_title" value="<?php echo $spe_title; ?>" size="10" /> </form>

0
Q: Url structure for profile in laravel using routes

Sagiruddin MondalI am having a sentry laravel 4 setup. at this moment for profile view I should be going to link like this http://localhost/ffdd/public/3/show where 3 is user id and I am using following route Route::get('/{profile}/show', array('as' => 'profile.show', 'uses' => 'ProfilesController@show')); I...

 
5:02 AM
-1
Q: MySQL NOT LIKE is not not working

user3047382For example, I use this: WHERE titel LIKE '%armband%' OR titel LIKE '%armreif%' AND titel NOT LIKE '%herren%' But still get results which include words like 'Herrenarmband' and so on. Whats wrong here?

0
Q: Regular Expression Tester says expression works but preg_match fails

user3051286I'm trying to extract the em tag from a string. On http://www.phpliveregex.com/ my regular expression works but in my code it returns a 0(no match found). $regex = "/<em class=\"correct_response\".*\/em>/"; echo preg_match($regex, $string); /* sample values for the data in $string are togg...

0
Q: How to select IP and check if the time it was inserted is not less than 2min

Eustatia I want to check if the time a message was inserted into a table is not less than 2min from the same IP address. if time is not yet 2min from last insertion, echo how many minutes and seconds left before a user can come back and send a message from that very same IP. I have a column 'mtime' (mysq...

0
Q: Select Data link between 2 select box [PHP+mySQL]

AzhariFirstly thank you for reading my post, I'm trying to make a select box when select one one university from university select box , only that university courses that appear in courses select box using PHP and mysql. could someone give me a tips?, I'm had very small knowledge in AJAX & jQuery. ...

0
Q: Trying to check if username already exists in MySQL database using PHP

user3004041I've looked at the many other posts that were similar to my issue and implemented their solutions (as far as I can tell) as exactly as I could. However, every time I execute this script, the code in the else block is executed (even when the username inputted is one that is already present). The ...

-1
Q: Display form button when user click status changed to disable forever usin phpmysql

user3049432I am devloping one application in this I have given option to users to cofirm some links When user clicks on button the link of the status of button changed to disable. Suppose If only submit button is there in users panel it is easy to disable using jquery,ajax What I want is I want to displ...

0
Q: How can create dynamic password for download a file?

barnamehaI want create a download link of file with dynamic created new password without databaes and with php language. public visitor can download file after typed correct new dynamic password created.

0
Q: PHP exec() Function Creates 1000s of Processes on Server :(

user2538076I am trying to trigger a PHP script from another PHP script using exec() function. On my local system, it triggers the other script. But, when I execute it on server, it creates 1000s of processes & they are running in background :( Here is the reason why I have to do this. I am sending SMS via ...

0
Q: Twig: Q: How to embed php in twig

user3051319I have a do_shortcut and I need to embed it in a twig template. I tried by coping the code in a php file my-code.php: <?php do_shortcut('[my-code]'); ?> Next, in the twig page over.twig: {{ include ('options/my-code.php') }} /* I also tried */ {% php %} <?php do_shortcut('...

0
Q: PHP - Convert long float to decimal

Stephan S.I got a float like this 1.17753e27 and want to convert it to a decimal number like 1.3243242 How do I do this?

0
Q: Pulling availability and displaying on a webpage

user1512405How can I scrape the availability of available/registered domains from GoDaddy after doing a search with this GET command. http://www.godaddy.com/domains/search.aspx?domainToCheck=cats.com I would also prefer to be able to do a client side pull. Would this be in AJAX?

0
Q: How to display selected related posts in individual custom post type pages

GreenhoeI have a custom post type with products, lets use fruits as an example. In the fruits custom post type I separate posts called Apples, Oranges, Grapes. On the custom post type fruits single page they have a sidebar where I would like to display related posts that I set that are related to that ...

1
Q: Mysql FULL TEXT search Issue

ling.sI’m trying to create a FULLTEXT SEARCH of a table. Mysql returns The used table type doesn’t support FULLTEXT indexes. I searched over Internet and found that MyISAM is the only type of table that Mysql supports for Full-text indexes. So I've tried to change the type from InnoDb to MyISAM. No...

0
Q: Function contains() on a non-object Laravel

User1291223 $profiles = UserProfile::find(1)->user_id; if ($profiles->contains($uid)){ Call to a member function contains() on a non-object Any idea what did i do wrong? I'm trying to check if the user already has got a row in the table

0
Q: Speed up Propel nested-set inserts building large tree

Mike CroweI'm using Propel 1.6.7-dev, and am maintaining 2 trees in a nested set (each with a different scope column). Currently, we have about 20K items in each set (so ~40k records total). I can rebuild the database at will, and periodically do (to handle certain large-tree changes). Right now, this...

0
Q: Insert form field value with using opps class before form field values validate

user1957465i am trying to insert form field value with the help of classes i want to do form field value first check it valid or not like mobile no is must have 10 digits ,more validation like this if mobile no not digits function return an error and error pass and print .

0
Q: Croogo - admin menu shows error on live server

smitIam working on croogo and i have achieved all the things.But unfortunately the admin menus toggle effect does not work when uploaded on live server.When checked console,Shows this error in admin.js at line 37. I searched and found the below code making issue: var $sidebar = $('#sidebar-menu'); v...

0
Q: downloading large sized file issue

user3051337I have a download script that works well in my local machine . But after uploading to the server , when my ios app calls the script it stops after 100-120 seconds . I just changed the script into another server .It worked perfectly . I dont know what the configuration is missing in the server( th...

0
Q: Storing and serving user files securely with PHP/MySQL

EdwardThis is both a best-practice and implementation question. Here is the scenario/requirements: - Backend is PHP, DB is MySQL - Users login to establish session, whole site is on HTTPS - Users can upload medical files (png/mp4/pdf...) to their account. - User needs to be able to view (inline IMG o...

0
Q: Alerting if textboxes are empty

shaashwatomy form: <form method="post" action="getQuote.php" onsubmit="check()"> <table> <tr> <td>Name:</td> <td> <inp...

0
Q: PHP: Hpw tp calculate time remaining between last insert time and now()

EustatiaI'm using the following to restrict an IP to send 1 message per 5minutes. So i want to echo time remaining, how do i calculate that? Here's my PHP $query = "SELECT * FROM messages WHERE ip = '$ip' AND mtime >= NOW() - INTERVAL 5 MINUTE"; $result = mysql_query($query); if (mysql_num_rows($result)

0
Q: PHP CodeIgniter-combobox value not getting update in database

vicky007I have a table view of some products having Edit and Delete options.When i click on Edit it redirects to another page and shows particular data.There is one field named Product Category which shows product category of product in combobox e.g. Pizza. Now,the problem begins.Suppose i select Sandwi...

 
6:02 AM
0
Q: How Can I Add to Row With Highest Primary Key?

user2957574I have a database, with a column I would like to update where the row is the most recently generated one, after searching for a while I found this solution UPDATE data SET Tricked = 'Affirmative' WHERE Identification = (SELECT MAX(Identification) FROM data); However this didn't work, I rec...

0
Q: how to send mysql fetch records php page via email

Indianwhen i send a page via email it shows the php code. it does not fetch the details from mysql and then i'm fetching the mysql records based on the particular voucher id. how to send mysql fetch records page via email? look at this coding.. <?php require_once('phpmailer/class.phpmailer.php'); incl...

0
Q: UTF-8 Encoding fails on opening the mail

Rishabh RajI have a strange issue with encoding: the ù is now shown as ù in the email subject.the email is sent through php mail function. When viewing the e-mail in the mailbox, it is shown correctly. However, when anybody opens the e-mail, the ù is suddenly changed to ù. Uw contact met Meeùs should...

0
Q: preg_replace() all occurances

3NexI want to create a script that will remove all comments from a file. My current regex is this: $new = preg_replace_all("/(\/\*.*\*\/)/s", "", $contents); Which matches (and removes) anything between /* and */ The problem becomes apparent when the contents of a file is something like this for...

0
Q: how to speedup mysql server operations in

SameerI have developed php application working with 20000 records from mysql table now i am facing slow connection problem. it takes 15-20 seconds to retrive more then 1000 records and 5-6 secords to retrive only 5 records. so is there any way to speedup mysql operation. i have used xampp 1.3.2 and m...

-1
Q: Google API console access

Mohammad EmamiRegretfully, Google co. boycotts my country to access it's pages about console api and google codes and some other things he loves. To validate myself in console api -as a poor PHP developr!- you should give your phone number with country code. When i set my country, Google insults me that we don...

0
Q: php to java socket program

ManiI have a php program which generates data in xls format. I have to read each row and format the row in specific format and same the formatted message in txt format and then use a java program to post it to another application (this java does by socket programming). Since i am new to socket progr...

1
Q: How do I modify this to upload multiple files?

HypothermiaMy upload code is this. I submit the image to it with postdata. I want to make the file select box accept multiple picutes, and have it work on the backend. I can get the header location to work just fine on my own, but using an array of files has proved to be difficult, even though I've spent ho...

0
Q: Converting SQL query for use with PHP form (issue with variables)

GeorgeCostanzaI have an SQL query that looks like: SET @fromyear = 1980; SET @toyear = 1989; SET @rank = 0; SELECT test.Rank, test.Artist, test.Nominations FROM( SELECT @rank:=@rank+1 as Rank, noms.Artist, noms.Nominations FROM ( SELECT COUNT(Name) as Nominations, Name as Artist FROM Nominated WHERE ...

0
Q: How to create a view in Laravel 4?

PaniqueThe official quick start and the offical documentation of Laravel suck like hell, they simply do not declare how to create a view. This is surprising, as Laravel is in general built with the developer in mind, but the docs are just HORRIBLE. They look good at first, but totally lack of informatio...

0
Q: Sorting data elements and displaying with php

Jojo GeorgeI have a sql table 'sample' with 3 fields id,content, arrange. The field arrange gives the order to be displayed contents in html page. -------------------- id|content|arrange -------------------- 1 A 4 2 B 5 3 C 1 4 D 3 5 E 2 ----------------...

0
Q: Codeigniter image resize with aspect ration as well as without changing image width and height

AaruKarthigaI have an image upload function in my webpage and i need to upload the image and re-size the image with different size and upload the re-sized image to different folder. I can re-size the image and upload that re-sized image to corresponding folder now the issue am facing the re-sized image with ...

 
6:39 AM
0
Q: Calling ajax inside ajax jquery

emmansarsalei need help on how to retreve and ajax result inside another ajax here's my html <div id="res_videoclick"> <iframe class="laptopvideo" src="http://www.ustream.tv/embed/recorded/37579887?v=3&amp;wmode=direct" scrolling="no" frameborder="0" style="border: 0px none transparent;">

0
Q: Uploading file path to database and save article Codeigniter Not working

SuleymanI have a simple cms developed on Codeigniter 2.1.4 and i have a section for creating articles. In the create article form i have some basic inputs for title, slug, author, etc and an input for uploading an image file. About a month ago, when i created the controller and models for the create arti...

0
Q: using implode for stdClass Objects in php

Afshinforeach($categories as $category) { print_r($category); } The code above gives me the following result. stdClass Object ( [category_Id] => 4 [category_Title] => cat 4 ) stdClass Object ( [category_Id] => 7 [category_Title] => cat 7 ) stdClass Object ( [category_Id] => 6...

 
6:57 AM
0
Q: Loop through foreach array

user3050279I'm having a problem looping through my array to get just one value each time. I want to gray only 1 value because I'm calling that value in jquery. I'm new and sorry if this is too basic but I've been trying for days, pulling my hair out! $designslist = array('design1','design2','design3','desi...

 
7:09 AM
0
Q: is IP tor proxy or not

user3001517Let's say i have a list of ips I want to check if the ips is tor proxy or not. I found a good answer here: http://security.stackexchange.com/questions/12395/how-does-check-torproject-org-know-if-youre-using-tor It will work only if the user is online, but i just have the ips. Any idea please?

0
Q: How exactly do i go about implementing a facebook-esque news feed

KenBACKGROUND Im relatively new to programming without any formal training and/or schoooling and am trying to pick things up as i go. I am currently trying to code a simple facebook-esque news feed where users are split into 2 general groups, the ones being followed(A), and the ones following(B). ...

0
Q: Dynamic validation method name.

t4thilinaI need to validate a textbox based on the validation rule selected by the admin through a dropdown list. ex: $('<select/>').attr('id', 'SelectOption2_[]' + i) .attr('name','SelectVal[]') .append( $('<option/>').text('......To validate choose an option......'...

0
Q: Mail funtion is not working in php

PHPCoder<?php if (isset($_POST['submit'])) { //if "email" is filled out, proceed $name= mysql_real_escape_string($_POST['name']); $phone= mysql_real_escape_string($_POST['phone']); $to = "vamsig764@gmail.com"; $subject = "Customer Intrested"; $message = "Buyer Information and Intrested in land."...

0
Q: PHP: How to echo remaining time in minutes from microtime

EustatiaThe following shows time in seconds, and want it in minutes, how do i convert to minutes? $query = "SELECT * FROM messages WHERE ip = '$ip' AND mtime >= NOW() - INTERVAL 5 MINUTE ORDER by mtime DESC"; $result = mysql_query($query); if (mysql_num_rows($result) > 0) { $row = mysql_fetch_assoc...

0
Q: How to set WordPress transient when button is clicked with ajax

user2381533On my WordPress site homepage I have 6 buttons that have image backgrounds. The idea is that a user will click on one of the images from the top row (each image represents a category) and one from the bottom row (each represents a tag) and then the user clicks on the view posts button that takes ...

 
7:39 AM
-5
Q: Landing a entry level position

user3051526Thanks for taking the time to read or answer. As the title says, my questions is I have about another two to three years left in school before I am finish. Three months ago I have slowly pick up to learn how to program. I started with html and css and yes i know there are not programming language...

0
Q: Reload table data after an ajax call

Ankur DhanukaI am using this ajax call to do some changes in database. I need to refresh the table data when we click ok, without reloading the page. If i refresh the page table will be removed. $.ajax({ type: "GET", data: dataString, dataType: 'json', url: "processOrgDisburse.php", ...

0
Q: I am develope POS system but in Amazon payment system give some below error i put currect Signature key but still given error,

user3021641SignatureDoesNotMatchThe request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.32f13a55-d62c-4e55-b438-0b67c8088eac

0
Q: Formating in a json decoding

user2301515I've question about decodings There is translatsions.php like <?php define("LNG_T1","sdfjaö"); define("LNG_T2","õäöüåÕÄÖÜ"); define("LNG_T3","Русский"); define("LNG_T4","Українська"); define("LNG_T5","日本語"); define("LNG_T6","العربية"); ?> And there is another php-file <...

0
Q: PHP's mail() working for web server, working for command line, Yes, permissions issue but I have tried every fix I could find

user124787I have setup msmtp for send-only mail through a webmail service. It works just fine either by straight command line email generation or by calling a php file with the mail() function in it. The same file fails to send the email when navigated to through the browser. I'm running Ubuntu 12.04 and ...

-2
Q: PHP conflict with mysql_fetch_array?

user3047249I have a problem with mysql_fetch_array, here's my code. Another thing, what id mysqli_* functions? <?php session_start(); include "config.php"; $conex = mysql_connect("localhost", "root"); $name = $_GET['name']; $selected = "SELECT id,password,email,name FROM users WHERE username = '".$name."'"...

0
Q: How to show random data from multiple mysql table using php?

user3051584I am new to php and mysql. I have covered basic of php and mysql. I am able to insert and query data from mysql table using php. But I want to know how can I show random data on my index page from example-table1; example-table2 using php? I hope, I will get my answer as soon as possible. Regard...

-1
Q: Select ONCHANGE for SELECT elements

user3049358Hi I want to make select option in which I want that if someone select the option it changes the image size currently I am using input box to type size like 100*250 and click on submit and it changes the image size but I want pre-defined image sizes so anyone can select the size without writing i...

-1
Q: How to create a plug-in for contact form in PHP?

SreeHow to create a plug-in for contact form in PHP? I tried a lot to search in Google, its showing only Word Press plug-in.

0
Q: Language Allowing Rapid Development And Refactoring To Best Practices

Parham DoustdarI have looked at languages such as PHP, Python, Ruby and Skala. However, I haven't found any language that meets the requirement below: I'm looking for a language that is lax enough to quickly write a web application prototype with (without bothering with best practices), but is also sophisticat...

0
Q: How to Make Auto Clicking For A Specified Link

user3051602i want a php code for automatically clicking on a Specified text or link on a page. thanks

0
Q: Nginx not redirecting to 404 page if the directory does not exist

user2696392I have a Nginx (frontend) -> HAProxy -> web1 & web2 servers (backend, Nginx, php5-fpm). My problem is when I try to access the frontend Nginx server (domain.com/test) it returns me back to index.html page. It just won't show the 404 page if the directory 'test' does not exist. This is my Nginx ...

0
Q: Replace meta tag instead selector in array for parse in php?

GilbertOOli'm newbies in the PHP development and i would like to parse the contents of a meta tags but i don't know how to proceed. I've this code that allows me to parse the contents of these elements #squad, ul[style='height:400px;'] selector. // Pull in PHP Simple HTML DOM Parser include("simplehtmldo...

0
Q: regex using preg-match on de limited based string

NMF SDFI got a string that goes like Text58||INPUT 6~~Text67||INPUT 7~~Text68||INPUT 8~~CR_Exp_Date||INPUT 9~~Text60||INPUT 10~~Text63||INPUT 14~~Combo_Box65||Ship~~Text66||INPUT 15~~First_Name||INPUT 18~~Middle_Name||INPUT 19~~Last_Name||INPUT 20~~Suffix||INPUT 21~~Country||INPUT 22~~Mailing_Address|...

-1
Q: how to perform cash back facility in authorized.net using php

Shambhulal VermaI have authorized.net integration on my php web site. problem is that if a customer asks to return my money from authorized.net then how I that that his money is returned or not..

0
Q: Card Editor/ Card Personalization

user3051626I am developing online e-greeting cards website with php (opencart V1.5.6). But i m facing very difficulty to develop card penalization module like http://www.cardwale.com/index.php?route=custom/personalise&product_id=533 if anybody have some idea then please help me

0
Q: send inline image in mail as base64

ddw147i am using ck-editor for composing email in my application , i sent its html source code as mail, but problem is there with image. <img src= "domoin.com/img.jpg"> tag for image is sent through mail. so as long as my image on reside on server, user can see image received in mail. i want to a...

0
Q: jquery validate input array

PrabhuPHPAm using the below form for the form validation both for jquery validation and codeigniter form validation. Now i fixed for the codeigniter form validation, but for the jquery i couldn't fix it. Please help me. Name : <input type="text" value="" name="inpcontrol[name]" id="inpcontrol" /> ...

0
Q: Showing the word "blog" in breadcrumbs in Wordpress

user2798091I have a wordpress site and i am having issues displaying the breadcrumbs correctly when it comes to the blog section of my site. The breadcrumbs display as home-->category-->post title, Whereas i want it to display as home-->blog-->category-->post title. How can i get this done. Help would b...

2
Q: Update Databse according to the Date Entered

aliasgar vanakI have three rows in database i.e start_date = 2013-12-1 end_date = 2013-12-31 status = 'a' When i want to change the status for dates start_date = 2013-12-10 end_date = 2013-12-20 status = 'u' In this case i can easily update database and updated database will be- 1)start_d...

0
Q: PHP, Creating File in Directory

user3051665Help! So I've look at many solutions of this on stack overflow, but non seem to have worked. So what I'm doing is creating a directory with a random number, then creating a text file in it. My directory is like this: localhost --/tdir/ ---/(random number directory) < this is were i want to sav...

0
Q: Custom Fonts not working in PHP website

Java Studenti want to use cusotom fonts for my website that is like this myfile.php <p class="custom-fonts">here i want to apply fonts </p> in fonts folder i have placed this font gurbaniwebthick.ttf and using it in css like this style.css @font-face {font-family: "My Custom Font"; src: url(......

0
Q: Doesn't htmlspecialchars() protect against javascript when calling in jquery .html() in result through ajax?

Hasib MahmudI wrote a php and jquery-ajax script that works good. But the following scripts work slow and I found that this type of script is vulnerable to XSS attack, I found something regarding it in this link's first answer please see the first answer. Here is my jquery code: <script> $(".question").keyu...

0
Q: Grab content from another website once every 30 minutes

Erfan_I wanna receive Foreign exchange rate from A reference site but each 30 minutes they're change how to get automatically and archive it in my data base for example : get it from a table and import to a specific div tag?

-1
Q: mysql_num_rows() giving a Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\check_user.php on localhost

shubhraj <?php session_start(); include('config.inc'); //for selecting database and connecting to phpmyadmin $redirect_page = "Login_page.php"; if(isset($_POST['email']) && isset($_POST['password'])){ $email = $_POST['email']; $password =$_POST['p...

0
Q: Multiple forms which both go to PHP_SELF

KeirDavisI have two forms on 1 page, how would I go about working out in PHP which forms was used? Form 1: <form name="loginform" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="post"> <input type="text" name="vuser" placeholder="Email"><br/> <input type="password" name="vp...

-2
Q: Wordpress plugin share locker

user3051704I want to extend share-locker plugin wich hides the selected content until you share page on facebook. The plugin acts like this: in hides content under a blue stripe that says share to unlock content. After you share it gives you content. But in this page: bazarnews.net/?p=82 , it is modified or...

0
Q: send an email with mysql fetch records

Indiannow i want to generate a customer voucher and then send it to particular person email id. i have done the basic mail function using phpmailer. now, i received an email but i did not get the mysql datas. i tried something. but its not working. for example if i am clicking the voucher id 7 then it ...

0
Q: mysqli connection giving Warning: mysqli_connect() while I am using try catch block

Shambhulal Vermamy code is like this.. $host = "localhost"; $user = "root"; $password = ""; $database = "db1"; $port = "3306"; $socket = ""; try { mysqli_connect($host, $user, $password, $database, $port, $socket); echo 'Connected to database'; } catch (mysqli_sql_exception $e) { echo $e->errorMess...

-1
Q: Regular expression in php for anchor tag

AdeelI am using this Regular expression (preg_replace( "/\bany word\b/", `"<a href="abc@domain.com">any word</a>"` , $content)) in my code, this is for replacing the given keyword with the given anchor tag, but if there is already a link in the $content then it would not changed the keyword or lin...

0
Q: Linux Apache User/Group Permissions

JREAMI have a folder with files owned by: joe:www-data, joe belongs to the group. Apache only seems to cooperate with www-data:www-data. Is there a way around this so I can keep the user as joe and the group as www-data? Is it recommended to use this module below if I want to accomplish this task?

0
Q: PHP rar file`s other way

user2897922I have this script, it works perfect under XAMMP (windows) but when I upload it to my host will it fail because exec() has been disabled for security reasons And .exe will not work on linux. <?php error_reporting(E_ALL); function RARFiles($Output='output.rar',$Files=array()) { $Data='';...

0
Q: How to validate a vine url

zackI would like to know how to validate a vine.co URL using php Here is a demo URL https://vine.co/v/hnVVW2uQ1Z9 All vine.co URL's have https://vine.co/v/ So I' guessing that URL can be validated using regex by using https://vine.co/v/. If someone can point me out how to do this will be much app...

0
Q: How to display content if on a certain post page in wordpress

GreenhoeI'm trying to figure out how to display content only if I'm on a certain custom post type page. So I'm assuming I'm going to use an IF statement although I'm just not sure how I would be able to do identify if I'm on the page that I need. For example if I"m on a custom post type at example.com/...

0
Q: Node.js or PHP as backend for angular frontend?

Bogdan MitracheI do not have experience in web development(more of a desktop guy), but I am starting to learn. I need to create a small web app that allows users to do 2D designs of a floor plan, The elements will be drawn using Raphael, and exported to JSON to be saved in a DB. As a newbie I have the followin...

0
Q: Android error parsing json end of input at character 0 of

DunkeyThis is the whole error message: error parsing data org.json.jsonexception end of input at character 0 of This is my whole code: // JSON Node names public static final String TAG_SUCCESS = "success"; public static final String TAG_ID = "salesorderingcard_id"; public static String TAG_CODE...

0
Q: Call to a member function on a not object when the object variable is the same

Emanuele UgoHello i have this problem: i have a php file with all my function and all class and in this file i have a class called Studente: class Studente implements JsonSerializable{ private $codiceFiscale; private $nome; private $cognome; function __construct($codiceFiscale,$nome,$cogno...

0
Q: if using datepicker in class, the input value doesn't show the value

Silent Manif using datepicker in class, the input value doesn't show the value Code: Output: a Simple input box having no value, while if we inspect element and see the html behind, it is the same html code. Actually I dont want to use datepicker tag in ID, cause i have several inputs like this.

0
Q: Step by Step Plan for Upgrading a Large Website (MySQL DB and PHP Files)

IyadThe website is running on Apache and coded in PHP, it has a considerable amount of users, the database design has changed, code updated and all is running well on a test server, now is the time to go live, I thought I ask the experts before starting this plan I put: 1- Notify users by email 2- ...

0
Q: SetParam - Username & Session

user2722718Lets say I have a session named $_SESSION['user'] And now, I want to use SetParam to be able to print out the username on the site using {username} (without the php tags) Should it be something like this maybe? public $db; // Database variable(?) public function Param() { $this->db->setPar...

0
Q: does php's popen command execute immediately or queue?

b747fpIf I loop through a mysql query and run a popen on each row, it appears that the commands are only running 1 at a time. Is there some sort of "queue" i can access and force to process 3 or 4 at a time, or do i just have to wait? this is for ffmpeg and at this rate it will take days to complete al...

-2
Q: Undefined index: initial in C:\wamp\www\ralph\search.php on line 9...

user3051759//this is my code for search in php .. and im having a problem to run this program. so pls help me... thanks a lot! <html> <body> <?php mysql_connect("localhost","root",""); mysql_select_db("login"); $initial = mysql_real_escape_string($_POST['initial']); $find_videos = mysql_query("SELECT ...

0
Q: Creating unlimited subdomains that redirect to different IP's in PHP

Yarden A. So iv'e been trying to find the right path for me for my situation but couldn't just find the right answer. So what i need to do is a php script that will create a subdomain that redirects to an IP that will be sent from my post request. Example - I post to script.php - ?username='test'&ip='127...

0
Q: How do I find out what part of a php script is causing excessive resource usage on shared hosting?

user481913I keep on getting emails from the host that the php script on shared hosting uses excessive resources. I do not know what resources the host is talking about - whether it's the cpu, ram or the disk i/o ? Where do I start to find out what part of the script is causing the excessive resource usa...

0
Q: Not using Ajax in poll script

ebrahimI dont know this may be duplicate but, This is a poll script I'm using the following code to generate an ajax request: This script is used for sending Ajax requests I do not want to use this script from Ajax Please help me to solve this problem $q = mysql_query("select * from polls order...

1
Q: How to show the the values of array in cgridview in yii

Ajeet ManralI am using yii and i want to display the results of an array in the cgridview The Cgridview code says $this->widget('zii.widgets.grid.CGridView', array( 'id'=>'users-grid', 'dataProvider'=>$dataProviderObj, //'filter'=>$model, 'columns'=>array( 'companyName', array( ...

0
Q: How to write shortcode in php?

user3051801i want to write that code in php?.can anyone help me out? I am using option framework theme.i want to print background color in header tag.can anyone help me how can i show that code in body tag using inline styles '$background['color']'

0
Q: chrome is not working as expected while unloading the page

user2834329i have an orders page in which the admin selects the orders . selected orders are stored and updated in database after regular interval using jquery. if after selecting checkboxes a user leaves the page i want to give him a confirm message. this is not working with chrome. as chrome onbeforeunloa...

 
10:22 AM
0
Q: How to implement Remember me in cake php?

SreeI am trying to implement Remember me in cake php. Actually i am using cakephp Auth for authentication method. Can we save password in cookies?? which one is the better way??

0
Q: PHP Facebook Chat API - chalange handshake failure

michail_wI want to connect via Facebook Chat API (XMPP), using Facebook PHP API to get access_token. I'm using code from official webpage (but wrapped in class), but it doesn't work form me - I got stuck on challenge handshake. Communication flow: [INFO] Opening connection... connnection open <?xml ver...

0
Q: Registration.php probelm

user3051803This is my registration code. I don't know what is the problem. The compiler shows the error is "faculty" selection part. I've checked every single tags and I think it is correct. I try to delete the php part and no more syntax error. I guess there is the error but why the compiler in my case in ...

0
Q: How can filter the record with two time in mysql?

Raj Mohani have table with time field and i have two parameter time. select the record not the time between those times ex p1 = 14:00:00 , p1 = 21:00:00 The sample table is ------------------------ | id | time | status| ------------------------ | 1 | 12:00:00 | 1 | ----------------------...

0
Q: jQuery variable to php not working

Beata DutkiewiczI need pass jQuery variable to PHP variable, so I made simple code to test and it doesn't work. It's only a testing files. Finally, I have to do something more advanced but i can't make it works! I have 3 files In character.html I have: <a href="character-save.php" class="saved">SAVE</a> ...

0
Q: CodeSniffer installation using PEAR

rkmI am not able to install CodeSniffer using pear on command prompt E:\PHP>pear install PHP_CodeSniffer-1.5.0 No releases available for package "pear.php.net/PHP_CodeSniffer" install failed

0
Q: Why is Ajax not getting the data from the table and displaying it?

user3051827I have Get function is PHP which works// retreive all the movies function movies_get() { $this->load->database(); $sql = 'SELECT * FROM movies;'; $query = $this->db->query($sql); $data = $query->result(); $this->response($data, 200); } http://creative.coventry.ac.uk/~4...

-4
Q: How can I use bitcoin testnet in coinbase php

user3044375I'm using coinbase wallet for bitcoin transactions. Is there any option to use testnet for transactions testing purpose in coinbase? Any suggestions will helpful.

0
Q: codeigniter how to send query->num_rows from model to controler

Ralph SchipperPerhaps a simple question: This is my striped code in my model: public function trainees() { $this->db->select('*'); $this->db->from('relations'); $query = $this->db->get(); if ($query->num_rows() >0) { foreach ($query->result() as $row) { $data[...

0
Q: how can need print content with not show ckeditor

joko nardithis condition and problem : i ve edit.php ( this edit form using ckeditor) and use : <a class="btn btn-lg blue hidden-print" onclick="javascript:window.print();">Print <i class="icon-print"></i></a> `<textarea class="span12 ckeditor m-wrap" name="tbl_data" cols="50" rows="5"><?php echo htmlent...

0
Q: PHP exec() fails silently - probably memory limit issue

Daniel GadawskiI've got a problem with executing PHP script from another using exec(). I need to execute some PHP script from another (both works in CLI): exec("php /some/path/script.php 2>&1", $output); echo print_r($output, true); If I invoke my script with this code only (there's no other processing in t...

0
Q: $.get error depending out result of php file

user2543182I'm building a webpage where the user can 'sign' some agreements and view signed and new (unsigned) agreements. For this the webpage uses the 2 functions in the code below to get relevant information from the database and then build the webpage. Unfortenately, when -and only when- the php file (p...

0
Q: How to set returnUrl value in yii

Ajeet ManralI am using Yii and the problem i am getting is with the Yii::app()->user->returnUrl .It always returns me to the index.php page. How can I set its value to the page which requested the current page as I do not know from which page user has visited the current page?

0
Q: select country name from drop down list based on display state of that country in second drop down using ajax

guru When i select country name from drop down list based on display state of that country in second drop down using ajax and php

0
Q: Product variation name to javascript variable in woocommerce?

user3038148I would like to get the "name" of a variation (attribute driven) to a javascript variable. So I have a dropdown with sizes like 20*20, 30*20 and so on. When the customer changes the dropdown I want the function to update a line in a javascript function or if it is possible change a php variable b...

0
Q: i'm new getting Fatal error: Call to a member function count() on a non-object in C:\wamp\www\oops_login_system\ooplr\classes\User.php

user2560561i'm using php 5.3.13 this script is for login remember me system but when i login with remember me its giving me an Fatal error: Call to a member function count() on a non-object in C:\wamp\www\oops_login_system\ooplr\classes\User.php kindly help me. the code is as follow:- login.php $user = n...

0
Q: Mysql select in 1 table, update 2 table

user2094978There are three tables: shop_product_skus (id,product_id,sku,sort,name,image_id,price,primary_price,purchase_price,compare_price,count,available,dimension_id,file_name,file_size,file_description,virtual) a table for the item 1 product ( 1 to many ) shop_product_stocks (sku_id, stock_id, produ...

0
Q: How to post an array in CodeIgniter on form submit and catch it

aspirinemagaIs there any appropriate way to send an array on form submit so I could print them in another view ? Here is my code: In controllers/categories.php there are 2 functions, organize() is the page where the form is displayed, and organize_process() is a process function where the outputed datas sho...

0
Q: Store Smarty templates in a database

kanarifuglI'm new with Smarty and want to use my database to retrieve templates. I have looked around on the internet and in the Smarty documentation, but it's somehow too complicated for me to implement. I have tried some solutions and found one here (i think), but with no luck. Any idea on how I can ma...

0
Q: want to set codeigniter join query

javidhi i ma try to join with two table. this i my simple sql query $sql="SELECT windows_users_image_upload.*, `windows_users_info`.`display` FROM `windows_users_image_upload`,`windows_users_info` WHERE `windows_users_info`.`user_id` = `windows_users_image_upload`.`use...

0
Q: PHP traits - change value of static property in inherited class

morgoth84So, this is my trait: trait Cacheable { protected static $isCacheEnabled = false; protected static $cacheExpirationTime = null; public static function isCacheEnabled() { return static::$isCacheEnabled && Cache::isEnabled(); } public static function getCacheExpir...

 
11:10 AM
0
Q: Using domXpath to search for anchor

Emma EgboI want to search a html file or text for an anchor that has "friend" in its link. That is: zack is your friend Then when it matches an anchor, it should return the href attribute and the anchor (link). I have tried googling, but so far i can't understand domXpath and the other examples only sear...

0
Q: Using codeigniter input library in safe

curiosity4834Genereally I'm using codeigniter input library like that => $insert = $this->input->post(); I wonder is it safe or must I use like that? => $name = $this->input->post('name'); $gsm = $this->input->post('gsm'); $insert = array( 'name' => $name, 'gsm' => $gsm );

0
Q: Hot delete all html except image?

learnerGood day. I have html: <p>fsfsf</p> <p>tgff</p> <p><img src="../243234345/Desert.jpg" alt="" width="1024" height="768" /></p> <p>asasdasdasd</p> <p>asdas</p> <p>d</p> <p>asdasdsadsad</p> <p>sad</p> Tell me please how remove all html except image(except line <img ... />) ?

0
Q: styling xml-file by including xsl-stylesheet using php

user2270611thanks to this helpful community I've been enabled to make a xsl-stylesheet extracting some metainformation from xml-files on my site. Of course, I do not want to code the stylesheet directly in the xml-files, which shall be left untouched. Also, I do not want to preprocess the files in OxyGen an...

0
Q: Ignore specific character: -

user2953063I want to ignore a specific character using php. So when a user adds this character in the textbox. the php scripts filters it out first. I tried something and came up with this: <?php $datetogoto = $_GET['datetogoto']; $pattern = '-'; $replace = ''; preg_replace($pattern, $repla...

0
Q: Select second record from table matching with first record

MohammadHow select first record and matching with second record ?! Samlpe: 1- A 2- A 3- B 4- C This code match 1 and 2 , and return TRUE How write query ?!

0
Q: PHP Automatically log my users into their google account

JohnI have a google apps account and I would like my users to be able to access their google account directly without having to put in their username or password on google website. This way they have only one password which my site verifies against Active directory and a database to see if they are v...

0
Q: How to work with % ( Modulus or Percentage ) in PHP - MYSQL

user2906577localhost/product.php?trans_id=1&weight=4.67 - this is my link when i edit my product.php hence requested value for weight i have weight=4.67 i have only one input text field thats "after product weight" : once i click update i need 6% should be calculated before update of "after_product_w...

0
Q: how get first image from several images?

learnerGood day. I have code: $images = ' <img src="./243234345/Desert1.jpg" alt="" width="1024" height="768" /> <img src="./243234345/Desert2.jpg" alt="" width="300" height="100" /> <img src="./243234345/Desert3.jpg" alt="" width="500" height="120" /> <img src="./243234345/Desert4.jpg" alt="" width="...

0
Q: convert pdf files to image using imagemagick

namrathai have installed imageMagick and ghostscript from online and put it inside mamp but m not getting how to include them in my php code.. by googling i found a code <?php $pdf = 'serviceReport.pdf'; $save = 'output.jpg'; exec('convert "'.$pdf.'" -colorspace RGB -resize 800 "'.$save.'"'...

0
Q: PHP MySQL is taking 0.8s to 3s to load on search query, how to speed up

user3047473my MySQL table is in this structure: |id|title|duration|thumb|videoid|tags|category|views |1||Video Name|300|thumb1.jpg|134|tag1|tag2|tag3|category|15 |2||Video Name2|300|thumb2.jpg|1135|tag2|tag3|tag4|category|10 Table contains about 317k rows. Query is: SELECT id,title,thumb FROM videos WH...

0
Q: issue with php session destroy

saifurI am facing a issue with php session. PHP session destroyed, if I leave the page before fully loaded. I have two link pages, let the links are page_1 and page_2 . Both pages are visible after login. If I go to page_1 to page_2 and go back to page_1 before fully loaded the page_2, the session des...

0
Q: PHP with XSL & XML

user3051908I have two files student.xml & sytle_student.xsl and one file PHP whaich contain form that search for data in the xml file but the result dosen't appear in the style attached in the xsl file i used this function $xslDoc = new DOMDocument(); $xslDoc->load("style_stu...

-4
Q: how to build and host my own website

amostkplease can any one tell me the step by step to get and host my own website? i know very much about web designing but yet i don't have my own site. i want to host a php website, please i am a newbie to web hosting! i have some little question to ask about website creating.is it to get the web app...

0
Q: Displaying jQuery tooltips inside an Elgg widget

user3051856My Elgg release is 1.8.14. I must to say I'm a newbie in Elgg. I've just made a widget that displays a list. By means of the widget settings I can choice the display mode. I can switch between: * to display a list with tooltips, * to display a descriptive list. I used the jQuery Tools library...

 
11:34 AM
-3
Q: PHP. Parsing a xml registry export file

Alex LianI have a xml export registry file - 123.xml <RegistryKey Hive="HKEY_CURRENT_USER" Name="SOFTWARE\myprog" Subkeys="1" Values="0"> <RegistryKey Name="Football" Subkeys="1" Values="0"> <RegistryKey Name="frwl_set" Subkeys="0" Values="0" /> </RegistryKey> </Registr...

0
Q: Dynamical radio button group validation

user3002807sample javascript : <script type="text/javascript"> function validateForm() { var radiobutton = document.getElementsByName("co[]"); for (var i = 0; i < radiobutton.length; i++) { if (radiobutton[i].checked) { return true; } } alert("At least one radio...

0
Q: Magento Get Custom Option Id By Label In Product Page

user3051955Hi I need to get the a custom option id by the label of that option, e.g. Custom option of logo The id of this will be something like 'select_1705' The label of this will be 'logo' I need to get the 'select_1705' from the label 'logo'

0
Q: cut a string from position to another position

Lion KingFirstly: I have the following string content Autumn, tree leafs<BR/><BR/><a title='Autumn, tree' href='http://site.net/share-picture/3K'><img width='225px' src='http://site.net/_s/upload/2013/11/29/0be99469a67aaf35b30b236e8ee9faa3.jpg225.jpg' title='Autumn, tree leafs' alt='Autumn, tree leafs'/><...

0
Q: Increasing the font size in imagettftext() is not working

Ramaraju.dI am trying to enlarge the text on the image using imagettftext() as imagestring() is not supporting the fontSize here is my code $string = "Test"; $font = 'http://localhost/image/arial.ttf'; $white = imagecolorallocate($imagecontainer, 255, 255, 255); imagettftext($imageconta...

0
Q: how to get data from database via ajax, php, json? And how to upload files in database via json

user3033027Im Again. I need to get data from database and play them in a text field using ajax this below. Please help me, for I am with a client atrazado only because of this unique feature, also like to know if anyone can help me, how to upload file via json too. I Have this code: PHP CODE: include('...

0
Q: How to make an external class objects (which are instantiate outside the class) accessible to any other classes in php

Stupid Dream# database.php # class Database { public function connect(){ //code } public function select(){ //code } public function insert(){ //code } public function update(){ //code } public function delete(){ //code } } # encryption.php # class Crypt { public function encrypt(){ ...

0
Q: Making a connection to api(OAuth2.0) with php and storing the info local

user3051971Dear fellow programmers. My school has it's own api, sowing classes, teachers etc (sjon result). What I want to do is create a school app so all the students can see where they have class on their mobile. What is want is: Make a connection to the api via oauth 2.0 with php. Store the values in ...

0
Q: when try to load style.css or a img file in codeigniter, it load a html code

Sergio Hernándezis mi first time using a php framework and i don't find an efective solution... I've made my page load style tag correctly using base_url() in an asset_helper file, and it seems to work fine. generated code: <link rel="stylesheet" type="text/css" href="http://localhost/p_maricarmen/assets/css/s...

0
Q: Unable to execute awk command in PHP script

abhinav dixit<?php dd="lastDateTemplate-28-11-2013.csv"; $c_row=exec("awk 'BEGIN { FS = "," } ; { print $1 }'" .$dd); ?> I am not able to execute AWK command in PHP. Below is the error -: PHP Parse error: syntax error, unexpected '='

0
Q: Secure post variables with loop

Sven BI am trying to make my php scripts more secure. Because i got a form with alot of post variables i dont want to check each variable. On stackoverflow i found this script at a post but it had a score of -2 so i think this isn't secure but i cant find any reason why it woudln't be secure forea...

0
Q: Cannot send session cookie - headers already sent by error in my wordpress site

user3044450I'm facing this errors on my wordpress site. Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /x/x/x/x/x/imdbimporter/imdbimporter.php:1) in /x/x/x/x/x/imdbimporter/main.php on line 24 Warning: session_start() [function.s...

0
Q: MySQLi bind_param issue in my function

MatthewI have a function which handles MySQLi prepared queries for me. This function is designed so it's easy to type and so that I don't need to type out 3-4 lines to get a simple query to work. Here is the code: public function preparedQuery($query, $values, $display = false) { $mysqli = $this->

0
Q: Regex matching php

rthurI'm trying to replace a given url with another one in php using preg_replace, with the following code: $patt = '#(?:https?:\/\/)?(?:www\.)?((?:[^\.]+)\.)?example\.com#i'; preg_replace($patt,"http://$1anotherwebsite.com",$somehtml); I'm having two issues however: I would like $1 to be blank if ...

0
Q: using JSON with variable in PHP

user1928775I have been searching for a way to get the "values" from the database and insert them in JSON Response to an android application that receives ID ,Name and Email from PHP file ID , Name , Email needs to be taken from database then sent as JSON response to Android Application here is my code and P...

0
Q: Find correct value between different pairs of options

Alok JainI need to display an icon depending on different time of the day. Icon 1 – 1am to 7am Icon 2 – 7am to 8am Icon 3 – 8am to 12pm Icon 4 – 12pm to 1pm Icon 5 – 1pm to 6pm Icon 6 – 6 to 8pm Icon 7 – 8pm to 12am. These icons and time pairs will come dynamically from database. How can i create a ...

0
Q: PHP Push elements into array

Rakesh BitlingHello Friends My Code is as Follow: Here I am iterating over for loop foreach($row_result as $results) { $f = fopen("jigsaw.csv", "a+"); $new_array = array(); $content = $results->findElement(WebDriverBy::className('seo-company'))->geTtext(); $test = array(); if($i==1) { $Orgnis...

 
12:28 PM
-2
Q: PHP - retrieve data from an array

user10i have the following array i obtain after running a var_dump($response).. array (size=2) 'count' => int 3 'data' => array (size=3) 0 => array (size=38) 'accountCreatedDate' => string '2013-11-05T22:19:09.330Z' (length=24) 'accountDefinedValues' => null 'acc...

0
Q: php - trying to print some special caracters

user3001625I have been trying to print some caracters on my php page and it returns something else, like corrupted caracters like "joão", ø, ç, etc echo '<br>não<br>' the return is não instead: não is this a problem with econding utf-8? i have tried this code header('Content-Type: text/ht...

-1
Q: No Output in my php code

user3051787Please help me.. I don't know why there is no output in my PHP code.. Below is my index.php code.. <html> <body> <form action="search.php" method="POST"> <input type="text" name"number" placeholder="Search...."><br/> <input type = "submit" value="Search"> </form> </body> </html> and this is...

0
Q: Php Resizing image increase image size

RaviI'm creating thumnails of uploaded file. if image width and height are greater than 200 than then i re size them to 200px. Here is code i used to do that: if (file_exists($old_file)) { $path_parts = pathinfo($old_file); $extension = $path_parts['extension']; $filename_p...

0
Q: Nesting two preg_replace in php

jmenezesHow can I nest these two preg_replace in PHP $str = preg_replace('/[^A-Za-z0-9 ]/','',$str); // This one goes first $str = preg_replace('#[ -\s]+#','-',$str); // Then this one By nesting I mean do it in a single line: $str = preg_replace('/[^A-Za-z0-9 ]/','',$str)+the other one.

0
Q: Codeigniter - Wackiest bug I have ever seen

beerLanternI am working with Codeigniter PHP framework. I have the typicall Pages controller for displaying pages. I also added code for storing in the session variable in which page was the user before login. The thing is I'am getting as parameter 'favicon.ico' which make no sense because the page that wa...

0
Q: PHP - Session variables not saving from page to page

John smith3BEFORE YOU MARK THIS AS DUPLICATE, I have read through all the answers on this topic and Non of them worked for me, this is why I am posting this. So the problem is that the data for $_SESSION is not saving from page to page. Here is my test: TestOne.php <?php session_start(); $_SESSION["user...

0
Q: Uploading zip and rar file not working in codeigniter

Muhammadsetting i have created for allowed type: $config['allowed_types'] = 'doc|docx|pdf|xls|xlsx|rtf|txt|rar|zip'; and in my mine.php 'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed','application/force-download'), 'rar' => array('application/x-rar', 'app...

0
Q: In stackoverflow how html tags are escaped only in code and some tags are not escaped?

Hasib MahmudWhen writing question or answer in texteditor of stack overflow we see that some tags like , , etc are allowed and in code section all html tags are escaped. How do they do it. I tried it by using jquery and I think they use regular expression. But I am weak in regexp. I succeded doing such thi...

0
Q: Wordpress $GET Shortcode issues

gurtfrobeI need to insert some markup inside page based on whether a URL Query Var exists or not. I'm trying to insert the code inside a shortcode like so: //Create Shortcode for join page error message add_shortcode( 'join_error', 'av_join_error' ); function av_join_error(){ $joinresult = $_GET["res...

-1
Q: PHP Array traversing foreach loop[?

Rakesh BitlingArray ( [0] => LinkedIn Corporation [1] => www.linkedin.com [2] => 2029 Stierlin Ct Mountain View, CA 94043-4655 United States map [3] => +1.650.687.3600 [4] => Software & Internet, E-commerce and Internet Businesses Software & Internet, Data Analytics, Management and Storage...

0
Q: Creating Search Engine in PHP

user3049358Hi I have created search engine so when someone type in search box it takes data from my database and show the results in images but I have one problem every thing is working fine but if I have data in database with Name like 'Lamborghini' When someone type in search box 'lambo' or 'Lamborghini'...

0
Q: Zend_Db Update issues

Nathan DalyHey I have the below SQL: UPDATE table_name` SET opt_out = '1', opt_out_date = NOW(), admin_uid = '471', last_updated = now() WHERE mem_uid = '7445093' AND opt_out = '0' AND verified = '0' AND reverted_credit_flag = '0' ORDER BY id DESC LIMIT 1` Which I want reflect ...

0
Q: kohana framework doesn't load module on linux server while load it perfectly on mamp

Александр Сальниковwell, question is in subject, here i can give you some details. Error is Class QIWI is not found. In bootstrap it is uncommented, when i use Debug(Kohana::modules()) it shown like module is loaded. folder three is --modules --|-qiwi ----|--classes -------|--Kohana -...

0
Q: Download Link not working in html

Java Studenti am trying to make a download link in html that is given like this for a PDF Book <a href="http://www.mydomain.org/pdf/book.pdf" target="_blank"> Download </a> but problem is that when download link is clicked it opens online version of pdf , does not offer download , i did google and f...

0
Q: not sure if FILTER_SANITIZE_NUMBER_INT is working

Ollicca MindstormI have this code: $price_from = filter_input(INPUT_GET, 'price_from', FILTER_SANITIZE_NUMBER_INT); But if I search for example for: ^*100 I ge the following in the url: price_from=^*100 Shouldn't it just strip it to 100 ?

0
Q: Rewrite Image URL

CrimsonGTI am using a RESTful API provided by monitoring software and it works great to pull resource usage graphs. Unfortunately the entire URL including the private hash key is exposed in the image URL meaning I cannot publicly display the information. As I would like to avoid caching the images by sav...

0
Q: Php Regular expression for change the word that is outside the anchor, not inside the anchor

AdeelI have a regular expression below 'preg_replace ('/(abc)(?!([^\"]\">[^<])?</a>)/','$1', $content)' and i want if abc is inside the anchor tag then it would not replaced but if it is out side the anchor tag then it must be replaced E.g <a href="any@domain.com" title="adada" target="sdada">he is a...

0
Q: Display SQL query results in php

user3052127I'm tring to diplay results in php from sql database MySQL statement is correct and does what i want in phpMyAdmin but for some reason my code breaks in the webpage here is the code require_once('db.php'); $sql="SELECT * FROM modul1open WHERE idM1O>=(SELECT FLOOR( MAX( idM1O ) *...

1
Q: CDbCriteria returning only one tables data not from joined ones

user3048231I am using yii and CDbCriteria to fetch results from 3 tables using join. Here is what i have done till now: $criteria->select = 't.product_id, t.title, t1.title, t2.filename,'; $criteria->join = 'INNER JOIN shop_category as t1 ON t1.category_id = t.category_id'; $criteria->join .= ' INNER JOI...

0
Q: PHP/DOMDocument equivalent to jQuery's wrapInner

powerbuoyI've got a bunch of HTML containing divs with a certain class (among other divs). What I'm trying to do is wrap the contents of that div in another div. This HTML: <h1>Hello</h1> <p>Lorem ipsum dolor</p> <div class="section"> <h2>Helllllooo</h2> <div class="left">Left</div> <div ...

0
Q: PDO uncaught exception issue

user2999787hey there i have this connenction: $config = array( 'host' => '****', 'username' => '****', 'password' => '****', 'dbname' => '****' ); $db = new PDO('mysql:host=' . $config['host'] . ';dbname=' . $config['dbname'], $config['username'], $config['password']); $db->setAt...

0
Q: How to build DRY twig forms?

RalfI am building an application with Symfony 2 and was wondering how I would best build DRY forms. So essentially I want to have one Template e.g. form.html.twig which I then use for creation as well as editing of the underlining entity. This implies, that I change the text on the submit button so t...

0
Q: Php. Number of zeros in float

user2976581I have to send the JSON: {"val": 5000.00} Neither {"val": "5000.00"} nor {"val": 5000} is correct format. json_encode() converts 5000.00 to 5000 Is it possible to send correct json's format (two zeros) with json_encode from array("val" => (float) 5000.00) ?

0
Q: Translating an an 'on.click' event in PHP, from 'window.open' to a basic URL link

Mark RogersI'm trying to perform a hack on a Joomla component to better suit my needs. The current code looks like this: $eventprnt = 'onclick="window.open(\'index.php?option=com_coupon&view=coupons&task=print_coupon&id='.$item->id.'\')" '; $eventcart = ' onclick="add_to_cart('.$item->

0
Q: [PHP][YiiFramework] "... Cannot Be Blank" - Although I Gived Good Values

user3052180http://scr.hu/6zp/aoey7 -> "create" -> http://scr.hu/6zp/9gdho . Product is default model and ProductController is default CRUD. What can be wrong? My database: wklej.to/w4lTp $model->save(false) returns scr.hu/6zp/3n1ue

0
Q: Show 404 error page for existed php file

veeveeoorI have a file secret.php which is included in index.php and I want to show error 404 when someone try to display secret.php content. But header("Location: this_site_certainly_does_not_exist"); in secure.php is not a solution. I would like that in browser in addresbar is visible example.com/sec...

0
Q: How to update a value by 1 if the new value inserted into the database clashes with value in the database?

user2946964I want to update the database of the sort order column to increase its value by one if the the new value inserted into the database clashes with the value that is already in the database. May I know how should I go about doing it? Please help! Thanks! $result = mysql_query("SELECT sortorder FROM...

0
Q: PHP preg_match_all to get images with ?w= in last

HarinderI am trying to get image using preg_match_all but cant get it right here is my code. my problem i that i have soome images with .img ext and some with .jpg?w=655&h=357, i dont need .img but need all other valid images it can have ?w=655&h=357 in last or just .jpg or .png $post =' <img width="1" ...

0
Q: How to upload an SQL file if it's greater than 1MB?

shikataWhen I try to install the ip2country, I get the following message : Mysql packet size is 1MB and it is lower than the size of the file GeoIPCountryWhois.csv which is 5.85MB. Please download the other version of import.php at http://phpweby.com/software/ip2country In the local server, I can mod...

0
Q: Parse error PHP file

user3041174I was moving my site and everything is working great except on one page I get the following error: Parse error: syntax error, unexpected $end, expecting T_VARIABLE or T_DOLLAR_OPEN_CURLY_BRACES or T_CURLY_OPEN in domain/details.php on line 85 It was giving other errors that I manged to fix but ...

0
Q: pecl xmldiff unable to load in apache

user3052197I can't load xmldiff to apache pecl install xmldiff didn't throw any errors BUT I error get in apache error.log is : PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/xmldiff.so' - /usr/lib/php5/20090626+lfs/xmldiff.so: undefined symbol: ZTVN10_cxxabiv117__class_type...

0
Q: Form Posts Every Time Page Reloads

mike jonesCan someone help me out as i'm quite new to coding. I'm using smarty template engine and i have this form that is for users to update they're cover image or add one but my problem is that every time i or a user reloads the page the form posts a new image everytime without even pressing submit bu...

0
Q: parssing paramters POST

Waldhoma AnaI want to create a REST Web Service by using which I am able to get the result in the form of portal Morocco rail travel including train ticket prices. url: http://www.oncf.ma/PrixEtReservation/Pages/BilletsNormaux.aspx Basically I want to create a Web Service with php, but i can't found in ht...

-1
Q: How to check data in table field if exist show record already exist

user3052205I have one table and there is filed like ready_dt ... and php code that a query should search whether filed ready_dt is there in the table it should show record already exist..How to check data in table field if exist show message record already exist in php

0
Q: PDO Mysql WHERE LIKE query implementation

F.NI have this simple function in a class: public function getSearchResults($selectedMethod, $query) { $this->_query = '%'.$query.'%'; $this->_selectedMethod = $selectedMethod; $db = mysql_init(); $sql = "SELECT * FROM plantsRecords WHERE ? LIKE ?"; $prq = ...

0
Q: Image setting cookie and redirecting to the correct url

Jake MclaughlinI am currently loading a random username from a database and creating a image based on that users information, the image url would look something like http://example.com/image/user.png it sets a cookie in the viewers browser and if I click http://example.com/image/redirect.php it will go to that ...

0
Q: how to prevent user from using multiple browsers at a time

stockBoiI have login system in my site and users have to pay for using my site. As they have to pay, I am afraid that one user may share his username and password with another users. So I have to set my login system in such way that no user can use more than one browser at a time. But they can change the...

0
Q: Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier or variable or number

user3032860I got this error: Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in C:\xampp\htdocs\AddMessage.php on line 83 and I don't know what I'm doing wrong. Here's my code: <?php ...

-1
Q: Is there any component for cmparing various product in an e-shop website written in joomla?

user3038351I want to design an e-shop website based on Joomla.It is very important to know that there is any component to compare the products or not. I need to compare all features of two products in one table.

0
Q: What's wrong with my regex for validating password?

Nguyễn Trọng BằngHere is my pattern for validating password: $pattern = '/^[0-9A-Za-z!@#$^%*_|;:\'"`~.,\(\)\{\}\[\]\<\>\\\/\?\-\+\=\&]{6,}$/m'; I use function preg_match to validate preg_match($pattern, $string); But when I run it, it shows this error: Warning: preg_match(): Unknown modifier '\' in xxx on l...

0
Q: Mysql inner join/ multiple selects in one query?

JafoolHi all! I'm scripting a guestbook (personalized for each user). I have one table for users and a different one for the guestbook. Now, the way I'm currently displaying the name of the author of a post is not optimal. I simply have a row in the DB for "fromname" i.e the authors name. I would like...

0
Q: Generate div automatically by mysql_fetch_array

Mario G.I would like to create a system to issue opinions on a given thing. I'm at a good point, but I can not get created for each element taken from the database a correspond div. Let me explain, for example if I have three reviews made by the three authors, I would like three divs for the reviews, and...

0
Q: Copying a file content to a variable

Imri PersiadoI would like to copy a php file content to a variable and execute it, not print it! I found out that there are 2 ways: file_get_contents('http://YOUR_HOST/YOUR/FILE.php'); In that way the code is executed but not as I want to, I will explain: a.php: <?php require 'file.php'; $output = file_g...

0
Q: Infinite Scroll wont show next posts

Ben HaywardI cannot get infinite scroll to show the next page's posts, I don't know if it is because I can't view /page/2 but i don't know how to fix that. It is definitely linked to the navigation that would usually show up so I don't know what is wrong. I've been on for days and i cant find an answer. I'm...

0
Q: Link taxonomy to post in wordpress

Steven GosselingI'm currently working on this plugin to change a few things, including the optimizing for the SEO. With this plugin you can add products and order them into product types. The product types are terms that have the taxonomy pg_sas_type and the products are stored as a post. You can call this plu...

0
Q: PHP strtotime return unexpected value

user1711575I have a bit of PHP code for date formatting as follows $date = date('Y-m-d', strtotime('2076-11-26')); echo $date; But for certain date returned value is 1970-01-01, I really confused about this matter, above is one example date which I got 1970 as year, I set...

0
Q: MySQL select 3 UNIQUE random ID rows fast WHERE

user3052268I need to be able to select 3 Unique random MySQL ID rows from a table that is progressively growing and growing over time, AND have a WHERE 'status' = 'available'. So it only picks the id number if status = available. There will be no gaps as all data is kept for record keeping compliance, if d...

0
Q: recognize opera browser by php

user2078421i using this php code for recognize browsers. $ua = $_SERVER['HTTP_USER_AGENT']; if(preg_match("/\bOpera\b/i", $ua)==TRUE){ echo '<link href="stili/opera.css" type="text/css" rel="stylesheet"/>'; }elseif(preg_match("/\bMSIE\b/i", $ua)==TRUE){ echo '<link href="stili/ie.css" type="text/cs...

0
Q: Show only parent category post

Pritesh MahajanI want to show only parent category post. like i have create 1 category (pritesh : Parent category) in wordpress and add 2 post in this category the i have create another category (Nilesh - Child cateory) but this is the child category of first one and then i have add 2 more article in this categ...

1
Q: removing row from a table cause delete in another one

Marco CI have 2 tables: the categories table and the products table. there aren't direct relationships with external keys so no dependencies in SQL. Products table contains a field called category_id just to do joins with categories table in my views. Here the problem: when i execute this procedure i...

0
Q: php i am studying file_get_contents

user3001625i am studying php programming and i am testing some things. i am been trying to download some data html with $this->html = file_get_contents($this->url); $fh = fopen('txt\htm.txt', 'w') or die("can't open file"); fwrite($fh, $this->html); fclose($fh); if run this script...

0
Q: Find nearest keys in a double array

Juanjico(sorry for my bad english) I have this array: $a[1][0] = 78.00; $a[2][0] = 140.40; $a[0][1] = 36.00; $a[0][2] = 64.80; $a[1][1] = 114.00; $a[0][3] = 100.80; $a[1][2] = 142.80; $a[1][3] = 178.80; $a[2][1] = 176.40; $a[2][2] = 205.20; I need to find the nearest keys for a given key. I'll try...

0
Q: IOS app How to get data from server

swstrau118I am trying to create my first iPhone application and was hoping someone could direct me in the correct path. I am trying to build an iPhone app that can communicate back and forth from a server? (example. I want to create a login/registration page that will authenticate through the mysql datab...

0
Q: MySQL: Look for the same string in multiple columns

user3052276I am trying to make a search-page-like function. I want to make a query to look for "query" in "ColumnA" and "ColumnB" and "ColumnC" and "ColumnD". And select the rows which has the word/phrase "query" in any of those columns. This appears to work: SELECT * FROM projects WHERE category LIKE ...

-5
Q: python, ruby, php vs c#. Performance and Advantage for business

yozawiratamaWould you mind if i ask your opinion, Which one is better between c #. Net, Python, ruby and php, for: Business Preservation code Performance Inheritance code Easy to code/learn we will create a cloud service + mail service.

0
Q: Requesting website regularly within specific interval

Seyed Morteza MousaviI have robot which should be run within specific interval. So I want to refresh the website page that runs robot within specific interval. I know there is some site that we can sign up and that site refresh my website for specific interval. But i forgot them. I googled but did not found that site...

0
Q: After Rewriting URL using htaccess AJAX pagination calls two times when clicking pagination link

user3052278Hi I have a listings page where all listings are shown with pagination and it was working fine until I rewrite the URL to make is user and SEO friendly. Since I rewrite the URL now pagination creating issues, AJAX calls two times when I hit any page number of pagination attaching the screen shot ...

0
Q: Insert hebrew text to column SQL 2000

AlmogI cannot insert text in hebrew to column. Example: mssql_query ("UPDATE TABLE SET COLUMON = N'בדיקה'"); it add but the text is '?????' and if i insert from Query Analyzer, it work fine. My column collation is HEBREW_CI_AS. How i fix that ? *Sorry for my bad english.

0
Q: PHP regexp replace all matches except the first one

asim-ishaqI am using preg_replace to replace # with \n# from the following string: #0 F:\dev\htdocs\cms\lib\Cms.php(76): ReflectionClass->__construct('Mod_Simple_Top_...') #1 F:\dev\htdocs\cms\cms.php(45): Cms::renderModules(Array, #2 F:\dev\htdocs\cms\bootstrap.php(63): require_once('F:\dev\htdocs\c.....

0
Q: Get the username of a windows user

alphyI would like to use php to look for a specific downloaded file in the downloads. If that file is found it should then be unlinked using php function. I can't seem to find the username. the getenv() function just gets the name of the computer. My path is as follows C:\Users\Administrator\Download...

0
Q: unable to upload larger files larger than 5 mb on<a href="http://www.filestack.in">filestack</a>?

user3052304i have set upload_max_filesize = 40M in php.ini but unable to upload files larger than 5 MB filestack

0
Q: Customization of xgettext

user2595304I'd like to ask about xgettext. I'm using templates with .latte extension. Inside these templates is text to translate like this: <br/> <h1>{_("Text to translate")}</h1> Can someone suggest me how to change settings of xgettext to parse *.latte templates like example above? Thanks!

 
3:11 PM
0
Q: codeigniter : how to show single line from db

user220389hello i just like to know how i can show only one line from db. i can show with foreach loop but cant show without foreach loop here is my code: This controller for view data from model public function view_main_body() { $data = array(); $data['main_body_detail...

0
Q: How do I use PHP POST variables in a math calculation?

David222first time asking on the site so sorry if the question isnt too detailed. My code: <?php $a = ($_POST['a']); $b = ($_POST['b']); $op = ($_POST['c']); $ans = $a $op $b; echo $ans; ?> As you can see im passing in numbers $a and $b and want to do something with them depending o...

-3
Q: I have no idea whats wrong in my php code

user3051759I'm a freshman ..and i have a project to do using php.. this time i need to search records from my database..below is my code.. :( and I have no idea whats wrong in my php code.. please help.. $connection = mysql_connect("localhost","root,""); if (!connection) { die ("Please reload page. Da...

0
Q: Upload both input data and image with jQuery

v0idmp3I have one problem. How can I send input data and file to PHP without tag in HTML, just with POST Ajax call in jQuery? To be more specific...I have registration form with basic input fields and with upload box for avatar. I dont have tag, it just input tags and one button. When button is click...

 
3:29 PM
0
Q: Using values from a JQuery form to select database items that match form values

ChrisosaurusI'm looking to use a form that I have and from choosing certain time and dates I would like to use php to select items from my database that match the range. <form name="ReadingRange" action="RangeSelect.php" onsubmit="return DataValidation()" method="post" > <div data-role="fieldcontain"> <...

0
Q: In RewriteRule if pattern and substitution begin with the same string, the RewriteRule doesn't work. Why?

Alberto FontanaIn this post: My previous post i was asking help for a strange issue: a correct regexp was not working in a RewriteRule. After hours of work i found how to fix the error and i found out this strange thing. If i write this rule in .htaccess: RewriteRule ^rankings\/[a-zA-Z0-9\-]+\.html$ /rankings...

0
Q: Dynamic pages content

Imri PersiadoI would like to change the site content in realation to a GET variable from the URL for exmaple: www.example.com/index.php?a=products www.example.com/index.php?a=contact My site contains 3 blocks: navigator left block right block The block that would be dynamic is the right one. Using requ...

0
Q: How to search value from multiple array with out in_array and foreach?

user3052364'$multiple_array=array( 'a'=>10,'b'=>10,'c'=>array('x'=10,'y'=>'30') );' find the value of Y.

1
Q: Wordpress theme not uploading to Amazon EC2?

LittleLebowskiI'm setting up a Wordpress blog on Amazon EC2 server with nginx and Varnish. I've followed this tutorial step by step. The blog is setup & working fine. Now when I try to upload a new theme through Wordpress, it starts uploading and by the time it reaches 70%(takes around 1 minute to reach 70%...

0
Q: jquery button in login page

user2322921I'm very new at programming and I have some problem about jquery button. I want to use jquery button(jqueryUI) but it doesn't work , my page show "Username and Password Incorrect!" but If I use normal button (without login.js) It's OK so how can I fix this problem ? Thank you . HTML Form:- <...

0
Q: Prestashop REST API get only new modification

Luc DUZANfor a student project we have to fetch data from a prestashop website in order to populate a data warehouse. Our idea was to request for new data every X hours the prestashop website by using the rest API. Unfortunately, it's look like there is no way to do something like that. I have looked at t...

0
Q: ( xampp to zend server ) why shoud I use utf8_encode?

AbderrahimDz24I'm using xampp as dev env and zend server as pro env, and I have a string ( test = "zéro") returned from Numbers_words xampp show the correct string but in zend server I must add the utf8_encode to get the correct string . and when I write this string my self zend server shows it correctly e...

-1
Q: How can I call a PHP file and sending an alert to the file that called it?

Angel Gabriel Moreno PaezHi I have the next source code that it´s called for another file at a submit event, basically what it does is searching for a set of items with similar name (handled through POST), what I want to do is sending an alert in the previous file that called it (recepcionagregar.php), if one of the post...

1
Q: Resume an ftp upload with curl

user3052362i'm buidling a php script to upload larges files from a local php server to a distant ftp server with log of progress in a mysql base. Evrything work fine, but i get problem with the resume function and i can't find any clear information of the process to follow to resume an ftp upload with curl....

0
Q: Upload image ,insert name and path in databse based on value

user3052155I have the following code wich works after submitting my form: I'm getting the photo wich is upload, in my upload folder. Now i want to Insert this photo name and path in my database.. Example: If image name is 6.jpg, I want in my databse name=6.jpg and path=uploads/6.jpg html: <form method="p...

0
Q: PHP How to get a method name with a class and namespace path as a string?

Vytautas LozickasI really hate to write this question because I'm kind-of "research guy" and, well, I always find what I'm searching for... But this one bugs me a lot and I can't find the answer anywhere... So, here it goes: As the title says I need to get a method name with the trailing class and namespace path...

-2
Q: Javascript, jQuery or PHP Selected state in a Different page

Jeremi LiwanagAs of now, I do have a filter quicksand(plugin) image gallery in my Gallery Page. So when i click SMALL, all small images will come out ( ofcourse having the selected state of SMALL ) so on and so fort.. I have a menu with a dropdown of ( Small, Medium, Large ) variations.. What i want is, Wh...

-2
Q: php echo username of logged in user on profile page

RJcreatives****I currently have a very basic but working system to allow people to sign up and then login to see their profile. However I am try to add 'Welcome "username"' to the profile page but I am having no luck with it. This is the file login.php <html> <head> <meta http-equiv="Content-Type" content...

-1
Q: Multiple insert with one input text each radio button

user3049577i'm so sorry guys, but please take a look at these 3 pictures before read my question https://www.dropbox.com/s/3h1sq8f2wt9kywm/3%20pictures.rar hi everybody, i am a new guy at php programming, i want to ask you about how to insert the values from the top box (see picture form.jpg) with multiple...

0
Q: Trouble passing the right IDs and updating score in reddit-style voting-system

Morten00I'm trying to adapt this reddit-style voting-system for my site: http://www.technabled.com/2009/02/reddit-style-voting-with-php-mysql-and.html I'm having trouble with the votes.php script that is supposed to fetch the plus or minus vote and update the score. It gives the following errors: Noti...

0
Q: How to use Bromine RC2 Quartz scheduler?

user465465I'm using Selenium & Bromine(downloaded vm) for a long and still. I know Bromine is not active and also I know Jenkins/Hudson are the workarounds. I am addicted to Bromine and it has enough features to test my sites with nice UI and I use php scripting for test cases. For now, I'm not looking to ...

0
Q: How to restrict values in MySQL insert?

attvgSo I have a simple database exercise at school and I'm nearly finished but I don't know how to restrict values. I have a database like: ID | Name | Age 1 | John | 20 2 | Jack | 30 And so on. Is there a way to prevent users from inserting an age lower than 18? I've been searching a lot and...

-2
Q: Building an OOP Calculator in PHP

Johann BehrensI am building an OOP calculator in PHP and I think I started off decent. I have an HTML-file: http://pastebin.com/HDe2i8Zm The include from the index.php is as follows: http://pastebin.com/ci7bFwJH And the Calculator class is defined in this file: http://pastebin.com/j1SLVimK The assignment is...

0
Q: PHP Version Failure... Script Working on my website not on my localhost

user3022213so basically this page, shows contests from a database, and a button to pick numbers, the scripts work Fine on my website, but when I try to develop things on my WAMP server (php 5) the button doesn't do anything on click. PHP version on my site: 5.3 PHP version on my localhost: 5.4.16 I probabl...

1
Q: How to Run a Whole site From index.php

James Okpe GeorgeI have noticed that in a couple of sites they can run the whole site from just the index.php, I also noticed the same effect in phpmyadmin to some extent. An example of a site that does this is Try Open School, it is a demo site, and you can log in with (admin as password and admin as username,...

0
Q: Adding a email form to a Facebook static iframe

user42760I used the Static iFrame app to create a custom Facebook tab. Very simple. I'd like to add a form that asks for only a visitor's email address. Then on submit, the email address is sent to a target .php file that sends the new subscriber's email address to me. And I'd like a message (such as ...

0
Q: preg_replace, insert hashtags around desired value

Ivan RisticSo i have this string, it can look like this: <div style="display:none">231</div>.<div style="display:none">13</div> id want: <div style="display:none">231</div>#.#<div style="display:none">13</div> or like this: <div style="display:none">231</div>125<div style="display:none">13</div> w...

0
Q: Can't get fopen to open file

Jim RaymondI can't tell you how stupid I feel having to ask this question, but I've been working on the most simple of commands (for two days) and can't find the problem. I 'borrowed' some code for a non repeating hit counter. I have tried to get it to work and I finally determined I'm not getting access ...

0
Q: How to test factory classes?

Matthieu NapoliGiven this class: class MyBuilder { public function build($param1, $param2) { // build dependencies ... return new MyClass($dep1, $dep2, $dep3); } } How can I unit test this class? Unit-testing it means I want to test its behavior, so I want to test it builds my obje...

 
3:59 PM
0
Q: PHP MYSQL simplest user search technique with sorted results

AnirbanI have a user table in mysql with cols : user_id,first_name,middle_name,last_name I want a query that would return me user_idlist sorted in the order of closest match. E.G. If i search John f kenedy or f john kenedy or kenedy f john and so on , would return same set of results sorted similarly a...

0
Q: I am getting a SQL error when trying to update a form in PHP

zac<?php $con3=mysqli_connect("localhost","root","","test"); if (mysqli_connect_errno()) { echo "Connection Failed: " . mysqli_connect_error(); } //$result = mysqli_query($con3,"SELECT * FROM servers"); $updateln = $_POST ['LoggedIn']; $updateloc = $_POST ['Locati...

0
Q: twig service provider [twig.options]

versh23I user silex with TwigServiceProvider; i register it $app['debug'] = true; $app->register(new Silex\Provider\TwigServiceProvider(), array( 'twig.path' => __DIR__.'/../views', 'twig.options ' => array( 'cache' => __DIR__.'/../cache/twig', 'strict_variables' => false ...

0
Q: PHP AND IF statment

user3052462im tring to call php page from a simple html page, and i cant find the syntax error this is the html <html> <body style="background-color:#990000;"> <h5 align="center" style="font-family:tahoma;color:white;font-size:50px;"> Welcome! </h5> <form align="center" method="post" action="php_site.php">

0
Q: INVALID response paypal IPN with cakephp

user3052433i have 2 problems with paypal IPN : 1 : paypal don't send the response to the notify url ( in the variable notify_url ), it only send to the return url, even if i change the notify url in the paypal sandbox configuration. 2 : i have an INVALID response from paypal, here is the return of debug($...

0
Q: Sphinx search with Character Sets

stackCoderHow can i use search $keyword like gr[ae]y to match either gray or grey in Sphinx. Is it possible to use "character class" similar to regex. ps: I dont wanna send manually gray | grey string for $keyword

0
Q: PHP no echo data when using exec

Chocolatei have a problem using the exec function in php. i try to echo parameteres back after executing a shell cmd. My problem is that after executing the shell cmd no parameters are sent back, if i edit the exec lines out everything works fine. here is the code: ... $command = 'avconv -i ' . '...

0
Q: Using mCrypt with same IV for several pages?

user2341915I am using following code to Encrypt my url data like ?a=1&b=2&c=3 and I send this encrypted data to another file like this http://www.example.com/parse.php?data={encrypted_string} but on this page, i does not get decoded result, Just getting blank screen, Here are both functions used for encry...

0
Q: PHP mail sending with Javascript

RezaM//Sorry for the bad English, I'm from Holland. I'm having a problem with sending a mail from my site to my own Outlook.com account, the problem is that if some one is using my contact form it doesn't send the mail to me. Normaly everything in PHP with the mail process would work but this time I...

0
Q: Compilation failed: assertion expected after (?( at offset 115

SchmitzITWe upgraded MediaWiki today, to what was supposed to be a stable build. However, we're now experiencing this error: Compilation failed: assertion expected after (?( at offset 115 The offending code is in /includes/IP.php, and specifically is the function below: public static function ...

0
Q: results "join" the array does not match the date in javascript from php

user3052440I have a problem, when I will return results array from php to javascript in the form of date, then the show is not like I want. this my code in php: <? $dates = new DateTime('2013-04-06'); $dates1=$dates->format('dm'); $arrtanggal[] = $dates1; ?> and in javascript : <script>...

1
Q: php line break issue - function return in echo of while loop

user2987790My Problem ist that the two first function echos in the while loop break the line in the code, after this it goes fine. Function: function firstFunction($string) { $search = array(' - ',' ','.'); $replace = array('-','-','-'); $string = strtolower(str_replace($search,$replace,$string)); return ...

0
Q: Facebook API read conversation of managed page?

Mohamed MostafaI am trying to read inbox of pages $facebook->api( '/page_id/conversations'); I have the below permissions "user_photos,manage_pages,user_likes,read_insights,read_mailbox,read_stream,read_friendlists,read_page_mailboxes" Other requests are working such as : $facebook->api( '/page_id/conve...

0
Q: Upload file to Bitbucket via PHP script

saveandload.comI try to upload my database to bitbucket downloads section of my repository via a PHP script using curl library. Normally i go to my phpmyadmin and export my database to a folder, then going to my bitbucket account under downloads section of my repository and upload manually. I need a script that...

 
4:30 PM
0
Q: I can't echo certain veriables?

john londonI am trying to validate my form using php. The thing is I have 2 radio button's and 3 select.When I echo out my code below nothing happens, no error is shown but the variables do not echo. if I change my code and exclude"$sex,$month,$day & $year" it echos. I am wondering if I should use jquery t...

0
Q: Doctrine OneToMany / ManyToOne referenced object always null

RalfI am building a Symfony 2 application and therefore using doctrine for ORM. So fare everything went well except one reference which will allways be null and I can't figure out why. So here is what I have: Group Entity: class Group { ... /** * * @ORM\ManyToOne(targetEntity="Te...

0
Q: What is 9.31571369048E+17?

Adam CrothWhat is 9.31571369048E+17 ? I couldn't find any solution about this +E17 on the web. How can I convert this string to int or bigint value with PHP?

1
Q: JSON Exception no result returned

user1928775Android application that receives ID ,Name and Email from PHP file ID , Name , Email sent as JSON response to Android Application , the problem is when i click get data no data is received and i get an exception in the LogCat here is my code,PHP file and stack trace MainActivity package learn2cr...

0
Q: CakePHP link to login page redirect problems

Ronny vdbI am trying to create a very simple link that will send the users to the login page. Here is the code for my link: echo $this->Html->link('Login', array('controller' => 'Users', 'action' => 'login')); That works fine, the user is sent to the login page, however the problem is that once the use...

0
Q: PHP use a variable from a different file

RJcreativesI have a login page which records the username that the user enters and adds it to a variable of $uname. However when the page after the login page loads, I cannot echo the $uname. For example, when i type Welcome <?php echo $uname; ?> it does not insert the username. below is a copy of my l...

0
Q: is there any function to check values (only 0.25 steps) without declaring them?

user3038158I am building a form and I want to check user inputs. Allowed are only numbers from 0 to 30 with 2 decimals, but increase only in these steps 0.25 steps. So for example this values are allowed: 0.25; 1.50; 3.75; ... this values are not allowed 0.26; 1.53; ... Can I check this without to declare a...

0
Q: PHPExcel Warning: ZipArchive::getFromName(): Invalid or unitialized Zip object in

user3016968I'am trying to read xlsx file, but I get this error: Warning: ZipArchive::getFromName(): Invalid or unitialized Zip object in E:\wamp\www\test\Classes\PHPExcel\Reader\Excel2007.php on line 323 what this error mean?

0
Q: PHP Include not recognized in html

user3052552<!DOCTYPE html> <html> <head> <?php include('head.php'); ?> </head> <body> -snip- </body> </html> What am I doing wrong? When I open this file (index.html) in a browser it shows a blank page, and nothing in my php file shows. It doesn't recognize the include statement as code. My php file con...

0
Q: Split Multidimensional array to arrays php

Stefano SchivariHi guys i want ask to you the best way to convert this multidimensional array Array ( [0] => Array ( [nome] => Livello1 [id] => 47 [level] => 0 [0] => Array ( [nome] => Livello 2 [...

0
Q: how to show different row in different page from db in codeigniter

user220389hello i just like to know how i can show second row from db. and another page will show 3rd row from db. How i can ? This controller for view data from model public function view_main_body() { $data = array(); $data['main_body_details'] = $this->sa_model->select_main_body(); $data['admin_conten...

0
Q: CakePHP - password hashed twice

user3027356I try tutorial Simple Acl controlled Application from CakePHP website and I have problem with hashing password. My tables are: CREATE TABLE users ( id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, username VARCHAR(255) NOT NULL UNIQUE, pwd CHAR(40) NOT NULL, group_id INT(11) NOT NULL ); CREAT...

 
5:00 PM
-2
Q: How to merge a php file into a jpg file

RL.AdmiralXSo i'm trying to merge a php with jpg so on the webpage the image url launches the php script.is it possible?

0
Q: Codeigniter gives 404 error on ajax call

1linecodeI have an upload form which after ajax upload 2 buttons allow the user to change the uploaded photo or delete it. I've implemented the whole system right and works fine. but my problem is and was when I tried to make an ajax call to the function that deletes photos it gave me csrf protection erro...

-2
Q: php if two or more result match then apply css class on it

JeffWith the help from one of the senior member here, I manage to create a simple php application to ease my mom in counting the number result. The question posted before at here The last row of my function you may refer to the picture at this link As you can see the result: 11 2 5 1 4 7 ...

0
Q: Trying to make SHA-1 work in login/register php script

exZerrySo I was trying to make this php script with sha1 hashing for password, but login/register form fails to proceed and doesn't write into database. Help lads) I posted 4 files, where you can see everything. config.php (removed my sql login/password) <?php mysql_connect('my_host_name', 'my_usern...

0
Q: How to put 1 variable in first page and get value from 2nd page

Innocent PrinceI want to put 1 variable in my send.php page and get its value by if statement on 2nd (page-contact-us.php)page, because I have my form in 2nd page with <form action="<?php bloginfo('template_directory');?>/send.php" method="post" id="contactform"> and in my first page (send.php) i have if sta...

0
Q: AngularJS: output array (with keys) from php in ng-repeat?

user2002495I have a rootScope variable that will contain category for products, and each category may or may not have children. This is how I assign the rootScope: $rootScope.categoryList = $http.get('category').then((result) -> result.data) This will make request (to Laravel route) to get me arrays of ...

0
Q: accessing $_GET[] array with url rewriting

Mario LegendaI'm building a website for a hair saloon. I got all the time that i need so I i started to build my MVC framework just to better understand MVC. The core of MVC is url rewriting. RewriteRule ^(.*)/?$ index.php?url=$1 [L] That would result in this... www.example.com/register $_GET['url'] = 're...

0
Q: Inserting array into mysql in correct columns

AllMightyIm totally new to php but this should be easy for you. I have changeable number pair of forms (using jquery) sending data to process page. I manage to capture data with following code: foreach ($_POST as $formName => $value) echo "The ".htmlspecialchars($formName)." is ".htmlspecialchars($va...

0
Q: Fatal error: Call to undefined function memcache_connect()

springnoobI have pecl-memcache 2.2.7 installed on a linux host however when I make a call to memcache_connect() I get a : Fatal error: Call to undefined function memcache_connect() phpinfo() shows the following: memcache memcache support enabled Active persistent connections 0 Version 2.2.7 Rev...

0
Q: How to keep a form from resending data?

Raymond KneippI have a form where you can send an email to someone, if i reload the page it sends anouther email. How do I make it so it does not do that? A forum said to change it to GET, that did not work either. <form action="index.php" method="GET"> <textarea name="comment" cols="16.5" rows="5" style="res...

0
Q: would it be reasonable to clone (e.g. db_de) the database and translate it for a second language?

SkeletorWould that be a good way to add a language to the webpage by cloning the database. Perhaps the database name could change from so that the php connects every time when the language changes to the desired database. I could even store the database into the session. I have red about different ways...

0
Q: ZF2 Form Collection with fieldset stays in old state if validation fails

JEMI have a form object with the following collection element: $languageSkills = new Collection('languageSkills'); $languageSkills->allowAdd(); $languageSkills->allowRemove(); $languageSkills->setLabel('LANGUAGES_SKILLS_QUESTION'); $languageSkills->setCount(0); $languageSkills->setShouldCreateTempl...

0
Q: Sentry Login using username or email (any of em) in Laravel 4

Sagiruddin MondalCurrently I am using sentry login using email , I know how easily it can be converted into username if I simply change the sentry config file to this 'login_attribute' => 'username', But I find it odd because then the emailing of forget password info became unreachable. What I want is,...

0
Q: php with embedded javascript outputs newlines on HTML tags?

user3052628I have a php page with JavaScript to be used on a wordpress page,but when the page is generated all <div> <p> etc. appends new lines. Example : Test.php -> <script type="text/javascript"> Alert('hello<div>world</dig'); </script> When I view-source there is new lines on each - which breaks...

0
Q: what can make google webmaster tools not accept my valid rss file as a sitemap file

usama sulaimanI created a valid Rss feed for my site my site: http://foodonia.com , I can't send the RSS file here but I used http://feedvalidator.org to ensure that it is valid I have 100 posts links in my Rss feed created dynamically (it is a custom rss feed not the original WP one) Does Google (or MS Bing...

0
Q: login form redirect to 404 error

user3052629when ever i click the submit button even if blank or filled, it redirect me to 404 msg, at the same page (i have my own 404 msg), i realy have no clue where the problem is, so i added both scripts (there are at the same page). here's is my login.php <?php require_once '../DB/core/init.php'; $u...

0
Q: Javascript and PHP Regular Expression to exclude different chars

Gabriele MandalariI want to use the PHP function preg_match and the JS function test to exclude strings with this chars: |, +, --, =, <, >, !=, (, ), %, * Can you give me the correct pattern for this expression ? Now i use this solution: pattern = /[+|=|<|>|(|)|%|*]/; if( pattern.test(mystring) ) ...

0
Q: Query works through phpMyAdmin but doesn't work through php script called from viewController

PinturikkioI've a tableViewController that presents a list of places sorted by name! This list is retrieved from my MySQL database using the query SELECT IDUser FROM Castle ORDER BY Name But my goal is to sort them by location according to userLocation. So, Any Place in the database has the fields "la...

0
Q: strange behavior on contact form

user3037662I am having a strange problem with this form. I have made it yesterday night and it was working fine, sending all the emails as it should. However, i've run it today and it won't simple work at all, I am always getting the error message. Any clues? Thank you. <?php $name = $_POST['name'];...

0
Q: PHP Illegal string offset in foreach loops (Facebook app)

user2621077I am new to PHP and i am trying to make here a very simple facebook app that displays a random number of friends' profile pictures ( 9 friends ). It does display what i want EXCEPT for an orange error sign saying "(!)Warning: Illegal string offset in 'id'..." This is my code by the way: (i have...

0
Q: Counting number of duplicate words entered in string using AJAX and php

user3052650For e.g.: If the string is $str="Rahul Vohra is a friend of a Rahul Kumar”. Then Output should be ‘2’ as it contains ‘2’ duplicate words, ‘Rahul’ and ‘a’.

0
Q: mysql select and join on multiple tables

5erI'm having tables like product table: id_product | code group table: id | fk-id_product | id_code grade table id | fk-id_product | id_grade person table id | fk-id_product | id_person my sql query is: "SELECT * FROM product JOIN group ON group.product_id = product.id J...

0
Q: error while tring to connect to the mail via php

Vlad GincherI'm trying to build a mail system - using her you can recive and send mail. Sending mails is easy - I can use mail(). The problem is with reciving them. I opened mail in cPanel and I tried to connect him: $hostname = '{mail.***.net:143}INBOX'; $username = 'support@***.net'; $password = '******';...

0
Q: FB graph api comment box into php auction script

Gábor Ifjabb SziládiI have an auction website written in php./phpprobid/I would like to put the comment box at the end of the auction.Which is there already,but it is not pulling the data from the picture/description from the script.All auctions are handled by one file auction_details.tpl.php,it pulls the data from ...

0
Q: url of a page in software should open only when logged in?

user2939942I am a newbie.I have software within multiple pages. URL= www.xyz.com/welcome.php username appears when logged in with username/password but when i paste this in other browsers it opens up without logging in username does not appear but all links@pages opens up. I need to login in page only...

0
Q: Preventing WordPress excerpts from hiding videos

bmearnhardtI'm using WordPress on my website and want limit my posts length on the front page with the_excerpt() to about 100 words. However if I do another post that has a video will hide the video and I don't want that. However if I use the_content(); and the tag in the post the Read More link has #mor...

 
6:00 PM
0
Q: How to wait for JavaScript while parsing website in PHP?

LihOI am writing a script in PHP (Yii framework) that will parse some website to retrieve some data: Yii::import('ext.SimpleHTMLDOM.SimpleHTMLDOM'); $simpleHTML = new SimpleHTMLDOM; $html = $simpleHTML->file_get_html('https://somedomain.com/something'); echo $html->plaintext; Yii::app()->end(); ...

0
Q: Display metabox values in Wordpress

blam4nzI'm trying to add metabox with date in Wordpress. I used code from: http://wpsnipp.com/index.php/functions-php/start-date-end-date-metabox-for-events-custom-post-types/ It works well, but i have problem with display metabox values on page.. My loop: <?php query_posts(array('post_type' => 'event...

0
Q: Make cURL in PHP re-use connection even when server response has no http-headers

kosI'm using cURL to make EPP 1.0 Client. EPP needs persistent connection, but some servers send XML-response pre-pended by a 4 byte header, describing its total length in octets in network (big-endian) byte order, instead of HTTP header. So I get something like this from curl_getinfo($ch):   [con...

0
Q: Yii joining two table using relations in model

wpleetHi I have these two tables that I want to join using relations in Yii, The problem is Im having a hard time figuring out how Yii relation works. picturepost id title link_stat_id linkstat id link post_count I also have a working SQL query. This is the query I want my r...

0
Q: MySQL Query Not Returning Values

dalawhI am trying to get values from MySQL database where the value of the Username column is the same as the parameter being passed in. The parameter being passed in is "Griffin". function logIntoDb($username) { $users = mysqli_query($GLOBALS['con'], "SELECT Id, Username FROM Users WHERE $username=Us...

0
Q: when do you use fetch() with SQL and php?

user2554352I am a little confused on when you use the fetch() method and when you do not. Like in this case: Why do I need the fetch() method here: $query = "SELECT * FROM Idea_Categories WHERE categoryID = $category_id"; $category = $db->query($query); $category = $category->fetch(); $category_id = $cate...

0
Q: Codeigniter - call library into error page

sbaaaangi'm using Codeigniter but i can't find out how to call a library inside the error/error_page.php how do you do? i tryed just for fun this but won't work: $CI =& get_instance(); $CI->output->enable_profiler(TRUE); Also, do you know a easy way to use error pages inside a custom controller? T...

0
Q: How to make a URL mod redirect (.htaccess) more fool proof?

GandalfI have the following redirects, which partially work fine but are not quite fool-proof. URL (works): example.com/test123 example.com/test123/hello The .htaccess I have: RewriteRule ^(\w+)/?$ /index.php?id=$1 [L,QSA] RewriteRule ^(\w+)/(\w+)/?$ /index.php?id=$1&mode=$2 [L,QSA] Although it ...

0
Q: select rand keys from array

DjOnceI am doing a school project and I am facing this problem. I would like to get all the id from the table tegjithagocat that complete the condition shkolla_id = '$shkollaidsafe' AND verifikuar = 'po'. I though the best way is to create an array that will keep all the id selected from the while loop...

0
Q: Sessions in php

Gaston VelardeHi guys I was wondering if could see what is wrong with my sessions, I have been trying to study sessions for almost 3 days but no luck. this is log in page <form action="log_php.php" method="post"> <link rel="stylesheet" href="LogInCSS.css" style="text/css"> <p><

 
6:18 PM
0
Q: if ($_SERVER['REQUEST_METHOD'] === 'POST') doesn't seem to work

ianI got this code, in login.php: <!DOCTYPE html> <html> <head> <title>login.php</title> <charset="utf8" /> <?php if ($_SERVER['REQUEST_METHOD'] === 'POST') { echo "It works!"; } ?> </head> <body> <h1>Log in:</h1> <form method="POST" action="login.php" autocomplete="off"> Username: <input typ...

0
Q: PHP how to compare every five elements to each others in array?

Tarek NabilI already have a code to compare every five elements in array .Really have two codes but both of them make errors due to max nesting limit or exhausted loop when array size more than 18 element. I want to know if there is way to achieve that without errors !! my first code: $users = array(...

-1
Q: how to store thumb print in mysql?

DattaI have a project that requires user to log in through there thumb print instead of his/her id and password. Normally we store image's path in out database so "how do i compare the image of thumb print that user entered with the thumb print that is stored".If there is other better solution than pu...

0
Q: MySQL help need printing query results

user3047185Hey so when I try to print all players that are from a certain position from a sql database, nothing shows. here is the code for both pages form: http://pastebin.com/RaU6t0En process: http://pastebin.com/73Pwjqwi

0
Q: output sql query in php

user2954486I'm a noob at php so I need a bit of help. I have a table with a list of hotels, the columns are name | address | city | stars | price so far I've made a dynamic drop-down menu where the user selects a city from the table, this is shown in the code below: <?php connection stuff blah blah ?>

0
Q: MT4 Mysql connection via PHP

user2758001I need to get/send data from MT4 from/to Mysql database. I think may be using PHP as server (creating TCP/IP socket at a specified port) and MT4 EA/script as client. Or maybe using Apache as server (creating PHP scripts to do the job for Mysql connection) and MT4 EA/scrip as client. So, PHP is a...

0
Q: Wordpress, style php-generated post

user2915962Good evening, Im creating a wordpress-site with a self-made template. I would like to be able to style every singe post with css. This line: <h2 id="post-<?php the_ID(); creates a new ID for every post i make, for example <h2 id="post-1603">...Is there anyway that I can style, in advance, ev...

0
Q: Delayed Function in PHP

Chris HerbertI'm working on a Wordpress site that has a collection of YouTube videos. When a new video is added to the site, it pulls certain information into the site's database using YouTube's API (the video's duration, number of likes, views, etc). The problem is that this information will get stale pret...

-2
Q: Is HTML5 Offline Storage a good replacement for PHP and SQL when you want to give your users a completely offline feature?

user221287Is HTML5 Offline Storage a good replacement for PHP and SQL when you want to give your users a completely offline feature? http://www.ibm.com/developerworks/web/library/wa-html5db/

0
Q: Omnipay callbacks from APIs like IPN and Silent Post?

burzumHow can I capture paypal IPN and Authorize.net "Silent Post" messages? I'm fine with how to make payments with Omnipay but I could not yet figure out how to listen to the callbacks from these APIs to detect changes for my payments. For example Authorize.net processes it's credit card payments o...

0
Q: Contao 2.11 how add: global javascript and global block

110precentI need create chat module for contao 2.11. Website have standard and custom modules. I need add global javascript file (load on each front end url) and html block, with I can add to each page. Best if I'll do it in my own module, without interfering in other modules or core. I was looking for in...

0
Q: PHP Ajax jQuery UI Progressbar for Long Running MySQL operation

Eugene van der MerweI have a PHP script that takes a long time to execute because every operation has to do SOAP call to another website. I would like to add a progressbar indicator so that I can see the % complete of this script. I believe the way to do this is to do do an asynchronous Ajax call that executes the ...

0
Q: Keeping the html color input empty when no action is taken

user2073143I believe it is common practice to predicate an action in PHP on whether a variable that comes from an html input field is empty. At least I do it all the time. Like If ( $_POST['whatever'] != '' ) { echo 'Hi there'; } I'm running into a problem with the html 5 color picker, which apparently ...

0
Q: Regular Expression does not check against passwords well

Mostafa TalebiI need to check if the passwords ONLY contain ENGLISH numbers and letters. I use the following regular expression: if (!preg_match("^[A-Za-z0-9 _]*$^", $_POST['password'])) { // show error } { but this does not work and allows other languages characters without stopping the submission. what is...

0
Q: What format is this data in?

jamesWhat format is this in? Using a CMS that spits out this under var_dump($_SESSION['userinfo']). I need to be able to get the 'pilotid' from this information in PHP, which in this case is 6. string(728) "O:8:"stdClass":23:{s:7:"pilotid";s:1:"6";s:9:"firstname";s:5:"James";s:8:"lastname";s:7:"Allis...

0
Q: How do I make include files execute inclusively in php?

user3052823I've been looking at some example php code to make a members area on a website. In the examples the tutor says that you can just put <?php include 'members_area_protection.php'; ?> at the beginning of whatever the page is at that will execute and then the rest of the members area stuff will execu...

0
Q: PHP Calendar Script - 3 week event rotation

user3052802 I have hacked a script from javascript to PHP and need a bit of help to get it 100% correct. I'm trying to create a weekly list of 3 people and their job lineup for each of those 3 weeks. Example: Week1:Job1:Les Job2:Mike Job3:Dan Week2:Job1:Dan Job2:Les Job3:Mike We...

 
00:00 - 19:0019:00 - 00:00

« first day (284 days earlier)      last day (26 days later) »