emclondon 38 Junior Poster in Training

calm down kid, I had to learn as fast as I can to answer your question.

its kinda complex but once you get a hold of it, its easy as a pie.

<!DOCTYPE HTML>
<HTML lang="en">
    <head>
        <title>
            Incident Report
        </title>
        <META name="description" content="HTML5 WebDatabase Tutorial" />
        <META name="keywords" content="HTML,CSS,JavaScript" />
        <META name="Author" lang="en" content="Prasanna K Yalala" />
        <style type="text/css">
            html,body {
                border: 0;
                height: 100%;
                font-family: arial, helvetica, sans-serif;  
            }
            body{
                background-color: rgba(0, 0, 0, 0.6);
                color: #000;
                height: 100%;
                margin: 0;
            }
            #insert_incident_div {
                display: none;
                margin-top: 8%;
                margin-left: 16%;
                width: 425px;
            }
            #menu{
                margin-top: 23%;
                margin-left: 30%;
            }

            #retrieve_incident_div {
                display: none;
                margin-top: 5%;
                margin-left: 15%;
                width: 425px;
            }

            #control {
                background: -webkit-gradient(linear, left top, left bottom, from(#FFFFFF), to(#DDDDDD));
                width: 500px;
                position:absolute;
                top: 50%;
                left: 50%;
                width:38em;
                height:20em;
                margin-top: -10em; /*set to a negative number 1/2 of your height*/  
                margin-left: -20em; /*set to a negative number 1/2 of your width*/
                border: 1px solid #ccc;
                -webkit-box-shadow: 2px 2px 2px #999;
            }
            #control button{
                border: none;
                color: #888;
                padding: 5px;
                width: 125px;
                height: 30px;
                border-radius: 5px;
                -webkit-box-shadow: 1px 1px 1px #888;
                background: -webkit-gradient(linear, left top, left bottom, from(#FFFFFF), to(#CCCCCC));
            }
            #control button:hover{
                color: red;
            }


            #result_div {
                color: red;
                padding-top: 20px;
                padding-left: 35px;
            }


            #message_box{
                height: 80px;
                margin: 0px auto -1px auto;
                width: 275px;
                border-radius: 5px;
                background: #fff;
                color: red;
                display:none;
            }
        </style>

        <script type="text/javascript">

            /**
            * Prasanna K Yalala
            * 
            * References
            * .tutorialspoint.com,  Stackoverflow.com,
            * html5rocks.com,  Tizag.com, w3schools.com, 
            *
            * Copyleft 2012, Nothing is Reserved.
            */

            /** …
emclondon 38 Junior Poster in Training

dude^ no offense but I work with magento.

and when I say you can run it on Windows, you should trust me.

cereal commented: no problem, bye ;) +8
emclondon 38 Junior Poster in Training

not sure, maybe I think its sending twice because of the code you're using?

$body = "Dear ".$_GET["name_$x"]."
        \n\n $message \n\n
       YESHUA SCHOOL.";
      
       mail($to, $subject, $body, $headers);
       //break;
       
       if(mail($to, $subject, $body, $message))
       {
           echo 'Message sent successfully';
       }
 else {
           echo 'Message failed';
       }

try changing it to

$body = "Dear ".$_GET["name_$x"]."
        \n\n $message \n\n
       YESHUA SCHOOL.";

       if(mail($to, $subject, $body, $message))
       {
           echo 'Message sent successfully';
       }
 else {
           echo 'Message failed';
       }

maybe that would work. I'm not sure, but its worth giving a try.

karthik_ppts commented: Yes +7
emclondon 38 Junior Poster in Training

based on the code you posted, all you need to do is to include the file in your php page and perform a simple switch to get the result you are after. something like this:

yourpage.php

include('get_browser.php');
	$browser=getBrowser();
	switch ($browser['name'])
	{
		case 'Google Chrome':
			echo "you are using chrome";
			break;
		case 'Internet Explorer':
			echo "you are using ie";
			break;
		case 'Mozilla Firefox':
				echo "you are using firefox";
			break;		
		default:
			break;		
	}

now just a reminder that, if you are looking just to change the CSS based on the browser, this is not the way to do it.

emclondon 38 Junior Poster in Training

Sorry for being a total jackass and abandoning this thread.

big massive thanks and apologies to JamesCherrill, ~s.o.s~, and NormR1 for all your help and support during the grim period of my life.

Thanks to you guys, now I have a masters degree and a Jr. Developer position in a reputed firm UK. I cannot express how grateful I am to you guys for all your support. if you are around london/reading/maidenhead give me a shout, I'll definitely buy you guys a pint or a dozen.

AND FINALLY:

uniKEY.zip

Here is the final product free to use for whatever you may wish to use it for.

cheers mates!

~s.o.s~ commented: :) +17
emclondon 38 Junior Poster in Training

Hello guys, im stuck working on a simulation program. I am working on a program which mimics a door's security key panel. In case if you have been wondering what a door's security key panel is.. its a keypad on the door which unlocks the door upon entering a proper password (in this case a combination of 0-9 and * & # symbols.

I've created a form and added 12 buttons on it. Whose Text reads 1,2,3,4,5,6,7,8,9,*,0,#. Also I have added a picture box whose default image is a black image. Now according to my simulation, all I need is to enter a 4 character password and if i enter the password right, the picture box's image would change (to green if correct or red if wrong password resp.)

I dont know how you professionals do it. But I have come up with an idea of mine to capture the sequence of key presses.

this is how I do it:

on click() event on every button, I assign a value of the button respective to the text of the button pressed.

for eg: lets assume button1 has its Text "1, and button2 has its Text "2"... so its event would be something like..

private value;

private void button1_click(object sender, EventArgs e)
{
     value ="1";
}

private void button2_click(object sender, EventArgs e)
{
     value ="2";
}

private void button3_click(object sender, EventArgs e)
{
     value ="3";
}

and so on..

I made a custom function …

ddanbe commented: Well documented question! +6