I want to get sum of estimate quantity from estimates table gropBy material_id. Also want get sum of mprs quantity related to previous query table.

My estimates table is as below

| id | project_id | material_id | estimatequantity |

| 1 | 1 | 1 | 500 |

| 2 | 1 | 2 | 899 |

| 3 | 1 | 1 | 250 |

and my mprs table is as below

id estimate_id mprquantity 1 1 334 2 1 1 3 2 273 4 1 20

now I want to generate below table

material id Estimated mprs 1 750 355 2 899 273

I searched everywhere but failed.

http://blog.ionic.io/10-minutes-with-ionic-2-calling-an-api/ from this tutotorial. in the this.http.get('https://randomuser.me/api/?results=5') is working well but this.http.get('http://need4engineer.com/api.php') is not working.

I m developing a mobile apps which will fetch json data from my server.

My server address is http://need4engineer.com/api.php this is not working. But same data from another server https://randomuser.me/api/?results=5 is working well. Both the cases header is same.

Please help me

I m using a jquery plugin for autocomplete multiselect.

Plugin link is http://www.jqueryrain.com/?Bxwy2bPt

Now I want to submit this selected item to page.

How can I do that. Plz help.

@DaveAmour I have seen such site, Which check the page has been liked or not and then according to that page showed :) Why u think this is awful ?

I have a page named 'xyz'. and I have a webpage xyz.com
Now I want that visitor must like my page to view my web site. So I need a code which will check whether my page has been liked by user or not.

NB: I dont have any ssl in my site. Plz help me. Thnx

I want that a div will be shown if a specific facebook page is not liked.

Say I have a page facebook.com/abcd

Now I want that if visitor liked the page then show content otherwise it will show like button.

How can I do that. plz help

Hello everyone
I have a web form. This form has 5 fields. I want that if someone fill up the form and submit, this form data will be save to a form. Also want this after submitting this form it will do some php process.
How can I do that ?

I have no code. I have only words and meanings

I want to make a dictionry using html5.
For example I have words

  1. good
  2. bad
  3. hot
  4. cold
    Now I want that in index page this words will be shown as 3 column.
    If I click on any word, the meaning of the word should display. Meaning can be displayed in a div or as popup. Please help me.
    Basicaly I want to make a important word dictionary in Beangali for mobile.

Actually I need to develop software of offline, for pc.

I m a civil engineer. I have basic Idea in PHP and VB
Now I want to make a civil engineering database software for PC windows.
Which software will be good and easy for me. Thats mean Visual basic or any other softwaree. Please suggest me. Remember that I m not a good programmer and I need Database.
Also I need good visualisation. Thanks

how to http://mysite.com/?sura=x&ayat=y as http://mysite.com/x/y/
may be a/b/c/d/er/e/er/......

thanks pixelsoul

RewriteEngine On
RewriteRule ^([^/]*)$ /?sura=$1 [L]
RewriteRule ^([^/]*)/$ /?sura=$1 [L]
RewriteRule ^([^/]*)/([^/]*)$ /?sura=$1&ayat=$2 [L]
RewriteRule ^([^/]*)/([^/]*)/$ /?sura=$1&ayat=$2 [L]

This is not working

but only this works

    RewriteRule ^([^/]*)/([^/]*)$ /?sura=$1&ayat=$2 [L]
    RewriteRule ^([^/]*)/([^/]*)/$ /?sura=$1&ayat=$2 [L]

Hi I want to develop a facebook apps. Where it will take quiz, then merge profile picture in a certificate image. with result.

