- Where do you access this blog from?
- Do you have any difficulties in navigating the blog? If yes, please explain.
- Do you have any difficulties in accessing your requested articles. If yes, please explain.
- Do you have any difficulties in accessing the blog? If yes, please explain.
- Advantages of a blog as a learning-aid, give your opinion (3 items).
- Disavantages of a blog as a learning-aid, give your opinion (3 items).
- What are the features you frequently use? (Download notes, submit comment, involve in the discussion, download the source code, others) – you may answer more than one.
This PHP code is a simple search example. It needs the user to enter a name and the PHP script will to the searching by the name provided by the user in the text box. <form name='search' method='get' action=''> Insert the firstname <input type='text' name='txtname'> <input type='submit' value='search name'> </form> <?php //database connect $db=mysqli_connect("localhost","root","","mycompanyhr"); //checking database connection if ($db==false) { echo "Connect failed: ". mysqli_connect_error($db); exit(); } else { echo "Connection successful"; } $n=$_GET['txtname']; $sql="select EMPNO, FIRSTNAME, LASTNAME, WORKDEPT, PHONENO from employee where FIRSTNAME like '%$n%' "; $rs=mysqli_query($db,$sql); if($rs==false){ echo ("Query cannot be executed!<br>"); echo ("SQL Error : ".mysqli_error($db)); } else...
Comments
Post a Comment