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

10:05 PM
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) »