the index.php file is as below

    include_once "fbmain.php";

    //if user is logged in and session is valid.
    if ($user){
        //fql query example using legacy method call and passing parameter
            $fql            =   "select name, hometown_location, sex, pic_square from user where uid=" . $user;

            $param  =   array(
                'method'    => 'fql.query',
                'query'     => $fql,
                'callback'  => ''
            $fqlResult   =   $facebook->api($param);
        catch(Exception $o){
    //set page to include default is home.php
    $page   =   isset($_REQUEST['page']) ? $_REQUEST['page'] : "home.php";
    include_once "template.php";

and the home.php is as below

echo '<div id="namaz_content">';
echo '</div>';
echo $userInfo['picture'];
//Get the current users id
$uid = $facebook->getUser();

//create the url
$profile_pic =  "http://graph.facebook.com/".$uid."/picture?width=80&height=80";
//echo the image out
echo "<img src=\"" . $profile_pic . "\" />";

echo '<img src="image.php?name=My name is Tushar&result=A%2D&taka=1000&subject=math" />';

and the image.php file is as below

$taka='Tk. '.$_GET['taka'].'/-';
$dest = imagecreatefromjpeg('certificate.jpg');
$src = imagecreatefromjpeg('7e142c8d.jpg');

  // Allocate A Color For The Text

   $red = imagecolorallocate($dest,255,0,0);
   $blue= imagecolorallocate($dest,0,0,255);

  // Set Path to Font File
  $font_path = 'bdquiz.ttf';

  // Set Text to Be Printed On Image

  // Print Text On Image
    imagettftext($dest, 20, 0, 192, 240, $red, $font_path, $text);
    imagettftext($dest,35, 0, 72, 380, $red, 'arial.ttf', $result);
    imagettftext($dest,15, 0, 318, 420, $red, 'arial.ttf', $taka);
    imagettftext($dest,15, 0, 270, 348, $blue, 'arial.ttf', $subject);
imagecopymerge($dest, $src, 468, 186, 0, 0, 80, 80, 100); //have to play with ...

I have a dictionary html5 apps. where I used datalist and autocomplete. When I click on submit button then its work fine. I want that when any Item is selected from the autocomplete list, it will work instant. So that no one need to click on extra button.
is it possible ?

I want to develop page. Where there will be three mp3 files as audio. 1.mp3 , 2.mp3 & 3.mp3 files. and there will be three button. button 1 , 2 and 3. Initially button1 will be enabled and other two will be disable. then when user click on button 1. 1.mp3 file will start playing. and after finishing 1.mp3 button 2 will be enable. againg when user click on button 2 then 2.mp3 will start playing. and after finishing that button 3 will be enable and so on.
How can I do that ?
is there any advance code for dewplayer or other player. Or if there any other method then plz help me.

I want to replace a word from text. I can do it with str_replace or str_ireplace. But I need more advance. for Example. my code is as below

$subject="Men and Women both r part of the world";
echo str_ireplace($search_word, '<span style="background:#0F0">' . $search_word . '</span>',
echo str_replace($search_word, '<span style="background:#0F0">' . $search_word . '</span>',
$search_1=str_replace($search_word, '<span style="background:#0F0">' . $search_word . '</span>',
$search_2=str_ireplace($search_word, '<span style="background:#0F0">' . $search_word . '</span>',
echo $search_2;

in first echo it is showing Both 'Men' and 'men' background color changed but 'men' replaced to 'Men'
in second echo it is showing Onle 'Men' background color changed
in third echo it is showing Both 'Men' and 'men' background color changed but 'men' replaced to 'Men'

But I want that background color of both 'Men' & 'men' will be changed but word should be remain its original case.
here $_POST['gender'] may be 'men' or 'MEN' or 'mEn' or 'danIwEb' etc. (any word and any character)

is it possible? plz help me.

<script type="text/javascript">
    $("div #search_ayat_div").click(function(){
    var link1='?verse=';
    var link2=$(this).html();
    $("div #bookmark").click(function(){
    var messageid = $(this).parent().children("#search_ayat_div").html();
    var div_id=$(this).attr('id');
                    "border":"medium solid #FF0000"
            alert("Successfully Bookmarked");
            alert("Already Bookmarked");

Here at line 17 $(this) is not working. Remember there multiple #bookmark div in the page.
is there any solution.
thank u

I Love daniweb for web solution. I want to make a website using jquery. I want to use jquer POST method for my site.
My sample code is


Here the word 'good' will be search in a database using search.php by POST method. I already did that and its working fine.
Problem is that when result is Unicode. Its showing ????????????????? character instead of real UTF-8 character.
My html files top r as below

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta content="EN" http-equiv="Content-Language">
<meta content="UTF-8" name="Charset">

Can u plz suggest me what should I do?

I have made a webpage with css. Its working fine in firefox. but not working in Explorer. But when I zoomout to 90% its working in IE.

html code is

<title>test slice</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="style.css" rel="stylesheet" type="text/css">

<div id="header_border">
<div class="table">
  <li class="logo">
            <img src="images/logo.png" alt=""></li>
            <a href="#" class="header_link">Home</a></li>
            <a href="#" class="header_link">Navigate</a></li>
            <a href="#" class="header_link">Convert by link</a></li>
            <a href="#" class="header_link">Tel A Friend</a></li>
        <li><input type="text" class="search_box"></li>
            <a href="#" class="header_link">People</a></li>
            <a href="#" class="header_link">Category</a></li>
            <a href="#" class="header_link">Upload</a></li>
            <a href="#" class="header_link">Login | Register</a></li>

and my css code is

        font-family:Verdana, Geneva, sans-serif;
    padding:0px 35px 0px 5px;
ul li{
    padding:0px 5px 0px 5px;
    list-style-type: none;
.table {
    display: table;   /* Allow the centering to work */
    margin: 0 auto;


special problem is in firefox list Items are vertically middle. But in IE its at TOP.
Plz help me

i have no idea about this. But I know it can be done.

Still I m confused. I think the class functions can be done by using function.

I have a form with textarea. when user submit content through this text area. indent and paragraph is preserving in mysql. Even when I copy data from mysql via phpmyadmin, it also preserving indent and paragraph. But problem is that, when I get data from mysql via php script. All content is showing in block in one block.

is there any solution?
thanks everybody

I have an website. In this site client can pay for one Item via paypal. I made a paypam Ipn script. But its not working. can anybody help me.
part of My code is

// read the post from PayPal system and add 'cmd'
$req = 'cmd=_notify-validate';
foreach ($_POST as $key => $value) {
$value = urlencode(stripslashes($value));
$req .= "&$key=$value";
// post back to PayPal system to validate
$header = "POST /cgi-bin/webscr HTTP/1.0\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";

$fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30);

if (!$fp) {
} else {
fputs ($fp, $header . $req);
while (!feof($fp)) {
$res = fgets ($fp, 1024);
if (strcmp ($res, "VERIFIED") == 0) {


is there any problem with last two line of $item_number and $payment_gross ? is '$fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30);' correct?

I have a site. Where user will write something. Then pay to paypal. and the content will be emailed to me afer payment confirmation of paypal.

  1. I have php
  2. I dont Mysql
  3. Jquery can be used
    is it possible?
    plz help me

I have a website.
One can download books from this site. There r various books in various price.
Now I want that user will pay to paypal and I will get the value of amount diposit.
How can I do that.
Thank u

I have seen a web site ebayclassifieds.com. This site has simple animation. First i thought it was developed by flash. But after right-click I found that it was not developed by flash. Then How it was built?
my gueses are

  1. html5

Please give me suggestion to built such interface what languages I have to learn (html,jquery,html5,fireworsk...).