Jump to content

sompal

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About sompal

  • Rank
    Newbie
  1. sompal

    JAVASCRIPT

    <script type="text/javascript"> function checksName(form) { var eobj=document.getElementById('SnameError'); var sName = form.sName.value; var oRE = /^[A-Z a-z]*$/; var error=false; eobj.innerHTML=''; if (sName == '') { error='Error: Surname cannot be blank!'; form.sName.focus(); } else if (!oRE.test(sName)) { error="Incorrect format."; } if (error) { form.sName.focus(); eobj.innerHTML=error; return false; } } function validPhone(form) { var eobj
  2. sompal

    PHP

    <?php $dbConn = new mysqli("localhost", "student", "Autumn", "fact"); if($dbConn->connect_error) { die("Failed to connect to database " . $dbConn->connect_error); } ?> <?php error_reporting(E_PARSE); //require_once("conn.php"); $number = $_POST["quantity"]; if (isset($_POST["submit"])) { if(!empty($number)){ if (is_numeric($number)){ if($number < 60){ $sql = "SELECT name, quantityInStock, price FROM product where quantityInStock > $number order by quantityInStock ASC ";
×
×
  • Create New...