ankitweblogic logo
W e b t u t o r i a l s

Define PHP

PHP Installation


PHP Case Sensitivity

PHP Variable

PHP Echo & Print

PHP Operators

PHP Receiving Input

PHP Decision Making

PHP Loops

PHP Jumping Statement

PHP Image Gallery

PHP Arrays

PHP File Upload

PHP String Functions

PHP Math Functions

PHP Functions

PHP Variable Scope

PHP Constant Variable

PHP Superglobals

PHP Form Validation

PHP Include Statement

PHP Filter

PHP File Handling

PHP Date Functions

PHP Cookies

PHP Session

PHP Send Emails

PHP Captcha

PHP-MySQL Connectivity

PHP MySQL Select

PHP MySQL Insert

PHP MySQL Delete

PHP MySQL Update

PHP MySQL Injection

PHP MySql Insert

<form action="" method="">
	Address <input type="text" name="address" ><br>
	Name <input type="text" name="name" ><br>
	<input name="submit" type="submit" value="insert">

	$uid = mysqli_real_escape_string($conn, $_GET['address']);

	$conn = mysqli_connect("localhost", "root" , "", "student");
	if($conn === false){
		die("ERROR: Could not connect to database.");
	$sql = "insert into student.add (Address, Name) values('".$uid."', '".$uname."')";
	$result = mysqli_query($conn, $sql);
		echo "Record inserted";
		echo "Unable to insert record";