« first day (260 days earlier)      last day (50 days later) » 

10:03 PM
0
Q: ipsRegistry init exit

MazzyI have an external file that will be using the IPB API but whenever I call init on the registry it displays the default forum 404 page and exits php define('IPB_THIS_SCRIPT', 'private'); require_once( '/var/www/httpdocs/forums/initdata.php' ); require_once( '/var/www/httpdocs/forums/admin/sourc...

0
Q: Remove certain attributes from a string PHP

ThewHello once again Stackoverflow! I would like to remove the rel and target tag and make the url relative. My input string is <a href="http://example.com/relative/path/" rel="external" target="_blank">Link</a> <a href="http://example.com/relative/path" rel="external" target="_blank">Link</a> A...

0
Q: Update images in table keeping the old ones

John PriestakosI got 12 images and i want to update/edit them with a form. I choose to update one or more but not all of them, but keep the old image name in database. I tried the following code but when i update one or two images, it's not keeping the old ones and the table field is null. foreach($_FILES['mo...

0
Q: MySQL Request only returning 1 row

BlaineI am trying to get all the the fields from appointments while also getting the corresponding data from zipcodes using the following request: select appointments.*, zipcodes.* from appointments inner join zipcodes on appointments.service_zipcode = zipcodes.zip where customer_id = {$_GET['id']} ...

0
Q: MySQL and PDO - NULL inserting as "0" with prepared statements

A.O.When I run an insert using PDO prepared statements like so: $insert = "INSERT INTO table (number) VALUES (:number)"; $stmt = $db->prepare($insert); $stmt->bindParam(':number', $_GET['number'], PDO::PARAM_INT); $stmt->execute(); If $_GET['number'] is empty/null MySQL inserts a "0" instead of NU...

0
Q: Bootstrap tables only displaying one row in <td>

Script47 As you can see from the image the first row from the table is only in the actual table. It could be code error I'm not sure? $selectNews = $PDO->query("SELECT * FROM `news`"); echo '<table class="table">'; echo '<thead>'; echo '<th>Update Number</th>'; echo '<th>Title</th>'; e...

0
Q: Drupal Node_Registration altering default values

user2962459I'm very new to drupal and I'd really like some help. I'm trying to implement event registration with the module Node_Registration, https://drupal.org/project/node_registration. I have a content_type of event, that has specific fields. I've set up in the admin section the ones that relate to Node...

0
Q: select box loading depending on choices made

Fabio RossiMy problem is the following: I have two select boxes. In the second, the option that is loaded depends on which option i chose in the first. Here's my result: index.php $(document).ready(function() { $('#durata').change(function() { var durata = $("#durata").val(); $.ajax...

0
Q: Auto-refreshing chat effiecently

user2962510I have a chat that auto refreshes every 0.1 seconds but sometimes It takes forever to refresh and even load in the first place. Codes: I have my Body OnLoad script before the htdocs thing of html document. <body onload="chat_load()"> This is my java script. <script type="text/javascript" sr...

0
Q: jquery validation error: .validate is not a function

Jennifer BornThis is probably super obvious, but it is NOT working! I'm getting: TypeError: $(...).validate is not a function and Firebug points me to: email: "Please enter a valid email address", <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script src="//ajax.googleapis.co...

-3
Q: Implement MySQLi on the following code

Javier LopezHi guys I have created a form that takes input from the user and posts it to a table in a database. I have received various comments about replacing unsafe function like mysql_real_escape_string and mysql_escape_string where one of which is highly discouraged in using. How can i implement msqli o...

0
Q: php login system mysqli_query

user2161721I am trying to make a login system with php , I tested the code and I found that the error is in $result, I don't get this error because the $link is already in the connect.php file I included here : session_start(); $username = $_POST['user']; $password = $_POST['pwd']; include "connect...

0
Q: Delete Confirmation Dialog for multiple rows with bootstrap

FjaoosI am really new in PHP, JS, HTML ,etc. and I have a big question. I have a form with a table. In the table are different texts from a database and in each row is a delete button. I can't figure out, how i can send information about the row to the modal I want to open. This is my code: <tr> <td...

0
Q: PHP - Store SOAP response as a table

kachnitelI'm trying to parse a SOAP response and store it in a CSV file / SQL table. However, the response has various columns, so I figured out I have 2 options: 1) Create an array to store column names on the first row, and expand it once a new column appears, but then I'd have to alter all the previou...

0
Q: Entering my WHERE into the query breaks it

Alex HowellSo I have to add a WHERE query to this plugin I'm using for a reporting feature on a WordPress site. I have no time to do anything but add in another column and filter by the values in that column as there is not that much data to manage each update. The default value for the column I added is ze...

0
Q: Secure PDF Download via Registration Email Link PHP

David GrayI'm having a few problems with my code. I'm setting up a user registration page that sends an email with a link to a free PDF download, then when the user clicks the link, the file is shown and the database is updated to show the user downloaded the file. The problems I'm having is: Check the ...

1
Q: Change the font-family for displaying data or/and time

ZsigovenyI managed to get to display the time and date on my website but I would also like to know if there is anyway to change the font-family of the output ... I am currently using PHP .. Code: <?php date_default_timezone_set('Europe/London'); $date = date_default_timezone_get(); echo date("F j,Y, ...

0
Q: Multilingual website with unlimited number of languages

Dima KozelI'm building a multilingual website, and one of the requirements is unlimited number of languages, and i need to provide the administrator with the ability to add/remove languages without my intervention. I took the DB based approach and i have all my text content stored in the translation tables...

0
Q: How to merge JSON data using JSON_ENCODE?

maxumGiven the following JSON $first = array('code'=>'200','message'=>'ok'); { "code": "200", "message": "ok" } $second = array("user"=>array('fname'=>'Fred','lname'=>'Flintstone','status'=>'1')) { "user": [ { "fname": "Fred", "lname": "Flintstone", "status": "1" } ]...

0
Q: Login to router using CURL

SIFEI am trying to auto login and restart my router automatically using PHP with the help of CURL, but it always return "Protected Object" even the user and password are correct. The script was tested from local host and there is no firewall: <?php $host = "192.168.1.250; $user = "reboot"; $pass = "...

0
Q: PHP - CSV to table not converting as expected

user2690363I am trying to create SQL INSERT statements from a CSV file. I have successfully opened and read the file. I have even output the file in a table format. However, the alterations I do in the for loop such as when $c == 0 do not work. It just outputs to the table exactly as it was in the csv file....

0
Q: On submit, form is returning to send.php instead of contact.php so appears blank

user2947225I have looked through posts with similar questions but am so new to PHP I still can't seem to figure out how to fix my problem, so thank you for your patience!! I did a tutorial on youtube to create my contact form, it works well (content transmits), however, once the submit button is hit a mess...

0
Q: Connecting two draggeable, sortable objects

user2962544I have two elements that are connected one is a sidebar element and the other is a chart or object that represents the data. If the sidebar is reordered then the corresponding, connected object should be reordered with the sidebar element. That is the problem. Both objects will move together but ...

-2
Q: Autorun.exe and runtime could not find

kilosI have a problem with a autorun.exe file. When I try to open this file occurs a problem: Runtime Error : Could not find data file. Pliz help me..thnx

0
Q: Complex XML won't convert to object via simplexml_load_string in PHP

ShamoonMy fiddle is here: http://ideone.com/WEuQlz But basically, I have a large XML string (about 6,000 characters) and when I run simplexml_load_string on it, it parses part of it but leaves most of empty. Is there any way to get the entire contents?

0
Q: assigning email to group of arrays

Jack SniperI have a foreach function which groups an array of products, into seperate arrays depending on the 'dsid': $products_array = array(); $products_query = tep_db_query("select products_id, products_name, drop_ship_id from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$orders['orders_id'...

0
Q: Is there a free shop solution you can migrate OsCommerce to?

rubo77I would like to modernize my OsCommerce 2.3 shop. Which other PHP shop-system with high activity is easy to migrate to?

0
Q: Zend Framework 1.X on Google App Engine

atooI'm planning to dive in building app on Google App Engine with PHP. I develop with Zend, but I'm not yet using ZF2, rather ZF 1.11. I've found some resources showing the use of ZF2 on GAE, but any about ZF1. I would like to know if it is possible to run ZF1 on GAE. Could you point me on good r...

0
Q: Wrap Wordpress comments and child replies in a container

user2962427I'm using a custom callback in wp_list_comments, which uses the following template: <li <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>> <article id="div-comment-<?php comment_ID(); ?>" class="comment-body"> <div class="comment-content"> <div...

0
Q: MYSQL Select; I cannot figure out how to exclude rows based on a different column value

user2962602Table: id    value 100    1 101    1 102    1 102    0 103    1 I want the selection to return id's 100,101,103; that is, if the same id has two rows, one with value=1 and a second with value=0, I want to exclude it. Appreciate any help.

0
Q: How to search based on two cell values

koljanepI am using a search box to find entries in my database. One column contains the title / name of the thing being looked for. Then I have a second column which gives a short description as applicable (few words usually) I am trying to search (with the search box) to match either one or even both o...

0
Q: How to get SignedData and Signature for android LVL

user2962624I try to implement a server side verification of an android license. I use the php code : http://code.google.com/p/android-market-license-verification/ In the file sample/verify.php, I have two lines to complete : $responseData = ''; $signature = ''; I see in the google LVL that there is a f...

0
Q: How to sort/filter values from Array PHP?

CyborgI need to foreach values of this array: My CODE: <?php $entry = array($matches); print_r(array_filter($entry)); ?> Result of this CODE: Array ( [0] => Array ( [0] => Array ( [0] => Age: [1] => 22 Years [2] => Ethnicity: [3] => Caucasian [4] => Location: [5] => London, United Kingdom Now...

0
Q: new mysql column will not display contents

user2962632I have inserted a new text column B into a table, similar to an existing column A. The php script modification was straightforward, simply copying what already existed for column A and modifying it for column B. Adding and editing data for column B works fine, as the content is stored in the data...

0
Q: Drupal 7 - MySQL Syntax Error - After amending settings.php

user2962626I have 2 sites on the same domain (example.com, site2.example.com) and I am trying to make them both reference the same user tables etc from the main site (example.com) in order to have single sign on through both. I have 2 DBs set up - one for each - and have set up a user which can access bot...

0
Q: Access private static class property from Ajax

micadelliI have a class similar to this: class My_Class { private static $array = null; private static function process_ajax() { if ( ! self::$array ) { self::$array = array( 'some data' ); } self::validate_data(); } private static function validate_d...

0
Q: PHP: searching id tags @ .html file

DetentionI have this simple code I want to search some tags on a .html file but I get some error I'm just new to php and I encounter 'preg_match' command. here's my simple code: <?php $data['id="test"'] = 'A'; $html = file_get_contents('test.html'); if(preg_match(array_keys($data), $html)) { echo...

0
Q: ajax and jquery form submission

user2916676I've a form, when submit is clicked if the record is duplicate messsage is printed below form. I'm using ajax and jquery for this as below $(':submit').on('click', function(e) { $('#message_line').text(""); if(!validate_fields_on_submit()) { e.preventDefault()...

0
Q: Issue trying to get MySQL working on OS X Mavericks

Uncle NerdicusI have Apache, MySQL, and phpMyAdmin installed on a Mac running OS X 10.9 and I am getting a MySQL error #1045 no matter what I try to do. I set the MySQL "root" password on install and it will NOT accept it, nor allow me to change the password using common methods found on Google. I haven't set ...

0
Q: Laravel OR Codeigniter?

pkdqGuys I got a job to develop a medium scale project. I have never used a framework before. For this project a want to go with a framework. I know Codeigniter is a very good framework and is there for almost 7 years, I also found that Laravel is a fresh framework which has attracted many followers....

0
Q: PHP $mysqli->prepare error with strange syntax when table name is "check"

Nimrod007this call fails with error : mysqli_report(MYSQLI_REPORT_ALL); $stmt = $mysqli->prepare("INSERT INTO check VALUES (?,?,?,?,?,?)"); error i get : Uncaught exception 'mysqli_sql_exception' with message 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL...

0
Q: $expode_top[] & $expode_bottom[] usage

Radical EdwardI'm rewriting a PHP plugin, and there are functions called $expode_top[] & $expode_bottom[]. I understand what the normal explode function does, but what are these? It seems to be impossible to find an answer on Google because it replaces the underscore with a space.

0
Q: Can't get <source_model> attribute to work on System.XML in Magento

ThanuI'm just finishing off one of my custom shipping methods, which has multiple methods within the main method. So i wanted to have "Allowed Methods" list to show up in Admin section. So I got below block in my system.xml <allowed_methods translate="label"> <label>Allowed Methods</label> <...

0
Q: REST Web Services - How to receive and parse form data from a webpage

Bobby StricklandI have to research and give a presentation on receiving and parsing form data from a website but I'm unsure on how to parse the data and store it on a web server. My professor described to me that I should focus more on the web server side of this. I'm a little confused on whether I am supposed...

0
Q: Remove @ symbol out of string

BagwellI have the following: preg_replace('/\B@[^\B ]+/', '<a href="profile.php">$0</a>'); Which checks for any string that starts with @ and ends with a space and turns it into a link. Now what I need is to create another preg_replace that would remove the @ symbol from the string, like @hello, so ...

0
Q: LoginHandler FosUser Symfony

user2178964I try to use FosUserBundle with two user interface : FrontEnd : / BackEnd : /admin/ So I use LoginHandler. I have a bundle (CulturalStore/UserBundle) which extends FosUserBundle, in it services.xml : parameters: cultural_store_user.component.authentication.handler.logout_success_handler.c...

0
Q: Rating a user based on his score, load certain image if the score is between certain interval

MerlinI want to load a rating image which depends on the users average score on some tests. For example If the users score is between 5(not including 5 ) and 6 (including 6), he should get image 6.png, which is a 3 star rating. So far I tried this, but it doesnt work, it seems there is a mistake s...

0
Q: Redirect to a page/URL after alert button is pressed

Jben Kayei have referred to this two questions call php page under Javascript function and Go to URL after OK button in alert is pressed. i want to redirect to my index.php after an alert box is called. my alert box is in my else statement. below is my code: processor.php if (!empty($name) && !empty...

0
Q: Can't get my $_SESSION right

FrKI hope someone can help me with some troubles I'm having. Currently I'm trying to make a simple webshop. First some information: I have 2 kinds of products, product a and product b. Both of the products are available in 18 colours and 3 sizes. When you want to buy product a, you simply go to the...

0
Q: Three.JS JSON Loader - not loading model from database

user2962715The problem I am having is that I want to store a JSON model in a database (which I have by storing it as a BLOB), I retrieve it via the following method while ( $row = mysqlifetcharray( $result, MYSQLIBOTH ) ) { $data = $row['modelname']; } NOTE: AT THE MOMENT ONLY ONE RECORD EXISTS, WILL MODI...

0
Q: how to fetch record from Mysql in PHP manually?

Mohd SulemanI am having table with two columns Symbol and weight. I am using this code $table=mysql_fetch_array($result); echo count($table); echo "<pre>"; print_r($table); echo "</pre>"; Out of the Above Code is 4 Array ( [0] => x1 [symbol] => x1 [1] => 0.50 [weight] => 0.50 ) My tabl...

0
Q: conditional preg_replace for optional backreference replacement

AsenarI have a regex to reformat a date from "dd/mm/yyyy HH:ii:ss" to YYYY-MM-DD HH:II:SS which is fine, but I would also use the same for validating date only (when no hours are provided). Maybe there is a way to give default value to the replacement but I didn't found it. $regex = '#^(\d{2})/(\d{2...

0
Q: Wordpress count child posts of each parent custom post type and use in json array for google maps jquery plugin

jonhodson1984So i have been looking for a couple of days now and cant find a solution to this anywhere. It is a fairly bespoke request from a client... I am using a jQuery google maps plugin to add markers for each post (area) that the admin creates using a custom meta box with lat and long coordinates each o...

 

« first day (260 days earlier)      last day (50 days later) »