Posts

Showing posts from May, 2024

PHP program

Image
  Userauthentication.php <?php $con= mysqli_connect("localhost", "root", "weareteam@2020") or die('could not connect to server'); mysqli_select_db("drgjena", $con) or die('could not connect to database'); $user = $_POST['Uname']; $pssword = $_POST['password']; //$query = "SELECT userid from user where userid = '$username' and password = PASSWORD('$password')"; $query = "SELECT * from users"; $result = mysqli_query($query); while($value=mysqli_fetch_array($result)) { if($user == $value['userid'] && $pssword == $value['password']) { echo "login success"; echo "username:".$value['useriname']; echo "password:".$value['password']."<br>"; break; } else {           echo "not authenticated";         break;  ...

Web development Lab

  3)   Create Web pages using AJAX.   SOURCE CODE :- <?php // Array with names $a[] = "Anna"; $a[] = "Brittany"; $a[] = "Cinderella"; $a[] = "Diana"; $a[] = "Eva"; $a[] = "Fiona"; $a[] = "Gunda"; $a[] = "Hege"; $a[] = "Inga"; $a[] = "Johanna"; $a[] = "Kitty"; $a[] = "Linda"; $a[] = "Nina"; $a[] = "Ophelia"; $a[] = "Petunia"; $a[] = "Amanda"; $a[] = "Raquel"; $a[] = "Cindy"; $a[] = "Doris"; $a[] = "Eve"; $a[] = "Evita"; $a[] = "Sunniva"; $a[] = "Tove"; $a[] = "Unni"; $a[] = "Violet"; $a[] = "Liza"; $a[] = "Elizabeth"; $a[] = "Ellen"; $a[] = "Wenche"; $a[] = "Vicky...

Game Development Lab

 Exp 5. Write a c# script to Destroy game objects Over Time (Object pooling).  Aim: Write a script to destroy a GameObject within a specific Time.  using System.Collections;  using System.Collections.Generic;  using UnityEngine;  public class DestroyOverTime : MonoBehaviour  {  public float lifeTime;  // Start is called before the first frame update  void Start()  {  }  // Update is called once per frame  void Update()  {  /* lifeTime -= Time.deltaTime;  if(lifeTime< 0)  {  Destroy(gameObject);  } */  Destroy(gameObject, lifeTime);  }  }   Exp4 . Write a C# script for damaging and killing the player depending on his health.  using System.Collections;  using System.Collections.Generic;  using UnityEngine;  public class KillPlayer : MonoBehaviour  {  private void OnTriggerEnter2D(Collider2D other)  {  if(other.tag == "Player") ...