When you type in something to the text field and click “submit” it then shows you another plain text page with <body> and </body> prefacing and then appended to the end of the text.
Is that clear? Basically just want to have the output include additional text. Thanks
Form submission is not something that requires javascript. Some developers may use it for that (ie Ajax) to give users a smoother browsing experience in certain cases.
Ok, I think isee what you are doing now. Having a form add text to a web page can be achieved with javascript however I don’t see the point unless this is a purely academic exercise. Usually forms are used to submit data to a web server which then records that information in some kind of database. For the latter javascript would not be essential.
I’m just trying to figure how to add text to an output submission.
You put in your Name in a form, you click a Button, and then it outputs it with that NAME but with additional text.
Example:
I have a LABEL and an INPUT.
The Label says “Insert Name.” I type in my name in the INPUT and it is given the variable “MYNAME”.
I click Submit
It spits out: This is “MYNAME”
Where “This is” is the extra text. I want to biuld something like this, and i want to replace “This is” with html tags… that way it makes it easier to populate a table.
Erm, did you actually read my answer above?
This is exactly what I gave you.
Also, I’d be a bit careful what you learn from the W3Schools site.
It’s ok as a quick reference, but not very good as a place to learn much beyond the basics.
This site explains it in more detail: http://www.w3fools.com/
Sanitize your user’s input before doing anything with it and use PDO if doing anything with databases.
Other than that if you have a concrete question, I would recommend heading over to the PHP forum and starting a new thread. There are a lot of clever folks there who will be happy to help.