baig772 19 Web Application Architect

manually run your query in mysql and then see what result it displays, and share it

baig772 19 Web Application Architect

For android app development, you have knowledge of Java. Further you can find help Click Here

baig772 19 Web Application Architect

Solved it

 ImageView play  =   (ImageView)findViewById(R.id.play2);
 play.setOnClickListener(new OnClickListener() {

my Kalma2.xml did not contain any id image with id "play2". Now its running fine

baig772 19 Web Application Architect

i am new to android. While i am running my application, it is running well in landscape mode, but in portrait mode, application is forcefully closed giving the following in log

05-31 16:48:30.958: W/KeyCharacterMap(428): No keyboard for id 0
05-31 16:48:30.958: W/KeyCharacterMap(428): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
05-31 16:50:45.728: D/AndroidRuntime(484): Shutting down VM
05-31 16:50:45.728: W/dalvikvm(484): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
05-31 16:50:45.758: E/AndroidRuntime(484): FATAL EXCEPTION: main
05-31 16:50:45.758: E/AndroidRuntime(484): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.kalmas/com.kalmas.Kalma2}: java.lang.NullPointerException
05-31 16:50:45.758: E/AndroidRuntime(484):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
05-31 16:50:45.758: E/AndroidRuntime(484):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
05-31 16:50:45.758: E/AndroidRuntime(484):  at android.app.ActivityThread.access$2300(ActivityThread.java:125)
05-31 16:50:45.758: E/AndroidRuntime(484):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
05-31 16:50:45.758: E/AndroidRuntime(484):  at android.os.Handler.dispatchMessage(Handler.java:99)
05-31 16:50:45.758: E/AndroidRuntime(484):  at android.os.Looper.loop(Looper.java:123)
05-31 16:50:45.758: E/AndroidRuntime(484):  at android.app.ActivityThread.main(ActivityThread.java:4627)
05-31 16:50:45.758: E/AndroidRuntime(484):  at java.lang.reflect.Method.invokeNative(Native Method)
05-31 16:50:45.758: E/AndroidRuntime(484):  at java.lang.reflect.Method.invoke(Method.java:521)
05-31 16:50:45.758: E/AndroidRuntime(484):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
05-31 16:50:45.758: E/AndroidRuntime(484):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
05-31 16:50:45.758: E/AndroidRuntime(484):  at dalvik.system.NativeStart.main(Native Method)
05-31 16:50:45.758: E/AndroidRuntime(484): Caused by: java.lang.NullPointerException
05-31 16:50:45.758: E/AndroidRuntime(484):  at com.kalmas.Kalma2.onCreate(Kalma2.java:52)
05-31 16:50:45.758: E/AndroidRuntime(484):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
05-31 16:50:45.758: E/AndroidRuntime(484):  at          android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
05-31 16:50:45.758: E/AndroidRuntime(484):  ... 11 more
05-31 16:50:48.108: I/Process(484): Sending signal. PID: 484 SIG: 9

the code of my Kalma2.java is

package com.kalmas;

import android.app.Activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;

public class Kalma2 extends Activity {

public void onCreate(Bundle savedInstanceState) {
    final MediaPlayer   kalma2  =   MediaPlayer.create(this,   R.raw.kalma2);
    super.onCreate(savedInstanceState);
setContentView(R.layout.kalma2);

ImageView prev2 =   (ImageView)findViewById(R.id.prev2);

prev2.setOnClickListener(new OnClickListener() {

    @Override
    public void onClick(View v) {
        // TODO Auto-generated method stub
        kalma2.stop();
        startActivity(new Intent(Kalma2.this,Kalma1.class));
    }
});

ImageView   next2   =   (ImageView)findViewById(R.id.next2);
next2.setOnClickListener(new OnClickListener() {

    @Override
    public …
baig772 19 Web Application Architect

M- Model is your database layer
V- View is your front end i.i. displayed to the user
C- Controller acts as an intermediatry layer between Model and View

Further you can google it

baig772 19 Web Application Architect

you have forgot semi-colon ';' after

 case 0:
 $message = "Your account is now active. you may now <a href=\"login.php\">Log In!</a>"

put the semi-colon and it will be fine

baig772 19 Web Application Architect

Hi all,
How i can exit from an application?

Button exit     =   (Button)findViewById(R.id.exit_btn);
            exit.setOnClickListener(new Button.OnClickListener() {

                public void onClick(View v) {
                    // TODO Auto-generated method stub
                    finish();
                    java.lang.System.exit(0);

                }

            });

this code just takes me to the last activity but i want to completely close the application

baig772 19 Web Application Architect

As you have used POST method in your form, you can get your data as defined by ardav

baig772 19 Web Application Architect

How to set OnClickListener?
my code is

package com.calculator;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class CalculatorActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        Button b = (Button)findViewById(R.id.button1);
        String btn_val  =   b.getText().toString();
        EditText    edit_text   =   (EditText)findViewById(R.id.editText1);
        edit_text.setText(btn_val);



}

this code is getting the value of button id = button1 and setting it in text feild. i want to do all this work when clicked on any button e.g when clicked on 2, it should print 2 in text feild

baig772 19 Web Application Architect

Hi all,
i am new to android development, in fact its my first application. i am making a simple calculator. i just want to know how to get the value of a pressed button.
Any help plz

baig772 19 Web Application Architect

Hi all
i am working on a third party recruitment site in wordpress.
Site basically acts as intermediary between candidate and employee.
Is there any plugin to manage employees and employers in wordpress??

baig772 19 Web Application Architect

you can call your javascript function on change like this

<select name="drop_down" onchange="calculate()">
<option>option1</option>
</select>

where in javascript you can write a function

<script type="text/javascript">
function calculate() {
alert("hello world");
}
</script>
baig772 19 Web Application Architect

in old look, there was some javascrpt code given by dani web to embed in site on basis of reputation points, solved threads.
if i am not wrong then its name was member badge.

baig772 19 Web Application Architect

base_url method is recomended by me

baig772 19 Web Application Architect

like dany said, ypu must have strong OOP concepts and some other concepts like MVC and ORM to build your own framework. Its better to build a framework for PHP in PHP, but like fusebox, its the coldfusion framework and also used for PHP.
I personaly like Kohana (fork of CI). that also gives ORM approach. but it depends on your project requirements, which framework you would use :)
You can also use some framework to build your own CMS. for example we have magento that is build in Zend framework

baig772 19 Web Application Architect

Hi all
I was on break and just came back to Daniweb.
I saw some great changes here like texteditor and user menu on top.
I have some problems, admins please guide me
firstly i am not having any email if someone replies to articles, i have posted in and secondly in controlpanel, i am not seeing my member badge

Thanks
and congrats for the new look again :)

baig772 19 Web Application Architect

is it redirecting to any oter page or giving some error??
share your error also

baig772 19 Web Application Architect

i included my css like <link rel="stylesheet" href="css/style.css" /> but while viewing source, i am having the following source <link rel="stylesheet" href="localhost/mysite/css/style.css"; />

baig772 19 Web Application Architect

i have following .htaccess

   RewriteEngine On

DirectoryIndex index.php

RewriteRule ^([a-zA-Z0-9_-]{3,20})/([^/]+)/([^/]+)?$ index\.php?page=$1&s=$2&o=$3 [L]

RewriteRule ^([a-zA-Z0-9_-]{3,20})/([^/]+)?$ index\.php?page=$1&s=$2 [L]

RewriteRule ^([a-zA-Z0-9_-]{3,20})/?$ index\.php?page=$1 [L]

RewriteRule ^([a-zA-Z0-9_-]{3,20})?$ index\.php?page=$1 [L]

ErrorDocument 404 /404

it displays mu url as localhost/mysite/home for first perimeter and its going fine but when my url is localhost/mysite/home/user, whole look of page is disturbed i.e. no css and image is included here can any one please help me with this?

baig772 19 Web Application Architect

delete from table_name where skills = '';

Code blocks are created by indenting at least 4 spaces
... and can span multiple lines
baig772 19 Web Application Architect

Hi all
I am trying to show a comment box under each post,
i have tried

<?php get_template_part( 'content', 'single' ); ?>

					<?php comments_template( '', true ); ?>

but the comment box is still invisible

baig772 19 Web Application Architect

Thanks for the reply veedeoo
but my site is not static, what to do if i have some text dynamic?

baig772 19 Web Application Architect

Hi all
I am working on a website and the requirement is to make it in two languages i.e. icelandic and english.
just like facebook and other google, if a user selects a language, then the site is translated in that language.
I am not allowed to use google translator.
Any other way to do this in Php

Thanks in advance :)

baig772 19 Web Application Architect

Thanks to all
Solved my problem :)

