« first day (259 days earlier)      last day (51 days later) » 

6:05 PM
0
Q: Wordpress - Different background-image for different pages

Jack HardingI have a background-image for a div that is present on every page. I was wondering if there was a way to change the image on different pages?

-2
Q: PHP/MySQLi fetch each row to separate array

user2957463I am trying to find an easy too fetch all rows from mysqli prepared statement to into seperate arrays. Any ideas?

0
Q: G+ sign-in with php origin_mismatch

OdOI'm trying to G+ php Sign-in, I'm getting the error in the pic "origin_mismatch" I'm running wamp server on port 80, and in the application console I set JavaScript origins: http://localhost:80 so ?!! p.s: where should the API library files be relatively to the signin.php page?

0
Q: Why are my MySQLIi functions not giving values for any variables?

user2957232You'll have to excuse my amatuer knowledge of both php/mysqli and sql, but I am trying to work a simple log in system for a hobby website I created/am creating and I cannot seem to get any values back for the life of me. I'm basing my code of the first example (object oriented style) at http://ph...

0
Q: php comment script from gentle source not working on 000webhost free server

Savio GonsalvesIndex.php <?php include './include.php'; ?> <html> Page data <?php echo $c5t_output; ?> </html> include.php <?php /** * GentleSource Comment Script * */ define('C5T_ROOT', '/comment_script_2.1.2/'); include C5T_ROOT . 'comment.php'; ?> I get this below...

0
Q: Json_encode or remove last comma?

user2883183I figured out how to get my desired result (almost). My code adds a comma at the end before the last ] so it wont quite work. I know I can use Json_encode to build my array from my external json but I'm stumped. I either need to remove the last comma or use json_encode (which i'm lost on) any ...

0
Q: Filtering a multidimensional array

LearningI have the following table in DB: id | letter ---|-------- 1 | A, B, C 2 | D, E, F 3 | A, C, E 4 | B, D, F 5 | G, I 6 | H How do I list the values ​​and the result is A B C D E F G H I ?

0
Q: Parse error: syntax error, unexpected (T_STRING) on line 1

user2135790I am creating a script to prevent empty user Location field based on a previously developed filter function. On localhost everything works fine but online i got strangely his error : Parse error: syntax error, unexpected 'QA_INCLUDE_DIR' (T_STRING) in /home/picas/public_html/plugin/location-...

1
Q: MySql ORDER BY multiple columns IF AND

cfgtrewSo I've joined two tables for a particular query. After a complicated SELECT statemnt, the table would look vaguely like this: $myid = 3 PostID | FromUserID | To User ID|Date | PostSeen | NumLikes |SeenLike 61 | 48 | 3 | 5/11/13 | 1 | 1 | 1 59 | ...

0
Q: Get value input table many row

