php forms | Sololearn: Learn to code for FREE!


php forms

I just got a php certificate so woohoo. However, I learnt it to access files and mainly to create forms. I used what was in the form handling section yet, my form is incorrect. Could someone provide me with at least the missing code and what I need to do to create it into a fully-fledged form. Thanks in advance!

1/13/2018 8:35:48 PM


4 Answers

New Answer


The HTML input tag must have a proceeding ending. <input></input> You may decide to use a placeholder. <input placeholder="type name here"></input>


I tried putting that in put it still came out with the same thing


@ghostwalker13: <input> is a self-closing element, as <br>, <hr> or <img>: they doesn't require a closing tag ^^ @Zak15: You cannot access to the value of the <input> fields by this way with Php: Php preprocess the php document and so, run on server side, before html page content (without any Php code) was send to user (client side) and displayed in browser. There are mostly 2 ways to reach your goal: + with Php, require to submit the form and send another document (or use AJAX to only load changes) + with JS, dynamically on user side, by accessing the DOM


@visph, umm yeah about that. I am what I consider an amateur at coding. Yes, I know the basics as some advanced things in JS, but don't know how to access the DOM, i think and, i just got a php certificate so I am still going over everything to try and memorise it...