« first day (295 days earlier)      last day (15 days later) » 

9:04 PM
0
Q: ZF2 mysql functions in select using TableGateway

daveI'm using ZF2 TableGateway and want to do a select such as where md5(email) = $hash I've tried to do this in the select with ->select(array('md5(email)' => $hash)); but this doesn't work, I get column not found. Any suggestions? Thanks!

0
Q: Magento 1.7.0.0 - Region Manager Extension Successfully Installed but showing nothing there?

Keith HamptonAny reason for seeing this after a successful installation of the 'Region Manager' extension for Magento v1.7.0.0 in the administrative backend? View image here: ( image hosting publicly for screenshot reference for this post ) -> freeimagehosting(dot)net/bcujt <- stackoverflow won't let ...

0
Q: Is there a function for PHP

GregThis is for an experiment I am doing. I am new to PHP and I am creating projects for myself. Is there a function (or some other way) for PHP to scan for specific words that are typed into a text box within a form before they are submitted? If so, can I send my user to a separate page based on wo...

0
Q: How I can develop a registration and login system Jquery mobile

user3060013hello guys at the moment I build a mobile application in jquery mobile my idea is finish the app in jquery mobile and later compile with phone build for IOS and android now my problem is I need build a registration and login pages for the app but dont have much knowledge about this for example I ...

0
Q: What is a more efficient way of writing this mysqli query that retrieves a single row

ianBelow is my query that grabs the next row based on the current row, it works but is kind of bulky, how can I make it a bit more concise? <?php // Credentials $dbhost = "localhost"; $dbname = "***"; $dbuser = "***"; $dbpass = "***"; global $tutorial_db; $tutorial_db...

-5
Q: Using javascript within PHP

Ben McAlindinI'm trying to write a simple website using php and I'd like a javascript confirm pop-up box to appear when the user does something. Depending on the response I'd like to execute a php statement. The javascript does not execute with the below code. There is various other php code before and after ...

-1
Q: How do I display php inside of javascript

RLeisingerI am working with WordPress and I have php that will display text on a page using code like php print_custom_field('Featured_Prop_TransSummary'); What I want to do is use that variable inside some javascript that looks like $(document).ready(function() { $("[rel='popover']").popover({ ...

0
Q: PHP loops through an definitely empty array

CorniWe use a model that always returns arrays. It never returns an object, null, 0, false or something else. Now, I found a fatal error. PHP loops through an empty array. How is that possible? var_dump($arrProduct); //prints array > empty foreach($arrProduct as $Product){ var_dump($Product); //n...

0
Q: move data from one column to another mysql

user3092953I am wanting to move data from one column to another in a MySQL table. Here is my code: $sDate = date("d-m-Y H:i:s"); mysql_query( " UPDATE users SET logintimelast = logintime AND logintime = '$sDate'"); However this does not update either column?

0
Q: I keep getting 23750 as a password with a post submission

user3010455I am completely stumped here. I am creating a simple member system for class and I keep getting "23750" no matter what password variation I type in. First I thought it was a db issue, so I manually entered one and it was fine. Then, i echoed out the password to the next page and I am getting 2...

0
Q: PHP form using check boxes to query the database

user2970595I am trying to query my database in the albums table using a check box list of styles (which is a table column title). I just can't get the data to display, I don't have any errors so I am really lost, I have tried and tried and I am getting no where. Please if anyone have any suggestions chime ...

0
Q: Safari 6.1 multiple file upload does not work while Safari 6.0.5 and other browser works fine

HartsSo I have a file upload site, which I develop using HTML5 chunking ability to upload multiple files. it works fine on Chrome, Firefox, IE (basicly browser with HTML5 capability) as well as Safari, but recently I test it out, Safari 6.0.5 works fine, but on Safari 6.1, If I upload multiple files, ...

0
Q: Can I still use "insert_id" with PHP commit/rollback?

BrianI had a PHP application that automatically committed the insertion whenever I submitted the form. The code I used looked like this: $dbConnection = new mysqli($hostname,$username,$password,$database); $query = "some query here"; $queryResult = $dbConnection->query($query); if($queryResult){ ...

0
Q: Can I store some data permanently in a variable once initialized?

Nick_inawI have a form which has two input field called firstname and lastname with a submit button called submit. The input fields use twitter's typeahead.js with custom event trigger (typeahead:selected) Thus, when the firstname is selected from the dropdown, I have a ajax call in the trigger which po...

0
Q: passing trunc_date postgres timestamp to php date leads to wrong date

AlanChavezI'm using the following SQL query in postgres: SELECT date_trunc('month', s.thedate), r.rank, COUNT(r.rank) FROM serps s LEFT JOIN ranks r ON r.serpid = s.serpid GROUP BY date_trunc('month', s.thedate), s.thedate, r.rank ORDER BY s.thedate ASC; when I run that query d...

0
Q: CakePHP: Session->write() not working

SDPI'm building a very basic auth system for specific pages which require a password to view. I've found several other questions that sound similar, but the only ones with clear solutions involve config settings that don't seem to resolve my problem. For some reason $this->Session->write(...) always...

0
Q: PHP: find key in nested associtive array

Steve CookeI have a method to check whether a key is in a nested associative array: private function checkKeyIsInArray($dataItemName, $array) { foreach ($array as $key=>$value) { if ($key == $dataItemName) return true; if (is_array($value)) { checkKeyIsInArray($dataIte...

0
Q: Zend Framework one module with no mvc structure

MaatataI have been doing research to try and find a way to add Osticket to my application which is created with Zend Framework 1. Unfortunately I can't do that at the moment as the structure is different and mvc framework for osticket is not zend. What I'm trying to achieve here is having a module in m...

0
Q: Disable stripping in PHP Smarty during a block plugin

MartijnWe're using Smarty to generate HTML from PHP. A number of plugins have been added to make life easier. One of these plugins is a block plugin that interprets a custom language and generates HTML code. The custom language has simple statement, using linebreaks to separate the statements. Smarty's...

1
Q: PHP json_encode function returns blank {}

user1527739I am trying to use an AJAX call to fetch some data and return multiple pieces of data to the caller through JSON. It works for certain test things for simple output, but when one of the elements to return is HTML then it does not work. Any thoughts on this? // get_answer() pulls some HTML back...

0
Q: Check if file is being run on server

AceI have a html file which has a link to php file. When i run the html file and click on php link source code of page is being shown as i'm not running on server. Is there a way we can check whether it is running on server and show a message like "Please run it on server" instead of showing source ...

0
Q: How to secure my php?

user2979512when my users post something, they can put iframes and embed. So is it possible to be xss atacked or other? When they send iframe code or embed code, i save it with htmlspecialchars in DB. Is it enough? After that i use htmlspecialchars_decode and stripslashes to show embed or iframe. So, ho...

0
Q: CodeIgniter validation error

user2157179I am trying to use CodeIgniters built in validation to validate my form however whenever I add <?php echo validation_errors(); ?> My html code breaks and nothing beyond this point comes up on the website, and my page source just closes off tags and thats all. Does anyone know why this could b...

-1
Q: Reference php video and image in HTML

robotturtleI'm trying to use an image from php as an img src from PHP as such: <?php $videoEmbed = get_post_meta( get_the_id(), 'ctslider_videoembedcode', true ); $postThumb = the_post_thumbnail(); ?> HTML right after that: <div id="coverimageforplayer"><img class="introvideo" sr...

0
Q: SUM in mysql with customers and excursions

SubiendoGood Night, The objetive is to know the sum of all the excursions in my mysql table. My sql tables are like that. Excursion ID Excursion_Name Excursion_date Excursion_capacity 1 Exc1 date 1 10 2 Exc2 date 1 15 Here date 1 is the excursions ...

-2
Q: Build my own CMS

RachidI've read that it is not a good idea to build your own CMS unless it is for learning purposes. The main reason is because lack of security. Advanced CMSs spend a lot of time testing their CMS to make sure it is secured. My question is, What if I build my own CMS on well known frameworks such Lara...

-1
Q: How to execute parsed javascript

ice_kernelNeed to parse product page that have sizes as dropdown list (select) and he has options actually 1 option but other insert by javasript after downloading the page, have any ideas how to do that?

0
Q: Get this PHP form to send to multiple recipients?

user2109656There are a lot of other posts about this. I have gone through several and tried arrays and inputting emails in the $to field and the like but my form keeps only sending if I specify one email. What am I doing wrong? I'm a PHP noob too. <?php // EVALUATION FORM $your_email ='email1@address.com,...

0
Q: Using PHP plugin or jQuery pluginw with CodeIgniter

NomanCan I use any standard PHP plugin or jQuery plugin (or scripts) in a website built using CodeIgniter, without making any modifications to that plugin (or in its original form)? Please share info, Thanks

0
Q: Echoing a var from a sendmail.php form in a div inside the form page or in a popup window

Serge SfThe idea is to preview (this part works fine) the form somewhere so, if corrections are needed we can go back to the unrefreshed form to make corrections. I have this form: <form action="../../../../sendmail.php" id="Formulaire" method="post" name="Formulaire" onsubmit="return checkform()" targ...

0
Q: dropdown selecting the value but showing its id need to get the name?

user3093049<label style="width:49.8em;">Category: <input type="hidden" name="cat_name" value="cat_name"> <select id="dropdown" name="cat_name"> <?php echo '<option value="" ><---Select---> </option>'; $result = mysql_query('SELECT * from category') or die(mysql_error()); while ($row = mysql_fetch_assoc($res...

0
Q: Symfony2 Wsse authentication

UweI am developing a new Symfony2 project and am trying to set up two things: 1. Custom Authentication Provider 2. A custom User provider I followed the example / tutorial (word by word nearly) given on the Symfony2 documentation pages: http://symfony.com/doc/current/cookbook/security/custom_authe...

0
Q: Imghost different errors

user3093043When i try to upload a picture in Imghost script i upload it and then i got error **Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/****/public_html/config.php:1) in /home/*****/public_html/upload.php on line 20** That is show in the ...

0
Q: Send a mail with php

user3093068I have a problem with my php:I want to send a simple mail in php..I using XAMPP My configure is: php.ini: only sendmail and mail.add_x_header is not commented ; For Win32 only. ; http://php.net/smtp ;SMTP = smtp.gmail.com ; http://php.net/smtp-port ;smtp_port = 587 sendmail_path = "C:\xampp\send...

0
Q: MySQL query with fallbacks (COALESCE) and JOINS

ShawnSo I am having a hard time trying to write a single query for this. I have a table we will call table_a. I need to pull a single record that matches certain criteria. If the first one produces nothing then fall back to another one. I have been at this awhile and it very well could be something si...

0
Q: Manage files uploaded as a base64 string

Jérémy DutheilI am currently developing a website with AngularJS for the frontend, and a restful web service using Laravel framework (PHP5) as backend ; I am currently face to one problem, file uploading. I would like to have a very simple file uploaded, with a file input and just some copy into one of the ser...

0
Q: WordPress, Passing posted_data from Contact Form 7 via wpcf7_before_send_mail hook to FeedBurner

Tom ZaporI am developing a WordPress plugin that uses the Contact Form 7 wpcf7_before_send_mail action hook to grab the email that is entered in CF7 and, if the user select a checkbox, pass it the the email to MailChimp and FeedBurner. The MailChimp portion is working because I am able to use an API to...

0
Q: setcookie() not working inside of PHP function. why?

user3093095I made a simple register type of function and it's works fine except for the fact that it's not actually setting the cookie. It is inserting the data into the database but the cookie isn't being set. I read the PHP docs. and I believe I'm using it properly. What's wrong with it? Thanks. publ...

0
Q: Grab values from SQL array in PHP with while loop

user3093085So I have a table in mySQL that holds sale records which have customerID, productPrice, and quantity. I need to get the cost from each row, and then compile that into a totalCost. I need to use a while loop (assignment instructions) to do so, and so far I have not had any luck. Here is where I a...

0
Q: Two queries, two different tables, only one loop

TheApptrackerI would like to run two select statements for two different tables but list them in one loop. Currently I run them independently but this is not ideal as i would like the records listed in date order as a whole. Simplified Current setup $SQL = "SELECT * FROM table1 WHERE colA IS NOT NULL O...

0
Q: ajax loading of the php is not working properly

mahboob alamok now below is my code that when some body puts the username and password and click submit button then the Javascript and ajax is triggered <html> <head> <title>Untitled Document</title> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script>

0
Q: php code in movable type page templates

user3093006I'm trying to write a contact form for a company that uses the Movable Type platform. I'm in the process of creating page templates for them to use. I am 95% sure that my php code and my html is correct for the table and referencing each other- this is not the source of the issue. However MT does...

0
Q: mockery->shouldReceive() passing when it shouldnt?

Ir1shI am learning unit testing in laravel using phpunit and mockery. I am currently trying to test UsersController::store(). I am mocking User Model and using it to test the index method and that seems to work. When I take out $this->user->all() the test fails and when its in it passes. When ...

-1
Q: how to pass a value on link CakePHP

N3M0QCfirst of all, i'm using cakePHP i'll put you in context. on my page 1 i have a link ($this->Html->link)who are suposed to send me to the page 2 i'dd like to pass a value from the page 1 to page 2 in POST then my question is how my link is supposed to be and how can i retrieve the value in the pa...

0
Q: Adding an image to a pdf with pdftk

Brad HazelnutHello I am using pdftk to generate a PDF based on a form that is submitted. I have everything working fine until here. Which is adding an image of a signature. I am using signature pad which works great to generate the image file of the signature. Now i am trying to add that signature image to ...

0
Q: Update mysql table using a case that checks with regexp

Willee5586mysql_query("UPDATE `_autogen_tires` SET diameter = CASE WHEN SUBSTRING_INDEX(`description`, ' ', 1) = REGEXP '%X%.%R%' THEN LEFT(`description`, 2)"); I am getting an error when trying to run this: "#1064 - You have an error in your SQL syntax; check the manual that cor...

0
Q: Adding headers to my php code?

user3018817I have been advised to add headers to my php code as my emails are coming through to my inbox with blank/empty form fields even though the user has iputted them on the webpage before clicking submit. I will be greatly appreciative if somebody can tell me if i have done this right? <?php $Email...

0
Q: PHP/mysql, Using foreign keys to insert(id) by accepting (name) from form

user3093062I have 2 tables, one called school and one called student. Inside student I have several columns, one being a foreign key of school_Id. I also have several columns in school table(i.e. school_Id, name,...). I accept 'name' of the school from form. i want to insert the 'school_Id' in student table...

0
Q: Bxslider not firing

user2997903please tell me why I can't get the bxplayer to work. I've tried the simplest example and still nothing. I used the js and css directly from the site. <script src="http://bxslider.com/lib/jquery.bxslider.js"></script> <link href="http://bxslider.com/lib/jquery.bxslider.css" rel="stylesheet" /> ...

0
Q: Using jquery and php on the same webpage

MattI am building this web application and I am attempting to use Jquery and PHP for the scripting. The issue that I am running into while testing the page on MAMP is displaying PHP variable values. My php code runs successfully when I create a very simple test page with just basic HTML and PHP. You ...

0
Q: Upload binary data using box api

korvinkoDoes exist opportunity to upload binary content by box api? Does exist opportunity upload file from remote server by send http URL to box api?

0
Q: Inserting data to mySQL table

user3093085In my php program, I have to insert variables into one of my sql tables. Every time I go to test this out though, the values don't get posted to the table. Is there something wrong with these statements? or is the problem bigger than these 2 lines $sqli = mySQLi_connect("localhost","root","root"...

0
Q: imap_open get CC Addresses

charliejsfordI have this PHP code i am using for imap_open $header=imap_headerinfo($inbox,$email_number); $structure = imap_fetchstructure($inbox,$email_number); $from = $header->from[0]->mailbox . "@" . $header->from[0]->host; i want to be able to get all addresses after the first to add...

0
Q: php page scrape help - how to grab between div tags and nested h1 tag with extra content

user3093141Our website was made with static pages years ago. We want to scrape our site so we can get the content into a database. I'm having some trouble understanding how to form the regex statement to properly grab the text. The content looks like this... <div id="content-right"> <h1>This is the title.<...

0
Q: Querying posts from a different page

mi.manchiI am building a website for a church, and I wanna display JUST one staff profile from the staff page on the home page. On the staff page I used Advanced Custom Field to add staff profile. And it has img, title, name and description field. At the end of the code. "home-staff-wrapper" is where I ...

-1
Q: PHP String Search and Replace wildcard for numbers written in text

SammyI search around and could not find a simple solution for this specific case. I am not a PHP professional and am still learning. I am performing a String Search and Replace for numbers written in text to convert them back to numbers. A small example is shown below: $n_0='twenty one'; $n_1='twent...

0
Q: I have problems with arrays

user2939595So, I want to have table with users name, grades and subjects. Table will display only his grades. So I'm generating subject in foreach loop and reading grades depending on his id. For subject I want to have an array which will contain infos about subject (teacher, classroom, etc.) For now I ha...

1
Q: Workaround for php isset($array['bla'], array_key_exists['bla'] and !empty($array['bla']

TomWhen coding php I try to avoid as many warnings as possible. There is one question that bugs me for quite some time now, regarding arrays. When working with arrays and their values I often check for empty values first before I go to the "real work". if(array_key_exists('bla', $array){ if( !...

0
Q: Regex Grouping Parenthesis Issue

madphpUsing preg_match_all and regex can I split up this HTML and javascript into an array. <html> <head> <title>Page Title</title> <script> if (variablename < 1){ } </script> </head> <body> <p>Paragraph Header</p> </body> </html> I want to grab page title, variable name and paragraph header. ...

0
Q: Silverstripe 3: create page control function to get images from grandchild pages and sort all randomly

pinkpI'm trying to get a specific image ($FeaturedImage) from every grandchild page (GalleryPage.ss) of my Portfolio Page (PortfolioPage.ss) and display them in a random order. I can get the images using the template easily enough. PortfolioPage.ss <% loop Children %> <% loop Children %> <% loop...

0
Q: GoDaddy htaccess remove .php specific page

user3060454I have spent probably close to 10 hours trying to figure out this .htaccess problem and I am starting to think it might be a GoDaddy issue. I am trying to rewrite www.361orc.info/login.php to www.361orc.info/login. I am building a social media site for a class and I have already gotten profile pa...

0
Q: Best way to temporary store user form data, for form resubmission

StarboyCurrently building out a form that pushes data to a third-party client. After pushing said form data I get a reply back from the third-party server saying something along the lines of 'invalid / valid' data. If valid all is perfect in the world and I alert the user with a confirmation message. If...

0
Q: Jquery append fadeIN with show more button

Hossam Ramadani'm using show more button to get new results from database, but i'm facing a small problem, i need it to show fadeIn effect every time i click, but i get fadeIn only in the first time, what is the problem ? this is my code : <input type="hidden" id="direction" value="{$page+1}" /> <script type=...

0
Q: php-loep / oauth2-server Fatal error

user2462843Can some one point me in the right direction here, I keep getting the error: Fatal error: Class 'src\League\OAuth2\Server\Util\Request' not found in F:\Work\xampp\htdocs\oauth\test.php on line 4 after executing the test code below in my test.php from from php-loep / oauth2-server. The Class is t...

0
Q: Imgshot logout admin panel error

user3093043When i am in the admin area of imgshot and i want to log out from admin and click the link to log out i get the next error Notice: Undefined index: user_id in /home/****/public_html/inc/functions.php on line 371 The error in the line of 371 is the next one where `id`='$_SESSION[user_id]' O...

0
Q: Updating multiple columns and rows using PDO

user1824371I picked up a small snippet from a forum that allows me to update multiple row using PDO. The example only allows single column, but I wish it can enable column-wise update. I modified the snippet a bit, the problem is, a single change in row(url) will change all entry in row(url) If somebody h...

 
11:05 PM
0
Q: txt file extract only 8 digit numbersand transform to date format

user3090697I have a txt file that contains text and code. <div data-role='day' data-day='20131225'><div data-role='event' data-name='<h1>kerst</h1>sdfg' data-start='Van 00:00u ' data-end='00:00u' data-location='thuis'></div></div> <div data-role='day' data-day='20131212'><div data-role='event' data-name='<h1>

 
11:17 PM
0
Q: PHP: Sending file into script for processing

user3093247I wrote below PHP code. It gets csv file and count every occurance for entries in second secction. It is working nice, when file is given by file name. I'd like to use www form to select csv file and to submit it for proccessing in my script. No need to save on server side. I tried to do it in t...

0
Q: Zend Framework 2 urlencode

RR_1990I want to convert string to string which are url friendly In my none Zend Framework 2 project is just use urlencode($valueContainingString); Now i'm building an application with Zend Framework 2, now I was wondering if there is any better way to do this. I did some research and I looked at co...

0
Q: Loop through mysql table with php to find grade average of letter grades

user3062910Im trying to find the gpa of a set of grades inserted into a table, the column of the grades is of type varchar and i need to loop through and then convert those to decimal, Im very lost and dont now how to go about this. any help would be appreciated

0
Q: JSON from Android to PHP

user2916643I know that this is a repetitive question, but I have done numerous google searches and seen numerous examples on SO and other sites but still cannot get this to work. What I am trying to do is send a json object from an android app to a PHP script. Ultimately I want to decode that json object ...

0
Q: Replace (filter?) WooCommerce get_items() with WP custom query

forgetfuljamesSo, I am trying to implement a drag and drop interface for WooCommerce order line items so that I can control the order in which each line item appears (without having to add each item to the cart in the proper sequence). This functionality overrides the default WooCommerce functionality which d...

0
Q: Comparing 2 objects PHP

Ivan Ristici need to compare 2 objects to remove duplicates / find new enteries. The objects are not identical, but they contain the same username key Here is the layout database object array [0]db->username [0]db->something [1]db->username [1]db->something etc other object array [0]ob->u...

-1
Q: Merging multidimensional arrays - avoiding duplicates is values and keys

WojtazzzI have a very big order form on my online shop. There are three input field for every product (size S, size M, size L). Simplified code of the form: foreach ($productid as $id) { echo '<input type="text" name="input['.$id.'][s]" />'; echo '<input type="text" name="input['.$id.'][m]" />';...

0
Q: Invalid argument supplied for foreach() in MYSQL works in first table not second

user3087108I keep getting this Invalid argument supplied for foreach() in when i launch the PHP. Im mainly posting here because it the foreach works like charm for the first table (as shown in the URL at the bottom) <?php //connect to MySQL include("inc_connect_database.php"); //selet database mysql_sele...

0
Q: How can i clean up an array

Memor-Xi have an array which is a collection of all the sizes that a product could possible be, this is used by Magento using a EAV Database Structure so the array is formatted like this entity_id => 'text', 28709 => 'L' 28734 => 'S' 28732 => 'XL' 28721 => '22B' 28705 => '16' what i have posted is o...

0
Q: php script works when manually run but only partially works as cron job (will not write files to directory)

user2913821I'll start by saying I am very new to linux in general. What I have is a php script I wrote that fetches images from posts on reddit.com hides the post and adds the link to an array, then saves all the images in the array. when I type something like: "php cron.php" as root it runs fine, but whene...

-8
Q: My page wont display properly after adding PHP

Owen FarnanOutput looks like this: ---REMOVED--- Here is the code: ---REMOVED---

0
Q: Session doesnt have value on laravel 4

melvnberdGood Day guys, I was wondering why is it that my when i Session::flash('key', 'value'); and when i try to echo its value like $message_status = Session::get('key'); dd($message_status); I get a null Value, but when I do Session::flash('message', Lang::get('alerts.messages.successUpdate')...

 

« first day (295 days earlier)      last day (15 days later) »