简体   繁体   中英

Fill HTML-textfield-value with PHP $_GET-parameter

I have a link like this:

/index.php?textfieldvalue=test123

This link navigates to a site with a textfield. If this site is opened, the default-value should be "test123". To do this i used the PHP $_GET-parameter "textfieldvalue".

My textfield looks like this:

<input type="text" value="<?php $_GET('textfieldvalue') ?>" required />

But the textfield is still empty....

(And $_GET('target') is not empty! I printed it for testing seperate out)

Please remove '&' After '?' and in input field write:

<input type="text" value="<?php echo $_GET['textfieldvalue'] ?>" required />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM