Skip to content
Advertisement

Tag: input

PHP preg_match not working as Input pattern

So I have this input pattern in HTML: <input name=”firstnamereg” type=”text” pattern=”[/p{L}+/u ]+”> But When I use the preg_match it does not work: $regexFirstANDLastname = “/[/p{L}+/u ]+/”; preg_match($regexFirstANDLastname, $_POST[“firstnamereg”]); Answer You need to use This pattern, in Chrome and Firefox, will be compiles as a new RegExp(“^(?:[\p{L}\s]+)$”, “u”) regex object. The u flag is used by default, you do not

HTML – input field jumps out of html table

I have a ‘dynamic’ table where someone can change info about a person. When clicking on ‘update’ the cell should change to an input field. This works, but somehow the input field jumps out of the table and sits above it. This is part of the function that shows the table: This is the page where the function gets called

Is it possible to use placeholders on ?

I’m currently working on at the displaying of information from a database. I was making a summary site where you can only see the important things of a table. After that i made the first element as an <input type=”submit”> in a <form>, so u can click it and come to the detail site. My problem is now: The value

Advertisement