« first day (222 days earlier)      last day (88 days later) » 
00:00 - 20:0020:00 - 00:00

12:08 AM
0
Q: php weird simple explode returning multidimensional array

LeabdallaMy method (laravel) to get recursive list of parent id's public function getRecursiveParentsIds(){ if($this->getAttribute('parent_category_id') == ''){ return ""; } $parents = ""; $parent_obj = PostCategory::findOrFail($this->getAttribute('parent_category_id')); if($parent_obj){...

0
Q: Having trouble configuring the swiftmailer files downloaded from swiftmailer.org

Adeleke AkinadeHello and thanks in advance for anyone who helps me with this problem. This is 100% a last resort, as I am very stubborn and have a DIY attitude, but have searched as much as possible for an solution to my problem. I am trying to configure the swiftmailer files downloaded from swiftmailer.org. ...

0
Q: Wordpress site - Migrating to a new domain for testing

AnujI have a live Wordpress site which is hosted on www.abc.com. I want to do some major changes on the website. So what I plan to do is, replicate the site to a separate domain www.xyz.com [by copying all the files and folders along with the database], make the changes in this test domain and then c...

0
Q: WordPress Toggle excerpt and content using jQuery

user2480082I found code on here that partially solved my problem for showing/hiding the main content and displaying an excerpt on a main WordPress page. When i click the read more button the excerpt suddenly disappears and the main content doesn't display. JQuery isn't my strongest point so any help is gre...

0
Q: how send variable in other form is this code is correct?

