I have problems to show a var in a text field of the HTML

a.vanderplas56
11 Posts
a.vanderplas56 posted this 15 March 2023
Ask a Question

Hello, I like to ask for help showing a PHP var, coming from a database in an input string with a Value= possibility
Here I show the code that does not work with nicepage:
Woonplaats:
I see the <?php echo $_post;?> in the text field!!

If I use the same code in an extern environment then it works perfectly like:
//Load all the parametrs from the record on the DB
$sql = "SELECT * FROM Persoon WHERE Pin like '$txtPin'";
$result = $mysqli->query($sql);
if ($result->num_rows > 0)

//If the Pin is found, it put on the POST
{
while($row = $result->fetch_assoc()) {
$_POST=$row;
$_POST=$row;
$_POST= $row;
$_POST=$row;
$_POST=$row;
$_POST=$row;
$_POST=$row;
$_POST=$row;
$_POST=$row;
$_POST=$row;
$_POST=$row;

}
}
?>

  Woonplaats: <input type="text" value="<?php echo $_POST['Woonplaats']; ?>"> <br> <br>

This is what I see!
Woonplaats: <?php echo $_post;?>

I do not understand why I see the PHP string in the text field of the input tag!

Hello, I like to ask for help showing a PHP var, coming from a database in an input string with a Value= possibility Here I show the code that does not work with nicepage: Woonplaats: I see the &lt;?php echo $_post;?&gt; in the text field!! If I use the same code in an extern environment then it works perfectly like: //Load all the parametrs from the record on the DB $sql = "SELECT * FROM Persoon WHERE Pin like '$txtPin'"; $result = $mysqli->query($sql); if ($result->num_rows > 0) //If the Pin is found, it put on the POST { while($row = $result->fetch_assoc()) { $_POST=$row; $_POST=$row; $_POST= $row; $_POST=$row; $_POST=$row; $_POST=$row; $_POST=$row; $_POST=$row; $_POST=$row; $_POST=$row; $_POST=$row; } } ?> Woonplaats: <input type="text" value="<?php echo $_POST['Woonplaats']; ?>"> <br> <br> This is what I see! Woonplaats: &lt;?php echo $_post;?&gt; I do not understand why I see the PHP string in the text field of the input tag!
Vote to pay developers attention to this features or issue.
1 Reply
Order By: Standard | Newest
Support Team
Support Team posted this 17 March 2023

Hello Abraham,

Thanks for contacting us

Kindly elaborate more on that and attach some screenshots for your issue.

Where the code doesn't work with Nicepage and where do you see the issue?
...................................................
Sincerely,
Ahmad.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hello Abraham, Thanks for contacting us Kindly elaborate more on that and attach some screenshots for your issue. Where the code doesn't work with Nicepage and where do you see the issue? ................................................... Sincerely, Ahmad. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
You must log in or register to leave comments