Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP Automatically Generate new pages
    primarykey
    data
    text
    <p>I'm making a social network type site, where users can upload their items to be rated. However, I'm trying to improve the way the site is laid out, so want to automatically generate pages once the user inserts a new item. The add.php page has the following form:</p> <pre><code>&lt;form action="add.php" method="post" autocomplete="on" enctype="multipart/form-data" action="&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;" method="POST" id="pic"&gt; &lt;p&gt; &lt;label for="jname" class="iconic user"&gt; Name of Jam &lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt; &lt;input type="text" name="jname" id="jname" value="&lt;?php if (isset($_POST['jname'])) echo $_POST['jname']; ?&gt;" required="required" placeholder="Input your Name of Jam here" /&gt; &lt;/p&gt; &lt;p&gt; &lt;select name="jtype" id="jtype" value="&lt;?php if (isset($_POST['jtype'])) echo $_POST['jtype']; ?&gt;" required="required"&gt; &lt;option value="jam"&gt;Jam&lt;/option&gt; &lt;option value="jelly"&gt;Jelly&lt;/option&gt; &lt;option value="marmalade"&gt;Marmalade&lt;/option&gt; &lt;option value="preserve"&gt;Preserve&lt;/option&gt; &lt;/select&gt; &lt;/p&gt; &lt;p&gt; &lt;label for="producer" class="iconic user"&gt; Jam Producer &lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt; &lt;input type="text" name="producer" id="producer" value="&lt;?php if (isset($_POST['producer'])) echo $_POST['producer']; ?&gt;" required="required" placeholder="Input the producer of the Jam here" /&gt; &lt;/p&gt; Upload a picture of your jam: &lt;/br&gt; &lt;/br&gt; &lt;input name="userfile" type="file" /&gt; &lt;/br&gt; &lt;input type="submit" name="submit" value="Register" /&gt; &lt;input type="hidden" name="submitted" value="TRUE" /&gt; &lt;/form&gt; </code></pre> <p>When the form is submitted, I then want it to generate a new page for that new user created item. Is there a fairly simple way of doing this?</p> <p>Cheers</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload