« first day (306 days earlier)      last day (4 days later) » 
00:00 - 20:0020:00 - 00:00

12:01 AM
0
Q: Comma Operator PHP

EdwardBoth these statements are true: $_POST['foo'] = $_POST['bar'] = 'some string'; //1. with '&&' operator if(isset($_POST['foo']) && isset($_POST['bar'])) { echo true; } //2. with a comma if(isset($_POST['foo'], $_POST['bar'])) { echo true; } What is the difference (if any) between ...

0
Q: Request no work

BoomI want to remove duplicates from the query but it does not work. Help me please $check_link = mysql_query("SELECT DISTINCT posteur FROM files WHERE posteur = '$id_user' ") or die(mysql_error()); $row3 = mysql_fetch_array($check_link); $idposteur = $row3['posteur']; echo $idposteur."<br

0
Q: PHP - Adding divs to a foreach loop every 4 times, working with $post_object

user3126254I am building a wordpress page (based on quark, using ACF) showing info from other posts using foreach(get_field('exhibitions') as $post_object) I want the 'col grid_3_of_12-divs' containing info from other posts to group up in divs, with four in each div. A similar problem as the author of ...

 
12:25 AM
0
Q: My SQL query for join multiple tables via mm

SineMathaim looking for a SQL statement for the structue below. I want select all uid's and texts of the tables, which got a relation to the table declined: partsofspeech verbs_tempus words_case words_language words_relation Each table has the fields uid and text. Each table got a mm table to save...

0
Q: How to code nowadays?

Victor BojicaI'm a PHP developer for some time nowand in the past few years i've seen a radical change in the style of coding(not necessarly PHP). I've been struggling for the past year to get my head wrapped arround all the things and tools that i need to code more efficeint and faster, but i can't seem to ...

0
Q: While loop displaying result 3 times

user3112321Basicly I'm trying to make a simple news feed but I'm stuck at the moment as my while loop display the result 3 times, why is this? :/ <?php $sql ="SELECT * FROM news, admins"; $result = mysql_query($sql); if(!$result) { echo 'Error while selecti...

0
Q: How do I access $_SESSION variables after Ajax request?

Nick ChapmanI have a page where people can login and their login request is sent with jQuery's $.ajax to a processing page. On that page all of the errors collected during the login attempt are stored in $_SESSION['error']. How can I access this variable to alert users of the errors after the attempt is ma...

 
12:43 AM
0
Q: php library for formatting plain text?

altI gotta deal with plain text output of mostly tabular data, preferably using php. Everything must look aligned, and there are specific rules for some columns, like left/right/center alignment and min/max width so that content should be cropped or padded as necessary. The past few days I've been ...

0
Q: Link back to site when user copy & paste text

Henrik PettersonI want to add a link back to my site whenever a user copies text. Whenever a user copies text from my site, I want to add a link back to my site. Like "Read more at My Site: URL". I am sure you have come across this before. I found this code in the wild (for Wordpress): function add_copyright_...

0
Q: Get Inner HTML - PHP

SmithI have the following code: $data = file_get_contents('http://www.robotevents.com/robot-competitions/vex-robotics-competition?limit=all'); echo "Downloaded"; $dom = new domDocument; @$dom->loadHTML($data); $dom->preserveWhiteSpace = false; $tables = $dom->getElementsByTagName('table'); $rows = ...

0
Q: How to modify file name if the file exists in PHP?

HeyItsProdigyI have a file hosting website and everything works except one thing. I cannot upload two files with the same name. I want to be able to overight the name of a new file with a format like file_2.ext i believe this can be done with the file_exists() function but I am having trouble getting it to wo...

0
Q: How to send a single user instead of all

BoomOk then I'll post my entire script and I ask you this. I'd like to send by email the user's links are not good. To this day, I send all the links, but what I want is to send an email to users with links containing base64. I think there you have everything, so if someone nice pouviat help me pleas...

0
Q: does more content slow setTimeout?

user3125931So I've been working on this clock all day and finally got it to work flawlessly on my sandbox page. With the sandbox page having close to nothing on it, the clock runs beautifully, but when I add the same code to my clock on my index.php, it comes up choppy and flickers between the time and "Na...

0
Q: PHP - MYSQL - insert on duplicate key AND(?)

KallewallexIs it possible to connect the duplicate key to another statement. I just picked some integers (4=4) for the example. In the actually code I am trying to compare two dates and only if the date in the database row is bigger than the php generated date AND duplicated key it should update unj to 7. ...

 
1:13 AM
0
Q: Upload on Google Drive from our website

user3126340I was wondering if it was possible ? I want to allow a user to upload a file from my website with his Google Account and after, show the file on the website. Is it possible ? Thanks. :-)

0
Q: Converting UNIX Time in FQL

user2994718I have some basic FQL code, I would like to convert the timestamp to "g:i F jS Y" although the return is always "7:00 January 1st 1970". I have used the same code before when querying MySQL. What exactly am I doing wrong? Is this even best practice? $result = $facebook->api(array('method' =>...

-4
Q: How to store and retrieve data in cookies using php?

AhsanCan somebody please help me how to save data to the cookie variables and then use them throughout your application in php? I shall be very thankful.

0
Q: Undefined Offset: 0

Tidas BayWorking with JSON in PHP and that error keeps popping up.The PHP code I'm using is echo $JSON["response"]["players"][0]["steamid"]; The actual JSON is right here. The var dump is array(1) { ["response"]=> array(1) { ["players"]=> array(0) { } } } I used an online JSON viewer and it looks j...

0
Q: POST and mod_rewrite

rybo111How do sites such as Stack Overflow submit forms using action="/questions/ask/submit"? I would've thought mod_rewrite would lose the $_POST vars?

0
Q: regex to match everything until it hits uppercase

user1973125I found the following code from this question, regex to match everything until it finds 2 upper case characters? ^.*(?=\b(?:[^\sA-Z]*[A-Z]){2}) however my question is slightly different then the OP I want to match everything up to the upper case so I Want (continue from op example) Http is...

1
Q: Making images draggable to HTML5 Canvas, moving images out of canvas

FloraI'm trying to make a custom avatar maker, where my users can drag & drop images to the position they want (clothes etc. I take the image urls from database based on what they own). Then they can save the look as png image to my site (using php). I have no experience on javascript/jquery but I do...

0
Q: Notice: Trying to get property of non-object - nor is foreach looping properly

NateFor some reason I cannot for the life of me figure out/understand why this is not working properly...All I am trying to do is display comments on a photo page. The photo I am testing this on has 2 comments but all I get is the following: Notice: Trying to get property of non-object in /Applicati...

0
Q: PHP Error while pre-filling data via JavaScript

user2917239I have an HTML field that has PHP that passes the value entered to a php script: <input type="text" id="html_text_input1" name="html_text_input1" value="<?php echo display_output($html_text_input1)?>" /> Suppose I want data to pre-fill if a user clicks on a radio button named radiobutton1 and ...

1
Q: How to force download a file using PHP?

GandalfI would like the user to download a file when he/she clicks a 'download this file' link. The use case: A user clicks a link, and the web app generates a file and "pushes" it as a download. I have the following PHP code. Although the file is being generated correctly in the server, it is not be...

0
Q: Do you bother with markup formatting?

rob - not a robberI am a front end guy who is getting more and more into scripting and that being the case, I like my regurgitated markup to kind of look nice. I ran a loop over some database values for a list and while most sites would just show a big old concatenated slew of <LI> tags back to back, I kind of li...

0
Q: Converting string type from curl to array

lbennetI am using this curl code: $key='e32baf3053f519e4b68fd71a1'; $url='http://api-product.skimlinks.com/categories?key='.$key.'&format=xml'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $result=curl_exec($ch); var_dump($resul...

0
Q: Using $_POST on a single page to carry user defined variables

user2943358What I'm trying to do, as a little 'backstory' for this; User selects a name from a list and presses a button. Form takes user to process.php, where it asks if the user really wants to do that action (Two buttons, yes or no) and displays the name they selected (A variable that needs to be carrie...

0
Q: Nested Foreach Invalid Argument

Castiel MartinI need to echo articles of the each category. For instance for sport category, need to echo 4 articles, for politics the articles saved within politics category and so on. I have a nested loop as you can see below. I get error in <?php foreach($articles_by_category as $category => $articles): ?>...

1
Q: Partial black background when watermarking PNG image with GD PHP

PHPNewbGalleryI have pieced together a PHP class to perform various image related functions using GD functions of PHP. It works great for all image types. Rotate, flip, resize, crop and to a lesser extent, watermark. All but the latter work perfectly. For example after a few changes, rotated PNG images retai...

0
Q: PHPunit Selenium 2, Retrieving & Posting Data aka Crawling

TransformBinaryI require to retrieve data from a few websites, basically latest transaction, latest "Item Release". Currently, i'm using Python , Selenium & BeautifulSoup & Post result via API to my Server, Issue is my computer has to be on. I'm considering PHPunit Selenium 2 on my Host Ubuntu with my web ap...

0
Q: How to get special characters in URL variables to output correctly using PHP and GET

QuestionerNo27I've an issue I've just encountered (once the web app is already up and running for a week!) and I can't seem to solve it, and I'm sort of rushing through it in order to fix it before it continues malfunctioning. I've coded a neat little Christmas card for a business and the user inputs his/her ...

0
Q: Add unique identifier to first iteration in PHP for loop

Mike HermaryI am using a for loop on my client's website to insert purchased ticket information into a database. The loop is working correctly, but the client has requested the option to attach a unique identifier to the first entry every time the for loop is run. This identifier would be used to highlight t...

1
Q: Writing apache module for filtering HTTP request on PHP website

Farid Eriam going to make simple web application firewall like modsecurity. i want to write apache module in C for filtering a web attack like sql injection. i put my web on [http://localhost/vulweb] my question is, when iam accessing localhost/vulweb i want the apache module analysis the request first,...

-3
Q: Closest Geocoordinate On Line

BigMikeLI am looking for a function that will return the closest point on an imaginary line between two geocoordinates. Any suggestions?

0
Q: how to use a formatted string in the role of function arguments

marcnielsenhow to use a formatted string in the role of function arguments? Or insert arguments through the cycle? I do not know how much will I have arguments. I use function get_fie($type, $id) { if($type == 'product') { echo "Product: {$id}"; } } $product_id = 11; $str = array('function' =

0
Q: Error Parsing DOB Values in php

Ali Mirzai am working on admin panel to retrieve user DOB values on a page called "edit_user.php" this is the containing code, i tried many times with different techniques but dint get quite well of it, so please anyone could help in this case it would be highly appreciated <?php if (isset($_GET['do...

 
2:38 AM
1
Q: PHP: why are some internal functions missing from `get_defined_functions`?

jameshfisherPHP has a large number of batteries-included functions, e.g. functions on arrays. Some of these, like each, are present in get_defined_functions()['internal']. Others, like reset and many others, are not present at all. However, they are treated as functions in every other way: they are not docum...

0
Q: How re size and crop thumbnail image to a particular height and width in wordpress.?

manito every one. presently i am doing a project in wordpress. actualy it's daily news updation site.. My Layout goes Like this.. In the Above Layout I set the images of posts by Featured Post Images and displayed by using the get_the_post_thumbnail(postid).. while using this function my image gett...

 
3:01 AM
0
Q: How to replace special characters with accents within multi dimensional associative arrays to normalized/latin ones in php?

gomenasaaiThis is a follow up question from this one: How to remove spaces in array keys names in php? Basically this function works perfectly: function fixArrayKey(&$arr) { $arr=array_combine(array_map(function($str){return str_replace(array(" ",",",".","-","+"),"",$str);},array_keys($arr)),array_va...

 
3:12 AM
0
Q: Parsing Values Technique Required

Ali Mirzai am working on admin panel to retrieve user DOB values on a page, i tried many times with different techniques but dint get quite well of it, just want to know what technique will be used to get thru, so please anyone could help in this case, i am providing all codes i am working on to make it e...

0
Q: Implementing OpenID login (works on localhost)

user3126433I'm trying to log in with steam's OpenID using LightOpenID. I have tried looking at a lot of other stack exchange posts, and while there is a lot of information I can't find a solution. I have it working perfectly on localhost, but something goes wrong when I put it on my website. It still load...

-1
Q: How to set two post variables in the URL?

user2554352Ok, so I understand that if in the url of a site is like this: sitex.com/?action=yowassup If in the index.php of that site, this would work $message = $_POST['action']; echo $message; So I'm trying to set an error message on a form page so that if you leave something blank, it will be notic...

0
Q: Web Matrix .NET web.config PHP MySQL Connection Queries

user2457459I have recently switched from using WAMP server to web matrix and where I was previously using "mysqli_connect" to connect to MySQL, it seems like that will not work in the .NET-based Microsoft web matrix. I really like web matrix and want to keep using it, but need to learn how to query. This i...

0
Q: PHP MySQL "DELETE FROM `table` WHERE `id` = | unknown column `id`

user2612657My Code: if (isset($_POST['del'])) { foreach ($_POST['del'] as $id){ if ($stmt = $mysqli->prepare("DELETE FROM `users` WHERE `‎̌id` = ?")) { $stmt->bind_param('i', $id); } else { printf("Errormessage: %s<br>", $mysqli->error); } } } Result: Errormessage: Unk...

0
Q: PHP and MySQL: How to update MySQL Table using dropdown?

M. CoutinhoI have a table like this: <table border="1" cellpadding="3" cellspacing="3"> <tr> <td><select> <option value="volvo">Value 1</option> <option value="saab">Value 2</option> <option value="mercedes">Value 3</option> <option value="audi">Value 4</option> </select></td> <td>

 
3:46 AM
-1
Q: Create a modal with input that runs SQL without relaoding page,

user3126473I have an HTML table that populates from a MySQL database, I am looking for a way, when the user click on a button next to a row, that a modal opens, so that they may set the price of the item the HTML row represents. What it needs to do: User Clicks "Set Price" button. Modal Opens with text i...

0
Q: How to Add a Selected Option Value to Search Query

Flip4BytesSo you can check out the search on my site at http://www.CyberBytesInc.com it's working just fine at the moment. What I am trying to do though is I have a search parameter dropdown next to the search, one "Search Entire Site" and the other "Search Blog". I am using Google Custom Search so to sear...

0
Q: JQuery fade in?

M4TRIXI want to make a message that fades in the page and then fades out to show the user they logged in on the login before being redirected to the profile, but the message just appears on the screen with no fade, but it does fade off which is good. this is the code I have for it. echo "<scrip...

 
4:04 AM
0
Q: javascript with XMLHttpRequest not working

user3126432I have tried everything suggested in questions of similar nature but this very basic code is just not working. I just want to receive the message from the php code in the same file using XMLHttpRequest. <!DOCTYPE html> <head> <title></title> </head> <body> <div id="qwer" ...

0
Q: mySQL 5.5 syntax error

user3126491Can someone please tell me what is wrong this the syntax below for mySQL 5.5 $sql = "select tm.*, tt.tax_rate as tax from ".TABLE_MEMBER." tm left join ".TABLE_TAX_RATES." tt on tt.tax_rates_id = tm.rent_tax_class_id where plan_id='".$planid."'"; $rs = tep_db_query($sql); $row_days = tep_db_fetc...

0
Q: Encrypting User Data is MySQL

user3126447I have recently created a web app, and now that the coding of the main product is complete, I am working on security. I started by replacing my nominal sha1 password encryption with bcrypt. However, what is the sense of encrypting the password if the data it is used to access is plaintext. This b...

0
Q: PHP Function returns wrong date

Navneil NaickerI' am learning how to make a WordPress Plugin. I did make few simple plugins but not as complicated as this one. It's a Events Calendar. The var_dump the function "nc_get_start_date()" on the page it outputs wrong dates. The output from the var_dump(nc_get_start_date()); string(32) "1970-01-...

0
Q: Codeigniter Hook for common variables but how to override them when needed

chrisI am trying to use a pre_controller hook in Codeigniter to define commonly used variables throughout the stuff I am building. However I am trying to figure out if a controller is my best choice or should I use something else. What I need is something that can access the DB, Sessions, Etc yet pas...

0
Q: PHP: How to stop an array and use an include to create the result?

user3103998I have an array and I need the final value decided by my include statement: 'content' => http_build_query(array( 'home_addr' => $addr, 'email' => $email, 'username' => $username, 'phone' => $team_mgr_phone, 'picture_loc' => ((Value here needs to be result from include 'pad.ph...

0
Q: Modal Login for Private Wordpress Site

shubhraHope someone is able to help me out with this. I am making a private wordpress site that requires user to be logged in to access content. I have made it exactly as explained in this tutorial. What I need to do is, instead of redirecting the user to the login/register page (welcome), the user goe...

0
Q: PHP security exploit - list content of remote PHP file?

LovatoI'm trying to exploit some web vulnerabilities in a sample website running inside a VM (it is not available on the web - only for educational purposes). I have a php file named setupreset.php which has the information about MySQL configs, setup and passwords used to setup the website. This is in ...

0
Q: How to use PHP to retrieve Wowza HTTP Providers

user3064191Wowza Streaming Server provides HTTP Providers for providing information about current connections and server status. They use basic HTTP authentication in the model of http://username:password@url.com:8086/connectioncounts. This will output an xml view of what's happening on the server and how m...

0
Q: Error 500 of PHP page when using Basic Auth on Linux server

ErencieI've been trying to set up a web site which can use basic authentication to access a php page. The PHP is turned on by a CGI script. So basically, I have this .htaccess at my folder $HOME/public_html/php AddType 'text/html; charset=UTF-8' html AddHandler cgi-script .php AuthType Basic AuthUserF...

0
Q: The difference between PDOS sql statements and regular sql?

user2554352I've learned PHP from a book and its told me to use PDOS objects or sql statements (I'm not sure if that's the right terminology, I apologize if it's not). When I look up sql stuff, a lot of the times I see stuff like this: $link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); if ...

-1
Q: I can't connect my database?

Genghis <?php $submit = $_GET['submit']; $firstname = strip_tags($_GET['firstname']); $lastname = strip_tags($_GET['lastname']); $username = strip_tags($_GET['username']); $password = strip_tags($_GET['password']); $repeatpassword = strip_tags($_GET['repeatpassword']); if ($submi...

 
5:04 AM
0
Q: create a popup or iframe that returns variable in joomla

user3126531I really need help. I am a newbie programmer and really not sure how can i do this in joomla. I need to create a pop up or iframe that pass variable from the parent page. Basically what is to happen is this. A user will enter a string in to a input box and click on search. When click on searc...

0
Q: How to solve Google AppEngine PHP redirect loop (app.yaml issue)

AxilI have so much trouble trying to find a way to migrate my php application/script to google's appengine. I think it all stems to app.yaml. When I access localhost:9080 it goes to redirect look like the follow: http://localhost:9080/index.php/admin/index.php/admin/index.php/admin/index.php/admin...

 
5:22 AM
-2
Q: Json encoding to get the parameter value

user123Following is my php code which give result in json string: <?php $feedUrl = "http://api.frrole.com/v1/curated-content?location=India&contenttype=link&orderby=popularity&apikey=wmqmz15svzH8qSy5yQuF52b068a40a69e"; $json = file_get_contents($feedUrl); $code = json_decode($json); var_dump($code); ?>...

0
Q: requires polymorphic singleton example in php

Eugeneshow me please example of the polymorphic sigleton in php. google found very few mentions about this and all in C which is not clear to me

0
Q: insert reference in comment table that joins two sessions (blog and news)

Papa CharlieI am finalizing a comments system and was with a doubt. I have a table for blogs and one for news, and they accept comments. My comments table receives the text and the id. I wonder if I need to (or should I) go through some sort of reference to know where the comment comes from. table comment...

 
5:34 AM
0
Q: Provide edit access to php files in server to users acrss sites

user3121801I have the situation of editing the php files in the "www" folder of a server from local machines. But in my condition, all the users across the sites, who shares the intranet, should be able to access the php files. Its more like I'm counting how many times users using an application which I dev...

0
Q: I want to create advanced search using ajax codeigniter per categories

renaHello I was made a search function with codeigniter.. The search needs to show the search result per category.. and then when I click the categories it will be show the real result (detail, with the image).. For the search I was made a form, Title: Author: Publisher: Year Published ISBN : i...

0
Q: Dynamic dropdown select option first option from the service and the second option will select the doctor of the services selected.

user3126406//I need to do a dropdown select option where the first option will select the services in the database and when select the first option, the second option is to select the doctor services where it will be another query. In mySQL, i have service table, doctor table and doctor services table. i h...

 
5:46 AM
0
Q: How to send data from website as input to the server?

user2418202This might be a very elementary question, but I am going to have a website, and it will have a text box and a send button. I think it is easy to make such a website. However, as a beginner in web development, and I don't know how to make the text in the text box be sent to the server and store ...

0
Q: PDO syntax error for SELECT query

DaveI have a basic query which gets all fields and exports the file but it keeps giving me an error. My code looks like this: $array = ['users']; foreach($array AS $i){ $file = $i.'.sql'; $stmt = $pdo->prepare("SELECT * FROM ? INTO OUTFILE ?"); try { $stmt->exec...

0
Q: Browse through calendar months with a href

Mitch EvansOkay so I'm trying to make a calendar with pure php. I am wanting to add two arrows that allow the user to go forward and back through the months. It also needs to automatically change the year when it gets down to the first month or up to the twelfth month. I have gotten the following code thi...

0
Q: Algorithm for USSD ( State machine ) Application

De Zéro ToxinI have created a USSD application in PHP, Since USSD requests are unique ( new request for each selection ) I need a way to track them , Track in the sence i need a way to store the flow of the application, In my USSD app there are Static menus as well as Dynamic menus ( Retrieved from the Databa...

0
Q: Using an image as an option inside a form with a value

Ashley BrownThis script was made by my friend, but he is unavailable at the time being to go to for some help, so I'd see if I could get some here. I know only of HTML + CSS Let me lay out a bit of the code I have. $prod = $_POST['prod']; header("Location: inc/paypal.php?username=". $username ."&prod=". $p...

 
6:04 AM
0
Q: PPT to Image Converting Concept

PuthuvannamI Would like to implement below the concept. Upload ppt file. convert to image and make the slide show in next page. I have used following code $filepath= $_GET['File_name']; $ppApp = new COM("PowerPoint.Application"); $ppApp->Visible = True; $strPath = realpath(basename(getenv...

-1
Q: using replace with mysqli prepared statement

connorI had a mysqli prepared insert statement that worked fine, but when I changed "insert" to "replace" it now fails when trying to prepare. Is there something else different in the syntax between insert and replace or is something else wrong? Thanks

0
Q: PHP - How to check if the first 4 values of a string on a line are numerical

user3126605sorry if this is a simple question, I just moved into web dev from being a Jr. Systems Admin so I'm still pretty new. As my first project, I am building a php web app that will upload an accounting file(plain text), parse it line by line, strip the excess stuff, and then display it. I already ...

 
6:22 AM
0
Q: PHP simplify range creation

Abhishek MadhaniI wrote this code to generate range of numbers. Can someone help me simplify this code. I assume that it can be done in much more simpler and cleaner way, but don't know how ? $variant_ids = 'AB0000001, AB0000002, AB0000003 - AB0000010, AB0000011 - AB0000020, AB0000021, AB0000022'; $delimiter ...

0
Q: AJAX call working in Chrome, but not in Safari, Firefox or Internet Explorer

compguy24I have a single page with multiple forms, submitting each of them with an AJAX call to the same PHP controller. In Chrome, when I submit the form, I get a beforeSend message, and then a success call. In Safari, IE and Firefox, it instead refreshes the page, thus seemingly going right past the aj...

 
6:34 AM
0
Q: Why does fetchColumn() always return 1?

user2554352I am confused as to why this always, even when I know it should be 0, returns 1. function check_user_data($username, $password) { global $db; $query = "SELECT COUNT(*) FROM users WHERE username='$username' AND password='$password'"; $results = $db->query($query); $results = $res...

0
Q: How can I insert ternary operation in 4th parameter in form_dropdown function in codeigniter?

EliI want my javascript onchange function not to be called whenever my $at_row[0]->ID is true. The javascript onchange function call was placed in my form_dropdown function. I have tried my code but it wasn't working at all and prompts errors. How could I do this right? Here is my code. Working cod...

0
Q: Ajax PHP HTML Form

user3126529I am trying to retrieve multiple rows of data from my database. The number of rows that will be returned is unknown. It works for one row returned. But i also have scenarios where multiple rows are returned to the html page where the ajax function adds the corresponding value to the form. What i...

0
Q: Dependent dropdown is not working using codeigniter

user2991258In the below codeigniter code i have placed controller,model and view.My aim when i select exam name it should drop corresponding course code from examcourse table.But my actual result when i select exam name it is not droping the dropdown .Pls help me to do this. Controller:import public functi...

0
Q: Doctrine One To Many Bidirectional Association Not Working with Custom Type

Hardeep SinghI have been working on a REST api using Symfony2 and FOSRestApiBundle. Everything was working fine and then came the requirement that i had to obfuscate all the resource ids. I did it by adding a custom Type in Doctrine. But now, my associations are not working correctly. Following are the co...

0
Q: Strange Curl behaviour while passing variable

MoyeenI'm using a php Curl function function file_get_contents_curl($runfile) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $runfile); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL,$runfile); $content = curl_exec ($ch); ...

 
7:10 AM
0
Q: Opening one jquery modal dialog at a time when unable to assign div ids

user3126663I have been working on this issue for a few days, and am asking my question since I can't seem to find an answer on stackoverflow or from Google. If it's simply that I haven't articulated it correctly please point me to the existing question and answer. I am writing my first web app using PHP O...

0
Q: SCREAM: Error suppression ignored for Fatal error: Call to undefined method

NithinI have read many posts regarding this error, but not found any working solution for me. I have a site and master config file which loads all the class files. Now i created a sub folder in my site and included the master config from parent folder which loads class files. But i cannot use any of...

0
Q: Executing a SQL Server Stored Procedure with parameters using PDO in php

user2481997I seem to be having great difficulty in executing a ms sql server stored procedure that contains parameters, I am able to execute either simple select statements or stored procedures without parameters but as soon as I try to bind parameters i get the message : "An error occured: SQLSTATE[HY000]...

0
Q: Retrive information from session array in codeigniter

atomaprchyaI have created session array and I have placed values there like the code below $ar= array( 'product_id' => $this->input->post('productid'), 'qty'=> 1, ); //creating products session array for the first time $this->session->set_userdat...

-1
Q: How do we use stored procedure with phpMyAdmin

celikali7I need to make these add with using stored procedure?

-1
Q: Want to Redirect .html Pages to .php From .htaccess File

devenderMy whole site is using .html extension in urls http://ilovehdwallpapers.com/movies-desktop-wallpapers.html I want to to change .html to php Please provide me code for this to put in .htaccess File I searched Google but after not find a working code.

 
7:35 AM
-1
Q: How to display the content of many tables based on the check box that user have checked?

WatiI'm using Dreamweaver CS4 and PHP languages. I have problem to display the content of the table that user have checked earlier. How to do this?

0
Q: Simple php proxy to avoid cross domain issue does not work well. (json)

Jeff Gu Kanghttp://benalman.com/code/projects/php-simple-proxy/examples/simple/ When I use the Remote URL as /http://github.com/cowboy/php-simple-proxy/raw/master/examples/simple/json_sample.js' Request URL ../../ba-simple-proxy.php?url=http%3A%2F%2Fgithub.com%2Fcowboy%2Fphp-simple-proxy%2Fraw%2Fmaster...

0
Q: Executing script as daemon process in PHP

user123This script in my php page javascript which is called on page load: <script type="text/javascript"> var id =0; function getData(){ $.ajax({ url : "refresh.php", type : "POST", data : {"id" : id}, ...

0
Q: To load controller using codeigniter

user2991258In the below codeigniter code i placed the controller.But it is not loading the controller.But it shows The page you requested was not found.Pls help me to solve the issue. class User extends CI_Controller { public function __construct() { parent::__construct(); ...

0
Q: hierarchical structure in array, recursion in php

user3111525i have hierarchical structure in array like this: item root 1 - item child 1 -- item child 2 item root 2 - item child i want to get: 1. item root 1 1-1. item child 1 1-1-1. item child 2 2. item root 2 2-1. item child My function to build tree function printTree($data, $level = 0, $coun...

0
Q: Is node.js the future, and are there significant differences in speed between that and a php based system?

David GI thought it'd be nice to ask this. I've only ever developed web apps in PHP with mysql, aside from the usual web technologies involved - html5, css, javascript to make things look pretty. However I've been reading up on node.js with mongodb and actually angularjs now that I have the time to do ...

-1
Q: PHP ICON SORT - DROPDOWN MENU

user2781464In this tutorial, How do I make the dropdown menu appear on the top instead of the bottom? Thanks for any help. http://kuroi.leizel.net/tutorial-icon-sort-tricks---dropdown-menu

-2
Q: Javascript: Uncaught SyntaxError: Unexpected token ILLEGAL

M. CoutinhoI have a dropdown list on my php page and i want to sort it alphabetically, but i get this error: "Uncaught SyntaxError: Unexpected token ILLEGAL". What am I doing wrong? HTML/PHP //Somewhere on my form... echo '<select name=\"dropdownlist\" onclick=\"sortlist(this.value)\">'; Javascript Fun...

 
8:11 AM
0
Q: on dropdown Change event load data from database and fill text box

epynicI have a simple dropdown list, whose values are from the DB.I am doing it as $query = "SELECT id,location_name FROM misc_location"; if ( $result = mysql_query($query) ) { $selectLoco = "<select name='selectLoco' id='selectLoco'>"; while ($row = mysql_fetch_row($result) ) { $sele...

0
Q: how to get avatar on front end wordpress

Waqar AkramHello users of stack over flow, I have a little Question, I am trying to get avatar in upper end of my website, if user is logged in I want to show avatar and name and link to profile, if user is not logged in I want to show login and register buttons I know little bit of php only , I wil...

0
Q: Run powershell in php

user3111077I have a very small program which I want to execute upon button press . In html it contains an button with an image and when i press the button it should call my php script which has powershell and has to be executed . But it doesnt add the printer through the manual command attached is working. ...

0
Q: shell_exec("echo \"<?php require_once '/var/www/html/erp/Models/DBTest/config.php'; DBTest::function2('f2-2');?>\" ")

Mh.Al_AsmiI used shell_exec to get parallel execution of php script like this : shell_exec("echo \"<?php require_once '/var/www/html/erp/Models/DBTest/config.php'; DBTest::function2('f2-2');?>\" | php >/dev/null 2>&1 & "); this work correct , put in this way I can't use varaible,like this: shel...

 
8:29 AM
0
Q: Magento mapping M2E phone number to custom mobile number field

user3013021We are using M2e to pull data from ebay sales into magento, and we are also using the smsnotify module to send out customer updates via sms. The issue is that smsnotify creates a custom mobile number entry in the database and m2e only maps the ebay phone number to the normal magento phone number...

0
Q: Method returning array shorthand property. Which PHP version?

AntilogicalAt some point, I'm not sure when, the following shorthand property became available to reference an element in an array that became returned by a method: echo $someObject->SomeMethod()['SomeElement']; Where you append the element name after the method parentheses but before the semi-colon. Wha...

0
Q: Proper command order to get num_rows after fetch_array (mysqli OOP)

IanI'm having a problem getting a num_row when I fetch the results as an array: $sql = "SELECT * FROM people WHERE peopleid=?"; if (!($stmt = $mysqli->prepare($sql))) { echo "stmt Prepare failed: (" . $mysqli->errno . ") " . $mysqli->error; } if (!$stmt->bind_param("i", $_GET['peopleid'])) { echo ...

0
Q: how to add a php inside a javascript

Francis Alvin Tanneed some help on thi script (function($) { var oldHide = $.fn.popover.Constructor.prototype.hide; $.fn.popover.Constructor.prototype.hide = function() { if (this.options.trigger === "hover" && this.tip().is(":hover")) { var that = this; // try again afte...

0
Q: Very slow wp-admin. Help diagnosing fault by displaying mysql queries and query times

GravyI have noticed that my wp-admin is extremely slow. The front-end of the site is lightning fast. e.g. if I visit https://goldealers.co.uk/wordpress/wp-admin/edit-comments.php, the page takes between 10-30 seconds to load. I ran a script to see if I can diagnose the problem: if (is_admin()) { ...

0
Q: CKEditor XSS clean

Aigars CibuļskisI've web-project, where I allow users to use CKEditor, and thats why I need to secure me from any XSS. How do I minimise any risks of being "attacked" with XSS? I don't know if this will be enough, I guess no: strip_tage(Input::get('text'), '<p><a><h1><h2>'); So question is how to be XSS Clea...

0
Q: Remove quantity for individual items on magento

user3126785My first post, i have code where i can individually remove add-to-cart options form products using an additional attribute in the back end, the code is added in addtocart.phtml, the problem i am having is that i do not want this to affect the add to cart button just the quantity box and label, i ...

0
Q: AJAX fails while get data from while() loop in php

Ashik BasheerWhen I use json_encode($array) I get the data properly but when I use json_encode within an array which is looped I Get the following error [object Object] parsererror SyntaxError: Unexpected token { I'm using ajax to get json data from functions.php $(function() { $('#get').click(functi...

0
Q: Match multiple columns from a form

TankerI'm doing a price table, and I was wondering if there is a way to match multiple columns with different values base on the values from a form... please allow me. Table: Price id | name | color | class | year | price ________________________________________ 1 | BMW | Red | XML | 2001 | 1200...

0
Q: Comparing data in database in PHP

New To 'C'What i'm trying to do is saving some data in the database and when user will press "SAVE" button script will compare the data entered by the user with data already present in the database. If the data matchs it will show a warning that is "The entered data is already in the databse please use sea...

0
Q: PHP sudden increase of memory usage during array operations

kijinI'm writing a maintenance script in PHP. The script keeps about 100,000 key-value pairs in an associative array and compare a bunch of other data with that array. The keys are 12- or 16-byte hexademical strings. The values are arrays containing 1-10 strings. Each string is around 50 bytes. I'm...

-1
Q: access to a file in joomla modules from another file in modules

adib16i create a basic module for joomla .now i want to manipulate a file in this module from another file in that module.for example i want to upload a file in default.php and send this file to helper.php with ajax .this is my file structure. mod_helloword.php tmpl default.php helper.php mod_hell...

-1
Q: DittoDB with SQLite

ZackValentineI am working on a project to get data from an SQLite Db made by a software known as Ditto DB via PHP. It works as a clipboard manager on Windows made on C++.Net. I have to extract images saved in the DB as Blob, but the thing is I cannot get it back to Image format. I have tried most of the thin...

-2
Q: Need PHP server for PhoneGap application

red_sensorMy Phonegap Android application sends data in JSON format and I nned a PHP server to get this data. How can I made it? Do I need a hosting or I can store my server locally? Maybe you can write a code snippet in PHP? Thanks.

0
Q: Error while accessing associative array in PHP

user3110335I have this code for my Calendar Booking System. public class booking_diary{ public $bookings; function make_booking_array($year, $month) { $query = "SELECT * FROM bookings WHERE date LIKE '$year-$month%'"; $result = mysqli_query($this->link, $query) or die(mys...

 
9:23 AM
0
Q: MySQL PDO connection php

user2457459I am trying to do a simple pdo connection using the following: test.php: require 'config.php' try { $dox_db = new PDO('mysql:host=localhost;dbname=test', $config['DB_USER'], $config['DB_PW']) } catch(PDOException $e) { echo 'ERROR: ' . $e->getMessage(); ...

0
Q: How to reconcile Apache Rewrite and HTML5 History API and Ajax load

Joshua KlecknerI'm looking for a little clarification on reconciling Apache Rewrites to work with HTML5 History and ajax loading. My situation is pretty typical of others asking questions in regards to the HTML5 History API in that I'm building a single page app and loading php fragments into a main content are...

0
Q: What does the opcode EXT_STMT do in the Zend engine?

jameshfisherIt seems that all PHP files, except for the empty file, have the opcode EXT_STMT scattered liberally through the compiled opcodes. For example: $ cat << EOF > hello.php > <?php > echo 'Hello'; > ?> > EOF $ php -dvld.active=1 -dvld.execute=0 hello.php Finding entry points Branch analysis from po...

-4
Q: PHP: How to select where column1 is like foo and WHERE column2 is like bar

user3109875What's the correct syntax for matching more than one column? $Result = mysql_query("SELECT * FROM ads WHERE Brand like '$data' ORDER BY time desc"); but i want something like this: $Result = mysql_query("SELECT * FROM ads WHERE Column1 like '$data1' && WHERE Column2 like Data2 ORDER BY time d...

-2
Q: How To stop double clicking on my submit button

user3095680How to stop double clicks on my submit button This is my script http://pastebin.com/GSKsNAUK Please help

0
Q: check if the value of a textfield is the same in the database, then it will not validate using symfony framework

billy crogani have question regarding the validation of the textfield. I have this textfield, if the user will not edit the slug textfield, it will not validate, if the user will change the textfield but exists already in the database the error goes like this slug already exists. I have already a code if slu...

0
Q: Two mysql queries and 2 $results. Can I get the same 2 $results using only one mysql query?

user2118559Have html input like this row_id | debit | credit | --------------------------- 1 |2610 | 2380 2 |2620 | 2310 3 |5310 | 2621 Have mysql table like this TrackPayments | AccountNumber --------------------------- 1 |2610 1 |2310 0 ...

0
Q: Separating User Interface and Database development in a PHP application

sqlchildfetchdata.php - sends the required data function FetchItems() { while($Items = mysql_fetch_object("SELECT * FROM items")) //function is deprecated, would be changing it { $TotalItems[] = $Items; } return $TotalItems; } listitems.php - for user interface a...

0
Q: Can I upload the WebRTC audio blob object with the file input element as normal file but without download it?

user3126863Thank you so much for viewing my question. Now I use WebRTC to record an audio and I finally got a blob object to which I can use JavaScript code to link the src of an audio element and play it as normal audio file. Here my question comes. Can I use the JavaScript code to make the blob pointed to...

0
Q: Laravel: how to use my composer installed bundle?

Switching BrainsI am learning Laravel. With composer i included the mobile-detect-bundle in the installation (files are in the folders). When i use the code as stated in the docs on github $mobileDetector = $this->get('mobile_detect.mobile_detector'); i get this error: **ErrorException** File does not exis...

0
Q: how to make a ajax friend request system using jquery

Remya Prakashi want to do a mysql,php,jquery ajax and json based friend request system like in facebook. i have prepared the json results but i dont know how to do the jquery part can anyone please help me here is the json results this one when u have error { "status":"error", "message":"Invalid Attempt" }...

0
Q: Preg match all in bbcode using php 5.4 validation issue

user1582059I'm writing some php code in order to validate bbcode, I have no error but the bbcode won't validate my input... why? Something missing? //============================================================// // Check if all BBCode are validated before posting something // //===========================...

0
Q: how to calculate sum database table where number of column in table?

user3122354<?php $sql="SELECT SUM(`2014jan1`,`2014jan2`,`2014jan3`,`2014jan4`,`2014jan5`,`2014jan6`,`2014jan7`,`2014jan8`,`2014jan9`,`2014jan10`,`2014jan11`,`2014jan12`,`2014jan13`,`2014jan14`,`2014jan15`,`2014jan16`,`2014jan17`,`2014jan18`,`2014jan19`,`2014jan20`,`2014jan21`,`2014jan222`,`2014jan23`,`2014...

0
Q: Delete data from two tables with INNER JOIN

Erik EdgrenI want to delete data from two tables with one SQL query according to datetime_lastactive and if the IP addresses is matching your own. But I'm getting this error message when I try out the following SQL query: Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax ...

0
Q: Convert Unidimensional Array to Bidimensional PHP

Jonathan EdgardoHy, I have this unidimensional array: $array1: Array ( [coupon_code] => GTY777R [coupon_description] => Credito $5 USD ) $array2: (2D Array) Array ( [0] => Array ( [coupon_code] => 0000000 [coupon_description] => Intenta de nuevo ) [1] =

0
Q: grabbing a website's second page is diffrent then copy link in browser

user2046936i had this pice of code <?php include "inc/simple_html_dom.php"; //-->Website:http://sourceforge.net/projects/simplehtmldom/ $flight1 = "arr"; $flight2 = "L"; $heute = mktime(0,0,0,date("m"),date("d"),date("y")) -0; $alle_zeiten = array("00","06","08","10","12","14","16","18","20","22"); fore...

0
Q: Upload can't ecxeed more than 200MB :/ using html and have edited php.ini and everything

user3126835I have xenforo and yetishare. In both, when i try to upload files around 256 mb, the progrss bar starts, goes till 150mb + and then the progess bar again comes back to 0% and start uploading again. It does like 4 times then shows error that the file can't be uploaded. I can upload a file, 126mb ...

0
Q: how to link keywords separated by comma to search value

user3061787I have a table of books with column of keywords. keywords are stored separated by comma like social,fiction,art etc., I want to link them as search value when any one click one of them key word related books be shown in search.ph. My search Query is as under: <?php include("admin/config.php"); ...

0
Q: php - prevent user input unicode code but allow symbol?

nasaorcHow can I prevent user input any unicode code like &#9786; but not limit they input unicode symbol like ☺? Please help

-1
Q: csv and txt file type in Apache server (zend server) on windows

DuleepI want to separately identify given file is whether CSV file or TXT file. I can separately identify file types on Apache in the windows 7. But when Apache run on Linux i can't separately identify files. Both file (txt and csv) gave to me file type as TXT. How can i separately identify files in ...

0
Q: ajax response error not working as expected

user756659My success/error handling is not working as expected. In this example my php runs as intended, however, the intent of the processing failed. Let's say I was looking up a username in the database... if I found the username I would return $ajax_result['success'] = 'success';, but if I did not fin...

0
Q: Unexpected result returned by MySQL query

NarutoI ran a query on my database and found a weird behavior of sql. The returned result is not making sense to me. I have run this query and the returned result is not the desired one. SELECT MAX(marks), name FROM umer WHERE city!="NewYork" Here is the snap of the table. I am getting this resu...

0
Q: Hide my traffic referral?

user3126917I have a question I have 5 websites, website 1 is clean and other aren't (like adult traffic only). I want to redirect my traffic from the "unclean" site to my website 1 where I will sell some stuff from eBay, but I heard they will crawl my website and determine where my traffic was coming from...

0
Q: MySQL value in an HTML form

user2943358I've got something like (In PHP) echo '<input type="email" name="email" value=''; What I want is value to be automatically filled out with a value from a MySQL form (Let's call it ['name'], but I seem to running into syntax problems. What I've tried is something like adding ['name'], '['name'...

0
Q: Merge 7 transparent images GD

user2840278Helllo, I randomly generate 7 images, all 60x60. All images contain some text and are transparent. I want to merge them in a row to get one transparent picture. I used several methods, but neither of them save transparency. This is the last method I used: //$imgId - array of 7 file names $dest =...

0
Q: json output is not as what expected

Ashik BasheerI have the following code which generates a good json output but it has '[' and ']' at the start and end respectively. You can also check the output at http://android.ezinfotec.com/functions.php?method=getquestions $query = mysql_query("select * from questions"); $i = 0; while($fetch =...

-1
Q: How to add style in php

Waqar AkramHi I am using this code, <?php if ( is_user_logged_in() ) { if (function_exists('get_avatar')) { echo get_avatar( get_the_author_meta('user_email'), 48 ); the_author_meta('display_name'); } } else { ?> I want to know How I can add style to avatar got from t...

-4
Q: multiple background images changing alternatively

user3126920#changing background images using html or css or javascript which support windows XP# changing background images using html or css or javascript which support windows XP

-2
Q: Many includes slow down website?

user3090697I am creating a cms system. In my index.php page i am including my content, menu links dynamically. My plugins are also loaded via the index.php page. Now there are lets say 200 includes in the php index page. the plugins only load when the tag is displayed on a page in the cms. But now my quest...

0
Q: RecursiveArrayIterator offsetUnset()

LoganEthertonI have a feeling that this has to do with a basic misunderstanding on my part about the nature of RecursiveArrayIterator, but I'm seeing some strange behavior when trying to iterate using foreach. Basically, when I iterate an instance of RecursiveArrayIterator using foreach, the second offset is...

0
Q: Testing PHP Web Service locally by using android app

mrgencoI am new to web services and planning to design a php webservice for my android app on my local machine which will send some user informations to database and generate some JSON data. But the problem is i am little confused about how to test it. For example lets say that my webservice will loca...

0
Q: Reading multiple columns from large CSV files in PHP

MarkI need to read two columns from a large CSV file. The CSV has multiple columns and can sometimes have following properties: ~25,000 lines Contain spaces and blank rows Be uneven (some columns longer than others) http://imageshack.com/a/img41/8857/e8cb.png In the example CSV file above, I wou...

0
Q: In the dark: PHP Flash buggy code

user1576672i hope someone can help me. The freelancer who did this work disappeared after the payment and i am not good enough in php to understand the trouble. the setup is a flash file that has 52 text fields that are sending a request to a php file that inserts it into the database table. the fields are...

0
Q: .htaccess doesn't rewrite the URL as it should

VictorI have the following .htaccess file: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^/]+)/$ $1.php RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$ RewriteRul...

0
Q: How to manage deeper segmented url in CodeIgniter properly?

aspirinemagaI would like to know if it's possible out of the box in CodeIgniter2 to create the urls without modifying routes.php for each controller's function like this: backend.website.com/ecommerce/products/edit/$id backend.website.com/ecommerce/currencies/form/$id backend.website.com/ecommerce/customer...

0
Q: Workflow with own documents and symfony cmf

Maximilian BerghoffI've red so much about the symfony cmf. Red the whole docu and the cookbook too. Now i wanna create my first cms application. It is very easy to get a starting kit based on the sandbox. This works. I am able to create and manage all documents from all bundles. I am able to setup the rendering. B...

 
10:48 AM
0
Q: Secure API so usage only available inside mobile application

jskidd3I'm currently working on a mobile application with an Objective C developer. Because of the nature of mobile devices and how they work, all data is retrieved through an API I have created. For example, if the user is trying to find something specific to do with the application on a page (a searc...

0
Q: Chasing down an error in my SQL syntax

user3126795I'm just starting out with PHP. I am self-teaching by reading and viewing tuts on PHP and mostly cut and paste snippets together to achieve my results. I am however, familiar with HTML and javascript. Here's my error: You have an error in your SQL syntax; check the manual that corresponds to yo...

0
Q: SQL syntax error, in my user system

user3103188Been sitting here all morning trying to improve safety when users create a new user in my system. And finally when everything is fixed and everything works, and at the end of the code where i send informations to the database, im getting a SQL syntax error sigh!! Here's the error i get: You hav...

-3
Q: Calculate the intersection of 3 circles via php

user3126942I am trying to calculate the intersection of 3 circles via a PHP function. I researched this for a few days now and none of the sources I've found can render a proper solution or are too difficult (I am only 14 not a college student). I would appreciate a function that given each circle's center ...

0
Q: php strtotim +7 days issue

ScudiI try to calculate a week with the following Code: $lastSun = strtotime('last Sunday'); WriteLine("Last Sunday: ".date('Y.m.d',$lastSun)); WriteLine(date('d.m.Y',$lastSun).' +1 days= '.date('d.m.Y',strtotime("+1 days last Sunday"))); WriteLine(date('d.m.Y',$lastSun).' +2 days= '...

0
Q: Recursion in php, hierarchical structure in array, print tree

user3111525i have a tree array like this with parent->child structure: Array ( [0] => Array ( [id] => 12 [address] => root addr [parent_id] => 0 [children] => Array ( [0] => Array ...

0
Q: Store the right signed request after page like

VORiANDI have a little Facebook app, which has a "like gate" at the beginning. The user have to like the page to use the app. The app itself has some subpages, so I have to store the signed request into $_SESSION variable if I want the subpages to work. My problem is that the signed request is only sent...

0
Q: imagemagick php writeImages always give me 1 page result

user300675I am using imageMagick extension for php 5.4 magick module version 3.1.0RC1 ImageMagick 6.7.7-10 2013-09-01 Q16 ImageMagick release date 2013-09-01 Trying this simple snippet: $images = array( '1.jpg', '2.jpg' ); $pdf = new Imagick($images); $pdf->setImageFormat('pdf'); if (!$pdf-

0
Q: Undefined index: in [...]\message.php

prathap ranaI'm working with joomla, I install k2 component in joomla, when I want to import files from joomla to k2, it gives errors like this: Undefined index: in C:\Program Files\EasyPHP-DevServer-13.1VC9\data\localweb\joomla3\administrator\templates\isis\html\message.php What does it mean? I'm u...

0
Q: Cash report show only one event for day

Giancarlo L.I have create a cash report (money in/out) but it take only one event for day. example: if I add 2 vent with the same date the report show only one. That is the code: (sorry some voice are in italian) <? require "../include/impostazioni.php"; require "../include/funzioni.php"; $id_condominio =...

0
Q: .htaccess rewrite mulitple get params for API

jskidd3Current API usage: http://api.mydomain.com/v1/names?gender={gender}&age={age} What I want usage to be: http://api.mydomain.com/v1/names/{gender}/{age} Can I use .htaccess to rewrite this URL?

-1
Q: Update phpmyadmin db value with php

Bogdan CrișuI vave the following field : <input name="site_title" type="text" value="<?php echo $config->site_title ?>" class="form-control" id="site_title" /> <input name="site_description" class="form-control" type="text" value="<?php echo $config->site_description ?>" id="site_description" /> <input na...

0
Q: Load text into div using jQuery when the div was created by jQuery's .load() function

LAKRIDESI'm currently making a website that is able to load a template for it to use as the way it looks, as well as load a "post" document that contains text that will be placed in the post div. However I have run into a minor snag. It would appear that jQuery cannot see the div that it created using ...

 
11:30 AM
0
Q: Get Element by ClassName with DOMdocument() Method

user1007015Here is what I am trying to achieve : retrieve all products on a page and put them into an array. Here is the code I am using : $page2 = curl_exec($ch); $doc = new DOMDocument(); @$doc->loadHTML($page2); $nodes = $doc->getElementsByTagName('title'); $noders = $doc->getElementsByClassName('produc...

0
Q: Symfony CMF Database Schema

Green AcornI have started to look into Symfony CMF, and I must say it looks good! However, I can't get my head around the database Schema! I have read up on the basics of PHPCR, and understand it to an extent. The bit that is confusing me are all the extra tables that Symfony CMF installs. I.E phpcr_binar...

-1
Q: Javascript variable value from mysql database

Elton Frederikvar leftpos = "100px" <----using the global variable "posid" as the WHERE clause, i need the value for the field "leftpos" in the table "positions". I am sorry if this question has been asked before, but I couldn't quite understand the answers. I need to retrieve a value so that i can manipula...

0
Q: Unable to show JQuery datepicker on my php page

user2769635I followed the source code on Jquery page to get a datepicker for my php page, but I cant get the calendar out. I think the Jquery is not loading for this page, can anyone tell me why? Thanks you Here is my source code: I have my own designs for class element. <link rel="stylesheet" href="h...

0
Q: How to work with PHP and JSON API from enother web site?

user2986392I want to use the JSON API that I added below, for my PHP page. But the truth has never experienced working with JSON file, or even receive data using another site's API. Can someone please give me here a basic example of code implements the API with PHP, so I can understand the principle? t...

0
Q: ZF2: Call redirect() url | trigger GET from a post action

JordanI have a simple post which looks like $.ajax({ url: '/album/createAlbum.html', type: 'POST', dataType: 'json', async: true, data: postData, success: function (data) { console.log("Successfully saved album"); console.log(...

0
Q: PHP refresh table without refresh entire page

user2174050I have a PHP page with one table that show any information in it. That information are refreshed every three secs. Now I've found this solution for refresh the table: <?php echo "<div>Welcome!</div>"; echo "<div align= \"center\" id=\"infos\">"; echo "<table border= \"1\">"; ... echo "</table>...

0
Q: I want to include Solaimanlipi font in my TCPDF. Do u have any idea?

M. M.The Bangla Unicode font (Solaimanlipi) is one of most complicated font. Basically it have some complex combination e.g. ক্ষ ঙ্ক ঙ্গ জ্ঞ ঞ্চ ঞ্ছ ঞ্জ ত্ত ষ্ণ হ্ম ণ্ড কো etc. Please help me to get a solution.

0
Q: Keeping functions DRY when utilising multiple models

sjdawsI currently have a bunch of models for an inventory system, and in one of the models is a function which handles adding variants to a product: public function addVariant($options, $values = array()) { // Clone parent $variant = $this->replicate(); // Update values for the cloned ite...

0
Q: Convert 500+ files' names from Unicode U+0600 to Text

Bilal KhoukhiDue to compressing files t move from a server to another many times a huge number of images had their names changed.. from Text to Unicode U+0600 ... Which is Arabic BTW Here is a sample #U062a#U0637#U0628#U064a#U0642#U0627#U062a-#U0645#U062c#U0627#U0646#U064a#U0629-#U0644#U0644#U062a#U0644#U0...

0
Q: Cannot run a FQL example. Encountering unexpected problems before the query

Constantinos HerodotouI want to ask a newbie question. I'm just starting to creating a website that will use FQL to get user data for analysis and i have encountered a problem before i even start. I'm trying to run this code that i found in facebook developer site for example: $app_id = 'YOUR_APP_ID'; $app_secret = '...

0
Q: preg_match_all Grab all links from a page

user3127057i've a problem, i want to grab all links (href) from a page, i've this source preg_match_all('/href=.([^"\' ]+)/i', $content, $anchor); this grab only domain and subdomain (name.name.ex / name.ex) but don't grab custom urls (name.ex/name/name.php), ca help me please? Mark.

0
Q: <reference> expected, unexpected end of file on PHPStorm

cevizmxI am using PHPStorm and having some interesting errors/warnings showing up. Not sure if I skipped configuring something. Here is a query for example, $query = "INSERT INTO tblperson ("; $query .= " personName, personLname, personNumber, personPhone, personAttr"; $query ...

0
Q: php shell command error GLIBCXX_3.4.9 not found

KoSMoSIm trying to execute shell command from php to convert files to pdf but i get this error. Could someone explain me in details how to fix it? Im not so good in linux( and also if i execute command straight through terminal everything works. /usr/lib/libreoffice/program/oosplash: /opt/lampp/li...

0
Q: Pagination doesn't work

captain<html> <head> <title>PHP test</title> <link href="style.css" rel="stylesheet" type="text/css"> </head> <body> <div id="formDiv"> <form action="testphp.php" method="post"> Email: <input type="text" name="email"><br> <textarea name="comment" rows="10" cols="40">Your ...

-1
Q: Warning: mysql_num_rows() expects parameter 1 to be resource,boolean given in C:\wamp\www\AB-FASHION\order_success.php on line 56

Bîlål ÇhådhårHere i am trying to get the order info from the user and then by confirming order i want to show the order id to the user as the tracking for the order... but it showing me error as stated above my code is here: <?php // This block grabs the whole list for viewing $product_list1 = ""...

0
Q: Java 3DES decrypt wrong

Vasiliy StepinIn PHP side text crypt with: $iv_size = mcrypt_get_iv_size(MCRYPT_3DES, MCRYPT_MODE_CBC); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); $crypted = mcrypt_encrypt (MCRYPT_3DES, $sKey, $sValue, MCRYPT_MODE_CBC, $iv); return base64_encode( $crypted ); In java side i try to decrypt this text wit...

0
Q: JQUERY is not loading properly or is it my code that is wrong?

user3104737I am trying to use JQUERY methods for ajax to create a dropdown menu. Using this jquery code: JAVASCRIPT: <SCRIPT> $("select[name='carid']").on("change", function() { $.post( "execute.php", { carid: $("#carid").val() }, function(data) { $("available").append(data); } ...

0
Q: How can i know if someone has opened an email?

Web Specialist with 7 years exI am working on an email system (PHP based) where hundreds of emails will be sent by the users and i want to track those emails so i will be able to know that email is opened or not ? Can any one guide me how to do this ? Thanks

0
Q: Oracle 10.x to MySQL 5.x Conversion

Aditya BhattI have existing project database with Oracle 10g version and I want to convert / create replica with Arabic records in MySQL. Is there any tool or ready made PHP script available for same? Please let me know !

0
Q: how to add shipping charges by date in magento?

M Sohrab ZiaI want to make an option if the customer want same day delivery the delivery charges will be $10 else it will be standard charges. just want to add check-box for same day delivery.i have that much information only, if someone can help I would be really happy since its been tough for me.

0
Q: Add values on SQL table more times

Alberto RossiThis is a file called addtime_eu.php that adds into a SQL table called europe a row containing some datas. <?php //Check connection if (mysqli_connect_errno()) { echo "Connection to MySQL failed: " . mysqli_connect_error() . " Please contact an admin or refresh the page."; } //Create MySQ...

-1
Q: Writing the mysql join and order by

Awais QarniI have three tables stated following Table eaa -------------- | id | title | -------------- | 1 | ABC | -------------- | 2 | MNO | -------------- | 3 | XYZ | Table eap ----------------------- | id | eaa_id | title | ----------------------- | 1 | 1 | CDE | -------------------...

0
Q: Define version across script

Josh FradleyI am currently defining my script version in a PHP variable. $version = "2.0"; This means i have to set the variable on every page i need to get the script version on. For example i would like to show there version on the main page as well as the installer/upgrade script. I know about define(...

0
Q: Looping on magento success order message

André AndradeDears I'm facing a looping problemn on magento success order message. The block is rendered many times until the system gets exausted in memory. Do you have any tip where I can search for the bug ? Magento 1.8.1 / Ultimo Theme / PHP54 / Amazon Linux

0
Q: “error: save failed” when add a advice in cacti

user3127096http://www.networknet.nl/apps/wp/wp-content/uploads/CactiEZ0.30MacTrackpluginerror_C22B/20080129_134623.jpg when I add a advice, it couldn't save. it's like above image. then, I droped the mysql database for cacti, and created the mysql database for cacti again: mysqladmin --user=root --passwor...

0
Q: PHP how to echo multiple output

StrikeNeoI am a newbie in programming and in need of help with PHP. I have a code that is use to decrypt a string. The problem is it only show the decrypted first variable in the function(decriptInfoDetails). What need to be change so it can also shows the 2nd and 3rd variable in the function? Also is the...

0
Q: PHP PDO adding to database will not work? [calendar]

user3124460I found a calendar script anyways, Like the rest of my files I want them to run off one single config.php file. Every single script so far does, although I found a calendar script that is coded in PHP PDO the same language im coding the rest in although I Try and include config.php although for s...

0
Q: HTML/PHP form with many fields

user3127090I have form similar to this. Item 1 (sub item 1, 2, 3,,, 10) Item 2 Item 3 (sub item 1, 2, 3,,, 10) Item 4 (sub item 1, 2, 3,,, 200) Item 5 (sub item 1, 2, 3,,, 50) Item 6 (sub item 1, 2, 3,,, 20) Item 7 (sub item 1, 2, 3,,, 20) Item 8 (sub item 1, 2) Item 9 (sub item 1, 2) When user selected ...

0
Q: whole div is deleting instead of image

PHP_USER1if(count($father1)!=0) { for($i=0;$i<count($father1);$i++) { if($father1[$i][ 'sbs_f_userid']==$id) { $pc_pic=$father1[$i][ 'sbs_f_face']. '.'.$father1[$i][ 'sbs_f_format']; echo '<div class="fpic"><img src="'.$img_loc.'del-b...

-5
Q: PHP MySQL SELECT

user3127009I built this code trying to make website but I dont know how to fix it i still face some problem i want some help please <html> <head> <meta charset='utf-8'> </head> <body > </body> </html> <?php $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = 'root'; $con=mysql_connect("localhost","root","r...

0
Q: cakephp - path for image inside js file

MarkoTrying to implement this jquery plugin http://www.myjqueryplugins.com/jquery-plugin/jrating i have trouble setting paths for stars in js file. its not possible to use php inside js file right? Cause I need to set those stars path to be inside webroot folder and i don't know how to do that without...

0
Q: jquery calling multiple array in one textbox

Cyan PileI have this code here: <script> setTimeout(function() { $.getJSON("url/getuserdetails.php?callback=?",{username: localStorage.getItem("datausername")},function(data) { $("#txtname").val(data.fname); $("#txtemail").val(data.email); }); ...

0
Q: How to change my child drop down value when parent changes

JoelI want to change my second drop values when first drop down value changes. How to do that? District -----please select----- ' . $row["name"] . ''; } ?> ...

1
Q: Making shell_exec work the way sh does

cliffrootI have apache2, php5 installed. I'm trying to execute the next code in my php script chdir('/var/www/'); shell_exec('/usr/bin/omxplayer -o hdmi "'.$file_name.'" < omfifo &'); shell_exec('echo -n . > omfifo'); $file_name is a file and it does exist in /var/www directory. www-data user is in su...

0
Q: how to call a js function in a view file

user1047069this is part of code from my view file (i'm using CI): <td class="last"> <a href="<?php echo base_url('settings/apconfiguration/edit_ap/'.$ap['MAC_Address']); ?>">edit</a> | <a href=" <script> if (checkYesNoAnswerOfUser()) </script></a> <?php echo...

0
Q: Webservice: PHP or Python

mlacunzaIm planning to create a webservice, it will going to serve maybe 100 clients now and we expect it can grow up to 1000 or more. Each client will ask the webservice maybe 2-3 times per day, the webservice will query a central DB and send the resulset to the clients. I want to know which could be t...

0
Q: PHP Convert % symbols from URL to actual url?

ExoonIve got a script to handle some of my game files, For example the URL of them is like this: 3%2C 2%2C 1%2C Smurf%21 My First Racing Game Where the actual name should be: 3, 2, 1, Smurf! My First Racing Game Is there a function to convert all them % things into the actual symbol they should...

-1
Q: cant access my magento site, cant parse XML

user2773592I have a website, its based on magento 1.6.2. site url : http://www.brooksrattangardenfurniture.co.uk/ I can access the site, the home page shows : There has been an error processing your request DOMDocument cannot parse XML: DOMDocument::loadXML() [domdocument.loadxml]: XML declaration all...

0
Q: Jquery cookie-how to use cookie

PavlenI need to post ID value from page with jeasyui Grid, to another demo.php,for creating pdf report. So my idea was to use cookies, like this. $(function () { $("#btnCookie").bind("click", function () { var row = $('#tt').datagrid('getSelected'); if (row){ $.cooki...

0
Q: php pdo, filtering result not working with NOT IN

iLuvCodeI've two mysql tables: One which holds a date / time / description. Second one holds also the time the user can select. Just a simple list with 8:30,9:00 and so on. Now i want wants to check by date when a time is beable it shows just the table Time, but with except the time which was in agenda...

0
Q: testing an array as property of custom class

ahmad alhilalHow can i define an array as a property in model class? let me conclude what i did... my model class that contains an array class Author { /** * @var string {@from body} * name of the Author {@required true} */ public $name = 'Name'; /** ...

0
Q: codeigniter replace content in views

limbenjaminI have the following code in my controller. $this->view_data['page_content'] = 'login'; $this->load->view('main',$this->view_data); if ($bool == TRUE){ $this->view_data['page_content'] = 'dash'; $this->load->view('main',$this->view_data); } Upon login, I would like to replace the conte...

0
Q: paypal standard with chained payment

zion ben yacovi want paypal standard in my store and i know that the process goes like this: 1. I generate a url with all the payment data(product names,prices,shipping return_url etc) and redirect my customer to that url. 2. An ipn call will come from paypal to my system to update the transaction details ...

0
Q: Facebook redirect URI

FakeHealI'm using codeigniter and facebook's php sdk. I have set up everything and it works perfectly, except that I want to pass a parameter to my redirect URL, so I can force open the register modal. $data['fb_login_url'] = $this->facebook->getLoginUrl( array( 'scope'=>'email, user_locatio...

0
Q: Wordpress loads menu images over HTTP instead of HTTPS. Can you define the base URL to use HTTPS?

seanhI'm wondering if it's possible to override the base URL used by the Appearance > Menus feature in WordPress. No additional plugins being used here, this is standard WordPress functionality. By default it defines the base path as the wp-content/uploads/ path, but it uses the HTTP base url, even ...

0
Q: Using Javascript/PHP/HTML/SQL to display results and "more results", but not working

user3104737I have a site which displays information on cars. "Information" (Make, Model etc) and I currently have a seperate button "Show more information" (Mileage, BHP etc). All this is currently doing is, getting the information from the database then when I click show more information it hides the first...

0
Q: moving from adodb to mysqli maybe

anatakI used to write some php a few years ago and used adodb to connect to a mysql database. After reading a bit on stackoverflow I wondered if adodb is still maintained ? the latest changelog is from 3rd of September 2012. I started reading the documentation of mysqli. I can get a database connecti...

0
Q: How to insert php variables to word doc template and also convert to pdf

user2666633I am still new to programmer but i am doing just good. This is what i attempt to achieve, get a template in word doc with some texts and blank spaces, then populate those spaces with variables coming from a form field processed in php. e.g **in Microsoft word file i have:** Name: Age: Sex:...

0
Q: Permission problems when trying to test facebook sdk in laravel

user3127161After adding the SDK to my laravel app, i tried testing it but had this error ** (Error in exception handler: The stream or file "/home/newdev/public_html/app/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in /home/newdev/public_html/vendor/mon...

0
Q: How to read status.xsl on icecast2 server?

Jhonas BoenoHere is my code, it worked before but now it does not. Returns no error, do not know what is happening. <?php header("Content-Type: text/xml"); $opts = Array( "http" => Array( "method" => "GET", "timeout" => 10 ) ); $context = stream_...

0
Q: How devide items equally in 4 boxes?

Krishna KarkiSuppose i have 7 bags with different weight. Actually a php array contains this data. Bag A 60 Kg Bag B 80 Kg Bag C 20 Kg Bag D 10 Kg Bag E 80 Kg Bag F 100 Kg Bag G 90 Kg Now i have to divide all 7 bags in 4 container equally by balancing there weight. But i cannot break ...

0
Q: Laravel 4 routes going to wrong route

RayI've set up routes for a resource and added additional routes for the same controller. I've had this route working and don't think I've changed anything but now it's routing to the wrong method in the controller. I'm aware of the first in and first out principle of the routes and have this set u...

0
Q: work as a group on webapp using cvs

shanMe and my friend are in different countries have been developing a LAMP web app for several weeks. All these times we have been sharing source code over ftp. In this way php files become messy. I have heard about CVS, and have been reading about it. But I still cannot figure out how it works exac...

0
Q: Using set query MySQL - Kohana 3.0

AFDim using Kohana 3.0 and MySQL How to use DB::query(Database::SELECT,'your query'); when used query like this : $query = DB::query(Database::SELECT, "SET @id_draw=0; SELECT * FROM ( SELECT a.sender,a.recipient,@id_draw:=@id_draw+1 AS id_draw FROM `gifts` a WHERE a.se...

0
Q: Laravel group routing parameters with prefix

David WadgeI've noticed that the parameters that you specify in a route prefix within a group are also supplied to all controllers that sit within that particular group which makes sense. For example: Route::group(array('prefix' => 'team/{id}/{slug}', 'before' => 'auth'), function () { Route::get('docume...

0
Q: Passing form variable into Php Query

user3127167I am trying to get a variable from a form on my page 1 into a query I have made on page 2 so that when the query works it will use the variable entered on page 1 Page 1 Form <form method="post" action="testformQ.php"> <input type="text" name="testform"> <input type="submit">enter Page 2 ...

0
Q: Getting the values from multiple chekboxes in an HTML form in php

Hasan Sait ArslanI have such a code. It is an HTML form: echo '<b>GPA: </b>'.$yaz["GPA"].'<br>'.'<b>ALES Verbal Score: </b>'.$yaz["ALES_VERBAL_SCORES"].'<br>'.'<b>Ales Math Score: </b>'.$yaz["ALES_MATH_SCORE"].'<br>'.'<b>ALES Equal Weight Score: </b>'.$yaz["ALES_EQUALWEIGHT_SCORES"].'<br>'.'<b>TOEFL PBT: </b>'.$...

0
Q: Trying to insert linebreaks within php variable

ResponsiveConsiliencePlease bear with me as I'm still very new to this. I'm simply trying to ensure the email message body below has linebreaks where I put <br/>. However when I run the script the message body displays exactly as it is in the script even though it works perfectly in the editor I used to compose this...

0
Q: PHP Array sorting by parent

OskarI got a complex array to be sorted, it looks like this: Array ( [0] => Array ( [id] => 1171409310 [parent] => 1171287657 [createdAt] => 2013-12-20T12:42:19 ) [1] => Array ( [id] => 1171360372 [parent] =>...

0
Q: Use Wordpress.org login in non-Wordpress pages

mypal125I am developing a web app and am thinking it would be simpler to use my existing Wordpress.org login system than to write a new one. I have the following technologies available: PHP Javascript HTML5 Anything Chrome has Anything lighttpd has (x10hosting.com) I just don't know where to start wi...

1
Q: Image Not Rotating in PHP

neat159I wrote some code for my personal web site to rotate images but images dont rotate properly when it does images are so weird rotated. /** * Rotate an image (left or right) * * @param string $sImage Full path to the image * @param string $sCmd Command to perform. Must be "left...

 
1:48 PM
0
Q: php mysql order by priority and ranking

user3104387i have the following table : Properties id agency_id refno 1 1 AA101 2 3 AA201 3 2 AA501 4 1 AA762 5 3 AA555 agency agency_id agency_name priority 1 A 30 ...

0
Q: php imagick won't save PNG compressed but shows compressed in browser

AhsanI have the following code in PHP to take the screenshot of first page of the PDF. $name = getcwd()."\\testfile"; $img = new imagick(); $img->setResolution(200,200); $img->readImage($name.'.pdf[0]'); $img->setImageResolution(100,100); $img->resampleImage(100,100,imagick::...

0
Q: Remove further inputs in Joomla k2 submission form and just keep Extra-Fields inputs

DummyBeginnerI'm going to use Joomla K2 component as a directory system only, So just show Extra-Fields in front-end contents. Therefore in the K2 item submission form which is available to registered users, I tend to remove all further inputs (including content tab and its huge textarea for writing post, at...

0
Q: Secure php source on shared server

nisargjhaveriI am using a shared server to host my php project and I want to secure my php source code so that no one can see it. The current permissions for files are rw----r-- and for directories it is rwx-----x as the apache user is not in group. But with this permission anyone can see my code as everyone ...

0
Q: Generating a random number from date in a reproducive manner in PHP

Erich JagomägisI have been struggling with a problem for a while now. Namely I need to generate a number in range 1 - 50 using a date. What I mean is if I run a some piece of code withing a specific date, it should produce me the same number for that day. If the date changes it should produce me a different n...

0
Q: function for post from category in wordpress

user3018182I have the following function in functions.php page function viewpost($num) { echo $num; query_posts('order=dsc&cat=$num & showposts=2'); while (have_posts()) : the_post(); ?> <span> <?php the_title(); ?> <?Php echo get_the_post_thumbnail(); the_excerpt(); ?> <

0
Q: PDO Inside a Function alternative

Wesley LachenalIs there any alternative for PDO to use global variable everytime I make a function? For example, Here's my connect.php (removed excess code to straighten things up) $db = new PDO("mysql:host=$hostname;dbname=$dbname",$username,$password); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCE...

0
Q: How to solve Creating default object from empty value?

Yusuf AliI found something about this error but I think this is little bit different. I defined a public variable. Class Controller{ public $model; And I'm trying add extra word(model) between $model_name and $this. public function call_model($model_name){ $this->model->$model_name = new $mode...

0
Q: Deleting Database entries and associated Junction table data in MYSQL and PHP

GuyA have a situation where Lessons are created, teachers are assigned to teach said lessons, and students can then book them. These are both many to many. Lesson <-> Teachers and Lesson<->Students. There is a lesson table and two junction tables linking them. Here is the structure: Lesson Table -...

0
Q: Which class ideally assigns properties: User or UserFactory?

RobbertI have a class User and a class UserFactory (factory pattern). The factory connects to SQL and creates instances of the user object. Since we often have to preprocess fields retrieved from the database, I'm wondering which is the best place to do so. For example (simplified): class UserFactory ...

0
Q: INSERT data not working? connection works fine with the database

PaulI try to save the name "one" in the database but it is not working, the echo always returns "not working". With a simple SELECT, it works, so the connection works fine. But the insert does not. Would you see any error in this code? (the last id was 20, so I put 21, but even with null, the result ...

 
2:30 PM
0
Q: How can I insert data in PHP.Net using .Net Framework and SQL server? Can you provide an example?

user2885968How can I insert data in PHP.Net using VB.Net and SQL server? Can you provide an example? Thansk everyone for help.....

0
Q: Change post status in Wordpress based on user registration date

marcosmartiniI was wondering if anyone could help me: When a user access a certain page, I need to get how many days that user has been a subscriber for. So let's say if he's been a subscriber for < than 7 days, then set the post status to 'private', otherwise, set it to 'public'. Thanks heaps!

0
Q: change line of text in PHP file when parsed

Jack MaessenI am using Vanilla 2 forum and i want to translate the line "New comment" just above the textarea. But the forum script includes almost 1000 .php files. Maybe it is also possible that it is already put in the DB. How can i search efficiently for that line of text? Website: http://www.webprofis.nl

0
Q: Issue Recognizing FB Comments on Home Page

user3127254All. I'm new to programming and I could use your help. I've been having trouble changing <?php comments_number(__('No Comments', 'engine'), __('1 Comment', 'engine'), __('% Comments', 'engine')); ?> to a line that recognizes the total number of comments made by fb users, and inputs them cor...

0
Q: Codeigniter URL form get values to be key value pair

Masood AnwarI have the following form: <form name="frmSearch" method="get" action=""> <input type="text" name="Search" value="John" /> <select name="criteria"> <option value="-1">Select Criteria</option> <option value="1">By Name</option> <option value="2">By Email<...

0
Q: Incremental alphanumeric

markwilliamswebI have to generate a 6 alphanumeric string and it has to be incremental to work with an api. This has stopped working because I have seemingly ran out of characters. I started with a00000 and ended up at z99999. Any thoughts on what the next increment would be from that? I have tried za0000 and ...

0
Q: Uncaught exception 'PDOException'

SiL3nTi'am making a new php script to write and read from database. After some months working everything works good, now when i finish the script after around 3 hours doing nothing on my windows server 2008 i got this error Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] Ca...

0
Q: Change the MIME type in WordPress

FresherI am using JW Player plugin from wordpress. I try to upload mp4 file in the admin dashboard -> media There is nothing problem in the uploading. but when i try to load the video in jw player of wordpress it loads only audio. When i try to upload the file it shows the mime type as video/quicktime...

0
Q: Javascript XHR send multipart/form-data

php_nub_qqI'm trying to send a multipart/form-data content-type request: var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function(){ if(xhr.readyState==4){ alert(xhr.responseText); } } xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type","multipart/form-data; bounda...

0
Q: How can I make PHP repeatedly check my database for modifications?

VantalkI have a program which makes changes to a MS SQL database. I wanted some actions to happen when these changes are made, like sending an e-mail. This program doesn't do any of those things and I also can't modify the program, so as my question says.. can I use PHP to keep checking for changes in t...

0
Q: PHP preg_replace usign a string in a pattern

XriukHere's my PHP code: $str = "prova?123=banana&page=20"; echo preg_replace('/(&page)(\d+)/', "", $str); I want to replace the part "&page=NUMBER" with "", how can I use strings in the function? Thanks.

0
Q: Getting all effected rown in MySQL UDATE

AdelphiaTitle pretty much says it. I am using the deprecated mysql_ functions. I've got a query like: UPDATE `table` SET `row` = 'newtext' WHERE `row` = 'oldtext' Is there an easy way to get all effected rows' primary key? Some glorious combination of mysql_insert_id and mysql_affected_rows? How can I...

0
Q: install clustalw in linux server using winscp

biomanI have windows 8.1 in my PC.I want to install CLUSTALW on my office LINUX server using winscp.After installation i have to use clustalw in my php script for my work. I have tried cd clustalw-2.0.10/ ./configure(no errors) make(error) su(error) make install(error) .. after these commands ...

0
Q: Passing argument from view of one resource to create method of another with Laravel

Ir1shI have a questions resource and an answers resource. From the questions index I want there to be a link under each question called answer which when clicked takes you to the create answer form. The id of the question being answered needs to be passed with it to the answers.create method which th...

0
Q: Performance of a big database, faster method: finding value with php or sql?

Dominik ZinserLets say we have a very big (a lot of rows and cells) table in our database and we are looking for a very special value. Which way will show us the result earlier? a) put the table in a php array and get through this array b) search for the value with sql commands

0
Q: PHP Script - Works in browser & command line but not in cron

ExoonI have a PHP Script which i want to download files. It works fine in the browser. It also works fine if i run the script using php /var/user/script.php I'm running the script on Cent Os 64 bit OS. but i setup a cron to run every 5 minutes but all it downloads is an index.html file every time? ...

0
Q: Save a "click to edit" with ajax

LaiaI'm making a simple list application and the items should be easy to edit (just cleaking on them). It works fine, but I still have a problem at saving the changes to the database, for some reason that just doesn't happen. I'm sure it's a code problem, but I haven't been able to find it. LIST PAG...

0
Q: Search and auto populate field

user3126531I have a form that allow user to key in string and search when they click on search button. A pop up will appear to let them choose the correct value. With this chosen value it will populate data into the parent window. I am able to populate most field except for 2 dropdown fields that are depen...

 
3:12 PM
0
Q: MySQL SELECT-ed column parse into PHP

erourI would really appreciate if someone would help me on this one. I'm doing a project for my university and I'm supposed to make an interface that is going to handle pre-defined and "free-form" MySQL queries. Pre-defined as in a few buttons that will execute the queries, this is not the problem, t...

0
Q: codeigniter grocery-crud callback_before_delete not working

Ralph SchipperI try to use a deletion script in codeignitor. I have a invoice table called invoice, this generates a invoice number (id autoincrement) and some dates an status. And I have anothe table called invoice details here I enter some details and de invoicenumber. When I delete a invoice I want to che...

0
Q: How to enable SSL only on specified XAMPP directories

Leth0_I've been able to use makecert to make a self signed cert which currently enables HTTPS on all directories in C://XAMPP/htdocs I have two directories which I want to be different, c:/XAMPP/htdocs/PLACEHOLDER1 c:/XAMPP/htdocs/PLACEHOLDER2 I was wondering if it'd be possible have the SSL scope...

0
Q: Open Cart - Receiving radio value at checkout page

user3127340I need help to create a radio box during the checkout. I have no idea how to have the result of the radio box send along with my other information in the checkout page such as billing address and many more. this is what i do , <input type="radio" name="shipping_address" value="e...

0
Q: How to get dispaly selected option in dropdown using php

user3100533I am trying to change value of drop down box and then display changed value in drop down box but it showing the value which is already saved in database. Here what I have done <td width="6%" align="left" valign="middle" class="narmal"> Class </td> <td align="left" valign="middle">:</td> <td widt...

-1
Q: PHP JSON read object attribute

SufflixI am a beginner in php rogramming and I try to get some information per PHP out of an JSON string. Therefore I used: $json = file_get_contents('data.json') var_dump(json_decode($json)); to get more information how php will parse my JSON file. Output of it looks like: array(10) { [0]=> objec...

0
Q: add mysql_real_escape_string() after str_replace()

yuli chikaHow to add mysql_real_escape_string() after str_replace()? $s='+'.str_replace(' ',' +',rawurldecode($_GET['search'])); $sql = ' SELECT * from table where match (keywords) AGAINST ('".mysql_real_escape_string($s)."' IN BOOLEAN MODE) order by date desc limit '.mysql_real_escape_string($_GET...

0
Q: Lighten my cms loading

user3090697I am creating a cms system and so far so good. But as i go further with my project i develloped alot of plugins for my cms like a guestbook, calendar, comments, events, blog,... Now every plugin is loaded in my index.php file with the require function. A plugin gets loaded like this. // START PL...

0
Q: Get SOCK DETAILS of the user who visits my website using php, JS and/or Jquery?

user3127352my problem is that I want to get the "SOCKET DETAILS" and "SOCKET VERSION" of the user who visits my the website. Please use anything out of Php, JS, jquery. As I am new in this, please tell me step-by-step. Moreover I need a code that works fine. Thanks in advance.

0
Q: Integrating PhpStorm 7.0 with Xdebug 2.2.3 (PHP 5.53)

Dale LeungObjective The objective of this post is to share with you on the process of integrating PhpStorm with Xdebug. I have been using Var_dump and Print_r one too many times and has decided to upgrade to an IDE environment, in this case Phpstorm, for a more systematic and "cleaner" approach suitable...

0
Q: Developing An "Add To Favourites" Button In PHP

azmie145Im creating a small website using based on PHP which is generally a site for showcasing the products of a certain shop. The site has the functions where a user can create his/her account, log in and then he/she should be able to favor add any product they like to their own wish list. Then the fav...

0
Q: Get markers with php and display in gmap

JohnI am trying to dynamically get the coordinates of some markers stored in mysql and display them in a gmap. Bellow is markers.php: <?php $username="root"; $password=""; $database="pois"; // Start XML file, create parent node $doc = domxml_new_doc("1.1"); $node = $doc->create_element("markers"); ...

0
Q: Convert URL Language

Kiran RSThis question may be impractical and may be stupid, so please pardon me. I want to change the LANGUAGE OF URL. For example, If the URL is www.google.com I just want to translate it to another Language(HERE 'MALAYALAM- An Southern Indian Language'). In Malayalam "Google" looks like "ഗൂഗിള്...

0
Q: ftp_login to localhost shows authentication failed

user3125585I have written a snippet to connect to my localhost xampp from the server but it shows authentication failed despite the correct credentials. I tried the script on localhost it worked but it doesn't from my server "scaledrop.net" . <?php set_time_limit(3600); $file = '/home4/scale/public_html/a...

0
Q: sending client to client messages without server interaction

user2475714I am not sure if I can explain this correctly…. But is there a way to send a message from one client to another without bringing the server into interaction…. I mean the server will setup the channel between two clients and the clients will communicate using that channel only…. No server interact...

0
Q: How to search in foursquare api using more than id

Ahmed el-GendyI was integrate foursquare api with my website.I want to search in foursquare by sending array of ids to api and retrive data of each id . What i found searching using only id like that https://developer.foursquare.com/docs/venues/venues I want to search with array of ids

0
Q: trying to edit SQL via php but keep getting an error

DigitalOutcastas far as i can see my code is sound however, I keep getting an error this is the error Notice: Undefined variable: person in \sql\modify.php on line 12 here is my code.. <?php include 'includes/connection.php'; if (!isset($_POST['submit'])){ $q = "SELECT * FROM people WHERE ID = ...

0
Q: PHP and Mysqli: how to go about saving a recipe to the user's profile

Sarah AlI'm a bit of a newbie to this part of PHP so was wondering if someone would be able to put me on the right direction. I have a table that displays a recipe and its nutritional info. When I press save, I want that recipe to be added to the user's profile (so in the database I have a 'users_recipes...

-1
Q: How to generate a new page using php

BenDI was wondering how I can create a new .php page whenever a user clicks the submit button. I would want the php page to be titled by a variable that I have already created. I already have the submit button set up to upload a image to the main page, and put the image in a folder, so I would want ...

0
Q: UNION with unequal columns in joined tables

SwodahsWhen building a query to display results from 2 tables where 2 are identical but the third is not (has fewer fields but does share the 4 columns which need to be returned in the result), what is the proper way to build the query? Table1: sku field1 field2 field3 field 4 field 5 field 6 field 7 ...

0
Q: How to define a custom key in PHP arrays?

Amir SaI want to define a two dimension array like below: [40.1][John] [40.2][Jane] [40.7][Mary] [40.10][Sara] in other words I want to define an array with custom key. Later I need to access to the array values with the custom key. for instance : echo(myarray[40.2]); And I need to ...

0
Q: Css problems with div

KenI'm trying to display search results drawn from my database.The results will be queried from the database, then put into a variable which will then be displayed to the screen. As can be seen from the picture, there seems to be a little box near the bottom of the image that is sticking out.I don'...

-2
Q: PHP MYSQL JOIN TABLES

user3127326I have these table table_name NameID | Name | ... 1 | a | ... Add AddID | NameID | Date (y-m-d) | ADD 11 | 1 | 2012-11-10 | 5000 12 | 1 | 2012-11-13 | 7000 table_a aID | NameID | Date (y-m-d) | ... 21 | 1 | 2012-11-11 | ... 22 | 1 | 2012-11-14 ...

-2
Q: PHP/MYSQL arrays and where

user3127399I have several IDs in an array which I need to find with "WHERE". $ids = implode(',', $members); $sql = "SELECT * FROM users WHERE id IN ($ids)"; How do I echo all the strings from the array? Tried mysql_fetch_array, but only got 1 string..?

0
Q: unset session within echo causing issues

user2828701I am getting the following error and cannot figure out why. I've been staring at this for too long. This is the error message: Parse error: syntax error, unexpected T_UNSET in... Essentially, I am trying to give the user the ability to clear a session via clicking a link. I am not sure whe...

0
Q: Showing additional information through an onclick/javascript function

user3104737Hi I'm using javascript/php/html and at the moment I am displaying information on "Cars" when I click more information it displays "further information" on the same cars and hides the cars tab (all this information is taken from a database). But right now i'm trying to get it to display this in...

0
Q: Doctrine Where IN

Anthony De Meulemeesteri have following query: $filters is an array like this array('black', 'green', '50mm') $query = $repository->createQueryBuilder('d') ->select('product', 'attribute') ->from('TwndleBackendBundle:Product', 'product') ->innerJoin('product.attributeValues', 'attribute') ...

0
Q: Arabic text output php mysql utf-8 conversion issue

Aditya BhattI'm importing data from Oracle database to MySQL tables. I have set my MySQL table charset as utf8_general_ci and database and table name with field column value set as utf-8 as well. Now, When I fetch the result, it prints like, which is with ? sign: مرحبا العال� - 5 I have my utf value in...

0
Q: PHP/HTML5: Assign Latitude Longitute to variables

user3053891I'm new to PHP/HTML5. I found the following HTML5 example to get device latitude and longitude. But it's just an example by showing the lat/long upon a button click. Problem: What I need is, when user submit a form, I will INSERT the value into MySQL. At this moment, I wanted to get the device l...

0
Q: How to set a session variable from the UserProvider object in Symfony2?

hertsmaelIn order to set the current UI language, I need to set the user default language to a session variable when the User information is being retrieved from the UserProvider object (loadUserByUsername method). How can I access to session to set the current UI language from the UserProvider object? ...

0
Q: The specified module could not be found - netbeanz 7.4

user3127434i have install netbeanz 7.4 & appserv2.5.10 but there is a problem when i run php file ( PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\php5\ext\php_exif.dll' - The specified module could not be found. in Unknown on line 0 )

0
Q: What is the jQuery equivalent of a CSS media query?

alias51I am using jQuery mobile to create a sidepanel. I have the following code, which adds swipe functionality to reveal the sidepanel: $( document ).on( "pagecreate", "#swipe-page", function() { $( document ).on( "swipeleft swiperight", "#swipe-page", function( e ) { // We check if there...

0
Q: Pagination For Search Results using Yii

NovaLogicI have a search form, which returns a bunch of images. Because their number can be high, I would prefer having the results displayed using pagination. However, I cannot seem to get it to work properly. I have moved everything to the view to keep things as simple as possible. Here is my code sni...

 
4:31 PM
0
Q: Missing argument 2 for UserController::edit() - Laravel

GilkoI'm using the framework Laravel. I have 2 tables (Users and Persons). When I want to edit the user and at the same time the person, I get the error message: Missing argument 2 for UserController::edit() Table Users CREATE TABLE IF NOT EXISTS `festival_aid`.`users` ( `user_id` BIGINT NOT...

-1
Q: How to beautiful code without editing?

user3077624I am using notepad++ code editor. Please recommend a website or software for beautify the codes without any editing. (HTML,PHP,JAVASCRIPT)

0
Q: How can I explode a string, edit the data, then implode it with the original delimiters still in place?

user3096443If I have a string such as this "Hello | I'm Ben" and I want to edit the second section, I can use PHP explode like this $newstring = explode("|","Hello | I'm Ben"); Once that data has been edited to something new, for example: $newstring[1] = "I'm john"; How can I implode the string to onc...

0
Q: Laravel Eloquent inner join with multiple conditions

Wouter NeuteboomI have a question about inner joins with multiple on values. I did build my code like this in laravel. public function scopeShops($query) { return $query->join('kg_shops', function($join) { $join->on('kg_shops.id', '=', 'kg_feeds.shop_id'); $join->on('kg_shops.active', '=...

-2
Q: If i want to build my own PHP framework to create online stores like Shopify, what I should study?

Wananong KluanwongI want to build the framework or the website that allows people to create their online stores like Shopify or Goodsie and also provide them templates to choose. What I should study about. I have intermediate PHP and Javascript knowledge. What I am wondering now is We can create new fields in t...

0
Q: Next and previous button using jquery

SabreI am using 'PHP Simple HTML DOM Parser' to save a website as a 'htm' file. I then use 'jquery' to extract a 'DIV' from the file and put it into a div. I want to create a 'Previous' and 'Next' button but the problem I have is that to do this I have to change the 'URL' so the parser can get the pag...

0
Q: Undefined index: img error while processing the form with Ajax

AlexI can't process the uploaded image file with php ajax requuest. It's process the text field but can't process uploaded file. Following is my form. can you tell me what is wrong in my simple code and how can i solve it ? and without upload file i saw that it's not redirect after successfull. ht...

-2
Q: is using ip the proper way to check for the user's current session?

MostafaI know ips change. but it seems they do not change during a single connection unless a proxy etc. bridges the connection. Now, my question is that: Is using $_SESSION['ip_address'] the proper way to check if the user is consistent? by "consistent" i mean to ensure that he has not used proxies et...

0
Q: Backing up a MySQL database using PHP

user2370078I was trying to make a backup of my MySQL db called "backup" using a PHP script below, but for some reason, it doesnt work. Any ideas what is wrong? I wanted to create a file called test.sql in the same folder that would contain the data (because the db is quite big I only selected values of Temp...

0
Q: Redirect to a different page based on role in a database

lelouchlianai'm new to php. I'm trying to create a login page that will redirect to different pages based on their roles. they will login with staff id and password. Below are my database Staff_id password Role XXX XXX XXX My HTML login page ---> Login.html My php code for login --> L...

0
Q: How to loop over an array and when we reach the end start over?

PeterI have an array of urls that I want to do pass to a function, I'll be using a cron job to pass only 2 of them every 10 minutes, I'm storing the last passed index of this array in a database, the problem is I don't know how to pass the first 2 elements when the last passed element is the last one ...

0
Q: Delete previous anchor tags on refresh

user2829113In my webpage I use php which uses anchor tags when clicked on a link. But how do you reset the anchor tags (E.G. example.com/help.html#blah) with javascript on refresh/reload. Thank you very much.

0
Q: how to combine, query between 2 table?

user3127516i'm newbie in php, i have query like this : <head></head> <?php $r=mysql_fetch_array(mysql_query("SELECT * FROM background_top")); echo "<body style='background: url(img_background/$r[picture]) repeat-x ;'>"; ?> <?php $r=mysql_fetch_array(mysql_query("SELECT * FROM background_bottom")); echo "<...

0
Q: PHP sitemap generator strips tag

FosAvanceThis is my code to create xml sitemap. But problem is that when it creates xml file it doesn't include <?xml version="1.0" encoding="UTF-8"?>. It includes every tag wirteen in my function except that one. // this variable will contain the XML sitemap that will be saved in $xmlfile $xmlsit...

0
Q: curl_multi_exec returning blanks sometimes

user2963178Basically there are a couple hundred subpages I'm pulling off a site (as a test run), and then I have to parse each of those couple hundred subpages for some data. Now all this is working and fine. But of course, it takes too long because there are so many pages, if I did this in serial. So I ...

0
Q: Magento custom option checkbox ingnore saving field

user3127521I have make custom options in my backend in magento![enter image description here][1]. Now have a make checkbox ignore saving by every field. But my php is not very good, a can a make that by saving only de field data save that a won't ande the other ignore. options: [1]: http://i.stack.imgu...

-1
Q: PHP search feature using keywords

user3127539I got this warning message for the code: Notice: Undefined index: keywords in C:...\search.php on line 55 What should I fix in my code? Can anyone help me please? Here is my code for searching using keywords: <?php mysql_connect("localhost","root",""); mysql_select_db("search"); $search ...

0
Q: Relationship method must return an object of type Illuminate\Database\Eloquent\Relations\Relation from model call by not view in Laravel 4

kaimerraI have a model, Ability, which belongs to another model AbilityType. <?php class Ability extends Eloquent { public function abilityType() { return $this->belongsTo('AbilityType'); } public function name() { return $this->abilityType->name; } } I can mak...

0
Q: Dropdown list population

BraveSTwo dropdown lists - Select first value, then mysql_query returns the answer, and whit this data populate second dropdown list. Problem is - the second list doesn't seem to be populated. The code works fine - I see output in firebug. <form method="post" action="showResult.php" > <input type=hid...

-2
Q: Where can I download php5apache2_2.dll?

MarcosCan someone tell me where I can download php5apache2_2.dll? There are a lot of sites to download it, but I'm not sure about security. I checked in ApacheLounge site but I just found out php5apache2_4.dll and it doesn't match. Can anyone recommend me a security site to download the file?

0
Q: How to fetch last 24 hrs record from mysql using php

user3117548I checked similar questions from this site.but i am unable to understand how it exactly work.in my database i have 3 column (id,name password).what to add on db and how can i get last 24hrs record .thanks all and sorry if this question is useless . MySQL_query("select * from core With-in the las...

0
Q: PHP Extensions Not Loading

The HawkI'm installing MySQL 5.6, Apache 2.2, and PHP 5.4.23 on Windows 8. I think I have everything correct but for some reason the PHP extensions are not loading. It started when I tried to install PHPMyAdmin. It was giving me an error for mbstring not loading. So I check phpinfo and I search for '...

-2
Q: How do i add Attachment to Mail Function()?

ChapTsI have searched and changed in my code for a long time, but i really can't find any solutions for my problem. I would really like to know, how do i add the possibility to attach a file on my online mailer i've made for everybody to use for free? Hope you guys can help me. Here are my code: $t...

0
Q: The selected value from dropdown to be insert to db along with excel sheet dat

user2991258In the below code i have placed the controller,model and view.In which i get 3 column nim,nama,alamat from excel and exam name from dropdown to be insert in to db.Now i placed a dropdown the selected exam name from the exam course table to be insert into db.Pls help me to solve the issue. Contro...

0
Q: ebay mobile site login using CURL

user3127546I am trying to log into ebay through mobile site version. It just displays the login page when I echo the result. <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,'http://m.ebay.com/myebay?mfs=tabs&actionName=BUY_OVERVIEW'); curl_setopt ($ch, CURLOPT_HEADER, 1); curl_setopt ($ch, CURLOPT_U...

0
Q: How to use pgrypto in postgres to hash password

ZaszczykI usually hash password+salt with sha1 and inserted password hash and salt into MySQL database. Now I have to use postgres in new project (PHP project) and I get known, there are better ways to salt password. I found this pgcrypto and code: UPDATE ... SET pswhash = crypt('new password', gen_s...

0
Q: Securing access to Java-Script files

user3127522I have a site that grants access to content in various forms (PDF, MP3, MP4 etc) to authenticated users. The site has been developed for me by a 3rd party developer on LAMP. Users authenticate with the application using a username/password stored in a MySQL DB. They do not authenticate with Apach...

0
Q: Narrowing possible parameter datatype for method call (for strings)

SquareCatIf i wanted a function to exclusively expect an array, i'd write: function _setIt(array $param){} However, i have a case in which i expect a string. Obviously i could run checks in the first line of my function. But i want to know: Is there a way to use the above function declaration method ...

-1
Q: remove new line of a string inside the view

runrunforestI have a view file call home_view.php it look like this: <html> <head> <title></title> </head> <body> <?= $this->load-view('some_of_the_content_view.php');?> </body> </html> Then the file some_of_the_content_view.php look just like this: <div>Title</div> 3 line bearks here <p>some text</p>

-2
Q: What is the quickest way to upload and save an image?

JayI need to upload and save a .jpg image to my server via PHP from an Adobe Air based mobile app. What is the quickest way to do it? Should I use the ByteArray, Base64 or upload it from the location on the local drive? (or some other method if available)

0
Q: cakephp 2 file cache an array

bbergthere i'm using cake's (v 2.0.6) file caching engine to store some arrays (product of a simple paginate() operation). the code is described at http://www.jotlab.com/2010/pagination-caching-with-cakephp#comment-1114 when i open the cache file to check its content, there's just a big integer. ot...

0
Q: Why is the text from the twitter API feed showing different characters in the tweet text and the retweet_status text?

AmbulareI've just started using the twitter API 1.1, using PHP/curl to access the feed, and I've noticed that when I recieve the JSON feed, tweets are formatted containing strange characters at the end of the tweet object's text property but not in the retweeted_status->text property (see below, irreleva...

0
Q: Socket.io security auth

Zelíim building a web application with socket.io and i realized that i have a problem. i authentificate via php on login, but when they are logged in they can emit all scripts with fake data for example i log in and it emist to server that user 77 has connected via socket: id = <?php echo session .....

-1
Q: Is there a way to use a variable as the email address in a php mail function

user3123891I'm trying to get an email to mail to a variable. My code is as follows mail($email, 'Order Confirmation', $body); It comes up with the error message: mail() expects parameter 1 to be string, object given I have tried useing print_r as suggested elsewhere on the web but it doesn't work. Is ...

0
Q: How do I safely display emails in a browser, ie. only allow HTML, no javascript or outside sources?

user371699I've searched a lot but couldn't find the appropriate solutions to allow all html except for javascript, outside sources, or any other XSS attacks. I want to be able to display user-created emails in the browser, which inherently should allow html, head, body, style, and other tags. Most topics r...

0
Q: Assign requests (rows of a database table) to users

SanchitSo I have an InnoDB table which has a bunch of requests in it. For the purposes of the question the table effectively has three columns. An auto incremented unsigned bigint primary key (id) A user_id (which may or may not be null). This is an unsigned bigint. A scheme_id which is sort of like t...

0
Q: Php-Nothing being written in Mysql table using post method

user3127608I have looked online for many hours but still can’t figure out what’s wrong with my code. Code works okay when I have $SALES=30; $ID=10; etc. Now I want to post those values using html form, but can't make it to work. <?php $SALES = '$_POST['SALES']';//Supplied by html form $ID = $_POST['ID']...

0
Q: Order differently until success

Vlad GincherIn my login form you need to write your first and last name in the same input, but in my database the first and the last name are in different columns. Using php's explode() function I'll separate the words to array, and then easily I'll check it in the database. But what about the people with th...

0
Q: Code examples on website look like code in dreamwearer

user2925329I'm working on a sandbox website for html and css, I'm now working on the coding page. I want the code (text) to be in different colores like in dreamweaver. How can i fix this? Is there a plugin or something for it? I have searched alot on google but i can't find anything.

0
Q: Mini cart does not match with cart if you open the page after a while

circassHeelo, I am having a problem with my magento store. Problematic case is like that -> 1- open the page 2- Go to a product 3- add to cart 4- review the cart 5- close the page 6- wait for more than half an hour 7- open the page again 8- Mini cart still shows the last item count and total price 9-...

0
Q: How do i need to create links with php

user3127605I have a website with link mypage.com for example, with my engnine, and i have unique table in database mypage with name users, in the table i have 4 colons id,username,password,seo-url. In seo url i have value test-user, but how can i get that into my page, to every user. For example mypage.com/...

-2
Q: PHP array not instantiated

Sonicdeadlock<?php class Validate{ private $_passed = false, $_errors = array(), $_db = null; public function __construct(){ $this->_db=DB::getInstance(); } public function check($source,$items = array()){ foreach($items as $item=>$rules){ ...

0
Q: What does the "Unable to fork" error means?

Mohamed SaidI'm using git for deployment, by using a POST hook on Bitbucket that executes a PHP file, this file contains the following: <?php exec('cd /var/ && git reset --hard HEAD'); exec('cd /var/ && git pull origin master'); This used to work fine, but lately I noticed the deployment doesn't occur whe...

0
Q: PHP gallery autogenerated thumb to open larger image in <div> on click

user3122651Sorry in advance if it's a stupid question, but I'm a complete newbie and this is the first bit of PHP I've ever looked at in my life. I've taken the code from this web post about Creating an image gallery from a folder of images automatically and it creates a gallery of thumbnails which, when c...

0
Q: Update multiple rows/columns in php/mysql

xv47I have the following line: $reset = "UPDATE pidgeon SET obt='" . $hour . "' WHERE tag='" . $tag . "'"; Which updates just fine. However I need to update an additional row (kill) and I keep getting syntax errors. I've tried the following: $reset = "UPDATE pidgeon SET obt='" . $hour . "', kill=...

0
Q: PDO Presentation Suggestions?

David BlomstromI'm trying to learn how to convert my queries to PDO. I finally got a simply row(count) query to work, and now I'm tackling more complex queries. I'm currently using the following query. (Sorry it's so complex; I'm still working on simplifying it.) $SeaURL = str_replace('Washington/', '', $MyUR...

0
Q: Add class to specific table php or jquery solution?

Aleksandar ĐorđevićIm building wordpress theme based on bootstrap, and on default wordpress calendar widget, styling is not matched with bootstrap styling. However it's very easy to match width of columns in calendar widget. When widget is activated it's wrapped in <table id="wp-calendar"> If i am somehow abl...

0
Q: Private Messaging Implemantation php chatroom

user3127632i am creating a (sort of) OOPhp chatroom but i am stuck on private message function. In public chat i fetch data from my database without special parameters. In private i have to input a userid of speaker and userid of listener. I am having trouble of passing the userid of listener for updating...

0
Q: preg_match_all an array of items, then for each matches

brizzI am editing some Interspire Email code. Currently the program goes through the HTML of the email before sending, and looks for 'a href' code, to replace the links. I want it to also go through and get form action="" and replace the urls in them (it does not currently). I think I can use the ...

-1
Q: why my text box value is not getting saved.?

ChellaI am concatenating 3 text box (assume t1, t2, t3) values into one(another textbox - t4 which is going to be hidden from user). but when I trying submit the form the this text box value is not getting saved, saving the old one but not changed one.But if I directly change the value of the text box ...

2
Q: call time pass by reference seems to work in PHP5.5?

neubertQuoting http://php.net/manual/en/language.references.pass.php "as of PHP 5.4.0, call-time pass-by-reference was removed, so using it will raise a fatal error". And yet it seems to work with the following code on PHP 5.5?: http://sandbox.onlinephpfunctions.com/code/a50ab60759fcac7b1dfebfed1e75584...

0
Q: How to delete the internal link tag from the website url after refreshing the webpage

user2829113In my website I use internal links, but I want to delete the internal link tag from the url. For example my link is example.com/help.htm#top, how do you delete/remove the #top after reloading the webpage? I hop you can answer this question without redirecting the link.

0
Q: Insert Error: Table 'findanau_naukri.recruiters' doesn't exist

user3127647im facing an error when my users submit they face error= Insert Error: Table 'findanau_naukri.recruiters' doesn't exist . Given below is the code of the form code. your help would would be highly appreciated. Thanks in advance <?php session_start();enter code here include('config.php'); if(!is...

0
Q: PHP JSON decoding - accessing object

user3127646I'm trying to extract a value from a JSON string that's in my program. The output of var_dump($obj); is this: object(stdClass)#1 (1) { ["BTC"]=> object(stdClass)#2 (2) { ["value"]=> float(403.645) ["currency"]=> string(3) "GBP" } } What I want to access is the value (cur...

0
Q: PHP File modifies log file, but nothing is written?

user3127665<?php define('LOG','testfolder/test.html'); $fp = fopen(LOG, 'a+'); fwrite($fp, $_ENV['REDIRECT_REMOTE_USER'] . "\n"); fclose($fp); ?> While using this code the test.html gets modified at the right times, but nothing is written but blank space. What's the coding error here? PHP file has 644 p...

0
Q: Getting results only for today's date

user3125900I want to get some of the entries from my db which has dates of only today, here is my working code which gets all of the data; $result = mysql_query("SELECT *FROM products") or die(mysql_error()); // check for empty result if (mysql_num_rows($result) > 0) { // looping through all results // p...

0
Q: How to return all results where MySQL record contains substring?

ElitisIf, for example, I searched for #pumpkins in a text field, all records containing #pumpkins should be returned. I'm not sure what MySQL function(s) to use for this. The objective is to replicate the Twitter search functionality, where users can search for any hashtag, and all posts (tweets) conta...

0
Q: Pagination not working with CodeIgniter [SOLVED]

dabadabaI am trying to make pagination with CodeIgniter but it doesn't work properly. This is the following issues that I have encountered: Let's say that I have a table in my DB with the following content that has to be displayed with the pagination: Post 1 Post 2 Post 3 Post 4 Post 5 Setting con...

0
Q: How to call variable (Object)'s method in expression syntax? [Twig Templating]

dev.mrajHow to call a variable's method in expression syntax in twig tempting system. see the example below {{ myObj.someMethod() }} {# this print the output of this method #} i don't want above code because its printing output of this method. but i want this {% myObj.someMethod() %} but its is giv...

0
Q: Homebrew "Brew Doctor" Warning: "config"

user1391271I am a bit of a newb, but i removed this from my ~/.bash_profile. Can't seem to figure out how else to remedy this problem. If someone could point me in the right direction that would be great. Warning: "config" scripts exist outside your system or Homebrew directories. ./configure scripts ofte...

0
Q: Removing debugging messages in PHP

user1765876I have couple of mysql queries in PHP and at the end of each query I did this mysql_query(STRING) or die(mysql_error()); This is fine as far as I am in DEV environment but I dont want production users to see these errors. Any good Idea to remove this messages by just setting ON OFF.

0
Q: Fetching data from Xampp to Android

HJMI'm new to networking and have very limited knowledge in it, so any help is greatly appreciated. I'm trying to create an Android app that either pushes data to a server OR pull data from it. The app will only do 1 of the 2 things depending on which mode its in. The intent here is to do basic st...

0
Q: XMLHttpRequest ResponseText is undefiend

AstroPig7I’m having a devil of a time between XHTML, PHP, and JavaScript. My intent is to have a user select an option from a form menu and have that update the innerHTML of a DIV with the result of passing the menu option to a separate PHP page. For instance, choosing "Cat" would call "blah.php?species=c...

0
Q: Getting unnecessary get requests from using ajax jquery?

CodeManiakAfter you click several ajaxAnchors on my webpage I get extra ajax calls. It almost seems as if the amount of ajax requests doubles each time you click an ajaxAnchor. I have tested it with multiple anchors that grab different content and the problem still occurs. I have isolate the issue to be in...

0
Q: how to check before upload CSV file to Mysql db if user has selected one

tao_canI have simple script that upload CSV files to Mysql data base. It work ok but if user miss select some csv file to upload and push to UPLOAD button, scripts try to insert tousend of 0 lines in the data base. I wounder if there is a way to check befoere upload file if user has allready selected ...

0
Q: Mysql: How to avoid: "Using index; Using temporary; Using filesort"

SmithQuery: SELECT min(a.post_msg_id) as post_msg_id, a.topic_id, a.attach_id, a.physical_filename, a.real_filename, p.forum_id FROM ' . ATTACHMENTS_TABLE . ' a, ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t WHERE (mimetype = "image/jpeg") AND in_message = 0 AND ' . $db->sql_in_set('p.topic_i...

0
Q: Progress bar using PHP Session and Ajax

Abdullah FahimI want to implement a progress bar. The idea is simple, I have file2.php where I set $_SESSION['progress'] value in each loop. While file2 is working in background, I want to return the $_SESSION['progress'] value in main thread using below functions. But the problem is, it is not working. Whil...

-1
Q: php javascript check input value

Farkas ZoltánI have a php array with lot of goods. The goods have name, type and a minimum order value. The user can select items from dropdown menu and write order value to an input box. I want to check the form with JS or Jquery when user write the order value. if min order value > entered value --> Warni...

0
Q: Combining Forms, JSON, AJAX, PHP and google graphs

user3035480I'm very new to JScript, Ajax and Google Graphs. But I'm trying to combine everything, I've coded them all separately and got them working but having a lot of issues bringing it all together. Google Graph Part of my code(Form does nothing here): <html> <head> <title>Dash...

0
Q: How to filter product list by category and brand in Magento soap api

SheagorathI'm using Magento soap API for a mobile app and in my app I need to get products which are under a certain category and are also filtered by brand. it is possible to get the products assigned to a category by calling catalog_category.assignedProducts but this method doesn't allow filtering by ot...

-1
Q: How to synchronize data in MySQL server with Android app?

user2418202I want to implement a communication from my website to my Android app. So if I send a message from my website, it should immediately show up on my phone. I am working on this website using PHP and MySQL, so that this message can be sent to my web server. However, if I want to have this message...

1
Q: submit form to different plugin

Justin YoungI have a users plugin and a leads plugin. I have a leads form under my "sign in" form incase people aren't already signed up. The problem is when I: $this->Form->create('Leads.Lead', array('plugin'=>'leads','controller'=>'leads','action' => 'add') The url of the form submission is /users/lea...

0
Q: PHP OOP database connect

user2992577I have just started learning the concept of Object oriented programming and I've written this class with functions. It works fine, but I'm interesting in if I do it correctly... Here is my code: class Database{ const DB_HOSTNAME = 'localhost'; const DB_USERNAME = 'root'; const DB_...

0
Q: PHP problems sending mail with swiftmailer

RobertPSo I have some problems with sending mails with mailing library for PHP - swiftmailer. I want to send some mails with pdf attachments, I have learned some bacis for swiftmailer with http://swiftmailer.org/pdf/Swiftmailer.pdf but I get few errors and I don't know how to resolve them. My php code:

0
Q: dropbox php sdk error Missing CSRF token in session

user2373881I am using dropbox php sdk form my app i am trying to access core API using following code function getWebAuth() { $appInfo = dbx\AppInfo::loadFromJsonFile("../dropbox.json"); $clientIdentifier = "My-demo-app/1.0"; $redirectUri = "http://localhost/demo.app/public/dropbox-finish-oauth"; $csrfTok...

 
7:26 PM
0
Q: How to include product images in Magento Api's product list method result

SheagorathI want to minimize the number of Api calls for a mobile application which connects to Magento based shop to display products. right now we have to call catalog_product_attribute_media.list method for each product in order to get image Urls and it really slows down the app. I found out in this an...

0
Q: How to stop code and put another code if button is submit in the same file

NbaerI have a foreach loop and I want to execute always except when a button clicked and then echo something else in the spot that foreach was...I have tried these but none of them work right! if (!isset($_POST['myBtn'])) { foreach($postarray as $p){ echo $p->postmarkup(); ...

0
Q: Wordpress Social Locker locks content even if user already liked page

AldawarI installed OnePress Social Blocker plugin to my Wordpress website. I set up everything correctly according to documentation. When user likes Facebook page, content is shown. But right after I refresh my page content is blocked again and user must click on Unlike button and then click again on ...

0
Q: Java IllegalArgumentException Illegal character in

user3097794Currently Im using this code and Its fine when i use http://stackoverflow.com/ now When I change it to http://www.sitetest.com/query.php?request=how are you My app crush. It says Caused by: java.lang.IllegalArgumentException: Illegal character in query at index 46: http://www.sitetest.com/que...

0
Q: CodeIgniter: Appropriate place to put reusable functions with database calls

daprezjerI'm new to CodeIgniter but want to perform best practices from the start. I have a simple authorization call that needs to be able to be called from several controllers. Hence I'm thinking it should be placed in either a library or a helper function. The call would take the user's id and a req...

0
Q: Calling a variable from another page in php

Hasan Sait ArslanI have such a loop: for($i=0;$i<count($dersler);$i++) { echo $dersler[$i].', '; } I want to run this loop on another page by capturing $dersler variable from another page. How can I manage it? Thank you.

0
Q: Echo not displaying, or adding ID, but shows up in database

Helena J.I set up a PHP database that worked perfectly on my local server. Then, when I went to put it online through my hosting site, Site5, I was getting these kinds of errors: "Cannot modify header information – headers already sent by...". So I changed the PHP file on Site5 to have output buffering t...

0
Q: Calculate elapsed time in php from time() function

Vlad GincherIf a user make error in the logging, and he changed his password in the last months, I want that it will notify him about it, like in Google. When the user changes his password, his old password enters the database in case he forgot his password (it asks him when was the last time he entered my w...

0
Q: php function json_encode returns repeated data when encoding an object

gm.first of all, I'm not an experienced PHP developer so probably my problem is a dumb mistake. I'm developing a simple webserver which provides data to an Android application, it queries an MySQL db and retrieves the JSON objects/arrays, but my problem is that when I try to retrieve a single objec...

0
Q: PHP Loop: Every 4 Iterations Starting From the 2nd

pealo86I have an array that can have any number of items inside it, and I need to grab the values from them at a certain pattern. It's quite hard to explain my exact problem, but here is the kind of pattern I need to grab the values: No Yes No No No Yes No No No Yes No No I have the following forea...

1
Q: Wordpress fake post with fake postmeta.

Yervand KhalapyanSeveral days ago I have made a post "How to make a fake WordPress post for each user separately" I managed to make a Fake post by using this resource. Everithing was good unless I tried to do the same with custom field option. The theme I'm using has a separate custom field in wp_postmeta which ...

0
Q: Remove certain string from URL

charliejsfordI have a URL that looks like: domain.com/page.php?opt1=yes&opt2=maybe&opt3=no how would i be able to create a link (a href) with the current URL but just change one of the options for example, if i want to change opt2 to be 'yes' but keep the others as they are without doing: <a href="domain...

0
Q: couchdb curl url view in array?

EricSay I have a bunch of documents that have tags like : { "_id" : "1", "title" : "some title", "tags" : ["tag1", "tag2", "tag3"] } I have a view which returns tags by document : function(doc){ if(doc.tags){ emit(doc.tags, null); } } How do i do to only return a document that ...

0
Q: Autosuggest Ajax not linking when there is content behind list

VaMooseSo I have a working ajax/jquery dropdown/list that populates results from the database depending on the users input. Basically is populates a <li> for every resu1lt in the database, and makes it into a link that can then go to that persons profile page. I have tested the code and it works perfe...

0
Q: Slim Framework autoinclude ORM Models

Sterling DuchessI want to automatically include all of my custom controllers and models(Eloquent) with my application so i can have access to them from any part of my application. That's why in my Slim Frameworks index file I have these two foreach loops: // Include all controllers foreach(glob("controller...

0
Q: Get a php value in a class in html

user2162669I am trying to get a value from php into an input box like this: <input type="text" name="IPs" class="Input" value="<?php echo $ips; ?>" readonly> When i look at the page the textbox is empty. I think it may be because i have $ips = $ips . "\n" . $ip; in a php function called public function r...

0
Q: Class method signatures don't match?

Paul TomblinI wrote some code to use a PHP library (for a product called Checkfront, but that's not important). The library defines a class that has an abstract method: abstract protected function store($data); and in my code I subclass it as final protected function store($data=array()) { In my standa...

0
Q: How to get id from the database in the URL by submitting form?

user3116035The problem is that i want to get unique id from the database n want to make a url like this localhost/tes/index.php?id=12 or whatever but m getting this instead m getting url like this localhost/tes/index.php?id= can any one help me please its my second post but i can't understand what should i ...

0
Q: Cant update product in Magento

user1857818I am having some problems when i try and update a product. Lets say i want to add product to a new category, when i click save it just keeps loading, nothing happens. Problems started when i enabled flat_catalog, when i tried to build table with "Reindex all", server could not handle sql threads...

 
00:00 - 20:0020:00 - 00:00

« first day (306 days earlier)      last day (4 days later) »