hi i am harshit my question is about html +php file

Category: Phpbb

InMotionFans
n/a Points
Asked:
2014-07-10 8:48 am EST

Hits: 4
this is my code..and i want to exexute a html code and php code in 1 window like 1file ...can i send data from text box of html to php code ...pl help in my example which shon below
<html>
<body>
Enter username = <input type="text" name="t1"><br>
<input type="submit" value="submit"><br>

<?php
$user=$_POST['t1'];
echo "username is "."="."$user";
?>
</body>
</html>

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

JeffMa
Staff
9,162 Points
2014-07-10 9:23 am EST
It would not be possible to have both your form and the PHP code that is processing the form data on the same file. You will need to send the data to a separate file that processes the content of the form.

You must login before you can post a comment about this answer.

Like this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!