📁 Folder Navigator
Position:
Root
/
apphome
/
faith
/
vpnp1
/
admin
/
brandpurpose
Create
Folders
No folders here.
Files
📄 display.php
📄 error_log
📄 index.php
📄 index5 (1).php
📄 index5.php
📄 part.php
📄 process.php
📄 submissions.txt
📝 File Editor
Editing:
display.php
<?php session_start(); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Display Results</title> <style> .result-container { max-width: 400px; margin: 50px auto; text-align: center; font-family: sans-serif; border: 1px solid #ddd; padding: 20px; } .choices { font-weight: bold; color: #007bff; } </style> </head> <body> <div class="result-container"> <?php if (isset($_SESSION['display_data'])) { $data_to_save = $_SESSION['display_data'] . PHP_EOL; // Adds a new line after each entry $file_name = "submissions.txt"; // Save the string to a text file if (file_put_contents($file_name, $data_to_save, FILE_APPEND | LOCK_EX)) { echo "<h2>Success!</h2>"; echo "<p>Your selections have been saved to <strong>$file_name</strong>.</p>"; } else { echo "<h2>Error</h2>"; echo "<p>Could not save the data. Check folder permissions.</p>"; } // Clear the session so refreshing doesn't save the same data twice unset($_SESSION['display_data']); } else { echo "<h2>No Data</h2>"; echo "<p>There was nothing to save.</p>"; } ?> <br> <a href="index.php">Back to Form</a> </div> </body> </html>
💾 Save Changes