hello, how can put a form on my website which when you submit the info displays the results on the webpage as a list, for example if i submitted, blue, green and yellow in my form it would show up as: Blue Green Yellow and how can i make categories for that, like if i submitted 1, 2 and 3 aswell it would show: Colours Blue Green Yellow Numbers 1 2 3 Thanks
if you have something like this <form action="details.php" method="post"> Detail1: <input type="text" name="detail1" /> Detail2: <input type="text" name="detail2" /> <input type="submit" /> </form> HTML: details.php: Detail1: <?php echo $_POST["detail1"]; ?><br /> Detail2: <?php echo $_POST["detail2"]; ?> Code (markup): Hope this helps If you have additional questions please ask
<?php $count = 1; foreach (array_keys($_POST) as $key) { $$key = $_POST[$key]; print "$count - $key is ${$key}<br />"; count++; } ?> Code (markup): try this, I don't know if this will work, I haven't tried it out.