Allan Paul Mamangun Rosero$("#delete").click(function() { deleterecord(); }); function deleterecord(){ var id = $("#iduser").val(); alert("aw"+id); var id = $('#iduser').attr(); e.preventDefault(); pressed = "delete" $.ajax({ type: "post", url: "IngSave.php", data: "&idshit="+ id, dat...

0
Q: CSS Center alignment

mrkirby153I have a sidebar and a main content window, however, centered text in the main content window does not appear in the center of the screen. Instead, it's being off-centered by the sidebar. How would I fix that? CSS @charset "utf-8"; #header-wrapper { padding: 3px; height: auto; width...

 
12:32 AM
0
Q: foreach with two rules form POST php

Michael tawfeaki try to make two rules with foreach php with this code foreach ( $_POST['id'] as $key => $value; && $_POST['cat'] as $kkey => $vvalue; ) { if($value=='11'){ $id=$key; $DB = new DB; $SQL_Edit ="update avas set sended='10' "; $SQL_Edit = $SQL_Edit." where id='$id' "; $result2222 = $DB->

 
12:44 AM
-2
Q: PHP Mailer to Sparm

Don KelHow can i send a message from my PHP mailer to inbox directly no matter the Header, the subject or the content of the message. I have a VPS Hosting that i host the site for the Mailer. I have made so many research on this, i found out that some people said its, server while other say is script....

0
Q: Stop caching for PHP 5.5.3 in MAMP

Daron SpenceSo I just got a new Macbook and was setting up my dev environment. Installed MAMP, check preferances for 5.5.3, they were enabled. Run a test file on the new server. It renders fine. Now I add some code. <?php echo 'Hello World'; ?> CMD+S to save. Switch to Chrome and CMD+R to refresh. Nothing...

-1
Q: Log in script load users name

user2827404ive just built a php and mysql log in script which forwards to a members area. I now want the members name that loged in to be displayed, somthing like welcome Stephen for example. what would be the best way to do this?

0
Q: Problems with an array in PHP

aserwinI am trying to convert an array (of arrays?) to a simple unordered list. I came up with one solution, but it was very bulky, and I am positive there is a much simpler way to to do it. This is the array Array ( [0] => Array ( [projects_id] => 204 [City] => Carrollton ) [1] => Array ( [...

0
Q: Update MySQL database with pull-down options on website

Zach CI have a MySQL database that keeps user information. Periodically I will need to update some of the user data without the hassle of going into the database itself. I have created an Admin.php page that displays the user data and the information that I will need to update. The main data that I nee...

0
Q: Encryption routine adds %3D to the end of ouput

MadScientistI have an encryption that I use for some minor security but I am noticing that the out always seems to have %3D at the end of the encrypted string and I am not sure why. private static function encrypt($str, $key) { $result = null; for ($i = 0; $i < strlen($str); $i++) { $char = ...

0
Q: jQuery issues converting PHP site to Wordpress

APAD1I am attempting to convert a PHP website to Wordpress and running into some issues with the Javascript/jQuery. The page is very script heavy and has a slider, parallax background and jQuery menu on the homepage. The page works exactly as it should in PHP, but when I convert it to Wordpress none o...

 
1:08 AM
0
Q: Laravel 4: ajax not routing to controller action

SamuraisoulificationI have a RESTful controller, that I'm trying to get my ajax to get to, and I keep getting an internal sever error 500, controller method not found. In the routes.php I have: Route::controller('friends', 'FriendController'); In the controller I have: class FriendController extends Controller{...

0
Q: How to clean up this code?

AnthonySo I have this code... if ($error == '1'){ echo '<div class="error_message">';} if(strlen($display)<4) { echo "Display name is too short. <br>"; $error = '1'; } if ($email == '') { echo "You did not put a valid email adress. We require this to verify your account. <br>"; $error = '1'; } if(my...

0
Q: How to make str_getcsv work with double enclosure?

xpedobearxa,b,c(1,2,3),d,e,f should become: a b c(1,2,3) d e f But str_get_csv() only accepts one character as enclosure, and I need two: ( and ) Is there any way around this?

 
1:25 AM
0
Q: Laravel 4: Pass validation messages obtained from repository to controller

GravyLearning about Ioc and Repositories and stuck at last hurdle! Assuming I am validating input, how do I pass back messages from the Validator within the repository to the controller? UserRepository interface UserRepository { public function all(); public function create($input); pub...

 
 
4 hours later…
5:31 AM
0
Q: Determining the maximum common value form a single row in MySQL

MKMI have a table like this: -----+--------+--------+-----+-----+-----+-----+-----+-----+-----+-----+------------ r_id | r_user| module | q_1 | q_2 | q_3 | q_4 | q_5 | q_6 | q_7 | q_8 | q_9 -----+--------+--------+-----+-----+-----+-----+-----+-----+-----+-----+------------ 1 | test | 1 ...

0
Q: Issue with PDO select query: unknown error

Ch HrI'm trying to get comfortable with PDO but can't get this to work. Below is a script for a basic search box: <?php $sth= new connection(); if (isset($_GET['search'])) { $search_query = $_GET['search']; $search_query = htmlentities($search_query); $result=$sth->con->prepare("SELECT ...

0
Q: mySQL joined tables no duplicates

user2827532I have two tables: One table contains poetry submitted by members. The other is the member's table. Both tables contain The Member's ID (MID and SubMID). I want to display the last 15 poems that have been updated. However, I want to display ONLY one work for any one author. This works but it...

0
Q: PHP modular cloud application development framework

NaoshadI would like to develop a PHP based web application for cloud where I am thinking if I can have the feature like installing new modules/plugins/themes to add functionality or manage templates to the core application. So, there will be a core which will handle the basic functionality and the modul...

0
Q: JavaScript doesn't work with php echo

user2549153I'm having a problem with php javaScript echo. I wanna fire a javaScript functions for buttons which are dynamically created by using echo. When i test it without echo, functions are using properly. But when I create it using echo, it doesn't work. here is the echo in pages.php $cont.='<d...

0
Q: The stock was out of limit, still insert into order table

ayeen$prodqty=mysql_query("SELECT quan FROM pro_list WHERE auto_id=$pid"); //get the current product quantity if (mysql_num_rows($prodqty)!=0) { $row = mysql_fetch_array($prodqty); $productqty = $row['quan']; } $nqty= $productqty-$q; //current product quantity minus order quantity to ...

0
Q: Moving from cURL Soap to Soap Client in PHP

M CharlesI'm trying to use PHP Soap but am really struggling. I can build and send the following via cURL but have no idea how to build using SoapClient. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:auc="http://xxxxxxx.com/APOnline" xmlns:get="http://xxxxxxx.com/APOn...

-4
Q: How can we make the users to post their feedback or questions through HTML input text field?

user2827583I have created a new site and added an html text field for user input just like you have added a textbox in your site to post questions. What is the code for posting comments/questions and store it permanently on your site?

0
Q: how can I connect mysql db which is not saved in default mysql db dir?

mingfish_004how can I connect mysql db which is not saved in default mysql db dir? I installed a php mysql environment. the databases are saved in 'd:\mysql\database\', now I want to add extra mysql databases : 'd:\hello\database', i want to use php connect 'd:\hello\database\a.*' (db a); how to do in ph...

0
Q: how do i display dynamic data from database to edit and update it back into database?

leoarceon a form that is to be saved to a MySQL database there are regular fields and dynamic fields. i have these dynamic fields saving to database and i can recall this dynamic data to be viewed later on. the issue i'm having is editing the data and saving back to the database. if i wanted to cheap...

1
Q: Mathematical operation of CHARACTER [not numeric] in php

MKMis there any way to sum/substrate character in php? For example if $var1 = 'a'; $var2 = 'b'; $var3 = 'a'; $calculation = $var1 - $var2 + $var3; echo $calculation; I want the output as 2a-b Just like we did in high school algebra?

0
Q: passing class method's argument via ajax

Rameez ShahA generic add record function in database.inc.php public function insert($data, $table) { $columns = ""; $values = ""; foreach ($data as $column =>$value) { $columns .= ($columns == "") ? "" : ", "; $columns .= $column; $values .= ($...

0
Q: Uncaught TypeError: Object [object Object] has no method 'cycle' in chrome

YeahMKDSo I have a website that is done in PHP. I have to include a simple slider in the website with this code. http://jsfiddle.net/Wb3se/ $('#slides').cycle({ fx: 'scrollLeft' }); Very very simple code. Im getting that error which from what I understand usually means that the browser does not...

-2
Q: My insert action in my php is giving me an error when I test it

Riong RiongIm making a registration form and I've been able to get far as where the applicants information to be inserted into my database table. I get an error like Parse error: syntax error, unexpected T_VARIABLE in /home/a4048029/public_html/regprocess.php on line 11 Here's my code: <?php include"config...

0
Q: How to allow bolding, underlining and italics in textarea

AnthonyI'm currently using nl2br() when reading text from a database. Unfortunately, if I wrap some text within with or the text doesn't bold it and shows the code still. How do I allow for some html to go through and be rendered correctly? I'm currently getting this outputted from the database... <b>

0
Q: How can i select <select> <option> when pass an variable in the query string

mossawirsuppose i have a select HTML element on the page. how can i select the option after passing a query string. such as computer.php?type=super2 it should select the super2 option in the select <select> <option value="Super">Super</option> <option value="Super2">Super2</option> <option value="Su...

0
Q: PHP form with MYSQL query runs when page loads and not when sumbit button is hit

Stephen CoombeHere is the code i know its messy and i am learning all over again, my issues is when i go to the page the query runs right away i have used some suggestions from the site but none have worked so far, I am just trying to get the form data entered to insert into my DB table. <?php require_once('...

0
Q: Compare URLs using PHP

Abishek R SrikaanthI have the following 3 urls http://www.yahoo.co.uk and http://yahoo.co.uk, the difference being that the later doesn't have www in it. When using parse_url on both these url's, the output is the following. {"scheme":"http","host":"www.yahoo.co.uk"} {"scheme":"http","host":"yahoo.co.uk"} Both ...

0
Q: selecting data and specific value from two different values

user2656724i don't know what's wrong with my code, can anybody help me? i have two tables rsales and salessumarry, and let say i have this ff value for my tables. data from salessumarry receipt | date | mode_payment | register_mode | 0000012 |09/28/2013 | cash | sales | date from rs...

0
Q: mysql month wise report

user2757801I need an output like this: Month -->| Pre_Mnth2 | Pre_Mnth1 | current_Month_ Name Product A | 3387 | 87985 | 2338 Product B | 6386 | 67983 | 6374 Product C | 3880 | 76988 | 9378 ... All the required data is in single table only. Column looks like this: id | companycode | merchantcode| pdtn...

0
Q: Converting UTC to a different time zone in php

user1266343I'm using the below method to convert the UTC time to an other time zone. But the below method seems to returning back the UTC time. Will any of you be kind enough to point out whats wrong in the method I'm using? static function formatDateMerchantTimeZone($t, $tz) { if (isset($t)) { ...

-6
Q: Fatal error: Uncaught exception 'Exception' with message 'undefined param `dir_root`'

user2827683 Fatal error: Uncaught exception 'Exception' with message 'undefined param dir_root' in /home/www/skadate.sydneyit.info/install/index.php:129 Stack trace: #0 /home/www/skadate.sydneyit.info/install/index.php(839): SkaDate7Install_SiteRoots->process(Array) #1 /home/www/skadate.sydneyit.info/inst...

0
Q: Formatting PHP in HTML5 Player Src

NelsonI'm working on a vine script that will display a set of videos that will be accessible by another script using an IFrame. So on my script, someone will submit a vine video. it will be processed as just the id https://vine.co/v/hrpE6mraKdd As seen on the end hrpE6mraKddis what will be emitte...

0
Q: Get image blob data to an android appication with json

ShashikaI have to show some data in my android application from a external database including an image. I have successfully got text data from the database. Here is my php code. Now I need to get blob data. How can I achieve this..? $id=$_POST['ID']; $db_server = mysql_connect($hostname,$username,$pass...

0
Q: Determining MediaWiki version from the database only

Theodore R. SmithOk, so. My MediaWiki migration from a server in the U.S. to a server in Germany backfired, horribly, and I ended up with ONLY the database. The ENTIRE mediawiki installation was irrevocably lost. I do NOT remember what version of MediaWiki the site was running, although it was semi-modern (somet...

0
Q: PHP get button ID

WaoIs it possible to get the button ID? I have accumulated forms and I wanted to get the button clicked using the unique ID. The following scripts I used: echo("<table><tr> <td id=\"i\"><img src='presentations/uploaded_files/$name.png' alt='animal' width='50px' height='50px'/></td> <td id=\...

0
Q: How to hide file from list in directory

user2827696I have a script file. that list files and folder in a directory.. I want to hide certain files and folder. How do I do that? <?php if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if (($file != ".") && ($file != "..")) { ...

-1
Q: Cake PHP tree tutorial category list doesn't output properly

TaoistI'm doing this tutorial and the output is different than what it says it should be. It says I should get a nice nested bullet point list of categories. Instead I get this: /app/Controller/CategoriesController.php (line 7) array( (int) 1 => 'My Categories', (int) 2 => '&nbsp;&nbsp;&nbsp;...

0
Q: hybridauth adds weird characters when authenticating with facebook

BluemagicaI am using hybridauth to implement social login. But when logging in with facebook, it for some reason adds weird characters at the end(#_=_). Is there a way to remove this? They are anooying but the main problem is, I have to redirect the user to the user's page after login and after the header ...

0
Q: Quick update with laravel 4 eloquent and javascript

Chachoo Aguirreim making a laravel 4 app where all the users can add a new movie. The movies are stored in a database with normal values like: -Name -Year -rating -votes etc... And to avoid the spam at adding movies i made a confirmed boolean field, each time a user adds a movie the confirmed value is false...

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

David ZIPI have written a small bit of code for login page. Code is as follows: if($user == "" || $pass == "") { echo "Please fill in all the information!"; } //Check to see if the username AND password MATCHES the username AND password in the DB else { $query = mysqli_query($con,"SELECT ...

0
Q: htaccess rewrite condition not working

Sumit BijvaniI am working on URL of my website. I have just rewrite the URL From http://www.website.com/index.php?url=some-text to http://www.website.com/some-text For this I'm using following code of .htaccess Options +SymLinksIfOwnerMatch RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAM...

0
Q: PHP PDO why select only first row in Database table?

asdasd asdaI am PDO newbie, and i can't figure why i can select only first row in Table on database. This is my DataBase TABLE : Column Type Null Default Comments id int(11) No cred varchar(20) No tok char(40) No ptok char(40) No ...

0
Q: Having Issues Invoking Actions Of Controller On Button Click

Maxxi'm having a problem calling an action in a controller upon button click. So the controller is generated by Gii. All of its actions are the default ones generated by Gii, except for the actionCreate(). Here is the relevant code :: class ProductsController extends Controller { public function a...

0
Q: CSS styling being ignored by PHP document

William HaywardI'm currently trying to work some CSS into my PHP based website, but it's not recognizing any of my styles. I've tried linking to an external .css files with no luck, as well as using the tag. For reference, here is the entire code for a web page "Test.php" <!DOCTYPE html PUBLIC "-//W3C//DTD X...

0
Q: Error uploading file, Android + PHP

PawanI am using PHP 5.3 and Android 2.2 for development I am attempting to upload multiple files from my android client to a server. I have a PHP upload script which works fine and uploads a file correctly when i send data through an HTML file on the same server but fails when i send it through my And...

0
Q: using foundation section's with php

user2055697I am using the sections feature in the Foundation framework, "http://foundation.zurb.com/docs/components/section.html#panel2". My website is for a soccer club where I have a bunch of teams in a database table named "team". The team table has the following columns: team_id,team_name. I also hav...

-1
Q: PHP .htaccess URL Rewriting

ManishBasically I'm a .net developer so I have no clue regarding this. I have purchased a php script[site] and configured it over http://spicyindia.net/ eveything works fine when I append php to the file extension. for eg works fine http://spicyindia.net/all.php but http://spicyindia.net/...

0
Q: Database-design dilemma

Mike Lee TorrizI have a question about my current project. It's an online registry system for a certain organization. I have this problem on how I can determine the attendance of members in a certain 'conference'. I have a table in my database named 'members' which contains all information about their regist...

0
Q: shopping cart is empty first time & second time working fine

user2827714I am facing problem with shopping cart. Prpblem: when I click on addtocart first time it is showing "There are no item in your cart.Then If click on continue shopping it is going to home page.second time when i click on addtocart it is adding an item to cart. This problem is repeating fro every...

0
Q: Reading data from mysql table

user2625007In my database table, I have a lot of questions ,each having a category . Say, there are 100 questions and some number of categories which I don't know . I want to know the number and the names of the categories. Please tell the way to do it in php.

0
Q: Find, trim and update a column in mysql

Jerry JonesI have a table containing Id and imgUrl. Previously, we have a specific url like "http://www.abc.com/images/folder1/12345.jpg" and "http://www.abc.com/images/folder2/12345.jpg". Now we want to remove the url part("http://www.abc.com/images/folder1/" and "http://www.abc.com/images/folder2/") in a...

 
6:13 AM
0
Q: Online Exam conduct in my website in php

user2827769I want to add a page in my website by which I want conduct online exams. I want that my page is activate for 3 hours only. After 3 hours the page will submit itself as happens in online exams. Can any one give me any script how to make my page time constraint?

0
Q: javascript function call inside php function

Mar FarI have a form which has 2 buttons: 'Submit' and 'Save'. Upon the submission of the form two kind of separate function run, depending on the button pressed. What I want to do is to call a function to check for empty fields when submit button is pressed. Part of my code: function valuecheck(...

0
Q: Changing PHP parameters per request via JavaScript/jQuery?

Skylar WhiteO.K. so I wrote a few scripts and I want some extra parameters but can't figure out how to go about doing this. I wrote a class that handles one request: <?php class Bet { private $Client; private $Secret; private $Balance; public function __construct() { $this->Clien...

0
Q: Extract Json php MultilineString coordinates from Mysql

Deon Du ToitHow do I insert and extract the following from a MySQL database using php. I have tried 'Multiploygon, Multilinestring, GeometryCollection' but cannot get the correct output as below. 1) JSON file to insert { "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "GID":...

0
Q: PHP, JSON, MySQL and Android. Are there any easy scripts that can do it?

CynthiaDDurazoHello there StackOverFlow members! I'm looking for a php script that can communicate with MySQL and android apps (through JSON). I'm trying to develop an android app that can read JSON data that was pulled from MySQL, and post data through JSON to MySQL. I tried looking all over the internet f...

 
6:43 AM
0
Q: Matching multiple words in mysql query using "LIKE"

user1477731My application allows searching of articles. So when a user enters the string "articlex" the query works & results are show but when multiple words are entered "articlex articley" the query shows no results. Cuurently I'm using this query $querySub = 'SELECT * FROM table WHERE (col1 LIKE "%'.$...

0
Q: Php header redirect contains additional characters from previous url

BluemagicaI have an url like (result of authenticating via facebook with hybridauth): http://localhost/work/auth/validate.php?service=Facebook#_=_ Within it I am trying to redirect to: header("location:../user/".$_SESSION['user']['profile_url_name']); Where $_SESSION['user']['profile_url_name'] = 'Te...

0
Q: magento extension deleting local folder

SKVI have created a magento extension which works fine also install correctly from downloader or magento connect. One problem though when i uninstall it from magento downloader it delete app/code/local folder completely. other folder delete correctly. while creating extension i have used select f...

 
7:01 AM
0
Q: analyzse PHP code function calling

wervaI'm writing PHP codes but unlike Visual Studio, you cannot ask PHP to tell you in what locations is a function called. suppose I have code in CodeIgniter: controller.php class Ccc: CI_Controller { ... function myf1() { $this->load->model('mmm'); $this->mmm->funcB(); } } in model.php class ...

0
Q: error while sending data from java code to PHP in localhost using HTTPPost request

user2533604This is my java code to send data through HTTPPost request: import java.io.*; import java.net.*; class HttpURLConnectionEx{ public static void main(String[] args) throws Exception{ URL targetURL = new URL("http://localhost/JAVA/post.php"); HttpURLConnection conn =(HttpURLConnecti...

2
Q: php DateTime object does not give me errors for an invalid date input?

lauthiamkokWhy php DateTime object does not give me errors for an invalid date input? For instance, $date_test = '13-10-31'; $datetime = new DateTime(); $date = $datetime->createFromFormat('Y-m-d', $date_test); $date_errors = $datetime->getLastErrors(); print_r($date_errors); result, Array ( [warni...

0
Q: log4php -> LoggerLayoutHtml and LoggerAppenderFile combination not working

Alpha6I have used LoggerAppenderFile and LoggerLayoutSimple successfully. But I am not able to figure out why LoggerAppenderFile and LoggerLayoutHtml combination is not working. I am using php configuration style. I m running the code on a hosting service and have a domain name. So problem is that when...

-1
Q: contact form wrong echo

SunSkyform <form id="contact" action="" method="post"> <input id="name" type="text" name="name" width="250" size="35" placeholder="Your name" required/> <br><br> <input id="email" type="text" name="email" width="250" size="35" placeholder="Your mail" required/> <br><br> <textarea ...

0
Q: Pass PDO connection objects by reference?

jduncanatorI recently began restructuring some of my "copy-paste" database classes I use for projects. I was working over the login class and came across an interesting function. My Login class has a function that looks like this: function &db_connect() { require_once('mysql.php'); $db = new DB();...

0
Q: Dynamic table with 5 columns in php with mysql

Prashant Gauravhow to create dynamic table with 5 columns in php that can take data from mysql ... The columns should have. check-box, photo, name, gender and country..

0
Q: Nginx Laravel and Angularjs Configuration

user1748902I'm new to Nginx, Laravel and AngularJS and was wondering how to get everything setup together to have a proper site configuration. I've figured out how to get Nginx to serve the Laravel framework correctly, and gotten it to serve the angular-seed app correctly, each separately. What does a pro...

0
Q: How to retrieve records from mysql table using select option ONCHANGE event

SameerI have one table like mst_city ID City Country 1 Pune India 2 london UK 3 California US 4 Dubai UAE PHP <select name="city_select"> <?php $result = mysql_query("SELECT * FROM `mst_city`"); while($row = mysql_fetch_array($result)) { ...

0
Q: getting an unexpected behavior when calling a php function from javascript

Tech Supporti'm using ajax to call a php function from javascript, but i got confused with the results, i have this on my php functions file : <?php if(isset($_GET['function']) && isset($_GET['value']) ){ if($_GET['function'] == "hey"){ echo user_exists($_GET['value']) ? "true": "false"; } }...

0
Q: highlight text and put a bold tag between them at a click of a button

Chinny EnechukwuPlease I want to highlight a text and click a bold button to put a bold tag between them, I don't want to use cms. For example Chinny in the house If I should highlight the text "house" and click a bold button, it should do like this house Thank you, please help me

0
Q: XAMPP Portable showing undefined constant warnings on file included

Mr. AlienI am using XAMPP Portable on my external hard disk, when I accessed my project files, PHP throws me undefined constant error. The constants are declared inside file called config.php. This works if I run using WAMP, but not on portable XAMPP. config.php is included inside connection.php using re...

0
Q: JS array of literals to PHP

jimaIn JS, I have the following: languages [ Object language: "da" listening: "A1" , Object language: "en" listening: "B2" ] What I end up with, in PHP, after an $.ajax call is: array(4) { [0]=> array(1) { ["language"]=> string(2) "da" } [1]=> array(1) { ["liste...

0
Q: organize display of data from table

user2656724i have two tables rsales and salessumarry and i have this ff value. value from salessumarry date | receipt | 09/29/2103 | 112233 | values from rsales name | category | receipt | 33uf | capacitor | 112233 | ic | ic22 | 112233 | THE EXPECTED OUTPU...

0
Q: Syntax error in php page

AbhimanuI am new here and don't know anything about asking questions on stackoverflow. So, if there is any mistake please i apologize for that. I was making a search box and trying pagination but could not successful so i removed that code. After removing that code i've got an sytex error in my page. He...

0
Q: embed images from posted html to send in email using swiftmailer

DelightedD0DI have a form on page A that posts to page B One of the fields on page a is a textarea in which the user pastes an html table. The table contains text and images. Page B is a php page that should create and send an html email from the contents of the post. Im using swiftmailer to create and s...

 
8:02 AM
-1
Q: POST parameters to php application

tony9099I am looking for a small app / add on / software that allows me to post parameters to php (so that I can test directly). I currently use POSTER add on firefox, but it appears a beginner project that lacks lots of features. What do guys use ?

0
Q: How to give pictures same contrast and color balance with PHP?

Peter WesterlundI want a PHP function to set the same color balance and contrast to pictures. So they look like been taken with the same camera and settings. So the pictures match each others. Is that possible? Can't find any solution anywhere.

0
Q: how to pass php resultset to javascript array in highchart?

William Ri am new to php and highchart , i need to draw a bar chart by passing values from php result set to javascript sample code: <pre> try { $usr = 'MON_DW'; $pswd = '4v$view'; $dbConnStr = 'localhost'; $dbConn = null; $err = null; $dbConn = oci_connect($usr,$pswd,$dbConnStr); $err = oci_error(...

-3
Q: How to call variable value inside string in PHP

Sayed Hussain MehdiHow do I call my PHP initialized variable inside the string of onclick="" ? I have Initialized $counter=7 and want to use that counter inside onclick="" function. This is how I did which is not working. <a class="blogpost page-transition" href="the_permalink();" onclick="gotoPageWithTrans6($coun...

0
Q: CodeIgniter on 1and1 Error Reporting

YaskyI made a website with CodeIgniter and I am currently hosting it with 1and1. During development, everything looked golden. Only if all hosts were as reliable as localhost. I am looking to get the PHP error logs from the site. Unfortunately, 1and1 does not allot access to their Apache logs. How ca...

-4
Q: How do I make an easy chat in php with a database using AJAX?

DillonI would like to know how to create a chat in PHP connected to a database, and make it update the chat without having to refresh the page (AJAX). I have the database all setup using user accounts, also. No guests are allowed, only registered users (I mean on my site for the chat, guests may answer...

0
Q: how to set conditions without having related fields

PooyaI'm trying to get some record of my table but conditions are not related to any fields. I want to select different records for admins and staff: if active user is admin (:admin>0) select record that status is 1. or if active user is not admin (:admin=0) select his/her records (userId=:userId) ...

0
Q: how do to create good login logic?

Drizzle CloudyWe can inject/ create new cookie via browser developer tool. when we set cookie in php setcookie('isLoggedin', 'yes', time()+3600); Then via developer tools, we can just manually create cookie with name isLoggedin with value yes So, how to do good login logic? I think everything will be the s...

0
Q: Using WHERE LIKE for results encoded in JSON string

LawrenceJust like to know if it is possible to do queries on sql table results encoded in JSON? I have a table value as follows: column name: keywords column result: ["furniture","home furnishings","opening sale","home furnitures","sale and promotions"] So i'm looking at $query="SELECT * FROM tabl...

0
Q: PHP, Google Data API V3, Upload to youtube

user2827915I am trying to implement code to upload a video to youtube. I saw a couple of other posts about this topic but I still cannot get it to work and am not skilled enough to figure out how to test it to see what is happening. I can also run the framework of this code and get the contents that have ...

0
Q: Paginate model fields dynamically

chrisall I'm working on a project and one feature is to select fields from a checkbox then paginate them. Eg, the checkbox has 'User_id','User_name','User_email' fields, when User_id is selected, index.ctp view will display user_id field only. If 'User_id' and 'User_name' fields are selected, disp...

0
Q: DUC software setup in XAMPP based web server with No-ip

vmevada102I had configured my webserver with xampp based in windows. Due to dynamic ipaddress to my internet connection, i have to use the DUC client for setting my server to internet. It work excellently but some times got error. but after setting DUC i got an error like A server requires username and...

0
Q: Php recrussive dropdown menu help nedded

user2827944I need to show a dropdown contain courses i wrote this code to do that. but my problem is it is showing the course categories and subcategories very well. but i need to wrap categories into tags. I tired to do that but it failed. This is my table structure id parent_id course_name 1 ...

0
Q: SQL not deleting in php

BillThis same question was asked here: SQL statement not deleting in PHP I don't see a solid resolution on that thread though. Basically my issue is that it says the delete was successful, but nothing was deleted. I'm pretty sure it has to do with the $1 in the delete statements, but I don't...

-1
Q: Cannot delete an image from a specific path

Mustafa AzadI am working on this code that I try to delete a photo from a specific path, and also erase the address of it from my database, but when the code is executed, the address in the database is erased while the image in the specific path cannot be deleted, it gives me this error message: Warning:...

0
Q: mysqldump executes but backup file is empty

Pouyan Izadii try to backup mysql database with this code $user="admin"; $pass=""; $dbname="mobiledb"; $backupFile = 'c:\\onstor.sql'; $command = "mysqldump -u ".$user." -p".$pass." ".$dbname." > ".$backupFile; system($command); the onstor.sql file has created but its size is 0Bytes! whats the problem w...

0
Q: CREATE TABLE Query not working

user2827980$con->query("CREATE TABLE jobs ( ID INT AUTO_INCREMENT, Title VARCHAR(32), Company VARCHAR(32), Country VARCHAR(32), City VARCHAR(32), Email VARCHAR(32), Website VARCHAR(32), Description VARCHAR(1000) );"); Does anyone know why it does not work? Thanks in advance

0
Q: How to get the value of radio button in Zend Form

piavghThis is my form, I have a radio button from 1 to 5 (very bad to very good) parent::__construct($name); $this->setAttribute('method', 'post'); $this->add(array( 'type' => 'Zend\Form\Element\Radio', 'name' => 'rate_box', 'options' => array( 'label' =>

0
Q: How can i load the css file in views/css/stylesheet.css in CI? My index file is in views/firstView.php

user1661754I am completely new to code igniter. Thought editing the config.php like this would work: $config['index_page'] = 'localhost/Projects/first_CI/application/views/firstView.php'; but its not working :( . Can any one suggest anything

0
Q: i want to add a js and css code to open cart header

Umair ShahFriends..! How are you? hopping all will be fine...i am new here so please avoid voting in negative sense... i want to add the following css code to the header in open cart : /*======================================================= MBL Page Peel PRO Effect For Blogger =========================...

0
Q: using ajax in zend framework 1.12

user2827976I'm beginner in zend framework and ajax I try to do a simple code with ajax and zend , it contain a div , text and button when the button is pressed the value of the text is populated into the div however when I press the button nothing is happened :S here is my codes please help me this is t...

0
Q: PHP cookies: does not have data on first execution?

lauthiamkokI don't understand this as it seems strange to me - cookies: does not have data that I set when it is on the first execution. My code, $booking_time = '12:00'; $timeslots = array( array( "12:00", "12:30", "13:00", "13:30", "14:00", "14:30" ...

0
Q: array in function outputs nothing

8803286I can just say that my english sucks so you know... So when i am trying to add values to a array it just output array for me function getAllRoles($format='ids') { $format = strtolower($format); $query = $this->db->prepare("SELECT * FROM roles ORDER BY roleName ASC"); foreach ($query as $row)...

0
Q: Preventing Sql Injection in php (codeigniter)

Reccur NishanHow do I prevent sql injection in codeigniter for additional security? Does Codeigniter does that itself or do I have to make my own? I want my pages to be heavily secure.

0
Q: How to handle latitude longitude data sent by android app in server

subashI have a working android application based on google maps. I get latitude longitude data from application every 10 second. Currently I am inserting latitude longitude data to database to users and manipulating it and sending response. This has contributed to huge load on server. Is there a better...

0
Q: Dynamically create html pages?

VladimirLet's consider reddit for example where people create let's say posts. Every post created has its own html page where you can see comments and etc. I am interested in how these pages are created, I would assume that when user creates a post, when the post is authorized, its page is automaticall...

0
Q: Adding PHP Code to Java Game

user2578784I was wondering, if I created a game(text-based) for an online community and I want to create a server, I know I can use java to connect the players but can I add PHP code to my Java Code? Where should I look? Regards, Michael Awetahegn

0
Q: How to edit redis database manually?

RadeI simply want to change the uid of a user from 1 to 10. Is there way to edit it manually? I'm not familiar with redis or any other nosql database so I'm kinda lost. For this matter, how do I view the redis schema? I can use cli but don't know how to use it. I'm actually working on a Zend App. H...

-1
Q: it only show the first data inserted in the database

user2656724hello can somebody take a look with my code? i think i did not forget everything to close tag i really dont know why it only display the first value everytime i click show all buton. i think the 3rd and 4rth to the last echo has something wrong. because the problem is on that part. i have moreth...

0
Q: How many types of constructors are there in php

ArihantI know the following types of constructors in OOPS: Parameterized Default Copy But i am not sure whether php supports all of these. What are the types of constructors that are supported in php

 
9:26 AM
0
Q: Laravel Nested Route issue

Kabir MI'm having problem with the Laravel 4, nested routing. I can display the create method form but can't store. Here is the code, I'll just come to the point. I have a base Resource Controller and another nested controller This is in my Routes.php Route::resource('profile','ProfileController'); Ro...

0
Q: Parse shortcode to array

abdomi need to parse WordPress shortcode to array, in php, for example: [parrent_shortcode attribute='1' attribute2='a'] [shortcode atrribute1=true attribute2=true]This is first content[/shortcode] [shortcode atrribute1=false]This is second content[/shortcode] [/parrent_shortcode] to becom...

0
Q: jQuery does not delete user info

JestyI have a php page that uses a jQuery to confirm before deleting data, Infact when I click delete it doesnt do anything the link doesnt do anything, I tried my efforts still nothing happens, please assist me my code teacher.php <?php require_once('../auth.php'); ?> <html> <head> <title>Sila...

0
Q: How to increment a single number in a text file with PHP

user2804298I am writing a VoteBox (like/dislike box) in html and I cannot find how to do this anywhere. Basically, there will be a like and a dislike button. When one of them gets clicked, it will forward the user to a page. And in that, I want some PHP code that will increase the number in upvotes.txt/dow...

 
9:44 AM
0
Q: Undefined variable notice in php/mysql

SuspiciusI'm trying to update some records in by database via php. This is the part of my code that returns error: // Check if button name "Submit" is active, do this if(isset($_POST['Submit'])){ for($i=0;$i<$count;$i++){ $query="UPDATE products SET title='$title[$i]', descr='$descr[$i]', ...

0
Q: Add ul ID in WordPress submenu

Daniel GöranssonI want to add an ID to the submenu in WordPress that matches the link text of the sibling like this: <nav id="main-navigation" role="navigation"> <ul class="nav"> <li> <a href="#about-us">About Us</a> <ul id="about-us" class="sub-menu"> ... ...

0
Q: Image Resize without cropping and maintaing aspect ratio

user2650209I want to resize images uploaded on server but without cropping so as to show them full version of image . Basic idea is i just want to show users images in full size(which is resized one) and let them download original files. Say if anyone uploads an image with large resolution and size is 10M...

0
Q: Connect to collections in mongoDB

Nadeera Kodithuwakkui m trying to convert a mysql database into mongodb,also i,m use mongodb with php,so need to convert mysql query into mongodb form. but there are no joins in mongodb. if you know easy way to connect two collections,please help to do it.

0
Q: PHP OOP - Pass data between classes through the calling class?

kachnitelI'm struggling to find a correct approach to pass data between classes, which do not directly call each other, and are only related through a parent class (which I now use, but I consider it a dirty workaround rather than anything near a solution). I have 3 classes both able to read input and wr...

0
Q: I am facing database error in cpanel, what i can do?

Md Humayun KabirMy CodeIgniter database setting is: $db['default']['hostname'] = 'localhost'; $db['default']['username'] = 'empyreal_username'; $db['default']['password'] = 'password'; $db['default']['database'] = 'empyreal_dbname'; $db['default']['dbdriver'] = 'mysql'; $db['default']['dbprefix'] = ''; ...

0
Q: jquery to hide and show div using dropdown

user1823053I am using below code to show/hide divs based on dropdown choice. The code works perfectly until I start using iframes to call local pages on my server. What then seems to happen when I test it by choosing different options in the dropdown, is that the first time you choose the 6 options it wor...

-2
Q: Authorization base64 encode

user2827969I tried this code in my local PHP server... everything works perfectly.. however when I uploaded this script to web hosting server, the authentication did not work. Somebody can explain why this script doesn't work on webserver. Authorization: Basic " . base64_encode("$username:$password") scr...

0
Q: When creating virtual-host, apache would work only with /var/www/html/ directory

flangofasI just moved from WAMP to LAMP, and can't figure out this problem that I am facing. Whenever I create new vhost which is not in this directory /var/www/html/ i get a 403 forbidden message. (Permission are the same and there is an index file) It seems to me that somewhere in Linux you specify a ...

0
Q: wordpress copy shows old version of the site

kumoldI've created copy of the wordpress website. All wordpress data is in one database, which is also used in the copy of the website. But copied version shows old version of the site, even though I've copied source files after all edits. Can someone have any idea why this is happening? And also, when...

0
Q: JS & PHP Interaction

SeekingCharlieTrying to get my head around this scenario in a HTML form. I've got an input text field for postcode. Based on the postcode that a user enters, a price for shipping is designated with PHP (different post code zones have different shipping costs). Later in the form, whatever shipping price wa...

1
Q: SELECT FROM and INSERT INTO

bloopp-itI'm working on a script, but it won't work. When a user makes a post, NOW() will be inserted. I want to make a script where the user will only be able to make a post when his last post differs at least 10 minutes from the post he wants to make at this moment. I don't want to make use of cookies, ...

0
Q: Put a method in a different class to remove the switch() statement

DavidI will minimize the code down to just what you need to see. I have 3 classes: Customer, Courier and Order. class Customer extends AbstractRegisteredUser implements CustomerInterface { } class Courier extends AbstractRegisteredUser implements CourierInterface { } class Order extends AbstractEn...

0
Q: Wordpress Contact Form 7 and 3'rd Party integration

PavelI am trying to integrate wordpress CF7 with a third party CRM. I managed to send the data to the CRM using the following filter: add_filter('wpcf7_form_action_url', 'wpcf7_custom_form_action_url'); function wpcf7_custom_form_action_url() { return 'https://www.myapps-systems.com/api/WebToLeed...

0
Q: ASK execution command 'CAT' for append file via PHP in Linux Ubuntu

Rezky Febriana Putrai have a script to execute 'cat' command with system() in PHP and i have two files in .txt extension, one.txt the content is tes1 two.txt the content is tes2 here's my code <?php system('sudo cat /home/users/Documents/two.txt >> /home/users/Documents/one.txt'); system('sudo cat /home/users/...

0
Q: How to edit Homepage in Wordpress

Mohammad Reza HajianpourI'm gonna add a bit of code/edit my homepage in Wordpress, but I can't find the page's main file to edit. Take a look at this: http://uaral.tk This is my homepage. Now look at the page source in your browser. I want to edit these codes. But I can't find it anywhere in the website directory. I'm...

0
Q: wordpress/woocommerce input a unique post id

BorreborstI am developing a webshops, using woocommerce with wordpress. Love the pluging and all its functionality, but I encountered a challange. I client wants to use the webshop as dropshipping website, wich isn't a problem in itself, but he recieves a .csv file from his wholeseller, every day with upda...

0
Q: How to determine whether something is in a conditional statement in PHP?

AmareKnightI have a copy of a PHP website and there are a lot of pages and a lot of code there. It uses conditional statements to determine what contents should be printed very much. Here's an example(there may be a lot of snippets like the one below): <?php if($countryA): ?> <div myattr="myvalue"> <?...

0
Q: Shuffle new characters after each character in a string

Erik EdgrenI have the following function to generate a new random character at the beginning and at the end of a string: function random($string) { $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; $shuffle_start = substr(str_shuffle($chars), 0, 6); $shuffle_end = subs...

-3
Q: which is better? start using language from scratch or from a framework?

user1511208I am a newbie to the web development, I want to develop some website for different purposes. I started using Django with python, however, I found it fuzzy to me since I don't have enough experience with python. I also need to develop with php, but I jumped directly to Laravel. Is it better to s...

1
Q: DateTime constructor in php

RiteshI have done a little experiment on php's DateTime class. In the documentation they have suggested the syntax for creating the object of DateTime class as given. Object oriented style public DateTime::__construct() ([ string $time = "now" [, DateTimeZone $timezone = NULL ]] ) Procedural style D...

0
Q: PHP post variable is not being rendered

Beraben SystemsI have a PHP program that takes in a image name and loads the image and displays the name and the image on the page. The variable in javascrip is written as var latest_image_name = '<?=$post_img_name?>'; The PHP code is <?php foreach($files_assoc_array_keys as $file_name){ ...

0
Q: Get paths for all leaf nodes from multidimensional array PHP function

user2828105Below is a multimensional arra that I made for testing and I wish to make a function called getPaths which returns something like the following: $paths[0] = array( "Knock-knock.", "Who is there?", "Orange." ) $paths[1] = array( "Knock-knock.", "Please, stop knocking." ) $paths[2] = array( "Kno...

0
Q: jQuery Ajax is not getting posted to a PHP file

Mohammad Areeb SiddiquiI am new to AJAX so I know there could be a silly mistake in my code but anyways I will go ahead. I have a function created that is called when a button is clicked. The function calls .ajax() method of jquery. I send the data to a file named 'delete_post.php`. HTML: <button class="btn btn-prim...

0
Q: Jquerymobile events firing two times when including pages

manishThese are two files I have created for simulating my problem. When opening test.php in my locahost as: localhost/proj/test.php All the events get fired two times as shown in image attached How to prevent this as it is affecting my templating. And all the javascript event which are in subfiles ...

-1
Q: Convert to Multiday?

Andy JonesI'm using this code from David Walsh I'm trying to work out how I could make it support multiday events? I guess I need to take the start date, and end date for my event, and then do a 'for each' loop on it to get single days, which I can then use to display the events in the calendar. How would...

 
10:38 AM
0
Q: deploying concrete5 on appfog

user182332Problem: Config/site.php has to have password salt. How do I generate a password salt for config/site.php Background: I am trying to deploy concrete5 on appfog(PAAS like heroku). But cannot use the concrete5 wizzard(front end gui to set it up). As appfog does not provide the mysql details. It gi...

0
Q: PHP row results without repeating

user2826526I have a db with the following ----id---|-----name-----|-----owner----|----tags---------------| ----1----|-----123------|------jc------|--van outside door-----| ----2----|-----124------|------dw------|----van daz------------| ----3----|-----125------|------jc------|--daz indoor flower----|...

0
Q: json_encode converts special characters like star and underline

ortreumI have this array: $map = array( '*_jour' => '*_day', '*_jours' => '*_days', 'inferieur_a_*_euro' => 'till_*_euros', ); and json_encode converts it to: {" jour":"*_day"," jour":"*_days","inferieur a euro":"till_*_euros"} How can I fix it? Thanks.

0
Q: Chosen plugin doesn't work

user2442178I'm tearing my hair out to find why Chosen plugin (http://harvesthq.github.io/chosen/) doesn't want to work. I have tried different things, such as calling the chosen plugin directly in jQuery, rather than in JavaScript as below, but none of it works. I believe I have called the libraries correct...

0
Q: PHP Absolute & Relative Paths

MemoNickI have this directory structure: /style/style.php /style/graphics/logo.png /cp-admin/index.php style.php contains the following function, which echoes the logo: function logo(){ echo "<p><img class = 'logo' src = 'style/graphics/logo.png'></p>"; } I am using this function so that if I c...

0
Q: MySQL - Using results of a query to use in another query

CodophageI have two tables, one with posts and another one with comments : posts ----- ID user_ID text date comments -------- ID post_ID user_ID text date I want to display every post and for each post, I want to display the related comments. So I made two queries : include('bdd.php'); $reponse ...

-1
Q: How to decrypt password in mysql

VikrantGoing straightly to my question, I have read about encrypting password while registering the user.Till here im able to register users with encrypted password by using PASSWORD('$PASS'); where $PASS is the users password. My sql table details is as follows :- FNAME LNAME EMAIL PASS // USED ENCRY...

0
Q: Multiple Jquerry Mobile at linked files

MixalisI use jquerry mobile to make a mobile form and then submit it. At main page i make import the jquerry libraries. <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" > <title>Waiter Menu</title> <link rel="stylesheet" href="js1.0/jquery.mobile-1.0.min.css" /> <script ...

0
Q: How to read data from this json format

Sudheer PalI am stuck on this. This is a json_encoded string by the Wordpress plugin and saved into database. I want to read it from my own database query. I am getting null when tried with var_dump . It has some properties of code which is creating problem, I think. Below is the data where from i want to ...

0
Q: How to apply a filter in a model only when it's saved?

AviAtionHere is a rules ( I am reduced to 1 rule that executes Myfilter ) in a model: /** * @return array validation rules for model attributes. */ public function rules() { // will receive user inputs. return array( array('content','filter','filter'=>arra...

0
Q: Apache HTTP Server stopped working

sHAms uL aRiFeEnI am using xampp and when I run any .php file in my pc, the xampp give me this error and stop any page to run in my browser. When I click "Close the program" then page load successfully but again after 1 minute the same error appear in my screen. I install latest version of xampp 2, 3 times and I...

0
Q: how to access login name to mysql php

user2468472this is my login user name php code <p align="center">username: <?php echo $_SESSION['SESS_FIRST_NAME']; ?></p> and this is mysql query $query = "SELECT * FROM `carddetail` where drivername='open' ORDER BY `carddetail_cardno` ASC LIMIT $from, $max_results"; how can i put this drivername i...

0
Q: Notice: unintialized string offset

CodemunkieI have the following code below, which workes quite allright - but now when I have all errors reported on - I get to see this: Notice: Uninitialized string offset: 9 in C:\xampp\htdocs\website\dev\lib\player.class.php on line 110 Notice: Uninitialized string offset: 10 in C:\xampp\htdocs\website...

0
Q: how to display mhtml file in drupal

Extjs CommanderI have an mime-html file and i want to display it in drupal 8.x but i am unable to does any body know how to do that ?? till now what i tried is i copied the content and paste it on editor of drupal but not working. i copied the code mhtml and paste it on editor but not working. i introduces a...

1
Q: Visualize git diff file web site

LaoneoIs there a javascript or PHP library to visualize a git diff (or .patch) file in a web site? There are dozens of libs which do a diff of two texts but none which can display an existing diff or .patch file. Any links are much appreciated.

0
Q: recognizing similarity in pictures

Alireza Fallahis there a way to recognizing a number or letter in a picture. I dont want code , just an Idea is enouph for me, Im working on a image processing research. and I have the color (rgb) of every single pixel of image. by example I want to recognize "8" from this picture :

 
11:26 AM
-1
Q: Downloading files via C# from a php site

baris_ercanThe site provides links as http://www.example.com/download.php?id=53979 . I know that this is a pdf file and want to download it via a C# program. Is this possible and if yes, how?

0
Q: php contact form to store in csv

Krishnan Rajaramanmy php contact not working, it shows like page cannot be displayed, i didnt host my website, i testrun by using localhost/..... Please help me. and here is my php code <?PHP $email = $_POST["emailaddress"]; $to = "you@youremail.com"; $subject = "New Email Address for Mailing List"; $headers =...

0
Q: php foreach in foreach

MalinI have a collction of posts I´l like to show in a table. Each post has an id and a parent_id. I want to loop through the table with a nested foreach, but I dont get it to work. My idea is to loop through each post, print the name and stuff, and also find all it´s children (by looping through eac...

-2
Q: Simple PHP form still not working

Rik de CortIm uploading my website at the moment. However, I do not get my PHP code to work. I do have an mail server set up with the correct e-mail address. But when I use the script and press the button to send the form it gives me a blank page and no e-mail showing in my mailbox. Could someone help me ...

0
Q: How to extract full images from bbcode?

MrEvgenyShcherbinaI have a BBCode like this. [IMG]art_74e7e4f8811380426577.jpeg[/IMG] [IMG]art_74e7e4f8811380426595.jpeg[TITLE]title is always needy[/TITLE][/IMG] I need to extract the two images. So my preg_match_all is: preg_match_all('/\[IMG\][^(\[\/IMG\])]+/', $body, $matches); Which gives me this: [0] =>...

1
Q: Write data to start of file when not enough space

Alma Do MundoSO, The problem My question is simple - how to write data to start of file if I have not enough space to allocate it in RAM and I have not enough space to make it's copy on current FS partition? I.e. I have a file with 100Mb size, I have 30Mb memory limit in my PHP script (and it can not be adj...

-2
Q: Remove random generated characters from a string to display the word in clear text

Erik EdgrenI have this function to put some random characters into a string: function random($string) { $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; $shuffle_start = substr(str_shuffle($chars), 0, 6); $shuffle_end = substr(str_shuffle($chars), 0, 6); $letters ...

0
Q: error displaying posted html

DelightedD0DIm storing the contents of a div in a textaera then posting the contents to another page. The second page should simply print out the html as if it were writen directly in that page. The content displays except everywhere there is a " in the html, it gets printed as \" (on the image sources an...

-2
Q: Not inserting data into the database

user1424109I am trying to create a form that require to retrieve the information about an employee then the employee enter their expenses claim. The process of retrieving data is work correctly, but it is not saving the entered data of expenses claim into the database. I would be most grateful if anybody c...

1
Q: Need to add a counter in php to separate the rows every 4 columns

Jordi Martí DomínguezI have this code, and I need to close a row every 4 post. Every post is inside a div. I tried some things but I coudn't implement to my code. <?php echo "<div class='row'>"; global $post; $all_events = tribe_get_events( array( 'eventDisplay'=>'upcoming', ...

-1
Q: Pull From Two MySQL Tables

CarlI have two MySQL tables with the following... Apps ID | Name 1 App1 2 App2 and... Minutes ID | AppID | Amount 1 1 10 2 1 15 3 2 35 I want to pull the Apps and display them by time used. Should look like this... App2 35 minutes App1...

0
Q: Two Onclick functions, ajax/php or JS. What get called first?

user2826397I have this script: <script> function loadXMLDoc() { var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else ...

-1
Q: Generating a html page using php

AnkurSo I have this question after browsing freelancer.com. What it(freelancer) does is, that whenever a new user registers..it automatically generates a html page for that user. For example, the user's username is joshm, then freelancer would generate www.domain.com/u/joshm.html , not only this page ...

0
Q: Pass Array and String from Javascript to PHP with AJAX

user446141I have the following ajax call. My addList variable holds a string: list=Sports&list=Cars&list=Outdoor&new_list=123123 I want to grab the addList in my PHP file as $_POST['list'] is an array with values Sports, Cars, Outdoor $_POST['new_list'] is a string 123123 But I couldnt convert the POST ...

0
Q: API documentation. A method returns an object which implements more than one interface. What to put as return type?

DavidLet us say you have a class class View implements ViewInterface, TemplateInterface { private $template; public function setTemplate($template) { $this->template = $template; return $this; } } When you are then documenting the TemplateInterface and you come to...

0
Q: Inserting multiple rows from a php form into the database(phpmyadmin)

jhemy form as the following table (of textfeild). I am feeding the values into these textfeild. How can i enter these values into my database? plz help. code of the form:- $rows=$_POST["rows"]; echo " Roll No. Full Name Unit_test Prelims Atte...

0
Q: XPath query return multiple tags on different levels

Joel KiddPHP XPath query: $query = $xpathvar->query('//siri:Service'); foreach($query as $service) { echo $service->textContent; // Here I need to also echo this Vehicle's reg } Targeted XML: <Vehicle> <CategoryA> <Service>123123123</Service> </CategoryA> <CategoryB>

0
Q: PHP mysqli Commands out of sync; you can't run this command now

Asaf NevoIn my db i have some stored procedures.. I want to call the one of them, and according to the results i get from this procedure, i will determine weather to call the second one or not. As you can see in the isUserValid() method i've used $result->free_results() but still when calling the other...

0
Q: How can I add a URL to a query string?

Peter StuartI have a small problem with my PHP script. I want to be able to have a URL within a query string so it would look like this: http://example.com/?url=http://google.com/ This works absolutely fine and $_GET['url'] will return http://google.com. The problem is when the URL in my query string al...

0
Q: htacess rewrite rule preventing access newly added php files

Suneth KalharaI have a website with htaccess file. the htacess has lot of codes. when i create a new php file it redirects to another page. so i checked my htacess file and remove a one line of code RewriteRule ^.*\.{1}(htm|html|php)\/? index.php [L,QSA,NC] after that the file can can able to access diret...

 
12:14 PM
0
Q: AJAX call not replacing HTML

SeekingCharlieI've got a form that calculates shipping based on user's postcode input. I'm retrieving user's text input of the postcode, retrieving the cost of shipping of that particular postcode via PHP, then using an AJAX call to transfer that back to output in the HTML for a total. However, he AJAX call is...

0
Q: connecting titanium mobile application to wamp server

Piyumi NadeeshaniI have created an android mobile app using titanium and i want to connect it with remote mysql database through wamp server. I tried many ways but nothing was success. In my lap apache server is configured to port 8080. Does it cause for my problem? Are there any relevant configuration have to do...

0
Q: Live update of flight schedule for a cakephp website

ilavarasan sanI've developed a website in cakephp and it is running successfully in localhost of my windows operating system.That has to Display the flight status of the airport specified by using the API key provided by the www.developer.flightstats.com. I hosted it on live.It is running in live also.But the ...

-1
Q: textbox dropdown after a seletec

BenP.Hi just wanted to ask how to auto dropdown the textbox based on the number selected. For example, i have a dropdown values of 2,3,4,5,etc, when I click the 2, it would dropdown two textboxes, three if the value is 3, thank you, very much appreciated.

0
Q: IIS php.ini error_log is overridden somewhere

cederlofI am setting up a PHP-site in IIS 8 (Windows Server 2012) and had no effect when setting the error_log parameter in php.ini: error_reporting = E_ALL | E_STRICT display_errors = Off log_errors = On error_log = "C:/Temp/Logs/php_errors.log" However when setting the error_log in code: ini_set('...

0
Q: Populate your own registration form using facebook registrationplugin?

dissectorzI have a Registration form and I don't want to change my entire code for facebook Plugin for how i implement my Registration for Users, rather what i want to commence is take data from Registration Plugin and add those values to my input tag, on click registration through facebook,as i needed som...

0
Q: php sendmail headers not working correctly

php_nub_qqI have the following headers in my Mailer class // domain is equal to current domain with capital letters if any $from = domain; $replyto = 'noreply@'.strtolower(domain); $headers = "From: $from\r\nReply-To: ".$replyto; $headers .= "\nMIME-Version: 1.0\nContent-Type: text/html; charset=\"utf-8\...

0
Q: Split a complex string with a preg_split

numediawebFor any regular expression gurus out there :) Can you please help preg_split some strings to an array? The string value may vary and look similar to this scheme: $str1 = 'ⵜⴰⵙⵎⵙⵙⵉⵜ - tasmessit : Focalisée / Focus / QCÉÑe ⵜⴰⵙⵎⵙⵙⵉⵜ - ⵜⵙⵎⵙⵙⵉⵜ - ⵜⵉⵙⵎⵙⵙⵉⵜⵉⵏ tasmssit - tsmssit - tismssitin'; $str2 = '...

0
Q: Javascript function not accessing a check boxes checked value by document.getElementById

user2802882Javascript is not my strong point and I'm trying to write a simple function to count how many checkboxes are selected by the user. These checkboxes are generated from values stored a database and represent a choice of toppings available for a customer ordering pizza. Javascript: <script type="...

-2
Q: How to get the total runs of each player and add it to an array?

Ruchina Perera$sum = 0; $sqlM = "SELECT * FROM players"; $resM = mysql_query($sqlM) or die(mysql_error()); while($rowM = mysql_fetch_array($resM)){ //Total Runs $sqlr = "SELECT * FROM runs WHERE pId = ".$rowM['Id'].""; $resr = mysql_query($sqlr) or die(mysql_error()); while($rowr = mysq...

0
Q: Carrying sessions over on subdomains - Not working fully

ThewI log my user in via auth.example.com and then redirect them to user.example.com after login. But this isn't working - Sessions don't carry over. So I was looking for answer and I saw two methods (keep in mind I use shared hosting, so I can't edit the php.ini file): ini_set('session.cookie_dom...

0
Q: PHP table creation with 1 array manipulating through array indexes

Kay Singiani have this database: sorry i cant post images yet.. http://i.imgur.com/5EnIGk1.jpg im using it in my table: http://i.imgur.com/4pTuVVL.jpg as you can see. the 9-10am is reserved by enerva. the duration for that hour is 3 'meaning 3 hours'.so, the endtime will be 11-12pm. however,in my table,...

0
Q: PHP MYSQL EMAIL

user2067337I am using the following php code to send email whenever the record is inserted into the table.This works without a problem. I have hard coded the email id. How can I dynamically add email from musers table based on the following query. select email from musers where uid = $uid; <?php $latitud...

0
Q: How to post data from javascript to php

rezaI try to post single data to php page using javascript but can't get it right.. here's the code i tried: try.js: $(document).ready(function(){ var data = 1; $.post( "try.php", { test_data: data}); }); data.php: <?php $test_data = $_POST[test_data]; echo $test_data ?> when I access file dat...

-5
Q: mysql_query(" INSERT INTO

user2828322mysql_query("INSERT INTO act1,act2,act3 (name,url,email,body) VALUES ( '".$arr['name']."', '".$arr['url']."', '".$arr['email']."', '".$arr['body']."' )"); $...

0
Q: Why are there two $this in the last statement in this php code?

Rahina Rakhi parent::__construct(); $this->displayName = $this->l('Responsive products featured'); $this->description = $this->l('Displays featured products and categories in your homepage.'); $this-> include_once($this->local_path.'/classes/ResponsiveHomeFeaturedClass.php'); You will see...

0
Q: Ajax wont execute a php code located in another file

Arwa SaadGood evening, So i'm trying to fire up a php code to update an entry in my database when the user clicks on a button with class deleteitem. Here's my Ajax/jQuery code <script type="text/javascript"> jQuery(document).ready(function() { $(".deleteitem").click(function() { var parent =...

-1
Q: how to send email to many users which not considered as spam by Datacenter

HiDd3Ni have a windows vps and this script run from my vps.. i wrote this scrpt to send one email to all of my user which i have 6000 users in my site until now if i run this script i know i will be spammer and ill considered as spammer by my Datacenter and i take abuse emails from my DC.. <?php ...

0
Q: Drupal : Gateway timeout error from proxy server

aayush shresthaI was recently developed a drupal site for a client who lives in HongKong. The site worked perfectly (is still functional when I access it) But after deploying it for demo, the client compalained that the site wasnt working and constantly getting a 504 Gateway timeout error. Apparently the client...

0
Q: Convert mysql to PDO functions

8803286PDO is so harder than mysql(what i think) Soon mysql functions will not work(what i heard) So i wonder if somone can convert my mysql to PDO I have 2 files class.secure.php index.php code to convert for class.secure.php https://dl.dropboxusercontent.com/u/53503487/class.secure.txt code for ind...

-1
Q: Show last portfolio items by category

Tiago Silvai want to show my last items in portfolio filter by one category, i already have this code that display all my latest portfolio items, i just need to filter that by a category id in my portfolio categories. <?php if (_sg('Home')->showLatestP()) { ?> <?php $args = array(); $ar...

1
Q: PHP: store a global information so it can be accessed by all other users?

lauthiamkokIs there a way that PHP can track and keep a data for what page is being accessed and then this piece of data can be opened/ accessed by all other computers/ users? For instance, when I am inside my CMS and editing a page called 'home' then I want to store this data in a global (maybe??) so the ...

0
Q: How to stop exluded category from showing its sticky posts?

Dejo DekicI have a loop with excluded category (Featured) so now my category is not visible inside the loop. Now here is my problem if I set my post inside Featured category to be "sticky" that post will still show up inside my loop. What I would like to accomplish is to hide that category sticky posts (Fe...

0
Q: html form unable to submit and back to the same page

Adam SmithI have this form below which is use to submit to a payment gateway. Problem is that once I click on the button, it won't go to 3rd party payment page. However, if I click second time, then it only go through? Why is that so? <form method="post" action="" name="payment"> <input type="submit" name...

0
Q: How to @include() my secret file without error text (when there's no file) but with error text if any error is in this file?

E L$admpage=md5($_SERVER[DOCUMENT_ROOT]).'php'; if(!@include($admpage)){echo "error opening Adminpage";} So, in case there's no such file there should be error error opening Adminpage. But if in included file IS error in code, it shows nothing. In other words, I need to turn off errors reporting...

0
Q: Tracking IIS "Too many connections"-error in Google Analytics

Rasmus LindströmI'm using IIS as webserver and have some times seen the "Too many connections" error on my sites. I've optimized the code, but would like to make sure no users are experiencing this error. I've added Google Analytics Event tacking to all 404 and 500 pages using the IIS templates and this works g...

0
Q: SQL Update Query won't work in PHP

GeordieDave1980So I've been trying to figure out what the problem is with my UPDATE SQL query and searched through the questions on here only to find out the issue is with the actual text that's being updated in the database table. My PHP app is a simple one just for adding simple website links with a descripti...

-2
Q: diffrent connection create via foreach loop php

samithaI have a big problem in my mind foreach($allSubBranch as $key => $value){ $gotOtherSql = "esoftcar_".replace_extension($value->db, "sql"); $otherDbNames = "esoftcar_".$value->db; $file = fopen($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $gotOtherSql,"w+"); ftp_get($connection, $file, ...

0
Q: how to submit a form from loaded form into main page?

SunSkycontact.php ... html form ... $('#submit').click(function(){ $.post("mail.php", $("#contact").serialize(), function(response) { $('#success').html(response); }); return false; }); mail.php is a separate file (for sending mail), and everything works in this arrangement. But I need to load...

0
Q: Making sure that the page was requested by specific program

user2821151Hi I want to collect data for my program, I want to use PHP to do this(http://site.com/php?v="0.0.1"&n="Application"), how would I make the php page only work the my program, and not somebody else has the link. How would I make sure the

0
Q: Call ajax when value is inserted on database

StyliI'm using this method to refresh content of users uploads but i've seen twitter facebook does not actually follow this type of process..they auto refresh the content or auto update the only content as soon as data is inserted to their database. How its possible because I've seen in twitter's pro...

0
Q: PHP (SimpleXml): Parsing web service response fails

AntonSackI am calling a weather web service and I do get a response but I do not manage to read one element from the response. The response looks like this: <string xmlns="http://www.webserviceX.NET"> <?xml version="1.0" encoding="utf-16"?> <CurrentWeather> <Location>Hamburg-Finkenwerder,Germany (EDHI) ...

0
Q: phpfileuploader post uploader object with jquery

farhadi used script of http://phpfileuploader.com/ I need post uploader object to another php file with jquery but not worked : for example i used this code : var uploaderobject=document.getelementbyid("myuploader"); $.post("example.php",{ sampleobject:uploaderobject},function(data) { al...

0
Q: submit data to google docs from php file

Shivesh JaiswalHi i have php form to submit data to mysql and i want to submit those value to google docs as well <?php $id = '1'; $name = 'myname'; $course = 'mba'; $amount = '500'; ?> I have a form which submit data to google docs <hr class="ss-email-break" style="display:none;"> </div></div> <div class="...

0
Q: Invite friends to visit my website

Mohammad AlkhdourI'm trying to build a Facebook application to send an invite to all my friends to visit my website When someone clicks on notification, I assume it goes automatically to my website. <html> <head> <title>My Great Canvas app</title> </head> <body> <div id="fb-root"></div> <scrip...

0
Q: Script (PHP & Mysql)

user2828482Need help with following script. It shows only "Resource id #5" in php. $some_q = "SELECT SUM(Bank) AS 'count_bank' FROM players"; $results = mysql_query($some_q); while($row = mysql_fetch_array($results)){ echo $row['count_bank']; }

0
Q: Add BCC field to a php contact form

Gregthe code below is used on my site to send e-mails via a contact form. I'd like to add an additional e-mail address on BCC but can't figure out how to to this so your help would be welcome. Many thanks <?php // Email Submit // Note: filter_var() requires PHP >= 5.2.0 if ( isset($_POST['email']) &&...

0
Q: What is wrong with this MySQL query syntax?

user2828479$db = mysql_select_db("remote"); if(!$db) { die("Unable to select database"); } $qry = "SET @cumulative_sum := 0; SELECT timestamp, @cumulative_sum := @cumulative_sum + value AS cumulative_sum FROM remote.historical WHERE timestamp>= CURDATE()"; $result = mysql_query($qry); when I use this ...

0
Q: Can you open a PHP file anywhere in the page?

Marc-André TrahanThis question is confusing me. Can you open a php file from anywhere in a .php file? Ex: // index.php <?php include('functions.php'); // ... ?> <body> // ... </body> <footer> // This is what I'm trying to do <?php include_once('blog.php'); ?> </footer>

0
Q: Modifying database using POSTed variables in PHP

Matthew WalkerI am writing PHP code to update a database, but this code is extremely repetitive and thus error prone. I am effectively typing the variable names six times each! Can this be improved without loosing functionality? I am certain there must be better way! First, the definition of the demandAr...

0
Q: PHP for array only loops once

SultenhestThis for array only loops once, instead of 3 (numbers of files i want to insert into the database), i've been looking at it for 2 hours now, and cant seem to locate the error. Please help.. (It's the insert for loop that only runs once, the 2 foreach works fine) $upload = $_FILES['upload']; $i=...

-2
Q: How to make HTML/Jacascript receive data from PHP script and display in HTML?

MonI know nothing about PHP. All I know is HTML. My question is how can I write Javascript to receive data from PHP script and display the result in my HTML page? For example, <?php include('lib/test.class.php'); $test = new Test(); $show = $test -> Try('Whatever ?whichever', 'xx', 'yy'); echo $...

0
Q: Why does mysql HEX change binary column case?

user1032531The following query changes the case of the md5 column from lower to upper. The MD5 value was provided via PHP's md5() function, and I am using it in a HTML link to send $_GET data to the server. Why does the case change? Is one case more proper than the other? I understand I can deal with it...

0
Q: Codeigniter routes 404

user2827013I have a website on a local wamp server (I have used a virtual host setup). However when I try to link to another controller on the site, I just get a 404 page (not codeigniters 404). I'm sure I'm missing something simple, but what I'm not quite sure. If in the url I put the website.co.uk/inde...

0
Q: Mysql & Php SUM function, array

user2828482Tried to make a script that calculate all values from a column but instead of getting the sum of values I get "Array" $sql = "SELECT SUM(Money) FROM players"; $result = mysql_query($sql) or die (mysql_error()); $BaniTotal = mysql_fetch_assoc($result);

0
Q: Store sensitiv data in Silverstripe 3.1

cSGermanyI want to store sensitive informations (mainly passwords) in a dataobject in silverstripe. The Data need to be stored crypted in the database. If i call this field in my template, I need the data decrypted. But I don't know how to do this. Can someone point me in the right direction? Thx!

0
Q: How to initialize a mysqli variable when database is not yet created

VISHWAAS MANJUNATHI am using mysqli inorder to use database functionality in PHP. So, when I use new mysqli(.,.,.,.,db_name), I need to mention db_name in the begining. I want to create a db after opening a connection. So, obviously I wont be able to give db_name value while initializing. So, how to initialize a m...

0
Q: MAMP time between seeing live changes

unansweredI'm using MAMP server and wondering why changes I make to the PHP files are not instantaneously displayed when I page refresh (in browser). Is there a way to set this up? There are no caching settings on MAMP. Either I have to wait 20 seconds or stop and restart the server.

 
2:33 PM
0
Q: How to Update a field based on the submit button - Yii

user2770039I'm new to Yii framework. I have to create three buttons in my form (update.php). i.e. (Save, Approve, Reject). I'm using the following fields in my form. <?php /* @var $this MessageTemplateController */ /* @var $model MessageTemplate */ /* @var $form CActiveForm */ ?> <div class="form"> <?php...

0
Q: Symfony2, Doctrine2 Found entity of type Doctrine\Common\Collections\ArrayCollection on association sth#category, but expecting sth

user8542214Now I have problem with submitting post data in my form (my forms looks like: Task: <input text> Category: <multiple select category> DueDate: <date> <submit> ) And after submitting my form, I'll get this error: Found entity of type Doctrine\Common\Collections\ArrayCollection on association A...

0
Q: loop through multidimentional array in php

kwk.stacksome time small things in programming get giants. i am woking on 2 dimentional array but i am unable to get what i need. below is my array structure. Array ( [0] => Array ( [0] => 16 [id] => 16 [1] => 1 [userid] => 1 [2] => abc@gmail.com ...

0
Q: How secure is this mysqli prepared statement

mwaseemaPreviously I used general mysqli queries to insert values in database with real_escape_string for security but everyone seems to use prepared statements for better security. To increase security and prevent sql injection I am going to replace my code with prepared statements but I wanted to know ...

1
Q: How can i filter arrays to obtain the following result

user2061186I have the Following output, and needed to get results Following group the results by day of the month and time are in arrays, how can i do it in php? If anyone can help me, thanks, I've tried to do but not the end result that I need Array ( [0] => stdClass Object ( [End] =

0
Q: Symfony2-Doctrine2 inheritance persist not working properly

Enoah NetzachI have a project in Symfony 2.3, using Doctrine ORM 2.3.4, and I'm using class inheritance: a parent class /** * @ORM\Entity * @ORM\Table(name="parent") * @ORM\InheritanceType("JOINED") * @ORM\DiscriminatorColumn(name="discr", type="string") * @ORM\DiscriminatorMap({"child"="Child"}) */ c...

0
Q: Send post data and cookiefile in Google App Engine PHP runtime

StichozaI have a code written in PHP and currently running on my shared hosting. Now I'm going to move it on Google App Engine. sendRequest() method sends post data and cookies to another website and returns a response. private function sendRequest($url, array $data = array()) { $ch = curl_init(sel...

0
Q: PHP Postgres Using Special Input Values With Intervals

Devin DixonI'm trying to select a date within the time period of one day. A simple query like this will do the trick: SELECT * FROM table_name WHERE table_name.the_date > DATE_SUB(CURDATE(), INTERVAL 1 DAY) My problem is I am using prepared statements with pg_execute/PDO(the problem is the same in both)...

0
Q: How to add an additional <div> and <label> to wordpress menu

user2828551I am trying to add <div class="menu-toggle"> <label for="checkbox" id="checkboxLabel">Menu</label></div> <input type="checkbox" id="checkbox"> to a wordpress menu. I am using the the custom menu widget, but have no idea how to add this piece of code above <div class="menu-main-menu-container">...

0
Q: Save base64 bit encoded tring to the file in php.

user2696905I have a php application which takes base64 encoded wav file from the client (browser) via ajax and save to the database. No I have to re encode the wav file using ffmpeg before I save the file in to the database (I can do this using system calls). But the questions is I need the input file (name...

0
Q: Find a file Age In php

user2288698I need to find the age of a file using php for eg : i have abc.txt. I need to find how many days old. ans: abc.txt is 20 day's old... i have tried below code but i need only day's output function humanTiming ($time) { // to get the time since that moment $time = time() - $time; ...

0
Q: How to upload a mp3 / mp4 file to PHP with android and keeping the .mp3 / .mp4 extension working?

user2828585I am develloping an application on android and I need to upload a music to my php server. I manage to get the uploading part working but when it is with the .mp3 extension, the file won't play, but when it is without extension, the file will be play in the browser. here is the php code $file_pa...

0
Q: how do i edit the input fields of paypal sanbox?

kennform action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top"> WeBoss - Downpayment Combat P1,000.00 PHP Battlefield P1...

0
Q: restSharp response.content has no value

MasterXDBefore we start, i am new to restSharp and i dont know much about it, and therefor, i dont know what to search for. I want to know how many of the rows in my mysql table has the value 1 in the "Number" column. When i open the file from in my web browser and add "echo $num;" to the file, it echo...

0
Q: Can't make readdir accept string var

Dorian_gdError: readdir() expects parameter 1 to be resource, string given $directorypremium = 'uploads/premium/'.text2url($pseudo_cookies).'/'; while($file = readdir($directorypremium)) { if($file != '.' AND $file != '..') { $taille_fichier = filesize($directory.$file);...

0
Q: Advantage of using Java EE over PHP for Android GCM

MapleLoverMy Android app needs both downstream and upstream from and to the server. So I decide to use GCM XMPP in my web server. But does XMPP support php web server? If it supports, is there any advantage of using J2EE web server over PHP web server? Any idea will be appreciated.

0
Q: PHP SQL - Impossible to connect back after user's data is UPDATEd

user2828574... Hello there! I'm French so excuse me beforehand in case my English isn't perfect. I'm used to read StackOverflow posts when I have some doubt about php and mysql. My problem is the following: After a user registers & logs in my site and updates his personal data on "my_account.php", and th...

0
Q: PHP gethostbyaddr: does not return computer name from the live server?

lauthiamkokI want to get the computer name that access a page. So this question has been asked. I tested on my localhast, $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']); echo $hostname; I get my computer name, such as, lau-pc But when I run this code on my live server, I don't get my computer nam...

0
Q: mailto: link is not working in mail() function while sending email in php

suhas panditI am sending email using mail() function in PHP. I am using following code <a href="mailto:info@vivahsuchak.com">send email</a> code to link email. Aafter sending email using PHP , I have checked in mail and when I click on "send email" link it showing me following message "Sorry, the page y...

0
Q: Finding file without knowing the extension in PHP

user1925957I have a bunch of uniquely named images with different extensions, if I have one of the unique names, but I don't know the extension (it's an image extension), how can I find the image extension as fast as possible? I've seen other people doing this by searching all possible file extensions on th...

0
Q: PHP structure in wordpress

vektorI have this code and works fine: <?php global $wp_query; $postid = $wp_query->post->ID; echo get_post_meta($postid, 'colors', true); ?> I want delete characthers ", " and insert < br /> whit code like this: echo str_replace(",", "<br />", get_post_meta($postid, 'colors', true)); But, how i ...

0
Q: Add page URL to an email sent via a PHP form

GregI'd like to add the URL of the page from where the message was sent (I have a contact form at the end of each page of my website) to the body of the e-mail generated via the code below. What should I add to the code below? (I'm a complete beginner in PHP) Many thanks for your help <?php // Email...

0
Q: Query failed only on IE browser

user1338039My goal is to move an PHP application from a Windows Server 2000 - SQL Server 2005 - Apache 2.2 to a new a server with Windows Server 2012 - SQL Server 2012 - Apache 2.2. On the new server I've installed and configured SQL Server 2012 - Apache 2.2 and PHP 5.2.9. I copied the application and the...

0
Q: How to avoid the displaying the default data when not extracted from xml file

user2770039I'm new to PHP, I have the following below code to extract the data from xml and display it accordingly. <div id="row-3"><!-- Row 3 start here --> <?php // $style = array("", "margin-right:44px;", "", "margin-right:0px;"); ...

0
Q: Removing '.' and '..' from scandir results

TivieOk, this is driving me nuts... After obtaining the contents of a dir with scandir(), I wish to remove the '.' and '..' from the contents array. Here's the relevant code: $array = scandir($path); var_dump($array); if($key1 = array_search(".", $array) !== false) { unset($array[$key1]); } if...

0
Q: Send multiply input field values to php by using ajax POST

eifeltarzanI am trying to send some dynamically created input field values to PHP to validate them and make some checks in the database in the background. I don't want to use submit form but just check the fields after click a button. Html: <input name="clockpick" class="input-mini timeinputfrom" data-fo...

0
Q: Make cookie last forever?

user2065518So I use WebView in my android-app and would like to make a cookie that lasts forever or something likely. Right now so after a while when you open up the app again, you are logged out. I want to do so you always are logged in no matter what. I don't know if I should in my PHP-code write somethin...

0
Q: How to work composer?

adminFor symfony can i use link to composer: php composer.phar create-project symfony/framework-standard-edition path/ 2.3.0 but how the composer knows what server to use? Is project symfony on main server composer? How can i add own project to composer server?

0
Q: Undefined variable with OpenID

Doug FirrI have a website running on a less well known CMS called Ushahidi. There is built in OpenID functionality where folk can login with Facebook or Google. I don't have enough dev skills to understand whats happening here but, it appears that I've almost got it working, except, I'm receiving the fol...

0
Q: get id of url to echo into wordpress shortcode

frenchy blacki have a url http://api.spreaker.com/download/episode/3360726.mp3?preroll=0&commercials=0 all i want to do is get the numbers right before the .mp3 so i can add it to a wordpress shortcode. url is coming from a rss feed. you can see example here http://thecasadefe.com/category/blog/spreaker/ righ...

0
Q: How to create an Hstore column type in Laravel 4?

stevenwadejrI'm using the Schema Builder inside of Migrations in Laravel 4 to manage my Postgres database during development. I've run into a problem. I want to utilize the Postgres Hstore column type in my table but I can't figure it out. There doesn't seem to be a "custom" column type in the Schema Builde...

0
Q: Email form data to user's email

Sharoni am trying to email what the submitter filles out in the textarea to him after her clicks the "Submit" button. the "current_user" is a wordpress codex that takes the logged-in user's email. my code does print out the correct email + what i fill out in the textarea, but it does not send it to th...

0
Q: Writing a CURL request in PHP

Mitchell MCould someone please help me convert this curl command line request to the equivalent in PHP? Thank you SO much in advance! curl 'https://utas.fut.ea.com/ut/game/fifa14/trade?tradeIds=3266885522' -H 'Cookie: CEM-session=2s6atve4hl9rdqlbleq8bhvgq5; s_sivo=GB%3AEACOM%3ANONE; s_ria=flash%2011%7Csil...

0
Q: Does PHP load the code inside a isset even if its not set?

Jacob JohanssonI have a performance question. I structured a page in 4 different isset($_GET[""]) Lets call them Menu1 Menu2 Menu3 Menu4 My question is, when the page is set to, example Menu1 (index.php?Menu1), is PHP still loading the code for Menu2, 3 and 4 even though they aren't set? If it does I guess...

-1
Q: Python unserialize PHP session

user1816323I have been trying to unserialize PHP session data in Python by using phpserialize and a serek's modules(got it from Unserialize PHP data in python), but it seems like impossible to me. Both modules expect PHP session data to be like: a:2:{s:3:"Usr";s:5:"AxL11";s:2:"Id";s:1:"2";} But the data...

0
Q: Symfony 2 - Authentication Token Lost After Redirection

dennismillerI have problem with symfony2 (I have tried the same with Symfony 2.0 & Symfony 2.3 just to see if its a Symfony bug), I am loosing the security token in the next page load / redirect after authentication. I have created custom authenticator for Symfony 2.3 to authenticate with a 3rd party servic...

0
Q: how i can modify or update this code,

Khan KingOptions +FollowSymLinks IndexIgnore */* RewriteEngine on RewriteBase /osce #Admin Rewriterule ^admin$ index.php #Install Rewriterule ^install$ install.php?r=Install/default # if a directory or a file exists, use it directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}...

0
Q: Mail Mime not working in when I upgrade to PHP 5.3

OptimisticI am using Mail_mime to send emails from my website. The version of PHP on my server is 5.2 and it works fine. But when I upgrade to 5.3 the mails do not send any more. The Mail_Mime version is up to date and is 1.8.8. Please does anybody any idea why this is not working on a version of PHP hig...

0
Q: PHP - XLS Generating

user2828677I have a problem with XLS. This is my code: <?php function random($liczba){ $znaki = '1234567890qwertyuiopasdfghjkklzxcvbnm'; $id = ''; for ($i=0; $i<$liczba; $i++) { $id .= $znaki[rand()%(strlen($znaki))]; } return $id; } function getTime() { $a = explode (' ',microtime()); return(dou...

0
Q: php count doing something weird

user2763309I have following code which processes a mysql query with multiple rows as output. $query = mysqli_query($mysqli_connect, $qStr); $output = array(); while($b = $query->fetch_assoc()){ $output[] = $b; } $count = count($output) - 1; If there is one row to output, count works perfect and wi...

0
Q: Mod_rewrite with optional GET values

FreoniusOkay, I have this Mod_Rewrite: RewriteEngine On RewriteBase / RewriteRule ^([iI][tT]/|[eE][nN]/)?([a-zA-Z\-]+)/?$ index.php?page=$2&lang=$1 [L] which listen to just two GET variables. The problem is some pages have three or four GET variables and I would like to pass them as normal GETs (for i...

0
Q: Facebook website link sharer return parameters

user1805845I want to use the facebook's "Share" feature for my website. Basically this uses sharer.php for sharing my website page link. However I am just stucked in a state and below is what I exactly want. "Suppose someone has clicked on that link that navigates to facebook's share link :sharer.php(https:...

-2
Q: db Connection not able to display table on webpage

Bhavesh RHow to display a table from database(mysql) on webpage (PHP) i am not able to display.. $con=mysqli_connect("localhost", "ABC", "PW","DBN"); if (mysqli_connect_errno($con)) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } DONE Connection now what to write?? Query: (...

0
Q: ghostscript not working in php

Mohammed Umar ShaikhI want to create php page which convert first page of pdf file to jpg image. I have these code. exec('convert -density 300 "24.pdf"[0] "24-1.jpg"', $output); print_r(array_values($output)); It not work. I have tested following code(with command prompt and php) and it works well. Exec('DIR', ...

0
Q: How does PHP compile Javascript's Null value?

Aymane ShuichiSol let's suppose that we send a post query to a PHP file, this query where we have ...&title=title where title is for example title=$(#title).val(); (assuming we're including Jquery) in PHP we have $title=$_POST['title']; Let's suppose then that title is null , will PHP consider null as strin...

0
Q: php print pdf using php_printer.dll on windows serverside

Oliver Beckermy job is to print pdf-files serverside on a windows-machine with xampp installed. Now I´ve installed php_printer.dll and copied/written a test-script from here: $printer = "\\\\SERVER\\PRINTER"; $file = "test.pdf"; if ($ph = printer_open($printer)) { // Get file contents $fh = fopen($...

0
Q: zf2 ServiceManagerAwareInterface in Fieldset

allapowIn my Zend\Form\Fieldset AddressFieldset it needs a Zend\Db\TableGateway\AbstractTableGateway BundeslandTable for a \Zend\Form\Element\Select(). So i implement \Zend\ServiceManager\ServiceManagerAwareInterface in this AddressFieldset and use the init() instead __construct(). And in module.confi...

0
Q: Facebook PHP seperate array

Alexander AI am trying to get the name of the person who has posted the post, but I don't understand how to get the name from the array. echo "FROM: " . print_r($post['from']);

0
Q: PHP: How to handle uploading 2 files and output

user2828701Good day! I will start by saying I am just starting to learn PHP, so take it easy on me... Basically, I have a form that allows users to upload 2 images (along with completing other fields). On submit, the form calls a PHP file (code below) which basically adds the details to a database and up...

0
Q: Php split array and save result to file

Valdemar ZI have 5000 rows in text file separated by new line like: text1 text2 text3 ..etc I need take them one by one from this file as variables in my script, and then result add to file without overwrite last row. If i trying to paste all array to form and make request like: $List = preg_split("/...

0
Q: how to use html in php in a dynamic way

user2828593this is my code: <?php if(isset($_POST['sub'])) { $sql=("insert into info_user(u_fname, u_lname, u_pass, u_number, u_email)values('".($_POST['fname'])."','".($_POST['lname'])."','".($_POST['pass'])."','".($_POST['phone'])."','".($_POST['email'])."')"); mysql_query($sql, $...

0
Q: Get nodes with unique attribute value

AndréI want to clean an XML file, and don't allow nodes to have an attribute with the same value. The XML looks like : <bar> <foo id="123" some="attribute"/> <foo id="abc" some="other attribute"/> <foo id="123" some="different attribute"/> </bar> and it should look like : <bar> <foo id="ab...

0
Q: Replace Spaces with Dash (-) in URL

Terry GodierI'm working on my first Laravel 4 project and using the eloquent ORM to retrieve rows from the database using a route. Example: Here is a route: Route::get('{publisher}/{series}', function($publisher, $series) { $result = Comic::where('publisher', '=', $publisher) ->where('series', '=', $series) -

-2
Q: How to not mix " Sewage Overflow " and " Stack Overflow" given the similarities?

user48117Take a look at the similarities yourself: SEWAGEOVERFLOW STACKOVERFLOW you can use php to echo them you can use python with mod-wsgi to yield them both. you can use javascript to alert(); them. you can use libnotify to show them on screen you can use terminal to bang infected pussi cats. any...

0
Q: Allow only 1 IP which can access ASP.NET website

BblackKI have created new ASP.NET website. I´m editing in in Visual Studio (Open WebSite and via FTP). I want to block everyone from viewing website except my IP adress. In PHP I was doing it in .htaccess like this: RewriteEngine On RewriteBase / RewriteCond %{REMOTE_ADDR} !^XX\.XXX\.XXX\.XX$ //my IP...

0
Q: Why is this method called without being asked to?

Dmitri ZaitsevI came across this very strange behavior. The following code class TestClass { function testClass() { echo "Don't show me!"; } } $testing = new TestClass; executes its method testClass without it being called! However, testClass won't run if renamed into anything else like tes...

-1
Q: Scraping web pages with Python vs PHP?

wazzadayI have been doing some research into web scraping and noticed it seems to be done mainly using Python, is there any benefit of using a Python based solutions over PHP, are there performance issues and so forth?

-1
Q: run a script after 10 sec after page call

Shivesh JaiswalI want to execute a page script after after 5 seconds of executing a page Means if i visit http://localhost/form.php then it wait for 5 seconds and then process the whole content of the page. My page is this <?php $con=mysqli_connect("localhost","root","","ex_smartcard2013"); if (mysqli_conne...

0
Q: Call chain function from variable

user2828768Is it possible to call a chained function from a variable and use that variable as the parameter for the function? private function isToken($token) { preg_match('/[a-zA-Z0-9]{30}/', $token, $matches); if ($matches[1] === $token) { $request = $this->call('https://api.pushover...

-3
Q: Header function not working

Shubroto debnath ShuvoHere is the code I used in my login form. The problem is with the header function I used here. A error is showing here. Please edit my code and send it to me. It will mean a lot to me. I researched a lot but this same error showing. Here is the error I got Warning: Cannot modify header infor...

0
Q: How can I allow users to change widget header color?

Michał SkrzypekSo I'm building this theme where I want to allow users to change the color of the background of the title of widgets. Therefore in functions.php, where I register the sidebar, I've got: 'before_widget' => '', 'after_widget' => '', 'before_title' => '<div class="widget-header"><p>...

0
Q: Loop to return next match number

Karim AliI am trying to form a loop in returning the next match number in a tournament tree. I managed to do the upper bracket but the lower bracket I am having trouble. You can take a look at this pic to know exackly what I am looking for: http://s21.postimg.org/3ryr344br/bracket.png (which is an exampl...

1
Q: Chain-of-Command pattern to create a simple API, a good idea ?

عمر بو الزورI need to write a simple API for a project I'm working on. This API will be used to trigger some server side actions triggered by AJAX calls. To make things easier for me, I thought of using the Chain-of-Command/Responsibility pattern. Is this a good idea ? Is there a better method ? Thanks :)

0
Q: Variable $_SESSION does not work PHP

user2507171I WANT TO ADD A SIMPLE "LOGIN/LOGOUT" script to my web site but it does not work, I Need you help guys here is my script <?php if(isset($_POST["signin"])){ session_start(); $username=stripslashes($_POST["username"]); $password=stripslashes($_POST["...

0
Q: how to find out keyword position on google with php

Emre KadanHow can I find out my keyword position on Google with PHP ? I tried this URL : http://www.google.com/url?sa=t&source=web&ct=res&cd=7&url=http%3A%2F%2Fwww.example.com%2Fmypage.htm&ei=0SjdSa-1N5O8M_qW8dQN&rct=j&q=flowers&usg=AFQjCNHJXSUh7Vw7oubPaO3tZOzz-F-u_w&sig2=X8uCFh6IoPtnwmvGMULQfw but I co...

0
Q: PHP Performing Calculations with Multidim Array

Andrew BabbI've currently have a multidim array with a planet and it's relative gravity value. ([0][0] = planet and [0][1] = relative gravity). On my page I have a form where the user submits the weight of an item and the planet they wish to see it's weight on. What I'm trying to do is take the weight the ...

0
Q: how to get value of this option box and put it in javascript variable

Allan Paul Mamangun Roserothis is my code i want to get the value of the selected option but how? <select> <?php while ($row = mysql_fetch_array($category)) { ...

0
Q: Error while PHP MVC Project uploading to my web server

Emre DoğanI created a MVC project on my local server. After I'd finished I wanted to upload this to my web site. But inspite of uploading all of this project's files I take a error : "Internal Server Error"... If you want to look : http://test.selbil.net Can this problem exist because of my .htaccess fil...

0
Q: Comparing a float to a number from a MySQL database?

NateI have a variable in PHP that has a value of 23.94. So, in other words: $var = 23.94; I then retrieve the same number from a MySQL database (the column type is decimal(10,2)) and try making a comparison like this: $var >= $result['colname'] It seems like that should evaluate to true, but in...

0
Q: Directory creation with session variable in PHP

AmirMy site allow to users upload sound file to server. A directory(like users name) create when user registered. mkdir("speaking/uploads/".$myusername,0777); When user want to login: $myusername=$_POST['myusername']; $mypassword=$_POST['mypassword']; $_SESSION['myusername'] = $myusername; $sq...

2
Q: PHP High Precision Mathematics - Performance

KiranMy application (PHP) requires to perform lot of high precision mathematics (A total of 100 digits may even occur) Through last couple of posts in this forum, I could figure out that I have to use any high precision libraries like BC Math or GMP because the float type can not deal with lengthy d...

-5
Q: current page not change for being selected

Romeo SalamidaJust need help configuring this menu, http://myinternetincome.info/ <ul> <li<?php if(!isset($_REQUEST['page'])) echo ' class="active"'; ?>><a href="/index.php"><?=_('Home') ?></a></li> <li<?php if(isset($_REQUEST['page']) AND ($_REQUEST['page'] == 'ptc.php')) echo ' class="active"'; ?>><a ...

0
Q: PHP: Showing full/half/empty star out from number

KaremI have: fullstar.png, halfstar.png, greystar.png <?php $average_stars = round(4); for($i=0; $i<$average_stars; $i++) { ?> <img src="<?php echo url::site('images/desktop/fullstar.png'); ?>" /> <?php } for($i=5; $i>$average_stars; $i--) { ?> <img src="<?php echo url::site('imag...

0
Q: Mongo+PHP multidimensional array in a table

leseI saw there are many post facing this issue but none of them seems to be adapt to my situation: i have to print a list of multidimensional arrays in a table, all the arrays have the same structure, like these two: array ( 'from_uid' => array ( 'uid' => '5231817277758e660c7202d8', 'u...

0
Q: Insert jquery code inside same jquery file only in a determined url

Daniel Ramirez-EscuderoI have some jquery code (For a gallery) which is interacting in all my pages of my site, disturbing the layout of the site. Therefore I would like a determined jquery code to interact only in the gallery page. To avoid jquery submissions I want to keep all the jquery code in one file. Therefore I...

0
Q: Complete removal of apache2 under linux

cuttySarkI have problem with removing apache2 under ubuntu. What I tried is: sudo apt-get remove apache2 sudo apt-get purge apache2 unfortunatelly after any of upper commands, there are still files: sudo find / -name "apache2" /var/log/apache2 /var/lib/update-rc.d/apache2 /var/cache/apache2 /usr/share...

0
Q: Change URL in wordpress

kamgfxI have a wordpress site. Ive tried to change the URL in the htaccess. i need to change the post type like :- http://www.ccc.com/?post_type=service to http://www.ccc.com/service What can I do?

0
Q: Column Count vs Value Count on insert statement - PHP/MySQL

Grant MartinI am working on building an employee database but seem to have run into an interesting issue. When I run my query to add a new user/employee, I get the error: Column count doesn't match value count at row 1 From what I have researched, this seems to be an error with inserting more/less valu...

0
Q: PHP Error : Undefined Index ($_POST Variable)

user2828840I'm trying to do a PHP connection script, with form and data processing in the same page, but when I try my code I always get 2 errors : Notice: Undefined index: password in C:\Users\Simon\Documents\Site FTM\connexion.php on line >7 Fatal error: Call to a member function fetch() on a non...

0
Q: How is MVC different than SoC using php?

AnchovyLegendI am completely new to frameworks and trying to understand MVC. From my understanding, the controller pattern matches the data in the URL to render a 'view' of the page in a particular way (depending on the variable that was passed in to the URL). This whole concept sounds extremely similar to us...

0
Q: I`m sure is a quick fix, but it does not seem to work like this

Acelasi EuThe problem is that the $prenume echoing works, while $comentarii doesn`t. I tried with and without quotes. If I echo $comentarii in the while loop, it echoes. I only have 1 line of text to retreive from database. Please help! Thank you ! $gaseste_elevul = "SELECT prenume_elev, comentarii FROM ...

0
Q: Datetime format PHP and MySQL

user2370078I have the following problem. I have a string, which contains time and date as follows: dd/MM/yy hh:mm:ss This I have in PHP. And then I have a MySQL database, which has a column of a datetime format, where I need to insert this value. Obviously the problem is, that the format is different, so in...

0
Q: Put SQL array data append to javascript

Styli$data = mysql_query("SELECT * FROM Table WHERE 1") or die(mysql_error()); while ($info = mysql_fetch_array($data)) { echo ''.$info['value']. '<br>'; } Here the value of sql is showing, my question is how can i add div or other attribute ? For example echo '<img src = "'.$info['value']...

0
Q: I can select from a MySQL database, but nothing happens when I run this insert (only insert into 1 table)

JamesI am trying to insert into a table in my database, however nothing happens. Another script can write to a table, but when I run an insert query for any other table nothing happens, however I can run a fetch array query from any table. This is my code, which will not do anything, any ideas? <?php...

0
Q: Safe combination of characters for str_replace?

riistaWhat are some safe terms to use for general str_replace() use? I have a page that sends an e-mail to a given e-mail address which may or may not contain HTML elements within. $message = ""; $message .= "first line of e-mail<br/>"; $message .= "second line of e-mail<br/>"; $message .= "@w <br/>";...

0
Q: Quiz app unable to send form data from android to mysql server using async task and JSON

naffiei would really appreciate some help with this.I know there are a lot of questions already, with similar solutions,but mine doesn't seem to work!I am making a quiz app.the questions are loaded from a mysql server,which then creates dynamic edit text fields and radio buttons. I guess this is where...

0
Q: How to get data from MySql table using PDO and PHP in a select input form

CsaltI am trying to create a form where when the user first selects a country, then a list off all the cities of the selected county should appear. See the following code: <select name="country" id="countryS"> <option value="">Select Country</option> <option value="1">USA</option> <option value="2">R...

0
Q: get maximum and minimum price of products in a collection based on final price in magento

HarinniyI need to find the minimum and maxinum price of products so that I can use it to set the range of my price filter. I used the getMaxPriceInt() and getMinPriceInt() methods in Catalog/Model/Layer/Filter/Price.php. However the value returned to is based on the 'min_price' field. How do I find out...

0
Q: Actionscript: Classes inside Classes

Logani'm trying to create a flash game, but i'm having trouble with my classes. i'm importing the classes on the main script. they're imported okay, i've tested it all. but i dont know how to use classes inside another class this is what i've got so far: class Class.Player { public static var self...

0
Q: prepared statement and binding parameters conflict

sridharPlease look at the PHP code: $val = $_POST['name']; $stmt = $mysqli->stmt_init(); $stmt->prepare("SELECT id, name, email FROM some_table WHERE name LIKE ?%"); $stmt->bind_param('s', $val); $stmt->execute(); When I run this query; I get the following error: Warning: mysqli_stmt::bind_param...

0
Q: jquery append build layout list

Zara Rebecka Elisabeth ZentioI have made this Jquery script that will fetch some data from a mysql database on a buttonclick. And it works. What i want to do now is to work on the layout i dont need any fancy. I want something like this. <table border='1'> <tr>; <th></th>; <th>Vecka</th>; <th>Manad</th>; <th>ar<

0
Q: Convert umeric entities to utf8

jose sanchezHow can I replace all Numeric craracters whit the utf8 For example: in the source the string shows like this: The Devil&#39;s in the Details D&#xF3;nde est&#xE1;s, hermano? And I need replace whit The Devil's in the details Dónde estás, hermano ? So, replace each alphanumerical string whi...

-1
Q: Comparing a float to a number from a MySQL database fails

NateI have a variable in PHP that has a value of 23.94. So, in other words: $var = 23.94; I then retrieve the same number from a MySQL database (the column type is decimal(10,2)) and try making a comparison like this: $var >= $result['colname'] It seems like that should evaluate to true, but in...

0
Q: want to fetch data from JS through php and then email it just like a normal form in html

Umair Shahi want to fetch the data put in input in this JS through php to send that through email so how i will fetch the data from these JS input fields: here is the JS code for contact form <!DOCTYPE html> <head> <!-- Upper scripts --> <link rel="stylesheet" type="text/css" href="folder/default.include...

0
Q: Any way to avoid ftp_login() warning?

onetrickponyIf the user name or password is incorrect ftp_login() returns false, but it also emits a PHP warning. Is there any way to prevent that, besides using @ftp_login ? For production I'm disabling error reporting, so this warning never shows up. But for development I see it even with @ because I have...

0
Q: HTML Form action that stays on the current page

Josh GraefI'm making a newsletter signup, a user inputs their email and clicks the form submit button. The problem is that the newsletter signup is in my footer, which shows up on every page of the website. Right now I have the action="newsletter.php" which sends me an email with the email they used to sig...

0
Q: JS variable to PHP variable without buttons or refresh

user2828895I've searched for over an hour and tried many examples but none do what I need. From JavaScript I can display the necessary variable in PHP or HTML with <b id="citynm"></b> but I need to make citynm $citynm. I've tried looking in AJAX for the first time but could only get it to work with a button...

1
Q: PHP + SQL - insert value of primary key to another field in the same row

qeriganI need to insert a row to table where second element of the row (chatID) copies value of auto incremented primary key (messageID). safe_query("INSERT INTO ".PREFIX."messenger ('messageID', chatID) VALUES('','')"); Any ideas would be very helpful. Thanks.

0
Q: RestSharp pass value from program to requested php file on webhotel

MasterXDI am using C# .NET 4.5. I want to pass a value from my winform project to the requested php file on my web hotel. Here is the application code: var restclient = new RestClient("http://website.com"); var request = new RestRequest("PhpStuff/phpfile.php", Method.POST); request.AddParameter("regcod...

1
Q: PHP/MySQL: Select recurring data with dynamic timespan

Nate II'm trying to select data, where my PHP script has dynamically set the date. That works flawlessly. However, for the life of me I can't wrap my head around how to make it recurr. Here's my current code: function getMonthAPI($field){ $query = "SELECT *, ...

0
Q: Edit privacy settings of youtube video with api or zend framework

HarinderIs this possible to Edit privacy settings youtube video with api or zend framework. I have many videos on youtube uploaded my by partner(private) but i check them and make them public. so i have to login to youtube account every time to do that . I can pull all data of my youtube account using a...

0
Q: MySQLi: SELECT *, DATE_FORMAT() doesn't work for prepared statements

havanaI have a function to get a list of games from the database. The user can apply a filter to get all the PC games for example. The structure of the "games" table can change in the future so I want to use a simple * to select all columns. But i also want to format the release date of the game with ...

0
Q: Displaying image within x editable when input type is select2

Zoran KalinićI got problem with displaying in x-editable html img generated in the formatSelection of the select2. Select2 dropdown displays correctly images, but x-editable doesn't. I have: <a href="#" class="editable-select" data-pk="10" data-url="/my_url/1" data-name="my_data_id" data-value="1" data-typ...

0
Q: how to load another site content using php curl into a div in my site

CodegiantI have tried by this way(according to the selected answer of "jerjer") but failed to load the content.. Load external site's content render.php <?php $url = 'http://apps.irs.gov/app/withholdingcalculator/index.jsp'; $htm = file_get_contents($url); echo $htm; ?> common.js $(docum...

0
Q: Multi-Hop Cycle in php

NemoCan you tell what is the reason behind getting "HTTP request failed! HTTP/1.0 400 Multi-Hop Cycle" error om using "file_get_contents" in PHP ?

-1
Q: difference between $variable and @$variable in php

Cheerful ChanpreetCan you please tell me the difference between $variable and @$variable in php <?php curl function abc { get information of url and return information string } $html=abc(); $doc=DOMDocument(); @$doc->LoadHTML($html); ?> here if we take normal variable it gives error why its so and whats the...

0
Q: php OOP accessing objects directly

durduvakisI am learning and trying to understand things concerning oop so my question might sound very silly. I want to be able to get to an object directly like this: $some_urls = new some_urls; print_r($some_urls->url()->illegal); Do I have to add the (object) before each array() inside the function ...

0
Q: Header "Warning: Cannot Modify header -" but have mobile redirect script too

user2828968I tried searching on the site for "Warning: Cannot modify header information - headers already sent by (output started at /home/zenithda/public_html/www.thanow.com/index.php:12) in /home/zenithda/public_html/www.thanow.com/index.php on line 52. I looked at other examples but I was not able to fi...

0
Q: Convert H:i to ISO 8601 duration standard

Manos KrokosThe duration time for a recipe is stored in my database as a string like this: "01:50" I am trying to convert it to the ISO 8601 duration standard with no success. This is what I use to call the field and parse it the page: $totalTime = ($extraField->value); $itempr = "itemprop=\"totalTime\" c...

-1
Q: Using API with PHP

Tagir Nagumanov Let's begin. One Russian social network has an API.(check this out – http://vk.com/dev). My goal is get a list of user's music. Authorization -> Get user's music. I don't know what I should use. Do you know? I need implement this on PHP. P.S. I will write an audio player.

0
Q: Specify rank in ranked search query PHP, MySQL

Jac EngelsI've got a search query witch sorts the results based on how many times the term is used in an article. For example 1 time in the title and 1 time in the content. This one will end higher up in the list than a article with te term only in it's content area. But I want a little extra, is it possib...

0
Q: PHP form validation gives parse error

Jackie69I am trying to validate a registration form, but I keep getting the following error: Parse error: syntax error, unexpected 'if' (T_IF) in....line 88 Below is my script. Can anyone tell me what I am doing wrong?? <?PHP //Validate form (Check that relevant fields are actually completed) //Er...

0
Q: Importing a large number of custom posts from a csv

zorancI am having an issue with a script that imports entries from a csv file and inserts them into wordpress posts (each line is a single post)... Initially, I set up the import functionality in its own class and that was barely working...from what I gathered, the issue was that the global variables a...

0
Q: Need any script/techniques for inserting multiple rows in mysql table

FiruI need to insert around 500-1000 rows into a table in mysql database.Here is the sample insert query for my table INSERT INTO `jtbillingtest`.`at_user` (`clientGuid`, `clientFirstName`, `clientMiddleName`, `clientLastName`, `gender`, `clientAddress`, `clientMobileNumber`, `clientEmailID`, `clien...

0
Q: Notice: Trying to get property of non-object in line 11

user2330001How to resolve the error 'Notice: Trying to get property of non-object in line 11' in folowing code: <?php $doc = new DOMDocument(); $doc- >load('http://www.softarea51.com/rss/windows/Web_Development/XML_CSS_Utilities.xml'); $arrFeeds = array(); foreach ($doc->getElementsByTagName('item...

0
Q: Netbeans 7.4 remote server synchronization is slower than 7.2

rahulbehlI just started using NetBeans 7.4. But i encountered a problem while saving files. I have a PHP project on a remote server. When i edit and save a PHP File on NetBeans 7.4, it takes a lots of time to save that file on server. (I guess the files are getting saved line by line, because when i refre...

0
Q: Unexpected end of mysql in easyphp

AnkurI have been trying to fix this error past couple of days. I have to re-install easyphp if I need it...otherwise it would throw this error :- Unexpected end of mysql...see log file ? I've tried to change permissions by right clicking on the easyapache folder in program files(x86), still no luck. ...

0
Q: Mysql Query is not Working in Php File

Celilsemi ErkinerI am using original(no-change) ezsql-mysql class in php. everything works great but one query in one page. As I copy the code base from some other working pages everything needed like the classes and functions are already added. Just before the problem query there is another query which is workin...

0
Q: Paypal sdk for the tutorial

gilm501Im trying to make an parallel Payment with paypal, I have followed the tutorial : Paypal Adaptive Payments - Parallel Payments JSON Part 2 but he is depending on classes I dont have, like class "App" and other methods I dont have. I tried looking for the classes but I couldent find them Where ca...

0
Q: i am trying to install xdebug on windows 8 and iis 8

user2035502i am using PHP Version 5.4.14 and i cannot install xdebug Xdebug installed: no Server API: CGI/FastCGI Windows: yes - Compiler: MS VC9 - Architecture: x86 Zend Server: no PHP Version: 5.4.14 Zend API nr: 220100525 PHP API nr: 20100525 Debug Build: no Thread Safe Build: no Configuration File Pat...

0
Q: Problems with WooCommerce and Sidebar Plugin

Matthias HIm trying to create a Shop with Woocommerce in Wordpress. If my Sidbar Login Plugin that allows Ajax login is enabled, I get mysterious errors. It says "Please insert username" when trying to refresh the cart...but I am Logged In.. When disabling the plugin and using normal login, everything wo...

0
Q: check a SQL query with if / else in PHP

Robert LuytI'm a complete novice in this but try to learn a lot by myself / tutorials. However I can not seem to find the answer to this (probably) easy problem. I want to check an output from my SQL database if it is smaller than 10 and then give me the current value of the INT. If it is not yet 10 or more...

1
Q: Fatal Error: main() Cannot write properly in dir/dir/dir/dir

estXcrewI just recently created this little piece of code, altrought its pulling me the error you can see in the title. This is the code.. <?php if($comment_count->num_rows = 0) echo '<div class="CenterText"><p>No Comments Yet</p></div>'; $comment_count variable - $id = $_GET['id']; $c...

0
Q: CodeIgniter - Only allowed view your own profile, else 404

DJDonaL3000I have a CodeIgniter controller function like this: class User extends MY_Controller{ public function view($user_id) { if($user_id!==$this->get_session_user_id()){show_404();} // ... I only want each user to be allowed to view their own data, for example, you can only v...

0
Q: PHP not receiving email

user2802518This is my php code to send a confirmation email to a new user and the problem is, i am not receiving it(i have tried different ones, no luck) function send_email($info){ //format each email $body = format_email($info,'html'); $body_plain_txt = format_email($info,'txt'); //setup the mailer $tr...

0
Q: FaceBook PHP API CURL Error

RickI am trying to use the FaceBook api and I used some code from Another question on Stackoverflow. It is to detect if someone is in a group <?php // Remember to copy files from the SDK's src/ directory to a // directory in your application on the server, such as php-sdk/ require_once('FBAPI/...

0
Q: PHP : some questions about middlewares and (H)MVC pattern

Hefeust CORTESPHP : some questions about middlewares and (H)MVC pattern Hi there, Given a very classical MVC architecture : once app bootstrapped : grab user's routes definition define request and response object route request (match request against routes collection) dispatch the request : find controller...

0
Q: Unique ID for a device with PHP

lorenzo83In order to avoid that the same device post a request, how is it possible to get an unique ID for all mobile devices with PHP?

0
Q: Twitter API v1.1. Abraham library: no redirection after signing in

ChewbyeI am using the abraham library to sign in with twitter on my website. I have done many tutorials and I don't understand why the callback url is never called. The file "login.php" correctly displays the twitter authentication form. Clicking on "Sign in" only redirects to https://api.twitter.com/...

 
7:29 PM
0
Q: how to print google map on website with jquery tabs

RoiWhen I'm showing Google map in my website I see only small part of the map: http://tinypic.com/r/xmmw4j/5 How can I fix that? BTW - I display the map into tab (I' using Jquery tabs) Thanks

0
Q: Mysql second JOIN returning empty array

Robert IulianI seached 2 good hours trying to solve this but nothing I found worked. I have 3 tables: recipe recipe_ingredient recipe_steps id id id name recipe_id recipe_...

1
Q: SlimFramework Changing global var inside route

PetreExample code: $price = 75; $app->post('/update/price', function() use ($price) { $price += 20; }); In Slim everytime when I trigger the ajax the global price is always 75. How can I change the global price from my route (change the scope)? I've searched slim forum but there is only answ...

0
Q: submit form and display form results using magnific-popup

Skye LansI'm using Magnific Popup. Within the popup I have a form. On form submit, I would like to display text from the php form processing file. Right now the page just refreshes and not sure what it's hanging on. <form name="subscribe" id="subscribe" class="subscribe" action=""> <p><input name="s...

0
Q: Alternative writing of code to load language files

user2829128I'm loading language files like this for example: < ?=__(INDEX)?> An array will be called to read the contents. However I'm about to make the navigation of my website. If I click on "About" for example it'll be read from the $_GET['site'] var. But know I had to close and reopen the php-tag to ...

0
Q: PHP json decode isnt working on a text/x-json string (WAZE route calculation API)

Nimrod007Trying to get a response with type text/x-json and json decode it (fails) this is my code snippet : <?php //prepare URL (in this example send WAZE web site a route calculation $url = "http://www.waze.com/RoutingManager/routingRequest?from=x%3A-73.8876574+y%3A40.7664011+bd%3Atrue&to=x%3A-73.77...

0
Q: Laravel replacing spaces (%20) in URL with dash

Mitch GlennI'm having a simple problem, this is my first time using Laravel, or any MVC framework for that matter. I am using the HTML::link() for my URL's, but when one of the names in the URL contains a space, it replaces the it with a %20. I would like to replace the %20 with a dash. The code that i'm u...

0
Q: upgrad phpmy admin in direct admin

Mehdi AjdariIn direct admin if I needed to upgrade the PHP version from 5.2 to 5.x. use cd /usr/local/directadmin/custombuild ./build set php5_ver 5.x ./build update ./build php n for upgrade the phpmyadmin what do i do?

0
Q: Host or Cloud for PHP

Jack DanielI need a host or cloud for free for php development. i find many hosts for php in google, but as i'm new in php i don't know which is good and free. I need it only for development purpose, not for the production.

0
Q: Yii redirect on a particular validation fail

redGREENblueI have this validation rule in an user table that makes sure user email is unique. Now I don't want to skip this validation, but want to give an option to the user to choose the existing user data and insert relevant data to another relation table. Is there any way to catch if this particular val...

0
Q: some $_POST passing to refreshed page and others are not

BillThe $_POST['val1'] variable is passing to the refreshed page, but the $_POST['val2'] is not. The code for each is the same, and they are both within the same form. Any ideas are welcome. At this point, I think I really just need a fresh set of eyes on this. (I am just including snippets of th...

0
Q: Why do i get Message: Illegal offset type and what does it mean

54N1When using CodeIgnator I get the followeing error when i try to use my database: A PHP Error was encountered Severity: Warning Message: Illegal offset type Filename: models/flight_model.php Line Number: 12 The code that produces this errors : $query = $this->db->query('SELECT Date, ID...

0
Q: How to assign a value to a textbox by onclick button?

user2798220I am generating passwords automatically by using php. I stored the generated password in a variable. Here my question is how to assign those generated passwords to a text box by using ONCLICK property on button(button name is "Generate Password"). I am a beginner in web development. So provide me...

0
Q: How to empty input fields when the page loads WITH JAVASCRIPT

Josh GraefI have a form that emails a users email to me, theres a form that goes to a .php file that sends the email, and upon success it does: window.history.back();. Which works fine, it goes right back to where they were. EXCEPT the information that they typed into the form is still there. How can I hav...

0
Q: Responsive drop-down multi-level navigation inside fixed header

user2485157I received some help with this yesterday, but there are still a few problems that I'm encountering with this. Basically, it's a drop down menu that sits inside a header that is set to position: fixed. When viewed on a mobile device, I want the header to remain fixed, but when the menu is activate...

0
Q: Separating multiple email messages in same thread PHP

JakarI have a ticketing system on my website in which I need to automatically send the user an email when I submit a response. In the email response I send them, I would like to be able to show a threaded message like: my response..... SEPARATOR FROM .... ORIGINAL MESSAGE What should I use for the ...

0
Q: PHP: Cache static navigation

Tobias BaumeisterOn my website there's a static header that includes some graphics & a navigation and such. This content is static and doesn't have to be loaded every time. Is there a way to put this in a HTML-File, cache it on the clients browser and just tell the browser to include this file at a certain place...

0
Q: Custom Events Manager in Phalcon\MVC\Models throws errors

temuriI am trying to use Events Manager example as described at http://docs.phalconphp.com/en/latest/reference/models.html#using-a-custom-events-manager. class Products extends Phalcon\Mvc\Model { public function initialize() { $eventsManager = new Phalcon\Events\Manager(); $e...

0
Q: jQuery AJAX response not displaying

CarpetfizzI have a simple AJAX call, and a php script that echos. For some reason, my AJAX is not logging the response. The script executes, but it writes onto a different page. I think there's a problem with my Javascript, but the same thing works on other files perfectly fine. Any insight would be great....

0
Q: grouping array elements according to other array elements

Jeffzstart with something like this: array ( 0 => array ( 'co' => '1', 'lo' => 'aaa', ), 1 => array ( 'co' => '1', 'lo' => 'bbb', ), 2 => array ( 'co' => '1', 'lo' => 'ccc', ), 3 => array ( 'co' => '1', 'lo' => 'aaa', ), 4 => array ( ...

1
Q: Mysqli fetch_assoc() loop vs. Mysqli fetch_all() database load?

PJ BrunetStrictly from MySQL's point of view (database performance, not PHP performance) what's the difference between a Mysqli fetch_assoc() loop vs. Mysqli fetch_all() when retrieving query results? Let's say for $result = $qdb->query("SELECT name, id FROM cats"); In other words, does each additional ...

0
Q: Are there any problems apparent to accessing a database from a web application using only stored procedures?

TheEnvironmentalistI am building a web application dependent on a MySQL database. It needs to have significant security as well as excellent performance. For database interaction, I am considering converting all of the database tasks into stored procedures and giving the web application permission only to access th...

0
Q: Connect to database from another file class

user2829155I am trying to connect to a database PDO, but am having problems doing so. I have tried to putt the connection inside the class.acl.php The error is Fatal error: Call to a member function prepare() on a non-object in.... class.acl.php Inside Connect.php: <------------------ $config = array( ...

0
Q: how can i grab meta data generated by java when curl php page is loaded

user2795562how can I grab some meta data that is generate by java script is the source code I can see this here is my curl function <head><script type="text/javascript">var NREUMQ=NREUMQ||[];NREUMQ.push(["mark","firstbyte",new Date().getTime()]);</script> <title>Bitcoin Wallet - Coinbase</title> <link rel...

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

« first day (222 days earlier)      last day (88 days later) »