« first day (296 days earlier)      last day (14 days later) » 

12:00 AM
0
Q: General error: 1005 when creating a key constraint - Laravel

joshuahornby10When trying to add a foreign key constraint in Laravel I am getting the following error. [PDOException] SQLSTATE[HY000]: General error: 1005 Can't create table 'ts.#sql-5769_62' (errno: 150) I have 2 tables, users ...

0
Q: How come my inline js function isn't being detected (Wordpress)?

user2476814I'm trying to create a simple slideshow using javascript. I made a function called changeSlide() but it's undefined despite it being right there in the source code. The link to the test site is here: http://test.hellocp.net/ministry/ Also, this is a wordpress site; so I'm inserting the javascr...

1
Q: How to display "No results" on search using PHP and MySQL?

Staunton AllenI would like when users run a search, it will search my DB. If it finds it, it outputs the table exactly the way I want. If there is no result, it just returns a blank page. How would I go about making it so that if no results are found, it displays something like "Sorry, no results." or somethin...

0
Q: How to prevent css loaded with query being applied to whole page?

Peter CullenI am loading content from an external php file and inserting it into a using query's $.get functionality. The included file contains various css classes. For example, to style hyperlinks. When the file is loaded and the content inserted by jquery, the css styles are not only applied to the new c...

0
Q: Doctrine 2: searching similar, yet different column data from two different entities in one query

blacktie24Let's say I am making a library catalog system, and I have two entities, Books and Videos. And in my app, they won't extend from a mapped superclass, because while they are similar, they're still different enough. Books have one or many authors, a title, and a published date. Videos have one o...

0
Q: Fatal Error Globally with Slim PHP Requests

George YatesI'm experiencing a problem with all the requests in my app. The below error is returned in about 20% of requests, no matter a specific request, it seems to be indiscriminate in frequency based on the request. This problem started appearing when I decided to run the app locally on my new computer,...

 
12:30 AM
0
Q: Broken SilverStripe Template

Chibang DayananFor some reason, after doing a ?flush=all, a certain page type is not able to locate it's default template. I figure out that it's not loading it's template file after appending showtemplate=1 to the URL. The dumped raw template shows nothing for the default template. Pastebin: http://pastebin.c...

0
Q: How can i turn these into groups of 4 instep of 2?

Lesly BrezilienSo this is my code it takes a list o people from the database and lists them with their partners in groups. Within these groups, the user id of the people cannot appear in the same row twice. Everything works, Im just wondering how to make it echo 4 people per group versus only 2. if ($result = ...

0
Q: jquery doesn't get PHP variable value from DIV data-id, just outputs variable name.

TomI have: <div class= "obutton feature2" data-id=".$bookID."><button>Reserve Book</button></div> <div class="modal-box"></div> While is the button that calls the jquery, however the modal box it makes just outputs ".$bookID." and not the actually value within. The jquery script is: <script> ...

0
Q: Prepare MYSQL Query String into php array

menardmamI have 21 different table to make... and some insert and everything associated to mysql query... so what i like to do is make an array like that $my_prepare_sql[table1][create] = "CREATE TABLE table1 ( NO_INSCRIPTION TEXT NOT NULL, NO_ADDENDA INTEGER NOT NULL, CODE_LANGUE TEXT, ORDRE_AFFICHAGE...

0
Q: Using an included file breaking PHPExcel output

GideonI use a file to build an array from a database, and I want to write to an excel sheet based on this array. As such I include the file in the following code (the code below is a complete copy paste of the code used to read from an excel template, edit the data, and write the file and prompt a d...

0
Q: Use PHP to create new pages?

Staunton AllenI have an equipment database. There are 972 different items in that database. Including an image url, asset number, title, description, shipping weight, etc. I have a php script that creates a table for each item. However, I don't want all 972 items to load on one page. Is there a way to use PHP ...

0
Q: Login script not redirecting, Receiving blank page.

JSINGHI have tested my login by using the following script on my index.php file, <?php if (isset($_SESSION['user_id'])) { echo 'logged in'; } else { echo 'Not Logged In'; } ?> So at first the page displays, 'not logged in' but when email and password is entered correctly th...

0
Q: How to get terms within sql table

DerekI am trying to run some custom reports with Woocommerce which I have working perfectly. Currently the reports will show you the results for all orders marked as "completed" but I am wondering how do I modify my code below to pull results from not just completed, but all order types like "complet...

-2
Q: How to echo random line from text file?

Lulzsec Owneri need to echo random lines from a text file like so textfile.txt line 1 line 2 line 3 line 4 line 5 line 6 index.php line 4 im not great at php so any help would be greatly appreciated

0
Q: exec shutdown command not working on IIS 7

RyanSo my environment is Windows server 2008 R2 with php 5.3 and 5.5 installed. I have set fastcgi.impersonate =1 in php.ini, and added the IIS_IUSRS to the Administrator group (that is not permanent, it was just a temporary action to try and eliminate problems). If I run: exec('dir',$output) $o...

0
Q: Update an input field from a dropwdown menu populated by a database

Andi R. MilhommeI have a graphing calculator I am working on. I want to user to save any valid equation they write. They can choose from the saved equation by selecting a drop down menu. The problem I have is that when I click on any equation in the dropdown menu, the input box is not updated. Is there a way I c...

0
Q: How to display a specific element of an array in PHP

fakeguybrushthreepwoodI am using the MtGOX API v2 example PHP code to find the current price for Bitcoin. My code excerpt looks something like this: <?php $result = $mtGoxClient->getTicker(); ?> <pre> <?php print_r($result);?> </pre> I get the following outputted: Array ( [result] => success [data] =>...

0
Q: The correct way to direct domain URL to Codeigniter controller

user998066I wanted to find out what is the correct way to direct my domain URL to my Codeigniter index controller. So for example my domain name is www.example.com and my CI index controller is at www.example.com/code1/index.php/index. Should I use .htaccess rewrite rules to redirect or Codeigniter url m...

0
Q: Php mailer will not send if I try to parse datastring

Kevin JohnsonAs stated I can get it to send by using a simple form on the page and by sending an empty datastring by clicking no textboxes in my form but when i try to send it via ajax with any datastring no email nor any error appear in the console function submitForm(){ var email=prompt("Please enter y...

-3
Q: PHP HTML Source Stealer and Search Code

user3025631I am making a project and want the site to gets another websites source code and search for a key work and prints out that line. Also is how can a send a post request to a website with php please help.

0
Q: Codeigniter - Text helper to use in storing japanese characters in the database

mmrI have a form where a text should be converted to japanese characters, I am manually converting the text into japanese and stores it in the database. However, characters are not translated as it should be? My question is what text helper should i use to store japanese characters in the database a...

0
Q: Not able to get cookies by key when key is a variable?

DuckI am using a very poor but unique encryption method for encrypting usernames on my website and every time I go to get the username from the cookie it didn't work, so I tried to echo it out and started getting an error. Setting cookie: setcookie(encrypt("username", $salt), encrypt("null", $salt)...

0
Q: Weird PHP behavior, possible explanation?

raugferThis seems like a PHP runtime bug, but I hope I am wrong. I have a code structurally similar to the one below: class A { public static function f($c) { $c->m(); return $c; } } class B { public function g($c) { $ret=A::f($c); if($ret===false) { echo "Should n...

0
Q: Is there an equivalent to Microsoft SQL's isnull() function in PHP?

ElvisLikeBearIn tSQL there's a great little function called isnull(), which takes the following: ISNULL ( check_expression , replacement_value ) I know about is_null() in PHP, but it's no the same. Is there another function I'm missing? I can see it being useful in cases like this one (assume the isnull()...

0
Q: Subfolders Deny From All in Root .htaccess

Denver WilliamFrom my main .htaccess file, I would like to deny access to all subdirectories within this folder. I know that apache has a hierarchy, so let me first start by saying I know that I could put deny from all in a .htaccess file in every single folder below. However, the folders will be dynamically c...

0
Q: echo json_encode() not working via ajax call

leonardeveloperI really don't know what i'm missing here. I have this script: <script type="text/javascript"> function ServiceOffer(){ var service_name = $('#service_name').val(), dataString = "service=" + service_name; $.ajax({ ...

-1
Q: PHP regex preg_match_all() between [[ and ]]

user702300I would like to use preg_match_all() to extract the content between [[ and ]], but ignoring [[[ and ]]], so for example this text: $text = <<<TEXT Some text going here [[ 1. this is a text ]] another text but multiple lines [[ 2. this is a text ]] This should be ignored, haveing 3 on the l...

-2
Q: Changing Dropdown form on my Navigation bar when user is logged in

JSINGH![Navigation Drop down form][1] [1]: http://i.stack.imgur.com/6lj0k.png When the user is logged In, I want to change the drop down form to a list (li) with profile, account details, logout. So then the user has access to change their profile information. My HTML is all on each file and I h...

0
Q: Unsetting values of multidimensional array while looping through it

WojtazzzProducts in my online shop come in 3 sizes - S, M and L. I keep customer's order data in $_SESSION['input'], like so: $_SESSION['input']['14']['s']=5 // This means the customer ordered 5x product of id 14 and in size S. After accepting input from the customer, there are usually multiple x n...

0
Q: Make code more memory efficient, or shorter

vephelp//rename files if(!empty($_FILES[$desktop_fieldname_1280x800]['name'])){ file_exists($desktop_filename_1280x800 = mb_strtolower($desktop_dir_1280x800 . 'wall_desktop_1280x800_' . $_FILES[$desktop_fieldname_1280x800]['name'])); } if(!empty...

0
Q: show login form upon loading page

Jivers LeumanI'm currently making a single page app using PHP, Javascript, jQuery and AJAX. I'm very new to Javascript and also the same for jQuery and AJAX. Currently, I have this code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <

0
Q: jQuery / jQuery UI draggable - Get items dynamically from WordPress backend

iammikerodriguezI'm working on a font-end drag and drop interface for matching questions with answers. I'm using WordPress and custom fields(ACF) to place the data on the backend. I have two arrays. One for Questions and One for Answers. The way they're matched is my the 'Number' key. I'm able to loop through t...

0
Q: Prevent PHP from parsing non-PHP files such as someFile.php.txt

user1032531I just installed phpdocumentor, but received strange errors. I finally tracked down the problem. Phpdocumentor creates various files such as someFile.php.txt which contains PHP code, but aren't meant to be parsed. Turns out, my server is parsing them. I've also tested a file name called someF...

0
Q: cURL command line login (bash)

user2318029I have a bash script on a cronjob. do curl -d "test=working" https:/mysite.com/test echo "done" done Right now, it just makes a post request on my site. But now I want to make a post request in a members only area 2 times So how can I login keep the session, and post 2 times? I can't test ...

0
Q: URL Rewrite and Grab from Database (permalink?)

Augie GardnerI'm trying to figure out how best to pass data with an unknown number of hyphens or spaces, from a "clean" url to the page that it is rewritten to. I have a user-generated database of publications with title, author, tag, associated with each publication. Users add a new publication with a titl...

0
Q: Best Practices and how to find get POST data from iOS AFNetworking in Symfony2 and return JSON in GET?

PauloI am building a mobile app (iOS) and Symfony2 REST backend. On Symfony2, my routes are working correctly and I have tested them with AJAX and httpie, all CRUD operations, etc are fine. Now, I am trying to access the routes from the app. So far, I can access the routes and when I look into the Sym...

0
Q: Pagination display error in data using PHP while navigating to different pages

JerielleI am not good in debugging javascripts/jquery code that's why I can't figure what's happening in my code. I created a pagination of maps using Google Map API. In my pagination table there are restaurants information together with their location. When navigating to different page, the map doesn't...

0
Q: Trying to print average grade using mysql and php

user3062910Im trying to print out the average grade from letter grades from one of my coloumns in my table. It work for the first two inputs but after that when I keep adding the average is no longer true, I'm not sure what is going on. *I relize this isnt the cleanest code $totalGrade =0; $result = ...

0
Q: Form with DataTime Field split into two fields

Stefan BergfeldI want to split a DateTime field into two fields (date and time) using Symfony 2.3. Therefore I tried to adapt the Symfony 2.0 solution found here http://stackoverflow.com/a/13691338/1526162 and made the necessary changes for Symfony 2.3. the new type: class MyDateTimeType extends AbstractType ...

0
Q: PHP syntax error: Unexpected ']'

Phoenix LoganI'm running PHP on a Windows 8.1 server with IIS. I have a PHP script, and have managed to turn displaying errors on. I found an error on this line. $hr06status = mysqli_fetch_array(mysqli_query($connection, "SELECT status FROM hours WHERE hour = 6"))['status']; The exact error is on line 14 Pa...

0
Q: php-fpm error on EC2 : the process manager is missing (static, dynamic or ondemand)

user2293111I am trying to install nginx on Amazon EC2. The nginx part is running fine. But I am getting problem with php-fpm. When I run service php-fpm start I got error: php-fpm on EC2 Error : the process manager is missing (static, dynamic or ondemand). I was following this tutorial: http://codingsteps.c...

0
Q: Create cspkg and cscfg from Linux Windows Azure SDK for a PHP Project

Mario GiancolaI'm a PHP Developer and i need to deploy my new project to a Windows Azure Cloud. I develop on linux and after searching on the internet i couldn't find a solution for my problem: I need to create cspkg and cscfg files to upload configurations and packages for my app. How can i do it ? Is there...

0
Q: Get information from multiple tables in one php call

user2948950I have 3 database tables that I need information from. The information I need is indented. --products --product_image --order_options --option_value --order_products --product_id Right now I have the following code $db->query("SELECT * FROM products WHERE product_id= $product_id...

0
Q: How to use one form for both INSERT and UPDATE in php

meztliHi I am wondering how to use one form for both insert and update, I have tried using ON DUPLICATE KEY UPDATE but didn't work with my code. Here is what I have: read.php ?php include('Crud_class.php'); ?> <html> <head> <title>Read Data</title> </head> <body> <?php $obj=new Crud("localhost","r...

0
Q: Wordpress - show number of comments for each post in widget

user2143561I have installed a plugin that lets me put a PHP code into the widget - basically, what I want to do is to create a "recent posts" area, where you can see a cover of the post (featured image's thumbnail), title and number of comments for them. So far I managed to create a code that works - minu...

0
Q: how can I echo for woocommerce callback with xml data without html tag?

handicopBased on this doc: http://docs.woothemes.com/document/wc_api-the-woocommerce-api-callback/ I made WooCommerce Callback method in order to echo xml data. within the call back function, I started with header setting. header('Content-Type: text/xml'); $xml .= "<?xml version=\"1.0\" encoding=\"u...

0
Q: Hi, jquery setTimeout ajax recursive function throwing error after short while in instant messaging program

user3093574like the title says, I'm writing an instant messaging program using jquery, ajax, mysql and php. Currently, I have a database with a table "switchboard" that contains the fields mid*, from, to, message, timestamp, read I have a function that uses setTimeout to recursively check every 1 to 3 se...

1
Q: I seem to be missing something... PHP Variable of Variable Foreach

AkelCurrently I have a few loops that produce options for different sections in wordpress. Creates a section in the theme options for each published page. The options include an area to set a background for each section. Create each option section? - Check Create an ID for each section based on...

 
2:13 AM
0
Q: What am I doing wrong trying to set the security header on soap request

g_moneyMy request keeps throwing a validation exception. Can anyone tell what I'm doing wrong. Here's what I would like the header to look like: <SOAP-ENV:Header> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:UsernameToken>

1
Q: Replace <script src="url"> with <script>contents</script>

c0nfus3d1I'm using simple_html_dom [ http://sourceforge.net/projects/simplehtmldom/ ] to parse through HTML. I'm trying to get all of the <script> urls, grab the contents, and then replace it in the $html variable... I have this and it almost works like I want: $html_elements = str_get_html( $html ); $c...

0
Q: Why can't Soap connect to HTTPS?

dnelsonI am trying to connect to a HTTPS location. Currently I get Could not connect to host error. I am testing on two Ubuntu servers. This error occurs on one Ubuntu server which is off site. The other server which is on a development server on site works fine. I searched the server files and have yet...

0
Q: Multi select in form?

user3084297I am trying to auto populate two drop down fields in form with two rows of same table. Getting confused on JavaScript <tr> <td width="100" valign="top" style="margin-top:0px"><label>Card</label></td> <td><select name="cardid" > <option value="">Select</option> <option value="1000">1000</option

0
Q: Mercury/32 Mailer error when sending using outlook express using php

user3088818I am trying to use the mail function in Mercury that is listed in the services of XAMPP. I have done everything in the tutorial that I've seen over the net because it has good comments but i get this errors when sending email and when i run the script that will send email to the root@localhost.co...

1
Q: Join 3 database tables together in PHP

user2948950I have 3 database tables that I need information from. The information I need is indented. --products --product_image --order_options --option_value --order_products --product_id Right now I have the following code foreach ($db->query("SELECT * FROM products WHERE product_id= $p...

0
Q: XHR sends empty POST

user3093555I tried to implement this script. Everything in the javascript console works xhr.upload progress: 147456 / 263222 = 56% xhr.upload progress: 163840 / 263222 = 62.2% xhr.upload progress: 196608 / 263222 = 74.6% xhr.upload progress: 263222 / 263222 = 100% ["xhr upload complete", XMLHttpRequestPro...

0
Q: PHP, Get values from (Multi) Multidimensional Array

Elijah PaulI have a multi dimensional array from which I'm trying to pull values from using foreach. It's retrieved via an API so I can't control it's formatting (I don't think). The array contains pricing information for various products. The problem I'm struggling with is that it contains nested arrays...

0
Q: PHP Command in script has different results than shell

yakatzI have the following lines in a BASH script: ACTIONS_COMMAND="php -f $BASEDIR/scripts/activities.php < \"$SRC_DIR/%s/AndroidManifest.xml\"" printf -v ACTIONS_CMD "$ACTIONS_COMMAND" $FOLDER $ACTIONS_CMD This runs inside a loop to do the same operation to several Android applications. When I e...

1
Q: If else statement based on select value to upload to different folder using jquery

Melissa BoyleI am trying to implement a JQUERY plugin which allows me to upload images to a the specified folder, however I want to base this on a select box, for example if select value "one" is selected the image will upload to folder one. I have tried to use both a switch statement and an IF statement to g...

0
Q: Using php, Json and Ajax to add data to a li

user3080734Hi am a new to jquery and json and I am trying to add data using php, json and ajax to display the data. my php is working file and I have it displaying the following json: { "BCode": "B00123456", "First Name": "sarah", "Last Name": "jane", "E-mail": "sj@whateve.c...

0
Q: How to delete mysql data from table at midnight?

user3084715I have a mysql table and I want it to be "emptied" every night at midnight. I have searched for an answer on the web and came across nothing that seemed to help me. I had this idea of using javascript to get the current time and then run an if statement and see if it is equal to midnight and if i...

0
Q: Small Spreadsheet-like language interpreter for web application

artyI am building a web app which will allow users to create small "spreadsheets" with their data. This is a time keeping application and I am building the reporting tool. I am looking for a way to for different groups to have different reports without having to hard code in the algorithms. I would...

0
Q: Modify this Code to Retrieve Mentions or Hashtags

rarYesterday, I posted about Search for Mentions of a Topic with the Twitter API. I asked about what URL to use, since I thought I was doing it wrong. As it turns out, my initial guess on which URL to use was correct (as it should have been, since I used Twitter Dev Console to get the URL. The prob...

0
Q: Is it possible to post HTML code using Ajax?

user3047744I'm making HTML, PHP and Ajax based site for my university class and having some problems that I can't figure out. Can I post my HTML based Registration Form using Ajax post method to my main PHP site? My code looks like this: index.php <form id="loginForm" action="login.php" method="POST"> Use...

0
Q: How can a web page only work sometimes?

user2990569This page (http://koreanhorizons.com/sub03.php) once submitted sometimes works - most times does not work. Therefore, I have to assume there's nothing wrong with the page - otherwise it will always happen. I have paid for a web designer to find & fix the problem - but it's still the same proble...

0
Q: SQL Inner Join for News Feed

user3093592I am having some trouble with the Inner Join aspect of a statement. I am trying to get all the "posts" from a users friends list on their news feed. I'm trying to do so by getting all those posts where the user is the initiator_user_id and get all the posts from the friend_user_id then I want t...

0
Q: Wordpress Advanced Custom Fields not showing for new members in site

Vinnie SalettoSo, I'm neck deep in a site with a javascript game that I've taken over that is surprisingly built on Wordpress. I'm using the "Facebook all" plugin to acquire new members to this site, and "Advanced Custom Fields" (http://www.advancedcustomfields.com/) to keep track of the custom fields for the...

0
Q: Why so much drama about count()?

thelolcatYou know, stuff like "God kills kittens when you use count() in loops" etc. What's wrong in counting arrays in loops if the array is not huge ? (huge arrays are very rare) The impact on the performance is probably measured in milliseconds. So why should I use an extra variable then?

0
Q: method $_POST in a variable on php don't want to show the content

user1974277 Hello! Im working with PHP and I have a problem using POST I have this on my php <?php $server = $_SERVER['REMOTE_ADDR']; $date = date("Y-m-d"); $time = date("H:i:s"); $header = apache_request_headers(); $xwap= $header['x-wap-msisdn']; $servidor = $_POST[$server]; echo $servidor; ?> but...

-1
Q: PHP Phasing HTML Code

user3025631Ok I need help Phasing HTML code I want to filter it so it searches for a string from the page and make the result be able to echo it. I looked at preg_match_all but gives it a as an array and does not search for a specific string it looks for patterns. Please help thank you. Example: $pattern =...

0
Q: PHP scripts very slow on dedicated server

lost17I recently changed from a shared web hosting service to a dedicated server because the scripts (parsing huge files) I was running were too resourceful. So I am new at managing and configuring a server. I tried to run the very same scripts on my dedicated server but the execution time is worse: 3...

0
Q: wordpress - Error 403 file javascript plugin wordpress

hendrathingsI have problem in my wordpress plugin, website have plugin and in the plugin not load javascript, its say 403 forbidden when I go to link plugin here. it's strange, because the file is exist. how can i solve this?

0
Q: Getting the value from json using php

user3093670I have these json codes return from GetResponse API. array(1) { ["uze3e"]=> object(stdClass)#4 (8) { ["ip"]=> string(14) "224.233.12" ["name"]=> string(7) "TestSubscriber" ["origin"]=> string(3) "api" ["cycle_day"]=> NULL ["email"]=> string(24) "test9...

0
Q: Wordpress shortcode to display post date +1 day

user3093658I'm trying to create a shortcode that will display the post date +1 day. Example: if the post was published on the 3rd I want a shortcode that will display 4th. I've tried the following but not getting the results I want. // [nextday] function displaydate_next(){ return the_time('jS', ...

-1
Q: How to Create PHP Bar Chart with MYSQL

user3093628I created this table and added these values in them: create table sales ( id int auto_increment not null primary key, category varchar(200) not null, product varchar(200) not null, quantity int not null ); insert into sales (category,product,quantity) values ('Electronics','TVs',10); insert i...

0
Q: Where should I put PHP code for a HTML form?

BanjerrI can't seem to find an answer to this particular question, so I apologize if it's already been answered and I have yet to see it. I have a HTML form that takes visitors name, e-mail, and a message; styled with CSS of course. I have the PHP code prepared, but I'm not exactly sure where to place...

0
Q: Fetch Instagram Images based on specific criteria using PHP?

user2984757So I was referred by another user to look at this page: parseError in php search instagram pictures It seems like ajax.js is grabbing the keywords used in the search form by calling out the 's' id and 'sfield' class. It also seems like it will dump photos it finds into the 'photos' id container...

0
Q: Create an array and calc

user3093666i'm from France i hope you'll understand me, i spent one year in usa, anyway... Ok, i have a form, i received that from this form : cmdId[] 25 cmdId[] 26 cmdId[] 27 cmdId[] 28 cmdId[] 29 cmdId[] 30 cmdId[] 31 cmdId[] 32 cmdId[] 33 cmdPrice[] 3.05 cmdPrice[] 3.46 cmdPrice[] 3.46 cmdPrice[] 5...

0
Q: echo variable to next page and update mysql table with variable value?

user3080996i have a message system on my site. Users messages are listed in their inbox folder on a page called inbox.php and once clicked a link takes them to the 'read_message.php' page, this is done using a link which echo's the unique message id. what i am trying to do is design a mysql query which wil...

0
Q: PHP - cannot connect to postgreSQL

Aaron KreiderI have a postgreSQL and postGIS database. I want to connect with PHP. I try to use: $sConn_string = "host=localhost port=5432 user=postgres password=test "; But it says: Unable to connect to PostgreSQL server: could not connect to server: Connection refused (0x0000274D/10061) Is the ser...

0
Q: How can I make a form continue on the next page?

user2779572I am developing a website that has a quiz/test on it and I want to be able to to make it so there is different parts of the quiz so when the user selects next part it will bring up the next set of questions. I don't care if it brings them to a new page or just loads new data to the existing page....

0
Q: php code not sending email

user554134I have a simple website with a contact form which sends out an email after the user fills out and clicks on submit, however this doesn't seem to be working, Unfortunately I don't have access to the mail server itself as it is hosted, How do I debug this? <?php require_once "Mail.php"; $from...

0
Q: PHP file_get_contents skipping characters

user3093705I have been attempting to parse a file. In Notepad++ it doesn't show a character between these two characters, it shows EOT: Notepad Text But, php doesn't see that: PHP Text Is there a reason PHP is not seeing this character? How do I get it to see said character and turn it into a line break? ...

0
Q: Export query from user input to excel - only HTML parts are visible

user3059984I'm new to php and I'm still learning things. What I'm trying to so here is to let the user input DATEFROM and DATETO. Then when the user click the button extract to excel file, the query will be executed where it will select all columns from the table where BETWEEN DATEFROM and DATETO. At the sa...

0
Q: Why are my two different questions returning the same thing?

ianI have two queries that should return the next and previous rows in my DB relative to the current row. However they both return the same thing, the next row, and for some reason the 2nd query also returns an empty data set. Code: <?php // Credentials $dbhost = "localhost"; $dbname...

0
Q: Unable to connect to SMTP server. in CakePHP

me_anI got this error in cakephp using the smtp mail function [message:protected] => Unable to connect to SMTP server. Verified that the smtp configuration is correct because I was able to send an email using phpmail ... $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subjec...

0
Q: php Fatal error: Call to a member function

user3067037My code is : <?php require('soap_config.php'); $client = new SoapClient(null, array('location' => $soap_location, 'uri' => $soap_uri, 'trace' => 1, 'exceptions' => 1)); try { ...

0
Q: php, this array works in global but failed while putting inside class

Jignesh VyasI have following array, this works fine If i put in global and access the php with CLI but it gives following error while putting this same array in class. 'printer_1' => array( 't_char_set' => 'ch-latin-2', 'find' => array('Ä', 'Ö', 'Ü', 'ä', ...

 
3:36 AM
0
Q: XPath Deep Copy in PHP Only Copies the First Two HTML Elements

GreesoI am using XPath in PHP to perfor a deep copy; however, only the first two elements are copied. This is best explained by an example. Assume my srouce HTML is the following: <html> <head> </head> <body> <div id="first"> <a href="some_link_address.com">Hello</a> ...

-2
Q: why this warning came ::::::mysql_connect(): php_network_getaddresses: getaddrinfo failed: No such host is known

user3093752mysql_connect("lacalhost","root",""); mysql_select_db("test"); Warning: mysql_connect(): php_network_getaddresses: getaddrinfo failed: No such host is known.

0
Q: create a suggestion board

ShazUSER (userid, email, firstname, lastname, password, profilepic, sex, country, updatetime) PHOTO (photoid, title, description, path, source) BOARD (boardid, userid, boardname, category, permission) userid references user PIN (pinid, boardid, photoid, tag, pintime) photoid references photo board...

0
Q: How to select a specific value plus extra random values in a query?

Aaron PI am pretty new to this but I am trying to make a quiz of 5 multiple choice questions. each question has 4 choices. I have the questions and their respective answer in a database. I am trying to randomize the questions and answers so each time a user takes the quiz it will show different questio...

-1
Q: PHP validation not working insert query?

user3060132Validation is dine.now i am confused that where to write insert query in this code $user=$_POST['t1']; $pass=md5($_POST['t2']); $confirm=md5($_POST['t3']); $email=$_POST['t4']; if($pass == $confirm && !preg_match("/^[a-zA-Z ]*$/",$email)){ $query="select* from registor where username like...

0
Q: Url controller action not overwriting

DefyleitiSo okay here's my problem. How do you make the url reset so that each execution of an action will make url overwrite. I'm using kohana 3.3. Here's a sample scenario. Base url: localhost/kohana_app/ Registration Form <form action="user/create" method="POST"> <input type="text" name="email" />...

0
Q: PHP class setOptions function

user2880273I want to be able to have a function like cURL's setopt function. Does anyone know how that is done? Something like: $myClass->setOption(PAGESIZE, 30);

0
Q: Highcharts Gauge not appearing

Ds.109I have got the charts working before, however now they don't want to appear. I am trying to use the Gauge. This is what's in the header: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> <script src="http://code.highcharts.com/highcharts.js"></script> <sc...

0
Q: css3 picture slider randomizing the pictures

LEnc95I have already created a java script slider for the index of a website I am working on. It displays three images in the slider. I have a database of images resized to what I want. I want to be able to make the three images on the page to be randomly selected from a database or a array of images e...

0
Q: Display letters of the string in a cell PHP

user2901740I'm trying to display the letters of the string, THIS CODES DISPLAY ONLY ONE STRING. I can't display when I have array of strings, also when all of the string is displayed, random letter will fill the cell. any help? For example.. A D H I H K S A M P L E S T J K Q L A A L A S T A P P L E T ...

0
Q: Text will not show when using preg_replace to make links from text

Carefree4What I am trying to do is take a string from the DB and putting <a href="url">url</a>'s around the URLs but it will not give me any data back, its not even spitting an error out at me. If i take out the findUrlFromString and just put it into the thing directly it will give me the post, but not l...

0
Q: Unicode Characters Are Displayed as HTML Numeric References

GreesoI have an automatic process that runs in PHP in the background. The process copies text from web pages and saves it to the database. The text getting copied is Arabic (therefore the MySQL DB is using utf8_unicode_ci collation). OK, The problem I have is the characters saved to the database are s...

0
Q: Combine multiple unique MySQL tables and order by one column

WinterI've been trying to accomplish this MySQL query for the past few days now with very little luck. I'd like to combine these multiple tables and their columns, then order by one that they have in common (not by name, but by content). I have the following database tables: mb_bans: mb_ban_records:...

0
Q: Getting CException error

user3064038I'm new to Yii and I'm following the screencasts tutorial of Yii. I did everything on the video but I'm getting an error "Property "Message.content" is not defined." $this->message = $message->content; Here's my GreetingController.php class GreetingController extends Controller { public...

0
Q: Prevent direct access using the define and defined function in PHP

SqueezeI'm trying to use the define function and the defined function in order to avoid hotlinking / direct accessing a PHP script but for some reason it will not work. The issue I'm having is that it simply will not work and i recieve the "Hotlinking is not allowed" message even if i visit index.php f...

0
Q: Intermittent simplexml_load_file(): I/O warning on local Joomla site

dooversI've just started getting an intermittent error on all pages of a joomla dev site I'm running on localhost. The full warning is: Warning: simplexml_load_file(): I/O warning : failed to load external entity "/site/language/en-GB/en-GB.xml" in /site/libraries/joomla/language/language.php on line ...

0
Q: i entered user name and password correct ;

user3093752i entered user name and password correct ; but it throw Invalid user why mysql_connect("localhost","root",""); mysql_select_db("test"); $data=mysql_query("select * from tbl_usr where Uname='$uname' and Pwd='$pwd'"); if(mysql_num_rows($data)==1) echo "Valid user"; else echo "Invalid user";

0
Q: Associate/Map Doctrine Object with Another Without Lookup

Pat ZabawaEach Question object of mine is mapped to a User object, so I create a new Question with the below working code: But can I attach a mapped object without the $user = $entityManager->getRepository('QuestionBundle:User')->find($this->getUser()->getId()); line or without looking the object up fi...

0
Q: Sentry 2 for laravel 4 ACL

user3093840Laravel 4 with Sentry 2 for ACL Note: I am using laravel functions for login, but need sentry only for ACL purpose, to check permissions Want to achieve this: if ( Sentry::getUser()->hasAnyAccess(['system']) ) { echo 'has access to system'; } but i keep getting the following error: Sentry::g...

0
Q: accessing route in laravel 4 does not work in LAMP

Aoihey guys im new to laravel then im starting to access the home using Route::get('/home', function() { //return 'foo'; return View::make('hello'); }); with url: http://web.learninglaravel.dev/home, before with this url i can access the home with route '/' without using the php artisan se...

0
Q: Zendfox installation: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'zendfox.zf_core_module' doesn't exist

Ashwani ShuklaI again tried to install fresh zendfox but error occurred: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'zendfox.zf_core_module' doesn't exist

0
Q: Attempt to create SOAP client in PHP crashes web server

JoeI am trying to create a new soap client with PHP. My code works just fine on a remote web server, but I am attempting to do it locally on my computer. I am running Apache 2.2.25 and PHP 5.2.16. Here is the full error message that Apache is giving before crashing: [Wed Dec 11 21:01:09 2013] [n...

0
Q: Hierarchical data for comment system

BagwellI'm trying to add a comment system that uses hierarchical design. Here's a sample from my database that keeps track of posts/replies (note that more rows are added as more people reply): post_id | parent_id 1 1 2 1 3 1 4 2 5 3 6 ...

0
Q: creating buttons in PHP/HTML

user3085177I have created a database and am looking to create buttons for the select, delete and update functions but I am very new and am not sure how to make this happen? I would really like them to all be in one area so the table can be updated in one spot? Here is my code - select data <?php $con=mys...

0
Q: jQuery UI Datepicker only respond to the first textbox

aiman9000I'm trying to create a table with multiple rows and each row has a text box for user to input the date using the jQuery UI Datepicker. The problem is that the Datepicker is only updating the text box in the first row. Here is the datepicker function in the <head>: <script> $(function() { $('...

0
Q: Commenting on multiple statuses using jQuery

Jason BassettSo this jQuery is to submit a comment on a status of a social site that I am working on. Basically, my issue is plain and simple. I can only comment on the first status post. I cannot comment on any other post successfully. The page just simply refreshes. Which would probably be because I do not...

0
Q: Recusive redirection in htaccess URL rewriting (mod_rewrite in Apache)

Victor FerreiraIn the root folder of my project there are several other folders I am calling "apps". The path to one of these apps is something like: /root_folder/myapp/... There are actually a dozen apps like this. So I want my project to be using friendly URLs, and to achieve that I am using the apache mod...

0
Q: Cant pass value as variable in this php script

ImaginateLike the question says, I can't seem to pass a value in a variable in the following script. If I echo the variable, it exists as expected. If i copy and paste the echoed value into the code where $my_var is, it works. But it wont work with $my_var ?!?!? Context- code requires another file to ...

0
Q: Where should I place the phpdoc.xml file?

user1032531phpdoc can be configured either using a .xml file or an .ini file. The documentation is ambiguous, but it seems that using an .xml file is currently the preferred approach. Agree? Where should I place the .xml file? According to http://www.phpdoc.org/docs/latest/for-users/configuration.html.....

 
4:47 AM
0
Q: PHP MySQL image upload tmp to chosen directory

sBradford-SmithOk, i want to upload an image from my computer to the host/database, everything works fine and it all uploads to the database (image name VARCHAR as to just be wording not image), except the image doesn't want to move and I get this warning: Upload: 6285.jpg Type: image/jpeg Size: 68.1669921875 ...

0
Q: yii, how to avoid savings in submitbutton form

nosthertusi want to avoid the saving on database whenever the data thats being stored on the field is the same as is being on db (to avoid duplications), in yii, i use the form made by gii, im making a renderpartial on another view, so you might see the code in a view action, its totally normal, here are t...

0
Q: How i will get the images of highest scored users in wordpress?

NaveenI am using a Q/A plugin for the user scores, i have function like this, i want to take the images of the highest scored users, how can i get the images of the highest users, and i want to display it in home page with the images and score with seperate boxes , like stakoverflow, for runninng this ...

0
Q: How to fetch php code from textarea of one form and execute it through eval()?

user2372214Hi all i have some code problem. i have two files index.php and run.php In index.php i have one textarea. below is my code of index.php <form class="hidden code-box" method="GET" name="sample"> <div dir="ltr"><textarea class="php" name="codeguru"></textarea></div> <div class="hint">This code is...

0
Q: Multiple linux commands not returning expected results

user3093786I'm converting a web application from a Windows environment to Linux (Ubuntu). I have a page, served under lighttpd and PHP5, and I'm getting odd resultsPHP is not running in safe mode and I don't have any disabled_functions defined. I'm trying to imitate the following terminal command: /usr...

 
5:11 AM
0
Q: PHP. Get user home directory (for virtual hosting)

indapublicI want to get home directory of current script user (nginx/www/apache etc.) in PHP. I use $output_message = shell_exec('echo ~'); var_dump($output_message); It's working correctly on my local server, on Amazon instances. But it outputs only "~" on virtual hosting. Maybe, do you have working ...

0
Q: The Server side Facebook User Invite into Group throwing error while using Facebook PHP SDK

George Joffin JoyI am have been trying this for days, first i tried in JavaScript script which was not a safe thing to do. Then i moved to server side to invite a user into Facebook Group. I am getting error as below on calling the API call: br /> <b>Fatal error</b>: Uncaught OAuthException: (#3) Unknown method...

0
Q: $this->addError is not working in yii model class

Let me seeI am trying to do the custom validation.All is working fine except $this->addError . It is not adding the error as it should. this is my controller action public function actionVerifyAnswer() { if(isset(Yii::app()->session['_emailId'])) { $model=new LoginForm; ...

0
Q: What is an Auto-Responder?

corelurI'm a noob and seriously confused. I built a form for my website with a php script that validates and sends an email to me when someone fills it out. So, what is an auto-responder? Do I incorporate that some how with my php script, or do I not need the php script at all if I use an auto-responder...

0
Q: Windows 7 Text to Speech Add More voices

user3065043I Create code for the text to speech application I want to add more voice in the that application how to do it ?? I am using windows 7. and Xampp. I have only one anna defalt voice <?php $TTS = new COM("SAPI.SpVoice"); $TTS->Speak('Hello world!'); ?>

-1
Q: Drupal Video Player

user3091132In my drupal 7 website's home page I want to have a video player which should play the videos as soon as the site is launched and the videos are stored in the local server. Moreover it should play the videos one after another without any interruption.

0
Q: matching url to title page

DefyleitiHi so how do you do it in kohana 3.3 and kostache? Form <form method="POST" action="user/login"> <input type="text" name="email" /> <input type="passowrd" name="password" /> </form> Controller public function action_login() { $user = Auth::instance()->login($this->request->post('e...

0
Q: how to populate data from a clickable div to a textbox?

Manohar Swamii am trying to populate data from a clickable div container to a text box. all the below code is present in same file "schedule.php" The jQuery function is: $(document).ready(function(){ $("#listItem1").click(function(){ var selectedAddress = $("#listItem1").attr("value"); $.post("schedule...

0
Q: Linux named FIFO queue seg faulting PHP and Ruby

Karl CI have the following in a PHP script in /var/www/ <?php $pipe = fopen('./nfqueue.fifo', 'w'); fwrite($pipe, "data\ndata2\n"); fflush($pipe); fclose($pipe); ?> and the following running in a ruby daemon I wrote: NFQUEUE_FIFO = "/var/www/nfqueue.fifo" pid = fork do fifo = File.mkfifo(NFQUEUE...

0
Q: How to search sphinx for fetching records with ID?

SenthilI am using Sphinx search in my PHP project. I need to find an record from Sphinx index with ID. I have ID , just want to query Sphinx index for particular record rather than querying Database directly. My Scenario : I have list of tags in sql table and list of Jokes in another table. I have an ...

0
Q: Creating "blocks" in SQL loop and output files

Marco MolinaI have a table ( emails ) with the following columns : date; status; account; server; birthday Are 10,000 records. I want to separate these records in blocks ( csv files ) with a maximum 50 records for each server. For example : server1 : 13 records server2 : 576 records server3 : 97 records ...

0
Q: PHP script fails at $mail = new PHPMailer() without error message

BintzThis is driving me up a wall! I'm trying to use phpmailer to send e-mail. Here is my code: print "about to do the require!"; require_once("$s[phppath]/phpmailer.php"); print "require has been successful! creating a PHPMailer object!"; $mail = new PHPMailer(); print "yay!"; However, the p...

0
Q: Hide url in the address bar using .htaccess

user3079558When a user click post,after filling a form,it post the form datas into a php from where it is sent (redirected) to another url. But the form has confidential datas,that is been shown in the address bar while redirecting. The url is seen as http://payment.kkl.com?token.jsp?id=ajsjs&password=pef...

0
Q: Black background when using imagecreatefromjpeg with offset image

user2579422I'm using imagecopyresample to copy an image into another image into a grid. There are some instances where I need the image to be offset because that's how the user has set the image, but the area of the image that is empty cause it's offset it has a black background. How can I have a white bac...

0
Q: Javascript Zooming in/out like Google MAP

RezaakhmadgI want to create a web based tool for my lesson map that allows people to visualise semantic web ontologies. The visualisation will look like a node structure. I want to be able to zoom in and zoom out like Google Maps, to get a close look to make a selection or to get a overview of the main to...

0
Q: Ckeditor: how to avoid html tags in ckeditor on save time in mysql

user3093894I am using ckeditor for my small web project(am using yii Framework), but when I edit a content or create a new content, it automatically add Html tags and save time also html tags automatically saved in mysql DB also. how to stored without HTML tags? how do I remove it? EX: in CKeditor input: ...

0
Q: Checkbox click function not working

JenzI have a group of checkboxes with same name. One textbox is associated with each checkbox. On page load, I am disabling all the textboxes. On click of each checkbox, the textbox corresponding to the checkbox should be enabled. The problem is that, I tried with different codes to enable the text...

0
Q: Yii CDbCommand queryAll() return wrong result

MagicI'm using Yii CDbCommand to fetch result from mysql. I log the SQL in mysql query and by var_dump Yii's CDbCommand SQL both. It's the same. I get the result by CDbCommand->queryAll(). But the result is not the same as of running the same SQL in phpMyAdmin. > SELECT `referer_url_id` FROM `trend_r...

0
Q: Rewrite in Magneto 1.7 .htaccess

user2130646I have magneto website http://jiesint.com and i add multi-languages option and now the default is with /en mean all the inside links look like http://jiesint.com/en/xxxx... I would like to change it so i made a Rewrite in the .htaccess but is not working, this is the code: RewriteCond %{REQUEST...

0
Q: Searching those emails that have not been received

user3094039I have 3 pre build tables: 1) "Schedule" table that has data about emails subject, frequency and sender email ID. 2) "Daily Not Received" email table has all data related to all daily emails that has not been received. 3) "Monday Not Received" email table has all data related to all monday emails...

0
Q: Cakephp without Save() function?

user3072727May I know , got other way to store the SQL statement, except the Save() function ? I want to do some simple calculation, i want to store the result at database. Anyone having any idea about it ? public function add() { if ($this->request->is('post')) { /// complete calculation ...

0
Q: Associative array where indexed array is required - making a PHP array for use with Highcharts

user3093986I'm using PHP to retrieve data from an SQL database to produce a stacked column chart in Highcharts. The idea is that I'm taking the following piece of code to retrieve values from my database. This code should generate an array which then gets encoded to JSON and passed to Highcharts; this cod...

0
Q: Can this PHP code structure be improved?

TigranI have class that stores data about network packet: var $from_ip; var $to_ip; var $from_port; var $to_port; var $tcp_length; var $tcp_stream_text; var $tcp_stream; var $tcp_sequence_dec; And now, I am creating function to print it: function Print_data() { echo "<...

0
Q: Total number of results and limit inactive records

Happy CoderI am fetching some of the listings from the DB and displaying it in a paginated screens. But for the pagination, I need to take the total count of results. I am using Codeigniter and ActiveRecords. My query is something like this : $query = $this->db->select('sum(amount) as sum') ->...

0
Q: Integrate Disqus comments with PHP

user2879435I am trying to integrate Disqus comments to my PHP Web application, and I am following this Documentation: https://github.com/disqus/disqus-php I didn't understand well part about disqus_identifier. As you can see from the code below I use this code to acces my comments on my PHP page. require...

0
Q: My PHP cURL script is posting only one variable instead of all variables

user3026568I've made PHP and cURL script. I want to upload file on remote server and its working properly and uploading image files. But now, I want to add security as secret key or API but my curl script is not posting all data. It is posting only one variable. My curl codes are if(isset($_POST['upload'])...

0
Q: Reuse of nextval PHP

Tiago SantosHow can I reuse seq_event.nextval (the same value) on second insert? I am trying this way, but it is not inserting values on guest_event. CREATE SEQUENCE seq_event MINVALUE 1000 START WITH 100 INCREMENT BY 1 CACHE 10 ; $command_sql = "INSERT INTO event (id_event, title,description,state,creato...

0
Q: Custom Article Field not showing up in joomla 3.2

J-DI've been trying to create a form in the article component backend, so that I can add few things attributes per article. I got this sample code from the joomla website documentation. http://docs.joomla.org/Adding_custom_fields_to_the_article_component I understand the method onContentPrepareForm...

0
Q: multiple select with checkbox in php

user3089798i am making a website in which i am to embbed the functionality of delete using multiple checkbox. here is my code. my problem is 1. Ajax call is not working. 2. how can i make search from database for array . if(isset($_POST['kw'])) { } ?> <table width="200" border="1"> <tr> <td>select

0
Q: Database consuming \ where ever a special character like ' and " are inserted to a row

Ramaraju.dI am trying to add a title "America's got Talent" but the data in the row looks like "America\'s got talent" How to take care of the data so that the backslashes can be filtered before they get inserted into table. I tried using stripslashes, changing charset to utf-8 general_ci but the problem ...

0
Q: Propel reverse engineering

David FellsGone through a number of questions and none of the solutions have worked for me. Hopefully someone has some insight. Here's my build.properties file propel.project = league propel.database = mysql propel.database.url = 'mysql:host=localhost;dbname=leaguerunner' propel.database.user = root pro...

-1
Q: How to fetch md5 password from database php?

user3060132How to fetch md5 password from database. i am making a login form> i want,when the user is going to login.if the username and password text field is matched with database than use will login. database.. in database,i store the password with md5(). now how to fetch the password from database.and ...

0
Q: Adding a line of code that changes upload url

user3094131I'm using aqua-resizer VER 1.1.7 in my theme and now we added a multilingual support via WMPL plugin. Everything works fine with my native langauge, but when i select some other language i cant see portfolio featured images and other images like the image url is wrong, it only displays the place...

0
Q: How to search with non utf chars in mysql and php

user2963699I need to search from table, like select * from geo where state='Grästorp' But it does not give me any results. but when I run this query with phpmyadmin it gives me right result. How to search with in MySQL with non utf-8 chars?

-1
Q: Inserting data from database to dropdown - PHP MYSQL

user3094172i have this three fields called Category, Treatment, & country under information table. how can i retrive the data from this fileds into dropdown menu. Please, any help will be very welcome.

0
Q: Can't convert the raw data from swf via POST to image

markvicencioI have here a swf file that will send a base64 encoded to PHP via POST. Now I'm getting the string via $dataCode = file_get_contents("php://input"); What i want to achieve is to convert the base64 encoded from swf to image through PHP and save it to specific folder. Here's my code but for the m...

0
Q: Hide url header redirect parameters using session

user3079558I have the following php code <?php $token_cipherText=$_POST['tokenex_cipherText']; $token=generateToken($tokenex_cipherText); $merchantid="example"; $Password="example1"; $remoteIP='11.22.95.5'; $customerReferenceNo = $_POST['customerReferenceNo']; $amount=$_POST[...

0
Q: PHP superglobals $_GET and $_POST

user3085661In all php from I always use POST.Have there any benefit to use GET?If there any benefit what is it ?

0
Q: PHP detect non string duplicates and add it to array with their occurence order

user3094075I have this dump of an array generated by PHP mysql_fetch_object: Array ( [0] => stdClass Object ( [lat] => 44.510728 [lon] => 26.276657 ) [1] => stdClass Object ( [lat] => 44.510954 [lon] => 26.277879 ) [2] => stdClass Object ( [lat] => 44.510954 [lon] => 26.277879 ) [3] => stdClass Object ...

0
Q: Need help to access a JSON hash returned by a perl script in javascript

user3094070Let me clearly tell you what i want to accomplish in the end: I have a Php script which populates a dropdownlist using MySql db connect. Here is the code for PHP: ################################Start of PHP file################## <!DOCTYPE html> <head> <script> </script> <

0
Q: Save email as draft in PHP and how to make runtime feilds in database?

user3094194in my PHP site i want to build there are many user that will create a survey question to ask the people's my point is that if one user make 10 question and other make 20 question how will i manage this issue with MYSQL database how to store dynamic value's ??? thanks in advance .

0
Q: determine which child class is calling parent class' method

Jacob Kranzclass parent { public function methodInParentClass() { echo "In parent class called from child class of:"; } } class childOne extends parent { public $childProperty = "in childOne property"; } class childTwo extends parent { public $childProperty = "in childTwo prope...

-1
Q: Link a sign in to another site without giving out password

matalawebIs there a way that I can have a button in my website's portal that logs people in to another website without revealing to them the credentials?

0
Q: Hosting Folder Redirect and htaccess

Sativa DivaI have a hosting account with seperate /folders for separate domains. Let's say my domain.com is being hosted on root/domain My current .htaccess is: Options +FollowSymLinks RewriteEngine On rewriterule ^site-([^&]+)$ index.php?name=$1 [L] However when I direct my URL to domain.com/admin/s...

0
Q: Php and ASP web service

user3066220I am new to web service, i need to display information from a php website on an asp website. Any ideas or tutorials. so far i have one in asp: Imports System.Web Imports System.Web.Services Imports System.Web.Services.Protocols ' To allow this Web Service to be called from script, using ASP.N...

0
Q: PHP Serialize not working as expected

Anant Here's a piece of code .A prefix tree (trie) has been implemented <?php class KTrie implements Serializable { function __construct() { $this->root = new KTrieNode(''); } function addWord($word) { $wordArray = str_split($word); $this->root->addSuffix($wordArray); } function hasWord(...

0
Q: why php headers are getting huge time to redirect?

Nadler BanitIm developping a very simple script with php and mysql. the problem is php header redirect getting huge time to redirect. without redirect script working very fast. Im using php header redirect for remove cashed form data and redirect process.php to root index.. here is my index.php code... <?p...

0
Q: how to make RegEx to match CSS non greedy for a part of the match

marcnycI'm working on this RegEx to match and replace CSS with other CSS values. So far I have this: $css_new = preg_replace('/('.$definition.'.*?\s'.$property.':)[^;]*([^}]*)/is','$1 '.$value.'$2',$css_temp); The issue I have is that if I am trying to replace something in the definition ".menu" valu...

0
Q: paging is not working for jquery datatablw

user3058736i am using jquery table to show table on a web page.The table is coming up properly but paging for the table and showing number of records and search options are not working for the table generated.All the records are populating at the load of the page.This is my code PHP code $qry = " SELE...

0
Q: Can read excel File with out any php library

GayanThere are so many excel reader libraries for php with needs zip extension enabled. With out any such library, 1.can we read an excel file with pure php? 2. How much effort it needs? Thanks /G

0
Q: Php apache mod rewrite remove .php not working

Vin_fugenI'm trying to remove .php from my url, below is my .htaccess contents <IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On RewriteBase /creatorsink/ RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^/]+)/?$ profile.php?name=$1 [L,QSA] RewriteEngin...

0
Q: WordPress: Only display posts that have custom meta that falls within a range when running a search

user3094214This is my first time posting on Stack Overflow, and I've done my best to thoroughly search for the answer, so any help is greatly appreciated. I have a WordPress-based site that's using an advanced search form plugin to run AND/OR searches that are compared against custom meta. Every field on ...

0
Q: How to create an associative array in following case?

PHPLoverI'm having few arrays as follows. Actually I'm having too many such arrays but for your reference I've printed only few elements from it: Array ( [0] => lineItemData [1] => name ) Array ( [0] => lineItemData [1] => startDate ) Array ( [0] => lineItemData [1] => endDate ) ...

0
Q: Yii console with different configs

MiroffIn the web application we use same code and modules with different configs like: in index.php file app will decide, wchin config to turn: switch($_SERVER['HTTP_HOST']){ default: $yii=$webRoot.'/framework/yiilite.php'; $config = $webRoot.'/protected/config/main.php'; brea...

0
Q: Using mysqldump and exec for db backups, it could not select all data of every database

kelvin7.fengWhen I use exec to execute the 'mysqldump' for thousand of database, I could not backup all data of every database. Code like these: $dbCommand = vsprintf("mysql -u%s -p%s -h%s -P%s %s < dump.sql","root","123456","xxx.xx.xx.xx","3306","testDatabase"); $insertCMD = "mysql -uroot -p123456 -hxxx.x...

0
Q: PHP: Must I use $this to access class properties?

George NewtonIn PHP, class properties are accessed using the implicit parameter $this: class Test { private $foo; public function __construct($val) { $this->foo = $val; } } But this (no pun intended) fails class Test { private $foo; public function __construct($val) { $...

-1
Q: Single Page Application Framework in PHP

RazorI am rookie PHP developer. I want to learn how to create a Single-Page Application (SPA) in PHP. Can anyone please tell me where can I find tutorials for the same? It would be great if someone provides me a link for a framework that could help me achieve this. For example, there is framework ca...

1
Q: Debian upgrade from 6 to 7 gives postgresql error about not such file or directory

Nic HubbardI upgraded my server from Debian 6.0 to 7.2, everything went smoothly except that Postgresql 8.3 got removed, which I knew about before running the update. I need postgres for my website so I installed 9.1 and rebuilt my database from a .dump file. Everything seems like it should work, but when ...

0
Q: Difference between both variable declaration

Kajal SinghI am using a simple code to check if session variable is not set then page redirect to another page usign javascript. My code is: var userLogin = "<?php echo $_SESSION['user']['id']; ?>"; if (typeof userLogin == "undefined") { $(location).attr('href', 'http://www.example.com/'); } But it's...

0
Q: compiling php into hiphop without the web GUI

Le DudeI'm thinking of compiling our php application code to hiphop. One thing that perhaps I'm not understanding it correctly is the hiphop side? Can I compile my php apps with hiphop without the webgui included in it. So that I can separate the webgui with the php application for scalability purpos...

0
Q: Multiple Select value saving Issue

deemi.exei make meta box and in this i make select option with multiple $opt_meta_author = get_post_meta($post->ID, 'opt_meta_author', true); <select name="opt_meta_author" id="opt_meta_author" multiple="multiple"> <?php $auth_args = array( 'po...

-1
Q: Setting the session on click of a button

gauravishereI want to set a session variable on click of a Button. But without clicking that button the session variable is set. What is wrong in my code? Please help..!! My script is - <script> $(document).ready(function(){ $("#next").click(function(){ <? $_SESSION["s_id"]=mt_rand(); ?> locat...

0
Q: Database into an array indexed

user3055827how to transform data from a database into an array indexed? from: $bb = mysql_query("SELECT kalori FROM bb_temp ORDER BY density DESC"); //field kalori contains=(16,12,23,13,9,10,18) become : Array ( [0] => 16 [1] => 12 [2] => 23 [3] => 13 [4] => 9 [5] => 10 [6] => 18 ) Thank...

0
Q: How to check if ID exists in a row and echo some text if doesn't exist

Blessing ThinkerI'm using the following to select some photo, how do I incorporate 'IF EXISTS' so i can echo some text if no ID is found. $Result = mysql_query("SELECT * FROM photos WHERE UID = '$ID' limit 30")

0
Q: Logic is not clear while fetching records from DB

Mahmood RehmanI am working on one site where i need to fetch records against dynamic value.My table structure is like this : Rule_price Rul_value 100 3 200 5 250 6 Now my question is that if i got value between 100 to 200 than it will fetch first record(least value ).the v...

0
Q: how to make Group Discussion Post in linkedin in php

ajit singhHow i can group post in linkedin api in php $ln->fetch("POST","/v1/groups/1483367/posts", "") I am new to linkedin Api i am not understanding how the things are working in linkedin api. Linkedin share code is below i come to know how this is working as below but i need to know how to work...

-1
Q: PHP blind button *encoding*

user3094324I have a problem with my site web: http://dreamworld-pvp.fr/ There is a button to change the password like every site but when we click on the button that doesn't make anything. My script: http://pastebin.com/0w0UxVFg Thank you very much!

0
Q: Query count returns as 1 even though there's no results returning

Navneil NaickerI' am working with WordPress. When I do a normal query everything works great, but when I want to test if theirs no results it should show up something like "Sorry, but nothing matched your search criteria. Please try again with some different keywords." This was looking strange to me because ...

0
Q: Warning: mysqli_stmt::bind_param()

TigranWhat is the problem here? $stmt =$con->prepare("INSERT INTO tcp (capture_order, from_ip, to_ip, from_port, to_port, tcp_length, tcp_stream, tcp_stream_text, tcp_sequence_dec) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"); $stmt->bind_param( $this->capture_order,$this->from_ip, $this->to_ip, $this->

0
Q: MySQL Select data separated strings

ElmerI am trying to select a record using the LIKE function. However, it does not show results if there are characters in between. I want it to select data that contains those strings. For example: $value = "Mark Anthony"; $qry ="SELECT * FROM students WHERE name LIKE '%$value%'"; returns these r...

0
Q: CodeIgniter update record

Kishor RangadiyaControler class News extends CI_Controller { public function __construct() { parent::__construct(); $this->load->model('news_model'); } // Create News Function public function create() { $this->load->helper('form'); $this->load->library(...

0
Q: POST values to third party payment site from my php without using header redirect

user3079558I have the following php code <?php $token_cipherText=$_POST['tokenex_cipherText']; $token=generateToken($tokenex_cipherText); $merchantid="example"; $Password="example1"; $remoteIP='11.22.95.5'; $customerReferenceNo = $_POST['customerReferenceNo']; $amount=$_POST[...

-1
Q: What is the Best Secured PHP Framework

MuthamizhchelvanWhat is best PHP Framework in security wise, as per the OWASP article https://www.owasp.org/index.php/PHP_Security_for_Architects Zend Framework & Cake PHP has the Security So what about the Laravel & YII frameworks as per my understanding all the top framework has basic security features but ...

0
Q: ajaxForm Plugin submitting form normally without ajax

coder101I have two scenarios: First: i have an HTML form on a page on which i'm using ajaxForm plugin to upload a file through ajax and it works fine. Second: I am generating another HTML form through php and ajax on which i'm trying to use the same plugin but it submits the form normally and echoes ou...

0
Q: Suggestions on how to keep a user logged in even if browser closes

DeadpoolSo I want to keep users logged in even if they close their browsers. The only way I can imagine to achieve that is to use cookies? Am I right? If yes, is it safe? What should I be watching out for when using cookies for this purpose?

0
Q: Why show an error header alredy sent?

user2881770<table> <tr> <td width="30"></td> <td><img src="Images/logo.jpg" width="100" height="100" /> <td><td><h2>&nbsp;&nbsp;&nbsp;&nbsp;Kunal Structures (India) Pvt. Ltd.</h2></td> </tr> </table> <?php if(!isset($_SESSION['user_id'])) ...

0
Q: How does Flight framework avoid undefined index error

Cheok Yan ChengI was wondering, how does Flight framework avoid undefined index error during runtime? For instance, $result = Flight::request()->query['no_such_key']; will just return $result where empty($result) will be true. However, if I use my own array, I will get Undefined index $result = $array['n...

0
Q: how to find exactly data between selected diagonal area in mysql query

Zeeshan These are my coordinates of Selected diagonal points, will be more when selected points are more. 1: 25.312063043186914 2: 55.30672073364258 1: 25.24096949112138 2: 55.40525436401367 1: 25.224509592006314 2: 55.3462028503418 1: 25.22513076073063 2: 55.281314849853516 1: 25.27822894908031...

0
Q: How to change layout in my all action of zend framework2

James lini'm James lin and i'm a PHP Developer. In the project development process using some of the problems ,Also please help in my project where i have two moduel , one is the frontend and the other is the backend,Because there are two different layout on the screen so each,Now I can change lauout on ...

0
Q: Smarty Uploading a File with normal Input Files

MavichowIn my index.php file , I got a code is trace the $_FILE, but seems like when uploaded a pic/jpeg/images file, the return result is 'array(0) { }'. Did I need use smarty's method to assign a input file's method? var_dump($_FILES); my photoupload.tpl <form action="index.php?view=photoupload" me...

-1
Q: PHP dropdown list with data from a MySQL database

user3094172i have been try for PHP dropdown list with data from a MySQL database. I have attached my code below, am not getting the dropdownlist .Can anyone help <?php $conn = mysql_connect('localhost','root',''); mysql_select_db('qsearch',$conn); $query = "select Category from information"; $result ...

0
Q: Select element in array with preg_match_all

Jakub ZakI have an array which is a product of preg_match_all, this array has elements from the HTML page which I get as a response to my curl request. So in my array there is several elements like so "...". The one I need to select is in a form: <script>write_which('X','Y','Good','N','Bad','P','Pending...

0
Q: Required Field(s) missing result

Lewis OviedoI'll just keep this question short. What is wrong with my php code, it keeps outputting 0 or Required Field(s) is missing. Here's the code <?php // array for JSON response $response = array(); // check for required fields if (isset($_POST['id']) && isset($_POST['status_id'])) { $id = $_PO...

0
Q: select query error in mysql

user3048611I am running this query but it is giving me an error saying You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where user_id=5261116ORDER BY applied_on DESC' at line 1 $query="Select * from users_jobs o...

0
Q: How to post string and video to PHP server?

scourGINHOI have the following problem.. I am trying to post video data and some strings to a PHP server. I am able to post the video data, but I don't know how to add strings. Here's the code I am using, it works excellent for posting video, but now I have to add text to the post. - (NSData *)generatePos...

0
Q: Moving Rows up and down using Mysqli in PHP (Update SQL)

KixaoSo, I found this Script on this Website: http://www.webdesignerforum.co.uk/topic/15011-moving-rows-in-a-database-up-or-down-with-php/ And thought I would try to rewrite it so it works with Mysqli. However, I'm not really strong SQL Querys, and I'm currently struggeling on how to get the last pa...

0
Q: How do you escape ' on doctorine?

whitebearHow do you escape ' on doctorine? I made this code $query = $em->createQuery( "SELECT a FROM AcmeTopBundle:ArtData a WHERE a.name = '". mysql_escape_string($name) ."'"); but when the $name is A'z it returns error [Doctrine\ORM\Query\QueryException] ...

0
Q: Curious about Fake Mails

jibran musaHi i am a little bit curious about the functionality of some android apps which are supposed to send email from any account given to them. I just came across to fake mail send by my co-worker id. The mail was sent using one of the fake mail app. So the question arises what type of functionality ...

0
Q: Executing a file only if it's included

Imri PersiadoHow can I code a php file to execute only if the file is included. For example in this form it won't run (or will be redirected to another page): www.example.com/file.php And in this form it will run: <?php include 'file.php'; ?> Is that possible?

0
Q: Jquery ajax function fails with no reason

Onur GökerI have a web based mobile android application. I built it with php + jquery + mysql. An ajax code fails but no reason. Therefore it returns 'Try again'. Unfortunately I can not debug it in the application. Here is the code: $('.get-order-button').live('click', function() { var musteritel = $('...

0
Q: Conversion failed when converting the varchar value error

user2875727I am keep getting this error after added inner join SELECT character.dbo.user_character.character_name, character.dbo.user_character.wLevel, character.dbo.user_character.byPCClass, character....

0
Q: Raycaster in PHP

DarkoIs it possible to create a raycaster using PHP? I found one or two libraries for 3D rendering and also there is the PHP GD library for possibly generating the graphics on the canvas, but how would I go for the keyboard or mouse movements? Is that even possible in PHP? I found WAMP which says it i...

0
Q: unique button function php javacript

Jaxom NuttI'm trying to get my table to show a button for each spell that has been learnt and such which all works perfectly, I'm just having a little issue when calling the function since it only remembers the very last spell that gets loaded so I was wondering... Is there a way around this where you ca...

0
Q: Functional testing of full application life cycle

MisanthropeI'd like to cover our application with functional tests. I got familiar with most of examples, but they don't suit me, because they are too simple and cannot explain me how to describe dependencies of tests. Let's say we have blog application and we would like to test creation of blog post. First...

0
Q: insert CC addresses as seperate rows when using php imap

charliejsfordI have this PHP code i am using for imap_open PHP function: $header=imap_headerinfo($inbox,$email_number); $structure = imap_fetchstructure($inbox,$email_number); $from = $header->from[0]->mailbox . "@" . $header->from[0]->host; I am trying to get all the CC addresses and insert each address...

-3
Q: display out database fields in script

user2948950I had my variables all hard coded into my page like so: $base_url = 'something'; $logo_url = 'somethingelse'; Then I put all of them into a database for easier updating; now I need to place them back into config.php so my website can use them. I tried doing the following: (connection.php ...

-1
Q: php print table in the sql using select statement

user3056561In the program, I want to create table to print out thedate in (Y/M/D) format, volume, pending and sent. However, it show nothing after execution. It can be executed using phpmyadmin in the sql. However, I do not know whether we can use 2 sql statements to find out 2 different condition. I need y...

-6
Q: I do not know how to optimize

user3094554I do not know how to optimize the generation of: $choices = array("00" => "00", "01" => "01", "02" => "02", "03" => "03", "04" => "04", "05" => "05", "06" => "06", "07" => "07", "08" => "08", "09" => "09", "10" => "10", "11" => "11", "12" => "12", "13" => "13", "14" => "14", "15" => "15", "16" =>...

0
Q: jQuery making a statement dynamic WordPress / PHP

iammikerodriguezI'm working on a font-end drag and drop interface for matching questions with answers. I'm using WordPress and custom fields(ACF) to place the data on the backend. I have two arrays. One for Questions and One for Answers. The way they're matched is my the 'Number' key. I'm able to loop through t...

0
Q: SSL certificate integration in a Yii web application

anuI would like to know what are the steps to be done for integrating an SSL cerificate to my website . I created a certificate from http://www.cert-depot.com/ for testing and got a .pam file and .pfx file. Where should I add this files to integrate it with my php YII web application. In my local Ia...

0
Q: Get image name,resolution,path,extension and fileszie

Johnson SmithI have been working and am not being able to get any solution.I have a folder named "download" which contain several images, my task is to echo all the images display next to it, the image name,path resolution,extension and filesize.Can someone help ? I have been able to display all the images.....

0
Q: retrieve a site where cookies are needed

user2586868I'm trying to retrieve with php/curl data (an xml file) from a site where a session id (via cookie) is required. For some reason, the site tells me each time that the session is expired. Did I do something wrong? I used the following code: //Get cookie $ch = curl_init(); curl_setopt($ch,...

0
Q: For each ID in array put string into cell where ID is and where column is PHP?

user3009108I have a .csv file with multiple id's. With the simple excel class (https://github.com/faisalman/simple-excel-php) I have all the id's into an array to do a loop. For each id I have different content which I would like to put in the same .csv file under the column description where id=id. Does...

0
Q: PHP script to check If user already exists in MySQL database

Rs PenkiI'm creating simple game for Facebook. All users who used app are written to database. I need always check If user already exists Is in database, how to do that correctly? So I have variable $name = $user_profile['name']; It successfully returns user's name This is my function to insert user to...

0
Q: Database schema - Creating a private messaging based on an 'item'

AimanBusers table: CREATE TABLE `users` ( `uid` int(11) NOT NULL AUTO_INCREMENT, `unique_id` varchar(23) NOT NULL, `full_name` varchar(100) DEFAULT NULL, `name` varchar(50) NOT NULL, `email` varchar(100) NOT NULL, PRIMARY KEY (`uid`), UNIQUE KEY `unique_id` (`unique_id`) USING BTREE, U...

0
Q: AngularJs + php authentication

Georgi StefanovHi i started learning AngularJs and now im trying to do my Login module using angular and php, but i have some issues. I have watched alot tutorials but none of them was helpful in my case, so here is what i have: controllers.js: var controllers = angular.module('controllers', []); contr...

0
Q: pie chart in jQuery Mobile not showing up

metallurgicalI develop jquery mobile site and want to display pie chart, the data fetch form database to show in pie chart. Since the jquery mobile link to another page using div, i make one div in index.php to display data from database,then when the data is showing up,i can view the data by click on the vie...

0
Q: CodeIgniter Data insert is not working

Nidheesh N NamboodhiriIn Codeigniter project ,when inserting multiple fields only one field value is not inserting in the database. Controller Code For Billing function billing() { $arrInsert =array(); $arrtoolsId =array(); $this->db_session->unset_userdata('tools_cart'); $arrtoolsId= $this->input->...

0
Q: file_exists returning false in all cases

LizaI'm working on Wordpress at the moment and as simple as it's sounds i'm trying to check if the image is there in the directory if not then it will show a standard no-image. My problem is that the file_exists is returning false although the url is correct inside it, and it's accessible via browse...

0
Q: how can we avoid duplicate values in mysql database

user1965782I am storing number of check boxes with delete ,add,view options in database, if you check on that options,it storing some values.But if i click again that will store again and again. how to avoid this duplicate values

-2
Q: sql query to select credit cards about to expire

Dev01I have credits card table that has month and year fields which store values like 02 and 2013. I am new to sql and not sure where to start. How do I select only those records which expire few days before credit card are expired in order to send email to customers that their credit cards are about ...

0
Q: CENTOS php not working

ShaunTheSheepI have an issue with my CENTOS server. PHP will not parse. It says PHP 5.3 is installed(php -v), but PHP files will not parse. I have tried uninstalling httpd, and php...and reinstall both (httpd, then php53u). I have some Magento sites that have been on the server a while...and these are fine....

0
Q: How coockies could be used to get user data?

KarimkhanI heard that people may use cookies for hacking activities. As browsing information being stored in cookies, one can think that it's dangerous to share your cookies. When I visited one of the web site it prompted this message: How can they access user's cookies in his system? What can th...

-3
Q: Cross Browser HTML5 File Uploader

hassan alnatorAm trying to find any cross browser HTML5 file uploader , i searched a lot but didn't find any full working example , i tried "uploadify" but its flash and HTML5 version needs more that ie9 but i wont something to work on ie8 , my goal is to make an uploader that works on mobiles plus on ie8 , sa...

0
Q: how to get other elements of an array from associated array when I have a unique value of an array

Harish SinghArray ( [0] => Array ( [id] => 61 [title] => werwer ) [1] => Array ( [id] => 63 [title] => test ) [2] => Array ( [id] => 88 [title] => test 2 ) ) How can I get t...

0
Q: Returned jquery from ajax not working

misulicusSo i have 2 radio buttons that are supposed to change a line in the page. the code for the line to be changed is: <span id='checkout_total' class="pricedisplay checkout-total"> <span class='pricedisplay'>&#036;13.00</span></span> When clicking the radio buttons i have an ajax request that ret...

1
Q: after login google plus button not working

Preeti BishtI have use following code for showing google plus but after signing it become warning sign and count always show 0 script for google plus <script type="text/javascript" src="https://apis.google.com/js/platform.js"> {parsetags: 'explicit'} </script> for display button <div class="g-plu...

0
Q: yii framework: how to show a list of records which contains similar values in one column

FarhadI have a table named 'Tbluser'. It contains 'company_code, user_code'.I can show this table using grid view. i want to show only one specific company users. example, if a company_code: 'company1' logs in, he can only see user_code and company_code associated with company1. How can i select onl...

0
Q: Instagram Requirements For Callback URL

chraiRecently I had a problem on subscribing to a tag. I get this error: Array ( [meta] => Array ( [error_type] => APISubscriptionError [code] => 400 [error_message] => Unable to reach callback URL "insert my url here". ) ) ""### even though my url can be accessed globally. In the documentation, it...

0
Q: fatal error in ldap authentication code

user3048458Am going to avoid Login Form in my all PHP projects. Instead of Login Form am going to use LDAP Active Directory option. Automatically user can logged through Active Directory. we installed Active Directory in all systems.So all the systems are under Active Directory only. Am using WAMP server f...

0
Q: zip file path working on localhost not working php live server

vishali have a folder with some files and i am creating zip using php,i first create zip than add file to it,everythings working fine in localhost,but the problem start on live server on liver server zip creates but the file does not upldate in zip due to path i tried so many paths here upload is my f...

0
Q: PHP Form Confirmation Parse Error

Joe MoralesI have a very simple PHP that I'm using as a confirmation for a form with input data. HTML <!DOCTYPE html> <html> <head> <title>Unit 7 - Homework 5</title> </head> <body> <h1>Contact us</h1> <table> <form method="POST" action="script.php"> ...

0
Q: PHP - remove items that are not image from array

SashaI have this function to get items from directory: if ($dh = opendir($dir)) { $images = array(); while (($file = readdir($dh)) !== false) { if (!is_dir($dir.$file)) { $images[] = $file; } ...

0
Q: How sort this kind of arrays?

bahamut100I have some difficult to learn array sort in php, and I need your help ! I have this array : [fournisseurs_1331566668.csv] => Array ( [name] => fournisseurs_1331566668.csv [date] => 1331566694 ) [fournisseurs_1385460508.csv] => Array ( [name] => fournisseurs...

0
Q: Jquery $.post return empty value

MohammadI use two $.post in jQuery But second $.post return EMPTY value My jQuery code : var id; $.post('page.php', {id:id}, function(data){ var stat; $.post('page.php', {stat:stat}, function(newdata){ alert(newdata); }); }); And page.php code : if(isset($_POST['stat'])){ ec...

0
Q: how to filter element in multiarray with simple way in php

user1080247i have locations multi array and i want to filter one location that matched (country_name,city_name) if matched two arrays or many..then give me one array only $country = 'United States'; $city = 'Miami'; $locations = Array ( "count" => 6, "query" => "Miami", "locations" => Ar...

0
Q: Mysql Query Execution time takes second to result?

DineshI have two table which has following structure -- -- Table structure for table visitors CREATE TABLE IF NOT EXISTS `visitors` ( `id` int(11) NOT NULL AUTO_INCREMENT, `a_id` int(11) DEFAULT NULL, `visited_by` int(11) DEFAULT '0', `ip` varchar(30) DEFAULT NULL, `browser_name` varchar(...

-1
Q: Date pagination in phpmysql

user3094681Sir, Here iam giving the sql query for a table 'purchase', i have to view the contents of table for each PURCHASE DATE (Y-m-d) , say in 2013-12-11 there is 11 entries, in '2013-01-02'only 1 entry, in '2011-01-01' there is 4 entries , 1.IN the first page i have to view t...

 
10:39 AM
0
Q: I want get number of records in my table , but it throw warning

user3093752Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in mysql_connect("localhost","root",""); mysql_select_db("db_usr"); $data=mysql_query("select * from tbl_usr"); $count=mysql_num_rows($data); echo $count;

-2
Q: PHP convert docx to text

Vikas_SakhareI want to convert docx, doc, pdf etc files to text file. I tried JOD convector Linux utility catdoc but unfortunately these library are going to fail for some files(files which having more formatting). Can anyone suggest any solution for it. I am using PHP . Thanks in advance.

0
Q: PHP verify file before upload

user3065191I'm having a little problems checking the file before upload. My current code for checking it, is the following: public function verify_file(){ $allowedExts = array("jpeg", "jpg", "png", "bmp"); $temp = explode(".", $_FILES["page-add-file-box"]["name"]); $extension = end($temp); ...

-2
Q: Pagination Permalink

user3094779I created a thread script where users can post replies and view other replies. What I want to do now is have a permalink system so users can go straight to a specified post by providing the post ID in the URL like so: http://domain.com/thread/my-thread?post=123084 The tricky part is getting it...

0
Q: get error code for FacebookApiException

Bit ManipulatorI want to catch a particular error something like: catch(FacebookApiException $e) { $errorCode = $e->getCode(); // returning 0, but i want 100. if($errorCode = 100) { //do something } } Note that, the $e has error -> code = 100 but protected 'code' = 0. var_dump($e) gives the follo...

-8
Q: jQuery value in " "

Fajny_KuboI need some help. I have this code : // Set the query $x->setQuery("*", "sales_market", "id", ""); but I need something like this : $x->setQuery("*", "sales_market", "id", "region=$s_region"); The last "" in code is sql where conditional .. When I write "region='NORTH'" ... everything is...

0
Q: Error installing Symfony2 CMF

ShinhanWhen I try to access /cms/simple/contact (or any other path from phpcr_nodes table) I get the following error: Notice: Undefined offset: 0 in /home/xx/xx/xx/public_html/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCompiler.php line 169 First off, I'm not using Symfony CMF as a st...

0
Q: Pass variable from routes in Laravel 4

VictorI have a page where I want to display weather. But the weather depends on timezone. I don't want to make such route as: Route::get('/weather/{timezone}', array('uses' => 'MyController@method')); It's more convenient for me to do something like: Route::get('/weather/Paris', array('uses' => 'My...

0
Q: Wordpress: "Fatal error: Allowed memory size..." anytime I try to register and enqueue script in functions.php file

marcoEvery time I try to register and enqueue script in my function.php file I get the error Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 261904 bytes) in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\namewebsite\wp-includes\class.wp-dep...

1
Q: How to concatenate a backslash between two variables?

blargI want to concatenate a backslash between two variables when passing them in the arguments of a function so they form a filepath. turbo_function($variable1.\.$variable2, $otherargument); I'm sure the backslash needs to be escaped. I've tried wrapping it in quotes and double quotes. How can I ...

0
Q: PHP SOAP headers for WSDL

user3083231I have XML structure fro WSDL like this: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Header> <DisCredentials xmlns="http://www.mypage.com/common" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <IpAddress xmlns="http://schemas....

0
Q: php search for key in array with regex and replace in value

user3094633Still a beginner and I have one problem and would like to get suggestions for a best solution. I have one array like this: $errors = array ( 'This [any text] makes a big problem' => '[any text] is very problematic', 'Dont bother [any text]' => 'Person [any text] does not want to be b...

0
Q: Insert command?

user54425I am trying to load/merge an existing table into another. I have a table, build with Opencart (A PHP based opensource e commerce template). I am trying to merging from table Sheet1 into table OC_Product. Sheet1 goes like this: `Sheet1` (`ccode`, `cname`, `cdescription`, `cprice`, `cimageurl`, ...

-2
Q: Alert command within php not working?

user2831560I want to pass a variable in header .if the variable is exist than give an alert. but its not working login.php <?php include "db.php"; $user=$_POST['t1']; $pass=$_POST['t2']; $result=mysql_query("select * from registor where username='$user'")or die(mysql_error()); $row=mysql_fetch_row($result)...

0
Q: while loop php in sql tablle

user3056561With this program shown below, the program cannot print the table the the data shown in the php file. I need your help to see what problem in my sql and the table. $result = mysql_query("SELECT DATE_FORMAT(thedate, '%Y %M %D') AS d, count(semail) AS av FROM `ecard2008` WHERE `sflag`='1' AND ...

0
Q: Get the new image dimensions after rotate.

Manolo SalsasI'm rotating an image with gd library. $_POST['rotation'] gives the rotation degrees. $imagen is an image instance with getWidth(), setWidth(), getHeight(), setHeight() and setError() methods: //Get the new width and height $x = floor( abs($imagen->getWidth() * cos(deg2rad($_POST['rotation']))) ...

0
Q: Replace specific node value in xml using php

Dh...Hi i am parsing multiple xml feed and combine into one and its working fine for me but now i am bit of stuck at one point because i need to add some prefix into specific node value i mean i need to change the value of that node. here i am providing some example code what actual i want. XML <...

0
Q: send sms api to the html php form without goto location header

Midhunhtml form for collecting data <form method="post" action="test.php" name="f2" onSubmit="return contact_validate1(this)"> <ul> <li> <label>Name :</label> <input name="name" type="text" required> </li> <li> <label>Email :</label> <input name="email" type="email" required placeholder="Enter Your...

0
Q: Variable auto_prepend_file?

Niet the Dark AbsolOkay, I suck at titling my questions XD If anyone has a better title, please edit! Anyway, I have this in my php.ini file: auto_prepend_file = ./include/startup.php auto_append_file = ./include/shutdown.php startup.php looks something like this: <?php chdir(__DIR__."/.."); require("include/d...

0
Q: What does this active record query do?

HammadI am working on a existing project whose code is written by earlier developer. When I read a function in the model it was written: $this->db->select('1', FALSE); $this->db->where('product_id', $product_id); $query = $this->db->get('product'); if ($query->num_rows() == 1)...

0
Q: Text to be displayed with logo and footer

user2991258I placed a codeigniter code below controller.The actual result is it displays You don\'t have permission to access this page.But i want to display text with logo and footer.Pls help me to do that. Controller function __construct() { parent::__construct(); $this->is_logged_in(); ...

0
Q: Opencart change module setting from front end

user2689642I have a module which allows users to upload files, it has a setting 'Min-uploads' which is set to 0, I would like this value to be change depending on user choices (radio checkbox). Will the module setting be stored in the database? And if so do I use javascript to determine which choice the u...

0
Q: How to debug the PHP error in Windows Azure Service?

user3094882This is Tamilmani Mohan, working as PHP developer in Chennai . My PHP code is place in Windows Azure Service not Website. I am very struggled to debug the PHP errors in Windows Azure service. Windows azure service is always returning error message like "Server Error 500 - Internal server error....

-6
Q: variable link in php <a href= > </a>

AndroidMHi Please i want to know how to insert a variable link on <a href > in php : i have a variable $lien in my database, and i want to make a button in php that redirect me to $lien i want to have something like that, but i didn't know on what format it should be: <a href="here i want to...

0
Q: reader class not found in GeoIP2

user3083199I am trying to install Maxmind's GeoIP2. I did everything by their instructions and I still get this annoying error: Fatal error: Class 'GeoIp2\Database\reader' not found in C:\Program Files\*\*\localweb\GeoIp2\index.php on line 19 this is how the script looks like inside index.php: <?php req...

-2
Q: Domain points to OLD webhoster at school but at homes points correctly?

user3094865i bought a script phpDolphin and its amazing!!! i set it up because our school blocked all social networking sites. and we have tried every way possible to get it back, so instead i bought this and set it up so our school can have some sort of communication during school. the url: http://raid...

0
Q: Mail is sending as localhost

DavidHello I am sending a mail from my server. If I run it directly on the server I get a proper url but when the cronjob is processed the url is with local host. I am using CodeIgniter framework running on Ubuntu 13.04 with ssmtp This is my encode : $yes = site_url('job/itemExtend/?id=' . urlencod...

0
Q: PHP/MySQL Dropdown

user2869616I'm just learning PHP/MySQL and have spent the last few days trying to get a drop-down menu to populate options from my database. I have read through several tutorials, and tried to apply them, but I cannot get this working. What I'm trying to do: I need a drop-down menu called "Genotype" that ...

0
Q: New row not inserted in ascending order - MYSQL

user2991252I have recently created a new table with certain data - it will download data once every day and will post them in order but now something strange happened . I can not find anything wrong in my sql syntax in php and I do the same for my other tables - works perfect!!!. I have , as usual, a primar...

0
Q: Site Stop Working for PHPfox on hostgator

rahulMy web-site is hosted on the hostgator hosting company. They have stopped my web-site.Actually its using PHPFOX scripting. I don't have the knowledge of phpfox.They are saying that your site using maximum CPU capacity and also recommend me for dedicated server or remove the script.If i will remov...

0
Q: Symfony autoloader component doesn't load my classes

DRONI'm trying to setup symfony class loader component for one of my projects. When I try to create a new object from the Logger class I get Fatal error: Class 'MyPrefix\Log\Logger' not found in /usr/htdocs/sf/index.php on line 12 Here is the structure of the project / lib MyPrefix Lo...

0
Q: PHP: Add optional curly braces to control structures in existing code

user3094851I used to omit curly braces in PHP whenever they were not necessary, which - with increasing complexity my programs' control flows - has lead to code that is hard to comprehend and impossible to maintain: if (condition) { while (condition) foreach (x in y) { ...

0
Q: Can NetBeans Web Service connects to WampServer?

user3054491I'm just wondering, can the server in NetBeans connects to Wamp Server? Before, I'm doing a Web Services using NetBeans and also the Derby server. It works fine but now I'm trying to shift the server from Derby to Wamp Server. My question is, can NetBeans uses Wamp Server as a server? If so, can...

0
Q: Change order of Node / Nodelist with DOMDocument (PHP)

KURNi m receiving an xml in the following structure (the original file is much bigger): <root> <header> <intro> <message>hi</message> </intro> <items> <item>1</item> <item>2</item> <item>3</item> <item>4</item> ...

0
Q: Cannot get page like for some users

MaxxerI've developed a PHP app which just need to get if the user has liked a certain page. I login the user this way: $this->_facebook = new Facebook(array( 'appId' => "123", 'secret' => "346", )); $this->_facebookUser = $this->_facebook->getUser(); $this->_facebook->api('/me'); ...

0
Q: getting encoding issue even when header to set utf-8 is used

Rishabh RajThis is my second question related to encoding. I have a php script, <?php header('Content-Type: text/plain; charset=utf-8');//i have already used the //header for encoding to utf-8 //rest of the code. ?> I have already used the header for encoding to utf-8 But when the values are fetched...

0
Q: getting the input value after it is filled

PHP_USER1<table> <tr> <td width="275">Name</td> <td width="285">&nbsp;Gender</td> ...

0
Q: time based game VS tick based game

user3052629well, i'm pretty newbie to the programing, but not to gaming, i'm know all the main functions of php and js, jquery, css and stuff needed for creating a game, so i did all the things needed for the game, register, login, profile page, tabs, and all of that, (the outcome is pretty awesome) but i'm...

0
Q: MySql crashes with Twitter oAuth

user3049922I'm developing a PHP/MySql website from scratch. I have to post some content from my website to a Twitter account, so I use the Abraham Twitter oAuth library with a daily cron job. The content is several/distinct Tweets messages like 'today XX ads on [website's url] in [city name]. That script...

0
Q: Whmcs , Cloud Stack integration

ahmad05I have just bought WHMCS and I wanted to know , can I integrate WHMCS to my cloud stack On their website there is a link : http://www.whmcs.com/appstore/818/CloudStack-Pre-Billing-and-Provisioning.html that says we have module for cloud stack , can anyone guide me through the steps how to use t...

-1
Q: PHP int value is dependent on system

AsurayaI use same code in different machine. Ubuntu 64 $test = 51339780210; echo (int) $test; die; //result : 51339780210 Centos 32 $test = 51339780210; echo (int) $test; die; //result : -199827342 Why these result is different?

0
Q: Dividing subnets with ipv6

Nick Martfor example, i recieved from POST ip and mask: $ip = 2001:db8::1428:55ab; $mask = 48; and i want divide this subnet, i choose for example mask and how many subnets i want, for example $mask = 50, subnets = 2 and my result is (tree in a table), like this: ip mask ...

0
Q: php get_contents - Keep original url for source files?

dadadeyI need to display content from an external page. This is my code: <?php $homepage = file_get_contents('http://www.domain.com'); echo $homepage; ?> It works, but all the paths/links for images, links and js files are broken. How do I do this, while keeping the original links? When I click "vie...

0
Q: why do my recent post titles replace the page title i am posting on

user2608169hi guys I have developed a website that has a latest news page which is titled latest news. When i add a post to this page the post title replaces the latest news title. Here is the latest news page with example post titles replacing the page title. http://www.norrisbiomedical.com/latest-news/ ...

0
Q: Drupal - Views - Taxonomy Term ID - custom template - anchors

Matthew TrowQuick version: How do I output a taxonomy term ID in a views template? I just want the numeric ID value. This will be used as a link anchor. Long version: Scenario, I have a view which displays a list of taxonomy terms. That view has a Page and a Block. The Page view is set to display the Bloc...

0
Q: Transforming 0x byte endparts into actual values

joltmodeI have hardware unit, that when requested some data, returns a string, that when exploded on space, returns array of values: $bytes = array( '03', '80', 'A0', '01' // and others, total of 240 entries ); These actually, depict bytes: 0x03, 0x80, 0xA0, 0x01. I need to transfor...

0
Q: how can i populate a file into a zend form element file

user2976252i really need your help , is there anyone who know how can i populate a filename and destination of this file into a zend form element file , i try something like this but it doesn't work $data = array( "file" => "/dossierPdf/".$this->_user_id->lastname.'/' .$donnee["nom_prosp...

0
Q: Activate mysql.trace_mode and apache crashes

Cédric GirardWapiti security scanner HOWTO tell to activate mysql.trace_mode = On in PHP config file to help it find security flaws. But with this option activated, Apache crash a lot, even when I just browse my website. This option seems valuable, but unusable for me for now. I have an Ubuntu precise (1...

1
Q: wordpress powered site's google search excerpt showing casino links

user3082408I have wordpress blog i just checked google search result of my site they are showing excerpt containing text like below "best site should try out for demo mode of gaming variants to adopt good gaming Participate in casino games online to take gamble online and increase your ..." When I visit s...

0
Q: substr check if 2 first chars is numeric not working

user3080063I have this, i followed PHP manual : if(is_numeric(substr($username,0, 2))){ echo 'Invalid - use letters in first 2 chars'; }else{ echo 'Valid'; } And i checked this string...

1
Q: How to compare text feild password with database md5 password.?

user2831560I want, the user will login when the username and password text field matched with database username and password.i stored md5() password in database.now to to compare the text field password and database md5 format password. index.html > <form name="f1" action="login.php" method="post"> <table...

0
Q: php composer ssl error

Morteza EdalatiI'm using php version 5.4.7 with openssl enabled(i checked this with extension_loaded function ). The thing is when i want to issue any command with composer like self-update, install, update i'm getting this error: [Composer\Downloader\TransportException] ...

-4
Q: how to store in mutidimensional array

user3070985SELECT t.Task_Owner,e.ename from EMPLOYEE e,TASK t,TASK_KEY a where //e.emp_id = t.Task_Owner and t.Task_id=a.Task_Task_id and (a.Task_Assignee ='$_SESSION[emp_id]' OR t.Task_Owner='$_SESSION[emp_id]') and a.Task_Task_id ='$_GET[task_id

0
Q: Connect to google.com via ssl

GuitarFanIm using this code $sock = fsockopen("ssl://google.com", 443, $errno, $errstr, 30); if (!$sock) die("$errstr ($errno)\n"); fputs($sock, "GET / HTTP/1.0\r\n"); fputs($sock, "Host: google.com\r\n"); fputs($sock, "\r\n"); $headers = ""; while ($str = trim(fgets($sock, 4096))) $headers .= "$s...

0
Q: Accidental html entities in URL on get request

Carlos GoceI have a curl app using http post/get requests on my web service. Now, take a look at this request: http://www.myws.com/index.php?&param=12345 The &para is this symbol: ¶. And i wonder if maybe this is why my request is not working. My request looks like this: $url = 'http://www.myws.com/inde...

0
Q: mysql select with inner join giving me looping result

Peter ReginaldHi folks I am stumped with a problem I'm getting with the following mysql query: SELECT tp.ID AS tpid, p.firstName AS pfname, p.lastName AS plname, p.dob AS pdob, fix.homeTeamID AS fixhtid FROM fixtures AS fix INNER JOIN teamSeason AS ts ON fix.homeTeamID = ts.ID INNER JOIN teamPlayers AS...

0
Q: How can I include Twitter Bootstrap in my php application?

user3027052Hi I'm using MAMP as my server and I've downloaded the bootstrap documentation and included them in my htdoc folder where all my files go to. I've also linked them using the <script> tag but bootstrap doesn't seem to be working. I just get normal html styling here. How can I fix this, and what ca...

0
Q: How to compress a html file with generated from multiple php source file without aid of apache module?

TheBeaconeg. file structure +Site | +private_files | | header.php | | footer.php | | head.php | | anlytics.php | | blah1.php | | blah2.php | | blah3.php | index1.php | index2.php every serving file requires header.php,footer.php, head.php, analytics.php. besides index1.php...

0
Q: php,Ajax,jQuery:PROFESSIONAL way to create a multi-language website?

prantik Vaghelai see many sites on the web that have a language option usually two or three languages and it changes the entire site in that language. i want to know how to do it professionally? is there any plugin that makes life easier? can google-translate be molded to make this happen? i want to change ...

0
Q: Slicing big array: Cannot use a scalar value as an array

ex3vI'm creating a batch procedure that deletes lots of unnecesary data from database periodically. For performance reasons I'm not using any ORM, I just: get primary keys of selected records from db in one query, and delete them in next query. The problem is that there are sometimes literally m...

0
Q: Inserting into two SQL tables using a value from one

ElendilTheTallI am building a simple event registration system using MySQL and PHP. I have four tables: events: event_id, event_name instance: instance_id, event_id, date attendee: attendee_id, attendee_name, attendee_email, attendee_tel registration: reg_id, attendee_id, instance_id To clarify, the insta...

0
Q: how to divide minute by three in php operation?

cj333$minute = date('i'); if($minute%3==0){ //if minute is 0,3,9,12,15...do something }else if($minute%3+1==0){ //if minute is 1,4,10,13,16...do something }else if($minute%3+2==0){ //if minute is 2,5,11,14,17...do something } How to divide time by 3, i know $minute%3==0 could run if minute is...

0
Q: PHP Multiple cicle for create one single array

almalin my project i have to find backlink to a specified domain. I use this function: function googleBL($uri,$start) { $url = "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=link:".$uri."&start=".$start."&rsz=8"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch...

0
Q: Page updates after Refresh

Afroz AlamCurrently i have a site in magento.When i update anything the page loads but doesn't show the updated value. For example quantity of items on cart odesnot show updated when i update but shows when i refresh the page. When i refresh the page again it shows the updated value. This issue is not only...

0
Q: Retrieving last MongoID using Codeigniter

jonprasetyoBeen using MongoDB with Codeigniter for a bit and i have run into something that I cannot find on the web. I know that if we do the SQL way we just call: $this->db->insert_id() to get the last insert into the database. However, I am using MongoDB and my question is, is there a MongoDb way? I tr...

0
Q: PHP Excel Bug ignores sheets starting with a number

FewsterI've been successfully using PHPExcel for uploading xlsx/xls workbooks and splitting them in to CSV files to be processed using Zend Framework. I've encountered a bug that Worksheets beginning with a number e.g. 12Sheet are ignored/excluded from the worksheets collection. Does anyone know where...

0
Q: How to insert and update an array variable to WP user meta?

Lik Bez PujankiI want to have an array variable inside WP user meta, so that I can group related variables together in an array and loop through them later when I need to access them. So far I've used update_user_meta() function to insert multiple variables at once like this: $usermeta = array( ...

0
Q: Wordpress routing to specific functions

Bujanca MihaiI have a class and I would like to call a specific function from that class when a button is pressed. I typically use laravel framework in development and I have not used wordpress so far. In laravel I have a file named routes.php and there I route the functions like this: Route::method('url','co...

0
Q: Check for coherency in an array?

user1856596I have an array with elements like this: 1_elem1 2_elem2 3_elem3 Now I want to check if something in that structure is out of place. Out of place means: The numbers in front are not succeeding Numbers are missing Whats the shortest way to do that in PHP? I thought of sorting the array and c...

0
Q: Attach pdf in real time

user3095100I am generating a pdf through pfdf, its working fine, but i want attach pdf which are already generated. Following is a example to explain in detail. Suppose i have two pdf B anc C, now i generate a pdf with fpdf which i A, now what i want is that the other two pdf B and C should be appended in ...

0
Q: How to pass value in Xpath Path Expression in php

user3095048I have in xml as below <delivery_codes> <postal_code> <pin>400103</pin> <pin>400104</pin> <pin>400105</pin> </postal_code> </delivery_codes> and I want to get the input value as pincode and check pincode is exists in xml. Here the PHP code. <...

0
Q: PHP - Show Array value

dA_uNknOwNi have a little problem how to show the array values of this script. It scans after filenames with string "tn" inside a dir and gives out a array. array(2) { [0]=> string(13) "pics/tn_2.jpg" [1]=> string(13) "pics/tn_1.jpg" } I need to know how i can just show one value for example echo array...

-1
Q: PHP Left Join Error

user2737457I have a news table and want to link it to the members table to get the author information using Left Join, but I can't get the information to show from my php statement. Here is my php code: SELECT news.*, members.avatar, members.type AS membertype, members.name FROM news LEFT JOIN members ON ...

0
Q: How to get access outside HTDOCS with PHP script

SteveI have a webserver with Apache. For security reasons my customer wants to access files (.jpg/.pdf/.png/.gif) in another folder. The root layout is as follows: backup data etc htdocs logs tmp In the htdocs folder the Joomla website resides. I use flexicode to add PHP code to the site. Is t...

0
Q: MySQLi and PDO Connection in PHP

user3095133I was a MySQL PHP coder, but then I realized that MySQL is now deprecated and is vulnerable to SQL Injections. I decided to move on to some other way. I was wondering what is better, MySQLi or PDO? What is the Most Secure? What is quick in loading up data? What is not vulnerable/least vulnerabl...

0
Q: Receive post data when submit pdf form

Duc AnhI have a pdf form, user can fill it and press submit. When user press submit, I just dont know how to get form data in server. All I could get is this string via $GLOBALS['HTTP_RAW_POST_DATA']: "%FDF-1.2 1 0 obj <</FDF<</F<</Type/Filespec/F(http///mysite/test1.pdf)/UF(http///mysite/test1.pdf)>>/...

0
Q: How scann qr code in a web application?

user3065090Hi I would like to scann a Qr code in a PHP web application with a smartphone camera but I don't find how . I have tried this http://chris.m0nk3y.net/blog/post/scanning-barcodes-from-your-mobile-web-apps http://zxing.appspot.com/scan with this link zxing://scan/?ret={CODE}&q={CODE}&SCAN_F...

0
Q: Recursive count of employees under a manager using mysql

SwadeshI need the list of all employees, following the hierarchy of the manager using MYSQL from the following table. In oracle or mssql it is easy job, but could not find any solution in MySQL. Can anyone help me out how to sort it out. id name manager 1 John 6 2 Gill 7 3 Ben 2 4 ...

0
Q: ajax to post data and run php sql query on click

TomI'm trying to get it so when a button is pressed it runs a PHP function without reloading the page. I have this button: <div class= "obutton feature2" data-id="<?php echo $bookID;?>"><button>Reserve Book</button></div> Which I want to run: <script> $('button').click(function() { ...

0
Q: Laravel 3: Error responses not extending base controller (where assets are defined)

alexleonardI might be approaching this the wrong way, but in my Base Controller I have defined, in the construct, my Asset container "header", eg: Asset::container('header')->add('main-css', 'css/style.css'); // etc As all my other controllers extend the base controller this is working fine and my assest...

0
Q: Validator for multiple fields at the same time in Symfony 1.3

francesco stablumI have some legacy code with an old version of Symfony (1.3). I wonder if I can create a validator that handles two or more different fields at the same time. I have read this article here: http://symfony.com/blog/call-the-expert-how-to-implement-a-conditional-validator that suggests to use s...

0
Q: Magento php core. Editing Product List Catalog

user3095049I got a quick questions for magento experts. I would like to make changes on the php core of magento. I want to add details on product listings, the details will depends on each product, and I want to display the extra details on the catalog list, so it involves the database & php. So my quest...

0
Q: Api integration of FedEx in php

irfanIs their any one have code or any kind of help in PHP for FedEx APi services (transit times , shipment labels , return shipment's ). Thanks,

0
Q: How To Write A Customised Query To Fetch Result Array An Display

user3016447following is my query how do i place what code in view ,model,controller in yii select productid, count(*) from fc_member group by productid order by count(*)desc LIMIT 3 Please let me know i am a newbie i did try but then do not the how and what of it :( controller `public function actiond...

0
Q: Getting this error " Unknown column 'bus_name' in 'field list' "

sarmistha Action page <?php include("config.php"); error_reporting("-1"); $bus_name=$_POST['bus_name']; $bus_no=$_POST['bus_no']; $ticket_number=$_POST['number']; $booker_name=$_POST['name']; $sql="INSERT INTO ticket_details(`bus_name`,`bus_no`,`ticket_number`, `booker_name`) VALUES('$bus_name',...

0
Q: run high load php files without hurting server performance

Mehdi AziziI want to run php files (witch is based on mysql queries) frequently on my server. this files do jobs like mysqldump and and also calculating users rank. high load caused by running this files hurt server performance. Is there a way to run these files with lower periority or something? I have s...

0
Q: Why am I recieving MySQL Error 1064 when using an import script for OpenCart?

Tom TurnerI am currently using an import/export module for my OpenCart ecommerce store. The module works by exporting the OpenCart category and product database to an excel sheet which can then be edited and imported. We decided to use this module to bulk import our products. The first 953 products impor...

0
Q: If Condition inside php variable

user3065100I am stucking with a problem. I have html element inside php variable. Now i want if condition inside html elements. My code is like this. <?php $x = 1; $html = '<style> b { paading:0; margin:0; } </style> <table width="790px" style="font-f...

0
Q: Executing Javascript with php and echo some vars

Irene T.I am trying to execute a simple javascript file with if and else in php. So far it is working but i have an issue.. See the example bellow. <? $varone = "Popup One"; $vartwo = "Popup Two"; if ($_GET['myrequest'] == "") { echo <<<html <script> alert($varone); </script> html; }else{ echo <<<html

0
Q: Building multiple pages - php insert from database?

SwitchfireI'm not sure whether this is in the right area, but I have to create about 300 pages all about different areas. This is going to take ages, but what I thought I could do is use a PHP script to pull the data into a webpage template (My premade page without content) then saves the file under a fil...

0
Q: rotate and store the rotation of a image in a php/mysql website?

prantik Vaghelai am creating an photo uploading website and i want the users to upload their images. uploading is done, no problem, BUT, some images taken with the camera held vertically so the image looks like this: http://s30.postimg.org/o5tqpg4dd/like_a_boss_Copy.jpg i want to give users the option so ...

0
Q: Twitter API 1.1 - everything is fine but sometime it returns null

Farhan<?php include ("TwitterAPIExchange.php"); $url = 'https://api.twitter.com/1.1/statuses/user_timeline.json'; $settings = array( 'oauth_access_token' => "2239564530-xxxxxxxxx", 'oauth_access_token_secret' => "Fu8ASZzoxxxxxxxxxxxx", 'consumer_key' => "Idrxxxxxxxxx", 'consumer_secret' => "sKwriKxxxxx...

-2
Q: Twitter Bootstrap not working with php

user3027052Hey guys I'm using php with Mamp. Hey Guys, apparently bootstrap isn't appearing in my basic php application. I have on index.php file. This is my code: <!DOCTYPE html> <html> <head> <title>Summit</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!--...

0
Q: Displaying date and time with slashes

avenas8808In my database I have these columns: id user regdate To give an example: 1 Myuser 2013-03-12 07:48:00 How could I, using, PHP and PDO, format the date, so it displays the date as this: 12/03/2013 07:48:00 I'm newish to PDO and datetime.

 

« first day (296 days earlier)      last day (14 days later) »