« first day (288 days earlier)      last day (22 days later) » 

12:02 AM
-3
Q: Can someone please convert this function from C# to PHP?

user3063740 public static string getVariableFromSource(string key, string page) { try { page = page.Remove(0, page.IndexOf("name=\"" + key + "\"")); page = page.Remove(0, page.IndexOf("value=\"") + 7); return page.Substring(0, page.IndexOf("\"")); ...

 
12:14 AM
0
Q: Wordpress: Display posts from category select menu

ultraloveninjaI'm trying to get the category ID from wp_dropdown_categories(); and then pass the ID into a loop to have it output posts titles from that particular category into a div and then if a user selects a different category from the select menu, it will update the div with the post titles that are asso...

0
Q: Multiple pages using MySQL LIMIT, OFFSET

PixelCheeseI have some code that LIMITs data to display only 4 items per page. The column I'm using has about 20-30 items, so I need to make those spread out across the pages. On the first page, I have: $result = mysqli_query($con,"SELECT * FROM menuitem LIMIT 4"); { echo "<tr>"; echo "<td align=...

0
Q: Facebook GET Http Request

user2618086I'd like to ask a relative question to you. I say relative, because it is very hard for me and very easy for you. I've tried and tried to make a live FB Feed on my site and here is the result: When I entered; https://graph.facebook.com/{pageid}/feed?access_token={appid}|{appsecret} I received...

0
Q: Double? Integer? -- PHP

gtilflmThe following code generates two random decimal values, then subtracts them to get $c. $a = mt_rand(5, 75); $b = mt_rand(5, 75); $adjuster = mt_rand(2, 20); do{ $decimal_selector = mt_rand(1, 6); if ($decimal_selector == 1){ ...

0
Q: Can Codeigniter's core functions work from within custom functions?

kaeoI have many controllers that use the same blocks of code that take varying sets of arguments. These blocks of code are identical, which I would like to move into a Helper File, which I can then call, instead, as a function in my controllers. However, when I move the code into a custom Helper, co...

0
Q: how to get form method type in Zend framework?

Justini came across to a kind of dilemma when working on my project in Zend Framework. When we submit a form, we get the values like this: $post = $this->_request->getParams(); this will basically capture all the names in a form that is submitted and i can reach the single name value like this: $...

 
12:32 AM
1
Q: PHP imagecopy() erases old image, intermittant

blha303I'm having a problem on a site I made where occasionally, a file I'm overlaying on another file somehow becomes the file saved. Apparently I can't embed images or post more than two links, which makes it a bit difficult to explain what's going on. I made a demo page on my site with the images and...

0
Q: Prepare seems to be striping quotes from string so that it is not accepted by the mysql datetime field

rosscosackI would like to update a DATETIME mysql field using a php STRING in a prepared statement $stmt = $mysqli->prepare("UPDATE TABLE1 SET DATETIME1 = ?"); $stmt->bind_param('s',$date); $date = "2013-12-04 00:00:00"; /*string '2013-12-04 00:00:00' (length=19)*/ $stmt->execute(); I had expect that m...

0
Q: Fastest way to count number of rows in MySQL database in Laravel?

wnajarI can think of a couple ways to count the number of rows in a table with Laravel (version 3). DB::table('threads')->count(); Threads::count(); Threads::max('id'); DB::table('threads')->max('id); DB::query('SELECT COUNT(*) FROM threads;'); Are any of these notably faster than the others? Is th...

1
Q: Function using output buffer works in dev but not prod

teunaI use this function in my views to position various content blocks. function block(&$block = false) { if ($block === false) return ob_end_clean(); return ob_start(function($buffer) use (&$block) { $block = $buffer; }); } I never had problem with it until today. My blocks don't show up ...

0
Q: PDO PHP SQLite3 database connection General Error 14

ShaneHI have 2 sqlite3.x databases (from an iPhone), one from a game app, and the other is the address book. I have logging and display errors 'on' in the php conf. Using PHP/PDO I can display the fields and values from the game database, including image blobs which I catch with my results page and r...

0
Q: Whats wrong with my php login page?

user3033100Ok so i get this error when i try to login Notice: Undefined variable: numrows in C:\xampp\htdocs\website\login.php on line 14 That user doesn't exist do you notice any errors right away trying to learn php and mysql. here is the code INDEX PHP PAGE <html> <form action="login.php" method="P...

-1
Q: I would like to read $_FILES with a Javascript loop

user3063795Here is part of my Javascript function: var x=document.getElementById('DigitalFiles').rows[R].cells; x[0].innerHTML= $_FILES['files']['name'][1] <<<< this $_FILES is not working ! What syntax will work, please.

0
Q: PHP - Vimeo video detection for preg_match()

simPodI'm trying to detect, whether my Vimeo link is in Vimeo format (http://www.vimeo.com/nnnnnnn) I tried this: preg_match("/http:\/\/(www\.)?vimeo\.com\/(\d+)/", $link); However, it doesn't seem to work. Whats wrong? Thanks.

0
Q: Why is fetch_assoc returning false?

user3050475 $stmt = $mysqli->prepare("SELECT username, email, password, code FROM temp_users WHERE code = ?"); $stmt->bind_param('s', $code); $stmt->execute(); $stmt->store_result(); //if SELECT statement returns 1, grab data. if ($stmt->num_rows === 1) { echo "Got Row"; ...

0
Q: Warning: array_key_exists() on wordpress site, how do I fix?

js111I'm getting the following error you see below on my wordpress site.. Any ideas? Thanks! Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in wp-content/plugins/display-name-author-permalink/display-name-author-permalink.php on ...

0
Q: How do I Disable the Code Cache for PHP 5 (FPM) with Nginx?

NickWhen I save changes to a PHP file and then reload, it continues to execute the old version of the script for a minute or so regardless of how many refreshes I do. After 1 minute (or so) it executes the current version. How do I disable this behaviour so changes occur immediately? Setup is PHP-F...

0
Q: Creating trigger works well in PhpMyAdmin, but fail in PHP

Shengeveryone. I hope this question not too stupid to get any response. I am creating a trigger in MySQL. The statement is as following: DELIMITER | CREATE TRIGGER checksubtime AFTER INSERT ON submission FOR EACH ROW BEGIN IF NEW.date = '0000-00-00' THEN DELETE FROM `submission` WHERE `id`=NEW.id; EN...

0
Q: How to get a value from HTML into PHP variable?

user3063854I need to store a user input into PHP variable but I not able to do so. Here is the code that fetches values from database: <?php while($Row = mysql_fetch_array($Query_Result)) { { ?> <tr> <td><?php echo $Row['Product_Name'] ?><

0
Q: getting the filepath of a file input in php

marchemikeHow do I get the filepath of the a file that uploaded using the file input? My code is: This is my file input <input type="file" id="filebut"> The textbox that I want my filepath to show <input id="browsephoto" type="text" readonly> I want it that when I select a file using my file input,...

0
Q: Laravel 4 / Displaying posts with a category header (relationships pb)

user3063798This is what I'd like to display on a course index page. Category 1 -- Course 1 -- Course 2 -- Course 3 Category 2 -- Course 4 -- Course 5 -- Course 6 Course Table Schema::create('courses', function($table) { $table->engine = 'InnoDB'; $table->increments('id')->unsigned(); $table->integ...

-2
Q: The contact form is not workig

user3063855Please help with below contact form where it dont seems to send the to designated email. the codes for the form. <h4 class="bolder">Leave a Message</h4> <form class="form-horizontal"> <p > <form name="form1" method="post" action="send_contact.php"> <...

0
Q: AES 128 encryption in Java, PHP - difference in outputs

darkravenFollowed AES 128 encryption in Java Decryption in PHP in writing the code for aes 128 encryption between Java and PHP (decryption - java, encryption - PHP) Java Code import java.security.MessageDigest; import java.security.spec.AlgorithmParameterSpec; import javax.crypto.Cipher; import javax.c...

0
Q: create excel grid populated with data via PHP / Mysql

Jay ManI am trying to use PHP to pull information out of a mysql database and then populate it into a excel file in a grid like format which is seen in the attached excel file. Basically my issue is as you can see the php code is working that takes the id numbers and customers name out of the database i...

0
Q: How can I allow a user to access an on-the-fly webpage resource via a link?

amessierOn websites like Amazon.com, a user can run a search and is taken to the web results page. The user can then click on a link and be taken to a specific resource page. In the URL, you can see something like "http://www.amazon.com/Razor-Scooter", indicating the scooter as the resource. It's even do...

0
Q: trying to create a file and a folder for user details

user2617739my script wont work. it says no such folder, im missing something it's supposed to create a folder if it doesnt exist with the date of today, and a file inside with the date of today. in that file, it'll put the user's ip & details // create log for security messures, because user returned zero ...

0
Q: What is the best way to use XSLT 2.0 with PHP?

user2958190This is my second question on the site, like always, I've spent several hours reading a lot of related questions, the 2 most relevant are: Will XPath 2.0 and/or XSLT 2.0 be implemented in PHP? Which explains a solution using PHP/Java Bridge and Saxon. And Upgrade PHP XSLT processor to XSLT...

0
Q: using a text file to determine subdomain includes php

user925738Ok i have 2 files - index.php that has and if statement that is as follows: $sub = array_shift(explode(".",$_SERVER['HTTP_HOST'])); if ($sub == 'localhost') include 'home.php'; if ($sub == 'whateversubdomain') include 'correspondingphpfile .php'; I also have a text file that has: ...

-1
Q: How to loop through array, increase count and output

jrutterIm trying to loop through an array in PHP and use the counter to increment the page number. If I replace $counter with "1" - it works. I know something isnt right here. for ($counter = 0; $counter <= 10; $counter++) { $messages = $client->readMessages(array('pageNumber' => $counter, ...

0
Q: Php Undefined Index Error On Login And Member Page

user3033100OK so i am new to php and i am having a error with my log in and member page here is the code. I don't know why i have this error any help with me greatly appreciated please comment as soon as possible. LOGIN PHP PAGE <?php session_start(); $username = $_POST['username']; $password = $_POST['...

0
Q: SSH2 PHP class will not add user password

TooCooLThis is the script I wrote to create and assign password for new user. $ssh->exec('useradd web3 -s /bin/false -d /var/www/web1 -g ftp-users'); $ssh->enablePTY(); $ssh->exec('passwd web3'); $ssh->read('Geben Sie ein neues UNIX-Passwort ein:'); $ssh->write("web3\n"); $ssh->read('Geben Sie das neu...

-2
Q: SQL JOINS Please help me out

user3063908Hi Im extremely new to php and mysql and have come across a couple of problems while trying to complete a project. I know there is lots of information on this topic however i just dont get it (sorry). I have 2 tables 1 named customer and 1 named complaints, i have a form that gets filled in and t...

-4
Q: how to fix this error? im using php

user3060799The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator at admin@example.com to inform them of the time this error occurred, and the actions you performed just before this error . More information about this...

0
Q: Calling data form multiple database tables based on session values

user3063919Hey Guys as you can see from this code, I'm trying to use two databases. i want to select the row in the Company table, where the Company-Id = Company-ID in companyusers table... where the Username in the companyusers table is = $_SESSION['username'];. I tried a whole bunch of variations none of ...

0
Q: sum sql with currently login user

noobhttp://i40.tinypic.com/x60e4o.jpg <----- tables i have a problem with sum sql. this is the case, when someone login in example "Untung Budi S. S.Kom" i want that sum sql to sum the "pilihan" column with condition where idPertanyaan = '1' AND idDsn = "ID of the currently login user". i don't kn...

 
1:52 AM
-1
Q: How to automatically post to google+ with php

Franky Soi want to post in my Google plus when i create a post or something in my site i have searching in Google API but i cant find something good stuff. share if you have anything useful. thank you.

0
Q: string from json appears fine with js eval() but has weird characters when i decode it in php

Dimitris Cali have a json file : LINK TO JSON PAGE when i decode it with js eval i get the content with links etc. But when i try to decode it using php i get some weird characters To see what i mean just paste the content of the JSON file here :ONLINE JSON PARSER and then as you can see on your left han...

0
Q: PDO UPDATE Table with NULL value - MySQL

A.O.I am trying to update a column in my table to NULL using PDO prepared statements and I cannot get it to work. I have tried many different combinations of bindValue, bindParam and PDO::PARAM_*** to no avail. The column I am trying to set to NULL is a VARCHAR(20), the default is NULL, and NULL is...

0
Q: php - syntax error, unexpected T_DOUBLE_ARROW

user3051384how i can rid of this error?? Parse error: syntax error, unexpected T_DOUBLE_ARROW in /var/www/core/restvt.api.php on line 35 PHP Code : $datax = Array(); foreach ($inis as $key => $data){ if ($data=="mem"){ $str = number_format($ARRAY[(array_search($data...

0
Q: Having Problems Getting The Correct Widget Area To Display

user2868832I have probably missed something but I have been trying to work out what and I am having no luck. I have added a new page template to my wordpress site, created a new widget area (necessary as this is how the original designer built the site). However, the page appears to be calling content from...

0
Q: PayPal IPN Verified but won't executing code

Hulu8004I have been working with this issue for a few days. It shows on my PayPal account IPN History that it has indeed "Sent" the IPN message but it does not execute the rest of the code when its "VERIFIED". here is the IPN code <?php class IPN extends MainController{ function __construct(){ ...

0
Q: Loop not working correctly (floats and integer issue?) -- PHP

gtilflmThe code below generates two random decimal values, then subtracts them to get $c. The do-while loop is trying to ensure that $c will not be a whole number. But I keep getting times where $c actually is a whole number. do{ unset($a); unset($b); unset...

0
Q: General error: 1267 Illegal mix of collations

DJaYI want to fetch all users that are approved. Basic info is stored in one table, while whether is user approved or not in another table. Here's a query: $tbl1 = 'n_users'; $tbl2 = 'n_status'; $query = "SELECT * FROM `$tbl1`, `$tbl2` WHERE $tbl1.id=$tbl2.id AND $tbl2.approved='1'"; What's wrong...

0
Q: Php Subtract Date Time

user3063983I'm having problems with subtracting dates in php.. this is my code. $fulldate_hour_start = "2013-12-01 01:00:00"; $fulldate_hour_end = "2013-12-02 08:01:00"; $Result= number_format((((strtotime($fulldate_hour_end) - strtotime($fulldate_hour_start)) / 60) / 60 ),2); echo $Result; Th...

0
Q: How to grab cookies from remote URL and send them back to the browser

user3063874I am building a simple php proxy that caches responses header and objects . My problems are that if I login to youtube.com then I dont see myself as I am signed and youtube keeps saying sign in (not signed) , but If I stop my script and just open youtube.com website then I see myself as signed ...

-1
Q: How to print 0.00009 and lower number

user2351722Trying to echo 0.00009 number gives me 9.0E-5 tryed to do echo number_format($number); it echoes 0, maybe someone could explain me how to print my number and even lower ones.

0
Q: How can I set a resolution restriction on my PHP uploader?

user3064004I want to set a max picture resolution on my PHP upload button. I currently have it so that only JPEG, PNG and GIF files can be uploaded, and the max file size is 1MB. It works great but I would like it to have a maximum resolution restriction. Thanks!

0
Q: PHP and SQLite - Issue with string including space

user1971692I'm trying to make a website to access a SQLite database and retrieve info on different people. However, I'm having some problems. Here's my code for my index page. <?php $db = new SQLite3('people.db'); $results = $db->query('select FirstName,LastName from People'); ?> <html> <head> </head

-2
Q: MySQL server version for the right syntax to use near 'Amritsar')' at line 1

EcoWebtrWhat is this error ? is anyone know ? When i post in localhost this error will come what is this error where is the problem in my code ? You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Amritsar')' at line 1 <...

0
Q: Allow access to a specific php file in CI root

Myke SolidumI created a test.php in my root. and wanted it to be accessible but its giving me a 404 error. Please see below for my .htaccess config. RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,NC,L] RewriteCond %{REQUEST_FILENAME} !-...

0
Q: How to force email validation to open in webview android

Miguel RiveraI have a friend who created an online betting game. Now, in order to deploy it on mobile, I just created a webview to display the website. First, you have to register. After registration on my phone, I opened my Gmail. I clicked the Email Validation Link, but instead of opening the webpage on the...

0
Q: Php Undefined index?

user3033100OK so I am making it to where when the user logs out and they try to go back to the member page it says you must be logged in to veiw this page well the echo is displaying that they must be logged in and its keeping them out but there is an error. Here is the page. it says there is a problem on l...

0
Q: How to check if user already exist?

user3064002class Users { public $username = null; public $password = null; public $salt = "Zo4rU5Z1YyKJAASY0PT6EUg7BBYdlEhPaNLuxAwU8lqu1ElzHv0Ri7EM6irpx5w"; public function __construct( $data = array() ) { if( isset( $data['username'] ) ) $this->username = stripslashes( strip_tags( >...

0
Q: PHP preg_replace numbers following immediately after a match

user2537383here is the sample string I will be working with: john:4 40 4 guy:42 402 42 jack:6 666 8 I am trying to match the word guy, and replace the following three numbers with other data. Here is a variation of what I have been trying $userString = "john:4 40 4 guy:42 402 42 jack:6 666 8"; $expressio...

 
2:40 AM
0
Q: regular expression / preg_match_all with optional matching

duellsyI'm trying to create a very minimal templating system for my sites users, allowing them to add in variables to their content. What I'd like is a regular expression to run on the following in php: <p>Hi {{ user.name | fallback="awesome person" }}!</p> Which will give me back the following item...

0
Q: Can't get information about username and password from MySQL when doing log in page

user3047744I got a assignment to do log in and register page using ajax, php and jQuery. The problem is that when register page passes the information to my MySQL database witch name is users and it includes username, password, fname, lname and email fields, I can't get logged in with the same information. ...

0
Q: $_FILES not showing when submitting the form

marchemikeI'm trying to submit my file input, but when I submit the form and show the output ,the action does not get the $_FILES array. My file input, I open it by using a jquery click function.(I need it to be hidden because I have another button which I use for the upload) <input type="file" style="di...

0
Q: Kohana CRUD: Undefined Variable

JamsHackPHP Function to select and display all the records stored under the column "clubName", from the table 'clubs'. The foreach statement ($club) returns an undefined variable error. What have I missed? Controller: <?php defined('SYSPATH') OR die('No direct access allowed.'); class Club_Cont...

0
Q: how to pass value from php to python and print it using python

VincentHow to pass a value from php to python <?php $print_this = "hello world"; //pass it to python. then echo it in here. like "world hello" ?>

0
Q: Fatal error: Call to undefined function redirect() in dev/add_comment.php on line 19

user3064038Im not sure if im just having a problem with the redirect or also with some other lines so here are my files add_comment.php <?php include ('connection.php'); $id = $_GET['id']; $name = $_POST['name']; $email = $_POST['email']; $website = $_POST['website']; $content = $_POST['content']; $date ...

0
Q: Is there a way to round up a fraction in PHP even if it's less than half (.499... or lower)?

Ethan AllenI have a number 5.0000001 in PHP. Is there a way to round any number (not just half or above) about 5.0 up to 6.0?

0
Q: Login page goes directly to the site without checking credentials

user3064031I am currently having a problem in which the login page to my website goes directly to the homepage without checking the users credentials stored in my data base. The code I use to register the users works just fine but for some reason I cant get this working properly. <?php session_start();...

0
Q: Putting a row in the table at each 4 image using php?

Shiv ChandThis is what I want to happen: ------------ ------------ ------------ ------------ | | | | | | | | | image | | image | | image | | image | | | | | | | | | ------------ ----...

0
Q: I want to retrieve / output name in text field once I write the idnumber in text field

user3029499Sorry I have to asked again this question because it seems like it was not clear according to the answers which i have got. I have two Mysql table as follows 1: registration student_id | name |class | date | country | address 2: payment student_id | name |class |school_fee | hostel_fee ...

0
Q: Filter Livetable Data using parameters

Daryll CI want to add some filtering options to filter table data. Let say I want to filter table whose country is India based on the select option data from database and the table will only show data from country India. <html> <?php $result = @pg_query("SELECT * FROM country order by country_name"); e...

0
Q: Multiple scraping with Nokogiri and ruby

user3059362I am trying to find a program or write a script that will scrape the airport names and website URLs for the Airports from several webpages across a website. The webpages are all linked to one URL so I am sure there is a way to have a spider script extract the airport names and websites for the a...

 
3:10 AM
0
Q: Facebook signed_request Invalid

user2518601So I've been fiddling about with creating a Facebook Page App and am running into an obstacle. The API Documentation (https://developers.facebook.com/docs/reference/login/signed-request/) indicates that it is a json encoded base64 encoded string, but I've found that more often then not it doesn'...

0
Q: How can I loop though each row in a text field?

MikeI have a textarea where I ask a user to type multiple values on a separate line. "One value per line" So I used this function to do it. function textToArrayEFL($text){ //explode all separate lines into an array $textAr = explode("\n", $text); //trim all lines contained in the array. return ar...

0
Q: Bigcommerce PHP API - No data returned

ZetaphorI'm using the single file PHP library. I've got the store connecting, but I am getting no data back. Here is my script: <?php error_reporting(E_ALL); ini_set('display_errors', True); require 'bigcommerce.php'; use Bigcommerce\Api\Client as Bigcommerce; $settings = array('store_url' => ...

0
Q: How to install pdftk in webmin server for working with php

Mehedee Rahman SetuI was using simple following code but no data in the txt file. <?php passthru("/usr/bin/pdftk Test.pdf dump_data_fields > form-fields.txt"); ?> I have just uploaded usr folder to webmin server. https://www.dropbox.com/sh/4svy9wifs02ia6b/YtQAFqsVN0/usr.zip Do I have to follow any additional...

-1
Q: How to read a file in PHP, then write only certain lines back out to another file

RoverI have a simple text file (it's an m3u8 playlist) on SERVER A. On server B, I need to have a PHP script that reads the playlist file, then writes only certain lines from it to a new file on Server B. I can open the file via file_get_contents just fine, and even write it out to a new file just f...

0
Q: fpdf : increase size of footer and add multiple lines in pdf

Victor NjorogeI am using FPDF to generate a report. I have a fairly large amount of data I want to put in my footer. i.e the name and signatures of three people I would like it to be on multiple lines. PROBLEM: It keeps on being pushed out of focus. Not to the next page buti cannot see it once it reaches n...

0
Q: Editing and Deleting in Codeigniter

medellin81391I created a table with search functionality that displays information from my database. I have made so on the last 2 columns of each row has an edit and delete link. The problem is that the when I click edit it won't direct me to the form I created and linked it to, As for the delete link it won'...

0
Q: How to split content after a space

user3064132I'm just a newbie in PHP , now I have a trouble with the split content function, I have a string look like this : $tring = 'World Cup 2014 draw: England's chances of landing tough group rise'; my splitcontent code : if(strlen($string)<$width){ return $string; } $string = s...

0
Q: Apostrophe in form submission to add row to MYSQL causes error... not sure if I should use "mysql_escape_string" and if so how?

user3064125I've done some googling but am still confused on how to handle apostrophes when I insert data into a php form to add my database. Currently I enter everything without the apostrophe then manually go in through phpmyadmin to add apostrophes where they should be which is a pain. I understand why I ...

0
Q: what is basic information of php language?

Manpreet Singh  ੴPHP (Hypertext Preprocessor) is server side scripting language,that is run on server and design for web development and used for general purpose for programming language. In 1995 , php development introduce by Rasmus Lerdorf . php can be embedded into html, php is a free software release unde...

0
Q: Dereferencing value in PHP for sure

Tomáš ZatoI happened to have a strange bug appear on my site. I load some entries to ARRAY from database. I have one function dedicated to load data from tables and put the together systematically. So article text would be assigned to articles as well as votes. While implementing votes, I made this loop t...

0
Q: CodeIgniter Active Record 'undefined property'

user2780079I get this A PHP Error was encountered Severity: Notice Message: Undefined property: CI_DB_mysql_result::$result Filename: models/admin_model.php Line Number: 17 with this code $q = $this ->db ->where('username', $username) ->select('fnam...

0
Q: Adding 1000 names to MySQL database

user3043058I'm having this issue where I have 1000 users which I need assign to them their unique 'ID', 'username/renum' and 'password' (md5 hash). I need to create table with VALUES for id, category, name, username, regnum(same as ID) and password. So i have created php file that generates the unique 'ID'...

 
3:46 AM
0
Q: server request uri trimming parameters

user3006683I am using $_SERVER["REQUEST_URI"] to get the current url. Then I am passing that url to another page via href. echo "<a href='second.php?url=".$_SERVER["REQUEST_URI"]."'>Click here</a>"; //the url in this case is index.php?tit=most+wanted&id=23&c_id=11&ran=378834GSF844 Then on my second pag...

0
Q: How to begin Real time Google map tracking using PHP, MYSQL, javascript

user2650186We are having a problem regarding our final project we don't have much idea on how to implement this project but want to do this, the problem is we don't know were to start. One more thing we don't know how to implement a real time tracking and we couldn't find any reliable information about this...

-2
Q: What type of password hash is this?

Shaikat ChakrabortyI recently purchased a php script which has User Reg and Login feature. I see that the script stores password in hashes like "j8SMfTBF8+fXw7T8Yp4tsYfDPb0N4BDgvi1D+uDmM0c=". The script also has a function to Send the password to user email. Can anyone tell me what kind of hash is this and what p...

0
Q: Create pagination using while loop

fanjavaidi want to create pagination using while loop. I already show data limit to 10. But i have no idea how to show pagination number in time calculation below. Any solutions? Thank you. <table border=0 width=800 cellspacing=1 cellpadding=2> <tr height=22> <td align=center bgColor=red width=5%>No.</td

0
Q: Questions about responseText

PizzafaceOverview: I'm using the JQuery Form Plugin to send Form Data to a remote file via AJAX. The File then processes the form data and inserts it into the MySQL Database. Problem: The Problem is, however, when I want to run code on a successful add, (usually completed using the "success" option, it...

0
Q: Facebook "Like Button" does not appear on PHP pages

HockeyRef45Hello Stackoverflow Community! Has anyone else ever had a problem with the Facebook "Like button" not appearing on PHP pages? I am stumped on this one. This is the code I am using (taken directly from the Facebook Developers page): This code comes right after the opening body tag (as suggested ...

0
Q: change dropdown content when checked

user2859027*I have made a way to present a droplist to end user and by default containing 4 items (value=a,value=b,value=c,value=d). When a user click on a checkbox the content of the droplist changes to only 2 items (value=a,value=b) IF unchecked returned to default state. I achieve this way below using h...

0
Q: Mockery not calling method from repository (interface)

CmoralesI am trying to test my controller with this test (I'm using Laravel, if that matters): <?php use Zizaco\FactoryMuff\Facade\FactoryMuff; class ProjectControllerTest extends TestCase { public function setUp() { parent::setUp(); $this->mock = $this->mock('Dumminvoicing\Sto...

0
Q: Can I use soap client without wsdl to connect to web service that has been created with wsdl?

jCloudIs it really possible to create a SoapClient without wsdl like: $client = new SoapClient(null, array( 'location'=>'http://localhost/webService', 'uri'=>'targetNameSpace', 'trace' => 1 )); to make request to SoapServer that has been created with wsdl like: $server = new SoapServer...

0
Q: Invalid argument supplied for foreach in phpFLickr Gallery

user3064208Sorry for the bad translation but I am using a translator. I have a problem developing an image gallery with phpFlickr, the fact is that it is already working on one site but this time I'm trying to organize and automate the process with custom_post_types. To the head of the custom page I have th...

0
Q: PHP preg_match to filter publisher header title

Albuquerque Web DesignI would like to retrieve the publisher string out of a long header. - THE TRIBUNE-JOURNAL (Johnstown, Pa.) - The 5 Best Places To Live If You Hate Winter I have tried preg_match(' /-(.*?)-/ ', $publisher_title, $pub_dashed); it outputs: - THE TRIBUNE- [bad] it is supposed to be: - THE TRIBUN...

0
Q: how to select my sql easy more than my code?

user3030013can i use loop to select mysql ? $sql="SELECT * FROM message_contact WHERE ( user1 = '$name1' OR user1 = '$name2' OR user1 = '$name3' OR user1 = '$name4' OR user2 = '$name1' OR user2 = '$name2' OR user2 = '$name3' OR user2 = '$name4' ) AND cantact_type = '1' order by id asc ";

0
Q: Convert Ruby Code To PHP

compcentralI'm stuck trying to convert some sample Ruby API code from https://vircurex.com/welcome/api?locale=en to PHP. Here is the Ruby Code provided: t = Time.now.gmtime.strftime("%Y-%m-%dT%H:%M:%S"); trx_id = Digest::SHA2.hexdigest("#{t}-#{rand}") user_name = "MY_USER_NAME" secret_word = "123456789" t...

-1
Q: MySQL delete statement with a pkID

user3060120I'm trying to delete a row from three tables in my DB. Each row has the same primary key and should be deleted when an html submit button is pushed. Here is my code: //Delete Every entry with pk = $id if(isset($_POST["butDelete"])){ // minor security check if ($fromPage != $yourURL...

0
Q: Notification code for android with PHP

user3044615I wanna create notification and alert in android.I know my PHP is working but I'm a beginner of android programming. I can't write code for notification. Please help me some example. Connection may be json but I don't know exactly. Here is my PHP. <?php // *******************************...

-2
Q: php search for database, show the result in drop down menu

user2334400I need a function like this: when we type anything in the search box, the information that matching the input will show in the drop down menu while we are typing. It's like google. when we type the keyword, the things that matches out key word will show in the drop down menu immediately. so this...

0
Q: Variable not holding value and dumping contents

DamianNormally I can find what I am looking for on here, even if I have to piece a few things together. This is the first time I haven't been able to find anything! Ok so I have an API that I wrote and everything was working fine on my localhost. When we transferred it to the server, that's when thi...

0
Q: YII Fatal Error: Call To A Member Function Of A Non Object

user3064281anyone can help me? I got stuck of this code. $billing->bookingHeader->getCodeNumber('BKG'); Actually $billing is a model and bookingHeader is the relation. this line generate error Fatal error: Call to a member function getCodeNumber() on a non-object Below is the component contains resul...

0
Q: standard method for redirect on manual input url

SickestSo i'm wondering how you professionals go about securing your website by not allowing a user to manually input a url to a certain folder such as website.com/images/ and view a directory listing. The method i've been using is placing an index.php file and using this code, which just brings the use...

0
Q: Can i create array by use php variable in a loop?

user3030013..................................................................................................................................................................... Can i create array by use php variable in a loop ? .................................................................................

0
Q: codeigniter database cache doesn't work

user3041604I just want to know because I have an issue with codeigniter database caching. I tried to enable the cache thru the database.php file $db['default']['cache_on'] = TRUE; $db['default']['cachedir'] = "application/cache"; The thing is, it successfully creates the cache, I can also delete it usi...

0
Q: phpMyAdmin inserting repeated queries

user2687915Im new to phpMyAdmin please someone help. I have an multidimensional array in php and in am trying to insert information into my database, but for some reason the information gets repeated. For example if i only have three person's info on my the array the database will insert 5 people repeating ...

-1
Q: I am getting an erro while running a php contatc page

Aiju Thomas KurianWarning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\contact-form-submission.php:1) in C:\xampp\htdocs\contact-form-submission.php on line 5 Name Phone Number Email id Enter your message ...

0
Q: Search engine suggestion list issue

BartedecoutThe suggestion list wouldn't come out even though I have insert this code: Code for index.php: <html> <head> <title> Brandon's Search Engine </title> </head> <script type="text/javascript"> function getSuggestion(query) { var ajax; ...

0
Q: PHP top down code generator IDE

voskycI know it is not strictly programming but is quite important for productivity when working OO design. Is there any editor/IDE for php that allow to generate classes and operations of classes on demand? This is, just like the codeassist of visual estudio for c++, eclipse with jave or the "contro...

0
Q: PHP build multidimensional array from

user2856332I have a small array that I was hoping to divide into a multidimensional array. I have goofed around with some foreach loops, counted loops, and recursion with no luck. I clearly need to learn more. Can I take an array like this: array( (int) 0 => 'red', (int) 1 => 'white' (int) 2 => 'blue' ) ...

2
Q: Onclick event firing in Firefox and IE but not in Chrome

Rishabh RajI have the following javascript function. <script type="text/javascript"> function showhidefields(value,formobj,epsflag,respflag) { //alert(epsflag); if (epsflag==0 && respflag==4) { document.getElementById("tpnr").style.position = "static"; document...

0
Q: Preg_match to Extract Json from Html

Luciano Nascimento$data (HTML Response): ... <script type="text/javascript"> //<![CDATA[ WebForm_AutoFocus('drpDwnLstLinhas');Sys.Application.add_init(function() { $create(Artem.Google.MarkersBehavior, {"markerOptions":..EXTENSIVE JSON..,"name":"map_GoogleMarkers"}, null, null, $get("map")); }); //]]> </script> ....

0
Q: file_put_contents not creating file despite owning folder

PandemoniumSyndicateHow I found php process name $processUser = posix_getpwuid(posix_geteuid()); die($processUser['name']); This outputs: daemon in /opt/bitnami/apache2/htdocs/ I have a folder named kv_store/, I changed the owner and group using: sudo chgrp daemon kv_store/ sudo chown daemon kv_store/ so ...

0
Q: Mediawiki uploaded file history

rajeshkumarI am uploading the video files in mediawiki using api. The video file is uploaded and get saved as File:Test.mp4. And that file was creating as a page. now i need to get the history of the file accessed details ie. how many times this file was accessed and whom will accessed using api. Using api ...

0
Q: Ajax request and displaying result (no page reload)

Code_Ed_StudentI currently have a dynamic field with values fetched from mysql database. I am running a query to find out the next Auto_Increment field for table named person through php. Since the Auto_increment can change at any time due to a transaction from a different insert query. How can I perform an aja...

0
Q: How to download file from database/folder using php

nazerolFile uploaded will be store in database and folder (folder name: uploads).Now I want to know how to create download file from database/folder. I have two file butangDonload.php and download.php. When user click word "donload" the pop up box will appear and save the file. butangDonload.php <?php...

0
Q: php PDO read to table statement

menardmamhere is the code $sql = "SELECT * FROM $table "; foreach ($db->query($sql) as $row) { echo "<tr>"."\n"; echo '<td>'. $row[CODE].'</td>'; echo '<td>'. $row[FIRME_CODE].'</td>'; echo '<td>'. $row[NOM_LEGAL].'</td>'; echo '<td>'. $row[NO_CIVIQUE].'</td>'; echo '<td>'. $row...

0
Q: mysql query on two tables

alisongaleonWhat SELECT query can i use to only show the cars WHERE bookings.status <> 1 so on the table below, cars.id (1, 3, 4, 6) will only show as the result i'm stuck with this query or of this is any good: SELECT * FROM `cars` as `C` INNER JOIN `bookings` AS `B` ON `C`.`id` = `B`.`id` ....? cars ...

0
Q: Execute Query on a Specific Date and Time

BongskyIs there a possible way to execute a query on a specific given Date and Time using PHP or ODBC $date = '11/30/2013 11:59 AM'; Insert into tbl1 (id,name,age) values ('$id','$name','$age');

0
Q: i am trying to make admin and login page

BestNOnethis is my database:-lecturer table:-members username password status admin admin 1 user user 0 this is my checklogin.php <html> <body> <table> <?php ob_start(); $host="localhost"; // Host name $username="root"; // Mysql username $password="passw...

0
Q: I got a null value when exchange value from php to python and back to php

VincentI got a null result when exchanging data from my php and python.. here's my code php.. <?php $thisurl = 'http://www.kumby.com/avatar-the-last-airbender-book-3-chapter-5/'; $getUrl = shell_exec('python test2.py' . escapeshellarg(json_encode($thisurl))); $resultData = json_decode($getUrl, t...

0
Q: PHP curl timeout from node.js HTTP server

user3064336I have a simple Node.js HTTP server running (following code) where I am trying to respond to any request immediately and then process the request asynchronously. var http = require('http'); var url = require('url'); var querystring = require('querystring'); http.createServer(function parseReques...

0
Q: PHPMailer - PHP Error

LeSamAdminPHP Fatal error: Class 'Mail' not found in /.............../crons/Mail.php on line 2 Any idea why it says 'Mail' when it's not mentioned in the code? Here's my PHP script: <?php require("database.php"); include_once("Mail.php"); $query = $db->query("SELECT * FROM `emails` WHERE `s...

0
Q: Subtracting dates and get difference in days

Alex MilesFirst, I want to say thanks for taking a look at my question. So what I am trying to do is subtract 2 dates and find the difference in days. I tried something like this <!DOCTYPE html> <?php // initialize a session session_start(); ?> <html> <head> <meta charset="UTF-8"> <

0
Q: Check if object/array is empty

devsI'm trying to check if the following is empty or not. {"players":""} I have a function that gets that from an api/site and.. well, heres the code. function getPlayers($server) { // Fetches content from url and json_decodes it $playersList = getUrl('http://api.iamphoenix.me/list/?serve...

0
Q: Weird occasional duplicate echoes in while loop

JafoolThis problem has got me tearing my face apart... I have this code: <?php while ($com_row = mysql_fetch_array($result_getcom)) { ?> <tr> <td><a href="?id=<?= $com_row['id'] ?>"><?= $com_row['name'] ?></a> <?php if ($com_row['com_flag_flagged'] == 0 && $com_row['com_flag_owne...

0
Q: Send POST request to apache server with htaccess using WebClient

shaddowI've got a problem with sending POST request to the apache server with htaccess using WebClient (I've tryed to using HttpRequest as well as WebRequest but it had a the same result). I've got the following example from vendor on PHP: $soap = curl_init(url); curl_setopt($soap, CURLOPT_POST, 1); cu...

0
Q: MySQL - How to update two tables with one query where table 2 value is true?

JoshOkay, I am trying to update two tables without using PHP and querying a loop. Table one: users Table two: traits BOTH tables have a matching row "ID" (so ID 1 in "users" is also ID 1 in "traits"). TABLE 1 has two rows that need updating: "HP" and "EXP". TABLE 2 has one row: "STUFF". I need a...

0
Q: Is it safe to pass filename in GET?

TigranI am doing index.php?letter=1&show=cat.jpg File I do not include, but use it only as <img src="$_GET['show']"> Is it safe?

0
Q: Custom Exception support in x-debug

CooluhuruGood day all, I have a custom exception : class myException extends Exception{ } I am using x-debug with apache2. When I do : throw new \Exception("Something wrong happened"); I got the nice formatted output on my browser with x-debug. but when I'm doing : throw new myException("Som...

-1
Q: what's wrong with my Login PHP error

user3015758Im creating a login php script and here's the code i have so far... I have too created a user and password in my database but no matter what i typed the correct password and username it keep saying i am having a wrong details.. By right, the code if user is able to login they will be able to see ...

0
Q: PHP : Unalble to extract the zip file

user3064304I am new to PHP Programming and also to this types of sites. if i did anything wrong below, Please let me know. I am using the following code to extract the zip file. when i use this code to extract the zip files which contain the file structure as below, i am getting error message. rootdir ...

0
Q: page error use relative link

user3040085i have code controller class Home extends CI_Controller { function __construct() { parent::__construct(); $this->load->helper('url'); $this->load->library('home'); } function index() { $this->load->view('layout'); } function abo...

0
Q: how to put facebook api to my site using php

smzDoes anybody know how to put facebook comment to a site using php? I want to put this on my site but I cant find any tutorial how to do this. Thank you so much.

0
Q: php multidimensional array values are same or not

Pradeep.T.PMy array is like this Array ( [0] => Array ( [con_id] => 44 ) [1] => Array ( [con_id] => 217 ) [2] => Array ( [con_id] => 217 ) [3] => Array ( [con_id] => 217 ) ...

0
Q: strtotime conversion: only date

ReezaCorizaSo I'm trying to take a date I have stored in a string, and increment it by one week 9 times. (I want 10 dates total). The value of $start_date is initially: '2013-12-04 12:00', but when I increment it it becomes: 606813 then: 1211613 1816413 and so on. I understand that the formatting will...

-1
Q: PHP unexpected end

user3064437I am having some issues with my code ending immediately before the setcookie function. Here's my code. if($checknm == 1){ while($info = mysqli_fetch_array($check)){ $keypair = $info['keypair']; echo 'Keypair: '.$keypair; setcookie("f2admin", $keypair, time()+3600); ...

0
Q: PHP: need server time and date to run sql query

KabirI need to send email to multiple persons at specific time and date. Specific time and date are 1. At 10am each morning 2. On Sunday morning at 10:01 am 3. On the last day of each month,at 10:02 am 4. On April 1 10:03 am 5. On July 1 10:03 am 6. On October 1 10:03 am 7. On Jan 1 10:03 am 8. on Ja...

0
Q: how to navigation in zend framework2

SLAYERI have created on module called Soap, Controller called Index and action called soapClient. Now I want to create an anchor tag which can redirect me to localhost/zf2/soap/index/soapClient using Zend Framework. I dont want to write href manually. how I can do it in Zend Framework 2?

0
Q: How to run php code from symfony?

user20617I'm very new to php and beginner to programming as well and I want to use symfony framework and I don't know how. I created a new symfony bundle in netbeans and now I can't run a php code from there. PHP code simply doesn't work, when I run it html codes are fine but php codes are shown raw in th...

0
Q: mail() not working on my virtual machine

Kermit the FrogMail() is not working on my virtual machine. I would like to use it for my php application. What can I do? What settings should I configure in php.ini to have it work>

0
Q: why previously inserted data is inserting on each page refresh?PHP

user3045432I have this code here. It successfully inserts data into database but every time I refresh my browser I receive this message from the browser.To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier.When I ...

0
Q: How to write the php code in onchange attribute?

guru How to write the php code in onchange event. Code: <select id="country" name="country" onChange=" if(this.value=='other') { showHint(this.value); ...

0
Q: Image gallery in php: Pause reading of array of files, continue onclick

ShahjahanYou guys have made life easy for the likes of me over and over again. Really appreciate the help! I make websites as a hobby, and I have very little knowledge of php. I'll explain the current situation and what I am done with so far: I needed to build an image-gallery which: 1) displays thumbn...

3
Q: PHP crypt() salt generation and password encryption, well executed?

Jurselsthese are some functions I am using for password encryption and password verification. Was wondering if this is a good way to handle it. I am using the codeigniter framework. This is the function to 'encrypt' : function crypt_pass( $input ){ $salt = substr(sha1(date('r')), rand(0, 17), 22);...

0
Q: rewrite for Discuz! V 3.1

r004I installed Discuz v3.1 on nginx 1.1.19 (with PHP-FPM) and everything is fine; except the Ucenter. When I click on the Ucenter in get the 404 page not found. I examine and found out the exact url for Ucenter (a social-environment section of discuz) is http://SITE/uc_server So I typed that on ...

0
Q: How do I display a random text and image taken from a MySQL Database?

mxmxwoI'm currently working on creating a page that will display a random image and text compiled into a MySQL database. So far I've got this: <?php //This is the directory where images will be saved $target = "images/"; $target = $target . basename( $_FILES['photo']['name']); ...

0
Q: is_numeric() returns false for unicode string number

user3061142I have installed xampp on an ubuntu machine. I found out that is_numeric function returns FALSE for unicode string numbers. for example for ۳۴۵۳ which is 3453 returns FALSE and also conversion to int evaluates all unicode number strings to 0. It is less than a week that I migrated to linux family...

0
Q: what was the reason the php application logs created on my apache htdocs folder?

loganathanMy server is windows 2003 server. Actually i am using error_log to log the application info flow. Sometimes my php application logs are created under my apache htdocs folder. Any reason why?. Also how to avoid that?. This is the task am doing: Every 30 mins i am backing up the logs and apply de...

0
Q: Codeigniter Zip Encoding read_file is not working

AsurayaI want to make and download archive from my existing files. I tried to following code. $this->zip->read_file('/upload/ut/10_33_statement.xls', true); $this->zip->download('my_backup.zip'); But this code is not working. But when i use following code it is working. $this->zip->add_data('/up...

0
Q: PHP regex to remove last matching pattern string

user702300I have following URLs http://domain.com/baby/smile/love/index.txt http://domain.com/baby/smile/love/toy.txt http://domain.com/baby/smile/love/car.html and so on... using preg regex, how to remove the file name on the right? I guess it's required to match the first dash starting from the right,...

0
Q: uploadify not working in magento

AlanI'm using uploadify in my magento extension, when option 'script' in uploadify calls action in controller it doesn't upload file and it doesn't even write the log however the interface shows theat the file is uploaded and complete my controller class Ahb_Uploadimages_Adminhtml_UploadimagesC...

1
Q: How to speed Indexing process of Magento eCommerce website?

ShaelI have a Magento eCommerce website in which multiple cron jobs running that are updating the 30,000 products on here. The indexing speed is horrible....I can't even update at the same rate as my supplier. Inventory is being updated on 2 hour intervals when it should be 1 hour intervals. Othe...

0
Q: How to generate a pop up without the address/title bar on clicking on a link?

PhantomI have this email campaign running which sends out a link to the subscribed users which opens up a pop up window(with the url) giving away a code which the users can use to avail discounts. The url can be copied thus generating another code which can be misused. Is there a way to generate a pop u...

0
Q: Can't delete calendar events from Google via API

hdwebprosI must be close, this does return "Token invalid - AuthSub token has wrong scope" however. My tokens work to write events however. We have to use CURL to do this, so this is in CURL. If there is a better way, let me know function curl_del() { $edit_url = 'https://www.google.com/calendar/feeds/x...

0
Q: Div contents (Pie Chart, Progress Bars) are not reflecting in Print Window

Ashishi have generated Pie Chart and Progress Bars Using Jquery and Some Css. But when i try to print that particular div with simple JS function, text values are reflecting properly but shape/size are not reflecting on Print Window. here is my Pie Chart Div Image: here is that div when im trying t...

0
Q: Valve parsing items_game.txt in PHP

ChrisI'm using Valves WebAPI to access the list of items in the game of Dota 2. For the most part, I have been using json_decode to parse out some of the requests. This leaves me with the items_game.txt file, which is not JSON format. I was hoping someone could shed some light here on the topic and p...

0
Q: How to insert a date from a form into a table with mysqli

Marshall TigerusI have a table in which there are two fields with date data types. I am having difficulty inserting a value from a form with the date type into this table. The php I use to insert: $query = "INSERT INTO JOB_TBL(JT_JOB_DESCRIPTION_FLD, JT_JOB_TITLE_FLD, JT_JOB_POST_DATE_FLD, JT_JOB_CLOSE_DATE_F...

0
Q: Highcharts dynamic set category update the chart but shows only points but not lines

Sudhanshu SaxenaI have Highchart LINE type graph which show line graph correctly.I have button to change the data dynamically.i.e. First chart renders 7 days data.On click of 14 days chart renders data correctly but the when i use. function requestData(response,point){ ...data fetching code...... var series = c...

0
Q: function.file-get-contents failed to open stream

ashrafI am having a php file that gets the contents from a URL, i am getting the failure message 'Warning: file_get_contents(http://cc.frifon.net/_dosmssend) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in C:\xampp\htdocs\SMS\cuba.php on line 24 bool(...

-2
Q: Why cause IN not work in my code?

user3064586..................................................................................................................................................................... Why cause IN not work in my code ? .................................................................................................

-3
Q: What is "Row-Level Locking" & "Column -Level Locking" practically? Plz give practical example

M SaikatKindly describe the practical difference between "Row-Level Locking" & "Column -Level Locking" practically

-2
Q: Removing all traces of user from multiple tables with same where clause?

user756659I am making a 'delete' function where all rows of user_id are to be deleted from multiple tables. Is there a quicker / more efficient way of doing this than below? Using PDO and there is no user input being used (no worried about injection). // get array of user ids where account_id matches $q...

0
Q: pg_pconnect and SET TIMEZONE

Antoan MilkovI have multiple connections to PostgreSQL server opened with pg_pconnect(). If I use: SET TIMEZONE TO 'XYZ'; To one of the connections, does it means that the other open connections get same TIMEZONE parameter changed as well? Do the different connections opened with pg_pconnect share somethi...

0
Q: How to add a data hover to a html anchor

Debakant MohantyI just wanted to add a data hover to an HTML anchor tag something like this <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown">Pages</a> I just want to see a drop down when I mouse hover on the link Any help will be greatly appriciated

0
Q: execute command in command promt using php

Shashidhar Grbelow command is working in command promt, now how can i execute this from php using command promt. "C:\Program Files (x86)\DBConvert\SQLite2MySQLSync\SQLite2MySQLSync_Cons.exe"/Session:"session" i tried as below, but not working.may i know the correct format? 1)exec('C:\Program Files (x86)\DB...

-1
Q: How to use insert query in Codeigniter

Joel James <?php Class NewUser extends CI_Model { function register($username, $password) { $this -> db -> insert('id, username, password'); $this -> db -> into('users'); $this -> db -> set('username', $username); $this -> db -> set('password', MD5($password)); $query = $this ->...

0
Q: How to get the booking ID where current page ID in Wordpress

DigitalEliseWhat php code can be used to retrieve the current page ID in a Wordpress theme? Then pull the booking_type_id from the database that is linked to that ID. I have tried so many different things and I just cant seem to get it to work. I am trying to use something along the lines of <?php $boo...

0
Q: How to mange custom product attributes differently for different users when adding a product in Magento

user3064606Actually i created an product custom attribute with some values in administrator side. Now i can select optional value from my custom attribute while creating a product. But i need to restrict this attribute to administrator only. That means, when a different user login to create a product that ...

0
Q: PHP backend code running on localhost but not on server

user2962766I am trying to create backend for a website. I successfully created it. It ran perfectly on the localhost. Now when I moved the code to the server, The php just doesn't work. It shows an empty white screen. It takes an input and returns a JSON output. What could be the problem ? I am using Amazo...

0
Q: Get property of php object in bootstrap table

Gabriel Valdesi have a PHP object array called "arregloRegalos" from the class "Regalo". I use that array to create a table with a For and bootstrap. this is the code to create the Table: <?php for($i=0;$i<count($arregloRegalos);$i++) { ?> <div class="media"> ...

0
Q: Update the partcular record in the table displays other record in the table

user2991258In the below codeigniter code i have placed controller and model.In my membership table i have 4 columns exam name,month,year and college name. Exam name month year college name anna univ feb 2013 kings anna sep 2014 srm Now my aim when i login with kings college it display that ...

-1
Q: Converting an associative array into an indexed array in PHP

user96675I have an associative array which has to be converted into an indexed array. Basically something like this: Associative Array: Array ( [0] => Array ( [date] => 2013-11-29 [count_incoming] => 6 ) [1] => Array ( [date] => 2013-11-30 [count_incoming] => 3 ) ) has to be converted into somethin...

0
Q: Schedule alarm notification system php

user3015758I need some help regarding the implementation of the following alarm.. Here's the flow of the program, user login to the system and then they can click the hyperlink create schedule and then from there they can create schedules using the form. After which, user can choose to start this schedules ...

0
Q: Using mongodb map/reduce in php

user3064602I'm new to mongodb and I want to use mongo map/reduce function in my php codes connected to my mongo database. I have a document named videos with a large number of items, I want to get 10 items that have the largest values in specific field named "fc_total_share". And by the way, as my "videos...

0
Q: Is that possible to push message to all the devices registered with a Application ID?

arnpI need to push my message to GCM server with PHP code, which runs and triggered on server. The Code available is only to push to specific registration IDs in form of array. I am trying to avoid storing the registration IDs of the devices and pushing to all the Registered device under the applica...

0
Q: Adding wordpress comments to custom table in wordpress

user3064615I am creating a plugin in wordpress which will have two custom tables,Category and City tables. I want to use wordpress comments functionality for commenting on each particular city. Custom post would have solved the problem but cities table have large data as well as many attributes. There an...

0
Q: Create and Download Zip File is printing garbage value on the screen

www.sapnaedu.inIt is a follow up question to my previous post : PHP readfile printing garbage value on the screen I am creating a PHP file and then trying to download it. What's happening is, When I create and then download, it prints garbage value on the screen. However, If I just download the same zip fi...

0
Q: JQuery Catch onChange event of EditableField - datepicker

muffinHi i'm having a problem of catching event of an editable field. I'm using Yii php, and i use the extension editablefield from x-editable. $this->widget('ext.editable.EditableField', array( 'type' => 'date', 'value' => $data->date_of_h...

0
Q: Disable text boxes in a loop using jquery when a particular radio box is selected

VamshiIn the below form, I want the text box to be enabled only when the radio button is checked. I have around 50 questions like this. for each question only YES is selectiod the text box should be enabled. otherwise not. I don't want to do manual disable by calling with radio button's name, every t...

0
Q: Allow access to the specific IP addresses which starts with specific series using .htaccess

Vijayakumar SelvarajI have my own shared server where my sites are hosted. Planning to consolidate/maintain all commonly used files like images, css, js etc., as different sub-domain. For that domain, i want to deny the other users to access those files (preventing hotlinking). All my website IP addresses are starti...

0
Q: how to pass form action in codeingiter

user2833721I have a issue in codeingiter when i pass the from like this <form name ="register" action="home/register" method="post"> </form> it will genereate the error No Object found. But when i pass the form like this <form name ="register" action="inex.php/home/register" method="post"> </form

0
Q: I can't seem to be able to execute more than 20 scripts simultaneously called from a single IP ( apache )

user3010273I have a system of 50 php scripts that all do the same thing. I run them in parallel to gain processing speed ( they feed some data and store it in database ). When I run call them via the browser from a localhost, I can't seem to get more than 10-20 working before the response in the browser sl...

0
Q: Rewrite URL in Apache while retaining query string and forwarding to subfolder

Xl-lordThis is my first time posting and I really appreciate the help. I want to redirect a sub-domain to a folder and rewrite it to the query string (internally - without the browser address changing) but also retain the balance (if any) of the query string. This should be done using Apache mod_rewri...

0
Q: How to remove please fill the required fields (name, email). in custom wordpress comment template

LibinHow to remove please fill the required fields (name, email). in custom wordpress comment template here is my code . If this form it display please fill the required fields (name, email). how to solve this issue. I just tried to disable $aria_req = ( $req ? " aria-required='true'" : '' ); <?ph...

0
Q: Website doesn't run on the server with symfony 2

MasOudI have a program in symfony2 and I have a apache server with Cpanel The project works fine in the local but when I upload it on the server it gives me this error: Whoops, looks like something went wrong. 1/1 ServiceNotFoundException: The service "security.firewall.map.context.secured_area" has ...

0
Q: Passing data to a system through socket using PHP

ManiI have below sample data stream which has to be transmitted to a system through socket programming. This stream is generated from db as,after every 243 char its new stream 0243P254NIP40524KCK0240000000104844200001 00000064005736540000000985714052400000000000010000000000000000BIR01...

0
Q: Inserting data to the specific node in XML file with PHP DOM

user3064676I am trying to insert data into my RSS xml file using PHP DOM. These are the codes involved. index.php <html> <head><title>test</title></head> </head> <form name="input" action="insert.php" method="post"> insert item: <input type="text" name="item"/> <input type="submit" value="se...

0
Q: fetch multple data that have the same id sing php

user3057137Matric No Name Supervisor Name Section 0924564 Nur Hidayah Mohammad Daud |Che Siti Fatimah Che Hasan 1 1017951 Nur Akmal Hakeem Zainal Abidin |Ali 2 1017164 Qurratu 'Aini Zaini |PHONE MYINT NAING 3 23 Eshrak |Ali ...

0
Q: Ranking with ties and skipping certain rows where one condition is not met in mysql

Zual aI have been googling since yesterday on how I could do this but with no avail. I can perfectly achieve ranking with ties and return rank of a specific student using php and mysql quesry. But I have one problem. The problem is that if a student fails in one subject (pass mark is given 33) out of g...

-1
Q: PHP if condition fails inside a foreach loop

Banned from SO<?php $key='APS'; $value='A|B|'; if ($key == 'APS'){ $aps = $key; if (!empty($value)){ if(preg_match("/\|/",$value)){ $elephant = explode('|',$value); foreach ($elephant as $elekey=>$elevalue){ if($elevalue = 'A'){ $ele...

0
Q: Is possible to embed fontawesome font in fpdf?

TropicalistaI'd like to use fontawesome in pdf. I generate my pdf using php library fpdf and font embedding. However I cannot make it works. I use this tool to generate afm file: http://fpdf.fruit-lab.de/ But when I try to use fontawesome I always get white square instead of icons. I use this syntax to ad...

0
Q: record form not rendering in extjs after first time page load

ankit vermaI have a grid which is bind with json store and using Ext.ux.grid.RecordForm.js . problem is when i first time load desktop working fine but when i close it and reopen this grid combo box not rendered... Load first time... close window and when reopen code is MyDesktop.User = Ext.extend(E...

0
Q: nestling if else statements in PHP

user3064735I am trying to effect a graphic change in a php page depending on the results of a mySQL database query. <?php $find_howto=mysql_query("SELECT * FROM `answers` WHERE `username`='$username' AND `pagename`='_I1' ORDER BY `answer` DESC") or die("Error fetching course selection, How To Use The Cours...

-3
Q: radion button selection based on input value

user2721229I have two radio buttons. Male and Female. I want to select any one of these radio button based on input given via $_POST from another page. If the input is 'male' then respective radio button should be cheked. Any one pl help me to achieve this.

0
Q: export file from table to excel using php

user3064692hi im a newbie in programming and im using php. below is my code for .xls. i have one form where i have three buttons the add search and "save to excel". and also i have a table where my output for add button will be shown and that was connected to my database. now my problem is when i click the ...

0
Q: smtp mail with attachments is going to spam

chinI have an issue with sending smtp mail. If I send mails with attachments, it is going to gmail's spam folder and mails without attachments are going to inbox. Is there any relation with reverse dns settings. Please give me a solution.

0
Q: strategy to correct old unvalidated city field in db

tvenWe are in the process of refactoring an old schema/ code that allowed user freedom to enter anything into the city field. All the new users are prompted with a field guarded by googleplace api autocomplete query suggestions. How do i go about fixing variations of Los Angeles LosAngeles losange...

0
Q: Select count query doesn't work - mysql

Nave TsevaI have the follwoing PHP code: $countMessagesResult = execute_query("SELECT COUNT(*) AS unread FROM statuses WHERE (statusID=1 OR statusID=2);"); $countMessagesRow = mysqli_fetch_assoc($countMessagesResult); $unread_messages = $countMessagesRow['unread']; The probelm with this query is that I ...

0
Q: unable to select the wordpress database

Ravan VinodUnable to select the wordpress database. I am using WAMP server in windows 7 OS while configuring the wordpress i am getting this kind of error Thanks

0
Q: Error with getting date from excel in php

user1557019I have a excel document with a date column, containing values like 1-Dec-13, however, when I read this file in via PHPExcel, I am getting float(41609). So, any idea how to get the proper date back from 41609? or why the heck is 41609 in the first place? My code to read in the excel: $objReader ...

0
Q: Stuck with php function with boolean

jmenezesIn the following code, I'm trying to do as you'll see below. <?php $urlHead = 'a'; function heading($urlHead){ switch($urlHead){ case 'c': $tab = '1'; break; case 'i': $tab = '2'; break; case 'r': $tab = '3'; break; ...

0
Q: Update query insert zero in table in ci

Sayak MukherjeeUpdate query insert zero in table everytime. I have prtinted the query.From phpmyadmin the lastquery working fine.updated with same value But when db active query then it has updating 0. tbl_setitbl set_id(primary key) reference(text) Here is my code. public function edit_set($id,$setvalue) ...

-1
Q: How to check php variable with array?

user3064586How to check php variable with array? When $user_check = "ccc"; <?php $user_group = array('aaa' , 'bbb' , 'ccc' , 'ddd'); $name_group = join("','",$user_group); if ($name_group != $user_check) { echo "not found." } else { echo "found." } ?>

0
Q: restfullyiii extension showing the error failed to open stream

user2995007I am implementing the rest api in yii framework , while using /api/rest. here myrest is the controller i am using for rest api. include(Rest.php) [function.include]: failed to open stream: No such file or directory { include($classFile); if(YI...

0
Q: CKeditor remove all html tag except div,span on paste event

MahendraI want to remove all html tags from CKeditor when user uses Ctrl+v to paste the content. Following is the code I've written. Not working as I expected. <script type="text/javascript"> CKEDITOR.on('instanceReady', function(ev) { var edits=ev.editor; edits.on( 'paste', function(event)...

0
Q: Pass an undefined variable as an optional argument to the function and let it populate it, but only if argument is present

jayarjoIn PHP some functions have an optional argument, which when passed is automatically populated inside the function with some value. Obviously function receives it by reference, since its value becomes available in the outer code. How to mimic such pattern manually?

-1
Q: change value in my database when click on button

user3064779hello how to change value when click on button i used 2 button on my from 1st is accept and 2nd is Delcine and i want to click on any button when change value on my database table when click on accept then value is "A" and click on Decline then value is "D"

0
Q: Append all array values to another property using phing

warshaftsHow can I make this on phing? foreach array as values { $data .= $values } something like that. Appending all the array values on property name $data.

0
Q: Loading a PHP file in Chrome displays PHP codes

zack_falconThe Problem: Exactly as it says. My phpinfo.php file contains the following: <?php phpinfo(); ?> The file itself is located in /var/www/html/. What I did (prior to the problem): I erased all installations of PHP, oci8, and what not. I'm not sure if I did a good job - basically, I typed in yum...

0
Q: Check PHP Errors (Syntax & Fatal Error & Warnings) during build

Abdul VahafWhile writing a phing xml code to build a php project. Is there any way to find errors in particular project file using phing xml. We found the code as below only throw alert for syntax error we need to filter it for all php errors like fatal errors & warnings & syntax errors. the code as below...

0
Q: Cakephp: Adding multiple records to single Model with one comman field

vigneshI've wanted to add multiple records to a single model in cakephp. I've been followed his tutorial http://bit.ly/1jjR1U5 and it works like charm. But I need minor tweaking from his code. I need to make one field in the form as common for all the multiple records and save the model. I've explained ...

0
Q: Execute JavaScript code after $_POST request in php

TylerI want to place a marker on a map with geocoding. I got a working code for that: $(document).ready(function(){ $('#submit').click(function(){ var address = document.getElementById("address").value + ", CH"; geocoder.geocode( {'address': address}, function(...

0
Q: HTML Purifier against external resources

midniteI am pretty new to XSS and HTML Purifier (researched for a few days). Yet i have been a programming and web-dev guy for many years. (Yes i know shame that i didnt come across XSS. i thought of stuffs similar. But just didnt research it in depth.) AFAIK, attackers can load their evil external JS ...

-1
Q: Woocommerce Checkout manager: needing to replace additional Information header

user3064817I have a client that wants me to change the additional information header on the checkout page of the woocommerce addon for wordpress. They have Woocommerce checkout manager but they wont get pro. so I was wondering if there is a way for me to replace it using code?

0
Q: Create Notification

user3044615I wanna create notification and alert in android.I know my PHP is working but I'm a beginner of android programming. I can't write code for notification. Please help me some example. Connection may be json but I don't know exactly. Here is my PHP. <?php // *******************************...

1
Q: Line chart of JQPlot time issue in X-axix

user3064669I need your favor to resolve an issue from my code. So, Let me explain about that which is i'am facing in "Line chart of JQPlot". I'm using this jqplot plugin to develop an info chart in live. Firstly, i have developed only for live. That was working properly along with time. Secondly i tried to ...

0
Q: strtotime in my site not working properly

AmmuI have two dates $endDate = '2013-11-30 18:30:00'; $beginDate = '2013-10-31 18:30:00'; And i took date difference using folowing code. $diff = abs(strtotime($endDate) - strtotime($beginDate)); and then i have checked the date difference by $days = $diff / (60*60*24); but i got a fracti...

0
Q: Bzip filter on Windows

polkovnikov.phI'm trying to use the following code from PHP manuals: $f = fopen("test.txt", "w"); $param = array('blocks' => 9, 'work' => 0); stream_filter_append($f, 'bzip2.compress', STREAM_FILTER_WRITE, $param); and get the following error: unable to locate filter "bzip2.compress" I thought that en...

0
Q: PHP file rename between diffrent domains in the server

Nir TzezanaI have a couple of domains on my server: nir.load.co.il nir2.load.co.il I have a file that I want to change on the first domain through the second domain. Something like this: rename("../nir.load.co.il/up.php", "up_new.php"); This isn't working and it gives me the following error: r...

0
Q: how to disable the field and post it to php simultaneously?

user3045252i want to disable the amount field if there is an input from the user.. but when i am doing so, it is not getting posted to the PHP page ... the value is not getting posted can u pls help so that i can disable it as well as post the data to the next php page The javascript code used in the html...

0
Q: bulk insert in shared hosting php/mysql

timus2001On my local PC i can manage bulk insert as below LOAD DATA INFILE 'C:\myfile' INTO TABLE db.tbl FIELDS TERMINATED BY ',' I can do so because i have access to c: drive. I need to do same in shared hosting server of hostgater. Problem is i cannot figure out its physical path, i can access only l...

0
Q: CURL passes the valus = null

user3040823Hi below is a piece of code that I use to pass my variables to another server using cURL. Although there is contact with the other server the passed variables display username=null etc. If would really appreciate your suggestions. Thanks in advance if(!isset($_COOKIE['admin'])){ include...

-6
Q: Dynamic customizable html form using javascript

ajay_lampI am stuck with a typical request from client. My client requires Visual studio / Dreamweaver like Html tool panel in a web page(Html/JavaScript). 1) We can drag HTML elements from this panel and create web forms (which is completely dynamic). Thanks in advance

0
Q: Is there an PHP-based open source dating script not using any templating engine?

user3064881I would love to have a dating script without the templating engine overload. Or just plain simple codeigniter templating will do (definitely no Smarty)

 
8:20 AM
0
Q: How to merge multidemntional array by specific element?

KirixI have array with this kind of structure: array( array('name' => 'Some name', 'data' => array()), array('name' => 'Some name #2', 'data' => array()), array('name' => 'Some name #3', 'data' => array()), array('name' => 'Some name #4', 'data' => array()), array('name' => 'Some ...

0
Q: Insert values into certain rows in mySQL database from PHP

Maffyesterday I created my first database (very simple, 2 columns), I've just written a php page which can read the values. What I'm wanting to do now is write a front end that will allow me to change the values in certain rows of the database. Here's a sample of what I have to read the database: my...

0
Q: PayPal Return URL not working while transferring payment to personal account

Manish GoyalIt is possible to enable return url for business account editing user website preference, but if I want to transfer money to personal account on paypal, then return url is not working Please suggest

0
Q: How to make variable available to others included file

Leon ArmstrongI am having a router which will look for handler if the file exist but i wonder how i access the the handler's variable in my controller. Here is my router , will check for handlers if exist. router.php if(file_exists('handlers/login-handler.php')){ include_once('handlers/login-handler.php...

0
Q: Search for string in RecursiveDirectoryIterator using POST from a form

AmequeI want to return the results from a RecursiveDirectoryIterator using the criteria from a search form. For example if the POST from the form is Folders\Application I want the iterator to return all files from the directory with that criteria. My current code follows: if(isset($_POST["sSearch"]))...

 
8:38 AM
0
Q: Yii bootstrap, adding id and class to TbBootstrap

muffini'm using PHP Yii framework, and came across a problem regarding adding Id and other attributes to a tab. I'm using yii bootstrap by the way as extension: $tabs = array( 'item1' => array( 'label' => 'label1', 'content' => $content1, ), 'preview' =>...

0
Q: Display Current Year in Wordpress

WillemI need to display the current year in Wordpress, now this is already being done in the footer template using php: <?php echo date('Y'); ?> The site in question is for a car dealer. So there are many year model references in the page/post content ie. <h1>2013 Volkswagen Polo</h1> All of the...

1
Q: How can I close a javascript popup in selenium (Facebook/php-webdriver)?

Kumar DeepakThe error thrown is UnexpectedAlertOpenWebDriverError, when I try to access some element on the page.

0
Q: Issue with getting options from Command line

Dr.KameleonOK, I know about getopt. So, let's say if I want to have to options (e.g. a,b), I would do a getopt("a:b:") and something like php myscript.php -a someAvalue -b someBvalue would be perfectly recogniseable with the option values stored as they should. Now what if I wanted to be able to recognise...

0
Q: tab delimited file in php

krupal patel Create a blockquote by prepending “>” to each line. Other formatting also works here, e.g. Lists or Headings: $file = "xyz.txt"; $txt_file_all_row = array(); $fh = @fopen($file, "r"); while (!feof($fh)) { $data = fgets($...

0
Q: special loop in PHP

mortipedI have the following code which communicates with JavaScript. <?php header("Content-type: application/json"); define("CSV_FILE", "../amazon_keyword_stats.csv"); define("AMAZON_SEARCH_URL", "http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dstripbooks&sort=daterank&unfiltered=1&

0
Q: Integration of Page builder plugin with wordpress theme

akhil n lI am developing a word press theme. For that i need a page builder integrated with that theme, means while installing the theme the page builder will also installs in the system. and that page builder needs to show with theme , not in plugins.can we achieve this ? Thanks in advance

0
Q: Passing a value to current Page

Cindy93How do I check the url if it has a parameter or not before passing? I need to pass the value of s on current page. When passing on current page 'index.php' it would look like this index.php?s=value How can i pass the value if the url has parameters like index.php?page=1 or index.php?orderby=asc ...

0
Q: connection using PDO/PHP oracle database

user2981440how exactly how to do this http://php.net/manual/en/ref.pdo-oci.php ive searched a lot but i dont understand how to do connection i am using 5.3.XXphp windows 7. help please

0
Q: Custom error message in Zend Form is not showing

DaanI wrote some code for adding a custom error message to a zend framework element, the thing is the error doesn't show up. I've the following part of relevant code: (I can get in the else where to add the errormessage). if($this->_request->isPost() && $form->isValid($this->_request->getPos...

0
Q: How to remove oracle instant client(instantclient_11_2) on Unbuntu?

user2990252I want to remove oracle instant clinet(instantclient_11_2) because I installed oracle server this server. the os is unbuntu server. How to remove the oracle instantclient_11_2? I set ORACLE_HOME environment at /etc/bash.bashrc and it shows like this.. but after restarting apache2, the ORACLE...

0
Q: How to calculate the user's average rating on all his/her nodes with Fivestar?

JeroenOn my website, users can rate each other's nodes via a Fivestar field called Stars in a comment. I'd now like to calculate the overall average score of a user. That means, I'd like to display the user's average score for all his/her nodes. For example. Let's say a user created 2 nodes: Node 1 an...

1
Q: Almost there :) - Auction type Countdown

user3063070I have been trying for days so I finally thought I should ask. Below I will post what I have, any direct solutions would be great. I will try to be as detailed as possible. What I need to create? An Auction type countdown with interaction with MySQL to retrieve the End Time of the Item in ques...

0
Q: how to create Google wallet button with dynamic values?

binili am integrated google wallet digital goods buy now buttons. i want to change the price and name of the product.but when i am changing the fields using some variables getting the old price and product name that i created in the google product account. $payload = new Payload(); $payload->SetI...

0
Q: High chart php, line not plotting, no error,

userckthis is the chart code. I am using highchart php to do that. But it is not plotting any line. Even i am not getting any error I am not able to resolve this issue . Might be any one can suggest some for what i am doing wrong. chart1 = new Highcharts.Chart({ "chart": { "renderTo": "con...

-2
Q: PHP if($d=2) not working

CriketXI'm doing a simple while loop and there's an if statement inside that's not working... and I have no idea why. Here's the loop and the statement: $d = 1; while($d <= 2){ if($d = 2){$dayznum = $dayznum2;} } For some reason, the loop executes twice, but $dayznum ALWAYS = $daysnum2 and I can'...

0
Q: How to Make Selection from Drop Down List Based on Previous Selection?

greenTo make a simple illustration, assuming that I have a table in database which named as category and it consists only two columns which are cat_id and cat_description. Now, the question is how to make a drop down list that shows the cat_id and then the second drop down list will show the cat_descr...

0
Q: Calculator - Online Cash desk

Matthias Giestitle is as always weird, but it's basically just what I need. I am going to help out during a christmas market here in germany and sell some stuff. I am not good in math and secondly something like a cash system would make the work even faster for everyone. This is what it should be like....

0
Q: How to Dynamically add spaces in PHP

user3061819I have this data array: [0] => 15 10 010 Chainmesh Galv 50 x 2.50mm 900mm x 15m ROLL 22.0 [1] => 15 10 020 Chainmesh Galv 50 x 2.50mm 1200mm x 15m ROLL 29.0 [2] => 15 10 030 Chainmesh Galv 50 x 2.50mm 1500mm x 15m ROLL 36.0 [3] => 15 10 040 Chainmesh Galv 50 x 2.50mm x 1...

0
Q: AmCharts not work after On Click with jquery

MohammadI use amcharts Default JAVA code is : <script src="js/amcharts.js" type="text/javascript"></script> <script src="js/serial.js" type="text/javascript"></script> <script type="text/javascript"> var chartData = [ <?php $sql = mysql_query("SELECT * FROM `today` ORDER BY `da...

0
Q: How to use openemr Rest API of MedMaster?

Mufaddal KagdaI am new to php and Rest api.i want to use Openemr api in android application but i dont know where to start. i would be really obliged if any1 provide me the steps and if possible an example of using this api.i have successfully installed the web based openemr from http://www.open-emr.org/wiki/...

0
Q: Get the value of text box using jquery

user689017I have the following script : <script> $(document).ready(function(){ $('#edit').click(function (){ //get employee_id = $('#employee_id').val(); alert(employee_id); html=''; $.ajax({ type:"GET", url:"<?php echo ba...

0
Q: Laravel 4: get all registered routes

Dmitriy GalievskiyI create helper class namespace Services\Menu; class Item extends AbstactItem { public function add($url, $value, $attr, $params) { $routes = \Route::getRoutes(); //return always empty } } How I can get all registered routes in my class?

0
Q: Can we use single Modal for editing items listed in DataTable

Dharma Sai TejaEven I'm facing the same situation. I have four modals Creating a post. Viewing Updating/Editing a Post Deleting a post "How can we call the Editing modal for each item in the DataTable List has the same Id or class." (or) the question can be framed this way - "how should I create the edit b...

0
Q: How To Build A Basic Web Crawler To Pull Information From A Website

user3065043I Build A Basic Web Crawler To Pull Information From A Website . For it i create simple_html_dom.php. Now my code is like <?php include_once('simple_html_dom.php'); $target_url = “http://www.xyz.com/”; $html = new simple_html_dom(); $html->load_file($target_url); foreach($html->find(‘a’) as $...

0
Q: Bonfire vs stock CodeIgniter - module compatability

BobeI've been using CodeIgniter for a few months and recently discovered Bonfire, which looks like a great foundation for CI projects, despite the current build using almost outdated resources like Bootstrap 2. I really love the module system in Bonfire, it seems like a very efficient method for cre...

0
Q: Masking Amazon S3 mp3 file url and html5 mobile audio issues

user1768337I am using amazon s3 server to serve mp3 files to users. However, to control usage of these mp3 files and protect real s3 url I am using a php file to mask the url. Following is the code I use: $audioName = $_GET['p']; require_once 'class/S3.php'; $expires = 60*60*24*30; header("Cache-Control:...

0
Q: how to render another page inside my submenu

404 Not Foundi have created menu for my plugin page like follow.. function createMenu() { add_menu_page('Configuration Contact Page', 'Conatct US Setting', 'manage_options', 'adminmenu', 'welcome'); add_submenu_page("adminmenu","Form Setting", "Form Setting", "manage_options", 'formbuilder', 'formbui...

0
Q: Unable to access property of a class after it throws exception

Chris WhiteI have a PHP class which for this example I'm just calling MyClass. If something goes wrong in this class, it throws an exception which I'm catching. In this catch block, I need to access some public class properties of MyClass but for some reason they're all returning NULL. Code below. try { ...

0
Q: Failed to load resource error in Angular js

CashewWhile try to run the following function in angular $scope.login = function (user, LoginForm) { $http.get('http://localhost/Angular/index.php/core/login').success(function (data) { $scope.message = data; }); }; it shows the following error (Im working with thi...

0
Q: Symfony 2 manyToMany clashing mapping table names

ChathushkaI want to to add exclusive/inclusive products to promotion entity. There is a clash of names when it tries to generate mapping table. like: promotion_product for both tables promotion.orm.yml manyToMany: productsIncluded: targetEntity: Acme\Bundle\DemoBundle\Entity\Product pr...

0
Q: long polling - jquery + php

rpsep2I want to long poll a script on my server from within a phonegap app, to check for things like service messages, offers etc. I'm using this technique in the js: (function poll(){ $.ajax({ url: "/php/notify.php", success: function(results){ //do stuff here }, dataType: 'j...

1
Q: PHP splitting a string into an array

MouNtantI am trying to split an string into an array. This is my data: 1. Some text is here!!! 2. Some text again 3. SOME MORE TEXT !!! I would like an array to be like this: Array( [0] => '1. Some text here!!! [1] => '2. Some text again etc.. ); I tried this using preg_split but can't get it ri...

0
Q: Wordpress Dies When trying to edit the homepage

user3043528The problem is very very weird. Let me explain a little bit better - We have a multi site built for the client. Until recently we could edit the homepage with no issues. In the meantime we have upgraded the core (it was still working with new core). Just recently whenever I try to edit the homepa...

0
Q: yahoo oauth $user->getProfile(); returns null

Jerick Allan Sernal DimaanoI'm using php and downloaded the yahoo library to import yahoo user info. I've already finish it before and its working flawlessly, but now suddenly it returning a notice: Notice (8): Trying to get property of non-object [APP/Vendor/Yahoo/Yahoo.inc, line 1036] This notice appear after logging ...

0
Q: Silex, how to use my class trough whole application

Anthony De MeulemeesterI have a class called ImapMail. i want to make a instance of that class. $mailbox = new Anthony\ImapMailbox('{imap.gmail.com:993/imap/ssl}INBOX', $email, $password); and use that instance $mailbox trough my applcication with the same $email and $password witouth creating new instance again. ...

0
Q: convert tabular data (mysql) to xml using php

user3026660I have a My SQL database that has some tables. Now I want to extract the that data from a table and have it in XML format. <?php $username = "root"; $password = ""; $hostname = ""; //connection to the database $dbhandle = mysqli_connect($hostname, $username, $password,"examples" ); // Check...

-1
Q: how to refresh already opened page with button click

ParagI want to refresh the page having url such as: http://www.abcde.com:81/abcdefg/?_task=abcd&_id=691677786529eea6822deb&_action=show from another page. That another page having button & form tag as : echo '<form action="compose.php?r=w" method="post" name="addrbook">'; echo '<input type="submit...

0
Q: php is not getting value from url because of ancho tag

user3005115hello guys i'm new here and i'm having trouble removing the # symbol from the URL <a href='#?editid=$id'>edit</a> i'm trying to get the value of editid from the URL using php but it doesn't seem to be working because of the # symbol

0
Q: Compare Mysql Field Value

user3065100I have a table named 'jobs' with field 'categories'. Now Values in my category field is like this 368,369,372,379,380,381 368,369,372 369,373,374,375,376 491,492 & i am getting values with search like this '368','374','490' Now how to compare myvalue to field value, I can't use "IN" in t...

0
Q: What should I do to protect user information as non-company?

skiwiI am just a developer who is personally developing some websites (on a donation basis) on a cheap (but good) standard web hosting. I'm also taking Computer Science on university, so definitely I do care about security for example. So I have a website where users can create accounts and they are ...

0
Q: Woocommerce - change product quantity through attribute from within product page

Ralph SmitI am trying to adjust the quantity of products according to what customers select in their order. The idea is that you order a weekly or bi-weekly sort of "subscription". If you order weekly, you pay 4 weeks = 4 products ahead, and if you order a bi-weekly deliverance, you pay 4 weeks = 2 product...

-1
Q: PHP delivery time script

user3040915I am making a delivery time script in PHP. For two dishes, the delivery time should be 30 minutes, and for more dishes, they add up 10 minutes each. Heres what I've done so far: for($i=30;$i>;$i=$i+10;) { echo "Du har beställt " .$antal. " pizzor, och leveranstiden beräknas vara " .$lever...

0
Q: How to enable 'Web' logs in Yii 2?

daveyIn Yii 1.x you have the CWebLogRoute class to log all your queries and stuff in your browser. Is this option already available for Yii 2.0? I only see the FileTarget, DbTarget and EmailTarget classes in the framework.

0
Q: inverse cumulative probability of beta distribution in php

user2842342I am trying to find a function with the functionality equivalent to inverse beta CDF. I searched for the function but i could not find anything which can do this task. Is there any library function which can do this? Or is there any way to achieve this?

0
Q: Count Instagram followers via PHP [without SDK]

user3036527$ch1 = curl_init("https://api.instagram.com/v1/users/xxxxxx?access_token=557xxxxx37.3xxx1a9c.3xxxxxxxx402xxxxd"); curl_setopt($ch1, CURLOPT_RETURNTRANSFER, TRUE); $raw1 = curl_exec($ch1); curl_close($ch1); $data1 = json_decode($raw1); echo $data1->followed_by . " Followers."; May i know what ...

1
Q: Anyone can help me with this (jquery + table sorter)?

user3065167Can anyone check this: http://www.studiok.it/_sviluppo/sknewacc/trasparenza/ and tell me why it works with FF, Chrome and MSIE10 but not with MSIE11? I noticed, if that matters, that the validator says: Error Line 79, Column 11: No space between attributes. <div id="div_main" class="" style="wi...

-3
Q: I need help in writing a simple SQL query

user2968129I have a database of one table that has 8 columns. I also have a search page in my website with 8 text boxes (that corresponds to the 8 columns in the database) where the user can enter some values to retrieve the data with the specified conditions. If I use the AND operator in the SQL query, th...

0
Q: Finding Values Until Regex

Mohammad Abu MusaI want to extract values from string. here is a sample string "Sample string Name: Mosa Phone: 020202020 Email: email@domain.com the rest of the sample string" The phone doesn't necessary to be sequence of numbers it could be like (00-98550-22) or (+025-588) or (92122/222) The good news is tha...

0
Q: Update your facebook status via curl php

jayzantelI guess the title says it all.I am trying to update my facebook status via curl.It all works for the login part but the part the part to update the status fails.I guess its because the homepage has two forms (search and post status).How can I set curl to only post on the update status form. P.S I...

0
Q: Delete files from directory and change increasement

user3001244I have the following codes/photos for my products: D2000-1.jpg D2000-2.jpg D2000-3.jpg D2001-1.jpg D2001-2.jpg D2001-3.jpg D2001-4.jpg Now I need to remove the second photo of product D2000 and first photo of D2001 and then the codes to be as same increasement: D2000-1.jpg D2000-2.jpg D2000...

0
Q: php pagination class first try

Cruelcromei'm trying to make a pagination class, this is my first attempt to make a real php class, besides all those basic oop class tutorials, you know those with some calculations. What i really want is someone to look it through and tell me what's good practice and what's bad practice, some i can avoi...

-1
Q: How to solve Fatal error: Call to undefined function oci_connect()

QKWSI am running a Windows Server 2008 R2 I install and configured: Apache v.2.4.6 win 64 PHP 5.3.27 NTS Uncomment extension=php_oci8.dll It was running good. and then I checked it after few days and I got this error: Fatal error: Call to undefined function oci_connect() How to solver t...

0
Q: Lampp and wkhtmltopdf not working from shell_exec

AlosyiusIm trying to run the following php script: error_reporting(E_ALL); ini_set('display_errors', '1'); $cmd = "/usr/local/bin/wkhtmltopdf http://www.yahoo.com /opt/lampp/htdocs/filer/yahoo.pdf"; $t = shell_exec($cmd); exit(); I have wkhtmltopdf installed and it works perfectly from the command li...

0
Q: How to join 2 databases with Zend Framework?

DaanI'm trying to do a left join while joining another database but I can't get it to work. I have this code: Thanks in advance public function init() { $this->db1 = Zend_Registry::get('db1'); $this->db2 = Zend_Registry::get('db2'); $this->tableConversation = new Application_Model_Con...

0
Q: php compare current date with dates stored in database

TomaziI am trying coding a php script where i want to extract a date field from a database table,store this date compare it with todays. To see if the data. from database has passed or not compared to todays date. the code i have written for this functionality looks like its not working I think i am ...

0
Q: Automatically convert urls to active link

SupertrampI'm using following regex to find and replace any external url in my content and convert it to active link. $content = preg_replace('#(^|[\n ])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is', '\\1<a href="/_goto.php?exturl=http://\\2" target="_blank" class="external" rel="nofollow">\\2</a>', $conten...

0
Q: PDO PHP Stored Procedure (bindParam)

user1756365Everything worked for me with bindParam and PDO. But the moment I add 3 bindParam, it doesn't work. Example that work: $stmt=$dbh->prepare("select * from SP_IMPORT_CRM_SELECTIE(?,?,'test','org naam','French','1','2','adres','adres1','city','city','state','state','postal','postal','country','cou...

0
Q: multiselect preg_match_all to string php

user3009108I have a html file with multi selectboxes with the same name but different values. To get the values I use the following code: preg_match_all("/multiSelect\[.*?\]/", $html, $multigiven); $itz = new RecursiveIteratorIterator(new RecursiveArrayIterator($multigiven)); $multiArra...

0
Q: Site global htaccess rewrite rule

user2482153I have a site (php) with a bunch of files, e.g. directory.php, profile.php etc On each page there are actions that mean I have to use get variables such as: directory.php?action=seed&ref1=abc&ref2=123 profile.php?action=list&ref1=abc profile.php?action=full is it possible to have a rewrite r...

0
Q: Is it possible to add another html tag, inside a rich snippet html tag?

Rhod PumarasSAMPLE CODE: <span itemprop="brand"> <a href="source_url_or_page_the_string"><?php echo $data['brand'];?></a> </span> I am worried if this sample code might create an issue in rich snippet. Below are the usual samples that I normally found in the internet. <span itemprop="brand"><?php echo $d...

0
Q: Yii: validation rule skipped on update

Ionut Flavius PogacianI have a model and when I use the create method, the validation works. When I use the update method, the validation is skipped. This is the validation rule: array('url', 'url'), Do I have to set the on param for the scenarios?

0
Q: Neglecting Empty Boxes: SQL query

user2968129I have a database of one table that has 8 columns. I also have a search page in my website with 8 text boxes (that corresponds to the 8 columns in the database) where the user can enter some values to retrieve the data with the specified conditions. If I use the AND operator in the SQL query, th...

0
Q: Installing OpenX (Revive AdServer) with remote DB

Bromo ProgrammerDear openx experts out there, I'm new to PHP and also Revive AdServer (OpenX). I successfully installed a Revive server using MySql, in a condition where both instances hosted in the same hardware. My question is, how can I install the Revive server in a different hardware using MySql that hos...

-1
Q: How to disable ctrl+u using Javascript

Debakant MohantyI just want to disable ctrl+u event, from my keyboard Currently Iam usingthis piece if code but it disables my entire keyboard <script> /*function check(e) { alert(e.keyCode); }*/ document.onkeydown = function(e) { if (e.ctrlKey && (e.keyCode === 67 || e.keyCode === 86 || e.keyCode === ...

-1
Q: Get random posts without scanning the whole database

zackHow can i get random posts without scanning the whole database. As i know if you use PHP ORDER BY RAND() it will scan the whole database. If there is any other way to do this without scanning the whole database. Thanks in advance.

-2
Q: I want to convert datetime to date.

user3017631Using PDO I want to write from DB date without time. how convert it? This is my PHP code: class edit{ private $db; public function __construct(){ $this->db = new Connection(); $this->db = $this->db->dbConnect(); } public function news($newsID, $title){ ...

-2
Q: how to approve the user added contry in textbox in admin side?

guruI am developing site.There is registration form in which country field is there.if user's country is not in drop down list. user can select other at that time display one textbox and user enter their country in textbox.after submit country by user .how to approve the requested country and publish...

0
Q: Couldn't find driver when use pdo to connect to mssql in php

Hamed KhosraviI downloaded and installed drivers in phpext. When I check phpinfo() see the drivers installed success fully. But when I use this code to check connection: $dsn = 'mssql:host=localhost;dbname=chat'; $user = 'sa'; $password = '123'; try { $dbh = new PDO($dsn, $user, $password); } catch (PDOEx...

0
Q: Delete files from directory using maximum number

user3001244I have the following codes/photos for my products: D2000-1.jpg D2000-2.jpg D2000-3.jpg D2001-1.jpg D2001-2.jpg D2001-3.jpg D2001-4.jpg I want to delete everything after -1.jpg photo of product D2000 and -2.jpg photo of product D2001, and to remain only: D2000-1.jpg D2001-1.jpg D2001-2.jpg ...

0
Q: saving multiple records with transaction using yii :not using loop

FarhadI have something like this: public function actionCreate() { $a=new Tblcompany; $c= new Tblfunctioncontrol; $transaction= Yii::app()->db->beginTransaction(); // Uncomment the following line if AJAX validation is needed // $this->performAjaxValidation($model); ...

0
Q: Can I translate an ASMX webservice with c# codebehind in PHP or node.js?

mirceaI have an ASMX webservice which uses a c# file with the codebehind attribute but I don't want to run things on windows server and using mono ( http://www.mono-project.com/ ) doesn't seem like the best solution for the long-term. Is there a way to translate that to PHP, node.js or something that w...

0
Q: Multiple array keys used, when specifying only one array key

jlmmnsApologies if the title is a bit confusing. My results below point out what's happening. Here's what's going on: I have this array which holds counting integers, per language code. $downloads = [ 'all' => [ 'nl-BE' => 0, 'nl-NL' => 0, 'fr-BE' => 0, 'fr-FR' =>...

0
Q: YARPP plugin only working on some posts

user3050023I installed the Yet Another Related Posts Plugin (YARPP) on my Wordpress site: http://wordpress.org/plugins/yet-another-related-posts-plugin/ It was working fine until I uploaded a post (beautiful burberry) yesterday and it can't seem to find any related posts: http://www.itsalifestylething.co...

0
Q: Tokenizer and Interpreter for a Template Engine

Guilherme OderdengeThe goal Develop a Template Engine in/for PHP "like" Twig. The scenario I was attempting to create a View Template Engine for my own application with PHP and I was using regular expressions to perform that. With the time, I felt inconsistencies in the way I was doing that. Another problem in w...

0
Q: Mysql joining 2 query's in one

TreinbestuurderI have 2 query's: the first one will retrieve the 5 users with the most delay and i am running inside the while loop a second query for retrieving the users username and name. This is how it looks like: select UserID, SUM(delay) as 'TOTdelay' FROM logboek WHERE date >= x AND date <= y GROUP BY U...

0
Q: Laravel 4 how to pass URI Parameters to Model function

user2002495I have this route, want to pass the uri parameters in Laravel: Route::group(array('prefix' => 'view/'), function(){ Route::get('news/listings/{limLow}/{limTop}', function() { return Model::Foo($limLow, $limTop); }); }); In my Foo function Foo(param1=null, param2...

0
Q: multidimensional array using recursive funtion for relational data

Jimmycurrently I'm working on create multidimensional array for categories - subcategories relation and creating a json structure. I have found the following code from following url: PHP Create a Multidimensional Array from an array with relational data function makeRecursive($d, $r = 0, $pk = 'pa...

0
Q: is there any way to catch warnings in php?

user3026502I am developing some thing in php and I want to know if there is a way to catch warnings not error ? for example : Warning: imagecreatefromjpeg(): gd-jpeg, libjpeg: recoverable error: Premature end of JPEG file in C:\xamp\htdocs\class\controller.php on line 5 Warning: imagecreatefromjpeg(): gd...

0
Q: how to send info from php to c++ using exec?

roberti need to send info from php to c++ using exec but i can't and don't know why this not work i used too escapeshellcmd() but nothing change <?php $a=2; // here 1st value $b=3; // here 2nd value exec("project $a $b", $out); // here $a and $b should send the info to project but it's the problem pri...

0
Q: Using var_dump() causes blank page (error reporting is on)

lostikaDoes anybody have idea why I get blank page when using var_dump()? In the joomla global config I set up showing errors too. (checked with phpinfo() and the local values are on too) <?php ini_set('display_errors', 1); error_reporting(E_ALL); ...

0
Q: Get a text box value from a cell

user3003900I have created a table using PHP. echo "<td class=\"normalfnt\" width=\"10\" style=\"text-align:left; padding-left:9px;\" id=\"weightType\"/>$Description</td>"; echo "<td class=\"normalfnt\" width=\"30\" > <input type=\"text\" size=\"6px\" id=\"fuelCost\" name=\"fc\"/></td>"; ...

1
Q: how to do push notification from android from php

sasi kanthhi iam trying to send notification from my php web server to android mobile...but i am getting response as Unauthorized Error 401 below is my code <?php $url = 'https://android.googleapis.com/gcm/send'; $device_ids = array('devise ID' ); $headers = array('Authorization: key=api key', 'Conten...

0
Q: Styling php output

TamsinI want to style the membership status line at the top of each page. All the variables I want to include are in the following code which is working but I want to right justify the whole line, define font properties and add space between items displayed: <?php if (!Am_Lite::getInstance()->isLogge...

0
Q: Benchmarking for multiple parallel reuquests with php

GabrielWhat is the best practice for benchmarking in PHP? This is what I want to do: I have setup a Saas product and I want to issue with cURL multiple parallel http requests towards that URL. Up to now I have built a cURL function that looks like so: function getCurl($strUrl, $arrParams, $intTimeou...

0
Q: Trying to upload image from my iOS app to server

scourGINHOI have the following problem - I am trying to upload an image to server from my iOS app, but I don't know how to do that. There is HTML form on that site that has button for browsing images. Within my app, I select a photo from the gallery, than I try to upload it, but nothing happens. I use this...

0
Q: Symfony form emty_value and multiple

Thibault MartinezI have a "teachers" field in a form. I would like to be able to select a blank value. But in the symfony doc, I read that I have to set the multiple to false and the required to false, to add an empty_value and an empty_data. I understand the required. But why is this necessary to set the multip...

0
Q: Mime types for uploading pdf in PHP in different browsers

user2995165I am creating an web application that allows users to upload pdf documents. The following is the code to check(Restrict) the document type to pdf. if (isset($_POST['submitbutton'])) { $name = $_FILES['myfile']['name']; $type = $_FILES['myfile']['type']; $size = $_FILES['myfile']['size']; ...

0
Q: PHP + SQL - everything in one file

theadimar21I created a simple PHP application that connects with a database and I've made it in three seperate files - one for creating database, tables if they don't exists, one for adding a record and one for deleting the whole table. I would like to be able to perform all of these actions in one .php fi...

1
Q: Removing element from json array with php

Димитър БиковI have made a small application using jquerry datepicker. I am setting unavailabe dates to it from json file which looks like this {"dates":["2013-12-11","2013-12-10","2013-12-07","2013-12-04"]}. I would like to check if a date given is already in this list and remove it if so. my current co...

-1
Q: How to subtract a value from sql?

user3065396I am Creating a script with virtual points problem is I created table and coloum name cash in sql I can't subtract a value from sql ? Example user ayyaz has 500 cash in cash coloum But when i try to subtract 50 from it it Returns -5 or 5 I am using Php Please Help Me

0
Q: Secure Slim-Rest with Basic Auth

user1121575i am new in writing Rest-Apis with PHP. So i use the Slim-Framework for my API. Now i want to secure the API with HTTP-Basic-AUTH. My first decision was to do this with htaccess and htpasswd and send the credentials in the Header like curl_setopt($curl, CURLOPT_HTTPHEADER, array("Authorization...

-1
Q: Php create article in new dynamic page

user3002173I have problem with php when I want to create new article. Recently, I've made script that puts info about article in MySQL DB. But, I want to create new, unique php file for each article.. Now, I'm opening articles like this http:///news.php?id=xy I want to open each article like this http:///t...

0
Q: Hot to get JavaScript .value working in PHP echo

RomanI got a question to a JavaScript code. I got an HTML form: <form action="" method="post" id="myform"> <input type="text" id="mybox" name="mybox" /> <input type="submit" id="submit" name="submit" value="Submit" /> </form> I want to alert the value by clicking submit button. For this I u...

-2
Q: jqplot is not working with firefox browzer

user3065358I am working with jqplot and it's properly working with Chrome & IE but not working with Firefox the are some scripting errors like $.jqplot undefined, Not found element and etc. this is the souce code of the program.

0
Q: Mediawiki SphinxSearch extensions kills Apache

stalk214I`m trying to make knowleage base for my company based on Mediawiki. I have installed and configured Mediawiki 1.21.2 at my own VDS (debian, apache 2.2.16. php 5.3.3.7). I used Sphinx search engine and SphinxSearch Mediawiki extension. But now I try to do the same at production virtual server ...

0
Q: Find file containing class during runtime

jayI have a class Foo it is available during run-time but i can't find it inside my project folder. it's not a core PHP class or any PHP extension. I have already tried ReflectionClass i don't have it in my server. hoping to call some function like functionName($Foo); and get the location of the f...

0
Q: sql syntax for dynamic query

user2893446I'm working on a search query that queries the database due to the search parameters.There are six parameters in the search form and I have to make 6! different queries.Is there any special sql syntax to use for this. My code so far: if(isset($_POST['city']) && isset($_POST['area'])){ ...

-1
Q: What does it mean the "#" tag in URL

Naghi Attilacan anybody tell me what this tag "#" mean in an URL and how to get it ?? ex :like here. I know how to get "?" and "&".

0
Q: Update specific value database json

user3021953I have a query from the database that looks like this [{"id":"1","value":"1"},{"id":"3","value":"1"},{"id":"18","value":["1"]},{"id":"17","value":"1"},{"id":"5","value":"1"},{"id":"19","value":"-"},{"id":"20","value":"-"},{"id":"11","value":"-"},{"id":"12","value":"-"},{"id":"13","value":""},{"i...

0
Q: http://maps.googleapis.com/maps/api/staticmap &markers --> sql,php,variable-loop

user2897437please help me to fix this: input from html-form-->action="PHP"-->access mysql-->display map with multiple entries(&markers - google.map.option) just tell me, what you see || would change/optimize || how you would approach my target here my source-code (php-part): <?php $isearch = $_POST['search...

0
Q: How to tokenize a string in PHP and how can it be useful for a Template Engine?

Guilherme OderdengeThe goal I'm trying to create a simple template engine in PHP. I want to Tokenize {Title: 'Hello!'} and remove it from HTML when a request for the page is made. The problem I don't know how to Tokenize the string and remove it from HTML when the page is compiled/interpreted/requested.

0
Q: How can i start to build voice chat php?

Mohamed AtaalaHello guys, I want to learn build voice chat using PHP & Mysql, i built php&Ajax chat text only previously My questions : Is it difficult to do that with PHP & Mysql? Are there any good tutorial about such project? Any idea will be helpful!,or how to add voice to my text chat Thanks alot

0
Q: PHP creating objects inside a base controller on demand

Vxsdfsdf AzcxzcSo i'm working on a framework (Yes i know it's overdone) and i was brainstorming what would be the best possible approach to achieve dynamic object creation inside a base controller. So i came up with the following solution: Base controller abstract class Controller extends Container { publ...

-2
Q: PHP loop to echo certain div class on first round only

babbaggeiiI'm trying to create an accordion where the first one is open (with this CSS that means that the panel has 'in' added to the panel-collapse div). So, I'm setting the variable $i to 1 and just echoing 'in' when it does equal 1, incrementing after the first. When this is executed, however, all lo...

1
Q: Display a method when div is displaying using show()

t4thilinaI have create an html code like this. When div '#Loading_Page8' is displaying after clicking on link "#Loading_Page7" I need to call a function in ABC.js. It has an Ajax function which runs a query in PQR.php. Here I have given a sample of my html page. .js file as well as the .php file <html> <...

0
Q: PDO - Number of bound variables does not match number of tokens

oliverbjI have this code, I am running from a cronjob. Although, I get this error: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens This is my code: $TIME_TO_CLICK = (int) date('i'); $HOUR_TO_CLICK = date("H"); if($TIME_TO_CLICK <= 20){ $QUERY...

0
Q: converting regular expression in PHP to javascript

aditI have the following PHP regex: /\b([A-Z0-9]{8})\b/i in which I wanted to convert to a javascript regex. So I tried the following: /^(\b([A-Z0-9]{8})\b/i however it failed. Why is this? I am trying to check if a string has a word that contains 8 digit of alphanumeric character, ignoring upp...

0
Q: Save user page layout and load it after login

AndrewI have a page, where user can modify its content after they log in. Is there some way with jQuery to save the layout of the page for each user. So when they log in they find the page in same state how they leave it.

0
Q: How to upload resources from source to google cloude storage

Akshay RansingI use yii framework of php and it tries to copy assets from private folder to public. As local filesystem is not accessible in AppEngine solution is to upload it to cloud storage and should be made public-read. But I get error while serialization to string google\net\ProtocolBufferEncodeError

0
Q: How to override default HTML Helper of Cakephp?

Moyed AnsariI’m given theme by designer and I’m assigned to integrate it with the product. Since the product size in term of source code is massive, I have to modify almost all the views and layouts. Moreover, the development of the product will go for next 2 years which is plan. I’m trying to override HTML...

0
Q: PHPUnit - Testing Switch/Default cases

user2909892I have a question about PHPUnit. I want to write a test case for the following Message class and want to cover the default: case in my test cases by passing an invalid $type in the isValidMessageType() method. Just to give you a proper scenario of when this will be useful, suppose the developer a...

0
Q: PHP Image Directory Shuffling

user3042325I couldn't figure out, how this Stackoverflow coding works, so yeah here's the Pastebin link. http://pastebin.com/KchhJVqy

0
Q: How Can I Call Java Webservice (Client PHP)

Mohammed Saqib RajputSoap Client Create but web service not responed. i am trying this code: $wsdl = "http://localhost:42718/CalculatorWS/CalculatorWS?wsdl"; $options = array('features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS); $client = new SoapClient($wsdl, $options); echo "Soap Client Creation...

0
Q: PHP SimpleXMLElement, get element and its children as XML

KetanSuppose I have the following XML: <Book> <bookname>thename</bookname> <chapters> <chapter> <name>chapter1</name> </chapter> <chapter> <name>chapter2</name> </chapter> </chapters> <Book> How can I get an XML as follows: <...

0
Q: get value of session from one module controller to another module controller in zend

user2190285create session in my default module controller like $session = new Zend_Session_Namespace('MyNamespace'); $session->user_store_id = $store_id; when i want to get this session value in my admin module controller like $session = new Zend_Session_Namespace('MyNamespace'); echo $se...

0
Q: Get Wordpress Post ID in JQuery file

user3064595The following Wordpress loop creates several textblocks on a page: <?php while ( $query->have_posts() ) : $query->the_post();?> <div class="col-md-<?php echo $column_width_input = get_post_meta( get_the_ID(), 'column_element_grid_class_meta_box', true ); ?>"> <div id="post-<...

0
Q: Create a system to organize the time

AlbatroszIn PHP, I don't know the best way to create a system to organize the time: We are 4 people, and we want to look for the best space of time in 2 hours to meet (when will be the best timeslot to meet together?) These are our free time: Person 1: Monday 9am-13pm, 18pm-19pm; Tuesday 15pm-19pm Pers...

0
Q: PDO_OCI execute fails

CrazySabbathI have oracle database, table called "statements". I'm trying to execute one query, using PDO_OCI execute() and prepare() methods. And query execution fails. I've tried same query at my oracle database, and it's working, which means pdo_oci driver is failing me for some reason. $params = arr...

0
Q: PHP MYSQL Retrieve Min value from several columns

user1630140Very new to PHP so pls bear with me. I have a table with several columns as such id | onezw | twozw | threezw | fourzw | fivezw | sixzw | minzw each column has a number that get entered, I then need the 'minzw' column to show the minimum value of the 6 columns. I have the following code but ju...

0
Q: php is not recognized as an internal or external command

user2696750I have this c++ code if(i>1) { std::system("php -f C:\\Program Files\\EasyPHP 12.1\\www\\CarProtectionSystem\\UpdateDetection.php"); } I am using EasyPHP ... but when I run the code I have this error: php is not recognized as an internal or external command operable program or batch...

0
Q: Why can't my PHP 5.4 webserver speak to my multi-subnet failover cluster using SQL Always On?

JanskyWe've recently implemented a SQL Server 2012 Always On failover cluster. The go-live is in 2 weeks time and some concerning issues have come up. Previously we were dealing with servers in the same subnet, but we've since moved the servers to multiple subnets. Since doing that we encountered the ...

0
Q: Wordpress footer not positioned correctly

user3065522I've been trying to crack this for 2 days. Pretty much as you can see: http://goodkarmahack.com/testinstall/?page_id=11 We are having an issue here with the footer not staying in the correct position at the bottom of the page. Any help would be greatly appreciated! Thank you

0
Q: Can not remove white space starting of the string

KalaiI have tried to remove the white space starting of the string in php. I have tried the following but there is no solution. $str = ' test string'; var_dump($str); // outputs string(12) " test string" if i give var_dump($str[0]); // outputs string(1) "" I have tried with preg_replace also b...

0
Q: Php 404's after moving site

I HafidI inherited one PHP site recently which I had to move to another account on same hosting. I made exact copy of the site and environment, exported and imported all databases and script gets through to them. I had to change mysql settings in _cfg.php for that matter. But despite index page loading...

0
Q: Contact form not sending to client

Melissa BoyleI have an issue with a contact form I have set up on a clients site, the form posts to my email address no problem but doesn't for my client who's domain is registered through 123 reg and email accounts are set up within Gmail. On contacting my web host they have suggested using SMTP, this is som...

1
Q: PHP adding zeros to numbers

csahrpnoobieIm trying to generate barcode and i need it to be in 20 numbers. Barcode requires that reference must be in 20 numbers. So if my reference is 67585 its must be 20 numbers like that 00000000000000067585 And if reference is 489382995463342 Barcode number must be in 20 numbers like 000004893829954...

0
Q: .htaccess on small catalog page

Akul Von ItramI building small catalog webpage. So I have a problem with this. When I put this code in .htacess RewriteRule ^katalog$ /katalog.php RewriteRule ^katalog/(.*)$ /vrsta.php?vrsta_seo=$1 RewriteRule ^katalog1/(.*)/(.*)$ /podvrsta.php?vrsta_seo=$1&podvrsta_seo=$2 RewriteRule ^katalog2/(.*)/(.*)/(.*)...

0
Q: PDO multiple queries, second returns bool false

user1476992I'm trying to run multiple queries as shown below. I want to first get the selected category amount to use later. Then in a separate query I want to get a sum of the credits, and then subtract from that a sum of the debits. This will work when there's only one query, but when I try to add anot...

0
Q: No need to show the pop-up window after user close it

Raj ツI am new to magento development, in home page we are showing promotional pop-up window to the customer. Now my requirement is, no need to show the pop up again if an user does close the pop up and reload. Now it's opening if an user does close the pop up and refresh the page. I don't know whic...

0
Q: Product Feed is submitting and returns id,but i'm not able to find where its located in sellercentral.amazon.de?

user3065523I'm Submitting the below feed and geeting the submit feed id by getFeedSubmissionId(). But The product is not appearing in the sellers site. please help me in this regards. feed : 1.01 **** Product 1 Update RO7WA11930KB1C...

0
Q: Issue on menu joomla

Stefano MaglioneI don't understand why in my website if you click on first item left menu (politik) or second to last (biler,bade ...), the hover effect on home botton in top menu doesn't appear while if you go to another left menu item it appear. Maybe it's url fault? I perceive the first item menu url it's bi...

0
Q: simple HTML file parser with php

Jakub ZakI have a particular problem which I can't crack. I searched for every tutorial or form entries, but had no luck in succeeding in what I need to do. So my HTML file: <html> <head>**SOMETHING HERE**</head> <body> <div> <table> <thead> <tr><th>TEXT/NUM IS HERE</th><th>TEXT/NUM IS HERE</th

0
Q: Dynamicaly generated form validation

kacperI have to create a form, in which after click on button new line with two fields ( and ) appears. In first field user can choose a product, and the second one should be filed with number of ordered items. I tought the best way of validation the second field will be , but I don't know how to pass ...

-1
Q: Image won't load in firefox

GreenBlueRupI have a problem with FireFox today, When i want to upload an image (and resize it with php) on Chrome it works all fine, and shows the image afterwards. When i try it on FireFox it won't load the image afterwards. This is an example image with the loading error: http://dev050.nl/media/advertori...

0
Q: Lexical error running PHP sample project

user3065540I'm new to netbeans and trying to run PHP todolist sample project. One of the first things to do is to run mysql.sql file to create table named todo. Here is a query : CREATE TABLE "todo" ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, `priority` INT(1) NOT NULL DEFAULT 2, `created_on` ...

0
Q: Auto close of html tags and php tags in notepad++ and a semicolon at the end of php lines

Ravi McaI'm a php developer. And i like notepad++. But it is really a frustrating me when i want to write the html tags in php files. I would notpadd++ to automatically fill the end tag. But this feauture is included in 6.5.1 but it is working only with the files which is having extension of .html or .ht...

-2
Q: SQL Injection solution for PHP / MySQL Website

user2737457I'm building a website that uses a fair few user input forms and I've been told about SQL injection but after reading many articles I'm still confused about how to Properly use it. Here's the code that I'm using in my site and I've based it on several blogs I've read but just want to check that t...

0
Q: MySQL INNER JOIN using an OR whilst logging in

Matthew PeckhamMy table structure is as follows: ~ MEMBERS ~ UID NAME EMAIL ~ COUPLES ~ UID_1 UID_2 PASSWORD SALT When a couple sign up, their UIDs get inserted in to the couples table, along with their joint password (and its salt). Now, when logging in, I need to join the tables so I can check the passwor...

0
Q: Cloning A Page But Use A Different Widget Area

user2868832I hope someone might be able to help me with this. I have a page layout that top half is page template and the text area at the bottom is a widgetised area. Previously to replicate a look of a page we have copied and altered the page template, added a new widget area and called that into the new...

0
Q: Doctrine Unknown column type "Date" requested

J. RahmatiI have a project in symfony2 where I want to map an entity class to the database, but executing php app/console doctrine:schema:update --force gives me following error: [Doctrine\DBAL\DBALException] Unknown column type "Date" requested. Any Doctrine type that you use has to be registered w...

0
Q: HTML to PDF Creation in Cakephp

SadikhasanPath : Vendor/dompdf I am getting Fatal error: Class 'DOMPDF' not found in C:\wamp\www\sms_app\app\Controller\SentMessagesController.php on line 313. Please help me why i am getting error? function example() { //App::import('Vendor','dompdf',array('file'=>'dompdf'.DS...

0
Q: Limit by merchants in prosperent api

Vinu SI have using the prosperent api for displaying products. It returns product from all merchants. They are providing filterMerchant for limit the merchant. But this is used for getting products from one merchant. I need to filter by 2 or more merchants. How can i achieve this...?

0
Q: PHP - Send Email on Day+1

user3065579im trying to build my own autoresponder. I have a database of users where their emails and signup dates are stored... Now I want to send each user every day one email for x amount of days. I thought it might be a good idea to setup a cronjob to do that. But now here the problem... How do I se...

0
Q: how to make multiply-level menu using data in mysql

PooyaI'm trying to make a menu using data in mysql. here are my sql sample: +----+-------+------+--------+ | id | title | link | parent | +----+-------+------+--------+ | 1 | tit 1 | link | NULL | +----+-------+------+--------+ | 2 | tit 2 | link | NULL | +----+-------+------+--------+ | 3 | ...

0
Q: how to get the value am not get the Value in Php oops

user2967835I want to get the value from LAtest.php in Index.php and displayed in index.html. but am not get the output. kindly help to resolve the problem. am tried my level best but am not get the result Index.Php File <?php //Include Common Files @1-5471E0F2 define("RelativePath", "."); include(Rel...

0
Q: ModRewrite breaking styles and javascript

TumtumI'm very unfamiliar with htaccess, so I have no clue how to tackle this weird issue. I have a domain connected to a different server by setting the nameservers. Then I use htaccess and ModRewrite to link paths to subfolders on my server, using an existing script like this: RewriteCond %{HTTP_H...

0
Q: POST data to a different domain form without leaving current domain

Dan1676I am currently working on a project which requires me to POST data to an form belonging to a different domain. This does work but I don't want the user to see the data posted to the different domain as it just shows a success / error message (on page B). What I want to do is have the data POST b...

0
Q: php-How to compare two sentences in PHP

user3004356I'm new to PHP. I have two strings str1="Hello, this is 1" str2="Hello, this is 1" Now, I need to compare both the sentences and display it inside tags. I did this much. I don't know how to compare senetences in php. <?php $str1="Hello, this is 1"; if($str1=="Hello, this is 1"){?> <title><?=$s...

0
Q: Sends mail to recievers and senders mail box swiftmailer

CudosI am sending two emails. A receipt to the customer and a receipt for the webshop owner. The E-mail messages are generate and saved into a database with sender and recipient email addresses. The pull the messages from the database and loop through them and send them with Swiftmailer through Goog...

0
Q: in_array not working from fetch_array created array

DarksideI am having difficulties with an array. I have a table in my DB with a many to many relationship, where by an employee can have multiple skills and a skill can be associated with multiple employees. I am trying to setup a form where a user can use checkboxes to show which skills an employee has....

0
Q: Warning: require() [function.require]: open_basedir restriction in effect is not within the allowed path(s)

user3065589I have a broken file here and it's writing that code error. The error message comes from: Warning: require() [function.require]: open_basedir restriction in effect. File(C:/Websites/contact/contact-files/contact-form-run.php) is not within the allowed path(s): (D:/InetPub/vhosts/carservicecity....

0
Q: Export picture from database to word file PHP

user3024159I'm having problems with exporting the picture to word file. I have written the php script which fetches the content of two columns of my mysql database and then export those contents in the word file. One of the columns is for images. The script is running fine but i am having problems with fe...

0
Q: Wordpress php else if statement with advanced custom fields

user2648610Im trying to make an if else statement which works by going if there is a link print if not just show the name. I have the below code which is almost there. However the link is being printed above the text ranther than being an actual link. <?php if(...

0
Q: SQL: if WHERE XY not exist

user2039913I have a WordPress installation. Ive got over 1000 posts, with custom fields. The problem is, Wordpress creates the custom field in the database only when you save the post for the first time, but i want to fill these fields, no matter if they exist or not, when they don't exist, i need to create...

0
Q: Setting a cookie

Rana Muhammad WaqasTrying to learn cookies in PHP to me everything seems fine but it doesnt even set the cookie here is the code <?php if (isset($_COOKIE['username'])) { header('Location: simple.php'); } else { if (isset($_POST['submit'])) { if (isset($_POST['username']) && isset($_POST['password'])) {...

0
Q: Acquire the variable id name of children dom elements in PHP

user2950940I'm trying to parse a website to acquire a specific id number, and the part of the site i am interested in looks like this: <div class="clearfix" id="topCurrentGamesList"> <div class="topCurrentGames" id="topCurrentGame38632" data-game-id="4154"> </div> <div class="topCurrentGames" i...

0
Q: How to add custom product relations via xml in Magento?

PolesI already installed the "related products" plugin in my magento...and the related.phtml in included in right banner of the page by defalut via xml.here is the code- <reference name="right"> <block type="catalog/product_list_related" name="catalog.product.related" before="-" template="cat...

0
Q: Access denied to my MySQL DB

runelynxI've created a fresh new DB ("rpgame") in MySQL on my linux server - but I'm getting access denied errors when trying to connect to it. The user it's connecting as is root@play.runic-paradise.com. I've tried debugging a bit, please see the screenshot. It seems that the password area is missing ...

0
Q: Permission issue in Yii Framework and Google App Enginer

Rahul GautamI am developing a web application using yii framework in PHP, and hosting it to the Google App Engine. When i run the application using Google App Launcher on localhost. It's working fine but when i am deploying it to the Google App Engine, It showing me an error "Error 500 Application runtime...

-1
Q: Why cloud-based email solutions?

MichaelCan anyone explain to me why some people prefer using external email delivery services like SendGrid, rather than configuring their own mail server? Because most of the providers now offer their own SMTP server, right? In what circumstances is cloud-based email solutions better than local mail se...

0
Q: Cloudbees PHP clickstart : error ServerRoot must be a valid directory

user3065613I'm new to Cloudbees, I've deployed a php application using the php clickstart and I'm getting a 502 HTTP error. Logs shows lines like : Starting apache web server httpd: Syntax error on line 2 of /var/genapp/apps/b609d97e/conf/httpd.conf: ServerRoot must be a valid directory Do I have to mod...

0
Q: Laravel4 memory consumption concerns

Can GelişCase Currently I am developing an application using Laravel 4. I installed profiler to see the stats about my app. This is the screenshot: Questions You can see that it consumes 12.25 MB memory for each request (very simple page) in my vagrant (Ubuntu 64 bit + Nginx + PHP 5.4.17 + MySQL). D...

0
Q: How to sort array keys by other array keys?

KirixFor example i have two arrays like: $first_array = array( 1 => 'a', 2 => 'b', 3 => 'c', 4 => 'd', 5 => 'e' ); $second_array = array( 1 => 'not important', 4 => 'not important', 3 => 'not important', 5 => 'not important', 2 => 'not important', ); Is ther...

0
Q: Could not refresh JMS Connection for destination

coderI have a web application which runs on apache/PHP. In PHP, I have an activeMQ producer which writes some data into the queue. I'm using stomp client for this. For consumer, I'm using JMS + spring. I'm able to write the messages in PHP (i.e from producer). But while reading from my JMS consumer, I...

0
Q: Combine php array duplicate values

Linesh joseI have a php array that just like this: Array ( [0] => Array ( [product] => 2 [price] => 30 [qnty] => 1 ) [1] => Array ( [product] => 2 [price] => 30 [qnty] => 1 ) [2] => Array ...

0
Q: How we can open files using google.picker

user3065423How we can open files using google.picker(for google drive files) with google application. i didn't found any option/class for open selected file from User interface. please help me ASAP.

0
Q: convert html image to base64

ddw147i have application to send email. library used swift mailer. i have generated html string for sending email which contains various tag including tag can i convert that img src tag to bas64 image for ex <html> some txt+html ... <img src="some-path/image.jpg"> some text+html .. </html> ...

 

« first day (288 days earlier)      last day (22 days later) »