I am writing a web sign up form and related php
I have installed Xampp in my computer..
I had written newindex.php like below
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Title of the document</title>
</head>
<body>
<form action="signup.php" method="post" >
<input type="text" name="first" placeholder="Firstname"><br>
<input type="text" name="last" placeholder="Lastname"><br>
<input type="text" name="uid" placeholder="Usernmae"><br>
<input type="password" name="pwd" placeholder="Password"><br>
<button type="submit">Sign Up</button>
</form>
</body>
</html>
the above code which is HTML code for my signup where there are four fields first name last name uid along with password and I used method POST
where my action is signup.php and method is post
here is my signup.php
<?php
include 'dbh.php';
$first= $_POST['first'];
$last= $_POST['last'];
$uid= $_POST['uid'];
$pwd= $_POST['pwd'];
echo $first."<br>";
echo $last."<br>";
echo $uid."<br>";
echo $pwd."<br>";
?>
when I am running I m getting the following...on the browser
which is incorrect
-----current output-------------
<?php
include 'dbh.php';
$first=$_POST['first'];
$last=$_POST['last'];
$uid=$_POST['uid'];
$pwd=$_POST['pwd'];
echo $first."<br>";
echo $last."<br>";
echo $uid."<br>";
echo $pwd."<br>";
?>
the above output is wrong ,it should be the values when user insert into the form which i created earlier
how can I fix this ...
any help will be welcome
where I m going wrong ...
so is my extension correct , is there a problem in PHP installation