+ 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
4 Respuestas
+ 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>
+ 1
I tried putting that in put it still came out with the same thing
+ 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
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...