php forms | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

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! https://code.sololearn.com/wTBGL9vesMMX/#php

13th Jan 2018, 8:35 PM
Zakariya
Zakariya - avatar
4 Answers
+ 1
The HTML input tag must have a proceeding ending. <input></input> You may decide to use a placeholder. <input placeholder="type name here"></input>
13th Jan 2018, 8:42 PM
ghostwalker13
ghostwalker13 - avatar
+ 1
I tried putting that in put it still came out with the same thing
13th Jan 2018, 8:49 PM
Zakariya
Zakariya - avatar
+ 1
@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
13th Jan 2018, 8:54 PM
visph
visph - avatar
0
@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...
14th Jan 2018, 11:27 AM
Zakariya
Zakariya - avatar