« first day (283 days earlier)      last day (27 days later) » 
00:00 - 14:0014:00 - 00:00

12:00 AM
-1
Q: strstr Not working PHP

Uncle NerdicusI am trying to compare an array of keywords to a string and then set a variable based on that. Issue is I keep getting the following error.. Warning: strstr(): needle is not a string or an integer I am using the following code foreach ( $needle as $needle ) { if (strstr($haystack,$needle...

1
Q: Empty or too short HTTP message using HTTPRequest

edi9999I have an app that responds to a POST request with files: https://docxgenjs.herokuapp.com/ It just echoes out (in JSON format) the files that were posted to that URL. You can test it using a REST Console (on chrome web store). Howewer, when I request that page using PHP, it doesn't work out:...

 
12:12 AM
0
Q: Hidden submit button value

user2943358<input type="submit" name="Submit" value=1> Is there a way to make a submit button that has a hidden variable, in php? I have a form that requires the process.php to function differently based on which submit button is pressed (It needs to have multiple submit buttons on one form and one proces...

0
Q: "The parameters dictionary contains a null entry for parameter" php api

user3047498Well, I'm new working with APIs and I have a problem This is a example of working code, it shows all categories of a web function list_categories(){ $c = curl_init(); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); curl_setopt($c, CURLOPT_HTTPHEADER, $this->xmlHeader); curl_set...

0
Q: HMAC equivalent in C# with chr(0) in byte array?

billy jeanI am having a problem getting the equivalent to hash the same in C# as php: $sig = hash_hmac('sha512', $endpoint . chr(0) . $data, $password); I think the problem is in the way php builds the string with the chr(0). In C# i need a byte array with equivalent of chr(0) in between $endpoint and $...

0
Q: Permutation with too many result

Daniel ForbesAny ideas I how I can run a permutation with a few billion results? any way I can stop it once the limit is reach and continue from that point or any other ideas about how to remove the size limitations in an effective way even if it takes longer. I'm doing it with PHP on a virtual sever but I'm ...

0
Q: using php inside of iframe html tags

FirelightI am trying to create a website that displays another website in an iframe. This is my code: <html> <title>HTML with PHP</title> <style> body { margin: 0px; } </style> <body> <?php $url = $_SERVER['REQUEST_URI']; $parts = explode('?=', $url); $page = $parts[1]; echo $page; ?> <iframe align="ce...

0
Q: How to initialize Twitter bootstrap form-helper datepicker

marchemikeI've been searching the internet on how to initialize a datepicker twitter bootstrap form helper, but I cant seem to find a tutorial for it. I already have the datepicker.js embeded, but I don't know how to initialize the js to the textbox I want it. How do I initialize the datepicker plugin?

0
Q: Deletin specific row from a table in MySQL using PHP

Rendy SetiadiI know this question has been asked too many times but I've searched and found nothing to solve my problem. In the table i got 4 columns: id (auto increment and primary key), type, quantity and date. The problem is when I press delete link it won't delete specific row I want and please forget abo...

0
Q: strtotime always returning 1st january

user2921557trying to have a basic time stamp next to my posts on a cms but strtotime is giving me issues. So i have this: $postDate = $row['date']; $written_month = date("F", strtotime($postDate)); $short_month = substr($written_month, 0, 3); $day_number = date("j", strtotime($postDate)); echo ' <div...

0
Q: PHP mail form to display checkbox results

user2980317I'm working with a PHP mail form and so far all is working well. It is returning everything from the form except the checkbox results. For them, it just says 'array'. I've searched high and low for a fix but I can't seem to get it working using the solutions I have found online. Part of the issue...

 
12:42 AM
0
Q: Trouble with matching numbers in regex (php & preg_match)

GrantI'm having issues with regex in PHP. Here is the code I am using the regex on: <br />Level 163 Operative </div> <div class="sectionBar"> This is the preg_match statement: preg_match("/<br \/>Level ([0-300]) (.*) <\/div> <div class=\"sectionBar\"><\/div>/i", $output, $op); $top = $o...

0
Q: PHP MySQL Category Tree Parent Level ID

ashbringerI'm creating a multi-level category with PHP/MySQL. I've listing my category items via ajax, but I can't get top levels by ID. MySQL Table ID upCID category 1 0 Electronics 2 1 Computers 3 1 Camera & Photo 5 2 Laptops 6 2 Desktop 7 6 Ke...

0
Q: Laravel 4: manipulating ajax data through controller

user3011462I'm new at Laravel and ajax. I'm trying to get the data from a form via ajax and calling a method in the controller via that same ajax. The method in the controller searches the database and then returns a json response that gets handled by ajax(that last part I'm still thinking about, I haven't ...

0
Q: PHP - Can't get a MySQL stored procedure OUT parameter

Carl Bear StefanssonCan't get my head around this. The procedure: DELIMITER // CREATE PROCEDURE InsertName (IN NewName varchar(50), OUT NewID char(25)) BEGIN DECLARE NewID CHAR(25) DEFAULT (SELECT CONCAT((SELECT unix_timestamp()), (SELECT FLOOR(RAND() * 1000000000000000)))); INSERT INTO...

0
Q: PHP Class and Method beginner

TomaziHello People I begun to learn PHP Classes & Methods and as a practice exercise I decided to create a Class called Bank Account and trying to implement DisplayBalance(), Withdrawals() and Transaction() Methods. Most of it works and I am able to display a balance as well as add and subtract 'mon...

0
Q: Simplest way to empty a database with ForeignKeys without deleting/creating it

edi9999I would like to empty a Mysql database (eg destroy all tables) . But: I don't have the permission to delete that database. So I can't use the trick DELETE DATABASE x; CREATE DATABASE x; Is they an automated way to remove all the tables (given that they are a lot of foreign keys to remove bef...

0
Q: Issues connecting to Microsoft SQL from PHP

user3044121I am building a website using PHP on Somee Server(somee.com) and Microsoft SQL. Now I have a problem making connection between php and SQL. Here is my connection code: <?php $serverName = "mssql.somee.com"; //serverName\instanceName // Since UID and PWD are not specified in the $connectionInf...

0
Q: Why am I unable to set cookie name with PHP's setcookie()?

Chris PatersonI am trying to use the following code to set a cookie: <?php setcookie("sid", // Name session_id(), // Value 0, // Expiry "/", // Path ".mysite.com", // Domain true, // HTTPS Only ...

0
Q: Saving formatted text from textarea to database

marchemikeIs it possible to save formatted text from a textarea? I have embeded my textarea with a ckeditor plugin, and I was wondering if it is possible to save the formatted text(for example, I changed the font size to 9) in the database? Or do I have to change the datatype of my field other than string?

0
Q: How to add ASCII NULL char(0) to byteArray in C#

billy jeanI have a string in PHP which is being converted to a byte array and hashed. The string being converted to the byte array looks like: "g". chr(0) . "poo"; I need to equivalent byte array in C# so i can get the same hash..

 
1:18 AM
0
Q: How to retrieve <textarea> value with POST and save to a file?

DominoedOn the page "index.php", I have the following html: <form class="centerd" method="post" action="upload.php" enctype="multipart/form-data"> <textarea id="html" type="text" name="html-text"></textarea> <input type="submit" value="upload"/> </form> On the page "upload.php", I have the fol...

-2
Q: Which Language person should learn PHP or ASP.NET who has C++ background for 5 years?

user3015400I am software engineer working in C++ for past 5 years.I want to learn ASP.net or PHP language. But I am really confused which language I should select. There are many discussions regarding this topic. But I want to understand that which language will be suitable for my background of C++ ? Future...

0
Q: How to select certain rows with an sql statement depending on whats in another table

Trevor KeatingOkay so I have a database as such, journey_driver driver_id j_id 23 1 23 2 1 3 journey_details j_id starting_point end_point start_time end_time 1 Dublin Cork 4:00 7:30 2 Galway Mayo 16:00 18:00 So if I wan...

-3
Q: When should rails be used over php and vice versa?

thecodethinkerAfter about 2 years of learning ruby on rails and almost a year of php I've come to really love both solutions to web development. I see why php is used (it's really easy to set up and super easy to maintain... at least for my projects.) I see why rails is used (it's super easy to use and you ge...

0
Q: Using PHP and ajax to display markers on google maps from mysql database

user3047704Hi I have the following code which shows google maps on a phonegap application. I am getting the marker showing the current location. But I want to show the markers for the places in my mysql database. Can you tell me what i am doing wrong? Here is the code: <!DOCTYPE html> <html> <head> ...

0
Q: Posting to Wordpress Fields - Curl / Php

John_NilI am running a php script to automatically post on my wordpress site - I got most parts from the login to the posting working ( just hit a few snags with custom fields and was wondering if anyone could help ) The site i'm posting to is also on my localhost (home pc using xampp) but i'll try my b...

0
Q: PHP REST API got error when try to add New Users to Jasperserver

sakuraI got some problem with php-sample. I want to add users, but there were something went wrong. Please help me!! Here is code that I used: <!DOCTYPE html> <?php require_once "vendor/autoload.php"; require_once "autoload.dist.php"; require_once "client/JasperClient.php"; require_onc...

0
Q: "Proper" separation/difference between index.php and front controller

jasonszhaoFor a PHP mvc application, what is the difference of the job of the index.php file and front-controller? Is the front-controller in the index.php, or is it in a separate file? How do I separate the two and let them work together? Is the front-controller supposed to be a class (or like its own ent...

0
Q: Problems loading a PHP file after making a link with a function

user3047712Goodnight, my question is this, I have the following PHP code which connects to a database and displays the information embodied in it, then one of the cells which is called IP should be showed as a link, however, when I put it on my website, for some reason it takes a long time to load, I guess ...

0
Q: Disable DOMDocument to format the code

user564285How to make DomDocument not to insert p tags inside the content? I use this code: $content = 'http://google.com'; // New DOM $document = new DOMDocument(); $document->recover = false; @$document->loadHTML( $content ); $content = $document->saveHTML(); print_r( $content ); Does not help, the...

0
Q: I have a script to upload a video or audio to a php server but not working

JaidoThis script I have works well for uploading images but does not work for videos and audios. I believe it as to do with my php.ini setting not allowing videos. I have tried to increase the memory of file that can be uploaded but it still not working. Please what do I do. cos I have tried to diffe...

0
Q: error upload with xupload extension on yii framework

SunartoI want to use the extension xupload on yii framework. but i have a problem when uploading files my controller IdentityController.php public function actions() { return array('upload' => array( 'class' => 'xupload.actions.XUploadAction', ...

-2
Q: search engine php onclick it will pop up and watch video

VincentI know this is odd to ask, but still I'm going to take the risk if someone will answer then thank you very much and much appreciated. but if I got a down vote, well I understand it because just like I said, this is an odd question :) I just want to ask if there is an existing downloadable or exa...

0
Q: Is there a way to add users.php?role="custom_role" link as a submenu item of a plugin page?

zorancI'm already using add_users_page()// this creates a submenu in the users section How would I go about displaying this users.php?role="custom_role" page from a plugin submenu item? bonus points i I can include a custom.css stylesheet only on that page in the process :)

0
Q: Proper security when creating a PHP session that never expires

steepedSince keeping a session active for a long period doesn't seem very reliable (when using session_set_cookie_params), it seems like the next best option is to store a cookie along with the session. When the user logs in, I create a random hash and store it in a database table beside their user id...

0
Q: Contact Form Validation: Code to filter characters allowed in message

user3021928I have a problem with spammers on my contact form. I notice that they use non standard characters in their messages so I would like to add code that only allows messages that contain standard characters 0-9 a-z A-Z !@$&'",.?/ and spaces with an error message that says, "Your message contains forb...

0
Q: Netbeans waiting for connection to XDEBUG

Roxanne CourchesneNetbeans won't connect to xdebug. I've tried suggestions from the following posts: Debugging IDE's port connection to XDebug: "Waiting to Connect" netbeans shows "Waiting For Connection (netbeans-xdebug)" but it doesn't fix my issue. It seems Netbeans connects to xdebug because while it wait...

0
Q: Google Sandbox and Penalty Checker API

Hakan GungorIs there any PHP function or PHP class to know a website in Google sandbox or banned from Google? I just saw this website and wonder how can they do it. http://pixelgroove.com/serp/sandbox_checker/ P.s. I searched on Google and couldn't find any useful content about it

0
Q: Spaces in dropdown menu

user2943358for ($i=1;$i<=100;$i++){ echo '<option value="'.$i.'">'.$i.'<option>'; } Using this is giving me the dropdown menu I want, and it functions fine, except its got these incredibly unaesthetic spaces between each number in the dropdown menu. Syntax causing this? suggestions?

0
Q: stream_socket_client fails on some servers

saeidI have a vps with direct admin panel and a web host with cpanel and litespeed. I tested this code: $errno = 0; $errstr = ''; $fp = @stream_socket_client('uploaded.net:80', $errno, $errstr, 20, STREAM_CLIENT_CONNECT); on both servers. in vps server it works successfully but in web host serv...

0
Q: getimagesize() error: “failed to open stream: No such file or directory”

user3047759i have that problem and i don't know what can i do? Here is my script : <?php include('../include/cfg.php'); if($approval_system == 1) { $ap = 1; } else { $ap = 0; } $path = "../uploads/"; function resize_img($url, $filename, $ext_p) { $max_width = 613; $max_height = 2000; $dest...

0
Q: Unable to assign POST data from multiple check boxes

user2961121I am a newbie to PHP and MySQL, so please ignore my bad practice of coding :) Ok, here's the scenario: I have a page, checkin.php which has two forms; Form 1: Takes some input and displays data from database along with multiple checkboxes. Form 2: It is dynamically generated if any data is foun...

0
Q: Repeating a <select> menu multiple times with a SQL query

RichieW13I am trying to create a page which has a menu repeated 20 times on the page. The options from my menu will come from a SQL query. This works for the first menu, but I am getting empty options on the others. So I have this in my PHP section: // query and display records for Riders menu $q4...

0
Q: How to Write JavaScript code inside JavaScript and all in PHP?

DarninI have an ad that will appear when certain conditions. And when that ad appear, the ad will detect the width of the screen and use the ad size I specify. I did this using JavaScript inside JavaScript and all are in PHP. Problems arise when writing in document.write. Please help me solve this pro...

0
Q: mysql SELECT from 3 tables where 2 of them could be null

Frederico RossiniI'd like to ask you for help with a query (mysql). I have 3 tables: 1.table "reviews" ID | content | -------------------------------------- 1 | content of first review 2 | content of second review 2.table "pros" ID | reviews_ID | pros | ------...

0
Q: Select option from dropdown menu with PHP and mySql

MahouI tried to create the simple select drop down menu from mysql database. However, it does not work on my code. Here is my code: <?php mysql_select_db($database_conn, $conn); $query_RsCourse = "SELECT * FROM tbl_course ORDER BY courseid DESC"; ...

0
Q: Adding two times from database

Aljieim a newbie in PHP and im trying to solve this situation as much as i can but still don't get/know the right answer. I have a table with 2 columns in database with time datatype Lunch Break 00:01:00 00:00:30 Im trying to fetch the data and add the two times, but i always get the wrong va...

0
Q: How to create a friendly URL with two or more arguments using mod rewrite / htaccess?

GandalfMod rewrite novice here. I want to pass two URL parameters in the URL, but in a more friendlier format. If user passes, "example.com/blah123/sys", I should be able to extract the MySQL record "blah123" and the mode type "sys", in this case. Here's the example: URL: example.com/blah123/sys In ...

1
Q: How to send an JavaScript array to PHP via jQuery.ajax?

Alvaro CavalcantiI'm trying to send a JavaScript array to a PHP page via jQuery.ajax, but the array is sent only with blank values. If I open the F12 Console on Chrome and check for the JS object, it's there. All filled up. But when I log the PHP variable using the ChromePhp tool, it shows only the blank values ...

0
Q: Critique sanitized user email PHP Script

tbremerSo, I have a basic 'contact us' form that i have built, and I do some jQuery checking first (that a phone number is only numbers, email address doesn't contain unneeded characters, etc), but I also wanted to do some sanitization before sending out the email. After reading many questions on SO (s...

0
Q: why sometime can get error 404 not found (soapclient- response has contents of the response), how to solve

Hansi have a NUSOAP webservice when i run from client it visbile the error wsdl error: Getting http://carvilshoe.cz.cc/index.wsdl.php?wsdl - HTTP ERROR: Unsupported HTTP response status 404 Not Found (soapclient->response has contents of the response) below is my code at client i have to client (...

0
Q: How do I get this to work PHP form sender

user3047804Can anyone see what is wrong with my PHP form sender code:?? My code is listed below - the form always says no matter what, incorrect email address. Thus, it is broken. Much appreciate your help! $to = "joinrendezvous@gmail.com"; $from = "mail@example.com"; $headers = "From: " . $from . "\r\n"...

 
2:49 AM
0
Q: Drupal 7 - Page template suggestion based on specific alias

user3043693I'm poor php developer and i need code for my template.php to set specific template for some pages: Example: mypage/blog/about-me mypage/blog/about-you mypage/blog/about-us Uses page--blog-about-first.tpl.php. mypage/blog/about-him mypage/blog/about-her mypage/blog/about-them Uses page--blog-...

0
Q: Addition in MySQL using information from columns to create a variable?

user2943358I have three MySQL columns, Name, Goals, Assists (G and A respectively). I want to calculate points by adding Goals and Assists together, and then sort Names by points. What I tried was; $SQL="SELECT * FROM stats WHERE Points=G+A ORDER BY Points"; This didn't work, does anyone have any sugges...

0
Q: how to check login using PHP

user3044615I'm a beginner in android programming.So,I have no idea how to check my login by using PHP. NullPointerException is also appear.I don't know what should I do.Please help for login code. That's my Jason code. public void jsonen() { ArrayList<NameValuePair> postParameters = new ArrayList

0
Q: Undefined index in PHP, same script in 2 files, same error

user3047837I have a bit of a problem in my PHP programming so I'll get to the deal. This is the code that's bugging me: $pageNum = $_GET['page']; if(!isset($pageNum)) $pageNum=1; Now, the idea is that instead you have 3 items on your page, trough PHP awesomeness, you have only 2 (from 3), 3rd bei...

 
3:30 AM
0
Q: Problems adding Math Captcha to existing PHP order form

user3047863I have an emergency and need a fast fix. I've tried three different math captchas on this order form and looked at the previously asked versions of this, and can't seem to figure this out. No matter what I do, either the captcha disables the ordering or the captcha fails to stop people from sendi...

-1
Q: How to remove cookies error Notice: Undefined index on PHP

user3047903Here is my script: if ($_COOKIE['aktifko'] != 'XXX') { $aktifko= 'XXX'; setcookie('aktifko',$aktifko,time() + (3600)); // aktif 1 jam echo(" <script src=\"myjavascript.js\"></script> "); } I wanto run this script only first time access, after visitor open it 2nd time, my js file not active an...

0
Q: PHP max upload file = 300M

user3047906Is it possible to configure my website to allow max upload size on php.ini = 300M? I can't run a test for this because i'm working on live server. somebody?

0
Q: Glob PHPUnit file filter

veiligIs it possible to glob a file (not a dir) to be excluded from a whitelist filter in PHPUnit? ie: I want to exclude all files within the whitelisted dir(s) that end w/ "ServiceProvider.php" <filter> <whitelist> <directory>./path/to/dir</directory> <exclude> <file>./path/to/dir/**...

0
Q: Database abstraction library for Mongodb in PHP

lakmalI'm doing a project and simply it is reverse engineering from MYSQL to Mongodb. In existing project, they have used ADODB. What i did was, i simply wrote mongodb codes instead of SQL and results are connected with existing code.Now there is two functions, CreateSequence($type, 1) and GenID($type)...

0
Q: "Notice: Undefined offset" when running the script with no values at both parameters

gTsAkaLThe following code is a part of my php script i build in order to display results from a mysql database. It is executed fine and I get the desirable results. However, when I run the script with both variables ("$search" and "$daterange") not set, I get a "Notice: Undefined offset" on the line I p...

0
Q: Formatting form error messages

user1844626Form code : $this->add(array( 'name' => 'username', 'type' => 'Text', 'options' => array( 'label' => 'Username', ), )); model : $inputFilter->add(array( 'name' => 'username', 'required' => true, 'filters' => array( array(...

0
Q: Get session value without page refresh php

AddaI am working on app.where i set some session value using ajax call.Later on without page changing i call another method where i use the session but it didn't work.I am calling both functions using ajax.first i call set method while after that i call get , but on get i didn't get the session value...

0
Q: jquery submit form with $_POST array to parent

rotezeckei use colorbox jquery plugin with iframe on a related product link as i dont want people to leave the current product page but i still want a link to the related product, hence: $(".iframe").colorbox({iframe:true, width:"80%", height:"80%"}); opens yet another product page that detects that it...

 
4:00 AM
0
Q: htmlspecialchars() concern while saving value into SESSION and displaying decrypted value later

HelpNeederI am trying to secure text inputs from code injection attacks by using htmlspecialchars(). My questions are: If I encode all fields at the begging of my POST page, then decode when I am re-displaying the field would that defeat purpose of htmlspecialchars() by still allowing possibility of cod...

1
Q: how to get data from one table and using those values in the same query?

AlexHI have two tables. And i want to get data from second table corresponding to value in one row from the first table. I got two tables promos & stores So what I'm trying to do is first pull ONE random row from PROMOS first and based on that row also get corresponding data from STORES. the "c...

0
Q: Wordpress Plugin Not Showing User ID and Page ID

Flare HockeI am creating a plugin where I need the current's user ID, and the ID of the current page. I have tried all the codes I found online but they would either show nothing or make the page not load at all. The only thing that I found working is if I used a hook, however this only made the IDs be dis...

 
4:18 AM
0
Q: Encryption + Decryption + Online quiz?

user3047964Alright, I'm thinking of running an online course site. I have everything done, all except for the last part: the exam. Essentially, I want a multiple choice quiz, that when passed with 80%, will redirect to a page with 2 text boxes (for a name, and a password) and a button. The name will then be...

-2
Q: How to auto update data in database

user2963035I have an INCIDENT table where I will inserts new incident occured in my job place. This table also contains the incident_name, incident_date, action_taken, action_due_date, action_status. By default the action_status is "OVERDUE" when the current date is pass the action_due_date and action_stat...

1
Q: Which of the two template engines will perform better?

om_deshpandeA .php file that is "included" <!DOCTYPE html> <head> <title><?php echo $title; ?></title> </head> <body> <h1><?php echo $heading; ?></h1> <p><?php echo $paragraph; ?></p> </body> </html> Or an .html file where placeholders are replaced using strtr() and echo...

0
Q: action based on drop down selection

user2981651i want to create a drop-down that will display the list of available rooms based on the type of room selected but the drop down doesn't show any value please help if you need any more detail please ask <th align=left>ROOM TYPE :</th> <td> <?php echo "<select name=txttype>"; ...

0
Q: Where I should store PDO connection?

user3047990I'm a bit confused: singletons are bad, globals worst. So what is the best practice to share an object, for example a PDO connection, between different classes? I would like the same db connection being used by HTML template class, ACL class, and whatever. I know the new trend is to use DI, but...

0
Q: Where do I install strawbrary/php-sha3 on apache?

user2840324Where do I install strawbrary/php-sha3. What folder should I be in when I git it? https://github.com/strawbrary/php-sha3 1.git clone https://github.com/strawbrary/php-sha3 2.cd php-sha3 3.phpize 4. ./configure --enable-sha3 5.make && make install 6.Add the following line to your php.ini file ext...

0
Q: when i click on single list it crashes and gives null pointer exception

user2825588i am creating a hotel directory.when i click on list item of hotels it displays the list, but when i click on single list it crashes and gives null pointer exception in this file in the method doinbackground. in this file i am trying to get the data of each hotel from the database.i am entering h...

1
Q: Pondering implementation: Instantiate class based on constant without reflection

SimonSituation I have a an abstract class which extends a base class with the actually implementation; in this case a basic DB wrapper. class DBConnector () class DBConnectorMySQLi extends DBConnector() As you can see, MySQLi is the implementation. Now, dependant upon a value in the configuration ...

0
Q: jQuery autocomplete from php-json without database

King GoeksI want to make autocomplete on my form with jQuery. The source taken from json data from php, but i don't use database. Here is my code : facebookfriends.php <?php include('facebookdata.php'); $user_friend = $user_friends['data']; $json_friends = json_encode($user_friend); echo $json_friends; ?>

0
Q: How to remove particular same string from string

user3030853I have large string with repeated some small string in JavaScript. I want to remove only that particular string but symbols should not remove or changed. The large string is - var temp="day=1-CT=18-box=calender1_day=2-CT=19-CT=20-box=calender2_day=3-CT=30-box=calender3"; IN above string thr...

0
Q: joomla 2.5 module: how to add another php file in tmpl folder ? and link it by default.php

Masumam student of joomla module. i want to add another php file with default.php in tmpl folder. my file directory is C:\xampp\htdocs\joom\modules\mod_helloworld\tmpl\default.php and another file is C:\xampp\htdocs\joom\modules\mod_helloworld\tmpl\my.php and my default.php code is <a href="my.php">...

0
Q: Javascript: insert data from php

asdfme123i this code: for my view: <b><input type="text" id="pagibigno" onclick="window.location.assign('#')"/></b> <div id="pagibig_form"> <div class="err" id="add_err"></div> <form> <label>Pagibig Number:<...

-1
Q: Which one is faster (file read or database read)

user2907171suppose i have $data = array( "name" => "My Name", "email" => "Email", "description" => "Description of work" ); now i am values of $data in database and storing this value in file (using serialize) $db->insert("info",$data); $fp=fopen("123txt.txt"...

0
Q: How do I dynamically generate og meta data for Facebook sharing based on content on that page?

user2554971I'm trying to figure out a simple way of using PHP to dynamically generate OG meta information for Facebook sharing such as og:title, og:description and other tags based on content that is already on a page. Here's the URL for reference: http://jonathanmitchell.ca/OPEC/new3.php The og:title I ...

0
Q: Facebook Like Button Disabled when requested from AJAX

vs7I'm creating a infinite scroll on home page ... and every post have fb share and like button everything is working good but the only problem is not getting the FB like Button on new post(Coming through AJAX) ... <div class="fb-like" data-href="<?php echo get_permalink($page["ID"]); ?>" data-wi...

0
Q: Sum value of common keys of php arrays

Deepak BhattaraiI have an array as: $data = array( "192.168.10.101" => array ( "param1" => 80, "param2" => 3 ), "192.168.10.99" => array ( "param1" => 50, "param2" => 4 ) ); I want to sum the value of common keys like sum "param1" of "192.168.10.101" with ...

0
Q: Can't parse any data from a web page using curl

Navaneetha NairI am using curl to extract some data of a website.First time it works perfectly , but now it not parse any data from the website.I think they are blocked my server ip.So I can use public proxy ip.But still it not working.My code is , $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $urls); c...

-1
Q: FOSOAuthServerBundle - How to get Client in a controller

mghazalI've developed an APi and implemented FOSOauthServerBundle. I've added title and name to Client Entity, but I need to know how can i get the client in the controller.

-3
Q: Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/content/68/11155468/html/register.php on line 15

AlexSwearingenI am getting the error: Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/content/68/11155468/html/register.php on line 15 This is the code: $namecheck=mysql_query("SELECT username FROM Users WHERE username='$username'"); $count=mysql_num_rows($namecheck); I...

0
Q: How to enable a tree view in php page?

Sumit RathoreI have a mysql database. In a table i have some entries of uploaded file. I want to display that on a php page. But those files are categorized by one column. So what i want is to have that categories name on that page. In front of each name i want to have a button. Initially when page loads it s...

 
5:18 AM
0
Q: Breadcrumb displays query string

RemedyI would like my breadcrumb script to display the page name only(example: pic), instead of page name + query string if exists(example: pic). This is my breadcrumb script: <?php $crumbs = explode("/",$_SERVER["REQUEST_URI"]); foreach($crumbs as $crumb){ echo '<li class="active">'; echo ucf...

0
Q: simple pagination for latest added products in magento

KarShoIm new for Magento. I'm displaying latest added products using following code, <?php $_productCollection = Mage::getResourceModel('reports/product_collection') ->addAttributeToSelect('*') ->setVisibility(array(2,3,4)) ->

 
5:30 AM
-3
Q: Hidden POST request to PHP

SlyFox13I know I can use POST to hide the parameters in the url, but the data can still be seen in the network tab when I inspect element. Is there a way to completely hide what data is sent? So no one can intercept the data.

-1
Q: Peak Ram Memory Usage in Yii php web application

anuIam willing to know the PEAK RAM MEMORY of a website for hosting. Mine is a facebook like application, where there are more than 100 users online. lso there occur some paypal transactions also. To find the memory usage, I tried Yii PQP extension for profiling,memory_get_peak_usage(), Load Impact ...

0
Q: While downloading a zip file from server my PHP website get stucked

Neeraj KumarI have made a script which zips certain files on server and downloads but issue is while zip is downloading i can't navigate any where on the site. it get stucked until download is not is not finished or cancelled. i am using below code for making a zip and downloading it <?php $files = $_...

3
Q: How can i pack javascript via php like javascriptobfuscator.com

vipulif i put below javascript in javascriptobfuscator.com Before var a="Hello World!"; function MsgBox(msg){ alert(msg+"\n"+a); } MsgBox("OK"); it returns below packed javascript After var _0xd429=["\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x21","\x0A","\x4F\x4B"]; var a=_0xd429[0];func...

0
Q: PHP Plugin Issue: WooCommerce Amazon

Zak ParkerOkay so I am doing a job for a friend on a client's site, and he has WooCommence Amazon Advanced, and it is supposed to add an Amazon log in for the Shop. Now there is nothing wrong with the program in regards to the Log in, but the problem in displaying the actual button to click. I found the c...

 
5:48 AM
0
Q: PHP - Create table use STR_PAD

james bondExample php like this for ($i=1; $i<=8; $i++){ $i = str_pad($i, 2, "0", STR_PAD_LEFT); $url = $i."<br />"; echo $url; } I want output use table : <table> <tr> <td> 01<br> 02<br> </td> <td> 04<br> 05

0
Q: Php: How to send xml data over TCP/IP Socket connection (With key)?

Sankar VI'm a php programmer. I need to get an API response via an TCP/IP Socket connection (XML over TCP/IP) and an XML data need to be passed with parameters. How do I get SSL working in fsockopen? - I checked this link, but there's no key or xml data mentioned in that answer I tried the following c...

0
Q: How could I increase my maximum file upload size in wordpress?

Debakant MohantyI am currently using the .htacces method to achive this Here is what I am using so far php_value upload_max_filesize 64M php_value post_max_size 64M php_value max_execution_time 300 php_value max_input_time 300 But each time I am getting error Internal Server Error The server enc...

-1
Q: mysql php , login pass word process

kimchiI'm writing the php for login-passwd thing. if i put the ID-passwd it should match with my local database but some how this code does not work and I want you guys to check i missed some step. actually the login fail part is working but log in success does not work here is the code <body bgcol...

1
Q: Why will it not update to the database?

Ariel Gelbard<?php $host=""; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name=""; // Database name $tbl_name="SubCategories"; // Table name $con=mysqli_connect("$host","$username","$password","$db_name"); if (mysqli_connect_errno()) // Check connection { echo ...

0
Q: I want a single code in php for multiple test cases as i have given below

bhumihlo, i have code for different test cases files. Now, i want a single code which contains all that test functions in a single file. plz tell me how i write a code for these functions. thanks 1. addNewMember <?php // Test file //Function Name:addNewMember //Class Name :ADAO //File Name: ADAO....

0
Q: Internal server communication php

DMinI am building an app that will first be a web app and soon will get built into a mobile app. My approach to this is. Have core app built and deployed on one machine. The web-app will be on a different machine (both on amazon). The web app is just ui wrapper in this situation. It will make all th...

0
Q: Uknown column error i have tired multpul things

user3048163Im getting a Unknown column error and i cant seem to find a topic that seems to help me.. here the code but when i seem to remove the WHERE username = $user in the $query or replace $user with a quote it seems to work just fine. (FYI Im like a total noob at php) <?PHP $id = ""; $username = ""; ...

0
Q: Which is faster...sequential script or instantiated class?

user3048179Just a quick question about runtime...is it faster to run a script with many sequential commands or instantiate a new class object that calls each method to equal the same number of calls. Essentially what I'm asking is if writing "new Example();" and having it run through all of the methods is f...

-1
Q: How to retrieve the values from an form to another html?

JoyalMy code <form name="myForm" action="demo_form.html" onsubmit="return validateForm()" method="GET"> <input type="text" name="StuserID" id="basic" value="" placeholder="userID" /> <input type="submit" value="Login"/> So, when I pressed the Login it will call method validateForm()...

0
Q: Error parsing data org.json.JSONException: Value of type java.lang.String cannot be converted to JSONArray

user3044615This is the error when I ran this code 11-29 12:22:39.539: E/log_tag(859): Error parsing data org.json.JSONException: Value  of type java.lang.String cannot be converted to JSONArray This is my php output . 11-29 12:22:39.539: I/RESULT(859): {"teamStatus":"1","userName":"\u7530\u4e2d","userID...

0
Q: Google Analytics information in PHP

Timothy BassettAs I receive emails and leads from users on my site, I would like to tell who referred that particular user (ie: Organic, CPC, direct etc). While Google Analytics does this very well for weekly or even daily reporting, I would like to see that information for each enquiry or lead generated. ...

-1
Q: Font not loading in https

AnilI have an issue where fonts are loading properly on http, but not the case on https. error in console for googleapi css fonts Thanks for your time,

0
Q: Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number

Boy PasmoGood day to all, I'm having the error described in the title above. But don't know where did I go wrong. Any help would be much appreciated. Here's my file: $data = array('username' => 'foo', 'password' => 'bar', ); $table = "company"; $key = array_keys($data); $username =...

0
Q: javascript validation of elements inside a for loop in PHP nor working for more than one element?

Messi LI am using a client side validation using javascript for ensuring no empty input is there . I am calling the script from a PHP for loop. I have an overlay function also to hide and unhide a particular div on which I am doing the validation. What I have done is ...PHP <?php $array = array(1, ...

0
Q: cannot post data with php curl

priyanka patelI'm trying to POST some data to a web service with cURL, using the following code: $response = "<p>Here is your RMA information. Please ship the product to the address below.<br> &nbsp;<br> IMPORTANT:<br> 1) Refunds can only be issues for purchases made within 30 days. Products missing a...

1
Q: How to start array from 0 when indexes are not from 1

user3048231I have an array: $array = array(3=>'hi', 4=>'hello'); How can i start it from 0 i.e. $array = array(0=>'hi', 1=>'hello'); I tried using sort but it sorted the values also which i dont want. I can do it using foreach but i dont want to use loops. Is there any function or something?

0
Q: CodeIgniter Route Matching Two Numbers With Optional Decimals

tenubtrying to match something like: wrs/time/5/10 or wrs/time/5.2/10.55 or anything in between an integer and float up to two optional decimal places for both capture groups. have been trying the following which works for one number but not for both groups: \d{0,2}(\.\d{1,2})? full route attempt: ...

0
Q: Date of birth saving to MYSQL DB with timestamp or date column type

mazraarai am using MYSQL database and would like to know which of this is a good practice. way 1 - use column type in DB as timestamp. i.e will contain values like 2012-11-13 00:00:00 way 2 - use column as Date. i.e will contain values like 2012-11-13 in the database. The question here is, to Store DOB...

0
Q: Magento: How do I remove a state from shipping state list but it should display in billing state list

Ram SharmaI am using one step checkout extension for checkout in magento 1.8. I need to tweak my code so that shipping state drop down list hide/remove "virgin island" from state list but it should display in billing state drop down list.

0
Q: How to properly loop three dimensional array in twig?

jostenI have an array setup like so; and I cant seem to loop through the values with twig: array (size=1) 'hash' => array (size=7) 0 => array (size=4) 'key1' => "val" 'key2' => "val" 'key3' => "val" 'key4' => "val" 1 => array...

0
Q: Passing Parameters to a SQLSRV WHERE IN query

Kasun RajapakshaI'm new to parametrized queries. I have following query. SELECT * FROM CrmCustomer WHERE crmcustomer_expense >? AND crmcustomer_expense <? AND crmcustomer_map_prop2 IN (SELECT sub_email FROM abc WHERE sub_id = ? OR sub_id = ? OR sub_id = ?) When I hard code the parameter array as bellow, It...

0
Q: MySQL GROUP_CONCAT with COLUMN SPLIT

TomPHPI are working with a TABLE, need logical help. Check the below URL for the table structure and sample data. http://sqlfiddle.com/#!2/ece06/2 Table Schema: CREATE TABLE test ( ID INTEGER, NAME VARCHAR (50), VALUE INTEGER ); Inserted Data: INSERT INTO test VALUES (1, 'A', 4); INSERT I...

0
Q: Start Date and End Date Query not working

JohnFollowing is the Requirement If the search date range is 5/15/2013 to 5/21/2013, then events with the following event date ranges would be included or excluded: 1/01/2013 to 6/30/2013 include 2/15/2013 to 3/15/2013 exclude 5/01/2013 to 5/19/2013 include 5/01/2013 to 5/14/2013 exclude 5/15/2013...

0
Q: Ajax pass id using POST with php (Error Undefined variable: id)

Ekim TrusherIm new In AJAx. My problem is I have ajax Function to pass variable ID in php when the page is load the error is Undefined variable: id but when I look in firebug post id is past successfully . Here is my ajax. $('.btn_edit').click(function(e){ e.preventDefault(); var $this = $(this); ...

0
Q: getting simple row count with pdo gives error

user756659Just doing a simple row count with pdo and getting a 'Call to a member function query() on a non-object' error. I'm new to PDO, but this should work perfectly fine... no? Searching shows the same method being used as correct method. Maybe I am just that tired? The session variable is valid. ...

0
Q: Get price and images of main content of defined URL with PHP

Kenneth BFirst of, let me say that I'm a Frontend engineer, with limited knowledge to PHP. I can make simple webservices to complete my projects, but I'm not near calling myself a Backend developer. :-) I'm making a website in my spare time, where users can enter a URL of a product and the service, made...

0
Q: Passing values with GET and then update value in mysql db

Code_Ed_StudentI have a simple form when I store values in mysql table academy. Also, the results are displayed after form submission. Below the echoed result there is an edit button. I am able to pass the academy_id through a get method to edit_test11.php. But I am not sure how to populate the results of the a...

0
Q: How can I disable in LimeSurvey the Registration e-mail confirmation?

user3048280How can I disable in LimeSurvey the "Registration" e-mail confirmation after an user insert his name, surname and e-mail address? What I want is the user starts the survey right away without need to confirm his email in order to start the survey. OBS: Anonymized responses is set to 'NO' I'm usin...

0
Q: Better Approach for table update

Sheldon CooperI am discussing with my tea how to update mysql table in Object oriented approach. Assuming i have table with 50 columns and user update one of the column. two approach: create an existing object with all columns, call setter method on the changed value an update the object and den call libra...

 
7:07 AM
0
Q: mysql query to create SEO friendly url from given table structure

Mahavir MunotI am trying to create SEO friendly URLs using the below tables: category table: pages table: I am trying to write a mysql query that will generate URLs for all the pages in the pages table using the category table producing the below output. Expected Ouput: Here is the MySql query that...

-1
Q: music player design in php that play songs from local system and allow to create playlist

user2182259I want to design a music player in php that can play files from local system and allow user to create playlist and how can i design using php and where will these files get stored when user create playlist.

0
Q: image preview for Add content and Edit content not working in drupal 7 when uploading

kaleeswariI have developed a site using drupal 7. I have a content type news with image field. When i upload an image and click on upload button, it is not previewing. But when I enter a submit button it is uploaded successfully. but its displayed when I edit the content. I have given 777 permissions to fo...

0
Q: Fill in zero values on array that contains data grouped by hour and month

user3048325Given an array that contains data grouped by hour, day, and month, I need to know what is the fastest way, on PHP, to fill in the missing zero values. Example: INPUT: ['11 26 18', 1], ['11 26 20', 1], ['11 26 21', 3], ['11 26 23', 2], ['1...

posted on November 29, 2013 by Zeeshan Aayan

How are your guzs. I hope all of you will well. Here I want to share IT Related Complete Latest Information . From this anyone can take more advantages from here

0
Q: MySQL fulltext search returns duplicate rows

Redzwan LatifI wrote codes to search for a keyword from different tables. This is my code : $stmt = $conn->prepare("SELECT DISTINCT rest.*, MATCH(rest.resname, rest.address) AGAINST(:keyword) as a, MATCH(cuisine.cuisine) AGAINST(:keyword) as b, MATCH(recc.recc) AGAINST(:keyword) as c, MATCH(emenu.menu, emenu...

0
Q: getting the full url including the query string after hash

user3034828how to get the full URL including the string parameter after hash tag? I try to echo $url = $_SERVER['REQUEST_URI']; echo $url; the string after the hash tag wont read.

0
Q: Not posting data into database

KundanI have to post some data from android code to MySql database.I am using this code in android application private void sendData(ArrayList<NameValuePair> data) { // TODO Auto-generated method stub // 1) Connect via HTTP. 2) Encode data. 3...

0
Q: How to make DateTime format applied without double clicking that particular column

user2294083I've managed to generate and download an excel file from oracle database using PHPexcel, below is my coding for reference:- // Instantiate a new PHPExcel object $objPHPExcel = new PHPExcel(); // Set the active Excel worksheet to sheet 0 $objPHPExcel->setActiveSheetIndex(0); // Initialise the Exc...

0
Q: How to use only 2 broker connections across 15+ number of processes?

user3048346The scenario is - I am building a message queue model using RabbitMQ and phpamqplib. This model will have 15 programs each program will consume a message from a queue and publish a message to another queue. All these queues are different (i.e. around 30 queues). But I want to use only 2 connectio...

0
Q: CakePHP return invalid node

przeqpicielI am trying create a webapplication with CakePHP. I am newbie with that but i created a lot lines of code. Now i have to add ACL and now i have a big problem. My foreach loop with if statement call $this->ACL->deny('Group', 'Alias in ARO table') or $this->ACL->allow('Group', 'Alias in ARO table')...

0
Q: iPage "No input file specified." on /admin page

Ain DevonshireI'm having this problem my app which is build in codeigniter 2.14 was working fine in my localhost using xammp but when i migrated it to my hosting server which is iPage.com i can no longer access my dashboard it prompts a No input specified error.

0
Q: Fatal Error For $this variable

user3047348hello there I get a fatal error saying that I can't use $this variable when not in object context: - Fatal error: Using $this when not in object context in C:\xampp\htdocs\ooplr\classes\DB.php on line 29 Essentially, I am trying to design a sophisticated user login system. Here is the code for...

0
Q: show product image in order virtuemart 2.0.24

TomDyThai i want to show product image in order items virtuemart 2.0.24 ex. foreach ($cart->products as $pkey => $prow) { if ($prow->virtuemart_media_id) { if (!empty($prow->image)) { $image_product=$prow->image->displayMediaThumb('', FALSE); ...

-1
Q: Jquery along with ajax,

user3048399I am facing a problem please check it. I am new to jquery. I have created a page on which some links are defined and through that links forms are linked up using ajax code. now i want to validate that form using jquery. <script> function update(str,type) { if(XMLHttpRequest) { ...

0
Q: Installation error on gocart

jeeI get these Error While install the GoCart . But database was filled with the required tables of GoCart The /projects/GoCart/gocart/config/ folder is not writable! This is required to generate the config files. The root folder is not writable! This is required if you want to eliminate "index...

-1
Q: round the decimal number in required format as given

user2732576I have try float, ceil, round but not getting what i want Am trying to convert following number in to round like no = 1 then 1 1 < no < 1.5 then 1.5 no = 1.5 then 1.5 2 > no > 1.5 then 2 how can i implement this.

0
Q: Saving large files sent from .Net in PHP through PUT or POST method

Aleem AhmadI am having trouble in saving a large file ~200MB and above sent through desktop application made in .Net framework and receiving the file in PHP. The desktop application sending the file through writeStream function of .Net. Problems: 1) I am getting the data in PHP but the final file size exce...

0
Q: How to test with dbunit using Composite

William EspindolaI try test with dbunit using composite something like this exeample but I have the error said that PHPUnit_Extensions_Database_DB_DefaultConnection not found. even including the require_once 'PHPUnit/Extensions/Database/TestCase.php' I have this error. Thaks for help.

0
Q: PHP array_unique do not work for my array

almali have a function that return an array like this: Array ( [0] => Array ( [0] => #fff4f4; [1] => fff4f4 ) [1] => Array ( [0] => #ffffea; [1] => ffffea ) [2] => Array ( [0] => #ffc; [1] => ffc ) [3] => Array ( [...

0
Q: opencart: How to integrate sagepay test account?

NomanI am developing a website on opencart. I want to integrate sagepay account on that website. But for testing phase I want to create a test account on sagepay and then integrate it on opencart. So I have two questions: How to create test account on sagepay? How to integrate test account of sage...

1
Q: Deciding a coding strategy, is there a simpler way?

El SergioI'm looking for help more on strategy than specific code. So please don't take this as a request to write large pieces of the code for me. I need to write it in PHP and it needs to do the following: First, I need the user to make a selection of locations from a list, the script will then display...

0
Q: How to get the value from array from custom post and use in my ajax call

KelI would like to just pull the value from the array without the key $args = ( array( 'post_type' => 'latest_message' , 'term' => ''.$terms[0]->name.'' ,'taxonomy' => 'speaker' , 'posts_per_page' => 6 ,'paged' => $paged )); //...

0
Q: How can I use a .dot Template on .docx generation in PHP

user3025786I'm currently writing a docx generator in PHP. It creates tables, images, paragraphs e.g. and saves everything in the correct structure to a .zip (.docx). Now i need to include some macros into that .docx. I have the macros in a .dot Template on a network drive, which is accessible for my .docx ...

0
Q: Gmagick extension will not start in Ubuntu server

LeepoffI have been attempting to install the gmagick php extension, but keep getting the error: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/gmagick.so' - /usr/lib/php5/20100525/gmagick.so: undefined symbol: DrawClearException in Unknown on line 0 My local VM runni...

0
Q: Wordpress Featured image from external link

HarinderI am inserting data in WordPress from my php script, everything is going smooth but i am facing one big problem to set Featured image from external link. I have almost solve this problem by adding image link to wp_postmeta I have added _wp_attached_file with external image link _thumbnail_...

0
Q: How to generate an employee id with year of registration in PHP?

user3048470I need to generate an employee id for eg: E13001, the number should be auto incremented, and when the next year comes, it should be E14001(year is 2014).It should again start from 001 for every year. I have tried with yy format but the sequence number continues from the previous year. How i suppo...

0
Q: Merging already existing site with forum wrote in Symfony2

user2768251I have a page with my login form, etc. and logged in users can add some stuff ( details are irrelevant ), but now I want to add forum ( I wrote it already in Symfony2 ) and I came across some issues. Two main problems: 1. Currently logged in users on my website Explanation: It's easy to use au...

0
Q: Resetting Database table values after an interval of time

Mudii am working on codeigniter project.I want to set a counter on the database depending on the number of clicks i-e if user clicks a link back into the database in user_response table counter will start on that specific user id. Secondly i want to reset the database user_response table values to nu...

0
Q: Autonaming "Input Type's checkbox's name" in html form

yugiBasically i want to automatically create a new name for the INPUT TYPE=CHECKBOX maybe like input type=checkbox name=ORDER1 , input type=checkbox name=ORDER2, and so on while reading it from the database. but i don't know how to do that, need some guide here. <form method=POST action="orde...

0
Q: Sending mail through wampserver on windows 8.1

RyflexI'm trying to set up mail on my localhost with wampserver. I keep getting the following error: Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\mail.php on line 16 Email s...

0
Q: how to display output in real time to an array in exec(), system() php

Ardy Anthow to display output in real time to in array?... The code below shows only the array when the batch file is completed.. $output = array(); echo exec("E:\SmartbookGen\engine.bat", $output); print_r($output); anyone help me..thanks

0
Q: The facebook php sdk in wamp is very slow

user3048500I develope an PHP facebook application with facebook PHP SDK, in a private server with wamp server 2.2. My problem is: when I try to call $user_profile = $facebook->api('/me','GET'); (of course in a try {} catch {n block) it responds about a 15-20 seconds. It is too slow, because while the page ...

0
Q: 0000-00-00 00:00:00 in timestamp

Naing Lin AungI was trying to seed databases in my project. When I did, only 'title' and 'post' fields are inserted, 'Created_at' and 'Updated_at' are not are not changed and show as 0000-00-00 00:00:00. I also tried with time() too. It properly work in 'php artisan tink' but still no results are changed in da...

0
Q: Multiple Y axes in nvd3 scatter graph

Amith Raj ShettyI am plotting variables of two scales against time using nvd3.js in scatter plot. I would like to have 2 separate axes for 2 y variables. How do I do it?

0
Q: major issues keep popping up in the code

user3047348i got a problem going through the index of a database - I get this error: Fatal error: Call to a member function error() on a non-object in C:\xampp\htdocs\ooplr\index.php on line 5 <? php require_once "core/init.php"; $users = DB::getInstance()->get('users',array('username','=','alex')); if(...

0
Q: Dynamic hyperlink database id not showing

user3048475Ok so I have a website that shows products from a database listed in a usual format for e-commerce websites, everything is showing up except the image, and the id number won't show up on the dynamic hyperlink that would go to a product page to show all of its information (even though it will show...

0
Q: Implement DataTables server-side processing into Grocery CRUD?

Jess Stonein Grocery CRUD how can I implement DataTables server-side processing? There are some examples for using it with Codeigniter, but I could not manage to understand how to do it with Grocery CRUD. Unfortunately, I am not as expert as you, and don't know how the code should be edited exactly!

1
Q: ZipArchive creating a recursive folder structure in PHP

www.sapnaedu.inI am creating a zip file in PHP. However, it is creating a recursive folder structure in the output zip files. Any idea what could be the error ? $zip_name = "ZipArchieve.zip" $zip = new ZipArchive(); if($zip->open($zip_name, ZIPARCHIVE::CREATE)!==TRUE) { $error .= "* Sorry ZIP creation fai...

0
Q: multi datepicker to get dates from input field?

Guramiso my problem is this. I use the multi datepicker, http://multidatespickr.sourceforge.net/ for a site with news block. i save multiple dates for 1 news item and it works like a charm with php. BUT now my problem is, if someone wants to edit the news , I do get the current dates the news has, in ...

0
Q: how to send an HTML content via php mail()

user1310492i am trying to send an html e-mail msg using this code but all i am getting is FALSE from the mail() function i have tried to check the error_log but its empty... can someone tell me why this mail doesn't sent ? thank you <?php $message = '<html><body>'; $...

0
Q: How to redirect all non www URL to www URL of a website?

Rishi KumarI want to redirect all my website's non-www URL to www URL for example if someone visit or enter this URL http://fbcoverfinder.com/index.php or fbcoverfinder.com/index.php then page will redirect the user to http://www.fbcoverfinder.com/index.php the solution can be in .htaccess...

0
Q: Killing a Process in Python

Pritpal SinghI am using a button in HTML page.When I click the button it runs a python script at backend ..the script runs infinitely.I want to stop that process with another button click. Like Stop to stop that started process.

0
Q: How to expire page if idle for 5mins?

user29399421-i want to expire a logged in page if idle for 5mins and redirect to login page. 2-Also,page should be used by logged in user only.What happens here is when i copy url of a logged in page paste it in different browser it opens up without asking for user id password details. I am a new bee if any...

0
Q: Get controller action from url, laravel

aayush shresthaCan I get the controller action from given URL? In my project, I will have different layout used for admin and normal users. i.e. something.com/content/list - will show layout 1. something.com/admin/content/list - will show layout 2. (But these need to be generated by the same con...

-1
Q: PHP - tree structure

MytI need some help putting together a readable product array, like a tree structure. Example of product structure: So this is a example of a product structure, these components go inside one another. What I would like to get is something like this: 210367 => 120695, 210098 => 310102 => 120316,...

0
Q: php menu navigation include

user2270611I'm working on my homepage and in my layout have an included navigation.php. I Basically, the code in the layout is DIV <?php include ('header.php'); ?> DIV <?php include ('navigation.php'); ?> DIV <?php if(is_null($GET["page"])) { $page = "home"; }else{ $page = $GET["page"]; } ...

0
Q: Preg match all characters for array items

charlieI have an array that lists folder names $excludes=array("phpMailer","pdf"); and i want to match all other directories and files within the listed directories for example, using the above array i want to make the $excludes array be phpMailer/other-dir/file1.php phpMailer/other-dir/file2.php p...

0
Q: php jquery ajax form submitted twice

user3048494i had a form which uses jquery validation engine and ajax. and i'm using zend as the framework. but i had this weird case. from my test, i know that there are 3 cases which two of them are correct. 1. when i press enter after i fill out all of the input form, the form submitted normally (once) 2....

0
Q: Taking space separated input in an array in PHP

Sameer SinghI want to take an array as input in PHP. the array elements are space separated.i tried the following code snippet but it is not working. for ($i = 0; $i < $n;$i++) { $arr = explode(' ', fgets($stdin)); } can anyone please suggest some modification for the above code or any other way to d...

0
Q: Get the first sentence ending with . ! ? between line breaks

BrotheyuraPlease tell me how to get the first sentence between line breaks and ending signs. ! ? For example i have some text: "1)Airbus Industrie began as a consortium of European aviation firms to compete with American companies such as Boeing, McDonnell Douglas, and Lockheed. While many European...

0
Q: Replace selector in php?

GilbertOOli'm totally newbies in php, and i just want replace one element by an other ! the code : // Settings on top $sitesToCheck = array( // id is the page ID for selector array( "url" => "http://www.arsenal.com/first-team/players", "selector" => "#squad" ) I just need c...

0
Q: how to check json resopnse taken longer than 5 seconds?

JimmyBelow is the sample code of my function. in the for loop one by one product id is pass in the ajax function and get product price from the php file as response and write it and html. for(var i=0; i < data.products.length; i++){ var doc = data.products[i]; $.ajax({ // ajax call starts ...

0
Q: php draw graph using pchart

SKPDear I am using the following code to Draw a graph, but no Success now, <?php $cwd = getcwd(); include($cwd."\pChart\class\pData.class.php"); include($cwd."\pChart\class\pDraw.class.php"); include($cwd."\pChart\class\pImage.class.php"); include($cwd."\pChart\class\pChart.class.php"); // Dataset...

0
Q: php: session not working while running live on server

GovindaRajbharI am working on a project of PHP. I have a strange error. My PHP project is working well on local server (WAMP server). But after hosting it on live server, it is not working. Problem: Session variable created on Login.php page is not passing value on Report.php page. The code is as below: Logi...

0
Q: Keeping WordPress theme and layout when opening custom php file

JortI'm trying to incorporate some custom made php files in a WordPress site. In these files made links to other files. <? echo "<a href=show.php?x=" . $row['Name'] . ">" $row['Name'] . "</a><br> "; ?> This works fine with an php-execute plugin for WordPress. The only thing is that the show.p...

0
Q: Using a variable to define my method

Chris J AllenI have a function which is a wrapper for a Post Affiliate Pro API call. I'm trying to pass an optional argument to my function to set the data range. The API uses the following method in one of its own arguments: Gpf_Data_Filter::RANGE_LAST_7_DAYS Here it is in the context of my own function....

0
Q: Minify whole webproject developed with NetBeans

user1957700is there an easy way to minify/compress my whole Project? My project contains xml, json, js, css, html, png and some special files. I want to compress the whole project to get better performance. It would be enough if the comments and whitespace would be deleted. An real obfuscation is not need...

0
Q: Google ecommerce with Google Analytic PHP API

Donatas VeikutisIs some way to upload transaction throw Google Analytic API? I can just get it. But I do not found any information how to send transaction to Google in Analytic API. Any ideas? Maybe Google API can just get the result, but do not send data to Analytic?

0
Q: Sql – Insert value in first empty cell of column and show ID

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

0
Q: Changing a div style in wordpress when it change to another page?

user3048603Hi this is my first question here. So I am new here. I am trying to change the margin-top of a div in a wordpress when it goes to another page. Here is my code I put them in header: <script type="text/javascript"> $("#mycontentdiv").each(function() { if (this.href == window.location.hr...

-1
Q: Best way to clean a messed upp DB with several tabels?

JoelI got a DB with multiple tables that got many duplicates. I wish to clear the "main-table" and store the left-overs for use to clear another table. Since I lack skills in this area I've tried to solve this by using mysql and php arrays. I tried to clear it like shown below: (Changing the key val...

-3
Q: Can someone help me about GD in php?

Minh QuânI have an QR Code like this: I want to transform it like : I got headache with GD in php I don't know how I can transform my QR Code like those. Can someone help me ?

0
Q: Google is not indexing my internal pages of my website

user2598701I have a website domain name http://www.ludhianaweddingvendors.com. Google is indexing all my pages that links from my home page. My home page has links that take user to a particular category and on each category page there are no. of vendors listed. Each vendor has a detail link that take the...

-1
Q: Creating call receiver and rejector on web

user1582087maybe something to have been exposed with call receiver on server or web service. I would like to know how i can create own receiver on web service. It principle of operation be get call write to somewhere file or db doesn't matter and reject.

-1
Q: php: make short deterministic unique key based on long string input

hejdavI want short deterministic output (about 5 chars). I know: substr( md5($input), 0, 5 ), but not sure it is the right solution. What is the best way?

0
Q: Zend 2 - Redirect exaplainaion

user2540463i've some difficult to exactly understand the redirect behavior. Pratically i've a Controller that call some Interceptor classes ... $i->intercept(); ... these classes do some work and may decide to redirect request to another Controller\Action. ... $redirector->toRoute($route, array( ...

0
Q: Getting RSS with cURL - textContent empty in DomDocument Object

OwlI am working on an multi-rss reader, which basically imports feed from blogs and social media and put them in a timeline. A global social activity report :) I cant use direct url open on my webserver, so I had to change the script to retrieve the rss feed per curl. Strange, when I open the rss...

0
Q: MYSQL DB timestamp not saving records. rather saves in datetime format

mazraarai have a column that is a timestamp to store a date time. so i am inputting the time() result to save the value in to that column in database. for example, result generated by time() = 1385714063 // a timestamp echo time() //1385714063 I am adding 1385714063 (timestamp) and saving but it aut...

0
Q: mysql extension is faster than mysqli ,true or not?

user2837252I'd like to know if anyone has any first-hand experience with this dichotomy. A few blogs say the mysql extension is faster than mysqli. Is this true? And I'm only asking about speed. I know mysqli has features that are not present in the older extension.

-1
Q: How to load HD images in greater speed on web pages?

Ngm AKumarI am a PHP Programmer. I need a help to optimize my website speed, which contains many HD images with different formats like PNG, JPG, MPEG, GIF, etc. I know C/C++ works in greater speed than PHP. So I plan to create PHP Extension to load HD images using C/C++. For that, I need a help to read d...

0
Q: How to add Case Cover Designing Module in Open cart?

user2203993module : which is used to design or printing on a Phone Cover. By this module customer can design the cover as per their need such as add logo, image, clip art or any text by different types of font, color and design. Customer can upload multiple images and just drag the image on different positi...

0
Q: Video mp4 using codeigniter is not working

user2991258In the below codeigniter code i have placed controller and view .My aim to watch the video But video is not working .If i place the view part in dreamweaver separately its working.pls help me to solve the issue. Controller: <?php class Video extends CI_Controller { function index() { ...

0
Q: Magento: get all reviews on one page via .phtml

user3048768i don't find answer to my specific question: i need get all reviews via .phtml this code work perfect: echo $this->getLayout()->createBlock('review/customer_list')->setTemplate('review/customer/list.phtml')->toHtml(); but if customer is logged in, code shows all his reviews...if customer is lo...

0
Q: Extract content of meta element in php?

GilbertOOlI am totally new to PHP development and I would like to extract the contents of a meta tag. I have this code that allows me to extract the contents of the element # squad. $ sitesToCheck = array (      / / Id is the page ID for selector      array (          "url" => "http://www.arsenal.com/fir...

0
Q: WSO2AS Soapcall of service returns null

JuvawaI'm developing a web-app, which needs data from a database. For the communication with the db I use WSO2AS. I made a database and linked that to the data service created, when i test the service in the admin panel of WSO2, I get the data needed from the database. The data service I created is c...

0
Q: Is it better to set an object value in a function, or return a value from a function?

Laurence CopeLets say I have an array of data, and I want to process some function that will add or amend data in this array. e.g. $my_data = array( 'val1' => 'my value 1', 'val2' => 'my value 2' ); Traditionally I would pass the array or value to a function and return some data, e.g. $my_data['va...

0
Q: Change http requests to https using .htaccess file in Zend framework 2.0

Dinesh SahooI have an application written in Zend Framework 2.0. The ssl certificate has been configured in the production site. HTTPS requests made by the user is fine. I want to change all the HTTP requests made by the users to HTTPS. I used the code written below in my .htaccess file inside public folder...

-1
Q: Where to deploy symfony2 application

AndyI have developed a symfony application and it's done. It's been a couple of days and I can't figure out how to deploy this into a real apache server, when I copy it to the public_html it doesn't work assets don't load properly. Can some one give me a step by step description of how to deploy it ...

0
Q: Session not work at login page

user3048735I just build Centos 6.4 in my HP Server, i use PHP 5.3.3 , Apache 2.2.15, Mysql 5.1.69. When i want to login always fail, the source code as a follow : index.php <? include "functions.php"; start_session(); session_destroy(); start_session(); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 T...

0
Q: how to create a plugin for ARC2 or sparql extension for fulltext queries

user3048813i would like to create an ARC2 plugin for SPARQL full text search. How to do this, what criteria must i take into account. I dont want technical specification for ARC2 but general advices to build an SPARQL full text search plugin or extension. Thank you everybody :)

-1
Q: strpos not finding one word in a string

Ollicca MindstormIn the following code, if I set $what to 'red', it doesn't find it, whereas it finds green and blue. Why and how to make it find red as well? $where = 'red,green,blue'; $what = 'blue'; if (strpos($where, $what) == true) { echo 'found'; }

0
Q: how to get last inserted record in symfony1.4

user242526how to get last inserted record in symfony1.4 i did not have much knowledge of symphony. and i need the the id of last inserted record in symfony1.4, so if u have any idea then please suggest me. public function executeAddquestion(sfWebRequest $request) { $q=$this->getUser()->getAttribute('quiz'...

0
Q: loading image while main image load

user2903564i have a e-commerce site and when i fetch all products on a page. but all image are very high. i want while main image load till a loading image will show to user. thnx $sqlpro="select * from tbl_product $where"; $respro=mysql_query($sqlpro); $totalproduct=mysql_num_rows($respro); if($totalpro...

0
Q: Zend Framework 2 - Respect of coding conventions

StupidusI created a Service (or at least a class I believe is a Service) which manages files on the local server and a FTP server. My code works but I'm wondering if I did it right : Basically I created a new class called FtpService that implements nor extends nothing and added it to the factories in my...

-3
Q: Site Login Trouble

healthymanSomtimes i can't visit and also login to my site http://osmaninagarnews24.com for 4-5 hours which is built with wordpress 3.7.1. This problem does not happen always. But recently this problem is getting worse. I can browse other site but can't browse my site. This trouble stays for 4-5 hours long...

0
Q: Setting ACL on Cloud Storage file with PHP on App Engine

olaI need to set the mime-type for a file after writing it to Google Storage with GD imagejpeg(), since this function does not support stream contexts. Since PHP rename supports stream context I thought it might work to set it when renaming the file, but apparently this does not work: imagejpeg($im...

0
Q: Remove subfolder from url using only php code and not with help of .htaccess

ArbflowI have php wesite using following url, http://example.com/subfolder/category Now, i want to remove "subfolder" from url using php, but there can be multiple categories which can come and i dont want to write every category condition in .htaccess file? Thus it will be like, if someone calls url ...

0
Q: How to create a one array having after insertion of every element from foreach loop in PHP?

PHPLoverHow to create a array containing all the questions detail in following scenario? foreach($question_ids as $question_id) { /** fetch the question data by question id **/ list($data) = prepare_response($objQuestions->GetQuestionByID($question_id)); } Can anyone please hel...

0
Q: How can I catch ParamConverter exceptions in a Symfony2 controller?

user3035179Here is the exception I got: No result was found for query although at least one row was expected. I am basically getting that exception when a user id is not found in database. Here is what my route looks like: localhost/../user/18 and the code in my controller: public function showAct...

-3
Q: Guidance needed to get started with the project

user3048812I have to do a university project wherein i need to get inputs from colleges and professors of various colleges. The inputs from colleges that are to be taken are DATE_OF_EXAMINATION,EXAM_SUBJECT,COLLEGE_NAME and PLACE. The inputs that has to be taken from professors are PREFERRED_DATE,PREFERRED_...

0
Q: PHP preg_match_all strange behaviour with "/" character

Masood HosseiniUsing : preg_match_all( "/\b".$KeyWord."\b/u", $SearchStr, $Array1, PREG_OFFSET_CAPTURE); This code works fine for all cases except when there is a / in the $KeyWord var. Then I get a warning and unsuccessful match of course. Any idea how to work around this? Thanks

-1
Q: PDF editable areas, editing from web interface then stitching PDFs together with edited content in place

solarizedI have a client that is providing us with nearly 500 PDFs and some/most of these contain editable fields. (These are PDFs because they are being used by the client's representatives to produce proposals when selling their product). All of these PDFs have been created in a PDF version higher then ...

0
Q: httpPost url to post app data

BarunI want to send my data directly from my mobile to MySQL database.I used php to connect to MySQL.But in android code I can't get which url is passing inside httppost. My code is. HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("127.0.0.1/...

0
Q: Why does tcpdf need K_PATH_IMAGES

John MagnoliaI am getting lots of errors when using the default tcpdf: Warning: file_exists(): open_basedir restriction in effect. File(/usr/share/doc/php-tcpdf/examples/images/) is not within the allowed path(s) This error is actually caused from: if (!defined('K_PATH_IMAGES')) { $tcpdf_image...

0
Q: Nestled MySQLi prepared statement with fetch

user3048895I'm trying to get this to work the problem is that this code only seems to execute the first part (at least that's the only one that gets output). When separated both queries work. Not sure why it's failing. First fetch works without problem. if ($select = $mysqli->prepare("SELECT fileca...

0
Q: PHP Tips: How can I avoid my "receipt-page" to load twice?

user3048831this is my first time asking for help When the user finishes the registration and payment, the bank automatically calls my receipt page twice. I have contacted the bank about this and they say that this is intended. My problem is that on the receipt-page the user is inserted to the member datab...

1
Q: How to upload a audio file using PHP?

DKBHOII wanted to upload a audio file using html and php .It always returns the error message(Invalid file).please kindly help me. I am follow this url- https://forums.digitalpoint.com/threads/mp3-file-upload-in-php.1174500/; http://p2p.wrox.com/php-how/53040-how-upload-mp3-file-using-php.html This ...

0
Q: Even and Odd numbers sorting into Text file

BeachSamuraiHI Everyone I need help in sorting out even and odd numbers. The numbers are entered in a form and are called to the php file ( at bottom) after which I need to display them in a text file this part for me is all good. I am having trouble separating the numbers even from odd. I know we need to us...

0
Q: MySQL fulltext search runs so slow

Redzwan LatifI wrote codes to search for a keyword from different tables. This is my code : $stmt = $conn->prepare("SELECT DISTINCT rest.*, MATCH(rest.resname, rest.address) AGAINST(:keyword) as a, MATCH(cuisine.cuisine) AGAINST(:keyword) as b, MATCH(recc.recc) AGAINST(:keyword) as c, MATCH(emenu.menu, emenu...

0
Q: Phpmailer : accents shown in gmail but not in Outlook

So4neI'm sending a mail from a web application with Phpmailer. My point is when I send a mail, the MsgHTML which contains french accents is not displaying correctly on outlook ('� ' is what I got), but in gmail the accent is correctly displaying ('é'). Here is part of my code : $mails = explode ("...

0
Q: Why fails 'include' with folder in PHP 5.4

user2794692In my local server, with PHP 5.3, if I do this: include('/folder/file.php'); Works fine. But in production server, using PHP 5.4, if I do the same, browser show this error: "include(/folder/file.php): failed to open stream: No such file or directory" "Folder" has 777 permissions. ...

-6
Q: PHP Fixing Undefined Index

user3001065The following is my PHP code: <?php $errormsg = mysql_real_escape_string($_GET['errormsg']); if(isset($errormsg)) { echo $errormsg; } ?> So when I goto the index.php?errormsg=blabla it shows it, and when I goto index.php?errormsg= its also fine, but when I goto index.php ...

0
Q: How to set a variable when a pages loads in yii

Ajeet ManralI am a newbie in yii and i want to know whether is there any method which can set a value of a variable whenever the any page loads. Eg-(Its just an example) if there is a variable $count . Now i want to set the value of the $count as 3 whenever any page loads . I have heard about onBeginRequest...

-2
Q: when I change the table data how the date will change automatically in php

user2995144I have the table. The table has 10 rows and 4 columns(i.e: Sl.No., Project Name, ChangeDate, Changed By).When I modify in project name, in corresponding changeDate column how the date will automatically changed to today date using php? Here is my code: <html> <head> <title>Project</title>...

0
Q: Is a graceful reload idempotent for ansible?

Jurian SluimanWe're now investigating Ansible to provision our servers. It's quite a default nginx, php-fpm & mysql setup. However, I am wondering about installation of these packages and how to make the playbook idempotent with the services running. For nginx, we've a default nginx.conf and some files in con...

0
Q: Change particular text or url in page content on wordpress using MYSQL ?

Ponnalagappan Renganathan1)I have 85 pages in my website, in that i like to change particular url which have used in all pages. 2)I need update query for select particular posts and change repeated things in that content

0
Q: Correct procedure for updating page data without page reload

user2921557Morning all, so im writing a cms for learning but keep coming across the same issue. When e.g., updating a blog post i want the data to be changed without the page reloading. This way the user can see it happen and doesnt have to scroll back to the post. Same goes with everything, deleting, movi...

-1
Q: How to get data in foreach and call it outside on the loop in PHP

Ekim TrusherHow can I get out in foreach outside.. here is sample code . $arr = array("test","Sample"); foreach($arr as $id) { //here's data to loop which is i want to get is out side for this loop $id=$id; //<<- this data I want to get out side or call this in other page. } // echo $id; //<<<--- no outp...

0
Q: getElementsByTagName causing issues with IE

RobWe have this website that contains a Google map plotting multiple markers. This works fine on all browsers except IE. The error it's giving is: Unable to get value of the property 'getElementsByTagName': object is null or undefined line 112 character 9. This is the line of code that's ca...

0
Q: how to separate mysql cell in PHP by given symbol

user1505027Suppose that in MySQL I have a row called "favourite_websites". If there are more then 1, then they are separated by comma ( , ). Example user 1 has "favourite_websites" set as "facebook.com" Example user 2 has it set as "facebook.com,google.com" Example user 3 has it set as "facebo...

0
Q: Display list of tables as drop down box

Elliot BlackburnI'm trying to code a drop down box that displays all table names from a database but I can't seem to figure out why it's not working. I'm getting the drop down box on the screen but it seems to be empty and my submit button isn't appearing either. I just can't see where I've gone wrong, here's a...

0
Q: PHP - How to convert RGB color to CIE 1931 color specification

Ravirpandey - CSI am creating my own PHP based application where i want to change RGB color into xy format of CIE 1931. How can i convert my RGB color specs to the CIE color space?

0
Q: hi i am new to php how to get a msgbox?

user3048511hi i am creating a simple enquiry form with upload option if i click submit button it goes to another page and displays success message but it should come in the same page as a message box what should i do? Here is my Html code: <ul> <li><span>Name</span><input name="name" type="text" size="25"...

0
Q: Yii - Textfield validation not working

user3004356I'm new to Yii framework. Now I'm using two textfields for min size and max size. Now this textfields are supposed to take only integers. But they are taking alphabets also. I used the following rule in model file. public function rules() { return array( array('min_size, max_size', 'numeri...

0
Q: Magento Search : How can we set up spell check for search in Magento

user2790350There have been a lot of people searching on my website with spelling mistakes and hence we are losing opportunity as we may be losing out on trade due to this. A friend has suggested me using a third party service like Bing Synonym API. My idea is that when a user searches for say comuters he/sh...

0
Q: Auto generated sequence number staring from 001 ( ONLY FOR 3 DIGITS) - PHP / MYSQL

user2906577I need Auto generated sequence number staring from 001 ONLY FOR 3 DIGITS in PHP / MYSQL ex: 001 next will be 002 and next will be 003 ... 009 .. 010 ..119..120..etc but number generated should be in sequence wise not like 001 then 120 or 008 etc , i need in sequence number. actually i have prod...

 
10:38 AM
0
Q: Why does file_put_contents have permission issues when run from the browser?

williamcwilliamsThis question has been asked a couple of times up here, but I haven't found a solution yet. I have a Fedora 19 LAMP server and I just want to run the simple command: file_put_contents('test.txt', 'Hello there'); in order to confirm that my web server can use PHP to write data to files. I'm having...

0
Q: HTML Table to PDF convertion using PHP

johncy binoywhich is the best tool to convert an html table into a pdf file using php. Here I dont want to install or keep the library in the www folder..Please help me Johncy Binoy

-2
Q: How can I count the numbers of rows that a mysql query returned? and i want to calculate them using PHP

MaheshDigarsei have a database table connection_td id - zone - ageing_with_a - ageing_with_b - ageing_with_c - tatal_ageing - average 1 Abw 5days 1days 2days 8days 2.6days 2 bbb 1days 5days 2days 8days ...

0
Q: Retrieving Previous/Next ids for Popuped item

JamesI'll quickly layout my scenario: I am using a PHP/Mysql function to retrieve a grid of Thumbnails (items with unique ids) Order of these items may be different every time, depending on filters (i.e tag, order, etc) There is a high max LIMIT of 120 items to be displayed at once in one page The p...

0
Q: POST multiple values in jquery especially if names are the same

HenryI have a table(NOT FORM), in php which I generated in a while loop. one of the inputs is generated 20 input, with or without any data in it. I am trying to run an update/save using jquery and I need to post all the values in that input. This is in a while loop. It is basically loops and rende...

0
Q: dynamically inserted hidden text fields using .html() under form not passing

Radhakrishna RayidiI dynamically inserted some hidden fields in between my form using .html() / .append() But when i i'm click the submit button the form not carrying the form details to my php page. HTML: <form action='/passenger.php' method='post' enctype='multipart/form-data'> <div class='nebookclone'></div>...

0
Q: Validating textbox when it was shown using jquery form rules

PHPCoderI have a form which generates textbox when the user selects "others" in dropdown.. Dynamic textbox generation was done and i can able to get the value of "others" textbox. But my Problem is 1) I want to validate the others textbox when it was shown.. How to do the validation any Suggesstions...

0
Q: Calculate total price for multiple rows

user3009232I am trying to calculate the price for multiple rows. I have it working for one row however, the onchange function doesn't seem to work when i put it into my for loop. Does anyone know why that is? JavaScritpt: function cal() { var price = document.getElementById('priceper_0').value; v...

0
Q: php unquoted attribute value

user2247671Hi I am trying to create my first REST service and have spent some time reading tutorials, I am following one through and in the client code I am getting a "=" in a unquoted attribute value. in the href line between the last entry. I can't see whats wrong. I would like to get the example work...

0
Q: fetching 3500 entry using getResults in symfony2 is slow

aditMy time to first byte (TTFB) in my homepage of my website is around 1.8 second, which is pretty slow knowing that the best practice should be 500ms. I've been using the debug tool and it seems that most of the times is spent on the controller, specifically I have a query that pulls around 3500 en...

0
Q: special characters in sql query

user3049061i am reading data from xml file. my xml file has city name like İstanbul. i check İstanbul in my city table by using select query. but it is when i echo my sql query in php it show the query in this formate SELECT city_id FROM dc_city WHERE (name = 'Ä°stanbul - Avrupa' OR FIND_IN_SET('Ä°stanbul...

0
Q: Symfony2: fos_user_bundle embedding registration form with entity

user2739610I've got 3 entities: - overriden User - Address - Company User Entity got entity fields Address and Company. Now I'm trying to build User Registration Form using as well fields from Address and Company entities. The problem is - I have no idea how to proceed with this. I was trying to do sth ...

0
Q: CLI PHP Script - Show escaped/formatting characters

JazcashSo this question applies for lots of languages, so don't be thrown off by the fact I'm using PHP in the terminal. An answer for say Python or Perl would probably also give what I need to know. So I'm reading a text file, and I want to know what special characters are contained on every line. So ...

0
Q: Zend $this->_forward error

user3035608When I call (in my AdminController) the _forward function, i get this error Fatal error: Cannot redeclare class Admin_Boot in /www/application/modules/admin/Boot.php on line 33 Actually, my website's structure is (I have not placed everything, but the most important is here) #Application...

-1
Q: how to get UDID of iPhone device while installing application in php

SandeepI have createed one url. Once hit this url safari iphone application is install. I want to track which device has install this application. So how can i get UDID? Anyone suggest me

0
Q: Get php file from instance of object

VivendiIs it possible in PHP to get the file location of an object? The object is an instance of a class but i'd like to know where this class is located on the file system based on an instance of this class. Is this possible somehow in PHP?

0
Q: Woocommerce Sessions: woocommerce_get_cart_item_from_session

grayI have created a plugin mainly following this guide, which simply adds a small bit of data to a given product: http://www.xatik.com/2013/02/06/add-custom-form-woocommerce-product/2/ I know Woocommerce have made some changes outlined here: http://www.skyverge.com/blog/migrating-your-plugin-wooco...

-2
Q: Fetching pages and give pagination limitimg the noof pages to be 5 in each page

user3021734<TD> <div class="pagination" align="right" style="color:#FF0000;"> <div id="pageNavPosition"></div> </div> <script type="text/java script" src="js/paging.js"><!-- var pager = new Pager('rounded-corner',16); pager.init(); p...

0
Q: Gearman PECL Extension on MAMP

Burak ErdemI'm trying to install Gearman on Mac OS X with MAMP PRO. I use PHP 5.4.4 of MAMP. I installed Gearman using Macports $ port install gearman After that, I want to install the PECL extension but installation gives the following error; $ sudo pecl install gearman-beta WARNING: php_bin /Applicati...

0
Q: echo php variable in backbone.js template

mayankI m trying to access my session variable in backbone template which render with underscore.js template : _.template(template) i am working on login module . after login i set session in backend with php , which is working fine. session is started. on success is set username with js, but it ge...

0
Q: New to codeignitor (MVC architecture )

user555I am working as php developer but never worked on codeignitor or any mvc architecture, currently i got website to work on which completely developed in codeignitor ,So anybody can help me by which it will easy for me to understand website by url(Means by url onwhich controller funtion should loo...

0
Q: PHP Start Background Scripts in Windows without waiting for completion

Tony HenslerOk So I have a PHP file where once a file is uploaded it is moved to a new location this triggers an event to let the user know that the file has been uploaded and starts a conversion process of the PDF file they have submitted. if(move_uploaded_file($_FILES['upl']['tmp_name'], 'uploads/'.$_FI...

0
Q: How to handle paypal data on ipad after auto redirecting from paypal

sameer MemonI implemented paypal module. Once user hit pay button on his ios app it will open a web client and will redirect to paypal site. After the payment completion IPN will store transaction id in DB. I also enable auto redirect in paypal setting. Now after successful payment user will redirect back wi...

0
Q: Trying to add multiple attachment files with Phpmailer

So4neI have two files on my server which i want to join to my mail (generated by tcpdf then by phpmailer), but it doesn't work, the pdf is sent without attachement files. Here is my code : function SENDmail($pdf) { // $pdf is generated by tcpdf $mails = explode (";", $_REQUEST['YOU']); $files = ex...

0
Q: Identifying specific row from SQL results

user3049051I have a list of 'orders' being pulled out, which consist of product name, description etc, one of the fields is quantity which is in an editable text box, next to that is an update button (which has an unique ID for that row pulled from the DB). Now when the update button is pressed, I want the ...

0
Q: Get subject from Table in PHP

user3004753OK So I'm trying to access a table called emg_quote I have the Quote ID so Im trying to get the Column Subject from the same row as this ID but for some reason All I'm getting is the first row in the entire table? Can any one figure out what I'm doing wrong? Here is my coding: $row['quote_id'] =...

0
Q: Secure Data transmission from iOS app to server

TendulkarI have tried to implement data security in my iOS app . I have tried this . It is working well in iOS . But my issue is I want to get the original string from the encoded string at server side using PHP . Can any one please tell me how to get the original string using php? . I used the below php ...

0
Q: phpseclib "fatal" warning with AES

LithilionI'm using the phpseclib and I haven't changed the Cryptclasses. So I have a problem with the AES class. In the first class I encrypt a text with a key: $cipher=new Crypt_AES(); $key=substr(str_shuffle(str_repeat('./0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',16)),0,64); $cip...

0
Q: No error: PDO constructor was not called in

user3049124Good afternoon. I'm starting using the PDO yesterday, and I have some problem with this. I was creating extendet class, which doesn't work and I can't find the bug. This is code of my helper class, for work witch PDO: class EPDO extends PDO { /** Some identificator of connection*/ publi...

0
Q: PHP String Handling

www.sapnaedu.inI am getting the response from one of the API calls something like this : {status: 'true',description: '0617971781'} I would like to convert into an associative array with ´status´ and ´description´ being the key elements. I tried the following explode : explode($str, ",") But, I am no...

0
Q: Uploading file to Moodle using the REST Service core_files_upload

amburnsideI am developing an Android app, which will upload content to a user's private files in my Moodle installation using the REST webservice core_files_upload provided by Moodle. core_files_upload takes the following parameters: contextid component filearea itemid filepath filename filecontent The ...

-1
Q: Missing magento database table catalog_product_entity_url_key and catalog_category_entity_url_key

user3007326I upgraded magento 1.5 to 1.8 and the add to cart is not working with missing tables catalog_product_entity_url_key and catalog_category_entity_url_key. The onclick is not adding products to cart and gives HTTP/1.1 500 Internal Server Error for following link http://iphost.com/ajax/index/add/...

0
Q: Doctrine getResult() returns only one row

JackalopeZeroIm using Doctine to bring back a simple set of results. According to the documentation the getResult() method should return all results. I know that the database has many users, and the same simple query against the database will bring back many rows. I guess it is something to do with the Resu...

0
Q: Having problems with reading and writing from files PHP

user3049153What i'm doing is first of all producing a dynamic dropdown box where the page names are shown. What i then want to do is depending on what file is selected in the dropdown,load that file into a textbox and then when i commit my changes, the new file will contain the new text from the text box. ...

0
Q: CodeIgniter: rewriting URL's with .htaccess

murthoI've build an application using CodeIgniter with several controllers I want the application URL to look "pretty" by using .htaccess files. All controllers seem to work just fine except for the controller that is set as default in the "application/config/routes.php" file My .htaccess file looks...

0
Q: Retrieve JSON array directly from mySQL query

GruffyI have written the following function for mySQL which allows me to escape data for use in a JSON string: DROP FUNCTION IF EXISTS JSON; DELIMITER $$ CREATE FUNCTION JSON(`input` TEXT) RETURNS TEXT BEGIN # Declare my variables... DECLARE `char`, `nextChar` TEXT; DECLARE `charPos` INT...

0
Q: How to out put charset=iso-8859-1 in an excel reader for php?

Gentian Prognithe code have this one $retstr = ($asciiEncoding) ? $retstr : $this->_encodeUTF16($retstr); , but i want to change it on charset=iso-8859-1 ... caraceters like ë , ' " , out put are wrong symbols . Please any idea?

0
Q: Cascading Dropdown from single Table

szparim coding on a little webpage where i want to use cascading dropdowns filled with data from one MySQL table. The table contains data for events. The first column is the date of the event and then there is a column for each available table containing the number of free seats at that table. What ...

-4
Q: a php code that not runnig in php Version 5.4.19

MOBbelow code work fine in php version 5.3.8 but in 5.4.19 not work . any body know what code not support in new vesion ?? <? parse_str($_POST['mysend'], $fortest); $instostr=$fortest['url']; $content = <<<EOD var page = require('webpage').create(); EOD; ; $DelFilePath = getcwd() . "\myText....

0
Q: Not recieving any email

sainathHi I saw an online php tutorial and not able to receive any email from this contact form and not able to understand where i was wrong <html> <head></head> <body> <?php if(isset($_POST["submit"])){ $email = $_POST['email']; $subject = $_POST['subject']; $message = $_POST['message']; m...

0
Q: What shall be the backend for the event scheduler app

Raviraj HegdeI am working on a project which has two user interfaces and I have to schedule an event. 1st user provides 'city' and 'date' and 'subjects' 2nd user also provides 'prefered city' and 'date' and 'area of interests'. Both the users are stored in the database. Now the aim of the application is to ...

0
Q: Lessphp: Failed to assign arg @list

Stefan VogtI use php less compiler to compile bootstrap.less. When I upload on the server bootstrap.less via smartFTP everything works fine. But as soon as I open and save bootstrap.less on the server (without changing it, just save it using remote editor linke PSPad or Remote System Explorer in Eclipse) ...

-4
Q: How to show categories in PHP

user3023297Hi I want to create Category table like this in PHP Abstract (7) Animals (2) Food (10) Car (5) When user upload image and set category it sends data to my database. Category in Cat section of my database now I want to show this data in PHP like I have shown you above. Thanks

0
Q: responseXML comes almost null when taking data from db with PHP & not when typed... why?

user3049178It's the first time I write here (untill now I had always found the answers from other posts). I have two questions: The first one is just to know your opinion: I'm creating an API wich will get data in the client's side from a device wich will be constantly sending information to a port. I w...

0
Q: paypal send multiple items?

renishkhuntdear friends this is my array to send multiple items on paypal. Array ( [item_name1] => this is the testing job [item_number1] => 2433 [amount1] => 40 [item_name2] => testing job 2 [item_number2] => 2435 [amount2] => 40 [item_name3] => testing job 3 [item_number3] =>

-1
Q: how to connect android app to server?

user2758950i want to purchase a server because i want to create an online game but i saw a question before talking about connecting to a app to php website but can i connect android app to other one online? i searched about sql and sqlite i saw few tutorials but i'm not getting the point about how to create...

0
Q: RESTful web service actions for registered users

user2412672Hello I am trying out developing RESTful API in PHP. I have a question. I want to know some good way for making that some actions in API would be available only for registered users. I made registration via API. Thank you for your time.

0
Q: storing array of arrays in Redis

ali AI have a huge database with complex relations and want to cache some index and strings in order to have much faster access to them, so that I want to store them in some sort of cache to minimize accessing DB to fetch informations. I searched and found Memcached and Redis can be a suitable for my...

1
Q: PHP: Confusing disparity between invoking reflection method using constructed array or func_get_args() in version 5.4

Sam AdamsHere is some code to understand this better: <?php /** * A very edge case in PHP 5.4 regarding passing objects by reference. * It seems to be a compound effect of using reflection to set an inherited method as 'available', * AND that method taking an explicitly referential argument (&argume...

-1
Q: Wht the php query return a single row

user3049201i am developing a off-line chat application, i have two table 1. user details (cli_id,email, User name ) 2. chat table (c_from, c_to, subject, matter, image) now the problem is that i am taking the cli_id from the user table as from and to but when fetching the query it return a single row, my co...

0
Q: php mail function error -> Warning: mail() [function.mail]: SMTP server response: 530 5.7.0 Must issue a STARTTLS command first

user2995165I am trying to send email from php to a gmail account. I have the following settings on my laptop: Windows 8 Internet connection XAMPP 1.7.4, PHP Version 5.3.5, I have the following php.ini settings [mail function] ; For Win32 only. ; http://php.net/smtp SMTP = smtp.gmail....

0
Q: PHP imap_functions get attachments OLE format

Ricardo MartinsIt's possible get email from gmail account, but only get emails with OLE attachments? I'm using this code: <?php /* connect to gmail */ $hostname = '{imap.gmail.com:993/imap/ssl}INBOX'; $username = ''; $password = ''; try { /* try to connect */ $inbox = imap_open($hostname,$username,$password)...

0
Q: Input field that redirect to the input

user3047119i trying to make a input field that links, but im having some problems. I want to have a search field that links to the input. So if the user types in "3456" Then the user will be redirected to domain.com/3456 when the search button is pressed if the page does not exist, the user will just get a...

-2
Q: html to csv using php str_get_html http://simplehtmldom.sourceforge.net/

user2323550I've used the below code, but i'm getting the following error when i go beyond 8 columns in a row to be written in csv file. Please comment, ur inputs are valuable Fatal error: Call to a member function find() on a non-object in C:\wamp\www\indus\test.php on line 69 include "simple_html_dom...

0
Q: Fetching rss from wordpress is slow

RywekI have a wordpress blog in a subfolder of my site (www.mysite.com/blog) that is completely independant from the rest of the site. What I'm trying to do is to add a list of the latest blog posts in all the other sections of the same website that doesn't have wordpress. Right now, I'm calling for t...

0
Q: How do you handle multiple developer configuration in a project?

AndrewI've been thinking lately about how i handle config changes between multiple developers on a project. Specifically here about a Laravel project in PHP, but i guess this applies largely to all frameworks/languages. In general would you say its a best practice to not commit your configuration? If ...

0
Q: Iterate through elements in DOMNodeList

Colm MulhallI am having a problem iterating through elements in a DOMNodeList. I am trying to put a whole paragraph into a string. I can get each sentence separately using this: $node = $paragraph->item(0); //first line of the paragraph $node = $paragraph->item(1); //second line of the paragraph But I c...

0
Q: Symfony Ajax Progress Bar

Thibault MartinezI have an ajax controller that iterate over a loop. I would like to update a progress bar following this controller progress. Basically, I just have to output a $('.bar').css('width', $percent . '%'). But all those outputs are just accumulated and sent once the function is finished. How can I ...

1
Q: gnupg with php throws "could not init keylist"

Daniel MTrying to encrypt mails with gnupg, the method call gnupg::keyinfo() throws the error could not init keylist. This is how I initialize the extension: putenv('GPGME_DEBUG=9:./gnupg/debug.log'); putenv('GNUPGHOME=./gnupg/'); $this->gpg = new gnupg(); $this->gpg->seterrormode(gnupg::ERROR_EXCEPTI...

-1
Q: List directory names and exclude certain folders

charliejsfordI am trying to list all the file names within all directories on my web server using PHP. what is the best way to do this and also exclude certain directories from displaying the file within them?

0
Q: How to display data from related tables in CGridview in yii

Ajeet ManralI am trying to display the results using CGridView. i have two tables Users and products. ExiProducts is the table which maintains the many to many relation between then and let the relation name is 'myrelation' public function actionSearch() { if(isset($_GET['searchButton'] && $_GET['search...

0
Q: .XLS to php/html table

Mindaugas ŽemaitisI'm working as IT Administrator at University. I'm sorry for my english, not the best there is :) The workers makes student's timesheets/tables in xls files and I upload them to our website for download.. I made a webpage to display xls files using http://code.google.com/p/php-excel-reader/, but...

-1
Q: zendframe wrok 2.2 for beginners (php)

paprany one please suggest me zendframe work 2.2version ,,i dont know the zendframe wrok till now can you give me understand links.. Please send me the references of zendframe work 2.2 Thanks in adavance

1
Q: excluding directories from RecursiveDirectoryIterator

charlieI am using the following code to list files and exclude certain directories from display $path = '../admin/';; // List of directories / files to be ignored. // $ignoreDir = array('1.MOV.xml','.git','testing/dir1','testing/dir2','testing/dir3','testing/dir8','public'); /** * Quick patch to add...

0
Q: PHP LDAP Windows 2008r2 Change users password

Sönke I've got here an Windows Server 2008r2 set up with Active Directory, DNS, DHCP and DC for testing purposes and i am quite new to LDAP. I want to change the password for myself, even though if i am no admin. So, here is my script i am working on right now: // LDAP Variables $serverip = "192....

0
Q: How to arrange the data in verical columns in smarty template in following scenario?

PHPLoverCurrently I'm printing the questions and answers in horizontal manner. Now I want to print the questions and their answers in Vertical column format and each column should be separated by a vertical column. I'm not getting how should I do this in smarty? Can anyone help me, please? Any kind of he...

0
Q: I am having issues with php FPDF

Syed Maaz AliI am using FPDF library to write image on it, its working fine with image who's size is equal or less than one page if my image is bigger than one pdf page its not showing the other part of that image on next page

0
Q: Changing from http to https has meant redirects do not work

bubblebathI have made my local development area https by adding the following to my httpd-xampp.conf to make all my pages https <IfModule mod_rewrite.c> RewriteEngine On #Redirect all to HTTPS RewriteEngine On RewriteCond %{HTTPS} !on RewriteRule ^(.*) https://%{HTTP_HOST}%{REQUEST...

0
Q: Best Way to Handle Background Processes

Burak ErdemI'm trying to implement an iCal synchronization service for my project. There are nearly 10.000+ listings (more to come) in the database and almost every listing has a Google Calendar iCal URL to be synchronized every 12 hours. Synchronizing a single iCal URL takes about 0.5-1sec, so it will take...

0
Q: Facebook PHP SDK Verifications after login

The Marlboro ManAs a total stranger to facebook and its uses, I ask you the following question about login a user: When using the latest php SDK (as of today, php-sdk-3.2.3), I read the SDK documentation (https://developers.facebook.com/docs/reference/php/) and can login a user and get information from them acc...

0
Q: Why validation triggers error in Laravel?

trerumsFaced the problem while using Laravel 4 validation. Here's the code: $validator = Validator::make( array( 'surname' => ['Laravel'], ), array( 'surname' => 'integer|alpha_dash' ) ); $valida...

0
Q: Creating Categories using database in PHP

user3049358Hi I want to create Categories listed which are saved in my database so when user upload his images and he select the category it saves the data in database in Cat column Now I want to show category in PHP like this Categories Total Animals (4) Celebrations (2) ...

0
Q: convert php array response from a web service to json array

bala_gamerOne of my remote web service provider is returning response in the format of php array(no other format supported). Im developing an android app where i have to load the received response either in a listview or a spinner. Im having a big headache in finding the right way to parse the received php...

-1
Q: Not able to edit,add or delete from backend in magento?

Amit SinglaI have created magneto application which is working fine on local server but when i hosted on live server edit,add or delete functionality stops working.I am new bie in magneto so please suggest how to fix it.

0
Q: Twig PHP Pass existing Array to Twig Filter

Peter FoxI'm trying to implement my custom Translation Filter in twig. All translations are stored in csv's. Per template we have a csv that contains the data. Now for some reason the function within the filter isn't possible to access the $TranslationText array. What should I change to make the filte...

0
Q: laravel testing an ardent model/controller

RayI have a model which uses Ardent (which itself extends eloquent). I'm trying to test a controller that links to the model - very basic show. The model works within the web app through the browser but I'm getting unexpected results through tests. Here's my model: use LaravelBook\Ardent\Ardent; ...

0
Q: Yii CDbCriteria select with AS alias

inckkaI'm joining page_content table with the same and after that both have column named sef_url Following code returns an error. Is there any possibility to get the AS 'alias_name' use inside of CDbCriteria->select $criteria=new CDbCriteria; $criteria->alias = 'p'; $criteria->select = array('p.sef_ur...

0
Q: Caching REST api using Codeigniter Framework

user1768024I have two servers. First server is serving as datacenter which only contains database and REST API by philstrgeon https://github.com/philsturgeon/codeigniter-restserver. This first server is basically working with database, I already implemented database cache http://ellislab.com/codeigniter/us...

0
Q: Symfony 2 kpn snappy generate pdf with output meets security area

user2231380I`m using Symfony2 kpn snappy bundle to generate pdfs. I want to generate PDF from an html page with css. I found a solution, but it has a problem with : $pageUrl = $this->generateUrl('accounts_management_generate_pdf_markup', array('invoice' => $invoiceData), true); // use absolute path...

0
Q: Redistribute array proportionally

Umbrella Corporationi have an array containing some email addresses, divided by domain. I'd like to "redistribute" the array, proportioned by addresses num in that domain, due the reason i want to send emails to domains "proportinally". Example: $original_haystack = array ( '@hotmail.com' => array ( ...

-3
Q: PHP Server API difference

Poonam Bhatt What difference it will be in PHP execution, if I install PHP as CGI/FastCGI instead of Apache 2.4 Handler Apache Lounge? How can we make php_intl.dll enable in PHP installed as CGI ?

0
Q: Inserting PHP into a page

ElendilTheTallThis is probably a very basic PHP problem, but I am complete noob when it comes to PHP, so I will ask this based on my specific problem. I am using Stripe Checkout and PHP to take card payments on a site. It's set up and working fine. However, what I need to do now is feed the data returned by S...

0
Q: PHP Validation Form Placement

user3048961I have some code for (somewhat) validating form data, in this order: <!DOCTYPE html><html><body> <?php $name = ""; // define variables and set to empty values if ($_SERVER["REQUEST_METHOD"] == "POST") { $name = thresh($_POST["name"]); } // line 8 function thresh($data) // Go Katniss!! { $dat...

0
Q: Merging two json in PHP

CalipsoI have two json's First one is [{"COLUMN_NAME":"ORDER_NO","COLUMN_TITLE":"Order Number"} ,{"COLUMN_NAME":"CUSTOMER_NO","COLUMN_TITLE":"Customer Number"}] Second one is [{"COLUMN_NAME":"ORDER_NO","DEFAULT_VALUE":"1521"}, {"COLUMN_NAME":"CUSTOMER_NO","DEFAULT_VALUEE":"C1435"}] I want to ...

0
Q: i am unable to login and can not validate my user

user3049419<?php session_start(); $con=mysqli_connect("localhost","root","","company"); if(mysqli_connect_error()) { echo "error in connecting to database"; } $email=$_POST[semail]; $password= md5($_POST[spassword]); $query = "select email,password from register where email= '$email'"; $result = my...

0
Q: Preprocesing files before upload to FTP

JuanjicoI'm using phpStorm to develop and I want to process some files before it's uploaded to the FTP server. For example, I want to strip all comments on PHP files or even compress/obfuscate it, or minify css and js. I know that there are some plugins to minify css and js, but I don't want to do this...

0
Q: missing refactoring options in netbeans 7.4 for php

user2988167i recently started to study some of the refactoring options of netbeans. I am now using version 7.4 . In various tutorials such as this one features such as "introduce method" and "encapsulate fields" are described. I cannot find them however in my php project. Am i correct in stating that these ...

-1
Q: Whats the best way when using RecursiveDirectoryIterator to exclude certain files within listed directories

charlieI am using the below code for RecursiveDirectoryIterator to list file names within a directory $path = '../admin/';; // List of directories / files to be ignored. // $ignoreDir = array('phpMailer'); /** * Quick patch to add full path to Ignore */ $ignoreDir = array_map(function ($var) use($pat...

-1
Q: Syntax Error on SQL err no : 1064

Maggie AckermannI am up the creek, The following is my code, I have double checked the tables and the spelling of these tables they look correct, I keep getting the following error code when I try and submit my for to the SQL, insert into lbs_trace_etrack set 27827910119, Trevor Ackermann, TEST, Elspark, Trev...

0
Q: PayPal IPN Listener Working with sandbox but not live

jaooeI have a paypal ipn listener ipn.php, which is linked to a database and updates the notifications table with the notification info and then emails a key to the payer email. Here's the ipn.php <?php include("class.phpmailer.php"); include("class.smtp.php"); include("config.php"); //Se...

0
Q: MySQL fetch_array not working?

Pascal KordonI have 2 tables in my database - link and suggestions. This is how my code looks. In the first code, I pull out suggestions from the DB and show them, but when I try to show the videolink from the other table, it does not work. <?php include('config.php'); $from = "suggestions"; $sql = mysql_qu...

-6
Q: I want a jquery script to increase unique hits on website page

user3049455Please help me by giving script in jquery which will increase the unique hits on website page with different ip addresses automatically.

0
Q: Regex dot all, prefix each line?

netbrainWhat would be the proper regex to prefix each line? Say i have the the input data: SOME OTHER DATA TABLE ROW ROW ROW END SOME OTHER DATA Im only interested in what is between and including TABLE and END. In php you can write a regex like the following /TABLE.*?END/s which would match the ...

0
Q: Simple recursive tree in PHP / MySQL

AlbatroszI have this table in MySQL: id name mother 1 grandma 0 2 myuncle 1 3 mymom 1 4 me 3 5 mysister 3 6 myson 4 7 new_grandma_son 1 I almacenate this info in an array called dat...

0
Q: Does PHP interpret code in the same way that JavaScript does?

user3048961Does PHP interpret code in the same way that JavaScript does? Upon some research, I've gathered that JavaScript programs are run in a so-called 'two-pass' read. The first run gets the syntax and function definitions of the program. ('Parses' the data so to speak), and the second run - well - runs...

0
Q: Retrive woeid with Latitude and Longitude and parse it using php

user2604405I tried to retrieve the WOEID code for a latitude and longitude, and parse it via php. But null value was returned. The latitude and longitude is retrieved using IP through http://www.geoplugin.com/ groplugin API. <?php require_once('geoplugin.class.php'); $geoplugin = new geoPl...

1
Q: How to sort an array alphabetically and then give that order to another array?

user2718671I got 2 Arrays. First one looks like this: array(33) { [0]=> string(21) "sourcefile,ending_pdf" [1]=> string(43) "generated_pdf_preview,ending_reviewpdf" [2]=> string(37) "generated_jpeg_preview_000,ending_jpg" [3]=> string(37) "generated_jpeg_preview_001,ending_jpg" [4]=> st...

0
Q: Block submitting the order without filled all inputs?

user3019672is there a way how can I warn the user when he clicks the submit button (which has its action PHP in different file) that he didn't fill all inputs (instead of submitting empty field) and make him stay on that page and correct it (althought the action php is in different file)? Thank you

0
Q: Nusoap change returnname

Corné GuijtI'd like to change the tag that is currently 'return' to 'result'. Like this: <?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2...

1
Q: Unable to run php script using cron

Somesh MukherjeeI am running a php script using cron. The name of the file is : PriceChecker.php . This is my cron script # m h dom mon dow command 0 07,11,16,20 * * * php /var/www/mainsite/PriceChecker.php * * * * * /var/www/mainsite/pricecheck.sh The shell script is: #!/bin/bash php PriceChecker.php >l...

-5
Q: PHP Promotion Code

user3040823Please take a look at the code below and please tell me how would this work. Actually I hard coded the promocode to "xmas" because anyone can make use of that if they type it correctly. How can I add an equation to calculate the 20%off that I give if a user inputs the correct promocode below ??(i...

0
Q: Row won't update in database

Mackan90095I'm making a community site thing. I'm currently making the option to change your password. But, when I try to use it, it won't work.. Why is this? How do I fix it? My code: Settings.php (Where I change the pass) PHP: <?php error_reporting(E_ALL); include_once('includes/connection.php'); i...

0
Q: PHP mysql_fetch_array return first member

xtmtrxI have the following code: $url = @mysql_fetch_array(mysql_query("SELECT url FROM dl LIMIT 1")); $url = $url[0]; but I would rather use it as: $url = @mysql_fetch_array(mysql_query("SELECT url FROM dl LIMIT 1"))[0]; why do I get error for the second one because seems right syntax to me? Or ...

1
Q: PHP: Global var not being picked up inside a function

user1775598This is blowing my mind... I've got a standalone PHP file, and a simple function with a global var. <?php $var = 4; function echoVar() { echo $var; } echoVar(); ?> When I call echoVar() nothing is returned... However if I place the $var inside the function it wi...

0
Q: Overriding undefined indexes in Wordpress widget $instance

Valery  StatichnyI created a class which extends WP-Widget class. In widget() method I'm trying to make check for all $instnce indexes to fix all 'Undefined index' notices. All my widgets extends this WP-Widget's child class. Here is code snippet: private function check_instance($instance){ if(!isset($i...

0
Q: Symfony 2: Keep form data across redirect

SoongIn a Symfony 2 application, I am trying to implement a form with a search box and some additional filters (choice widget). The search box looks for a record in the DB and then displays details about that record. The filters are used to display or hide certain types of details. This works if no o...

-1
Q: how to solve mysql_connect() [function.mysql-connect]: Access denied?

fereshteh please help,I have been working on it from morning,but every time a new error pops out. I have made a php file as u see in picture,and upload it to my host,in my host I have a mysql database,and I want to check use and pass entered in textboxes and if it exists would give a hint. but as u see i...

0
Q: PHP - Calculating working hours between two dates but exclude the time when request is on hold

TahirCan some one help me write a function that calculates the number of working hours between two dates but want to exclude the time when the request had a status of "On Hold". So lets say the request came in at 3PM friday and was closed at 3PM Wednesday, and working hours are from 8AM to 5PM pacif...

0
Q: imagestring($im, 50, 300, 150,$label, $tc); function does not work?

user3021251I tried the below code imagestring($im, 50, 300, 150,$label, $tc); here instead of $label if i put any string like "abc" then it works properly but if i want to pass this string dynamically like $label, it doesn't works. how to solve this?

0
Q: Applying CSS3 to PHP DOMDocument

Hathorso I'm trying to apply CSS to a DOMDocument created through PHP. However, even when I use jQuery to apply the styles, it doesn't work. So here's an example I have: <div id="content"> <p class="intro">Below are some of the YouTube videos I've made. <br />Feel free to take a look!</p> <div id=...

0
Q: How to store php+html script into one variable and insert those variable into mysql database is it possible?

user3049432I have a doubt on How to store php+html script into one variable and insert those variable into mysql database is it possible? I dont know is this possible or not My requirement is like this <?php $str=<<<abc $sql=mysql_query("select * from links where column='value'"); $sq1=mysql_fetch_row($s...

0
Q: In Ajax How to pass country name in html page to php page?

guru How to pass country name in html page to php page using ajax. demo.php <html> <head> <title>Dynamic Form</title> <script src="http://code.jquery.com/jquery-1.10.1.min.js" ></script> <script> $(document).ready(function(){ $("form").on('submit',function(event){ event.preventDefault();...

0
Q: apostrophe mark is sent with Backslash in javascript string which is being sent to php page using ajax as part of json object

sunnyapostrophe mark is sent with Backslash in JavaScript string which is being sent to php page using ajax as part of json object var qry="SELECT invpurchaseitme.Code, invpurchaseitme.Description, invunits.Description, invpurchaseitme.StoreGroup FROM invpurchaseitme LEFT JOIN invunits...

0
Q: PHPUnit Database - no such table

Ran Bar-ZikI am trying to run very simple PHPUnit testing class with Database simulation. I am trying to create dataset with some values. I am using MySQL XML object. My MySQL XML Object is: <?xml version="1.0"?> <mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <database name="som...

0
Q: How to set cookies when using modx?

Jonathan ThurftI am trying to set a cookie with the following code from an external script but for some reason When I try to read the cookie from Javascript or php it never shows the information that I inserted, it only shows the Modx cookie information. What am I missing? $modx = new modX(); $modx->initialize...

0
Q: How to include first 5 table rows from MYSQL in PHP

user3049504I dont know if what i want is possible but i ask it anyway :) I want to make a "news" container on my website. so if i add a new article than the oldest article must disappear. i thought, maybe it is possible to include only the first 5 rows of the database. And if that can be done then i have to...

1
Q: $_POST doesn't work when data pushed via jQuery AJAX, but $_REQUEST does. Why?

lolikrolijQuery AJAX script: $.ajax({ type: 'post', url: 'mail.php', data: $('form').serialize(), success: function () { alert('form was submitted'); } }); PHP script: <?php if ( isset($_POST['email']) && isset($_POST['name']) && isset($_POST['text']) && filter_var($_...

0
Q: How to add path to javascript file (not twig file)?

pregmatchI have app.js file and in it bunch of javascript code. Among other thing I want be ablt to add path. var ul = " {{ path('chat_get_fnln', {'email':'%s'}) | url_decode | format('"+jid+"') | raw }}"; I need this in app.js not some twig file. 1) Is it such a thing even possible? 2) If yes please ...

0
Q: Get multiple PHP arrays within Ajax and create DIV tags

airflowI'm returning multiple entries from the database and putting them into an array; however in the second part which involves parsing them using ajax and loops I'm unsuccessful. PHP array: $historyl = array(); while($h=mysql_fetch_assoc($sql)){ $historyl[] = $h; } foreach ($historyl as $his){ ...

0
Q: Registry Pattern

Adil AbbasiI have to work on a legacy project, I have to deal with multiple databases it was done so and I am restricted to continue it in the same way. I have done some searching and after reading about registry pattern implemented it. I am very confident on it but this is just proof of concept not sure it...

0
Q: xDebug remote_connect_back not working for AWS EC2 instance

Manmohan BishnoiThe EC2 instance (with Ubuntu 12.04) has setup of Apache 2.4.6 and Php 5.5.6 + xDebug 2.2.2. Apache and PHP were built using make. Everything is working fine, except for xDebug. Contents of log file and php.ini php.ini zend_extension="/opt/php/lib/php/extensions/no-debug-zts-20121212/xdebu...

0
Q: codeigniter tpl {if} {else} documentation

Jean-philippe EmondI'm trying to modify an application with codeigniter.. but the if else loop etc.. is not the default if else ex.: {if isset($form1)} {/if} {foreach $data_ as $row} {/foreach} {cycle value="odd,event"} where I can find a tutorial to learn this php particularity in template? thanks!

0
Q: jxg() and php search

unalI would like to add product urunara in php with jxg .. but it does not get it working. help pls function ara(bolge) { JXG('1', bolge, 'urunekle.php?urunara=<? echo $urunara; ?>') } <input type="text" name="urunara" value=""> <a name="" href="javascript:ara('bolge')">Add product</a> <...

0
Q: PHP Contact Form message length

BoneStarrSo I have a contact form which is working fine but I need to amend it to remove the message field so that the form is just name, email and submit. But because the php code I am using checks for Message length of 5 this doesn't seem to be working, this is the original php code: <?php header('Ca...

0
Q: How to create and display XML through Javascript/PHP/

PHPnoobletI have some javascript objects that represent the XML that i want to create. I need a simple way to create/ generate XML, and then somehow hand it over/ show it to the user in a clean way (structurized, like in the screenshot example). I've been experimenting and researching but haven't yet foud...

0
Q: Symfony2\Doctrine - Retrieving User Roles

spacebeanI'm trying to set up my User entity to use roles, and following the documentation at http://symfony.com/doc/current/cookbook/security/entity_provider.html Users work fine, and if I hardcode the $roles value everything works as expected, log in/out is good, etc. But, if I try and retrieve the rol...

0
Q: The Submit Button doesn't work in Chrome or Firefox, but Works in Internet Explorer

user3049560I had a situation where the Submit Button would not work if you clicked on it in Firefox and Chrome, but it worked as it should in Internet Explorer. Even odder, I found that I could "tab" to the button and hit enter and it would work. This was a portion of the form code: <form id="product_form...

0
Q: Laravel 4 duplicate database entry

elodevI have two models one for user and the other for license. If the user is of usertype dentist or dental hygienist then they will need to input their license information. In my user model I have a rule that says one license belongs to one user. In my license model I have a rule that says the licens...

1
Q: Laravel module autoload policy confusion

trerumsWhen executing php artisan workbench user/asset additional dependency(module) placed to workbench/user/asset/vendor/illuminate/support. Then framework autoload this module(illuminate/support) from workbench/user/asset/vendor/*, but i think it must load it from /vendor/laravel/frame...

0
Q: Text position is not coming in footer left

phpcoderPlease check my code - <?php function watermarkImage ($SourceFile, $WaterMarkText, $DestinationFile) { list($width, $height) = getimagesize($SourceFile); $image_p = imagecreatetruecolor($width, $height); $image = imagecreatefromjpeg($SourceFile); imagecopyresampled($image_p, $image,...

 
00:00 - 14:0014:00 - 00:00

« first day (283 days earlier)      last day (27 days later) »