Ok so say I have the following pages.
index.php
<form action="create_file.php" method="get">
<input type="number" name="num_lines">
<button type="submit">Download File</button>
<form>
create_file.php
<?php
$num_lines = $_GET['num_lines'];
//create a file with $num_lines lines
?>
How would I be able to:
1.) Create a text file with $num_lines lines and serve it to the user
2.) Send a jquery alert to the user to say the download was successful. Ideally the message would be created by create_file.php.
All while staying on index.php?