baig772 19 Web Application Architect

Hi all
I have following table structure

pk_cat_id(int)     cat_name(varchar)     cat_desc(text)    fk_cat_id(int)

table is self related as one to many

i want to select cat_name, cat_desc and parent_cat_name()
i.e.
from fk_cat_id, how i can get cat_name

baig772 19 Web Application Architect

wow it looks great,
where i should use it?? :)

baig772 19 Web Application Architect

can you see name=himanshu if you put echo statement outside the while loop??

baig772 19 Web Application Architect

best of luck super duper :)

baig772 19 Web Application Architect

its obvious you cannot, because you are echoing $branch in name tag :)

baig772 19 Web Application Architect

share your form also

baig772 19 Web Application Architect

please share your query

baig772 19 Web Application Architect

on update, it depends which table information you are updating, while deleting, both table should have cascade

baig772 19 Web Application Architect

options are available in phpmyadmin for altering the table i.e. look for operations tab

baig772 19 Web Application Architect

without looking at your code, check if you have properly redirecting the page

if(login_condition_is_true){header('location:admin_home.php')}
baig772 19 Web Application Architect

yes, i mean fields in text area cannot be shown, after inserted one data, when i try to edit the data, only fields in text area cannot be shown..

then most probably your selection from db is not right

baig772 19 Web Application Architect

