How to get html input text type value in php and print

Hi guys, I recently started php and I'm stuck at a place where I can't get the html input type value for php. I am using Aptana to develop a website. tell me where and what i am doing wrong. I also didn't find a working answer on stackoverflow. please help me.

I am just viewing the HTML file in my browser, is this the problem?

my code is below

FirstWebPage.html

<!DOCTYPE html>
<html>
<body bgcolor="#ffffff">
<h1 style="font-size:44pt" align="center">myPersonals.com</h1>

<h2 align="center">Welcome to your personal data center </h2>
<form action="welcome.php" method="get">
<div align="center">
<h3>Login</h3>
<input style="height:20px; width:200px; font-size:14pt" type="text" name="email" placeholder="Email" style="#b8b9c8">
<br>
<br>
<input style="height:20px; width:200px; font-size:14pt" type="text" name="password" placeholder="Password">
<br>
<br>
<select name="sex" style="height:30px; width:200px; font-size:14pt">
<option value="m">Male</option>
<option value="f">Female</option>
</select>
<br>
<br>
<input style="height:30px; width:200px; font-size:14pt" type="submit" value="Submit">
<br>
</div>
</form>
<a href="bigDB.jpg">
<img src="smallDB.jpg">'
</a>
</body>
</html>  

      

Here is my welcome.php

 <html>
 <body>
 Welcome php Surendra Reddy your email id is <?php echo $_GET['email']; ?><br>
 and you are password is <?php echo $_GET['password']; ?><br>
 and your gender id <?php echo $_GET["sex"]; ?>
</body>
</html> 

      

But it doesn't print the values

Thanx in advance

+3


source to share


1 answer


/// will work if you use post instead of get



I tried my code with post and got the methods and it worked well, you need to try the code in xampp or whatever aptana, the code works, may slightly affect the aptana server config

-3


source







All Articles