Database couldn't select

In 2 lines of my php code ... $link = mssql_connect($DB_HOST, $DB_USER, $DB_PASS); if (!$link || !mssql_select_db($DB_NAME, $link)) { die('Unable to connect or select database!'); } $link connection is established, however, the DB selection...
more »

2017-05-14 16:05 (0) Answers

JQuery For Download Button

I am working on a project which is cropping uploaded image in circle and then save it for preview. Here is also a button for download saved image which is cropped. Here is my main php page: <html lang="en"> <head> <title>PH...
more »

2017-05-14 14:05 (1) Answers

Multiple functions using array_map

array_map accepts string as its first argument. Is there a way, to use arrays instead of strings, like: .... array_map( array('trim','urlencode'), $my_array); so I could attach multiple functions. ...
more »

2017-05-14 12:05 (2) Answers

Not able to access Subfolders | Php framework

I am editing a site that is made using some framework on PHP doesn't show which. All the public files like CSS,JS are inside a Public directory. I want to upload a separate site within the domain like www.domain.com/newsite i have created the folder ...
more »

2017-05-13 14:05 (3) Answers

customise text box in zend

My expected output is this https://s9.postimg.org/v85i5gm73/required_output.png but i am getting output as https://s1.postimg.org/k6vx1h5nj/wrong_output.png I am using zend framework. my form is $this->setMethod('post'); $...
more »

2017-05-13 14:05 (0) Answers

nested loops and debugging

Objective: Elaborate a function, that returns an array of dimension 4x4. An example of the possible outcome of the function is: All I have done: matriz<-function(M){ M<-matrix(ncol=4,nrow=4); M[1,]<-sample(LETTERS[1:4]); M[2,]<-samp...
more »

2017-05-13 13:05 (2) Answers

Style.Top property doesn't last

I have a problem with a php page. What I want is a button that can put a table (inserted with php) to change its TOP from 310px to 500px. The table starts like this: <?php print('<table id="bloque" style="top:310px;">'); print("<tr>")...
more »

2017-05-13 09:05 (2) Answers

Opencart SEO URL www.example.com/catalog

In my project I need URL's like example.com/catalog for product lists. But in Opencart catalog is in the root folder. So, I've tried to rename this folder, but not everything works correctly. Some parts of template are not rendered. Is there any docs...
more »

2017-05-13 08:05 (0) Answers

SQL query for top 100, displayed in reverse

I need some help with what should surely be a simple query! A database of logos, 18K strong. Each logo has a score. I want to select the top 100 by score and display them from 100 to 1, not from 1 to 100. My query is: SELECT * FROM tbllogos WHERE ...
more »

2017-05-13 04:05 (1) Answers

Get ? and & separately Javascript / PHP

all. I've got a site that requires two variables in the url. I've had it working up to this point with one variable: http://example.com/index.php?username=Doofitator And to extract it, the code: var a = location.href; var userNameVar = a.substrin...
more »

2017-05-13 02:05 (3) Answers

PHP: XML to JSON fails to convert

I am using the following function to convert XML to Json: function XMLtoJSON($xml) { $xml = file_get_contents($xml); // gets XML content from file $xml = str_replace(array("\n", "\r", "\t"), '', $xml); // removes ne...
more »

2017-05-13 01:05 (0) Answers

Integrating Sendgrid with Zend framework

We have a site that's in Zend Framework. it uses a mailer called TransportFactory.php It worked ok with exmail, but now we need to switch to SendGrid, and it's just not working, no matter the different guides we've looked at. Does anyone have a sim...
more »

2017-05-12 22:05 (1) Answers

ErrorException in HasRelationships.php

Im gettings this error, but i'm not sure is it because of the relationship or something else? Error ErrorException in HasRelationships.php line 487: Class 'Company' not found User.php public function company(){ $this->belongsTo('Comp...
more »

2017-05-12 19:05 (1) Answers

Get HTML string from URL

here is my code to send an email: $result = $client->sendEmail([ 'Message' => [ 'Body' => [ 'Html' => [ 'Data' => '<string>', // PUT HTML FILE HERE ], 'Text' => ...
more »

2017-05-12 18:05 (1) Answers