I have phpinfo()
text which I want to post and display on another PHP page.
My code:
###File index.php
<html>
<form action = "go.php" method = "post">
<input type = "text" name = "msg"><br><br>
<input type = "submit" value = "Submit">
</form>
<html>
###File go.php :
<?php
$message = $_POST['msg'];
echo "Message : ". $message;
?>
How can I show PHP info when sending phpinfo()
text with post data?
I'm not sure I'm following you, but it sounds like you want to capture the output of phpinfo(). You can do this with output buffering:
<?php
ob_start();
phpinfo();
$info = ob_end_clean();
?>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With