Nhat Tuan<?php $a = array( array('id' => 1, 'name' => 'Kelly'), array('id' => 2, 'name' => 'Tuan'), array('id' => 3, 'name' => 'John'), array('id' => 4, 'name' => 'Ly'), //many row like this ); echo '<table>'; foreach($a as $new){ echo '<tr><td>'; echo $new['id']; echo '</td><

0
Q: Foreach in laravel 4 Controller rendering in View

Bart MoonsI'm writing a booking system for my webapp. I get the output I want in my Controller with print_r. Unfortunately I have not been able to get the right output in my View. $userId = Sentry::getUser()->id; $my_garden = DB::select('select * from gardens where userId = ?',array($userId)); foreach($my...

0
Q: How to add module into content in joomla 3.1

Valdis AzamarisLet's say i have such html/php structure of index.php in my template: <div class="content"> <jdoc:include type="component" /> <div class="price_request"> <div class="right_area"> <jdoc:include type="modules" name="price_request" /> </div> </div> ...

0
Q: Using href in jquery with get method

Alonso González Nestali´m learning jquery and i have a question. On html, when i want to pass variables by get, i write: $subject=$_GET['subject']; $id_user=$_GET['id_user']; $id_pupil=$_GET['id_pupil']; <a href='process.php?subject=".$subject."&& id_user=".$id_user." && id_pupil=".$id_pupil."'>Add</a> But i wa...

0
Q: MySQL different values from same group Id

Levent KayaHere is the code : $sorular_hepsi = mysql_query("select * from tblsorular where hafta=1 order by rand() limit 1"); $soru_ust = mysql_fetch_assoc($sorular_hepsi); $soru_id = $soru_ust_rs["id"]; $soru_grup_id = $soru_ust["sId"]; $sorular = mysql_query("select * from tblsorular where sId...

0
Q: use a single value from multiple text boxes into an sql query with php?

phpbeginnerI have 5 textboxes in querybook.php which takes the values of bookid bookname bookauthor bookpublisher and bookedition from form in html (text boxes) to search for a book. Bookid is the primary key of book table. When user fills up all the fields in the html form then it is ok. when the user fill...

0
Q: Call object that another object is contained in

JeffSo I'd like to be able to call a method of an object from a created object as deep as I'd like. For example $test = new sampleObject; $test2 = $test->createChild(); $test3 = $test2->createChild(); ... catch is, I need to be able to refer to a method from the topmost creator class. so I have...

0
Q: Split php string and keep delimiter with the first output

user2898514I'm trying to split a php string in to parts the first one include the delimiter but the second one doesn't $string = "abc==123"; What I want exactly is to get $string['0'] = "abc=="; $string['1'] = "123"; Thanks for help

0
Q: PHP - Upload images to FTP directory and then Display images uploaded only from directory

Don Misquittai simply want that after i upload an image using form file upload, it will display those images on the next page. The images are uploaded to a folder on the ftp. i have looked everywhere but cant seem to find the right solution. this is the HTML code for uploading image (image.php): <form encty...

0
Q: Datatable server processing

user2957541We can get our datatable working without server side enabled upto 10,000 rows, however we need server side processing because we have 200,000 rows in our table. Our current code is: $('#example').dataTable( { "bProcessing": true, "bPaginate": true, ...

0
Q: PHP fwrite() , could not fill txt

user2894433after code execute my file look like this: 1.info 2. 3.info 4. 5.info .... Sry for the bad english , i tried with different mode in fopen but still the same. <?php $file = 'data.txt'; $lines = file($file); $newArr = array(); $f = fopen($file,'r+'); foreach($lines as $value){ $newArr[] = $v...

0
Q: How to start building e-commerce website

Mike Yeahlooking for direction on an commerce site. I want to know if I can build using wordpress. Also what specify languages and type of coding will I be using.. I want to pretty much create a site that basically functions as a “For-Sale Classifieds”. Also sort of like ebay without auctions. But rathe...

0
Q: How to save the jpg file from base64 data

PasargadI have the base 64 data for my images and I want to save them in my local machine as JPG Files. My base 64 code starts with data:image/jpg;base64,/... I already tried to save it by the following code: file_put_contents('MyFile.jpg', base64_decode($imgData1)); But I cannot open the create...

0
Q: Character set in PHP, mySQL and emails

TrapezeArtistCharacter sets are driving me round the bend! My database is utf8_general_ci and the tables within it are utf8_unicode_ci. All my PHP pages have <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> in the head. When I type a euro symbol (€) in the PHP page and input it to the ...

1
Q: In PHP is there any purpose to defining an array before it is used?

billynoahConsider a chunk of php code like this: $example = array ( 'Location' => 'farm', 'Name' => 'billy', 'Meal' => array()); $example['Meal'] = ('Fruit' = > 'apple', 'Soup' => 'tomato', 'Drink' => 'wine'); Is there any benefit or reason to pre-define the 'Meal' sub array like that beforehand rather...

0
Q: Maximum execution time of 30 seconds exceeded Laravel 4 error

zachstarnesI am having an issue with a certain function that sends a password request within my UserController in laravel 4. It checks to see if the email exists in the database then sends an email if the user does. The function then creates a token in a table and sends that at the end of the link within th...

0
Q: passwordprotection for uploading a file

ahc59I have the following question, I have a website, and in the website a page named "download" I would like to have a download button for a user to download a file from my server. On this server is a directory called "Download". I would like to place there more than one file for users to download. W...

0
Q: What Mysqli value for bind_param() i or s

user2722667I am using Mysqli bind_param when im inserting stuff to my DB. When I tried to insert a phonenumber as "0737327373" the value got inserted as "737327373" without the leading "0". But when I changed bind_param("i") to bind_param("s") instead the value got inserted correctly as "0737327373". So sh...

1
Q: How to override a rule/sniff in a PHP CodeSniffer ruleset correctly and to avoid doublechecking of code?

automatixI've extended a class of the PSR-2 sniff set. Now the checks are executed two times -- even if my chid class is empty. Why? And how to do it correctly? Code: [CodeSniffer]/Standards/ZF/ruleset.xml <?xml version="1.0"?> <ruleset name="ZF"> <description>...</description> <!-- Include ...

0
Q: Active MySQL add - Confused

user2955368This is the error that I keep getting after I hit "Register" the email sends and all, however when I go to activate it under activate.php it gives me this error..: Unknown column 'active' in 'field list' I do understand that it wants me to add that field to the database I believe.. However I d...

-1
Q: PHP OOP : Accessing parent attributes from child / Child inheriting from parent's attributes

adabaso the code is : DAO class abstract class DAO { protected $db; protected $SQL_host='localhost'; protected $SQL_port='3306'; protected $SQL_dbname='projet'; protected $SQL_login='root'; protected $SQL_password=''; protected function __construct() {...

0
Q: How to add coupon codes in magento invoice pdf print?

user2957578I tried editing /app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php for a quick fix and added a simple code code inside the getPdf function $page->drawText('Coupon Used: '.$order->getCouponCode(), 200,40, 'UTF-8'); then I tried to print it again in Sales->Invoice but seems like the changes aren...

0
Q: Inheritance PHP, passing methods and using children's properties instead of parent's ones

PobeWhy does parent's method getHC() passed to Professeur refers to $this->quota of parent (Enseignant) instead of children's $this->quota. abstract class Enseignant { private $quota; //empty public function __construct($nom, $nbHeures)[...] public function getHC(){ return $this->nbHe...

0
Q: exec command in PHP doesnt work whereas command line works

user2957592I am using windows. I have a PHP version 5.3 When i go to command prompt and type mode COM4, it works like a charm. When i use exec("mode COM4") nothing happens, and thereafter, even command line refuses to work. Using command line after that says "Device COM4 is currently not available" Any s...

0
Q: Concatenate and Count the multiple rows in single rows in mysql

DnssousaI want to concatenate and count data of the same column, so I can concatenate but I can not count the repeated data. see below the table ID bills  class 1   0.5    2 2   1      1 3   0.5    2 5   1      3 6   0      2 7   0.5    1 8   1      2 9   1      3 10  0.5    1 11  0      2 12  

0
Q: Cannot install FireBird on XAMPP

Nadir NovruzovI have windows 2003 server and XAMPP running on it. Now I can't configure PHP to connect to Firebird server. I cannot install firebird support on php. I have uncommented extension=php_interbase.dll and extension=php_pdo_firebird.dll and I have downloaded gds32.dll from here http://www.dll-files....

0
Q: creating an excel file from ms access database from php

user2606912i am creating an application in which i have to create an excel file which is a replica of an ms access database file. The access file is updated automatically from other electronic machines and stores some infomation in tables. Now i wanted to create an excel file which contains same data as tha...

0
Q: PHP method="post" stopped working after I added this .htaccess... Why?

Lucas BI've added this .htaccess to remove file extension from the URL, so instead "index.php", it would show "index" only, all the times. But after I did it, my <form method="post"> stopped working Options +FollowSymLinks -MultiViews Options +Indexes AcceptPathInfo Off RewriteEngine on RewriteBase /...

-1
Q: Change text to link automatically

John SmithI'm trying to automatically change it so that every text that looks like @username (@ sign first, username after, no space between), automatically changes to a link (or a certain color). How would I do this? With javascript? Thanks.

0
Q: Magento How to remove the title field from product review form?

igrossiterhow can I remove the the title text field from magento product review form? It could be something as simple as making the title not required and hiding it thought css, is that possible?

0
Q: Codeigniter Error message : i got this codeigniter error

Ahmed Alii got this codeigniter problem : i run this login application but i got this message : Failed Login: Check your adminname and password! Although i enter the right admainname & right password so why it can't direct to the another page view and give me this error message ?! Controller : class...

0
Q: Laravel Model Relationships

Lucky SoniI am playing around with Laravel Models and i came across a fairly common database design pattern for which i am unable to establish relationships (using Laravel). Here is the Database design If we only take into consideration the following tables (for simplicity): 1.Customers 2.Products 3.Pro...

0
Q: Convert date to miliseconds for highchart date

Tariqhttp://www.highcharts.com/stock/demo/ I'm working on above hight chart "Highstock - Single line series". But i'm stuck with the date format of Highstock - Single line series. the json format is showing the date format like '1162857600000'. how to convert date like 11/5/2013 to that format ? Is...

0
Q: Protecting PayPal donation form from XSS - CodeIgniter

a7omitonI'm really paranoid about whether my donation form is safe from XSS or not (maybe I've been reading too many XSS articles). I've used the button generator provided by PayPal and inserted that into my page, but I also added a select element which has the 'item_name' value as its name attribute (on...

0
Q: Run Script on form submit

user2957677I've been looking around for this and am really confused, there are similar questions but I cant seem to make any of them work. So I apologize if this has been repeated before. Here's my problem, I need to run a php script on form submit instead of re-directing to that page. Here's my code: Form: <

1
Q: MYSQL query fails with encoded entities

Bart SchefferI have the following query which should count how many rows there are with the same values: $query = mysql_query("SELECT * FROM top2000 where artist='$arEnt' AND title='$tiEnt'", $link); It's works perfectly, but since users can typ in '"', "'" or any other non alphabetic charactar, I first en...

-3
Q: Developing API from PHP application

user2576961I am putting together a new php codeigniter application that will be used by several companies through the use of an API I want to develop. This is a concept this new to me and was pointed out to me as a good idea to look into and I'm here to ask for some quality references that I can read up on ...

0
Q: Cant set Virtual host with Xampp

temp-learni am trying to set my Virtual Hosts. This is setting for my Hosts File 127.0.0.1 localhost 127.0.0.1 test.local And this is my setting in httpd-Vhosts.Conf file <VirtualHost 127.0.0.1:80> DocumentRoot "C:/xampp/htdocs/test" ServerName http://test.local/ ErrorLog "logs/du...

0
Q: Loop and display records from table using SELECT WHERE (PHP) (SQL)

VereonixI'm in need of echoing to screen specific records from a table based on the value of one field in the record. I have a table which has the names and addresses of people I wish to echo to screen all the records (not all data from the record) where for example the country is "GB". I have current...

0
Q: Best practice for exception handling: PDO + controllers & repositories

NQQI've searched around for best practices on using exception handling with PDO, but most examples only look at it from a simple one class approach. If I'm using controllers and a repo in an ORM type model, where should the various try/catch, and throw blocks happen? A simplified example: CONTROL...

0
Q: How to get specified content from indside a div

kavenHow to get content (a specified content) from inside a #div. I have form like: <?php require_once('phpQuery/phpQuery.php'); $key-one = $_POST['key01']; $html = file_get_contents('http://google.com/search?q='.$key-one.''); phpQuery::newDocumentHTML($html); $result01 = pq('div#resultStats'); ?> <...

0
Q: How to make my mysql code secure?

user2955368I was wondering how to make my code secure.. I understand there are tutorials and I've seen some answered questions, however I am confused.. If someone can please explain and show me what I need to change to make prevent it from SQL injection, that would be great! :) Here's my home.php which con...

0
Q: Blob images are not displaying on IE and Chrome when using base encoding 64

user2957684Here is my code to show blob images on my webpage.. $sql=mysql_query("SELECT slider_id,date,page_image FROM news_slider where date='$ndate' order by slider_id ASC LIMIT $start, $limit"); // the result of the query //$result = mysql_query("$result") or die("Invalid query: " . mysql_error()); ...

-4
Q: Undefined Index PHP Mysqli

user2041211in this code have a fault in foreach cicle, but the strange think it does not work on my pc but work on my fiend pc This is the code: Thanks :) <?php include("Database.php"); $sql = "SELECT * FROM utenti"; $rs = $conn->query($sql); if($rs === false){ echo "Errore Si...

0
Q: Symfony2 and avoiding overly verbose code

wwarrenIn most of my controllers, I need to get a reference to one or more of my custom entity repositories, so naturally, I do this a lot: /** @var $repo MyFirstEntityRepository */ $repo1 = $this->getDoctrine()->getManager()->getRepository('MyNamespaceMyBundle:MyFirstEntity'); /** @var $repo MySecondE...

0
Q: Determine the current environment and requesting origin - need to define variable

ChristoI have almost all of my code complete except for one last variable, $currentEnv = '???' . How do I detect the current environment with this syntax?? /** * CORS Implementation to support AJAX requests from mobile site * @see http://en.wikipedia.org/wiki/Cross-origin_resource_sharing ...

0
Q: .htaccess - after redirect from non-www to www, removed .php file extension appears

user2957669I'm trying to redirect from non-www to www url. I have allready done removing .php file extension from files and forced trailing slash, but now when I do redirect from non-www to www, next happens. When visiting urls with www, everything works OK, extension is removed and trailing slash is adde...

0
Q: Convert MSSQL time with decimal precision into PHP time and MySQL DateTime

kidonchuI am trying to convert MSSQL time into PHP time and then MySQL datatime. MSSQL time format looks like this. 2011-10-07 16:55:37.337 I want to insert this exact representation into MySQL database. To achieve this, I am using PHP. date(strtotime('Y-m-d H:i:s', $time)) But if I do it like this, ...

0
Q: fetch 'id' from backend and pass it at index.php

user2819264i've created a slider in which images of different galleries cab be displayed . gallery can be created dynamically from admin. now i want that admin can select the default gallery to be displayed from admin panel . i've created defaultgallery.php from where he can select gallery.i want to pass th...

0
Q: PHP gather all checkboxes and sort checked vs unchecked

AustinI'm working on a HTML form that contains a ton of checkboxes. I would like to use PHP to create 2 variables. One variable that contains the values of all the checked checkboxes and another variable one that contains the values of all the unchecked checkboxes. Does any one know the best way to ...

0
Q: PHP: MySQL to table

user2811921just wrote simple php code that would print some of these rows That's how does my table structure looks like: http://i.stack.imgur.com/ne13t.png That's my php code: $user = mysql_query("SELECT usr FROM ava_members"); $id = mysql_query("SELECT id FROM ava_members"); $email = mysql_query("SELECT...

 
7:47 PM
0
Q: Access Facebook Grapg API with Access Token - Storing that data - is it okay?

Michael SomervilleI've been doing hours of research on this topic and it seems to be short of a complete answer. So I am hoping someone on here can help me out - I don't want to have issues with my Facebook accounts and apps. Development: We have created a application that acquires the users Friends, Subscribers,...

0
Q: Adding the jomsocial toolbar to a module in joomla 3.0

FlippinmonkI need your help. Is it possible to add the jomsocial toolbar to a module in joomla 3.0 programmatically? In the past (Joomla 1.5 / 2.5) a few different methods worked but I guess upgrades changes this. I have searched high and low and tried every method I know. Thanks in advance! This is my cod...

0
Q: Create a proxy with php that supports cookies, css, javascript to store data

FarzanI'm trying to get all the code sent from a web server and parse the data received for some analysis. Since the site doesn't have any API's for this data nor can you save the data, the only way I can think of is connecting through a proxy code and saving all the received code. A simple approach wo...

0
Q: Custom Wordpress Admin PHP

GO3DExpansionI am trying to load images from a specific directory to load into the admin settings page for my current theme. <?php $dirname = "panos/"; $images = glob($dirname."*.jpg"); foreach($images as $image) { $imageNameLong = substr($image, -14); $imageName = substr($imageNameLong,0 , -4); echo ' <im...

0
Q: Sending multiple arrays with jQuery .post()

TylerI have looked and can't quite come up with an answer to this question. I currently have an array which I call dataArray. The dataArray contains 2 keys (name, value) and is set up like this: dataArray.push({name : file.name, value : this.result}); I am passing this array to my PHP file using the ...

0
Q: Use DataTable to show 50 rows from Database with ability to search entire database

MichaelI have a table in my database to keep track of specifications: | specs | id spec_name url common_spec notes In this table are about 8,000 specs. There are about 100 of these specs that I use often while the rest I need on hand in case the need to use them arrives. I use DataTables to show the...

0
Q: get id of affected row in codeignitor after an update

Sami RalakHow do i get the id of the affected row after doing an update in CodeIgnitor? NOTE: $this->db->insert_id() which gets the last insert id returns 0 after an doing an update like so $this->db->update(_table_name). Doing $this->db->affected_rows() will return x number of affected rows so my questi...

0
Q: PHP ComboBox display selected value on other page

TiagoI want to show the selected value from a combobox that is on one page, and then show it on other page, and it worked with this code: Code on page1: <form action = 'enviar.php' method = "POST"> <select required id = "cmbAno" name = "Make"> <option value="ano_1"> 1º </option> <option value="ano_2"

1
Q: Invalid query, syntax to use near 'INET_ATON ('IP')'

user1526124I'm getting this error: Invalid query: 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 'INET_ATON('188.92.x.x')' at line 1 While trying to insert IP Address in database. The column type is: 'LastIP...

0
Q: JSON API with Vocalocity

Brian LoganI am attempting to connect to this API with jQuery, (Documentation here: http://support.vocalocity.com/wp-content/uploads/2012/10/API-Guide1.pdf) and I am having trouble with the connections. What I am trying is I $.get('https://my.vocalocity.com/appserver/rest/user/null?htmlLogin=username&htm...

1
Q: Pass filenames by to my javascript files

gumbleI need to pass by a filename and location (send_message.php) from my wordpress plugin to a javascript file, so that I can use send_message.php with ajax in my js. Now first thing I thought is to just echo the name in a hidden div or set it as an attribute of some tag and then readout that value ...

0
Q: how to preg_replace Ckeditor added multiple <br /> s

ytsejamI am using CKeditor with KCfinder. When adding blog posts; when I want to add a photo I create a 2 rows table. At the top part , I upload a photo and at the bottom part I write a caption. The problem is that when I publish the post , I realize many line breaks are added to my post. When I chec...

0
Q: Exception in thread "main" how to solve java.lang.ArrayIndexOutOfBoundsException: 0

user29578211.i am new to java so im a noob but im trying to make this chat server and client the server so far will run but the client wont and returns the error in the title please help and try and keep it noob friendly :) import java.net.*; import java.io.*; import java.awt.*; @SuppressWarnings("serial"...

0
Q: Issue with strpos in PHP

doonotI have a string that contains the paid modules of a user. If the module is not part of the string, an error page should be shown. The variable $paidModules contains reminder newsfeed system finance This is the PHP part where I check if the user paid for the module. If that is not the case, the ...

0
Q: Parse string as a PHP array

SalimI have following string <DReport> <message id="1023012301" sdate="2005/7/19 22:0:0" ddate="2005/7/19 22:0:0" status="N" /> </DReport> How to parse this string as a PHP array $report = array( "id"=>"1023012301", "sdate"=>"2005/7/19 22:0:0", "d...

0
Q: Yiiframework Ajax get for each item

York KeijzerIn an application I am working on, users can construct different items. Each item takes a couple of minutes to construct. (see Dynamically update progressbar yiiframework) I use ajax to dynamically increase the percentage of the progress bar with the following code(I'm completely new to ajax an...

0
Q: string comparison not working in php

Rahi M.I have a form where in a field m_id will be retrieved from DB and consecutive date will be taken as input. I have written m_id as the array key of the loan_date[] array. The form is as follows- <form action="includes/confirmloanprocess.php" method="post"> <table> <tr><td width="90">Motel ID<...

-2
Q: how to display all tables name from mysql database using php?

user2957799how to display all tables name from mysql database using php? I am using this syntax.. can anybody guide me where i m wrong.. thanks in advance <?php $db = mysqli_connect('localhost','root','','realestate'); // Check connection if (mysqli_connect_errno($db)) { echo "Failed to connect t...

2
Q: php library providing utf-8 file functions on windows?

Zack MorrisI'm working on a project that does a substantial amount of pathname manipulation. It runs fine on Mac OS X but to my astonishment, there's no way to call functions like realpath with utf-8 encoded strings on Windows. This is because setlocale on Windows doesn't support utf-8: PHP: setlocale in...

-1
Q: Is There an easy way to update a table and columns where the response array has the table name and column names in it?

Randy SmithI have a script that returns an Array from a api at a gaming website. It returns: Array ( [generalStats] => Array ( [pid] => 588754 [kills] => 500 [deaths] => 591 [kd] => 0.85 [points] => 515638 [playtime] => 80599 [dogtags] => 19 ...

0
Q: nginx w php-fpm is serving up select php files as code

ppostma1this is my nginx config: server { listen 80; listen 443 default ssl; # ssl on; # turns on port 80 too ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem; ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key; ## Domain is here twice so server_name_in_redirect will favo...

0
Q: PHP: Pick a limited amount of objects from an array of objects (based on properties)

estrarI need to pick 3 of the latest (10) entries from $data["entries"] and send those to the entries controller of the widgets module. I have no idea how to manage this in the most performant way. Here's some code from the controller that calls the module: $data["entries"] = Model_Entry::find('all'...

-3
Q: How can I use php to write to a text file on form submit?

user2957574I have a website that must be able to record when a form is submitted, I need to be able to access these records without them being public knowledge. This must also not record the actual data submitted, only the number of times the form has been submitted. How could I do this?

-1
Q: PHP Mac OSX not working

user1879242I need to make some homework related to PHP. I did it before on a PC but now I have a Mac I want to do it there as well. I uncommented 'LoadModule php5_module libexec/apache2/libphp5.so' And after that I restarted Apache, but still not working. What do I need to do? Thanks.

0
Q: PhpStorm MySql Double Quotes Literal interpreted as Column Name

user2957875I am newbie to PhpStorm. I have a mysql-query: $query = 'SELECT COUNT(*) FROM `FLAP_Messages` WHERE `placeId` = ? AND `type` = "orgwall" AND `Status` = ?'; And PhpStorm give me a warning - unable to resolve column "orgwall". If I change double quotes to single quotes warning disappear. How ...

0
Q: In symfony, what is a bag?

chrisjleeI've found a decent answer regarding what is a bag in the context of java: What is meant by the term "bag"? In symfony, is the term bag meant to be interpreted as the same way? Also, how is this different from a "container" or "collection".

-2
Q: The with insert in PHP

kilos$m = clearData($_POST['msg']); $sql = "INSERT INTO messages(message,message_from) VALUES('$m','$_SESSION['id']')"; I get an error on insert and I not found: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING

-2
Q: Fatal error: Class 'TPL' not found in C:\xampp\htdocs\index.php on line 4

user2928643it's me again, so last time i had this question related to my index.php... I couldn't fix it so i started ALL OVER again... but now i have a new problem.... This is my error: Fatal error: Class 'TPL' not found in C:\xampp\htdocs\index.php on line 4 Here is my index.php <?php require ('in...

-1
Q: php delete uploaded file and information from mysql table

user2957822I created with help of few tutorials simple php mysql file upload form. Here is my index.php code where the files are listed from DB. I desperately need to code some DELETE button here (delete.php), which will delete the file from directory and file information trom DB table. Any help ???? <?php...

0
Q: Is it possible to debug a remote server locally with multiple computers on the same IP Address

ej_dutchSo the short of it is this: We have a remote server with php that we need to debug locally. However, we have multiple developers running on the same IP Address. So even if the xdebug session hits the ip address specified by xdebug.remote_host, it doesn't know which machine it needs to connect t...

0
Q: Extra dropdowns or pop up form when sending mail in Gmail webapp?

user2957775How do you add a button/whatever in a compose message window in GMail so that on the click, it brings you to a popup form that queries data from a external MySQL DB, user selects criteria, hits send, and PHP on our side slices/dices the data and inserts it into our DB. Alternatively, is there a ...

0
Q: media server how to start

JohnI am thinking about creating a media server for my home. Where do I start? Ideally I would like to run an Apache server on Ubunutu running a php app to essentially house a search interface for streaming music and videos.. ie to centralize music from all devices if desired. All I have found so ...

0
Q: Setting up a DB with unemployment statistics and countries

SebaZThis is probably a newbie question, but I have searched quite a bit, and did not find a fitting example yet. Basically, I want to translate several tables like these http://tinyurl.com/o5ssheg into a database scheme. I am planning ton create tables, such as countries year 2013 (containing ...

1
Q: How to increment the key in an Array - PHP?

DimloLet's say that I have the following array : Array ( [0] => Jonny Cash [1] => Robert Smith ) How can I increment the array key in order to get something like this: Array ( [1] => Jonny Cash [2] => Robert Smith ) Thanks in advance!

1
Q: Best way to search this type of database structure?

user1796225This is an example of my database structure, I would like to know the best and fastest way to create a search function. orders_users Table: id || order_id || title || first_name || last_name || email || telephone orders_details Table: id || transaction_id || date_time || status Currently I d...

0
Q: Sanitising user input in Medoo

ParadoxicalIf anyone has any experience with Medoo, do you need to sanitise user input before inserting it into a database, or does it do that for you? If the former (which I'm assuming will be the case), how do you do this? mysqli_real_escape_string() requires the first paremeter to be the MySQLi link, but...

-1
Q: PHP/HTML form getting all the data in the mail. even the not chosen data

user2956852I am searching for a solution, i build a php/html form. When data filled in it comes to mail perfect in HTML. But now i also want the NOT filled in data in my mailbox As if you make a screenshot from the FORM filled in. And get it in your mail. kind regards Paul

0
Q: ajax request $_get not working

Dester DezzodsI'm having problems sending get request in php with jquery. it just can't detect the get value here are my codes: function getopmerking($id) { document.getElementById("popup_box").style.display = "block"; $httpreq = new XMLHttpRequest(); $httpreq.onreadystate...

0
Q: Login and Submit Data into Database from Same Page

bloodstorm17Hey so I have already created a PHP page which requests and authenticates a users credentials from the previous page. I want to know how I can make it so that once the users credentials do match up to whats in the database, they then are introduced to a few text fields in which they fill out info...

0
Q: What's a good way to add a quick search functionality to a PHP based website, without using java nor google site search?

CedricI would like to add a search field to my site. The site is based on PHP and the Yii framework. The web-server assembles multiple data (from files and APIs) before serving the resulting web-page. (the web-server will get these pieces of data out of a MySQL DB sooner or later, but it's just files A...

0
Q: php code doing mysql operations produces wrong results in a cron task

user2957591I am writing code in PHP using phrets library to download MLS records. If I ran the program from command line >php -f mls-download.php it will connect to the NTREIS server and download the records into my local database without a problem. However, when I create a cron task as follows. 0,20,40 0,...

0
Q: Extract attribute values from xPath query PHP

user1801060I'm an xPath and PHP newbie. I want to extract the attribute values from a tag <a onclick="sell_this_form('24042', '195'); return false;" href="javascript:void(0);">Sell</a> I want to extract the first argument to sell_this_form ie 24042. I've built an expression that ends this way .../a/@onc...

0
Q: retrieving php session values to use as variables afterwards?

user1227914I have something here that's probably really easy but I've spent the past 30 minutes searching Google without success, so I'm hoping someone can help me with what I'm doing wrong. I have certain values stores in sessions on the server and I'm trying to retrieve them on a per-user basis to then u...

0
Q: How can I pull the order value of a sale from Magento Go?

arielI am using Mangento Go and after a sale has taken place on the confirmation page I am using a JS code that needs the value of the sale in a variable like $totalvalue. I am unable to find something in the templates to grab that value and put it into a variable. ANy ideas on how I can do this? I a...

0
Q: Codeigniter Post Value From Form 1 Changes After Submitting Form 2

karadordeI am using CodeIgniter for a school project. I have some experience with PHP but am relatively new to this framework. I am having trouble using two forms on one page. I have one form that displays a dropdown of artists. After clicking the submit button for this form, it updates the second form (...

0
Q: Becoming a useful web developer

pamaralI'm an intern web developer and, although I've been programming for a couple of years now (in my computer's engineering degree), I consider myself to be a total newbie concerning web development. In my company we use PHP with Symfony (1.4), Javascript, Git and Apache. The thing is... I feel comp...

0
Q: Zend Framework 2 - Layout variable

user2957987I am using Zend Framework 2 and am having trouble trying to set up a variable to be used in the layout file. Basically, I want to show the total number of items in a shopping cart in the navigation bar without having to load the value in all my controller actions. From the research I have done ...

-1
Q: PHP Uploading CV Issue

user2958044I'm having trouble with my uploading form. Everytime I upload a file (I used a .docx file) I get the "invalid file" error. I'm not sure what I'm doing wrong. I would appreciate if someone could help. my formProcess.php script: <html> <head> </head> <body> <?php session_start()...

0
Q: Magento product image not going to page

user2958073This is my first post, i have a problem with a magento site. when im at a catalog page, the image is giving a javascipt;(0) error, and its not going to the product page. Here a piece of code what i think is the problem. sorry for the grammar. Mark the netherlands website www.dwcprint.nl <...

0
Q: How to format hour and minute in Chinese with PHP

Samuel22I need to display a time in Chinese format with PHP. I already try to use strftime : setlocale(LC_TIME, "zh_CN"); echo strftime("%a, %Y %B %d"); It's work for date and display : 二, 2013 十一月 05 but for time : setlocale(LC_TIME, "zh_CN"); echo strftime("%H %M"); display : 14 30 But 2:30pm ...

0
Q: WordPress form trouble

user2958063Some help needed here, I'm building a one page wordpress theme and I don't really know how to make the contact form submit without loading. Basically all my code is on index.php. This is the form submission php code above the get_header(); It works just fine but I can't really make it submit wit...

0
Q: Javascript and radio buttons - Not doing anything

Chris WilsonThis one is bound to be simple (I hope) something I am overlooking. I have a set of 50 questions that are asked pulled from a table and put into a form for answering. I want to check to make sure they have all been answered (required). When the user hits submit, none of the alert boxes (even the ...

0
Q: CakePHP and Javascript: Update Time Field in View

work-flowi have the following problem: i'am working on a web application with cakephp. I have a form where i can add a student to a (teaching) lesson. I have to set the time when the lesson starts and ends. It looks something like this: Start: [09]:[00] End: [09]:[25] this [] means => input fields (dr...

0
Q: mysql_real_escape_string removing linefeeds from stored email

user2579846I collect emails from my mailserver with imap_mail (php), explode the result and save it to database after using mysql_real_escape_string. If I display it in a textarea after retrieving from db, all linefeeds are gone or replaced by \r etc. without mysql_real_escape_string they are displayed. ...

0
Q: Displaying random photos using PHP

Matt IOK so far I have the following code functioning to display random photos in my 'photos' directory: <html> <head> <title>AWESOME Random Images</title> <?php function randomimages(){ $dirname = isset($_REQUEST['dir'])? $_REQUEST['dir'] : './photos/'; $numimages = isset(...

0
Q: How to i get the count of how many arrays are multidimensional array

Ian I have multidimensional array and i cant work out how to get the count of how many arrays are inside the multidimensional array, count($array) isn't working. The array is below Array ( [data] => Array ( [0] => Array ( [type] => text ...

0
Q: Use phpseclib's Crypt_AES class to encrypt and decrypt a file at once makes the file empty

aarryySo I have a script that uses phpseclib to do the encryption and descryption with the same file at once. What I did is I read and encrypted content from a file and wrote it back to the same file. Then I read that file again to get the encrypted content and decrypted it and wrote the decrypted cont...

-1
Q: php returning string instead of json object

Maxon the server I do this: $myarray = array('message'=>'blub'); echo json_encode($myarray); After putting my ajax response in a class instead of a simple flat php script it returns this string to the javascript ajax call. "\n{\"message\":\"blub\"}" Debugging output on the php side looked lik...

0
Q: Trying create Custom template for Zen Cart

user2958136Trying create Custom template for Zen Cart. How can I create "add button" at zen cart? How can I get cart handler?

-1
Q: top 10 list issue php

ChristianIm trying to make a top 10 articles script where the best rating will be number 1. Like this titel rating titel rating titel rating titel rating I’ve searched the internet for solution and this is how far I’ve got. At the moment im getting this error: Parse error: syntax error, unexpected T...

0
Q: Sending and email from php file to my gmail

Rookie LearnerI am trying to send an email through this php file, I am using WAMP server. I couldnt find the php.ini files to edit them, I am running these .php files on my locaclhost. The following is the code, kindly have a look, The error I am getting is "Warning: mail(): SMTP server response: 550 The addr...

1
Q: PHP math gets crazy, need explanation, my brain is melting

dereiI know that playing with php float can give strange results if you try to add "goats + apples", but please take a look to the following case: $val = 1232.81; $p1 = 1217.16; $p2 = 15.65; $sum = $p1 + $p2; $dif = $val - $sum; echo $dif; It will give you -2.2737367544323E-13 ... yeah, ALMOST ...

-1
Q: How can I convert this php mcrypt_encrypt line to java (Android, to be specific)?

user2958162I currently have a line I use in a php Script return mcrypt_encrypt('rijndael-128', $key, $data, 'ecb'); How would I implement this in an Android program? What padding mechanism would I use to mimic php's? php says that the file is padded with "\0" bytes. I currently have the following: Secr...

0
Q: CakePHP migration issue

AchilleasAt my work we have a cakePHP application that was working fine, after we moved the application to other server, the application loads but dont work. Shows "Error: An Internal Error Has Occurred". In core.php/ i have Configure::write('debug', 2); Fatal Error Error: Call to a member function get...

0
Q: change ENTIRE url without redirect

Riccardo Genioburgercondoppiobi have this domain: http://www.example.com and when page is loaded a want to change/mask it in http://www.example2.com WITHOUT REDIRECT at the second URL i have tried with htacces, jquery and more other solutions. thanks

0
Q: Regular expression that gets a variable length field and outputs a field that is fixed

user2958058I need to add an ID field to a plif file that is made from the user ID section of an email address. Our email user ID is a variable length but when I output that as an ID the output must be exactly 48 characters long. The regex that finds the email user ID A(02||20)(N.*)( [^ ]*)(\@[a-zA_Z.]*ne...

0
Q: Sql server and Zend Framework 2 connection issues on windows machine

golldyIs there a tutorial or any kinda documentation anywhere online for ZF2 integration with Sql Server. I have tried and tested the things which are already there and where some are deprecated as well. The SQLSRV is pretty painful driver to get it working, in one of the examples, i tried downloading...

0
Q: Why is this else if not getting executed?

1n9i9c7omI have the following code: <?php ini_set('error_reporting', E_ALL); error_reporting(E_ALL); ini_set('log_errors', TRUE); ini_set('html_errors', FALSE); ini_set('error_log', '/var/www/vhosts/*******/test/random/error.log'); ini_set('display_errors', TRUE); require "./func/dbc.php"; define("IN...

0
Q: imagecreatefromjpeg() works fine on one server and gives error on other

SimranI have a script and it uses php fucntions like imagecreatefromjpeg() I recently bought a new server and migrated all the files from old server to new. I have checked the code 100 times and it is same as it was on old server and all the files are migrated successfully but when run it gives the fo...

0
Q: php $_POST not sending full value

FoxWizzyupdate.php $q = mysql_query("SELECT id FROM performer WHERE username='$user' LIMIT 1") or die("Error : " . mysql_error()); $r = mysql_fetch_assoc($q); $id = $r['id']; $query = mysql_query("SELECT baned_c, baned_c2, baned_c3 FROM performer_s WHERE id='$id' LIMIT 1"); $result = mysql_fetch_assoc(...

0
Q: wordpress include local root php file

webmaster alex lI have a child theme functions.php that I am trying to have include a few local domain files , through the use of short codes, that live outside of the Wordpress file structure. I cant seem to find whats going wrong. Anyone have any pointers? child theme functions.php <?php // localhost path d...

0
Q: Display category name from a table

user2956943i have two tables in my database. One name jokes and the other named category. jokes CREATE TABLE `jokes` ( `joke_id` int(11) NOT NULL AUTO_INCREMENT, `joke` varchar(1024) NOT NULL, `category_id` int(11) NOT NULL, PRIMARY KEY (`joke_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCR...

 
10:17 PM
-1
Q: Porting PHP code to Delphi code [need help]

user2958247i need help to porting PHP code to Delphi code. Thx = 1){ $loginonline = "";} else{ $loginonline = "";} $fp = @fsockopen($servergame, $portgame, $errno, $errstr, 1); if($fp >= 1){ $gameonline = "";} else{ $gameonline = ""; } ?> Login server: Game setver:

0
Q: $_POST does not working

Alan MulliganI have a html form that amens 4 fields which are populated from a database. I have my sql update statement inside an if statement but the but I am never getting into the if statement. I have been looking at this code now for ages and can not see my mistake. <form action="" method...

0
Q: PHP upload transparent images gives black background

KimI've been looking around for a solution to fix, transparent images that are turning black in the background after upload. What can I do to fix this? Thankful for any help! PHP: if($_GET['img']) { include('resize-class.php'); $valid_formats = array("jpg", "png", "gif", "bmp", "jpeg"); ...

0
Q: Easy way to create invoices with PHP and TCPDF

RoyWI'm busy programming something in PHP with an invoice function. In the administration panel employees can see all the details of the customers and there it's also possible to click and create invoices, reminders etc. in PDF format. For that I am using TCPDF and their examples on http://www.tcpdf....

0
Q: Checking MySql table for an entry and either UPDATE or INSERT with PHP

user2762390I am pulling data from the Crunchbase API and adding into a database. I am not sure what the best unique identifier is for both companies, people, or other, but I am thinking the permalink would work as an id. My question is how do I check if an entry has been added, if it has, then update/repl...

0
Q: HTML Form + PHP Issues

user2958205I have looked everywhere and searched high and low. I have seen many issues with the PHP code I'm about to post, but nothing pertaining to my specific issue I am seeing. Here is my issue - The two lines ($values/$required) where I have 'name','email',subject','message' I would like to add 'tel'...

0
Q: How to update codeigniter shopping cart using ajax?

Leonard DrapezaI want to update the quantity of a shopping cart when the item is already in the cart and add it when it is not(added in the cart). I'm confused on how to solve the twist of this problem. I've google a lot of the same problem but there is no same exact problem/solution for this. Here is the cod...

-1
Q: Adding a Delet button to an EDIT.PHP page

user2958236I'm kinda of new to .PHP and I would like to add a delete record function(Delete button) to an existing EDIT data page. Here is the codes from the edit.php page <?php require_once("database.php"); $con = mysql_connect($config["db_server"],$config["db_user"],$config["db_pass"]); mysq...

0
Q: Using Poedit to parse Twig templates in a Zend Framework 2 application

SaevenI've downloaded Poedit, and am attempting to parse my Twig templates. A few tutorials online pointed to https://github.com/umpirsky/Twig-Gettext-Extractor which I later found was referenced in a tutorial here http://aromatix.fr/?p=611 (French) with full instructions. I got the tutorial done, i...

0
Q: In Wordpress, how can I change the destinations of my links dependent on what page user is on?

GivenyI have the problem that I am using a theme where the navigation is simply 'scrolling' to a given part (eg. #contact) when pressed. However, I have implemented some seperate subpages that exits this scrollable page and thus renders the navigation ineffective. My question is, how can I change the ...

-1
Q: PHP strtotime using m-d-Y format

bagofmilkI have my dates in format (m-d-Y) month-day-Year. I'm trying to subtract dates. I can't use strtotime() because it won't work in that format. How can I subtract dates with m-d-Y format? <?php date_default_timezone_set('America/Chicago'); $olddate = "11-04-2013"; $today = date("m-d-Y"); ...

0
Q: PHP Resize Script not working on new server/domain

GO3DExpansionI had the resize.php script working on my previous server/domain and when you go to it HERE you can see the division by zero error. BUT! if you go to the same script on the new domain/server HEREits a blank page with no errors which leads me to believe something is not happening like it should be...

0
Q: PHP - Upload images to FTP directory and then Display images uploaded only from directory - 2

Don MisquittaWhile trying to upload image and display it, i'm getting the 'Failed moving the uploaded file'. Don't know where I'm going wrong.. Here's my image.php: <form enctype="multipart/form-data" action="upload.php" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="100000" /> Choose a fil...

0
Q: unexpected T_ELSE, ENDIF

Seth ForzaCan anyone tell me what is wrong with this code? <?php if($this->session->userdata('login_user_id'));?> <?php $a = $this->session->userdata('login_user_id');?> <?php $data = mysql_query("SELECT * FROM user WHERE id='$a' AND specialrank='0'") or die(mysql_error());while($info = mysql_fetch_arra...

0
Q: LinkedIn PeopleSearch using list of names

user2687915I want to search for multiple people using the LinkedIn PeopleSearch APi. I have a CSV file with first names and last names that get uploaded ( I use php, for that). Then I pass the array of first names and last names ($data) to javascript. I am able to fetch the first names and last names in jav...

0
Q: Apache user permission

thomasandersenI have an Apache server installed which exposes a website written in PHP that I have been working on. One of the functions of the website is to insert new data into a MySQL database. When data is to be inserted the user presses a link which in turn calls a PHP script which contains a line like th...

0
Q: post querystring to mysql via php as opposed to plaing the link in address bar

user2835653i am trying to create a link in php, and submit that link, so that it will post the data contained therein to my mysql DB. if i paste this link into my address bar, and press enter, i will be able to add a record to the DB, no matter from what website or browser: http://mysite.com/data.php?firs...

0
Q: Xampp Zend_Mail_Protocol_Exception: Unable to find the socket transport "ssl" - library\Zend\Mail\Protocol\Abstract.php:277

user2697955I have been trying for the best part of an hour for us to enable SSL for our emails to be sent through google, but when ever i test it , I get this error http://pastebin.com/wRPmPkKj (It says generated 19 mins ago but I assure you I have been trying a lot harder.) We are using Xampp and google...

0
Q: Query not working, it is not deleting the values from the database

user2958298I have a drupal website where added a function that will allow the user to delete his account. I tested it and when i click on the button, nothing happens. I echoed out the values $u['meme'] and $u['id'] and they return the right thing which is not processed by the function. Why my query is not...

 
10:58 PM
0
Q: Parsing JSON Data with nested foreach() fails

Brett PowellWhen attempting to import a large JSON string of data into our MySQL Database, I have encountered an issue when nesting foreach loops. The following code works fine... $json = json_decode($jsondata, false); foreach ($json as $item) { $asset_type = "RAM"; foreach ($item -> assets -> $ass...

0
Q: Hit PHP from node server to process images

posit labsI'm trying to hit a php page from a node server so that it will generate some thumbnail images. The problem is that it isn't generating the images when i hit do a jquery.get request from node. It works perfectly if I hit the page from a browser, though. Here is the php code: <?php $thumbsFolde...

0
Q: How to grab data (titles, thumbnails and custom field) from multiple posts in a specific category to populate a map?

Jim CreedBasically, I have like 15K posts which I use them for directory purposes. I currently use a map plugin called '5 sec gmap' to show their locations in single posts. I customized that plugin to pull the posts' physical address from a custom-field called $wpcf-address to show. But, I want create a ...

0
Q: Loop only once on post excerpt

codekI'm displaying an excerpt that is pulled from an advanced custom field in wordpress. The problem I have is that the code generates a lot of spans if the post have different paragraph. How can I control to just generate one span? Just show the first one I mean. This is my code: <?php while...

0
Q: Magento Fatal Error when editing customer accounts

user2958356I have Magento 1.7.0.2 and when I try to edit a customer account in the admin panel i get this error: Fatal error: Call to a member function setRenderer() on a non-object in /home/techspec/public_html/magento/includes/src/Mage_Adminhtml_Block_Customer_Edit_Tab_Account.php on line 77 $attributes...

0
Q: View PDF in browser rather than download

Kieran McClungThere are meetings on this website and each meeting has a PDF attached showing the meeting minutes. The next meeting that takes place dynamically collects this attached PDF and allows for a download as the previous minutes. This is all working perfectly, however, when clicking the link for the pr...

0
Q: How can I download the xml file created by this php code?

Jon JamesMy php code is below, the source code that this produces gives me the data i want to save as an xml file. How could i do this? ini_set ("display_errors", "1"); error_reporting(E_ALL); session_start(); include_once('function.php'); $select_query = build_select_query("xml","cust_id",$_SESSION['cu...

0
Q: Php Private Message System

user2958351Hello my name is spyros im developing a social site with php ,html i have some problems with it . I stuck at the idea of creating private messages system , i managed to created but the problem is that i wanted to be created in a modal window like facebook .On my user.php like facebook i got some ...

0
Q: Manipulate content in a single tag

user2958354I am relatively new to programming and I have embarked on a quest to create a website that will eventually boost my career. To describe the website in a few words - I am a financial consultant and I want to create a place online where I can provide some basic information about personal finance in...

0
Q: I cant access wordpress CMS after I installed a plugin

atrikI installed a plugin in my wordpress site, and after I installed that every time I try to access the CMS it redirects me to http://mysite.com/wp-admin/install.php How can I solve this, thanks.

0
Q: XAMPP v1.8.2 VHOST 403 error

Josh C.i recently updated my xampp and now i can not host my vhosts. I have already updated my hosts file and everything i just dont know why im getting a 403 error or how to fix it. Here is my code NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot C:\vhosts\basinmedia ServerName basinmedi...

0
Q: rows added via javascript to table inside form don't submit

user2157370Hy, I have read many discussion on this argument but I just can't find a solution. I have table inside a form, the first rows of this table are displayed by a php script, I won't the user to be able to add a row to the table so that he can insert a new set of values. the problem is that this new...

0
Q: Echo variable from phpmailer in template

anvdHow can i pass a variable from phpmailer to contents.php (template file) ? I need to pass the $email variable. $mail -> msgHTML(file_get_contents('contents.php'), dirname(__FILE__)); contents.php <div> This email was sent by x. <a href="www.x.com/process_contact.php?email="<?php echo $ema...

0
Q: Shortcode with open and close tag doesn't works

GabrieleI tryed to use a shortcode that has an open and a close tag, but it doesn't works. This is my code: <?php if (is_category(4)) { echo do_shortcode('[access role="administrator, my-role"]Only admin and my role members'); } else { echo 'pass'; echo do_shortcode('[/access]')...

0
Q: Converting string to time in PHP

AdelphiaI am having some trouble trying to convert string to time. My Code is: $time = strtotime("14 November, 2013 2:30 AM"); echo $time ."<br />"; echo date("m/d/Y", $time); I know that strtotime is not magic, and I checked out the acceptable date/time formats but I am not sure how to convert the s...

0
Q: How to encode this XML values into a PHP literal?

AubinIn the context of a WS developpment, I use the following schema: <xs:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Apporteurs"> <xs:complexType name="namedValue_t"> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="name" type="xs:st...

0
Q: Is there a 'take notes' plugin for wordpress?

JakeMy question is exactly the same as this, not sure if it can be bumped so thought I'd post again. Basically I'm trying to create a scenario similar to how comments work. On a page, a registered user can submit a comment, except, only they can see it, no one else. These comments would be called no...

0
Q: HTML/CSS: Could this be achieved with a list or table?

John RobinsonI am trying to make a list of hyperlinked images, one for each color in a catalog. I want the layout to look like this: Only, I will probably only do 5 or 6 wide by however many tall. The images to be added will be generated from the result of a MySQL query, so it won't be static. It's easy en...

0
Q: mod-xsendfile 404 caused by SELinux

Ryan SOk. Wanted to share this - took me 10 hours to figure out. I had properly installed mod-xsendfile, following the good instructions here. I also configured xsendfile correctly in my /etc/httpd/conf/httpd.conf file, adding the settings: XSendFile on XSendFilePath /var/files_need_valid_s...

0
Q: Check Zend Registry variable inside htaccess?

Ronak ModiI want write redirect rule on the base of value inside Zend_Registry variable from htacces.. Something like this if(Zend_Registry::get('country') == 'uk'){ RewriteRule (.+).html /abc/page/directory/abc/view/$1 [L] }elseif(Zend_Registry::get('country') == 'ca'){ RewriteRule (.+).htm...

0
Q: Permission denied error in php when try to write in a txt file

DorukoI'm trying to write in a txt file the data i get from a html form, but I get this error: Warning: fopen(/var/www/4/datos.txt): failed to open stream: Permission denied in /var/www/4/ComprobacionFormulario.php on line 13 Warning: fwrite() expects parameter 1 to be resource, boolean given in /var/w...

0
Q: Issues with composer.phar with nss and api.github.com

tedbI am attempting to use composer.phar on a server with RHEL6. Installation details: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 PHP 5.4.16 Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies My composer.json looks like this: {...

0
Q: PHP use canvas (html5) to copy and upload the copied picture to server

user2909037Is it possible for html5 canvas to be used has a very strong way to upload jpg, gif and png (converted to jpg) files to a server ? Normally we would do something like this http://hungred.com/useful-information/secure-file-upload-check-list-php/ and some other measures to prevent any code in and i...

0
Q: How to get width of a Div or table in Pixels?

Fernando BaltazarThe main reason of this question is because I need the Width of a DIV element which holds an image, but the resize script (timtumb) only accepts pixel size and not % (will be great). for example : timthumb.php?src=castle1.jpg&h=230&w=640 If I set the width 640 I will have the image size to be ...

0
Q: Imgaecreatefromjpeg not working when placed inside IF satement

Jben Kayei have a code that generates an image using imagecreatefromjpeg. it's working well, not until i decide to place it inside an if statement. my purspoe of doing that is to check whether a file is uploaded of not. if not, i will just use an image from the server. here is my code. please feel free to...

0
Q: PHP - Find the number of zeros in a decimal number

gtilflmLet's say we have 0.00045. I want to find a way to count the number of "significant" zeros after the decimal point (3 in this case). I've been trying to implement strpos or substr, but I'm getting stuck. Other exs.... 3.006405: Should return "2" 0.0000062: Should return "5" 9.0100000008: Shou...

0
Q: Xpath expression to get unknown element names with SimpleXMLElement

user1472549Iam trying to write an xpath expression to get element names from an xml based on some criterias. The thing iam after is to get a list of the element name of each element that has the child node "fields/enable". I don't know what the name of the elements is, i dont have any attribut to trigger b...

0
Q: How to insert text into a text file using php website

ldigginsI'm sure it's an easy solution, and i'm not great with the correct terms. Basically i have a form already using sql server. It submits great. I want to add another field then when someone types in whatever it adds it to the next line in a txt file. Is this possible? Thanks in advance!

0
Q: how to post from flash abject action script to wordpress

user2958418I am trying to post(upload) an image file to Wordpress from within a flash object embedded inside one of the pages of Wordpress. I get a fatal error like this: Fatal error: Call to undefined function wp_insert_post() in /home/content/94/11856294/html/wp-content/themes/notoriouswordpress/test.ph...

0
Q: Global Languages in MySQL with PHP

monamonaWe started website in intention that we only use English Language and do all insertion/deletion to MySQL using English. And use PHP to escape string while writing to DB. Now the situation is our website have lot of Chinese/German/Russia Users. and we are facing problem writing data into MySQL - ...

0
Q: Take the data from a mysql SELECT query and drag the individual records to a droppable area.

user2710772html goes here jquery library's go here stylesheet here draggable function goes here etc. all this works, and it actually works the way it should but I am looking fora different result. $result = mysqli_query($con, "SELECT * FROM employees"); echo "<table border='1'> <tr> <th>Fi...

 

« first day (259 days earlier)      last day (51 days later) »