Jump to content

alvin567

Members
  • Posts

    161
  • Joined

  • Last visited

Posts posted by alvin567

  1. <html>

    <head>

    <!-- ajax functions from w3schools-->

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

    <script type="javascript/text">

    function showSummary(str)

    {

        alert("I am an alert box!");

    if (str=="")//Since select a country is ""

      {

      document.getElementById("summary").innerHTML="";

      return;

      }

    if (window.XMLHttpRequest)

      {// code for IE7+, Firefox, Chrome, Opera, Safari

      xmlhttp=new XMLHttpRequest();

      }

    else

      {// code for IE6, IE5

      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");

      }

    xmlhttp.onreadystatechange=function()

      {

      if (xmlhttp.readyState==4 && xmlhttp.status==200)

    {

    document.getElementById("summary").innerHTML=xmlhttp.responseText;

    }

      }

    xmlhttp.open("GET","getplace.php?q="+str,true);

    xmlhttp.send();

    }

    </script>

    </head>

    <body>

    <form>

    <select name="country" onchange="showSummary(this.value);">

    <option value="">Select:</option>

    <option value="SG">Name</option>

    </select>

    </form>

    <div id="summary"><b>Database Info</b></div>

    </body>

    <html>

     

    -----------------------------------------

    Try pasting on your browser it doesn't reach the alert("I am an alert box");

  2. 
    <!--
       login functions
    -->
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <?php 
        include 'mysql_config.php';
    include 'mysql_opendb.php';
    ?>
    <html>
    <body>
    	<form id="login" action="login.php" method="post">
    		Email: <input type="text" name="email"/>
    		</br>
    		Password:<input type="password" name="password" maxlength="12"/>
    		</br>
    		<input type="submit" value="submit">
    	</form>
    </body>
    <html>
    
    <!--login controller-->
    <?php 
        if(isset($_POST['email']) && isset($_POST['password'])){
        //$email =htmlspecialchars($_POST['email'],ENT_QUOTES);//special character in email
    $email = $_POST['email'];
    $password = $_POST['password'];
    //on alternate flow 3a) password and user id not founded.
        if( $email != "" || $password != ""){
    	$sql="SELECT * FROM user WHERE email='".$email."'";
    	$result=mysql_query($sql);
    	$row=mysql_fetch_array($result);
    	if($password == $row['password']){
    		header('Location: home.php');//the pages for the members dashboard,set the type of preference.
    		//need to sessions to set the type of users
    	}
    	else{
    		echo 'Password not founded.Contact PanelPlace SuperAdmin';
    	}
    }else{
    	echo 'Please fill in the username and password';
    }
    }
    ?>
    <?php 
    include 'mysql_closedb.php';
    ?>
    

     

    Currently working on a login functions,it output the errors as follows in the sites.

  3. Hi there,how can I design a mass mailer campaign for my business.

    I need to store my the list of email in the database and dispatch the email to targeted people.

    What are the software and configurations that I roughly need?Can anyone explain?

  4. How to prevent bypass page in PHP?

    Let's say the order of page is:

     

    page1.php->page2.php->page3.php (complete)

     

    the user has to go through the pages to complete a process like registering

     

    Is it effective if i use session to store the prev_url:

     

  5. Hey.There is this jobs that I am offered as a student.

    It says I am required to load existing data from excel spreadsheet into program and load into the relational database.It also requires me to design the relational database.It is more towards finanical data like stocks and bonds and can you suggest what are the tools softwares and language that I am supposed to use.

     

    Ok the requirements are quite vague,because I haven't mentioned that I wasn't offered the job yet.

     

    So should I use MSSQL or ms access which one is better?

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.