it means that your form is not posted on that page

baig772 19 Web Application Architect

still cannot shows :(

is your question is
text area is shown but no value in it???

baig772 19 Web Application Architect

it seems ok
have you included your connection file correctly?

baig772 19 Web Application Architect

no not like this :s
type this in your form

<form action='new_ticket.php' method='post'>

and then on new_ticket.php page
type this

echo "<pre>";
print_r($_POST);
exit;

and then submit your form and share what you get

baig772 19 Web Application Architect

just put that php code in your form, it should work fine unless and until there is any db or syntax error

baig772 19 Web Application Architect

Hello, any body can help me, i've try to show field textarea, but can't.. help me please.. herewith code:

<textarea type="text" name="alamat" rows="5" cols="40" value="<?php $_POST['$alamat']; ?>" /></textarea>

try

<textarea .......><?php echo $_POST['alamat'];?></textarea>
baig772 19 Web Application Architect

change the action of your form and on process page, type

echo "<pre>";

print_r($_POST);
exit;

and share what you get

baig772 19 Web Application Architect
<input type="submit">

always submits the form regardless of any javascript validation
you should try

<input type="button" on click="checkValidation()">

and then submit your form using javascript

form.submit()

function

baig772 19 Web Application Architect

i commented

response.close()

because i was following an old tutorial.
please change this to

response.end()
pritaeas commented: Thanks for sharing. +14
baig772 19 Web Application Architect

it doesn't matter if your incrementing your id or not, mysql_insert_id() always return the last inserted id

no it returns 0 if column is not auto incremented

baig772 19 Web Application Architect

where you are listing hyperlinks, you can try this

www.daniweb.com/<?php echo $user_name;?>

this will take you to user profile page for each user

baig772 19 Web Application Architect

i guess that your scenario is that you are updating 2nd table after inserting in 1st table???
try

mysql_info()
baig772 19 Web Application Architect
../

means go back,
if in the same directory, then

directory1/directory2/...../file
baig772 19 Web Application Architect

try this

include_once('action/Upload.php');
baig772 19 Web Application Architect

it worked,
i changed my code to this

var sys = require("util"),
    http = require("http");

http.createServer(function(request, response) {
    response.writeHead(200, {"Content-Type": "text/html"});
    response.write("Hello World!");
    //response.close();
}).listen(8090);

sys.puts("Server running at http://localhost:8090/");